diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 1e25aff9..481fd3f6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "orta.vscode-jest", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", - "biomejs.biome" + "biomejs.biome", + "p42ai.refactor" ] } diff --git a/README.md b/README.md index 0306683f..c87d940e 100644 --- a/README.md +++ b/README.md @@ -14,15 +14,15 @@ Setting up a **cross-platform** environment for building and testing C++/C proje `setup-cpp` is **modular** and you can choose to install any of these tools: -| category | tools | -| --------------------- | ------------------------------------------------------------ | -| compiler and analyzer | llvm, gcc, msvc, vcvarsall, cppcheck, clangtidy, clangformat | -| build system | cmake, ninja, meson, make, task, bazel | -| package manager | vcpkg, conan, choco, brew, nala | -| cache | ccache, sccache | -| documentation | doxygen, graphviz | -| coverage | gcovr, opencppcoverage, kcov | -| other | python, powershell, sevenzip | +| category | tools | +| --------------------- | --------------------------------------------------------------------------- | +| compiler and analyzer | llvm, gcc, msvc, apple-clang, vcvarsall, cppcheck, clang-tidy, clang-format | +| build system | cmake, ninja, meson, make, task, bazel | +| package manager | vcpkg, conan, choco, brew, nala | +| cache | ccache, sccache | +| documentation | doxygen, graphviz | +| coverage | gcovr, opencppcoverage, kcov | +| other | python, powershell, sevenzip | `setup-cpp` automatically handles the dependencies of the selected tool (e.g., `python` is required for `conan`). @@ -149,7 +149,7 @@ jobs: ninja: true vcpkg: true cppcheck: true - clangtidy: true # instead of `true`, which chooses the default version, you can pass a specific version. + clang-tidy: true # instead of `true`, which chooses the default version, you can pass a specific version. # ... ``` diff --git a/action.yml b/action.yml index 9fa4b00e..73037bd9 100644 --- a/action.yml +++ b/action.yml @@ -19,21 +19,51 @@ inputs: llvm: description: "Wether to install llvm (true/false) or the specific version to install" required: false + clang: + description: "Wether to install clang (true/false) or the specific version to install" + required: false gcc: description: "Wether to install gcc (true/false) or the specific version to install" required: false msvc: description: "Wether to install msvc (true/false) or the specific version to install" required: false + cl: + description: "Wether to install cl (true/false) or the specific version to install" + required: false + msbuild: + description: "Wether to install msbuild (true/false) or the specific version to install" + required: false + visualstudio: + description: "Wether to install visualstudio (true/false) or the specific version to install" + required: false + apple-clang: + description: "Wether to install apple-clang (true/false) or the specific version to install" + required: false + apple-llvm: + description: "Wether to install apple-llvm (true/false) or the specific version to install" + required: false + appleclang: + description: "Wether to install apple-clang (true/false) or the specific version to install" + required: false + applellvm: + description: "Wether to install apple-llvm (true/false) or the specific version to install" + required: false vcvarsall: description: "If should run vcvarsall?" required: false cppcheck: description: "Wether to install cppcheck (true/false) or the specific version to install." required: false + clang-tidy: + description: "Wether to install clang-tidy (true/false) or the specific version to install." + required: false clangtidy: description: "The clangWether to install tidy (true/false) or the specific version to install." required: false + clang-format: + description: "The clangWether to install format (true/false) or the specific version to install." + required: false clangformat: description: "The clangWether to install format (true/false) or the specific version to install." required: false @@ -94,6 +124,9 @@ inputs: powershell: description: "Wether to install powershell (true/false) or the specific version to install." required: false + pwsh: + description: "Wether to install pwsh (true/false) or the specific version to install." + required: false python: description: "Wether to install python (true/false) or the specific version to install." required: false diff --git a/dist/legacy/setup-cpp.js b/dist/legacy/setup-cpp.js index 2c241d9b..5cbd2b3d 100644 --- a/dist/legacy/setup-cpp.js +++ b/dist/legacy/setup-cpp.js @@ -1,3 +1,3 @@ #!/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(e,t,r){const n=new Yr(e,t,r);process.stdout.write(""+n+Xr.EOL)}function o(){return Qr>Jr.length-16&&(gr.randomFillSync(Jr),Qr=0),Jr.slice(Qr,Qr+=16)}function i(e){return"string"==typeof e&&Zr.test(e)}function s(e,t=0){const r=(en[e[t+0]]+en[e[t+1]]+en[e[t+2]]+en[e[t+3]]+"-"+en[e[t+4]]+en[e[t+5]]+"-"+en[e[t+6]]+en[e[t+7]]+"-"+en[e[t+8]]+en[e[t+9]]+"-"+en[e[t+10]]+en[e[t+11]]+en[e[t+12]]+en[e[t+13]]+en[e[t+14]]+en[e[t+15]]).toLowerCase();if(!i(r))throw TypeError("Stringified UUID is invalid");return r}function a(e){if(!i(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function c(e,t,r){function n(e,n,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;e.length>r;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=a(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(n),c.set(e,n.length),c=r(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,o){i=i||0;for(let e=0;16>e;++e)o[i+e]=c[e];return o}return s(c)}try{n.name=e}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function l(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=+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 o of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===o||n.some((e=>e===o||e.endsWith("."+o)||o.startsWith(".")&&e.endsWith(""+o))))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 gn(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new gn("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||bn.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=f(r,n,o),s=0,a=t.requests.length;a>s;++s){var c=t.requests[s];if(c.host===i.host&&c.port===i.port)return t.requests.splice(s,1),void c.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function p(e,t){var r=this;u.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host"),i=d({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host}),s=_n.connect(0,i);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function f(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function d(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,s=o.length;s>i;++i){var a=o[i];void 0!==n[a]&&(e[a]=n[a])}}return e}function h(){return qn||(qn=1,function(e){var t=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=vr,n=yr,{access:o,appendFile:i,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 o(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}${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:i;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(""),o=this.wrap(r,n);return this.addRaw(o).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:o}=e,i=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),o&&{rowspan:o});return this.wrap(i,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:o}=r||{},i=Object.assign(Object.assign({},n&&{width:n}),o&&{height:o}),s=this.wrap("img",null,Object.assign({src:e,alt:t},i));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}(Jn)),Jn}function m(){return Vn||(Vn=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={}){l.issueCommand("error",p.toCommandProperties(t),e instanceof Error?""+e:e)}function n(e){l.issue("group",e)}function o(){l.issue("endgroup")}var i=Ur&&Ur.__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=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=Ur&&Ur.__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)&&i(t,e,r);return s(t,e),t},c=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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.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 l=Br,u=Kr,p=qr,f=a(vr),d=a(wr),v=function(){if(Mn)return yn;Mn=1;var e=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(yn,"__esModule",{value:!0}),yn.OidcClient=void 0;const t=Fn,n=Gn,o=m();class i{static createHttpClient(e=!0,r=10){const o={allowRetries:e,maxRetries:r};return new t.HttpClient("actions/oidc-client",[new n.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)}`),o.debug("ID token url is "+e);const r=yield i.getCall(e);return o.setSecret(r),r}catch(r){throw Error("Error message: "+r.message)}}))}}return yn.OidcClient=i,yn}();var y,g;(g=y=e.ExitCode||(e.ExitCode={}))[g.Success=0]="Success",g[g.Failure=1]="Failure",e.exportVariable=function(e,t){const r=p.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV)return u.issueFileCommand("ENV",u.prepareKeyValueMessage(e,t));l.issueCommand("set-env",{name:e},r)},e.setSecret=function(e){l.issueCommand("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?u.issueFileCommand("PATH",e):l.issueCommand("add-path",{},e),process.env.PATH=`${e}${d.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 u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t));process.stdout.write(f.EOL),l.issueCommand("set-output",{name:e},p.toCommandValue(t))},e.setCommandEcho=function(e){l.issue("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=y.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){l.issueCommand("debug",{},e)},e.error=r,e.warning=function(e,t={}){l.issueCommand("warning",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){l.issueCommand("notice",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+f.EOL)},e.startGroup=n,e.endGroup=o,e.group=function(e,t){return c(this,void 0,void 0,(function*(){let r;n(e);try{r=yield t()}finally{o()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t));l.issueCommand("save-state",{name:e},p.toCommandValue(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return c(this,void 0,void 0,(function*(){return yield v.OidcClient.getIDToken(e)}))};var w=h();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return w.summary}});var E=h();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return E.markdownSummary}});var _=function(){if(Hn)return Qn;Hn=1;var e=Ur&&Ur.__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=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Ur&&Ur.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.toPlatformPath=Qn.toWin32Path=Qn.toPosixPath=void 0;const n=r(wr);return Qn.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Qn.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Qn.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Qn}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return _.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return _.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return _.toPlatformPath}})}(Gr)),Gr}function v(e){return Fr.GITHUB_ACTIONS?Zn.error(e):console.log(`${e}`)}function y(e){return Fr.GITHUB_ACTIONS?Zn.warning(e):console.log(`${e}`)}function g(e){return Fr.GITHUB_ACTIONS?Zn.notice(e):console.log(`${e}`)}function w(e){return Fr.GITHUB_ACTIONS?Zn.info(e):console.log(e)}function E(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){E(e,t||{},(function(e,t){e?n(e):r(t)}))}))}Kn(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function _(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(a){}let s;try{s=ho.sync(e.command,{path:r[mo({env:r})],pathExt:t?fo.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=fo.resolve(o?e.options.cwd:"",s)),s}function b(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 O(e,t){return To&&1===e&&!t.file?b(t.original,"spawn"):null}function R(e,t,r){const n=Po(e,t,r),o=xo.spawn(n.command,n.args,n.options);return Ao.hookChildProcess(o,n),o}function S(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 I(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function T(e){return I(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}async function x(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=Pi(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=Ii.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await Ai(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new Ni)}))})),n.getBufferedValue()}function P(e,t,r){const n=Ji(e,t,r),o=Hi(e,t),i=Vi(e,t);let s;Ki(i,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=Tr.spawn(n.file,n.args,n.options)}catch(p){const e=new Tr.ChildProcess,t=Promise.reject(Wo({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Mi(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 o;const i=new Promise(((n,i)=>{o=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),s=n.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])})(s,n.options,a),l=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=vi((()=>{e.kill()}));return n.finally((()=>{o()}))})(s,n.options,c);s.kill=yi.bind(null,s.kill.bind(s)),s.cancel=bi.bind(null,s,{isCanceled:!1});const u=Fo((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,u,p]=await(async({stdout:t,stderr:r,all:n},{encoding:o,buffer:i,maxBuffer:s},a)=>{const c=ji(t,{encoding:o,buffer:i,maxBuffer:s}),l=ji(r,{encoding:o,buffer:i,maxBuffer:s}),u=ji(n,{encoding:o,buffer:i,maxBuffer:2*s});try{return await Promise.all([a,c,l,u])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},ki(t,c),ki(r,l),ki(n,u)])}})(s,n.options,l),f=Qi(n.options,c),d=Qi(n.options,u),h=Qi(n.options,p);if(e||0!==t||null!==r){const c=Wo({error:e,exitCode:t,signal:r,stdout:f,stderr:d,all:h,command:o,escapedCommand:i,parsed:n,timedOut:a,isCanceled:!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:o,escapedCommand:i,exitCode:0,stdout:f,stderr:d,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Di(e),yr.createReadStream(t)))(t);void 0!==r&&(I(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=Li();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=Oi.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Oi.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Oi.bind(void 0,e,"all"))})(s),Mi(s,u),s}function A(e,t,r){const n=Ji(e,t,r),o=Hi(e,t),i=Vi(e,t);Ki(i,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Di(e),yr.readFileSync(t)))(e);if(I(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=Tr.spawnSync(n.file,n.args,{...n.options,input:s})}catch(u){throw Wo({error:u,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=Qi(n.options,a.stdout,a.error),l=Qi(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Wo({stdout:c,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:i,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:o,escapedCommand:i,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function N(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return P(function(){if(void 0===Qs){const e=Js.sync("pwsh",{nothrow:!0});null!==e&&(Qs=e);const t=Js.sync("powershell",{nothrow:!0});null!==t&&(Qs=t)}if(void 0===Qs)throw Error("Could not find powershell");return Qs}(),[...t,"-c",e],r)}function $(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function C(){return null!==Js.sync("sudo",{nothrow:!0})}function L(){var e;return 0===(null==(e=process.getuid)?void 0:e.call(process))||!!process.env.CI}function D(){return L()&&C()}function k(e){return D()?"sudo "+e:e}function j(e,t=[],r=ta){return D()?function(e,t){const[r,...n]=Xi(e);return A(r,n,t)}(F(e,t),r):A(e,M(t),r)}function U(e,t=[],r=ta){return D()?function(e,t){const[r,...n]=Xi(e);return P(r,n,t)}(F(e,t),r):P(e,M(t),r)}function F(e,t){return"sudo "+M([e,...t]).join(" ")}function M(e){return e.map((e=>`'${e}'`))}function G(){return"win32"===process.platform?ra():L()}async function B(e){if(("linux"===process.platform||"darwin"===process.platform)&&D()&&void 0!==process.env.SUDO_USER){let t=yr.statSync(e).isDirectory();await U("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],ta)}}function q(){if(Xa)return za;Xa=1;var e=$a,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return za=function(i,s){var a,c=Object(e(s));if(i=Object(e(i)),n(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),"function"==typeof o&&o(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return i}}function H(){return Sc?Rc:(Sc=1,Rc=(_c?Ec:(_c=1,Ec=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Oc)return bc;Oc=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 bc=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 V(){if(Nc)return Ac;Nc=1;var e=Pc?xc:(Pc=1,xc=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return Ac=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function z(){return Gc?Mc:(Gc=1,Mc=function(){if(Tc)return Ic;Tc=1;var e=H(),t={object:!0,symbol:!0};return Ic=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?H().Symbol:function(){if(Fc)return Uc;Fc=1;var e,t,r,n=vc,o=V(),i=H().Symbol,s=function(){if(Cc)return $c;Cc=1;var e=vc,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return $c=function(o){for(var i,s,a=0;n[o+(a||"")];)++a;return n[o+=a||""]=!0,t(r,i="@@"+o,e.gs(null,(function(r){s||(s=!0,t(this,i,e(r)),s=!1)}))),i}}(),a=function(){if(Dc)return Lc;Dc=1;var e=vc,t=H().Symbol;return Lc=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(jc)return kc;jc=1;var e=vc,t=V(),r=Object.create(null);return kc=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}))})}}(),l=Object.create,u=Object.defineProperties,p=Object.defineProperty;if("function"==typeof i)try{i(),r=!0}catch(f){}else i=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},Uc=e=function e(o){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?i(o):(a=l(t.prototype),u(a,{__description__:n("",o=void 0===o?"":o+""),__name__:n("",s(o))}))},a(e),c(e),u(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),u(e.prototype,{toString:n((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:n((function(){return o(this)}))}),p(e.prototype,e.toPrimitive,n("",(function(){var e=o(this);return"symbol"==typeof e?e:""+e}))),p(e.prototype,e.toStringTag,n("c","Symbol")),p(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),p(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),Uc}())}function X(){return Jc?Kc:(Jc=1,Kc=(wc?gc:(wc=1,gc=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(Yc)return Wc;Yc=1;var e=z().iterator,t=function(){if(qc)return Bc;qc=1;var e={}.toString,t=e.call(function(){return arguments}());return Bc=function(r){return e.call(r)===t}}(),r=function(){if(Vc)return Hc;Vc=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Hc=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=Ta,o=Aa,i=$a,s=ga,a=function(){if(Xc)return zc;Xc=1;var e={}.toString,t=e.call("");return zc=function(r){return"string"==typeof r||r&&"object"==typeof r&&(r instanceof String||e.call(r)===t)||!1}}(),c=Array.isArray,l=function(){}.call,u={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;return Wc=function(f){var d,h,m,v,y,g,w,E,_,b,O=arguments[1],R=arguments[2];if(f=Object(i(f)),s(O)&&o(O),this&&this!==Array&&r(this))d=this;else{if(!O){if(t(f))return 1!==(y=f.length)?Array.apply(null,f):((v=[,])[0]=f[0],v);if(c(f)){for(v=Array(y=f.length),h=0;y>h;++h)v[h]=f[h];return v}}v=[]}if(!c(f))if(void 0!==(_=f[e])){for(w=o(_).call(f),d&&(v=new d),E=w.next(),h=0;!E.done;)b=O?l.call(O,R,E.value,h):E.value,d?(u.value=b,p(v,h,u)):v[h]=b,E=w.next(),++h;y=h}else if(a(f)){for(y=f.length,d&&(v=new d),h=0,m=0;y>h;++h)b=f[h],y>h+1&&(55296>(g=b.charCodeAt(0))||g>56319||(b+=f[++h])),b=O?l.call(O,R,b,m):b,d?(u.value=b,p(v,m,u)):v[m]=b,++m;y=m}if(void 0===y)for(y=n(f.length),d&&(v=new d(y)),h=0;y>h;++h)b=O?l.call(O,R,f[h],h):f[h],d?(u.value=b,p(v,h,u)):v[h]=b;return d&&(u.value=null,v.length=y),v},Wc}())}function W(){if(vl)return ml;vl=1;var e=hl?dl:(hl=1,dl=(ul?ll:(ul=1,ll=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:fl?pl:(fl=1,pl=function(e){return e!=e})),t=Ta,r=$a,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return ml=function(a){var c,l,u;if(!e(a))return n.apply(this,arguments);for(l=t(r(this).length),c=u=isNaN(u=arguments[1])?0:0>u?t(this.length)-s(i(u)):s(u);l>c;++c)if(o.call(this,c)&&e(this[c]))return c;return-1},ml}function Y(){if(Rl)return Ol;Rl=1;var e=Aa,t=Fa,r=function(){}.call;return Ol=function(n,o){var i={},s=arguments[2];return e(o),t(n,(function(e,t,n,a){i[t]=r.call(o,s,e,t,n,a)})),i},Ol}function K(){if(Il)return Sl;Il=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,o=document.createTextNode(""),i=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(o.data=i=++i%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(o,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,o.data=i=++i%2)}};return Sl=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 J(){return Nl?Al:(Nl=1,Al=function(e){return"function"==typeof e})}function Q(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return Ml||(Ml=1,yu.exports=e,yu.exports.default=e),yu.exports}function Z(){if(Gl)return vu;Gl=1;var e=Y(),t=function(){if(Pl)return xl;Pl=1;var e=[].forEach,t=Object.create;return xl=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},xl}(),r=function(){if(Dl)return Ll;Dl=1;var e=$a,t=function(){if(Cl)return $l;Cl=1;var e=J();return $l=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Ll=function(r){return t(e(r))}}(),n=function(){if(Fl)return Ul;Fl=1;var e=function(){if(jl)return kl;jl=1;var e=J();return kl=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return""}}}();return Ul=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)}))}}(),o=Q(),i=K(),s=Object.create,a=t("then","then:finally","done","done:finally");return Ma.promise=function(t,c){var l=s(null),u=s(null),p=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(!o(n))return u[e]=n,void c.emit("setasync",e,1);l[e]=1,p[e]=n;var a=function(t){var r=l[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 l[e],u[e]=t,c.emit("setasync",e,r))},f=function(){s=!0,l[e]&&(delete l[e],delete p[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){i(f)};"function"==typeof(n=n.then((function(e){i(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,f)}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(f)}})),c.on("get",(function(e,t,r){var n;if(l[e])++l[e];else{var s=function(){c.emit("getasync",e,t,r)};o(n=p[e])?"function"==typeof n.done?n.done(s):n.then((function(){i(s)})):s()}})),c.on("delete",(function(e){if(delete p[e],l[e])delete l[e];else if(hasOwnProperty.call(u,e)){var t=u[e];delete u[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=u;u=s(null),l=s(null),p=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},vu}async function ee(e){try{return await yr.promises.access(e),!0}catch{return!1}}function te(e){const t=function(){if(D()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?wr.join("/Users/",process.env.SUDO_USER):wr.join("/home/",process.env.SUDO_USER);{const e=vr.homedir();if(""===e)return;return e}}();return void 0===t?e:e.replace(Tu,t)}async function re(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 ee(e.rcPath)&&((await Pu(e.rcPath,"utf8")).includes(t)||(await xu(e.rcPath,`\n${t}\n`),w(`Added ${t} to ${e.rcPath}`)))}async function ne(e,t){await ee(t)&&((await Pu(t,"utf-8")).includes(e)||(await xu(t,e),w(`${e} was added to ${t}`)))}async function oe(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Nu,...r},o=function(e,t=!1){const r=t?ju(e):e;return qu(r,'"',"\\")}(null!=t?t:"",n.escapeSpace);try{if(Fr.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void w(`Environment variable ${e} is already defined. Skipping.`);Zn.exportVariable(e,o)}catch(i){v(i),await ie(e,o,n)}else await ie(e,o,n)}catch(i){v(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function ie(e,t,r){const n=null!=t?t:"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await N(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void w(`${e}='${n}' was set in the environment.`)):void w(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await $u(r),void(r.overwrite?(await Hu(r.rcPath,`\nexport ${e}="${n}"\n`),w(`${e}="${n}" was added to "${r.rcPath}`)):(await Hu(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),w(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function se(e,t={}){const r={rcPath:Nu,...t};if(!function(e){var t,r;return!!zu.some((t=>t.test(e)))&&(null!=(r=null==(t=process.env.PATH)?void 0:t.split(wr.delimiter))?r:[]).includes(e)}(e)){process.env.PATH=`${e}${wr.delimiter}${process.env.PATH}`;try{if(Fr.GITHUB_ACTIONS)try{Zn.addPath(e)}catch(n){v(n),await ae(e,r)}else await ae(e,r)}catch(n){v(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function ae(e,t){switch(process.platform){case"win32":return await N(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void w(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await $u(t),await Vu(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void w(`"${e}" was added to "${t.rcPath}"`);default:return}}function ce(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 le(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;rp[e]=r}}function ue(e,t,r){const n=function(e){const t=rp[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}(r);return Qu.pluralize(r.locale,t,n[e]).replace("{0}",t)}function pe(){if(Ef)return wf;Ef=1;const e=/\s+/g;class t{constructor(r,i){if(i=n(i),r instanceof t)return r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease?r:new t(r.raw,i);if(r instanceof o)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.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&&f)|(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],T(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),i("comparator trim",e),e=e.replace(a[c.TILDETRIM],u),i("tilde trim",e),e=e.replace(a[c.CARETTRIM],p),i("caret trim",e);let m=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));s&&(m=m.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),i("range list",m);const v=new Map,g=m.map((e=>new o(e,this.options)));for(const r of g){if(h(r))return[r];v.set(r.value,r)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return r.set(t,w),w}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>v(t,r)&&e.set.some((e=>v(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(x(this.set[r],e,this.options))return!0;return!1}}wf=t;const r=new Of,n=pp,o=fe(),i=ap,s=bp,{safeRe:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:p}=cp,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=sp,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},y=(e,t)=>(i("comp",e,t),e=_(e,t),i("caret",e),e=w(e,t),i("tildes",e),e=O(e,t),i("xrange",e),e=S(e,t),i("stars",e),e),g=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(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,o,s)=>{let a;return i("tilde",e,t,r,n,o,s),g(r)?a="":g(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:g(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(i("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,i("tilde return",a),a})),_=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{i("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,n,o,s,a)=>{let c;return i("caret",e,t,n,o,s,a),g(n)?c="":g(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:g(s)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(i("replaceCaret pr",a),c="0"===n?"0"===o?`>=${n}.${o}.${s}-${a} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s}-${a} <${+n+1}.0.0-0`):(i("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${s}${r} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s} <${+n+1}.0.0-0`),i("caret return",c),c}))},O=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>(e=e.trim()).replace(t.loose?a[c.XRANGELOOSE]:a[c.XRANGE],((r,n,o,s,a,c)=>{i("xRange",e,r,n,o,s,a,c);const l=g(o),u=l||g(s),p=u||g(a);return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(u&&(s=0),a=0,">"===n?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",u?o=+o+1:s=+s+1),"<"===n&&(c="-0"),r=`${n+o}.${s}.${a}${c}`):u?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:p&&(r=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),i("xRange return",r),r})),S=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),I=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),T=e=>(t,r,n,o,i,s,a,c,l,u,p,f)=>`${r=g(n)?"":g(o)?`>=${n}.0.0${e?"-0":""}`:g(i)?`>=${n}.${o}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=g(l)?"":g(u)?`<${+l+1}.0.0-0`:g(p)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${p}-${f}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),x=(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(i(e[r].semver),e[r].semver!==o.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 wf}function fe(){if(bf)return _f;bf=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,o){if(o=r(o),n instanceof t){if(n.loose===!!o.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,o),this.options=o,this.loose=!!o.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[o.COMPARATORLOOSE]:n[o.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 i(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("="))&&!(i(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}_f=t;const r=pp,{safeRe:n,t:o}=cp,i=ff,s=ap,a=bp,c=pe();return _f}function de(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{a(n.next(e))}catch(t){o(t)}}function s(e){try{a(n.throw(e))}catch(t){o(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(i,s)}a((n=n.call(e)).next())}))}function he(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,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&i[3]>r[1])){a.label=r[1];break}if(6===r[0]&&i[1]>a.label){a.label=i[1],i=r;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,o,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function me(e){return null==e?[]:Array.isArray(e)?e:[e]}function ve(e,t,r,n){var o,i=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*(o=+r)==0?o:r),!!r)):0*(o=+r)==0?o:r;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s]}async function ye(e,t,r,n=40){Fr.GITHUB_ACTIONS?await async function(e,t,r=40){await U("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await $u(r),await Nd(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function ge(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 we(){return null!==Js.sync("nala",{nothrow:!0})}function Ee(){let e;return e=we()?"nala":"apt-get",e}function _e(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function be(e){try{const{stdout:t}=await P("dpkg",["-s",e],{env:ge("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Oe(e,t=Ee()){return(await Promise.all(e.map((e=>Re(e,t))))).filter((e=>void 0!==e))}async function Re(e,t=Ee()){const r=await async function(e,t,r){switch(await Se(e,t,r)){case Dd.NameDashVersion:return`${t}-${r}`;case Dd.NameEqualsVersion:return`${t}=${r}`;case Dd.Name:return void 0!==r&&""!==r&&y(`Could not find package ${t} with version ${r}. Installing the latest version.`),t;default:throw Error(`Could not find package ${t} ${null!=r?r:""}`)}}(t,e.name,e.version);return await be(r)?void 0:r}async function Se(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await P("apt-cache",["search","--names-only",`^${_e(t)}-${_e(r)}$`],{env:ge(e),stdio:"pipe"});if(""!==n.trim())return Dd.NameDashVersion;try{const{stdout:n}=await P("apt-cache",["show",`${t}=${r}`],{env:ge(e)});if(""===n.trim())return Dd.NameEqualsVersion}catch{}}try{const{stdout:r}=await P("apt-cache",["show",t],{env:ge(e),stdio:"pipe"});if(""!==r.trim())return Dd.Name}catch{}return Cd?Dd.None:(Ld(e),Se(e,t,r))}async function Ie(e,t=!1){const r=Ee();for(const{name:i,version:s}of e)w(`Installing ${i} ${null!=s?s:""} via ${r}`);t&&Ld(r),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=Ee()){await jd(t),await async function(e){await be("software-properties-common")||j(e,["install","-y","--fix-broken","-o",$d,"software-properties-common"],{...ta,env:ge(e)})}(t),j("add-apt-repository",["-y","--no-update",e],{...ta,env:ge(t)}),Ld.clear(),Ld(t)}(t,e))))}(r,e);const n=await Oe(e,r);if(0===n.length)return w("All packages are already installed"),{binDir:"/usr/bin/"};await jd(r);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?Te(t):async function({key:e,keyServer:t=Md,fileName:r,keyStorePath:n=Md}){try{Pe(r);const o=wr.join(n,r);return await ee(o)||(xe(),await U("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await U("chmod",["644",o])),o}catch(o){return void y(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),j(r,["install","--fix-broken","-y",...n],{...ta,env:ge(r)})}catch(o){if(!function(e){return"string"==typeof e.stderr}(o))throw o;Ud.some((e=>o.stderr.includes(e)))&&(y(`Failed to install packages ${n}. Retrying...`),j(r,["install","--fix-broken","-y","-o",$d,...n],{...ta,env:ge(r)}))}return{binDir:"/usr/bin/"}}async function Te({keyUrl:e,fileName:t,keyStorePath:r=Fd}){try{Pe(t);const n=wr.join(r,t);if(!(await ee(n))){xe(),await Ie([{name:"ca-certificates"}]);const r=wr.join(vr.tmpdir(),t),o=new Ad.DownloaderHelper(e,vr.tmpdir(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),j("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),j("chmod",["644",n])}return n}catch(n){return void y(`Failed to add apt key via download ${e}: ${n}`)}}function xe(){j("gpg",["-k"])}function Pe(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function Ae(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof Gd)return{binDir:Gd};const t=await Js("brew",{nothrow:!0});if(null!==t)return Gd=wr.dirname(t),{binDir:Gd};await Ie([{name:"ca-certificates"}]);const r=new Ad.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",vr.tmpdir(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),A("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),Gd=Ne(),await se(Gd,e.rcOptions),{binDir:Gd}}function Ne(){return wr.join($e(),"bin")}function $e(){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")}async function Ce(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};w(`Installing ${e} ${null!=t?t:""} via brew`),zd&&null!==Js.sync("brew",{nothrow:!0})||(await Ae(),zd=!0);const o=Ne(),i=wr.join(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return n.overwrite&&s.push("--overwrite"),n.cask&&s.push("--cask"),A(i,s,{stdio:"inherit"}),{binDir:o}}function Le(){return"linux"===process.platform&&(void 0===Bd&&(Bd=null!==Js.sync("dnf",{nothrow:!0})),Bd)}function De(){return"linux"===process.platform&&(void 0===qd&&(qd=null!==Js.sync("pacman",{nothrow:!0})),qd)}function ke(){return"linux"===process.platform&&(void 0===Hd&&(Hd=null!==Js.sync("apt-get",{nothrow:!0})),Hd)}async function je(e,t,r){var n;if("win32"!==process.platform)return;if("string"==typeof Vd)return{binDir:Vd};const o=Js.sync("choco",{nothrow:!0});if(null!==o)return Vd=wr.dirname(o),{binDir:Vd};let i="powershell.exe";const s=Js.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==s&&(i=s),A(i,["-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 se(a,Yv);const c=Js.sync("choco",{nothrow:!0});return Vd=null!==c?wr.dirname(c):(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin",await ee(Vd)?{binDir:Vd}:void 0}async function Ue(e,t,r=[]){var n;w(`Installing ${e} ${null!=t?t:""} via chocolatey`),Xd&&null!==Js.sync("choco",{nothrow:!0})||(await je(0,0,process),Xd=!0);const o=process.env.PATH,i={...process.env};if(i.TMP=void 0,i.TEMP=void 0,i.Path=void 0,i.PATH=o,void 0!==t&&""!==t)A("choco",["install","-y",e,"--version="+t,...r],{env:i,extendEnv:!1,stdio:"inherit"});else try{A("choco",["install","-y",e,...r],{env:i,extendEnv:!1,stdio:"inherit"})}catch(a){if(!a.message.includes("exit code 3010"))throw a;w(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 se(s,Yv),{binDir:s}}async function Fe(e){for(const{name:t,version:r}of e)w(`Installing ${t} ${null!=r?r:""} via dnf`);return j("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:r}=await P("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;{const{stdout:r}=await P("dnf",["search","-q",`${e}${t}`]);if(""!==r.trim())return`${e}${t}`;y(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function Me(e,t,r){w(`Installing ${e} ${null!=t?t:""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===Js.sync("yay",{nothrow:!0}))try{j("pacman",["-S","--noconfirm","base-devel","git"]);const e=wr.join(vr.tmpdir(),"yay");j("mkdir",["-p",e]),L()?(y("Creating a non-root user to build yay"),j("useradd",["-m","-G","wheel","builder"]),j("passwd",["-d","builder"]),j("chown",["-R","builder:builder",e]),j("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),Jd=!0,A("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),A("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(A("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:vr.tmpdir()}),A("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),A("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),Wd||"yay"===r||(j(n,["-Sy","--noconfirm"]),Wd=!0),Yd||"yay"===r||(j(n,["-S","--noconfirm","base-devel"]),Yd=!0);const o=e=>"yay"===r?L()&&Jd?j("su",["-","builder","-c","yay -S --noconfirm "+e]):A(r,["-S","--noconfirm",e]):j(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 P(e,["-Si",t]);for(const e of n.matchAll(Kd))r.push(e[1])}catch(n){y(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{o(`${e}=${t}`)}catch{o(`${e}${t}`)}else w(`Failed to install ${e} ${t} via pacman, trying without version`),o(e)}else o(e);return{binDir:"/usr/bin/"}}function Ge(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 Be(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function qe(e,t=!0){return t?wr.basename(e):wr.basename(e,wr.extname(e))}function He(e){return wr.normalize(e).replace(RegExp(_e(wr.sep)+"$"),"")}function Ve(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function ze(e,t){const r=wr.extname(e),n=`${t}${wr.basename(e,r)}${r}`;return wr.join(wr.dirname(e),n)}function Xe(e,t){const r=wr.extname(e),n=`${wr.basename(e,r)}${t}${r}`;return wr.join(wr.dirname(e),n)}function We(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ye(e){return"win32"===process.platform?e:"./"+e}function Ke(e){const t=wr.extname(e).length;return e.slice(0,-t)}function Je(e,t){return Zd(e,t)}function Qe(e,t){const r=wr.relative(t,e);return!(!r||".."===r||r.startsWith(".."+wr.sep)||r===wr.resolve(e))}function Ze(e){return Oh(this,void 0,void 0,(function*(){if(Ih.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Ih.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function et(e){return Oh(this,void 0,void 0,(function*(){Rh.ok(e,"a path argument must be provided"),yield Ih.mkdir(e,{recursive:!0})}))}function tt(e){return Oh(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(Ih.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(Sh.delimiter))e&&t.push(e);if(Ih.isRooted(e)){const r=yield Ih.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(Sh.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(Sh.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield Ih.tryGetExecutablePath(Sh.join(o,e),t);r&&n.push(r)}return n}))}function rt(e,t,r,n){return Oh(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield et(t);const o=yield Ih.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield Ih.lstat(o)).isDirectory()?yield rt(o,s,r,n):yield nt(o,s,n)}yield Ih.chmod(t,(yield Ih.stat(e)).mode)}))}function nt(e,t,r){return Oh(this,void 0,void 0,(function*(){if((yield Ih.lstat(e)).isSymbolicLink()){try{yield Ih.lstat(t),yield Ih.unlink(t)}catch(n){"EPERM"===n.code&&(yield Ih.chmod(t,"0666"),yield Ih.unlink(t))}const r=yield Ih.readlink(e);yield Ih.symlink(r,t,Ih.IS_WINDOWS?"junction":null)}else(yield Ih.exists(t))&&!r||(yield Ih.copyFile(e,t))}))}function ot(e,t,r){return rm(this,void 0,void 0,(function*(){const n=om.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=n[0];return t=n.slice(1).concat(t||[]),new om.ToolRunner(o,t,r).exec()}))}function it(e,t){const r=[];t=t||Em.arch();const n=_m.join(pt(),e);if(gm.existsSync(n)){const e=gm.readdirSync(n);for(const o of e)if(lt(o)){const e=_m.join(n,o,t||"");gm.existsSync(e)&&gm.existsSync(e+".complete")&&r.push(o)}}return r}function st(e){return hm(this,void 0,void 0,(function*(){return e||(e=_m.join(ft(),Tm.default())),yield ym.mkdirP(e),e}))}function at(e,t,r){return hm(this,void 0,void 0,(function*(){const n=_m.join(pt(),e,Om.clean(t)||t,r||"");vm.debug("destination "+n);const o=n+".complete";return yield ym.rmRF(n),yield ym.rmRF(o),yield ym.mkdirP(n),n}))}function ct(e,t,r){const n=_m.join(pt(),e,Om.clean(t)||t,r||"");gm.writeFileSync(n+".complete",""),vm.debug("finished caching tool")}function lt(e){const t=Om.clean(e)||"";vm.debug("isExplicit: "+t);const r=null!=Om.valid(t);return vm.debug("explicit? "+r),r}function ut(e,t){let r="";vm.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Om.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Om.satisfies(o,t)){r=o;break}}return vm.debug(r?"matched: "+r:"match not found"),r}function pt(){const e=process.env.RUNNER_TOOL_CACHE||"";return Im.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function ft(){const e=process.env.RUNNER_TEMP||"";return Im.ok(e,"Expected RUNNER_TEMP to be defined"),e}function dt(e,t){const r=Ur[e];return void 0!==r?r:t}function ht(e,t){if(!e||!t)throw Error("retry-as-promised must be passed a callback and a options set");const r={$current:"$current"in(t="number"==typeof t?{max:t}:t)?t.$current:1,max:t.max,timeout:t.timeout||void 0,match:t.match?Array.isArray(t.match)?t.match:[t.match]:[],backoffBase:void 0===t.backoffBase?100:t.backoffBase,backoffExponent:t.backoffExponent||1.1,report:t.report,name:t.name||e.name||"unknown"};return r.match&&!Array.isArray(r.match)&&(r.match=[r.match]),r.report&&r.report("Trying "+r.name+" #"+r.$current+" at "+(new Date).toLocaleTimeString(),r),new Promise((function(t,n){let o,i,s;r.timeout&&(o=setTimeout((function(){i&&clearTimeout(i),n(new jm(r.name+" timed out",s))}),r.timeout)),Promise.resolve(e({current:r.$current})).then(t).then((function(){o&&clearTimeout(o),i&&clearTimeout(i)})).catch((function(a){o&&clearTimeout(o),i&&clearTimeout(i),s=a,r.report&&r.report(a&&""+a||a,r,a);var c=r.max>r.$current;if(!c)return n(a);if(c=0===r.match.length||r.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,a)})),!c)return n(a);var l=r.backoffBase*Math.pow(r.backoffExponent,r.$current-1);r.$current++,r.report&&r.report(`Retrying ${r.name} (${r.$current})`,r),l?(r.report&&r.report(`Delaying retry of ${r.name} by ${l}`,r),i=setTimeout((function(){ht(e,r).then(t).catch(n)}),l)):ht(e,r).then(t).catch(n)}))}))}function mt(e,t,r){switch(process.platform){case"win32":return Ue("7zip",e);case"darwin":return Ce("p7zip",e);case"linux":if(De())return Me("p7zip",e);if(Le())return Fe([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(ke())return Ie([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function vt(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||y(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function yt(e,t){return await P(await async function(){return void 0===Fm&&(null===Js.sync("7z",{nothrow:!0})&&await mt("",0,process),Fm="7z"),Fm}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await B(t),t}function gt(e,t){return yt(e,t)}async function wt(e,t){return null!==Js.sync("7z",{nothrow:!0})?yt(e,t):null!==Js.sync("unzip",{nothrow:!0})?(await P("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await B(t),t):yt(e,t)}async function Et(e,t,r=0,n=[]){await async function(e){switch(w("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(De()?(await Me("gzip"),await Me("tar")):Le()?await Fe([{name:"gzip"},{name:"tar"}]):ke()&&await Ie([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(De()?(await Me("xz"),await Me("tar")):Le()?await Fe([{name:"xz"},{name:"tar"}]):ke()&&await Ie([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(vt(e));try{await Th(t)}catch{}try{await P("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&y(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await B(t),t}async function _t(e,t,r,n,o){var i,s;w(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=null!=(i=process.env.RUNNER_TEMP)?i:vr.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:wr.join(vr.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:l,extractedFolderName:u,extractFunction:p}=await r(t,process.platform,o);if(Fr.GITHUB_ACTIONS)try{const r=Dm(e,t);if(r){const n=wr.join(r,u),o=wr.join(n,c);if(await ee(wr.join(o,l)))return w(`${e} ${t} was found in the cache at ${o}.`),await se(o,Yv),{installDir:n,binDir:o}}}catch{}const f=wr.join(n,u),d=wr.join(f,c),h=wr.join(d,l);return await async function(e,t,r,n,o,i,s,a){if((await Promise.all([ee(e),ee(t)])).includes(!1))try{const e=await async function(e,t,r){w(`Download ${e} ${t}`);const n=await Um((()=>{var e;const t=wr.join(null!=(e=process.env.RUNNER_TEMP)?e:vr.tmpdir(),`${Date.now()}-${wr.basename(r)}`);return Cm(r,t)}),{name:r,max:4,backoffBase:2e3,report:e=>w(e)});return n}(r,n,o);w(`Extracting ${e} to ${i}`);const t=null!=s?s:function(e){switch(e){case 0:case 1:case 2:return Et;case 3:return wt;default:return yt}}(vt(o));await t(e,i)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${o}: ${c}`)}if(w(`Add ${e} to PATH`),await se(e,Yv),!(await ee(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await os(t,"755")}catch(c){y(`Failed to make ${t} executable: ${c}`)}}(d,h,e,t,a,n,p,o),await async function(e,t,r){Fr.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==hr("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await Lm(e,t,r))}(n,e,t),{installDir:f,binDir:d}}function bt(e,t,r){var n;const o=null!=(n=gf(e))?n:e;switch(t){case"win32":{const t=of(o,"v3.19.6");let n;ph.includes(r)?n=t?"win64-x64":"windows-x86_64":fh.includes(r)?n=t?"win32-x86":"windows-i386":dh.includes(r)?n="windows-arm64":(w(`Trying unsupported arch '${r}' for cmake on Windows`),n="windows-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:Ve("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${of(o,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:Ve("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=of(o,"v3.19.8");let n;dh.includes(r)?n=t?"Linux-aarch64":"linux-aarch64":ph.includes(r)?n=t?"Linux-x86_64":"linux-x86_64":(w(`Trying unsupported arch '${r}' for cmake on Linux`),n="linux-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:Ve("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function Ot(e,t,r){return _t("cmake",e,bt,t,r)}async function Rt(e,t,r=tv){const n=await async function(e,t=tv){var r,n;try{const o=await exports.getExecOutput_1(e,["--version"]),i=null==(r=(o.stdout||o.stderr||"").trim().match(t))?void 0:r[1];return null!=(n=gf(i))?n:void 0}catch(o){return void console.error(o)}}(e,r);return void 0!==n&&""!==t&&-1!==Fp(n,t)}function St(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function It(e,t,r){const n=await async function(e,t,r){let n,o=await Tt(t);if(void 0!==o){const e=wr.dirname(o);n={bin:o,installDir:e,binDir:e}}else{if(Fr.GITHUB_ACTIONS)try{w("Installing python in GitHub Actions");const{setupActionsPython:i}=await Promise.resolve().then((()=>require("./assets/actions_python-BF80bhWt.js")));if(await i(e,t,r),o=await Tt(t),void 0===o)throw Error("Python binary could not be found");const s=wr.dirname(o);n={bin:o,installDir:s,binDir:s}}catch(i){y(""+i)}void 0===n&&(n=await async function(e,t){let r;switch(process.platform){case"win32":{e?await Ue("python3",t,["--params=/InstallDir:"+e]):await Ue("python3",t);const n=await Tt(e);if(void 0===n)throw Error("Python binary could not be found");const o=wr.dirname(n);await se(o,Yv),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await Ce("python3",t);const e=await P("brew",["--prefix","python"],{stdio:"pipe"}),n=wr.join(e.stdout,"libexec","bin");await se(n,Yv);break}case"linux":if(De())r=await Me("python",t);else if(Le())r=await Fe([{name:"python3",version:t}]);else{if(!ke())throw Error("Unsupported linux distributions");r=await Ie([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return r}(t,e))}if(void 0===o||void 0===n.bin){if(o=await Tt(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:wr.dirname(o),binDir:wr.dirname(o)}}return n}(e,t,r);xr(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await Pt();return void 0===t?(w("pip was not found. Installing pip"),await async function(e){await Nt(e)||(await Ut("pip"),await Nt(e))}(e),Pt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await jt(e)))try{await kt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===Ut("pipx",!1))throw Error("pipx was not installed correctly "+t)}await P(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await kt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){y(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await kt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await kt(e,"wheel",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1})}catch(t){y(`Failed to install setuptools or wheel: ${""+t}. Ignoring...`)}}(o),n}async function Tt(e){for(const t of["python3","python"]){const r=await xt(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=wr.parse(vr.homedir()).root,t=(await hs(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await xt(t,wr.join(e,r));if(void 0!==n)return n}}}async function xt(e,t){var r;try{if(void 0!==t){const r=wr.join(t,Ve(e));if(await ee(r)&&await Rt(r,iv))return r}const n=null!=(r=await Js(e,{nothrow:!0,all:!0}))?r:[];for(const e of n)if(await Rt(e,iv))return e}catch{}}async function Pt(){for(const e of["pip3","pip"]){const t=await At(e);if(void 0!==t)return t}}async function At(e){var t;try{const r=null!=(t=await Js(e,{nothrow:!0,all:!0}))?t:[];for(const e of r)if(await Rt(e,ov))return e}catch{}}async function Nt(e){try{return await P(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){w(""+t);try{return await P(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){w(""+r)}}return!1}function $t(e,t,r=null){var n;return Ct(t)&&"linux"===process.platform&&null!==r&&e in sv?function(e,t){const r=e[0],n=Object.keys(t).map((e=>Number.parseInt(e,10))).sort(((e,t)=>t-e)).find((e=>r>=e));return void 0===n?"":t[n]}(r,sv[e]):Ct(t)&&e in nv?null!=(n=nv[e])?n:"":"true"===t?"":null!=t?t:""}function Ct(e){return"true"===e||void 0===e}function Lt(){if(!("version"in vr)||"function"!=typeof vr.version)return null;const e=vr.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 Dt(e,t,r={}){return kt(await hv(),e,t,r)}async function kt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await jt(e),l=c?"pipx":"pip",u=await async function(e,t){return 0===(await P(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,t);if(u)try{Zn.info(`Installing ${t} ${null!=r?r:""} via ${l}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,o=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&i?["--user"]:[],u=process.env;c&&i&&(u.PIPX_HOME=await fv(),u.PIPX_BIN_DIR=await dv()),A(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(d){if(Zn.info(`Failed to install ${t} via ${l}: ${d}.`),null===await Ut(t))throw Error(`Failed to install ${t} via ${l}: ${d}.`)}else if(null===await Ut(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);const p=await av(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>ee(wr.join(e,Ve(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=Js.sync(Ve(t),{nothrow:!0});return null!==n?wr.dirname(n):e[e.length-1]}(p,t);return await se(f,Yv),{binDir:f}}async function jt(e){return 0===(await P(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Ut(e,t=!0){if("linux"===process.platform){if(Zn.info(`Installing ${e} via the system package manager`),De())return Me(t?"python-"+e:e);if(Le())return Fe([{name:t?"python3-"+e:e}]);if(ke())return Ie([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return Ce(e);return null}async function Ft(e,t,r){switch(process.platform){case"win32":return await Ue("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await se(e,Yv),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return Ce("graphviz",e);case"linux":if(De())return Me("graphviz",e);if(Le())return Fe([{name:"graphviz",version:e}]);if(ke())return Ie([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Mt(e,t){const{ArchiveHdi:r}=await Promise.resolve().then((()=>require("./assets/hdi-HMjVj8JE.js"))),n=new r(e);await n.read((async e=>{await e.extract(wr.join(t,e.path))}))}function Gt(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:Ve("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:Ve("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:Ve("doxygen"),extractedFolderName:t,extractFunction:Mt,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Bt(){if("darwin"===process.platform)try{const e=await exports.getExecOutput_1("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await oe("SDKROOT",t.trim(),Yv):v("SDKROOT not set")}catch(e){v(e)}}async function qt(e){const t=await ms(e,"utf-8");return JSON.parse(t)}function Ht(e,t){const r=Object.keys(e),n=new Map;if(void 0===t.filterMapTag)for(const i of r)n.set(i,i);else for(const i of r){const e=t.filterMapTag(i);void 0!==e&&n.set(e,i)}if(0===n.size)return;const o=[];for(const[i,s]of n.entries())i.startsWith(t.version)&&o.push(s);if(0!==o.length)for(const i of o){let r=e[i];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=Vt(i,r,t);if(void 0!==n)return n}}function Vt(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 o of t)r.keywords.every((e=>o.includes(e)))&&n.push(o);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)e.includes(n)&&t++;return t})),o=Math.max(...t);return{tag:e,name:n[t.indexOf(o)]}}return{tag:e,name:n[0]}}}async function zt(e,t,r){var n;if("win32"===t){const t=Ht(await qt(wr.join(yv,"github_brechtsanders_winlibs_mingw.json")),{version:e,keywords:[null!=(n={x64:"x86_64",ia32:"i386"}[r])?n:r]});if(void 0===t)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:Ve("g++"),extractedFolderName:"mingw64",extractFunction:yt,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${t.tag}/${t.name}`}}throw Error(`Unsupported platform '${t}'`)}async function Xt(e,t,r,n=40){let o;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||await Ue("gcc-arm-embedded",e);try{o=await _t("g++",e,zt,t,r)}catch(i){w(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),o=await async function(e,t){var r,n;let o;if(await Ue("mingw",e),"x64"===t&&await ee("C:/tools/mingw64/bin")?(o="C:/tools/mingw64/bin",await se(o,Yv)):"ia32"===t&&await ee("C:/tools/mingw32/bin")?(o="C:/tools/mingw32/bin",await se(o,Yv)):await ee((null!=(r=process.env.ChocolateyInstall)?r:"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(o=(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin"),void 0!==o)return{binDir:o}}(e,r)}break;case"darwin":o=await Ce("gcc",e);break;case"linux":"x64"===r?De()?o=await Me("gcc",e):Le()?o=await Fe([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):ke()&&(o=""===e?await Ie([{name:"gcc"},{name:"g++"}]):await Ie([{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"}}])):(w(`Install g++-multilib because gcc for ${r} was requested`),De()?o=await Me("gcc-multilib",e):ke()&&(o=""===e?await Ie([{name:"gcc-multilib"}]):await Ie([{name:"gcc-multilib",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!==o)return await async function(e,t,r=40){var n;const o=[];if("win32"===process.platform)o.push(oe("CC",Ve(t+"/gcc"),Yv),oe("CXX",Ve(t+"/g++"),Yv));else{let s=e;""===e&&(s=await async function(e,t){try{let r="gcc";if(await ee(e+"/gcc"))r=e+"/gcc";else{const t=(await hs(e)).sort(((e,t)=>{var r,n,o,i;return function(e,t){const r=gf(e),n=gf(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(null!=(n=null==(r=e.match(/^gcc-?(.*)(\.exe)?$/))?void 0:r[1])?n:"",null!=(i=null==(o=t.match(/^gcc-?(.*)(\.exe)?$/))?void 0:o[1])?i:"")}));for(const n of t)if(n.startsWith("gcc")){r=`${e}/${n}`;break}}const{stdout:n}=await P(r,["--version"],{stdio:"pipe"}),o=n.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(y("Failed to parse gcc version from: "+n),t)}catch(i){return v("Failed to get gcc version: "+i),t}}(t,s),w("Using gcc version "+s));const a=Cp(null!=(n=gf(s))?n:s);5>a?(o.push(oe("CC",`${t}/gcc-${s}`,Yv),oe("CXX",`${t}/g++-${s}`,Yv)),ke()&&o.push(ye("cc",`${t}/gcc-${s}`,Yv,r),ye("cxx",`${t}/g++-${s}`,Yv,r),ye("gcc",`${t}/gcc-${s}`,Yv,r),ye("g++",`${t}/g++-${s}`,Yv,r))):(o.push(oe("CC",`${t}/gcc-${a}`,Yv),oe("CXX",`${t}/g++-${a}`,Yv)),ke()&&o.push(ye("cc",`${t}/gcc-${a}`,Yv,r),ye("cxx",`${t}/g++-${a}`,Yv,r),ye("gcc",`${t}/gcc-${a}`,Yv,r),ye("g++",`${t}/g++-${a}`,Yv,r)))}o.push(Bt()),Fr.GITHUB_ACTIONS&&await async function(){const e=wr.join(yv,"gcc_matcher.json");if(!(await ee(e)))return y("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}(),await Promise.all(o)}(e,o.binDir,n),o}function Wt(e,t,r){const n=function(e,t){switch(e){case"win32":return ph.includes(t)||fh.includes(t)?"win":dh.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return ph.includes(t)||fh.includes(t)?"linux":dh.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:Ve("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function Yt(e,t,r){return _t("ninja",e,Wt,t,r)}function Kt(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:Ve("kcov")}}function Jt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:Ve("kcov"),extractFunction:Qt}}async function Qt(e,t){const r=await Et(e,t,1),n=await async function(){let e=Js.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await Ot($t("cmake",void 0,await pv()),wr.join(te("~"),"cmake"),"");e=wr.join(t,"cmake")}return null===Js.sync("ninja",{nothrow:!0})&&await Yt($t("ninja",void 0,await pv()),wr.join(te("~"),"ninja"),""),e}();"linux"===process.platform&&(De()?await Promise.all([Me("libdwarf"),Me("libcurl-openssl")]):Le()?await Fe([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):ke()&&await Ie([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==Js.sync("patch",{nothrow:!0})){const e=wr.join(gv,"gcc13.patch");await P("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else w("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const o=wr.join(r,"build");return await P(n,["-S",r,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await P(n,["--build",o,"--config","Release"],{cwd:r,stdio:"inherit"}),r}function Zt(e){return Object.values($v).includes(e)?e:e in $v?$v[e]:e}function er(e){if(Object.keys($v).includes(e))return e;for(const[t,r]of Object.entries($v))if(r===e)return t;return e}function tr(e){const t=Zt(e);let r;if(t){const e=t.split(".")[0]+".9";r=`-version "${t},${e}"`}else r="-latest";let n=function(e,t){try{return(""+Rv.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Ov.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Sv.existsSync(n))return Ov.info("Found with vswhere: "+n),n;Ov.info("Not found with vswhere");const o=e?[er(e)]:Nv;for(const i of Pv)for(const e of o)for(const t of Av)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Ov.info("Trying standard location: "+n),Sv.existsSync(n))return Ov.info("Found standard location: "+n),n;if(Ov.info("Not found in standard locations"),n=xv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Sv.existsSync(n))return Ov.info("Found VS 2015: "+n),n;throw Ov.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function rr(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function nr(e,t,r,n,o,i,s){void 0!==t&&await ee(t)&&(w(`Adding ${t} to PATH`),await oe("VCTargetsPath",t,Yv)),await kv(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),o,n,i,s,e)}async function or(e,t,r,n,o,i,s,a=12e5){Zn.startGroup(`Installing ${e} ${t}`);try{await function(e,t){const{milliseconds:r,fallback:n,message:o,customTimers:i={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(t.signal){const{signal:e}=t;e.aborted&&c(bv(e)),e.addEventListener("abort",(()=>{c(bv(e))}))}if(r===1/0)return void e.then(a,c);const l=new wv;s=i.setTimeout.call(void 0,(()=>{if(n)try{a(n())}catch(t){c(t)}else"function"==typeof e.cancel&&e.cancel(),!1===o?a():o instanceof Error?c(o):(l.message=null!=o?o:`Promise timed out after ${r} milliseconds`,c(l))}),r),(async()=>{try{a(await e)}catch(t){c(t)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{i.clearTimeout.call(void 0,s),s=void 0},a}(async function(e,t,r,n,o,i){const s=["llvm","clangformat","clangtidy"].includes(e);let a;if("vcvarsall"===e)await nr($t(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Ae({rcOptions:Yv});else{const i=wr.join(o,s?"llvm":e),c=$t(e,t,r),l=zv[e];a=await l(c,i,n)}i.push(mr(e,a))}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(c){v(c),c instanceof Error&&void 0!==c.stack&&v(c.stack),s.push(e+" failed to install")}Zn.endGroup()}async function ir(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:o}=await async function(e,t){const r=[],n=[];switch(e){case"win32":ph.includes(t)?r.push("win64"):fh.includes(t)?r.push("win32"):dh.includes(t)?r.push("woa64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"linux":if(r.push("linux"),ke()){n.push("ubuntu");const e=await pv();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 Le()&&n.push("rhel");ph.includes(t)?r.push("x86_64"):fh.includes(t)?r.push("x86"):dh.includes(t)?r.push("aarch64"):hh.includes(t)?r.push("armv7a"):mh.includes(t)?r.push("powerpc64le"):vh.includes(t)?r.push("sparc64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),ph.includes(t)?r.push("x86_64"):dh.includes(t)?n.push("arm64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),ph.includes(t)?r.push("amd64"):fh.includes(t)?r.push("i386"):(w(`Using arch ${t} for LLVM`),r.push(t));break;default:w(`Using ${e} ${t} for LLVM`),n.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),i=Ht(await qt(wr.join(Uv,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:o,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==i)return`https://github.com/llvm/llvm-project/releases/download/${i.tag}/${i.name}`;const s=Ht(await qt(wr.join(Uv,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:o});if(void 0!==s)return`https://llvm.org/releases/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${o}`)}(t,r,e);return w("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:Ve("clang"),extractFunction:"win32"===t?gt:(e,t)=>Et(e,t,1)}}async function sr(e,t,r){var n;const o=await Mv(e,t,r);return await async function(e,t){var r,n;const o=null!=(r=process.env.LD_LIBRARY_PATH)?r:"",i=null!=(n=process.env.DYLD_LIBRARY_PATH)?n:"",s=cr(t),a=[oe("CC",Ve(e+"/bin/clang"),Yv),oe("CXX",Ve(e+"/bin/clang++"),Yv),oe("LLVM_PATH",e,Yv),oe("LD_LIBRARY_PATH",`${o}${wr.delimiter}${e}/lib`,Yv),oe("DYLD_LIBRARY_PATH",`${i}${wr.delimiter}${e}/lib`,Yv),oe("LLVM_LDFLAGS","-L"+St(e+"/lib"),Yv),oe("LLVM_CPPFLAGS","-I"+St(e+"/include"),Yv),await ee(`${e}/lib/clang/${t}/include`)?oe("LLVM_CPATH",`${e}/lib/clang/${t}/include`,Yv):await ee(`${e}/lib/clang/${s}/include`)?oe("LLVM_CPATH",`${e}/lib/clang/${s}/include`,Yv):Promise.resolve(),oe("LIBRARY_PATH",e+"/lib",Yv),Bt()];if(ke()){const t=60;a.push(ye("cc",e+"/bin/clang",Yv,t),ye("cxx",e+"/bin/clang++",Yv,t),ye("clang",e+"/bin/clang",Yv),ye("clang++",e+"/bin/clang++",Yv),ye("lld",e+"/bin/lld",Yv),ye("ld.lld",e+"/bin/ld.lld",Yv),ye("llvm-ar",e+"/bin/llvm-ar",Yv))}await Promise.all(a)}(null!=(n=o.installDir)?n:t,e),o}async function ar(e,t,r,n=jv.All){const o=cr(e);try{if(ke())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Ie([{name:"ca-certificates"}]);const n=new Ad.DownloaderHelper("https://apt.llvm.org/llvm.sh",vr.tmpdir(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await ms(n.getDownloadPath(),"utf-8"),i=wr.join(vr.tmpdir(),"llvm-setup-cpp.sh"),s=await async function(e,t,r,n){let o=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);return o=function(e){return e.replace(/add-apt-repository "\${REPO_NAME}"/g,`add-apt-repository -y -n "\${REPO_NAME}"\napt-get update -o ${$d} -y`)}(o),o=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,o,r),o=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${$d} -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 P("dpkg",["-l",e],{env:ge("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(Cr.info("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return we()?e.replace(/apt-get/g,"nala"):e}(o),await Ss(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Ie(s),await os(i,"755"),await U("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await se(r+"/bin",Yv),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(o,n)}catch(s){w("Failed to install llvm via system package manager "+s)}const i=await _t("llvm",e,ir,t,r);return await Gv(o),i}function cr(e){const t=function(e){if(null===Tp(e))try{const t=gf(e);if(null!==t)return w(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e);return Number.parseInt(t.split(".")[0],10)}async function lr(){if(Fr.GITHUB_ACTIONS){const e=wr.join(Fv,"llvm_matcher.json");if(!(await ee(e)))return y("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}}async function ur(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Cv(e);w(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=Dv(s);l=!0,w("Found the pre-installed version of MSVC at "+e)}catch{}if(!l)try{"14.0"===s?(a="14.0",await Ue("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 Ue("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 Ue("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 Ue("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):v(`The given MSVC versions ${e} is not supported yet.`)}catch(u){v(u)}await nr(s,c,r,a,n,o,i),Fr.GITHUB_ACTIONS&&await async function(){const e=wr.join(qv,"msvc_matcher.json");if(!(await ee(e)))return y("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}()}function pr(e,t,r){return{url:fr(t,r,e),binRelativeDir:"",binFileName:Ve("pwsh"),extractedFolderName:""}}function fr(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}'`)}}function dr(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),o=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),i="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:Ve("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${o}.${i}`}}function hr(e){const t=Zn.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function mr(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}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const vr=require("os"),yr=require("fs"),gr=require("crypto"),wr=require("path"),Er=require("http"),_r=require("https");require("net");const br=require("tls"),Or=require("events"),Rr=require("util"),Sr=require("buffer"),Ir=require("process"),Tr=require("child_process"),xr=require("assert"),Pr=require("stream"),Ar=require("url"),Nr=require("string_decoder"),$r=require("timers"),Cr=require("console");var Lr="undefined"!=typeof document?document.currentScript:null;const Dr=e(yr),kr=e(Er),jr=e(_r);var Ur="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Fr={};const Mr=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{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:"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"}];!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=Mr,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,r.forEach((function(r){const o=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));if(e[r.constant]=o,o)switch(e.name=r.name,typeof r.pr){case"string":e.isPR=!!n[r.pr];break;case"object":e.isPR="env"in r.pr?r.pr.env in n&&n[r.pr.env]!==r.pr.ne:"any"in r.pr?r.pr.any.some((function(e){return!!n[e]})):t(r.pr);break;default:e.isPR=null}})),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))}(Fr);var Gr={},Br={},qr={};Object.defineProperty(qr,"__esModule",{value:!0}),qr.toCommandProperties=qr.toCommandValue=void 0,qr.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},qr.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}:{}};var Hr=Ur&&Ur.__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]}),Vr=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zr=Ur&&Ur.__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)&&Hr(t,e,r);return Vr(t,e),t};Object.defineProperty(Br,"__esModule",{value:!0}),Br.issue=Br.issueCommand=void 0;const Xr=zr(vr),Wr=qr;Br.issueCommand=n,Br.issue=function(e,t=""){n(e,{},t)};class Yr{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 o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${t=o,Wr.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 Wr.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var Kr={};const Jr=new Uint8Array(256);let Qr=Jr.length;const Zr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,en=[];for(let Jv=0;256>Jv;++Jv)en.push((Jv+256).toString(16).substr(1));let tn,rn,nn=0,on=0;const sn=c("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),gr.createHash("md5").update(e).digest()})),an=c("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),gr.createHash("sha1").update(e).digest()})),cn=Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:a,stringify:s,v1:function(e,t,r){let n=t&&r||0;const i=t||Array(16);let a=(e=e||{}).node||tn,c=void 0!==e.clockseq?e.clockseq:rn;if(null==a||null==c){const t=e.random||(e.rng||o)();null==a&&(a=tn=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=rn=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:on+1;const p=l-nn+(u-on)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||l>nn)&&void 0===e.nsecs&&(u=0),u>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");nn=l,on=u,rn=c,l+=122192928e5;const f=(1e4*(268435455&l)+u)%4294967296;i[n++]=f>>>24&255,i[n++]=f>>>16&255,i[n++]=f>>>8&255,i[n++]=255&f;const d=l/4294967296*1e4&268435455;i[n++]=d>>>8&255,i[n++]=255&d,i[n++]=d>>>24&15|16,i[n++]=d>>>16&255,i[n++]=c>>>8|128,i[n++]=255&c;for(let o=0;6>o;++o)i[n+o]=a[o];return t||s(i)},v3:sn,v4:function(e,t,r){const n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;16>e;++e)t[r+e]=n[e];return t}return s(n)},v5:an,validate:i,version:function(e){if(!i(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),ln=r(cn);var un=Ur&&Ur.__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]}),pn=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fn=Ur&&Ur.__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)&&un(t,e,r);return pn(t,e),t};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.prepareKeyValueMessage=Kr.issueFileCommand=void 0;const dn=fn(yr),hn=fn(vr),mn=ln,vn=qr;Kr.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!dn.existsSync(r))throw Error("Missing file at path: "+r);dn.appendFileSync(r,`${vn.toCommandValue(t)}${hn.EOL}`,{encoding:"utf8"})},Kr.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+mn.v4(),n=vn.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}${hn.EOL}${n}${hn.EOL}${r}`};var yn={};class gn 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 wn,En={},_n=br,bn=Er,On=_r,Rn=Or,Sn=Rr;En.httpOverHttp=function(e){var t=new u(e);return t.request=bn.request,t},En.httpsOverHttp=function(e){var t=new u(e);return t.request=bn.request,t.createSocket=p,t.defaultPort=443,t},En.httpOverHttps=function(e){var t=new u(e);return t.request=On.request,t},En.httpsOverHttps=function(e){var t=new u(e);return t.request=On.request,t.createSocket=p,t.defaultPort=443,t},Sn.inherits(u,Rn.EventEmitter),u.prototype.addRequest=function(e,t,r,n){var o=this,i=d({request:e},o.options,f(t,r,n));this.maxSockets>o.sockets.length?o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.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)})):o.requests.push(i)},u.prototype.createSocket=function(e,t){function r(r,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==r.statusCode?(wn("tunneling socket could not be established, statusCode=%d",r.statusCode),i.destroy(),(c=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):a.length>0?(wn("got illegal response body from proxy"),i.destroy(),(c=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):(wn("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=i,t(i))}var n=this,o={};n.sockets.push(o);var i=d({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),wn("making CONNECT request");var s=n.request(i);s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),s.once("connect",r),s.once("error",(function(t){s.removeAllListeners(),wn("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),n.removeSocket(o)})),s.end()},u.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)}))}},wn=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(){},En.debug=wn;var In,Tn,xn,Pn,An,Nn=En;(Tn=In||(In={}))[Tn.OK=200]="OK",Tn[Tn.MultipleChoices=300]="MultipleChoices",Tn[Tn.MovedPermanently=301]="MovedPermanently",Tn[Tn.ResourceMoved=302]="ResourceMoved",Tn[Tn.SeeOther=303]="SeeOther",Tn[Tn.NotModified=304]="NotModified",Tn[Tn.UseProxy=305]="UseProxy",Tn[Tn.SwitchProxy=306]="SwitchProxy",Tn[Tn.TemporaryRedirect=307]="TemporaryRedirect",Tn[Tn.PermanentRedirect=308]="PermanentRedirect",Tn[Tn.BadRequest=400]="BadRequest",Tn[Tn.Unauthorized=401]="Unauthorized",Tn[Tn.PaymentRequired=402]="PaymentRequired",Tn[Tn.Forbidden=403]="Forbidden",Tn[Tn.NotFound=404]="NotFound",Tn[Tn.MethodNotAllowed=405]="MethodNotAllowed",Tn[Tn.NotAcceptable=406]="NotAcceptable",Tn[Tn.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Tn[Tn.RequestTimeout=408]="RequestTimeout",Tn[Tn.Conflict=409]="Conflict",Tn[Tn.Gone=410]="Gone",Tn[Tn.TooManyRequests=429]="TooManyRequests",Tn[Tn.InternalServerError=500]="InternalServerError",Tn[Tn.NotImplemented=501]="NotImplemented",Tn[Tn.BadGateway=502]="BadGateway",Tn[Tn.ServiceUnavailable=503]="ServiceUnavailable",Tn[Tn.GatewayTimeout=504]="GatewayTimeout",(Pn=xn||(xn={})).Accept="accept",Pn.ContentType="content-type",(An||(An={})).ApplicationJson="application/json";const $n=[In.MovedPermanently,In.ResourceMoved,In.SeeOther,In.TemporaryRedirect,In.PermanentRedirect],Cn=[In.BadGateway,In.ServiceUnavailable,In.GatewayTimeout],Ln=["OPTIONS","GET","DELETE","HEAD"];class Dn extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,Dn.prototype)}statusCode;result}class kn{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))}))}))}}const jn=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),Un=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return xn},HttpClient:class{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[xn.Accept]=this._getExistingOrDefaultHeader(t,xn.Accept,An.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[xn.Accept]=this._getExistingOrDefaultHeader(r,xn.Accept,An.ApplicationJson),r[xn.ContentType]=this._getExistingOrDefaultHeader(r,xn.ContentType,An.ApplicationJson);const o=await this.post(e,n,r);return this._processResponse(o,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[xn.Accept]=this._getExistingOrDefaultHeader(r,xn.Accept,An.ApplicationJson),r[xn.ContentType]=this._getExistingOrDefaultHeader(r,xn.ContentType,An.ApplicationJson);const o=await this.put(e,n,r);return this._processResponse(o,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[xn.Accept]=this._getExistingOrDefaultHeader(r,xn.Accept,An.ApplicationJson),r[xn.ContentType]=this._getExistingOrDefaultHeader(r,xn.ContentType,An.ApplicationJson);const o=await this.patch(e,n,r);return this._processResponse(o,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const o=new URL(t);let i=this._prepareRequest(e,o,n);const s=this._allowRetries&&Ln.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===In.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,i,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&$n.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===o.protocol&&o.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!==o.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];i=this._prepareRequest(e,c,n),a=await this.requestRaw(i,r),t--}if(!a.message.statusCode||!Cn.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){o||(o=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let o=!1;const i=e.httpModule.request(e.options,(e=>{n(void 0,new kn(e))}));let s;i.on("socket",(e=>{s=e})),i.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),i.on("error",(function(e){n(e)})),t&&"string"==typeof t&&i.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){i.end()})),t.pipe(i)):i.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=l(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o="https:"===n.parsedUrl.protocol;n.httpModule=o?jr:kr;const i=o?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i,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({},jn(this.requestOptions.headers),jn(e||{})):jn(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=jn(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=l(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 i=100;if(this.requestOptions&&(i=this.requestOptions.maxSockets||kr.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const s="https:"===r.protocol;n=o?s?Nn.httpsOverHttps:Nn.httpsOverHttp:s?Nn.httpOverHttps:Nn.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new jr.Agent(e):new kr.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-B6ncb0bd.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 o=e.message.statusCode||0,i={statusCode:o,result:null,headers:{}};let s,a;o===In.NotFound&&r(i);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),i.result=s),i.headers=e.message.headers}catch(c){}if(o>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${o})`;const t=new Dn(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:Dn,HttpClientResponse:kn,get HttpCodes(){return In},get MediaTypes(){return An},getProxyUrl:function(e){const t=l(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})),Fn=r(Un);var Mn,Gn={},Bn=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Gn,"__esModule",{value:!0}),Gn.PersonalAccessTokenCredentialHandler=Gn.BearerCredentialHandler=Gn.BasicCredentialHandler=void 0,Gn.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 Bn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Gn.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 Bn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Gn.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 Bn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var qn,Hn,Vn,zn,Xn,Wn,Yn,Kn,Jn={},Qn={},Zn=m(),eo={exports:{}};Kn="win32"===process.platform||Ur.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 o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function t(t,n,o){r.stat(t,(function(r,i){o(r,!r&&e(i,t,n))}))}if(Xn)return zn;Xn=1,zn=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=yr;return zn}():function(){function e(e,n,o){r.stat(e,(function(e,r){o(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=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),l=a|c;return r&parseInt("001",8)||r&c&&o===s||r&a&&n===i||r&l&&0===i}(e,t)}if(Yn)return Wn;Yn=1,Wn=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=yr;return Wn}();var to=E;E.sync=function(e,t){try{return Kn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const ro="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,no=wr,oo=ro?";":":",io=to,so=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),ao=(e,t)=>{const r=t.colon||oo,n=e.match(/\//)||ro&&e.match(/\\/)?[""]:[...ro?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=ro?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=ro?o.split(r):[""];return ro&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},co=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=ao(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(so(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=no.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(c(p,r,0))})),c=(e,r,n)=>new Promise(((l,u)=>{if(n===o.length)return l(a(r+1));const p=o[n];io(e+p,{pathExt:i},((o,i)=>{if(!o&&i){if(!t.all)return l(e+p);s.push(e+p)}return l(c(e,r,n+1))}))}));return r?a(0).then((e=>r(null,e)),r):a(0)};var lo=co;co.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=ao(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=no.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;n.length>e;e++){const r=p+n[e];try{if(io.sync(r,{pathExt:o})){if(!t.all)return r;i.push(r)}}catch(s){}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw so(e)};var uo={exports:{}};const po=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};uo.exports=po,uo.exports.default=po;const fo=wr,ho=lo,mo=uo.exports;var vo={};const yo=/([()\][%!^"`<>&|;, *?])/g;vo.command=function(e){return e.replace(yo,"^$1")},vo.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(yo,"^$1"),t&&(e=e.replace(yo,"^$1")),e};const go=/^#!(.*)/,wo=yr,Eo=wr,_o=function(e){return _(e)||_(e,!0)},bo=vo,Oo=function(e){const t=Buffer.alloc(150);let r;try{r=wo.openSync(e,"r"),wo.readSync(r,t,0,150,0),wo.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(go);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},Ro="win32"===process.platform,So=/\.(?:com|exe)$/i,Io=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,To="win32"===process.platform,xo=Tr,Po=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:function(e){if(!Ro)return e;const t=function(e){e.file=_o(e);const t=e.file&&Oo(e.file);return t?(e.args.unshift(e.file),e.command=t,_o(e)):e.file}(e),r=!So.test(t);if(e.options.forceShell||r){const r=Io.test(t);e.command=Eo.normalize(e.command),e.command=bo.command(e.command),e.args=e.args.map((e=>bo.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(n)},Ao={hookChildProcess:function(e,t){if(!To)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=O(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:O,verifyENOENTSync:function(e,t){return To&&1===e&&!t.file?b(t.original,"spawnSync"):null},notFoundError:b};eo.exports=R,eo.exports.spawn=R,eo.exports.sync=function(e,t,r){const n=Po(e,t,r),o=xo.spawnSync(n.command,n.args,n.options);return o.error=o.error||Ao.verifyENOENTSync(o.status,n),o},eo.exports._parse=Po,eo.exports._enoent=Ao;const No=t(eo.exports),$o=({env:e=Ir.env,...t}={})=>{const r=S({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Ir.cwd(),path:t=Ir.env[S()],preferLocal:r=!0,execPath:n=Ir.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?Ar.fileURLToPath(e):e,s=wr.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(wr.join(t,"node_modules/.bin")),r=t,t=wr.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?Ar.fileURLToPath(t):t;e.push(wr.resolve(r,n,".."))})(a,n,s),[...a,t].join(wr.delimiter)})(t),e},Co=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const o=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!Lo(o,i)&&n||Object.defineProperty(e,r,i)},Lo=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)},Do=(e,t)=>`/* Wrapped ${e}*/\n${t}`,ko=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),jo=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),Uo=new WeakMap,Fo=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const o=e.displayName||e.name||"",i=function(...s){if(Uo.set(i,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${o}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const o of Reflect.ownKeys(t))Co(e,t,o,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()}() `,o=Do.bind(null,n,""+t);Object.defineProperty(o,"name",jo),Object.defineProperty(e,"toString",{...ko,value:o})})(e,t,n)}(i,e),Uo.set(i,n),i};Fo.callCount=e=>{if(!Uo.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Uo.get(e)};const Mo=(e,t)=>({name:"SIGRT"+(t+1),number:Go+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Go=34,Bo=[{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"}],qo=()=>{const e=Array.from({length:64-Go+1},Mo);return[...Bo,...e].map(Ho)},Ho=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=vr.constants,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Vo=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],zo=(()=>{const e=qo();return Object.fromEntries(e.map(Vo))})(),Xo=(e,t)=>{const r=t.find((({name:t})=>vr.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=qo(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Xo(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const Wo=({stdout:e,stderr:t,all:r,error:n,signal:o,exitCode:i,command:s,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:p,cwd:f=Ir.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:zo[o].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?"failed with exit code "+i:"failed")({timedOut:c,timeout:p,errorCode:n&&n.code,signal:o,signalDescription:d,exitCode:i=null===i?void 0:i,isCanceled:l}),m=`Command ${h}: ${s}`,v="[object Error]"==={}.toString.call(n),y=v?`${m}\n${n.message}`:m,g=[y,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=g):n=Error(g),n.shortMessage=y,n.command=s,n.escapedCommand=a,n.exitCode=i,n.signal=o,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=f,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=u&&!c,n},Yo=["stdin","stdout","stderr"];var Ko,Jo={exports:{}},Qo={exports:{}},Zo=Ur.process;const ei=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(ei(Zo)){var ti,ri=xr,ni=(Ko||(Ko=1,(mi=Qo).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&mi.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&mi.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Qo.exports),oi=/^win/i.test(Zo.platform),ii=Or;"function"!=typeof ii&&(ii=ii.EventEmitter),Zo.__signal_exit_emitter__?ti=Zo.__signal_exit_emitter__:((ti=Zo.__signal_exit_emitter__=new ii).count=0,ti.emitted={}),ti.infinite||(ti.setMaxListeners(1/0),ti.infinite=!0),Jo.exports=function(e,t){if(!ei(Ur.process))return function(){};ri.equal(typeof e,"function","a callback must be provided for exit handler"),!1===li&&ui();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),ti.on(r,e),function(){ti.removeListener(r,e),0===ti.listeners("exit").length&&0===ti.listeners("afterexit").length&&si()}};var si=function(){li&&ei(Ur.process)&&(li=!1,ni.forEach((function(e){try{Zo.removeListener(e,ci[e])}catch(t){}})),Zo.emit=di,Zo.reallyExit=pi,ti.count-=1)};Jo.exports.unload=si;var ai=function(e,t,r){ti.emitted[e]||(ti.emitted[e]=!0,ti.emit(e,t,r))},ci={};ni.forEach((function(e){ci[e]=function(){ei(Ur.process)&&Zo.listeners(e).length===ti.count&&(si(),ai("exit",null,e),ai("afterexit",null,e),oi&&"SIGHUP"===e&&(e="SIGINT"),Zo.kill(Zo.pid,e))}})),Jo.exports.signals=function(){return ni};var li=!1,ui=function(){!li&&ei(Ur.process)&&(li=!0,ti.count+=1,ni=ni.filter((function(e){try{return Zo.on(e,ci[e]),!0}catch(t){return!1}})),Zo.emit=hi,Zo.reallyExit=fi)};Jo.exports.load=ui;var pi=Zo.reallyExit,fi=function(e){ei(Ur.process)&&(Zo.exitCode=e||0,ai("exit",Zo.exitCode,null),ai("afterexit",Zo.exitCode,null),pi.call(Zo,Zo.exitCode))},di=Zo.emit,hi=function(e,t){if("exit"===e&&ei(Ur.process)){void 0!==t&&(Zo.exitCode=t);var r=di.apply(this,arguments);return ai("exit",Zo.exitCode,null),ai("afterexit",Zo.exitCode,null),r}return di.apply(this,arguments)}}else Jo.exports=function(){return function(){}};var mi;const vi=t(Jo.exports),yi=(e,t="SIGTERM",r={})=>{const n=e(t);return gi(e,t,r,n),n},gi=(e,t,r,n)=>{if(!wi(t,r,n))return;const o=_i(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},wi=(e,{forceKillAfterTimeout:t},r)=>Ei(e)&&!1!==t&&r,Ei=e=>e===vr.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),_i=({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},bi=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Oi=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(yr.createWriteStream(r)),e;if(T(r))return e[t].pipe(r),e;if(!(e=>e instanceof Tr.ChildProcess&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!T(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var Ri={exports:{}};const{PassThrough:Si}=Pr,{constants:Ii}=Sr,Ti=Pr,{promisify:xi}=Rr,Pi=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new Si({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",(e=>{a.push(e),o?s=a.length:s+=e.length})),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i},Ai=xi(Ti.pipeline);class Ni extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}Ri.exports=x,Ri.exports.buffer=(e,t)=>x(e,{...t,encoding:"buffer"}),Ri.exports.array=(e,t)=>x(e,{...t,array:!0}),Ri.exports.MaxBufferError=Ni;const $i=t(Ri.exports),{PassThrough:Ci}=Pr,Li=t((function(){function e(o){return Array.isArray(o)?(o.forEach(e),this):(r.push(o),o.once("end",t.bind(null,o)),o.once("error",n.emit.bind(n,"error")),o.pipe(n,{end:!1}),this)}function t(e){!(r=r.filter((function(t){return t!==e}))).length&&n.readable&&n.end()}var r=[],n=new Ci({objectMode:!0});return n.setMaxListeners(0),n.add=e,n.isEmpty=function(){return 0==r.length},n.on("unpipe",t),[].slice.call(arguments).forEach(e),n})),Di=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},ki=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},ji=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?$i(e,{encoding:t,maxBuffer:n}):$i.buffer(e,{maxBuffer:n})},Ui=(async()=>{})().constructor.prototype,Fi=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Ui,e)])),Mi=(e,t)=>{for(const[r,n]of Fi){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Gi=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Bi=/^[\w.-]+$/,qi=/"/g,Hi=(e,t)=>Gi(e,t).join(" "),Vi=(e,t)=>Gi(e,t).map((e=>(e=>"string"!=typeof e||Bi.test(e)?e:`"${e.replace(qi,'\\"')}"`)(e))).join(" "),zi=/ +/g,Xi=e=>{const t=[];for(const r of e.trim().split(zi)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},Wi=Rr.debuglog("execa").enabled,Yi=(e,t)=>(e+"").padStart(t,"0"),Ki=(e,{verbose:t})=>{t&&Ir.stderr.write(`[${(()=>{const e=new Date;return`${Yi(e.getHours(),2)}:${Yi(e.getMinutes(),2)}:${Yi(e.getSeconds(),2)}.${Yi(e.getMilliseconds(),3)}`})()}] ${e}\n`)},Ji=(e,t,r={})=>{const n=No._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||Ir.cwd(),execPath:Ir.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Wi,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...Ir.env,...e}:e;return r?$o({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Yo.map((t=>e[t]));if((e=>Yo.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+Yo.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,Yo.length)},((e,r)=>t[r]))})(r),"win32"===Ir.platform&&"cmd"===wr.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},Qi=(e,t,r)=>"string"==typeof t||Sr.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 Zi={},es={};const ts=Dr.promises,{access:rs,appendFile:ns,chmod:os,chown:is,copyFile:ss,lchmod:as,lchown:cs,link:ls,lstat:us,mkdir:ps,mkdtemp:fs,open:ds,readdir:hs,readFile:ms,readlink:vs,realpath:ys,rename:gs,rmdir:ws,stat:Es,symlink:_s,truncate:bs,unlink:Os,utimes:Rs,writeFile:Ss}=Dr.promises,Is="rm"in Dr.promises?Dr.promises.rm:Rr.promisify(Dr.unlink),Ts=r(Object.freeze(Object.defineProperty({__proto__:null,access:rs,appendFile:ns,chmod:os,chown:is,copyFile:ss,default:ts,lchmod:as,lchown:cs,link:ls,lstat:us,mkdir:ps,mkdtemp:fs,open:ds,readFile:ms,readdir:hs,readlink:vs,realpath:ys,rename:gs,rm:Is,rmdir:ws,stat:Es,symlink:_s,truncate:bs,unlink:Os,utimes:Rs,writeFile:Ss},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(es,"__esModule",{value:!0}),es.sync=es.isexe=void 0;const xs=yr,Ps=Ts;es.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return As(await(0,Ps.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},es.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return As((0,xs.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const As=(e,t)=>e.isFile()&&Ns(e,t),Ns=(e,t)=>{var r,n,o,i,s,a,c,l;const u=null!=(n=t.uid)?n:null==(r=process.getuid)?void 0:r.call(process),p=null!=(s=null!=(i=t.groups)?i:null==(o=process.getgroups)?void 0:o.call(process))?s:[],f=null!=(l=null!=(c=t.gid)?c:null==(a=process.getgid)?void 0:a.call(process))?l:p[0];if(void 0===u||void 0===f)throw Error("cannot get uid or gid");const d=new Set([f,...p]),h=e.mode,m=e.uid,v=e.gid,y=parseInt("100",8),g=parseInt("010",8),w=y|g;return!!(h&parseInt("001",8)||h&g&&d.has(v)||h&y&&m===u||h&w&&0===u)};var $s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.sync=$s.isexe=void 0;const Cs=yr,Ls=Ts;$s.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ds(await(0,Ls.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},$s.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ds((0,Cs.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Ds=(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 o=0;n.length>o;o++){const t=n[o].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);var ks={};Object.defineProperty(ks,"__esModule",{value:!0}),function(e){var t=Ur&&Ur.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Ur&&Ur.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=Ur&&Ur.__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 i=n(es);e.posix=i;const s=n($s);e.win32=s,o(ks,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(Zi);const{isexe:js,sync:Us}=Zi,{join:Fs,delimiter:Ms,sep:Gs,posix:Bs}=wr,qs="win32"===process.platform,Hs=RegExp(`[${Bs.sep}${Gs===Bs.sep?"":Gs}]`.replace(/(\\)/g,"\\$1")),Vs=RegExp("^\\."+Hs.source),zs=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Xs=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=Ms})=>{const o=e.match(Hs)?[""]:[...qs?[process.cwd()]:[],...(t||"").split(n)];if(qs){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),i=t.split(n).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==i[0]&&i.unshift(""),{pathEnv:o,pathExt:i,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},Ws=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&Vs.test(t)?t.slice(0,2):"")+Fs(r,t)},Ys=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=Xs(e,t),i=[];for(const s of r){const r=Ws(s,e);for(const e of n){const n=r+e;if(await js(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw zs(e)};var Ks=Ys;Ys.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=Xs(e,t),i=[];for(const s of r){const r=Ws(s,e);for(const e of n){const n=r+e;if(Us(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw zs(e)};const Js=t(Ks);let Qs;var Zs,ea={};$(ea,"hasSudo",(()=>C)),$(ea,"isRoot",(()=>L)),$(ea,"isSudo",(()=>D)),$(ea,"prependSudo",(()=>k)),$(ea,"defaultExecOptions",(()=>ta)),$(ea,"execRootSync",(()=>j)),$(ea,"execRoot",(()=>U));let ta={stdio:"inherit",shell:!0};$(Zs={},"isAdminWindows",(()=>ra)),$(Zs,"isAdminPosix",(()=>na)),$(Zs,"isAdmin",(()=>G));let ra=async function(){var e;if("win32"!==process.platform)return!1;try{return await P("fsutil",["dirty","query",null!=(e=process.env.systemdrive)?e:""]),!0}catch(t){return"ENOENT"===t.code&&async function(){try{return await P("fltmc"),!0}catch{return!1}}()}},na=L;$({},"grantUserWriteAccess",(()=>B));var oa,ia,sa,aa,ca,la,ua,pa,fa,da,ha,ma,va,ya,ga=function(e){return null!=e},wa=ga,Ea=[].forEach,_a=Object.create,ba=function(e){var t=_a(null);return Ea.call(arguments,(function(e){wa(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},Oa="function"==typeof(sa=Math.sign)&&1===sa(10)&&-1===sa(-20)?Math.sign:ia?oa:(ia=1,oa=function(e){return isNaN(e=+e)||0===e?e:e>0?1:-1}),Ra=Math.abs,Sa=Math.floor,Ia=Math.max,Ta=function(e){return Ia(0,function(e){return isNaN(e)?0:0!=(e=+e)&&isFinite(e)?Oa(e)*Sa(Ra(e)):e}(e))},xa=Ta,Pa=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&xa(e)},Aa=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},Na=ga,$a=function(e){if(!Na(e))throw new TypeError("Cannot use null or undefined");return e},Ca=Aa,La=$a,Da=function(){}.bind,ka=function(){}.call,ja=Object.keys,Ua={}.propertyIsEnumerable,Fa=(aa="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(La(e)),Ca(t),r=ja(e),o&&r.sort("function"==typeof o?Da.call(o,e):void 0),"function"!=typeof aa&&(aa=r[aa]),ka.call(aa,r,(function(r,o){return Ua.call(e,r)?ka.call(t,n,e[r],r,e,o):undefined}))}),Ma={},Ga={exports:{}},Ba="function"==typeof(ya=Object.assign)&&(ya(va={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),va.foo+va.bar+va.trzy==="razdwatrzy")?Object.assign:function(){if(ma)return ha;ma=1;var e=da?fa:(da=1,fa=(la?ca:(la=1,ca=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(pa)return ua;pa=1;var e=ga,t=Object.keys;return ua=function(r){return t(e(r)?Object(r):r)}}()),t=$a,r=Math.max;return ha=function(n,o){var i,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=o[e]}catch(t){i||(i=t)}},s=1;c>s;++s)e(o=arguments[s]).forEach(a);if(void 0!==i)throw i;return n},ha}(),qa=ga,Ha={function:!0,object:!0},Va=function(e){return qa(e)&&Ha[typeof e]||!1};!function(e){var t=Ba,r=Va,n=ga,o=Error.captureStackTrace;e.exports=function(i){var s=Error(i),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),o&&o(s,e.exports),s}}(Ga);var za,Xa,Wa,Ya,Ka=Ga.exports,Ja={exports:{}},Qa=Ta;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(Kv){}Ya=q(),Wa=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); };")}}(),Ja.exports=function(e,t){var r;if(t=Qa(t),e.length===t)return e;r=Wa(t)(e);try{Ya(r,e)}catch(Kv){}return r};var Za,ec,tc=Ja.exports,rc={exports:{}},nc=function(e){return null!=e},oc=nc,ic={object:!0,function:!0,undefined:!0},sc=function(e){if(!function(e){return!!oc(e)&&hasOwnProperty.call(ic,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},ac=/^\s*class[\s{/}]/,cc=function(){}.toString,lc="razdwatrzy",uc="function"==typeof lc.contains&&!0===lc.contains("dwa")&&!1===lc.contains("foo")?"".contains:function(){if(ec)return Za;ec=1;var e="".indexOf;return Za=function(t){return e.call(this,t,arguments[1])>-1}}(),pc=nc,fc=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!sc(e)}(e)&&!ac.test(cc.call(e))},dc=Ba,hc=ba,mc=uc;(rc.exports=function(e,t){var r,n,o,i,s;return 2>arguments.length||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],pc(e)?(r=mc.call(e,"c"),n=mc.call(e,"e"),o=mc.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?dc(hc(i),s):s}).gs=function(e,t,r){var n,o,i,s;return"string"!=typeof e?(i=r,r=t,t=e,e=null):i=arguments[3],pc(t)?fc(t)?pc(r)?fc(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,pc(e)?(n=mc.call(e,"c"),o=mc.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?dc(hc(i),s):s};var vc=rc.exports,yc={exports:{}};!function(e,t){var r,n,o,i,s,a,c,l=vc,u=Aa,p=function(){}.apply,f=function(){}.call,d=Object.create,h=Object.defineProperty,m=Object.defineProperties,v={}.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n,i;return u(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),p.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(u(t),!v.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:n.splice(i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},i=function(e){var t,r,n,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;n=o[t];++t)p.call(n,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];p.call(o,this,i)}},s={on:r=function(e,t){var r;return u(t),v.call(this,"__ee__")?r=this.__ee__:(r=y.value=d(null),h(this,"__ee__",y),y.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:o,emit:i},a={on:l(r),once:l(n),off:l(o),emit:l(i)},c=m({},a),e.exports=t=function(e){return null==e?d(c):m(Object(e),a)},t.methods=s}(yc,yc.exports);var gc,wc,Ec,_c,bc,Oc,Rc,Sc,Ic,Tc,xc,Pc,Ac,Nc,$c,Cc,Lc,Dc,kc,jc,Uc,Fc,Mc,Gc,Bc,qc,Hc,Vc,zc,Xc,Wc,Yc,Kc,Jc,Qc,Zc=yc.exports,el=X(),tl=Array.isArray,rl=ga,nl=Aa,ol=[].slice;Qc=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(ol.call(e,this.length))};var il,sl,al,cl,ll,ul,pl,fl,dl,hl,ml,vl,yl,gl,wl,El,_l,bl,Ol,Rl,Sl,Il,Tl,xl,Pl,Al,Nl,$l,Cl,Ll,Dl,kl,jl,Ul,Fl,Ml,Gl,Bl,ql,Hl,Vl,zl,Xl,Wl,Yl,Kl,Jl,Ql=Aa,Zl=Ka,eu=tc,tu=vc,ru=Zc.methods,nu=function(e){return(t=e,e=tl(t)?t:el(t)).forEach((function(e){rl(e)&&nl(e)})),Qc.bind(e);var t},ou=function(){}.apply,iu=function(){}.call,su=Object.create,au=Object.defineProperties,cu=ru.on,lu=ru.emit,uu=Aa,pu=Fa,fu=Ma,du=function(e,t,r){var n,o,i,s,a,c,l,u,p,f,d,h,m,v,y,g=su(null);return o=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(f=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:Ql(e.get)},void 0!==e.set?(t.set=Ql(e.set),e.delete&&(t.delete=Ql(e.delete)),e.clear&&(t.clear=Ql(e.clear)),t):(t.set=t.get,t))}(r.normalizer),i=f.get,s=f.set,a=f.delete,c=f.clear),null!=r.resolvers&&(y=nu(r.resolvers)),v=i?eu((function(t){var r,o,a=arguments;if(y&&(a=y(a)),null!==(r=i(a))&&hasOwnProperty.call(g,r))return d&&n.emit("get",r,a,this),g[r];if(o=1===a.length?iu.call(e,this,a[0]):ou.call(e,this,a),null===r){if(null!==(r=i(a)))throw Zl("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(g,r))throw Zl("Circular invocation","CIRCULAR_INVOCATION");return g[r]=o,h&&n.emit("set",r,null,o),o}),o):0===t?function(){var t;if(hasOwnProperty.call(g,"data"))return d&&n.emit("get","data",arguments,this),g.data;if(t=arguments.length?ou.call(e,this,arguments):iu.call(e,this),hasOwnProperty.call(g,"data"))throw Zl("Circular invocation","CIRCULAR_INVOCATION");return g.data=t,h&&n.emit("set","data",null,t),t}:function(t){var r,o,i=arguments;if(y&&(i=y(arguments)),o=i[0]+"",hasOwnProperty.call(g,o))return d&&n.emit("get",o,i,this),g[o];if(r=1===i.length?iu.call(e,this,i[0]):ou.call(e,this,i),hasOwnProperty.call(g,o))throw Zl("Circular invocation","CIRCULAR_INVOCATION");return g[o]=r,h&&n.emit("set",o,null,r),r},n={original:e,memoized:v,profileName:r.profileName,get:function(e){return y&&(e=y(e)),i?i(e):e[0]+""},has:function(e){return hasOwnProperty.call(g,e)},delete:function(e){var t;hasOwnProperty.call(g,e)&&(a&&a(e),t=g[e],delete g[e],m&&n.emit("delete",e,t))},clear:function(){var e=g;c&&c(),g=su(null),n.emit("clear",e)},on:function(e,t){return"get"===e?d=!0:"set"===e?h=!0:"delete"===e&&(m=!0),cu.call(this,e,t)},emit:lu,updateEnv:function(){e=n.original}},l=i?eu((function(e){var t,r=arguments;y&&(r=y(r)),null!==(t=i(r))&&n.delete(t)}),o):0===t?function(){return n.delete("data")}:function(e){return y&&(e=y(arguments)[0]),n.delete(e)},u=eu((function(){var e,r=arguments;return 0===t?g.data:(y&&(r=y(r)),e=i?i(r):r[0]+"",g[e])})),p=eu((function(){var e,r=arguments;return 0===t?n.has("data"):(y&&(r=y(r)),null!==(e=i?i(r):r[0]+"")&&n.has(e))})),au(v,{__memoized__:tu(!0),delete:tu(l),clear:tu(n.clear),_get:tu(u),_has:tu(p)}),n},hu=Pa,mu={},vu={},yu={exports:{}},gu={},wu={},Eu={},_u={},bu=ba,Ou=Pa,Ru=function e(t){var r,n,o;if(uu(t),(r=Object(arguments[1])).async&&r.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(n=hu(r.length,t.length,r.async&&fu.async),o=du(t,n,r),pu(fu,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},Su=function(e){var t,r=bu(arguments[1]);return r.normalizer||0!==(t=r.length=Ou(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(sl||(sl=1,il=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),il):t>1&&(r.normalizer=(cl||(cl=1,al=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),al)(t)):r.normalizer=!1===t?function(){if(gl)return yl;gl=1;var e=W(),t=Object.create;return yl=function(){var r=0,n=[],o=t(null);return{get:function(t){var r,o=0,i=n,s=t.length;if(0===s)return i[s]||null;if(i=i[s]){for(;s-1>o;){if(-1===(r=e.call(i[0],t[o])))return null;i=i[1][r],++o}return-1===(r=e.call(i[0],t[o]))?null:i[1][r]||null}return null},set:function(t){var i,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===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][i],++s;-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1),a[1][i]=++r}return o[r]=t,r},delete:function(t){var r,i=0,s=n,a=o[t],c=a.length,l=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>i;){if(-1===(r=e.call(s[0],a[i])))return;l.push(s,r),s=s[1][r],++i}if(-1===(r=e.call(s[0],a[i])))return;for(t=s[1][r],s[0].splice(r,1),s[1].splice(r,1);!s[0].length&&l.length;)r=l.pop(),(s=l.pop())[0].splice(r,1),s[1].splice(r,1)}delete o[t]},clear:function(){n=[],o=t(null)}}},yl}()():1===t?function(){if(El)return wl;El=1;var e=W();return wl=function(){var t=0,r=[],n=[];return{get:function(t){var o=e.call(r,t[0]);return-1===o?null:n[o]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var o=e.call(n,t);-1!==o&&(r.splice(o,1),n.splice(o,1))},clear:function(){r=[],n=[]}}}}()():function(){if(bl)return _l;bl=1;var e=W(),t=Object.create;return _l=function(r){var n=0,o=[[],[]],i=t(null);return{get:function(t){for(var n,i=0,s=o;r-1>i;){if(-1===(n=e.call(s[0],t[i])))return null;s=s[1][n],++i}return-1===(n=e.call(s[0],t[i]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=o;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,i[n]=t,n},delete:function(t){for(var n,s=0,a=o,c=[],l=i[t];r-1>s;){if(-1===(n=e.call(a[0],l[s])))return;c.push(a,n),a=a[1][n],++s}if(-1!==(n=e.call(a[0],l[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 i[t]}},clear:function(){o=[[],[]],i=t(null)}}},_l}()(t)),r.async&&function(){if(Tl)return mu;Tl=1;var e=X(),t=Y(),r=q(),n=tc,o=K(),i=[].slice,s=function(){}.apply,a=Object.create;Ma.async=function(c,l){var u,p,f,d=a(null),h=a(null),m=l.memoized,v=l.original;l.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(u=r,t=i.call(t,0,-1)),m.apply(p=this,f=t)}),m);try{r(l.memoized,m)}catch(Kv){}l.on("get",(function(e){var t,r,n;if(u){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],u]:d[e].push(u),void(u=null);t=u,r=p,n=f,u=p=f=null,o((function(){var o;hasOwnProperty.call(h,e)?(o=h[e],l.emit("getasync",e,n,r),s.call(t,o.context,o.args)):(u=t,p=r,f=n,m.apply(r,n))}))}})),l.original=function(){var t,r,n,i;return u?(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),l.has(c)&&(r?l.delete(c):(h[c]={context:this,args:a},l.emit("setasync",c,"function"==typeof n?1:n.length))),"function"==typeof n?i=s.call(n,this,a):n.forEach((function(e){i=s.call(e,this,a)}),this),i}else o(s.bind(t,this,arguments))},n=u,u=p=f=null,t.push(r),i=s.call(v,this,t),r.cb=n,u=r,i):s.call(v,this,arguments)},l.on("set",(function(e){u?(d[e]?"function"==typeof d[e]?d[e]=[d[e],u.cb]:d[e].push(u.cb):d[e]=u.cb,delete u.cb,u.id=e,u=null):l.delete(e)})),l.on("delete",(function(e){var t;hasOwnProperty.call(d,e)||h[e]&&(t=h[e],delete h[e],l.emit("deleteasync",e,i.call(t.args,1)))})),l.on("clear",(function(){var e=h;h=a(null),l.emit("clearasync",t(e,(function(e){return i.call(e.args,1)})))}))}}(),r.promise&&Z(),r.dispose&&function(){if(Bl)return gu;Bl=1;var e=Aa,t=Fa,r=Ma,n=function(){}.apply;r.dispose=function(o,i,s){var a;if(e(o),s.async&&r.async||s.promise&&r.promise)return i.on("deleteasync",a=function(e,t){n.call(o,null,t)}),void i.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));i.on("delete",a=function(e,t){o(t)}),i.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),r.maxAge&&function(){if(Xl)return wu;Xl=1;var e=X(),t=Fa,r=K(),n=Q(),o=function(){if(zl)return Vl;zl=1;var e=Ta,t=Hl?ql:(Hl=1,ql=2147483647);return Vl=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),i=Ma,s=Function.prototype,a=Math.max,c=Math.min,l=Object.create;i.maxAge=function(u,p,f){var d,h,m,v;(u=o(u))&&(d=l(null),p.on("set"+(h=f.async&&i.async||f.promise&&i.promise?"async":""),(function(e){d[e]=setTimeout((function(){p.delete(e)}),u),"function"==typeof d[e].unref&&d[e].unref(),v&&(v[e]&&"nextTick"!==v[e]&&clearTimeout(v[e]),v[e]=setTimeout((function(){delete v[e]}),m),"function"==typeof v[e].unref&&v[e].unref())})),p.on("delete"+h,(function(e){clearTimeout(d[e]),delete d[e],v&&("nextTick"!==v[e]&&clearTimeout(v[e]),delete v[e])})),f.preFetch&&(m=!0===f.preFetch||isNaN(f.preFetch)?.333:a(c(+f.preFetch,1),0))&&(v={},m=(1-m)*u,p.on("get"+h,(function(t,o,i){v[t]||(v[t]="nextTick",r((function(){var r;"nextTick"===v[t]&&(delete v[t],p.delete(t),f.async&&(o=e(o)).push(s),r=p.memoized.apply(i,o),f.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),p.on("clear"+h,(function(){t(d,(function(e){clearTimeout(e)})),d={},v&&(t(v,(function(e){"nextTick"!==e&&clearTimeout(e)})),v={})})))}}(),r.max&&function(){if(Kl)return Eu;Kl=1;var e=Ta,t=function(){if(Yl)return Wl;Yl=1;var e=Ta,t=Object.create,r={}.hasOwnProperty;return Wl=function(n){var o,i=0,s=1,a=t(null),c=t(null),l=0;return n=e(n),{hit:function(e){var t=c[e],u=++l;if(a[u]=e,c[e]=u,!t){if(++i,n>=i)return;return o(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:o=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--i,s===t)){if(!i)return l=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){i=0,s=1,a=t(null),c=t(null),l=0}}}}(),r=Ma;r.max=function(n,o,i){var s,a,c;(n=e(n))&&(a=t(n),o.on("set"+(s=i.async&&r.async||i.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&o.delete(e)}),o.on("get"+s,c),o.on("delete"+s,a.delete),o.on("clear"+s,a.clear))}}(),r.refCounter&&function(){if(Jl)return _u;Jl=1;var e=vc,t=Ma,r=Object.create,n=Object.defineProperties;t.refCounter=function(o,i,s){var a,c;a=r(null),i.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),i.on("get"+c,(function(e){++a[e]})),i.on("delete"+c,(function(e){delete a[e]})),i.on("clear"+c,(function(){a={}})),n(i.memoized,{deleteRef:e((function(){var e=i.get(arguments);return null===e?null:a[e]?! --a[e]&&(i.delete(e),!0):null})),getRefCount:e((function(){var e=i.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),Ru(e,r)};const Iu=t(Su),Tu=/^~(?=$|\/|\\)/,{appendFile:xu,readFile:Pu,writeFile:Au}=yr.promises,Nu=te("~/.bashrc"),$u=Iu((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([re(e),ne(t,te("~/.bashrc")),ne(t,te("~/.profile"))])}catch(r){y(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0}),Cu=vr,Lu="win32"!==Cu.platform(),Du=Cu.release(),ku=/(\d+\.\d+)\.(\d+)/,ju=t((function(e){return Lu?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&+t>=17134.1184)(...ku.exec(Du).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var Uu,Fu,Mu,Gu,Bu={exports:{}};Mu=function(){if(Fu)return Uu;Fu=1;var e=/[|\\{}()[\]^$+*?.]/g;return Uu=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Gu=function(e){return e.split("").reverse().join("")},Bu.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+Mu(t)+"])(?!"+Mu(r)+")","g"),Gu(Gu(e).replace(n,"$1"+r)))};const qu=t(Bu.exports),{appendFile:Hu}=yr.promises,{appendFile:Vu}=yr.promises,zu=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var Xu={exports:{}};!function(e){!function(){function t(e,t,o){if(r(e),"object"!=typeof o)throw Error("List of variants should be specified as an object");var i=n[e](t);return void 0!==o[i]?o[i]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{ce(__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}}()}(Xu);var Wu=Xu.exports,Yu=Wu,Ku={};Wu.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 Ju={exports:{}};Ju.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const Qu=Yu,Zu=Ju.exports,ep=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],tp={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},rp={};var np={create:function(e){return e=Object.assign({},tp,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!rp[e]){if(!Zu||!r)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{le(ce(`../locales/${e}.js`))}catch(t){throw Error(`Failed to load locale: ${e} from ../locales/${e}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${t}`)}}(e)}}(r.locale,{autoload:r.autoloadLocales}),!e)throw Error("Missing first date argument");if(!t)throw Error("Missing second date argument");const n=function(e,t){let r=t-e;const n=[];return ep.some((function(e){const t=e[0],o=e[1],i=Math.floor(r/o);if(r-=i*o,n.push([t,i]),0>=r)return!0})),n}(e,t),o=[];for(const i of n){const[e,t]=i;if(t>0&&o.push(ue(e,t,r)),o.length>=r.span)break}return o.join(r.delimiter)}(t,r,n=Object.assign({},e,n||{}))}}},addLocale:le,defaultConfig:tp};const op=t({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"}}}});var ip={exports:{}},sp={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},ap="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=sp,i=ap,s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[p,n]],d=(e,t,r)=>{const n=(e=>{for(const[t,r]of f)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),o=u++;i(e,o,t),l[e]=o,c[o]=t,s[o]=RegExp(t,r?"g":void 0),a[o]=RegExp(n,r?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",p+"+"),d("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),d("FULL",`^${c[l.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),d("LOOSE",`^${c[l.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),d("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),d("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),d("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",c[l.COERCEPLAIN]+"(?:$|[^\\d])"),d("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",c[l.COERCE],!0),d("COERCERTLFULL",c[l.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ip,ip.exports);var cp=ip.exports;const lp=Object.freeze({loose:!0}),up=Object.freeze({});var pp=e=>e?"object"!=typeof e?lp:e:up;const fp=/^[0-9]+$/,dp=(e,t)=>{const r=fp.test(e),n=fp.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var hp={compareIdentifiers:dp,rcompareIdentifiers:(e,t)=>dp(t,e)};const mp=ap,{MAX_LENGTH:vp,MAX_SAFE_INTEGER:yp}=sp,{safeRe:gp,t:wp}=cp,Ep=pp,{compareIdentifiers:_p}=hp;var bp=class e{constructor(t,r){if(r=Ep(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>vp)throw new TypeError(`version is longer than ${vp} characters`);mp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?gp[wp.LOOSE]:gp[wp.FULL]);if(!n)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>yp||0>this.major)throw new TypeError("Invalid major version");if(this.minor>yp||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>yp||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=n[4]?n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&yp>t)return t}return e})):[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(t){if(mp("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),_p(this.major,t.major)||_p(this.minor,t.minor)||_p(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(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 e=this.prerelease[r],n=t.prerelease[r];if(mp("prerelease compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return _p(e,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{const e=this.build[r],n=t.build[r];if(mp("build compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return _p(e,n)}while(++r)}inc(e,t,r){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"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=+r?1:0;if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");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===_p(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}};const Op=bp;var Rp=(e,t,r=!1)=>{if(e instanceof Op)return e;try{return new Op(e,t)}catch(n){if(!r)return null;throw n}};const Sp=Rp;var Ip=(e,t)=>{const r=Sp(e,t);return r?r.version:null};const Tp=t(Ip),xp=Rp;const Pp=bp;const Ap=Rp;const Np=bp;var $p=(e,t)=>new Np(e,t).major;const Cp=t($p),Lp=bp;const Dp=bp;const kp=Rp;const jp=bp;var Up=(e,t,r)=>new jp(e,r).compare(new jp(t,r));const Fp=t(Up),Mp=Up;const Gp=Up;const Bp=bp;var qp=(e,t,r)=>{const n=new Bp(e,r),o=new Bp(t,r);return n.compare(o)||n.compareBuild(o)};const Hp=qp;const Vp=qp;const zp=Up;var Xp=(e,t,r)=>zp(e,t,r)>0;const Wp=Up;var Yp=(e,t,r)=>0>Wp(e,t,r);const Kp=Up;var Jp=(e,t,r)=>0===Kp(e,t,r);const Qp=Up;var Zp=(e,t,r)=>0!==Qp(e,t,r);const ef=Up;var tf=(e,t,r)=>ef(e,t,r)>=0;const rf=Up;var nf=(e,t,r)=>0>=rf(e,t,r);const of=t(nf),sf=Jp,af=Zp,cf=Xp,lf=tf,uf=Yp,pf=nf;var ff=(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 sf(e,r,n);case"!=":return af(e,r,n);case">":return cf(e,r,n);case">=":return lf(e,r,n);case"<":return uf(e,r,n);case"<=":return pf(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const df=bp,hf=Rp,{safeRe:mf,t:vf}=cp;var yf=(e,t)=>{if(e instanceof df)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?mf[vf.COERCERTLFULL]:mf[vf.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?mf[vf.COERCEFULL]:mf[vf.COERCE]);return null===r?null:hf(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const gf=t(yf);var wf,Ef,_f,bf,Of=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}};const Rf=pe();var Sf=(e,t,r)=>{try{t=new Rf(t,r)}catch(n){return!1}return t.test(e)};const If=pe();const Tf=bp,xf=pe();const Pf=bp,Af=pe();const Nf=bp,$f=pe(),Cf=Xp;const Lf=pe();const Df=bp,kf=fe(),{ANY:jf}=kf,Uf=pe(),Ff=Sf,Mf=Xp,Gf=Yp,Bf=nf,qf=tf;var Hf=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new Df(e,n),t=new Uf(t,n),r){case">":o=Mf,i=Bf,s=Gf,a=">",c=">=";break;case"<":o=Gf,i=qf,s=Mf,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ff(e,t,n))return!1;for(let l=0;t.set.length>l;++l){let r=null,u=null;if(t.set[l].forEach((e=>{e.semver===jf&&(e=new kf(">=0.0.0")),r=r||e,u=u||e,o(e.semver,r.semver,n)?r=e:s(e.semver,u.semver,n)&&(u=e)})),r.operator===a||r.operator===c)return!1;if((!u.operator||u.operator===a)&&i(e,u.semver))return!1;if(u.operator===c&&s(e,u.semver))return!1}return!0};const Vf=Hf;const zf=Hf;const Xf=pe();const Wf=Sf,Yf=Up,Kf=pe(),Jf=fe(),{ANY:Qf}=Jf,Zf=Sf,ed=Up,td=[new Jf(">=0.0.0-0")],rd=[new Jf(">=0.0.0")],nd=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===Qf){if(1===t.length&&t[0].semver===Qf)return!0;e=r.includePrerelease?td:rd}if(1===t.length&&t[0].semver===Qf){if(r.includePrerelease)return!0;t=rd}const n=new Set;let o,i,s,a,c,l,u;for(const d of e)">"===d.operator||">="===d.operator?o=od(o,d,r):"<"===d.operator||"<="===d.operator?i=id(i,d,r):n.add(d.semver);if(n.size>1)return null;if(o&&i){if(s=ed(o.semver,i.semver,r),s>0)return null;if(0===s&&(">="!==o.operator||"<="!==i.operator))return null}for(const d of n){if(o&&!Zf(d,o+"",r))return null;if(i&&!Zf(d,i+"",r))return null;for(const e of t)if(!Zf(d,e+"",r))return!1;return!0}let p=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver,f=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;p&&1===p.prerelease.length&&"<"===i.operator&&0===p.prerelease[0]&&(p=!1);for(const d of t){if(u=u||">"===d.operator||">="===d.operator,l=l||"<"===d.operator||"<="===d.operator,o)if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),">"===d.operator||">="===d.operator){if(a=od(o,d,r),a===d&&a!==o)return!1}else if(">="===o.operator&&!Zf(o.semver,d+"",r))return!1;if(i)if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),"<"===d.operator||"<="===d.operator){if(c=id(i,d,r),c===d&&c!==i)return!1}else if("<="===i.operator&&!Zf(i.semver,d+"",r))return!1;if(!d.operator&&(i||o)&&0!==s)return!1}return!(o&&l&&!i&&0!==s||i&&u&&!o&&0!==s||f||p)},od=(e,t,r)=>{if(!e)return t;const n=ed(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},id=(e,t,r)=>{if(!e)return t;const n=ed(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const sd=cp,ad=sp,cd=bp,ld=hp;var ud={parse:Rp,valid:Ip,clean:(e,t)=>{const r=xp(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},inc:(e,t,r,n,o)=>{"string"==typeof r&&(o=n,n=r,r=void 0);try{return new Pp(e instanceof Pp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=Ap(e,null,!0),n=Ap(t,null,!0),o=r.compare(n);if(0===o)return null;const i=o>0,s=i?r:n,a=i?n:r,c=!!s.prerelease.length;if(a.prerelease.length&&!c)return a.patch||a.minor?s.patch?"patch":s.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"},major:$p,minor:(e,t)=>new Lp(e,t).minor,patch:(e,t)=>new Dp(e,t).patch,prerelease:(e,t)=>{const r=kp(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:Up,rcompare:(e,t,r)=>Mp(t,e,r),compareLoose:(e,t)=>Gp(e,t,!0),compareBuild:qp,sort:(e,t)=>e.sort(((e,r)=>Hp(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>Vp(r,e,t))),gt:Xp,lt:Yp,eq:Jp,neq:Zp,gte:tf,lte:nf,cmp:ff,coerce:yf,Comparator:fe(),Range:pe(),satisfies:Sf,toComparators:(e,t)=>new If(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),maxSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new xf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Tf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Af(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new Pf(n,r)))})),n},minVersion:(e,t)=>{e=new $f(e,t);let r=new Nf("0.0.0");if(e.test(r))return r;if(r=new Nf("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;e.set.length>n;++n){let t=null;e.set[n].forEach((e=>{const r=new Nf(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!Cf(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!Cf(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new Lf(e,t).range||"*"}catch(r){return null}},outside:Hf,gtr:(e,t,r)=>Vf(e,t,">",r),ltr:(e,t,r)=>zf(e,t,"<",r),intersects:(e,t,r)=>(e=new Xf(e,r),t=new Xf(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>Yf(e,t,r)));for(const l of s)Wf(l,t,r)?(i=l,o||(o=l)):(i&&n.push([o,i]),i=null,o=null);o&&n.push([o,null]);const a=[];for(const[l,u]of n)a.push(l===u?l:u||l!==s[0]?u?l===s[0]?"<="+u:`${l} - ${u}`:">="+l:"*");const c=a.join(" || ");return("string"==typeof t.raw?t.raw:t+"").length>c.length?c:t},subset:(e,t,r={})=>{if(e===t)return!0;e=new Kf(e,r),t=new Kf(t,r);let n=!1;e:for(const o of e.set){for(const e of t.set){const t=nd(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:cd,re:sd.re,src:sd.src,tokens:sd.t,SEMVER_SPEC_VERSION:ad.SEMVER_SPEC_VERSION,RELEASE_TYPES:ad.RELEASE_TYPES,compareIdentifiers:ld.compareIdentifiers,rcompareIdentifiers:ld.rcompareIdentifiers},pd=ud,fd=vr,dd=wr,hd=yr,md=_r,vd=Ir.env.npm_package_json,yd=Ir.env.npm_config_user_agent,gd=!(!yd||!yd.startsWith("npm")),wd=!(!vd||!vd.endsWith("package.json")),Ed=gd||wd,_d=!(!yd||!yd.startsWith("yarn")),bd=Ed||_d,Od=fd.homedir(),Rd=process.env.XDG_CONFIG_HOME||dd.join(Od,".config","simple-update-notifier"),Sd=function(e){return dd.join(Rd,"".concat(e.replace("@","").replace("/","__"),".json"))},Id=function(e,t){return de(void 0,0,void 0,(function(){var r;return he(this,(function(n){return r="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,n){md.get(r,(function(r){var o="";r.on("data",(function(e){return o+=e})),r.on("end",(function(){try{var r=JSON.parse(o)[t];r||n(Error("Error getting version")),e(r)}catch(i){n(Error("Could not parse version response"))}}))})).on("error",(function(e){return n(e)}))}))]}))}))},Td=function(e){var t=e.pkg,r=e.updateCheckInterval,n=void 0===r?864e5:r,o=e.distTag,i=void 0===o?"latest":o,s=e.alwaysRun,a=e.debug;return de(void 0,0,void 0,(function(){var r,o;return he(this,(function(c){switch(c.label){case 0:return hd.existsSync(Rd)||hd.mkdirSync(Rd,{recursive:!0}),r=function(t){var r=Sd(t);try{if(!hd.existsSync(r))return;return JSON.parse(hd.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,Id(t.name,i)]:[3,2];case 1:return o=c.sent(),l=Sd(t.name),hd.writeFileSync(l,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),pd.gt(o,t.version)?[2,o]:(a&&console.error("Latest version (".concat(o,") not newer than current version (").concat(t.version,")")),[3,3]);case 2:a&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(n,"ms but only ").concat((new Date).getTime()-r,"ms since last check.")),c.label=3;case 3:return[2,!1]}var l}))}))};const xd=t((function(e){return de(void 0,0,void 0,(function(){var t,r;return he(this,(function(n){switch(n.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||bd&&!e.shouldNotifyInNpmScript))return e.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Td(e)];case 2:return(t=n.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),"┐")],o=0,i=t;i.length>o;o++)n.push("│ ".concat(i[o].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(e.pkg.name," available!\nCurrent Version: ").concat(e.pkg.version,"\nLatest Version: ").concat(t))),[3,4];case 3:return r=n.sent(),e.debug&&r instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",r),[3,4];case 4:return[2]}}))}))})),Pd={name:"setup-cpp",version:"0.41.1"};var Ad={};!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},o=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}}(),i=t(yr),s=Ar,a=t(wr),c=t(Er),l=t(_r),u=Or,p=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 o=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 i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return i.__validate(e,n)?(i.url=i.requestURL=e.trim(),i.state=p.IDLE,i.__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},i.__opts=Object.assign({},i.__defaultOpts),i.__pipes=[],i.__total=0,i.__downloaded=0,i.__progress=0,i.__retryCount=0,i.__retryTimeout=null,i.__resumeRetryCount=0,i.__states=p,i.__promise=null,i.__request=null,i.__response=null,i.__isAborted=!1,i.__isResumed=!1,i.__isResumable=!1,i.__isRedirected=!1,i.__destFolder=n,i.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},i.__fileName="",i.__filePath="",i.updateOptions(o),i):r(i)}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),o(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,o=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&i.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===o?t():e.resumeFromFile(e.__filePath,{total:o,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){i.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void i.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)},o=function(i,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,i).href;return e.emit("redirected",c,i),o(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()};o(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 o=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(o),r.emit("redirected",o,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var i=Error("Response status was "+n.statusCode);return i.status=n.statusCode||0,i.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",i),t(i)}(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 o=this,s=e;if(this.__isResumed)this.__fileStream=i.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(),i.existsSync(this.__filePath)){var l=this.__getFilesizeInBytes(this.__filePath),u=this.__total?this.__total:0;if("object"===n(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||l>=u))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:l}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=i.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 o.__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 o=!!r.__total&&r.__downloaded!==r.__total;if(o&&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:o,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,o=r.delay,i=void 0===o?0:o,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())}),i)}))}))):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"),o=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,i=!n||o?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||o||i?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(o||i||c)?(r=(r=e["content-disposition"]).trim(),o?r=o[1]:i?r=i[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 o=this.__opts.fileName,i=o.name,s=!!o.hasOwnProperty("ext")&&o.ext;if("string"==typeof s)return i+"."+s;if("boolean"==typeof s){if(s)return i;var c=e.includes(".")?e.split(".").pop():"";return""===c?i:i+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,o=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===o?0:this.__downloaded/o*100,(this.__downloaded===o||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===o||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),o={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(o.headers=r),o}},{key:"__getFilesizeInBytes",value:function(e){try{return i.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(!i.existsSync(t))throw Error("Destination Folder must exist");if(!i.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{i.accessSync(t,i.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=l,t.agent=new l.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{i.accessSync(e,i.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,o=e.split(".").pop();return o!==e&&o.length>0?r=r.replace(o="."+o,""):o="",this.__uniqFileNameSync(r+" ("+ ++n+")"+o)}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?i.access(e.__filePath,(function(n){return n?t():void i.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}(u.EventEmitter)}(Ad);const{appendFile:Nd}=yr.promises,$d="Dpkg::Lock::Timeout=300";let Cd=!1;const Ld=Iu((function(e=Ee()){j(e,"nala"!==e?["update","-y","-o",$d]:["update","-o",$d],{...ta,env:ge(e)}),Cd=!0}));var Dd,kd;(kd=Dd||(Dd={}))[kd.NameDashVersion=0]="NameDashVersion",kd[kd.NameEqualsVersion=1]="NameEqualsVersion",kd[kd.Name=2]="Name",kd[kd.None=3]="None";const jd=Iu((async function(e){Ld(e);const t=await Oe([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&j(e,["install","-y","--fix-broken","-o",$d,...t],{...ta,env:ge(e)})}),{promise:!0}),Ud=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],Fd="/etc/apt/trusted.gpg.d",Md="keyserver.ubuntu.com";let Gd,Bd,qd,Hd,Vd,zd=!1,Xd=!1,Wd=!1,Yd=!1;const Kd=/Version\s*:\s*(.*)/g;let Jd=!1;var Qd=wr;const Zd=t((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=Qd.basename(e,Qd.extname(e))+t,o=Qd.join(Qd.dirname(e),n);return(r=e.slice(0,2))==="."+Qd.sep||"./"===r?"."+Qd.sep+o:o}));var eh={},th={};Be(th,"name",(()=>qe));var rh={};Be(rh,"normalizeTrim",(()=>He));var nh={};Be(nh,"addExeExt",(()=>Ve));var oh={};Be(oh,"addNamePrefix",(()=>ze));var ih={};Be(ih,"addNameSuffix",(()=>Xe));var sh={};Be(sh,"addShExt",(()=>We));var ah={};Be(ah,"addShRelativePrefix",(()=>Ye));var ch={};Be(ch,"removeExt",(()=>Ke));var lh={};Be(lh,"replaceExt",(()=>Je));var uh={};Be(uh,"isPathInside",(()=>Qe)),Ge(eh,th),Ge(eh,rh),Ge(eh,nh),Ge(eh,oh),Ge(eh,ih),Ge(eh,sh),Ge(eh,ah),Ge(eh,ch),Ge(eh,lh),Ge(eh,uh);const ph=["x64","amd64","x86_64","win64","64"],fh=["x86","i386","ia32","win32","32","x32"],dh=["aarch64","arm64","woa64","arm"],hh=["armv7","armv7a"],mh=["powerpc64le","ppc64le"],vh=["sparc64"];var yh={},gh={},wh={};!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=Ur&&Ur.__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]}),o=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=Ur&&Ur.__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 o(t,e),t},s=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=i(yr),c=i(wr);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 o;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(o))return r;const i=r;for(const a of n){r=i+a,o=void 0;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const o of yield e.readdir(t))if(n===o.toUpperCase()){r=c.join(t,o);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(o))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(wh);var Eh=Ur&&Ur.__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]}),_h=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),bh=Ur&&Ur.__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)&&Eh(t,e,r);return _h(t,e),t},Oh=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(gh,"__esModule",{value:!0}),gh.findInPath=gh.which=Th=gh.mkdirP=gh.rmRF=gh.mv=gh.cp=void 0;const Rh=xr,Sh=bh(wr),Ih=bh(wh);gh.cp=function(e,t,r={}){return Oh(this,void 0,void 0,(function*(){const{force:n,recursive:o,copySourceDirectory:i}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),s=(yield Ih.exists(t))?yield Ih.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?Sh.join(t,Sh.basename(e)):t;if(!(yield Ih.exists(e)))throw Error("no such file or directory: "+e);if((yield Ih.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield rt(e,a,0,n)}else{if(""===Sh.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield nt(e,a,n)}}))},gh.mv=function(e,t,r={}){return Oh(this,void 0,void 0,(function*(){if(yield Ih.exists(t)){let n=!0;if((yield Ih.isDirectory(t))&&(t=Sh.join(t,Sh.basename(e)),n=yield Ih.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield Ze(t)}}yield et(Sh.dirname(t)),yield Ih.rename(e,t)}))},gh.rmRF=Ze;var Th=gh.mkdirP=et;gh.which=function e(t,r){return Oh(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(r){const r=yield e(t,!1);if(!r)throw Error(Ih.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 n=yield tt(t);return n&&n.length>0?n[0]:""}))},gh.findInPath=tt;var xh={exports:{}},Ph={exports:{}};!function(e,t){function r(e){A[e]=N++}function n(e){for(var t=0;C.length>t;t++){var r=C[t][0],n=C[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>R)return null;if(!(t.loose?x[A.LOOSE]:x[A.FULL]).test(e))return null;try{return new i(e,t)}catch(r){return null}}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>R)throw new TypeError("version is longer than "+R+" characters");if(!(this instanceof i))return new i(e,t);O("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?x[A.LOOSE]:x[A.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>S||0>this.major)throw new TypeError("Invalid major version");if(this.minor>S||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>S||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&&S>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=D.test(e),n=D.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 i(e,r).compare(new i(t,r))}function c(e,t,r){return a(e,t,r)>0}function l(e,t,r){return 0>a(e,t,r)}function u(e,t,r){return 0===a(e,t,r)}function p(e,t,r){return 0!==a(e,t,r)}function f(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 u(e,r,n);case"!=":return p(e,r,n);case">":return c(e,r,n);case">=":return f(e,r,n);case"<":return l(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(" "),O("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===k?"":this.operator+this.semver.version,O("comp",this)}function v(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof v)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new v(e.raw,t);if(e instanceof m)return new v(e.value,t);if(!(this instanceof v))return new v(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 y(e,t){for(var r=!0,n=e.slice(),o=n.pop();r&&n.length;)r=n.every((function(e){return o.intersects(e,t)})),o=n.pop();return r}function g(e){return!e||"x"===e.toLowerCase()||"*"===e}function w(e,t,r,n,o,i,s,a,c,l,u,p,f){return((t=g(r)?"":g(n)?">="+r+".0.0":g(o)?">="+r+"."+n+".0":">="+t)+" "+(a=g(c)?"":g(l)?"<"+(+c+1)+".0.0":g(u)?"<"+c+"."+(+l+1)+".0":p?"<="+c+"."+l+"."+u+"-"+p:"<="+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(O(e[n].semver),e[n].semver!==k&&e[n].semver.prerelease.length>0){var o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function _(e,t,r){try{t=new v(t,r)}catch(n){return!1}return t.test(e)}function b(e,t,r,n){var o,s,a,u,p;switch(e=new i(e,n),t=new v(t,n),r){case">":o=c,s=d,a=l,u=">",p=">=";break;case"<":o=l,s=f,a=c,u="<",p="<=";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 y=null,g=null;if(t.set[h].forEach((function(e){e.semver===k&&(e=new m(">=0.0.0")),g=g||e,o(e.semver,(y=y||e).semver,n)?y=e:a(e.semver,g.semver,n)&&(g=e)})),y.operator===u||y.operator===p)return!1;if((!g.operator||g.operator===u)&&s(e,g.semver))return!1;if(g.operator===p&&a(e,g.semver))return!1}return!0}var O;t=Ph.exports=i,O="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 R=256,S=Number.MAX_SAFE_INTEGER||9007199254740991,I=R-6,T=t.re=[],x=t.safeRe=[],P=t.src=[],A=t.tokens={},N=0,$="[a-zA-Z0-9-]",C=[["\\s",1],["\\d",R],[$,I]];r("NUMERICIDENTIFIER"),P[A.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),P[A.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),P[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+$+"*",r("MAINVERSION"),P[A.MAINVERSION]="("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),P[A.MAINVERSIONLOOSE]="("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),P[A.PRERELEASEIDENTIFIER]="(?:"+P[A.NUMERICIDENTIFIER]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),P[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+P[A.NUMERICIDENTIFIERLOOSE]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),P[A.PRERELEASE]="(?:-("+P[A.PRERELEASEIDENTIFIER]+"(?:\\."+P[A.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),P[A.PRERELEASELOOSE]="(?:-?("+P[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+P[A.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),P[A.BUILDIDENTIFIER]=$+"+",r("BUILD"),P[A.BUILD]="(?:\\+("+P[A.BUILDIDENTIFIER]+"(?:\\."+P[A.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),P[A.FULLPLAIN]="v?"+P[A.MAINVERSION]+P[A.PRERELEASE]+"?"+P[A.BUILD]+"?",P[A.FULL]="^"+P[A.FULLPLAIN]+"$",r("LOOSEPLAIN"),P[A.LOOSEPLAIN]="[v=\\s]*"+P[A.MAINVERSIONLOOSE]+P[A.PRERELEASELOOSE]+"?"+P[A.BUILD]+"?",r("LOOSE"),P[A.LOOSE]="^"+P[A.LOOSEPLAIN]+"$",r("GTLT"),P[A.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),P[A.XRANGEIDENTIFIERLOOSE]=P[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),P[A.XRANGEIDENTIFIER]=P[A.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),P[A.XRANGEPLAIN]="[v=\\s]*("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:"+P[A.PRERELEASE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),P[A.XRANGEPLAINLOOSE]="[v=\\s]*("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:"+P[A.PRERELEASELOOSE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGE"),P[A.XRANGE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAIN]+"$",r("XRANGELOOSE"),P[A.XRANGELOOSE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAINLOOSE]+"$",r("COERCE"),P[A.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),T[A.COERCERTL]=RegExp(P[A.COERCE],"g"),x[A.COERCERTL]=RegExp(n(P[A.COERCE]),"g"),r("LONETILDE"),P[A.LONETILDE]="(?:~>?)",r("TILDETRIM"),P[A.TILDETRIM]="(\\s*)"+P[A.LONETILDE]+"\\s+",T[A.TILDETRIM]=RegExp(P[A.TILDETRIM],"g"),x[A.TILDETRIM]=RegExp(n(P[A.TILDETRIM]),"g"),r("TILDE"),P[A.TILDE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAIN]+"$",r("TILDELOOSE"),P[A.TILDELOOSE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAINLOOSE]+"$",r("LONECARET"),P[A.LONECARET]="(?:\\^)",r("CARETTRIM"),P[A.CARETTRIM]="(\\s*)"+P[A.LONECARET]+"\\s+",T[A.CARETTRIM]=RegExp(P[A.CARETTRIM],"g"),x[A.CARETTRIM]=RegExp(n(P[A.CARETTRIM]),"g"),r("CARET"),P[A.CARET]="^"+P[A.LONECARET]+P[A.XRANGEPLAIN]+"$",r("CARETLOOSE"),P[A.CARETLOOSE]="^"+P[A.LONECARET]+P[A.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),P[A.COMPARATORLOOSE]="^"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),P[A.COMPARATOR]="^"+P[A.GTLT]+"\\s*("+P[A.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),P[A.COMPARATORTRIM]="(\\s*)"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+"|"+P[A.XRANGEPLAIN]+")",T[A.COMPARATORTRIM]=RegExp(P[A.COMPARATORTRIM],"g"),x[A.COMPARATORTRIM]=RegExp(n(P[A.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),P[A.HYPHENRANGE]="^\\s*("+P[A.XRANGEPLAIN]+")\\s+-\\s+("+P[A.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),P[A.HYPHENRANGELOOSE]="^\\s*("+P[A.XRANGEPLAINLOOSE]+")\\s+-\\s+("+P[A.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),P[A.STAR]="(<|>)?=?\\s*\\*";for(var L=0;N>L;L++)O(L,P[L]),T[L]||(T[L]=RegExp(P[L]),x[L]=RegExp(n(P[L])));t.parse=o,t.valid=function(e,t){var r=o(e,t);return r?r.version:null},t.clean=function(e,t){var r=o(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=i,i.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},i.prototype.toString=function(){return this.version},i.prototype.compare=function(e){return O("SemVer.compare",this.version,this.options,e),e instanceof i||(e=new i(e,this.options)),this.compareMain(e)||this.comparePre(e)},i.prototype.compareMain=function(e){return e instanceof i||(e=new i(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},i.prototype.comparePre=function(e){if(e instanceof i||(e=new i(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(O("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)},i.prototype.compareBuild=function(e){e instanceof i||(e=new i(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(O("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)},i.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 i(e,r).inc(t,n).version}catch(o){return null}},t.diff=function(e,t){if(u(e,t))return null;var r=o(e),n=o(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return s},t.compareIdentifiers=s;var D=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new i(e,t).major},t.minor=function(e,t){return new i(e,t).minor},t.patch=function(e,t){return new i(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 i(e,r),o=new i(t,r);return n.compare(o)||n.compareBuild(o)},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=l,t.eq=u,t.neq=p,t.gte=f,t.lte=d,t.cmp=h,t.Comparator=m;var k={};m.prototype.parse=function(e){var t=e.match(this.options.loose?x[A.COMPARATORLOOSE]:x[A.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 i(t[2],this.options.loose):k},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(O("Comparator.test",e,this.options.loose),this.semver===k||e===k)return!0;if("string"==typeof e)try{e=new i(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 v(e.value,t),_(this.value,r,t));if(""===e.operator)return""===e.value||(r=new v(this.value,t),_(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=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||o||i&&s||a||c},t.Range=v,v.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},v.prototype.toString=function(){return this.range},v.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?x[A.HYPHENRANGELOOSE]:x[A.HYPHENRANGE],w),O("hyphen replace",e),e=e.replace(x[A.COMPARATORTRIM],"$1$2$3"),O("comparator trim",e,x[A.COMPARATORTRIM]),e=(e=(e=e.replace(x[A.TILDETRIM],"$1~")).replace(x[A.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?x[A.COMPARATORLOOSE]:x[A.COMPARATOR],n=e.split(" ").map((function(e){return function(e,t){return O("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return O("caret",e,t),e.replace(t.loose?x[A.CARETLOOSE]:x[A.CARET],(function(t,r,n,o,i){var s;return O("caret",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":i?(O("replaceCaret pr",i),s="0"===r?"0"===n?">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+"-"+i+" <"+(+r+1)+".0.0"):(O("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+o+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+" <"+(+r+1)+".0.0"),O("caret return",s),s}))}(e,t)})).join(" ")}(e,t),O("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?x[A.TILDELOOSE]:x[A.TILDE],(function(t,r,n,o,i){var s;return O("tilde",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":i?(O("replaceTilde pr",i),s=">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0",O("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),O("tildes",e),e=function(e,t){return O("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?x[A.XRANGELOOSE]:x[A.XRANGE],(function(r,n,o,i,s,a){O("xRange",e,r,n,o,i,s,a);var c=g(o),l=c||g(i),u=l||g(s);return"="===n&&u&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&u?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),r=n+o+"."+i+"."+s+a):l?r=">="+o+".0.0"+a+" <"+(+o+1)+".0.0"+a:u&&(r=">="+o+"."+i+".0"+a+" <"+o+"."+(+i+1)+".0"+a),O("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),O("xrange",e),e=function(e,t){return O("replaceStars",e,t),e.trim().replace(x[A.STAR],"")}(e,t),O("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)},v.prototype.intersects=function(e,t){if(!(e instanceof v))throw new TypeError("a Range is required");return this.set.some((function(r){return y(r,t)&&e.set.some((function(e){return y(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new v(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},v.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new i(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,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minVersion=function(e,t){e=new v(e,t);var r=new i("0.0.0");if(e.test(r))return r;if(r=new i("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 i(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 v(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=o(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new v(e,r),t=new v(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof i)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=x[A.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),x[A.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;x[A.COERCERTL].lastIndex=-1}else r=e.match(x[A.COERCE]);return null===r?null:o(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,Ph.exports);var Ah=Ph.exports;!function(e,t){var r=Ur&&Ur.__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]}),n=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Ur&&Ur.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t},i=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=o(Ah),a=m(),c=vr,l=Tr,u=yr;t._findMatch=function(t,r,n,o){return i(this,void 0,void 0,(function*(){const i=c.platform();let l,u,p;for(const c of n){const n=c.version;if(a.debug(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(p=c.files.find((t=>{a.debug(`${t.arch}===${o} && ${t.platform}===${i}`);let r=t.arch===o&&t.platform===i;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),p)){a.debug("matched "+c.version),u=c;break}}return u&&p&&(l=Object.assign({},u),l.files=[p]),l}))},t._getOsVersion=function(){const t=c.platform();let r="";if("darwin"===t)r=""+l.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 u.existsSync(e)?r=""+u.readFileSync(e):u.existsSync(t)&&(r=""+u.readFileSync(t)),r}}(xh,xh.exports);for(var Nh=xh.exports,$h=gr,Ch=[],Lh=0;256>Lh;++Lh)Ch[Lh]=(Lh+256).toString(16).substr(1);var Dh=function(){return $h.randomBytes(16)},kh=function(e,t){var r=t||0;return""+Ch[e[r++]]+Ch[e[r++]]+Ch[e[r++]]+Ch[e[r++]]+"-"+Ch[e[r++]]+Ch[e[r++]]+"-"+Ch[e[r++]]+Ch[e[r++]]+"-"+Ch[e[r++]]+Ch[e[r++]]+"-"+Ch[e[r++]]+Ch[e[r++]]+Ch[e[r++]]+Ch[e[r++]]+Ch[e[r++]]+Ch[e[r++]]},jh=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Dh)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;16>i;++i)t[n+i]=o[i];return t||kh(o)},Uh={},Fh={},Mh=Ur&&Ur.__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]}),Gh=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bh=Ur&&Ur.__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)&&Mh(t,e,r);return Gh(t,e),t},qh=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Fh,"__esModule",{value:!0}),Fh.argStringToArray=Fh.ToolRunner=void 0;const Hh=Bh(vr),Vh=Bh(Or),zh=Bh(Tr),Xh=Bh(wr),Wh=Bh(gh),Yh=Bh(wh),Kh=$r,Jh="win32"===process.platform;Fh.ToolRunner=class extends Vh.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 o=t?"":"[command]";if(Jh)if(this._isCmdFile()){o+=r;for(const e of n)o+=" "+e}else if(e.windowsVerbatimArguments){o+=`"${r}"`;for(const e of n)o+=" "+e}else{o+=this._windowsQuoteCmdArg(r);for(const e of n)o+=" "+this._windowsQuoteCmdArg(e)}else{o+=r;for(const e of n)o+=" "+e}return o}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(Hh.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+Hh.EOL.length),o=n.indexOf(Hh.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return Jh&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(Jh&&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 i of e)if(t.some((e=>e===i))){r=!0;break}if(!r)return e;let n='"',o=!0;for(let i=e.length;i>0;i--)n+=e[i-1],o&&"\\"===e[i-1]?n+="\\":'"'===e[i-1]?(o=!0,n+='"'):o=!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 qh(this,void 0,void 0,(function*(){return!Yh.isRooted(this.toolPath)&&(this.toolPath.includes("/")||Jh&&this.toolPath.includes("\\"))&&(this.toolPath=Xh.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield Wh.which(this.toolPath,!0),new Promise(((e,t)=>qh(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)+Hh.EOL);const n=new Qh(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield Yh.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=zh.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let s="";i.stdout&&i.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),s=this._processLineBuffer(e,s,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let a="";if(i.stderr&&i.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),a=this._processLineBuffer(e,a,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),i.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),i.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),i.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)=>{s.length>0&&this.emit("stdline",s),a.length>0&&this.emit("errline",a),i.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!i.stdin)throw Error("child process missing stdin");i.stdin.end(this.options.input)}}))))}))}},Fh.argStringToArray=function(e){function t(e){o&&'"'!==e&&(i+="\\"),i+=e,o=!1}const r=[];let n=!1,o=!1,i="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&o?t(a):"\\"===a&&n?o=!0:" "!==a||n?t(a):i.length>0&&(r.push(i),i=""):o?t(a):n=!n}return i.length>0&&r.push(i.trim()),r};class Qh extends Vh.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=Kh.setTimeout(Qh.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())}}var Zh=Ur&&Ur.__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]}),em=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tm=Ur&&Ur.__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)&&Zh(t,e,r);return em(t,e),t},rm=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Uh,"__esModule",{value:!0}),exports.getExecOutput_1=Uh.getExecOutput=exports.exec_2=Uh.exec=void 0;const nm=Nr,om=tm(Fh);exports.exec_2=Uh.exec=ot,exports.getExecOutput_1=Uh.getExecOutput=function(e,t,r){var n,o;return rm(this,void 0,void 0,(function*(){let i="",s="";const a=new nm.StringDecoder("utf8"),c=new nm.StringDecoder("utf8"),l=null===(n=null==r?void 0:r.listeners)||void 0===n?void 0:n.stdout,u=null===(o=null==r?void 0:r.listeners)||void 0===o?void 0:o.stderr,p=Object.assign(Object.assign({},null==r?void 0:r.listeners),{stdout:e=>{i+=a.write(e),l&&l(e)},stderr:e=>{s+=c.write(e),u&&u(e)}}),f=yield ot(e,t,Object.assign(Object.assign({},r),{listeners:p}));return i+=a.end(),s+=c.end(),{exitCode:f,stdout:i,stderr:s}}))};var im={},sm=Ur&&Ur.__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]}),am=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cm=Ur&&Ur.__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)&&sm(t,e,r);return am(t,e),t},lm=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(im,"__esModule",{value:!0}),im.RetryHelper=void 0;const um=cm(m());im.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 lm(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;um.info(n.message)}const o=this.getSleepAmount();um.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 lm(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var pm=Ur&&Ur.__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]}),fm=Ur&&Ur.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dm=Ur&&Ur.__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)&&pm(t,e,r);return fm(t,e),t},hm=Ur&&Ur.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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())}))},mm=Ur&&Ur.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yh,"__esModule",{value:!0}),yh.evaluateVersions=yh.isExplicitVersion=yh.findFromManifest=yh.getManifestFromRepo=yh.findAllVersions=Dm=yh.find=yh.cacheFile=Lm=yh.cacheDir=yh.extractZip=yh.extractXar=yh.extractTar=yh.extract7z=Cm=yh.downloadTool=yh.HTTPError=void 0;const vm=dm(m()),ym=dm(gh),gm=dm(yr),wm=dm(Nh),Em=dm(vr),_m=dm(wr),bm=dm(Fn),Om=dm(Ah),Rm=dm(Pr),Sm=dm(Rr),Im=xr,Tm=mm(jh),xm=Uh,Pm=im;class Am extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}yh.HTTPError=Am;const Nm="win32"===process.platform,$m="darwin"===process.platform;var Cm=yh.downloadTool=function(e,t,r,n){return hm(this,void 0,void 0,(function*(){t=t||_m.join(ft(),Tm.default()),yield ym.mkdirP(_m.dirname(t)),vm.debug("Downloading "+e),vm.debug("Destination "+t);const o=dt("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=dt("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new Pm.RetryHelper(3,o,i);return yield s.execute((()=>hm(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return hm(this,void 0,void 0,(function*(){if(gm.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new bm.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(vm.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const i=yield o.get(e,n);if(200!==i.message.statusCode){const t=new Am(i.message.statusCode);throw vm.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=Sm.promisify(Rm.pipeline),a=dt("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,gm.createWriteStream(t)),vm.debug("download complete"),c=!0,t}finally{if(!c){vm.debug("download failed");try{yield ym.rmRF(t)}catch(l){vm.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof Am&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))};yh.extract7z=function(e,t,r){return hm(this,void 0,void 0,(function*(){Im.ok(Nm,"extract7z() not supported on current OS"),Im.ok(e,'parameter "file" is required'),t=yield st(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",vm.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield xm.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${_m.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],o={silent:!0};try{const e=yield ym.which("powershell",!0);yield xm.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},yh.extractTar=function(e,t,r="xz"){return hm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield st(t),vm.debug("Checking tar --version");let n="";yield xm.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),vm.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],vm.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return Nm&&o&&(i.push("--force-local"),s=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),o&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",s,"-f",a),yield xm.exec("tar",i),t}))},yh.extractXar=function(e,t,r=[]){return hm(this,void 0,void 0,(function*(){let n;Im.ok($m,"extractXar() not supported on current OS"),Im.ok(e,'parameter "file" is required'),t=yield st(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),vm.isDebug()&&n.push("-v");const o=yield ym.which("xar",!0);var i;return yield xm.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},yh.extractZip=function(e,t){return hm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield st(t),Nm?yield function(e,t){return hm(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=yield ym.which("pwsh",!1);if(o){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(" ")];vm.debug("Using pwsh at path: "+o),yield xm.exec(`"${o}"`,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 ym.which("powershell",!0);vm.debug("Using powershell at path: "+t),yield xm.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return hm(this,void 0,void 0,(function*(){const r=yield ym.which("unzip",!0),n=[e];vm.isDebug()||n.unshift("-q"),n.unshift("-o"),yield xm.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))};var Lm=yh.cacheDir=function(e,t,r,n){return hm(this,void 0,void 0,(function*(){if(r=Om.clean(r)||r,n=n||Em.arch(),vm.debug(`Caching tool ${t} ${r} ${n}`),vm.debug("source dir: "+e),!gm.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield at(t,r,n);for(const t of gm.readdirSync(e)){const r=_m.join(e,t);yield ym.cp(r,o,{recursive:!0})}return ct(t,r,n),o}))};yh.cacheFile=function(e,t,r,n,o){return hm(this,void 0,void 0,(function*(){if(n=Om.clean(n)||n,o=o||Em.arch(),vm.debug(`Caching tool ${r} ${n} ${o}`),vm.debug("source file: "+e),!gm.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield at(r,n,o),s=_m.join(i,t);return vm.debug("destination file "+s),yield ym.cp(e,s),ct(r,n,o),i}))};var Dm=yh.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||Em.arch(),lt(t)||(t=ut(it(e,r),t));let n="";if(t){t=Om.clean(t)||"";const o=_m.join(pt(),e,t,r);vm.debug("checking cache: "+o),gm.existsSync(o)&&gm.existsSync(o+".complete")?(vm.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):vm.debug("not found")}return n};yh.findAllVersions=it,yh.getManifestFromRepo=function(e,t,r,n="master"){return hm(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new bm.HttpClient("tool-cache"),a={};r&&(vm.debug("set auth"),a.authorization=r);const c=yield s.getJson(i,a);if(!c.result)return o;let l="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){l=e.url;break}a.accept="application/vnd.github.VERSION.raw";let u=yield(yield s.get(l,a)).readBody();if(u){u=u.replace(/^\uFEFF/,"");try{o=JSON.parse(u)}catch(p){vm.debug("Invalid json")}}return o}))},yh.findFromManifest=function(e,t,r,n=Em.arch()){return hm(this,void 0,void 0,(function*(){return yield wm._findMatch(e,t,r,n)}))},yh.isExplicitVersion=lt,yh.evaluateVersions=ut;var km={};Object.defineProperty(km,"__esModule",{value:!0}),km.retryAsPromised=km.TimeoutError=void 0;let jm=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};km.TimeoutError=jm,km.retryAsPromised=ht;var Um=km.default=ht;let Fm;const Mm=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||yr.mkdir,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,o)=>t.mkdir(e,r,((e,t)=>e?o(e):n(t))))),e.stat=e.stat||r.stat||yr.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||yr.statSync,e.mkdirSync=e.mkdirSync||r.mkdirSync||yr.mkdirSync,t},Gm=(e,t,r)=>{const n=wr.dirname(e),o={...Mm(t),recursive:!1};if(n===e)try{return o.mkdirSync(e,o)}catch(i){if(i&&"EISDIR"!==i.code)throw i;return}try{return o.mkdirSync(e,o),r||e}catch(i){const t=i;if(t&&"ENOENT"===t.code)return Gm(e,o,Gm(n,o,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw i;try{if(!o.statSync(e).isDirectory())throw i}catch(s){throw i}}},Bm=Object.assign((async(e,t,r)=>{const n=Mm(t);n.recursive=!1;const o=wr.dirname(e);return o===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const i=t;if(i&&"ENOENT"===i.code)return Bm(o,n).then((t=>Bm(e,n,t)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:Gm}),qm=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?qm(e,wr.dirname(t),t):void 0))},Hm=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?Hm(e,wr.dirname(t),t):void 0}},Vm=(e,t)=>{const r=Mm(t);if(r.recursive=!0,wr.dirname(e)===e)return r.mkdirSync(e,r);const n=Hm(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return Gm(e,r);throw o}},zm=Object.assign((async(e,t)=>{const r={...Mm(t),recursive:!0};return wr.dirname(e)===e?await r.mkdirAsync(e,r):qm(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return Bm(e,r);throw t}))))}),{sync:Vm}),Xm=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Wm=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=wr.resolve(e),"win32"===Xm){const t=/[*|"<>?:]/,{root:r}=wr.parse(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},Ym=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Km=+Ym[0]>10||10==+Ym[0]&&+Ym[1]>=12,Jm=Km?e=>Mm(e).mkdirSync===yr.mkdirSync:()=>!1,Qm=Object.assign(Km?e=>Mm(e).mkdir===yr.mkdir:()=>!1,{sync:Jm}),Zm=(e,t)=>{e=Wm(e);const r=Mm(t);return Jm(r)?Vm(e,r):Gm(e,r)},ev=Object.assign((async(e,t)=>{e=Wm(e);const r=Mm(t);return Qm(r)?zm(e,r):Bm(e,r)}),{mkdirpSync:Zm,mkdirpNative:zm,mkdirpNativeSync:Vm,mkdirpManual:Bm,mkdirpManualSync:Gm,sync:Zm,native:zm,nativeSync:Vm,manual:Bm,manualSync:Gm,useNative:Qm,useNativeSync:Jm}),tv=/v?(\d\S*)/,rv="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",nv={llvm:rv,clangtidy:rv,clangformat:rv,ninja:"1.12.1",cmake:"3.30.2",gcovr:"5.2",conan:"1.64.1",meson:"1.5.1",kcov:"42",task:"3.38.0",doxygen:De()?"1.11.0-4":"1.11.0",gcc:"win32"===process.platform?"14.2.0posix-18.1.8-12.0.0-ucrt-r1":"",powershell:"7.4.5"},ov="22.2.0",iv="3.7.9",sv={mingw:{24:"8.0.0-1",22:"8.0.0-1",20:"7.0.0-2"},gcovr:{24:"6.0",22:"6.0",20:"6.0",18:"5.0"},meson:{24:"1.0.0",22:"1.0.0",20:"1.0.0",18:"0.61.4"},nala:{24:"",22:"",21:"legacy",20:"legacy",18:"legacy",16:"legacy",14:"legacy"},kcov:{24:"42-binary",22:"42-binary",20:"40-binary",18:"40",16:"40",14:"40"},doxygen:{24:"1.11.0",22:"1.11.0",20:"1.10.0",18:"1.10.0"}},av=Iu((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 exports.getExecOutput_1(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(wr.join(r,"Scripts"),wr.join(r,"Scripts","bin"),wr.join(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var cv={};Object.defineProperty(cv,"__esModule",{value:!0});var lv=cv.getUbuntuVersion=void 0;const uv=Tr;lv=cv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{uv.execFile(t,r,{encoding:"utf8",shell:!1},((o,i,s)=>{if(o)return"errno"in o&&"ENOENT"===o.code?void e(null):void n(Error(`Could not execute \`${t} ${r.join(" ")}\`: ${o} (stderr=${s})`));e(i)}))})));var t,r;if(null===e)return[];const n=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,i=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let s=null,a=null,c=!1;for(const l of e.split("\n")){const e=l.match(n);if(null!==e){if("Ubuntu"!==e[1])return[];c=!0}const t=l.match(o);t&&(s=t);const r=l.match(i);if(r&&(a=r),c&&s&&a)break}if(!c)return[];for(const l of[s,a])if(l){const e=[l[1],l[2]];return l[3]&&e.push(l[3]),e.map((e=>parseInt(e,10)))}return[]};const pv=Iu((async function(){try{if(ke()){try{null===Js.sync("lsb_release",{nothrow:!0})&&await Ie([{name:"lsb-release"}])}catch{return Lt()}const e=await lv();return 0===e.length?Lt():e}return null}catch(e){return y(""+e),null}}),{promise:!0}),fv=Iu((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=te("~/.local/pipx");if(await ee(t))return t;switch(process.platform){case"win32":e=te("~/AppData/Local/pipx");break;case"darwin":e=te("~/Library/Application Support/pipx");break;default:e=te("~/.local/share/pipx")}return await ev(e),await ev(wr.join(e,"trash")),await ev(wr.join(e,"shared")),await ev(wr.join(e,"venv")),e}),{promise:!0}),dv=Iu((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=te("~/.local/bin");return await se(e,Yv),await ev(e),e}),{promise:!0}),hv=Iu((async function(){const e=(await It($t("python",void 0,await pv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),mv=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"]]]),vv=Iu((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||vr.release()).split(".")[0];const[t,r]=mv.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),yv="string"==typeof __dirname?__dirname:wr.dirname(Ar.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Lr&&Lr.src||new URL("setup-cpp.js",document.baseURI).href)),gv="string"==typeof __dirname?__dirname:wr.dirname(Ar.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Lr&&Lr.src||new URL("setup-cpp.js",document.baseURI).href));class wv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Ev extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const _v=e=>void 0===globalThis.DOMException?new Ev(e):new DOMException(e),bv=e=>{const t=void 0===e.reason?_v("This operation was aborted."):e.reason;return t instanceof Error?t:_v(t)},Ov=m(),Rv=Tr,Sv=yr,Iv=wr,Tv=Ir,xv=Tv.env["ProgramFiles(x86)"],Pv=[Tv.env["ProgramFiles(x86)"],Tv.env.ProgramFiles],Av=["Enterprise","Professional","Community","BuildTools"],Nv=["2022","2019","2017"],$v={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Cv=Zt;const Lv=xv+"\\Microsoft Visual Studio\\Installer";var Dv=tr,kv=function(e,t,r,n,o,i){if("win32"!=Tv.platform)return void Ov.info("This is not a Windows virtual environment, bye!");Tv.env.PATH+=Iv.delimiter+Lv;let s={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in s&&(e=s[e.toLowerCase()]);var a=[e];n&&!0===JSON.parse(n)&&a.push("uwp"),t&&a.push(t),r&&a.push("-vcvars_ver="+r),o&&!0===JSON.parse(o)&&a.push("-vcvars_spectre_libs=spectre");const c=`"${tr(i)}" ${a.join(" ")}`;Ov.debug("vcvars command-line: "+c);const l=(""+Rv.execSync(`set && cls && ${c} && cls && set`,{shell:"cmd"})).split("\f"),u=l[0].split("\r\n"),p=l[1].split("\r\n"),f=l[2].split("\r\n"),d=p.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(d.length>0)throw Error("invalid parameters\r\n"+d.join("\r\n"));let h={};for(let m of u){const[e,t]=m.split("=");h[e]=t}Ov.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Ov.info("Setting "+e),rr(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Ov.exportVariable(e,t))}Ov.endGroup(),Ov.info("Configured Developer Command Prompt")},jv=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(jv||{});const Uv="string"==typeof __dirname?__dirname:wr.dirname(Ar.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Lr&&Lr.src||new URL("setup-cpp.js",document.baseURI).href)),Fv="string"==typeof __dirname?__dirname:wr.dirname(Ar.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Lr&&Lr.src||new URL("setup-cpp.js",document.baseURI).href)),Mv=Iu((async function(e,t,r){const[n,o]=await Promise.all([ar(e,t,r),lr()]);return await Bv(r),n}),{promise:!0}),Gv=Iu((async function(e){ke()?e>10?await Ie([{name:"libtinfo-dev"}]):await Ie([{name:"libtinfo5"}]):De()?await Me("ncurses5-compat-libs",void 0,"yay"):Le()&&await Fe([{name:"ncurses-compat-libs"}])}),{promise:!0}),Bv=Iu((async function(e){"linux"===process.platform&&await Xt($t("gcc",void 0,await pv()),"",e,40)}),{promise:!0}),qv="string"==typeof __dirname?__dirname:wr.dirname(Ar.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Lr&&Lr.src||new URL("setup-cpp.js",document.baseURI).href));let Hv,Vv=!1;const zv={nala:async function(e,t,r){if(!ke())return;if("string"==typeof Hv)return{binDir:Hv};const n=Js.sync("nala",{nothrow:!0});if(null!==n)return Hv=wr.dirname(n),{binDir:Hv};await Ie([{name:"python3-apt"}]),Hv="/usr/bin";try{const t=await Re({name:"nala",version:e});if(void 0!==t)return await Ie([{name:t}]),{binDir:Hv}}catch(o){w("Failed to install nala: "+o)}try{const e=await Re({name:"nala-legacy"});if(void 0!==e)return await Ie([{name:e}],!0),{binDir:Hv}}catch(o){w("Failed to install nala-legacy: "+o)}return await async function(){const e=new Ad.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",vr.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=wr.join(vr.tmpdir(),"install-nala.sh"),r=await ms(t,"utf8");await Ss(t,r.replace(/sudo/g,"")),await Ie([{name:"wget"}]);try{j("bash",[t])}catch(o){v("Failed to install nala via installer: "+o),j("apt",["install","-y","-t","nala","nala"])}}(),{binDir:Hv}},cmake:Ot,ninja:Yt,python:It,vcpkg:async function(e,t,r){return Vv&&null!==Js.sync("vcpkg",{nothrow:!0})?{binDir:wr.dirname(Js.sync("vcpkg"))}:("linux"===process.platform&&(De()?await Promise.all([Me("curl"),Me("zip"),Me("unzip"),Me("tar"),Me("git"),Me("pkg-config")]):Le()?await Fe([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):ke()&&await Ie([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await ee(wr.join(t,We("bootstrap-vcpkg",".bat")))?g(`Vcpkg folder already exists at ${t}. Skipping the clone`):A("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:wr.dirname(t),stdio:"inherit"}),""!==e&&"true"!==e&&(w("Checking out vcpkg version "+e),A("git",["checkout",e],{cwd:t,stdio:"inherit"})),A(We(Ye("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await B(t),await se(t,Yv),Vv=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return Ue("bazelisk",e);case"darwin":return Ce("bazelisk",e);case"linux":if(De())throw Error("installing bazel on Arch linux is not supported yet");if(Le())return await Fe([{name:"dnf-plugins-core"}]),j("dnf",["copr","enable","vbatts/bazel"]),Fe([{name:"bazel4"}]);if(ke())return j("bash",["-c",`echo "deb [arch=amd64 signed-by=${await Te({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`]),Ie([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Dt("conan",e)},meson:function(e,t,r){return Dt("meson",e)},gcovr:function(e,t,r){return Dt("gcovr",e)},opencppcoverage:async function(e,t,r){if("win32"===process.platform)return await Ue("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await se(e,Yv),e}()}},llvm:sr,gcc:Xt,choco:je,brew:Ae,powershell:async function(e,t,r){try{return await _t("pwsh",e,pr,t,r)}catch(n){return v(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Ue("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await se(t,Yv),{binDir:t}}case"darwin":return Ce("powershell",e,{cask:!0,overwrite:!1});case"linux":if(De())return Me("powershell-bin",e,"yay");if(Le())return await Fe([{name:"curl"}]),j("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),Fe([{name:"powershell",version:e}]);if(ke()){await Ie([{name:"curl"}]);const t=await pv();return j("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),j("dpkg",["-i","packages-microsoft-prod.deb"]),Ie([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}},ccache:function(e,t,r){switch(process.platform){case"win32":return Ue("ccache",e);case"darwin":return Ce("ccache",e);case"linux":if(De())return Me("ccache",e);if(Le())return Fe([{name:"ccache",version:e}]);if(ke())return Ie([{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 Ue("sccache",e);case"linux":case"darwin":return Ce("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await Um((()=>Ue("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>w(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 ee(wr.join(e,"doxygen.exe")))return await se(e,Yv),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Ft($t("graphviz",void 0)),t}case"darwin":{const e=await Ce("doxygen",void 0);return vv()[0]>11&&await Ft($t("graphviz",void 0)),e}case"linux":{let o;if(""===e||De()||Le())if(De())o=await Me("doxygen",e);else{if(Le())return Fe([{name:"doxygen",version:e}]);if(!ke())throw Error("Unsupported linux distributions");o=await Ie([{name:"doxygen",version:e}])}else{if(!ke())throw Error("Unsupported linux distributions");try{o=await _t("doxygen",e,Gt,t,r);try{await Ie([{name:"libclang-cpp9"}])}catch(n){w("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){g(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),o=await Ie([{name:"doxygen"}])}}return await Ft($t("graphviz",void 0,await pv())),o}default:throw Error("Unsupported platform")}},graphviz:Ft,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await Ue("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await se(e,Yv),e}()};case"darwin":return Ce("cppcheck",e);case"linux":if(De())return Me("cppcheck",e);if(Le())return Fe([{name:"ccache",version:e}]);if(ke())return Ie([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},clangtidy:function(e,t,r){return ar(e,t,r)},clangformat:function(e,t,r){return ar(e,t,r,jv.ClangFormat)},msvc:ur,vcvarsall:nr,kcov:async function(e,t,r){if("linux"!==process.platform)return void w("Kcov is not supported on non-linux");const n=e.split("-");let o=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const i=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(o);let a;return 38===s&&(o="v38"),"binary"!==i||39>s?(a=await _t("kcov",o,Jt,t,r),a):(a=await _t("kcov",o,Kt,t,r),De()?await Me("binutils"):Le()?await Fe([{name:"binutils"}]):ke()&&await Ie([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return Ue("make",e);case"darwin":{await Ce("make",e);const t=wr.join($e(),"opt/make/libexec/gnubin");return await se(t,Yv),{binDir:t}}case"linux":if(De())return Me("make",e);if(Le())return Fe([{name:"make",version:e}]);if(ke())return Ie([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return _t("task",e,dr,t,r)},sevenzip:mt},Xv=Object.keys(zv),Wv=["compiler","architecture","timeout",...Xv],Yv={rcPath:te("~/.cpprc"),guard:"cpp"};(async function(e){var t,r,n;let o=Promise.resolve();Fr.GITHUB_ACTIONS||(o=async function(){try{await xd({pkg:Pd})}catch(e){y("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS="true");const i=function(e){return function(e,t){var r,n,o,i,s,a={_:[]},c=0,l=0,u=0,p=(e=e||[]).length;const f=void 0!==(t=t||{}).alias,d=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=me(t.string),t.boolean=me(t.boolean),f)for(r in t.alias)for(n=t.alias[r]=me(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(l=(n=t.alias[t.boolean[c]]||[]).length;l-- >0;)t.boolean.push(n[l]);for(c=t.string.length;c-- >0;)for(l=(n=t.alias[t.string[c]]||[]).length;l-- >0;)t.string.push(n[l]);if(h)for(r in t.default)if(i=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],void 0!==t[i])for(t[i].push(r),c=0;n.length>c;c++)t[i].push(n[c]);const m=d?Object.keys(t.alias):[];for(c=0;p>c;c++){if("--"===(o=e[c])){a._=a._.concat(e.slice(++c));break}for(l=0;o.length>l&&45===o.charCodeAt(l);l++);if(0===l)a._.push(o);else if("no-"===o.substring(l,l+3)){if(i=o.substring(l+3),d&&!~m.indexOf(i))return t.unknown(o);a[i]=!1}else{for(u=l+1;o.length>u&&61!==o.charCodeAt(u);u++);for(i=o.substring(l,u),s=o.substring(++u)||c+1===p||45===(""+e[c+1]).charCodeAt(0)||e[++c],n=2===l?[i]:i,u=0;n.length>u;u++){if(i=n[u],d&&!~m.indexOf(i))return t.unknown("-".repeat(l)+i);ve(a,i,n.length>u+1||s,t)}}}if(h)for(r in t.default)void 0===a[r]&&(a[r]=t.default[r]);if(f)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}(e,{string:[...Wv,"timeout"],default:Object.fromEntries(Wv.map((e=>[e,hr(e)]))),alias:{h:"help"},boolean:"help"})}(e);i.help&&(w('\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 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 you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));const s=null!=(t=i.architecture)?t:process.arch,a=null!=(r=process.env.SETUP_CPP_DIR)?r:te("~"),c=[],l=[],u=np.create({autoloadLocales:!0});let p,f;np.addLocale(op),Yu.addLocale(Ku);const d=await pv();if(!function(e){const t=["llvm","clangtidy","clangformat"].filter((t=>void 0!==e[t])),r=t.filter((t=>!Ct(e[t]))),n=1>r.length?"true":e[r[0]];if(r.some((t=>e[t]!==n)))return!1;for(const o of t)e[o]=n;return!0}(i))return v("The same version must be used for llvm, clangformat and clangtidy"),1;De()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&(w("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await Me("python-pygments"));let h=!1;for(const m of Xv){if(Fr.isCI&&0!==l.length){h=!0;break}const e=i[m];void 0!==e&&(p=Date.now(),await or(m,e,d,s,a,c,l,6e4*Number.parseFloat(null!=(n=i.timeout)?n:"20")),f=Date.now(),w("took "+(u.format(p,f)||"0 seconds")))}if(!h){const e=i.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i){try{const{compiler:s,version:a}=function(e){const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null!==Tp(e)||w(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}(e);switch(Zn.startGroup(`Installing ${s} ${null!=a?a:""}`),s){case"llvm":case"clang":case"clang++":{const e=await sr($t("llvm",a,t),wr.join(r,"llvm"),n);await oe("GCOV","llvm-cov gcov",Yv),o.push(mr("llvm",e));break}case"gcc":case"mingw":case"cygwin":case"msys":{const e=$t("mingw"===s?"mingw":"gcc",a,t),i="mingw"===s?await async function(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return Xt(e,t,r);case"linux":De()?n=await Me("mingw-w64-gcc",e):Le()?n=await Fe([{name:"mingw64-gcc",version:e}]):ke()&&(n=await Ie([{name:"mingw-w64",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!==n)return n}(e,wr.join(r,"gcc"),n):await Xt(e,wr.join(r,"gcc"),n);await function(e){const t=Tp(e),r=null!==t?Cp(t):e;return oe("GCOV",""!==r?"gcov-"+r:"gcov",Yv)}(e),o.push(mr("gcc",i));break}case"cl":case"msvc":case"msbuild":case"vs":case"visualstudio":case"visualcpp":case"visualc++":{const e=await ur($t("msvc",a,t),wr.join(r,"msvc"),n);o.push(mr("msvc",e));break}case"appleclang":case"applellvm":Zn.notice("Assuming apple-clang is already installed"),await Promise.all([oe("CC","clang",Yv),oe("CXX","clang++",Yv)]),o.push(mr("apple-clang",void 0));break;default:i.push("Unsupported compiler "+s)}}catch(s){v(s),i.push("Failed to install the "+e)}Zn.endGroup()}(e,d,a,s,c,l);const r=Date.now();w("took "+(u.format(t,r)||"0 seconds"))}}if(await async function(e){if(await ee(e.rcPath)){const t=(await Pu(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await Au(e.rcPath,r.join("\n")),await B(e.rcPath)}}(Yv),0===c.length&&0===l.length)return y("setup-cpp was called without any arguments. Nothing to do."),0;for(const m of c)console.log(`${m}`);for(const m of l)v(m);if(w("setup-cpp finished"),!Fr.GITHUB_ACTIONS)switch(process.platform){case"win32":y("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":y("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await o,0===l.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{v("main() panicked!"),v(e),process.exitCode=1})),exports.ciInfo=Fr,exports.commonjsGlobal=Ur,exports.coreExports=Zn,exports.exec=Uh,exports.getAugmentedNamespace=r,exports.getDefaultExportFromCjs=t,exports.info=w,exports.io=gh,exports.pathExists=ee,exports.requireCore=m,exports.semver=ud,exports.semverExports=Ah,exports.tunnel=Nn,exports.v4_1=jh,exports.warning=y; +"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(e,t,r){const n=new rn(e,t,r);process.stdout.write(""+n+en.EOL)}function o(){return sn>on.length-16&&(Sr.randomFillSync(on),sn=0),on.slice(sn,sn+=16)}function i(e){return"string"==typeof e&&an.test(e)}function s(e,t=0){const r=(cn[e[t+0]]+cn[e[t+1]]+cn[e[t+2]]+cn[e[t+3]]+"-"+cn[e[t+4]]+cn[e[t+5]]+"-"+cn[e[t+6]]+cn[e[t+7]]+"-"+cn[e[t+8]]+cn[e[t+9]]+"-"+cn[e[t+10]]+cn[e[t+11]]+cn[e[t+12]]+cn[e[t+13]]+cn[e[t+14]]+cn[e[t+15]]).toLowerCase();if(!i(r))throw TypeError("Stringified UUID is invalid");return r}function a(e){if(!i(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function c(e,t,r){function n(e,n,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;e.length>r;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=a(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(n),c.set(e,n.length),c=r(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,o){i=i||0;for(let e=0;16>e;++e)o[i+e]=c[e];return o}return s(c)}try{n.name=e}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function l(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=+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 o of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===o||n.some((e=>e===o||e.endsWith("."+o)||o.startsWith(".")&&e.endsWith(""+o))))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 Sn(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Sn("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||Pn.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=f(r,n,o),s=0,a=t.requests.length;a>s;++s){var c=t.requests[s];if(c.host===i.host&&c.port===i.port)return t.requests.splice(s,1),void c.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function p(e,t){var r=this;u.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host"),i=d({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host}),s=xn.connect(0,i);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function f(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function d(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,s=o.length;s>i;++i){var a=o[i];void 0!==n[a]&&(e[a]=n[a])}}return e}function h(){return Kn||(Kn=1,function(e){var t=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=Or,n=Rr,{access:o,appendFile:i,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 o(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}${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:i;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(""),o=this.wrap(r,n);return this.addRaw(o).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:o}=e,i=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),o&&{rowspan:o});return this.wrap(i,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:o}=r||{},i=Object.assign(Object.assign({},n&&{width:n}),o&&{height:o}),s=this.wrap("img",null,Object.assign({src:e,alt:t},i));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}(oo)),oo}function m(){return Qn||(Qn=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={}){l.issueCommand("error",p.toCommandProperties(t),e instanceof Error?""+e:e)}function n(e){l.issue("group",e)}function o(){l.issue("endgroup")}var i=Vr&&Vr.__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=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=Vr&&Vr.__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)&&i(t,e,r);return s(t,e),t},c=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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.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 l=Yr,u=nn,p=Kr,f=a(Or),d=a(Ir),v=function(){if(Xn)return Rn;Xn=1;var e=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Rn,"__esModule",{value:!0}),Rn.OidcClient=void 0;const t=zn,n=Wn,o=m();class i{static createHttpClient(e=!0,r=10){const o={allowRetries:e,maxRetries:r};return new t.HttpClient("actions/oidc-client",[new n.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)}`),o.debug("ID token url is "+e);const r=yield i.getCall(e);return o.setSecret(r),r}catch(r){throw Error("Error message: "+r.message)}}))}}return Rn.OidcClient=i,Rn}();var y,g;(g=y=e.ExitCode||(e.ExitCode={}))[g.Success=0]="Success",g[g.Failure=1]="Failure",e.exportVariable=function(e,t){const r=p.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV)return u.issueFileCommand("ENV",u.prepareKeyValueMessage(e,t));l.issueCommand("set-env",{name:e},r)},e.setSecret=function(e){l.issueCommand("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?u.issueFileCommand("PATH",e):l.issueCommand("add-path",{},e),process.env.PATH=`${e}${d.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 u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t));process.stdout.write(f.EOL),l.issueCommand("set-output",{name:e},p.toCommandValue(t))},e.setCommandEcho=function(e){l.issue("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=y.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){l.issueCommand("debug",{},e)},e.error=r,e.warning=function(e,t={}){l.issueCommand("warning",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){l.issueCommand("notice",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+f.EOL)},e.startGroup=n,e.endGroup=o,e.group=function(e,t){return c(this,void 0,void 0,(function*(){let r;n(e);try{r=yield t()}finally{o()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t));l.issueCommand("save-state",{name:e},p.toCommandValue(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return c(this,void 0,void 0,(function*(){return yield v.OidcClient.getIDToken(e)}))};var w=h();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return w.summary}});var E=h();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return E.markdownSummary}});var _=function(){if(Jn)return io;Jn=1;var e=Vr&&Vr.__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=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Vr&&Vr.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(io,"__esModule",{value:!0}),io.toPlatformPath=io.toWin32Path=io.toPosixPath=void 0;const n=r(Ir);return io.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},io.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},io.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},io}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return _.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return _.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return _.toPlatformPath}})}(Wr)),Wr}function v(e){return zr.GITHUB_ACTIONS?so.error(e):console.log(`${e}`)}function y(e){return zr.GITHUB_ACTIONS?so.warning(e):console.log(`${e}`)}function g(e){return zr.GITHUB_ACTIONS?so.notice(e):console.log(`${e}`)}function w(e){return zr.GITHUB_ACTIONS?so.info(e):console.log(e)}function E(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){E(e,t||{},(function(e,t){e?n(e):r(t)}))}))}no(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function _(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(a){}let s;try{s=_o.sync(e.command,{path:r[bo({env:r})],pathExt:t?Eo.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=Eo.resolve(o?e.options.cwd:"",s)),s}function b(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 O(e,t){return Lo&&1===e&&!t.file?b(t.original,"spawn"):null}function R(e,t,r){const n=ko(e,t,r),o=Do.spawn(n.command,n.args,n.options);return jo.hookChildProcess(o,n),o}function S(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 I(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function T(e){return I(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}async function x(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=ki(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=$i.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await ji(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new Ui)}))})),n.getBufferedValue()}function P(e,t,r){const n=os(e,t,r),o=Ji(e,t),i=Qi(e,t);let s;ns(i,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=Lr.spawn(n.file,n.args,n.options)}catch(p){const e=new Lr.ChildProcess,t=Promise.reject(ti({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Xi(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 o;const i=new Promise(((n,i)=>{o=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),s=n.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])})(s,n.options,a),l=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=Oi((()=>{e.kill()}));return n.finally((()=>{o()}))})(s,n.options,c);s.kill=Ri.bind(null,s.kill.bind(s)),s.cancel=Pi.bind(null,s,{isCanceled:!1});const u=zo((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,u,p]=await(async({stdout:t,stderr:r,all:n},{encoding:o,buffer:i,maxBuffer:s},a)=>{const c=Hi(t,{encoding:o,buffer:i,maxBuffer:s}),l=Hi(r,{encoding:o,buffer:i,maxBuffer:s}),u=Hi(n,{encoding:o,buffer:i,maxBuffer:2*s});try{return await Promise.all([a,c,l,u])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},qi(t,c),qi(r,l),qi(n,u)])}})(s,n.options,l),f=is(n.options,c),d=is(n.options,u),h=is(n.options,p);if(e||0!==t||null!==r){const c=ti({error:e,exitCode:t,signal:r,stdout:f,stderr:d,all:h,command:o,escapedCommand:i,parsed:n,timedOut:a,isCanceled:!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:o,escapedCommand:i,exitCode:0,stdout:f,stderr:d,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Bi(e),Rr.createReadStream(t)))(t);void 0!==r&&(I(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=Gi();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=Ai.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Ai.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Ai.bind(void 0,e,"all"))})(s),Xi(s,u),s}function A(e,t,r){const n=os(e,t,r),o=Ji(e,t),i=Qi(e,t);ns(i,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Bi(e),Rr.readFileSync(t)))(e);if(I(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=Lr.spawnSync(n.file,n.args,{...n.options,input:s})}catch(u){throw ti({error:u,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=is(n.options,a.stdout,a.error),l=is(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=ti({stdout:c,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:i,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:o,escapedCommand:i,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function N(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return P(function(){if(void 0===ia){const e=oa.sync("pwsh",{nothrow:!0});null!==e&&(ia=e);const t=oa.sync("powershell",{nothrow:!0});null!==t&&(ia=t)}if(void 0===ia)throw Error("Could not find powershell");return ia}(),[...t,"-c",e],r)}function C(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function $(){return null!==oa.sync("sudo",{nothrow:!0})}function L(){var e;return 0===(null==(e=process.getuid)?void 0:e.call(process))||!!process.env.CI}function D(){return L()&&$()}function k(e){return D()?"sudo "+e:e}function j(e,t=[],r=ca){return D()?function(e,t){const[r,...n]=es(e);return A(r,n,t)}(F(e,t),r):A(e,M(t),r)}function U(e,t=[],r=ca){return D()?function(e,t){const[r,...n]=es(e);return P(r,n,t)}(F(e,t),r):P(e,M(t),r)}function F(e,t){return"sudo "+M([e,...t]).join(" ")}function M(e){return e.map((e=>`'${e}'`))}function G(){return"win32"===process.platform?la():L()}async function B(e){if(("linux"===process.platform||"darwin"===process.platform)&&D()&&void 0!==process.env.SUDO_USER){let t=Rr.statSync(e).isDirectory();await U("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],ca)}}function q(){if(ec)return Za;ec=1;var e=Fa,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return Za=function(i,s){var a,c=Object(e(s));if(i=Object(e(i)),n(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),"function"==typeof o&&o(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return i}}function H(){return Cc?Nc:(Cc=1,Nc=(xc?Tc:(xc=1,Tc=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Ac)return Pc;Ac=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 Pc=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 V(){if(Uc)return jc;Uc=1;var e=kc?Dc:(kc=1,Dc=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return jc=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function z(){return Wc?Xc:(Wc=1,Xc=function(){if(Lc)return $c;Lc=1;var e=H(),t={object:!0,symbol:!0};return $c=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?H().Symbol:function(){if(zc)return Vc;zc=1;var e,t,r,n=Oc,o=V(),i=H().Symbol,s=function(){if(Mc)return Fc;Mc=1;var e=Oc,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return Fc=function(o){for(var i,s,a=0;n[o+(a||"")];)++a;return n[o+=a||""]=!0,t(r,i="@@"+o,e.gs(null,(function(r){s||(s=!0,t(this,i,e(r)),s=!1)}))),i}}(),a=function(){if(Bc)return Gc;Bc=1;var e=Oc,t=H().Symbol;return Gc=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(Hc)return qc;Hc=1;var e=Oc,t=V(),r=Object.create(null);return qc=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}))})}}(),l=Object.create,u=Object.defineProperties,p=Object.defineProperty;if("function"==typeof i)try{i(),r=!0}catch(f){}else i=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},Vc=e=function e(o){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?i(o):(a=l(t.prototype),u(a,{__description__:n("",o=void 0===o?"":o+""),__name__:n("",s(o))}))},a(e),c(e),u(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),u(e.prototype,{toString:n((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:n((function(){return o(this)}))}),p(e.prototype,e.toPrimitive,n("",(function(){var e=o(this);return"symbol"==typeof e?e:""+e}))),p(e.prototype,e.toStringTag,n("c","Symbol")),p(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),p(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),Vc}())}function X(){return ol?nl:(ol=1,nl=(Ic?Sc:(Ic=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(rl)return tl;rl=1;var e=z().iterator,t=function(){if(Kc)return Yc;Kc=1;var e={}.toString,t=e.call(function(){return arguments}());return Yc=function(r){return e.call(r)===t}}(),r=function(){if(Qc)return Jc;Qc=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Jc=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=La,o=ja,i=Fa,s=Sa,a=function(){if(el)return Zc;el=1;var e={}.toString,t=e.call("");return Zc=function(r){return"string"==typeof r||r&&"object"==typeof r&&(r instanceof String||e.call(r)===t)||!1}}(),c=Array.isArray,l=function(){}.call,u={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;return tl=function(f){var d,h,m,v,y,g,w,E,_,b,O=arguments[1],R=arguments[2];if(f=Object(i(f)),s(O)&&o(O),this&&this!==Array&&r(this))d=this;else{if(!O){if(t(f))return 1!==(y=f.length)?Array.apply(null,f):((v=[,])[0]=f[0],v);if(c(f)){for(v=Array(y=f.length),h=0;y>h;++h)v[h]=f[h];return v}}v=[]}if(!c(f))if(void 0!==(_=f[e])){for(w=o(_).call(f),d&&(v=new d),E=w.next(),h=0;!E.done;)b=O?l.call(O,R,E.value,h):E.value,d?(u.value=b,p(v,h,u)):v[h]=b,E=w.next(),++h;y=h}else if(a(f)){for(y=f.length,d&&(v=new d),h=0,m=0;y>h;++h)b=f[h],y>h+1&&(55296>(g=b.charCodeAt(0))||g>56319||(b+=f[++h])),b=O?l.call(O,R,b,m):b,d?(u.value=b,p(v,m,u)):v[m]=b,++m;y=m}if(void 0===y)for(y=n(f.length),d&&(v=new d(y)),h=0;y>h;++h)b=O?l.call(O,R,f[h],h):f[h],d?(u.value=b,p(v,h,u)):v[h]=b;return d&&(u.value=null,v.length=y),v},tl}())}function W(){if(Ol)return bl;Ol=1;var e=_l?El:(_l=1,El=(yl?vl:(yl=1,vl=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:wl?gl:(wl=1,gl=function(e){return e!=e})),t=La,r=Fa,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return bl=function(a){var c,l,u;if(!e(a))return n.apply(this,arguments);for(l=t(r(this).length),c=u=isNaN(u=arguments[1])?0:0>u?t(this.length)-s(i(u)):s(u);l>c;++c)if(o.call(this,c)&&e(this[c]))return c;return-1},bl}function Y(){if(Nl)return Al;Nl=1;var e=ja,t=za,r=function(){}.call;return Al=function(n,o){var i={},s=arguments[2];return e(o),t(n,(function(e,t,n,a){i[t]=r.call(o,s,e,t,n,a)})),i},Al}function K(){if($l)return Cl;$l=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,o=document.createTextNode(""),i=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(o.data=i=++i%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(o,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,o.data=i=++i%2)}};return Cl=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 J(){return Ul?jl:(Ul=1,jl=function(e){return"function"==typeof e})}function Q(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return Xl||(Xl=1,Ru.exports=e,Ru.exports.default=e),Ru.exports}function Z(){if(Wl)return Ou;Wl=1;var e=Y(),t=function(){if(kl)return Dl;kl=1;var e=[].forEach,t=Object.create;return Dl=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Dl}(),r=function(){if(Bl)return Gl;Bl=1;var e=Fa,t=function(){if(Ml)return Fl;Ml=1;var e=J();return Fl=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Gl=function(r){return t(e(r))}}(),n=function(){if(zl)return Vl;zl=1;var e=function(){if(Hl)return ql;Hl=1;var e=J();return ql=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return""}}}();return Vl=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)}))}}(),o=Q(),i=K(),s=Object.create,a=t("then","then:finally","done","done:finally");return Xa.promise=function(t,c){var l=s(null),u=s(null),p=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(!o(n))return u[e]=n,void c.emit("setasync",e,1);l[e]=1,p[e]=n;var a=function(t){var r=l[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 l[e],u[e]=t,c.emit("setasync",e,r))},f=function(){s=!0,l[e]&&(delete l[e],delete p[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){i(f)};"function"==typeof(n=n.then((function(e){i(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,f)}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(f)}})),c.on("get",(function(e,t,r){var n;if(l[e])++l[e];else{var s=function(){c.emit("getasync",e,t,r)};o(n=p[e])?"function"==typeof n.done?n.done(s):n.then((function(){i(s)})):s()}})),c.on("delete",(function(e){if(delete p[e],l[e])delete l[e];else if(hasOwnProperty.call(u,e)){var t=u[e];delete u[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=u;u=s(null),l=s(null),p=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},Ou}async function ee(e){try{return await Rr.promises.access(e),!0}catch{return!1}}function te(e){const t=function(){if(D()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Ir.join("/Users/",process.env.SUDO_USER):Ir.join("/home/",process.env.SUDO_USER);{const e=Or.homedir();if(""===e)return;return e}}();return void 0===t?e:e.replace(Lu,t)}async function re(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 ee(e.rcPath)&&((await ku(e.rcPath,"utf8")).includes(t)||(await Du(e.rcPath,`\n${t}\n`),w(`Added ${t} to ${e.rcPath}`)))}async function ne(e,t){await ee(t)&&((await ku(t,"utf-8")).includes(e)||(await Du(t,e),w(`${e} was added to ${t}`)))}async function oe(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Uu,...r},o=function(e,t=!1){const r=t?Hu(e):e;return Ku(r,'"',"\\")}(null!=t?t:"",n.escapeSpace);try{if(zr.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void w(`Environment variable ${e} is already defined. Skipping.`);so.exportVariable(e,o)}catch(i){v(i),await ie(e,o,n)}else await ie(e,o,n)}catch(i){v(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function ie(e,t,r){const n=null!=t?t:"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await N(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void w(`${e}='${n}' was set in the environment.`)):void w(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await Fu(r),void(r.overwrite?(await Ju(r.rcPath,`\nexport ${e}="${n}"\n`),w(`${e}="${n}" was added to "${r.rcPath}`)):(await Ju(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),w(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function se(e,t={}){const r={rcPath:Uu,...t};if(!function(e){var t,r;return!!Zu.some((t=>t.test(e)))&&(null!=(r=null==(t=process.env.PATH)?void 0:t.split(Ir.delimiter))?r:[]).includes(e)}(e)){process.env.PATH=`${e}${Ir.delimiter}${process.env.PATH}`;try{if(zr.GITHUB_ACTIONS)try{so.addPath(e)}catch(n){v(n),await ae(e,r)}else await ae(e,r)}catch(n){v(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function ae(e,t){switch(process.platform){case"win32":return await N(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void w(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await Fu(t),await Qu(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void w(`"${e}" was added to "${t.rcPath}"`);default:return}}function ce(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 le(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;lp[e]=r}}function ue(e,t,r){const n=function(e){const t=lp[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}(r);return ip.pluralize(r.locale,t,n[e]).replace("{0}",t)}function pe(){if(Tf)return If;Tf=1;const e=/\s+/g;class t{constructor(r,i){if(i=n(i),r instanceof t)return r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease?r:new t(r.raw,i);if(r instanceof o)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.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&&f)|(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],T(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),i("comparator trim",e),e=e.replace(a[c.TILDETRIM],u),i("tilde trim",e),e=e.replace(a[c.CARETTRIM],p),i("caret trim",e);let m=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));s&&(m=m.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),i("range list",m);const v=new Map,g=m.map((e=>new o(e,this.options)));for(const r of g){if(h(r))return[r];v.set(r.value,r)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return r.set(t,w),w}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>v(t,r)&&e.set.some((e=>v(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(x(this.set[r],e,this.options))return!0;return!1}}If=t;const r=new Af,n=gp,o=fe(),i=hp,s=Pp,{safeRe:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:p}=mp,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=dp,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},y=(e,t)=>(i("comp",e,t),e=_(e,t),i("caret",e),e=w(e,t),i("tildes",e),e=O(e,t),i("xrange",e),e=S(e,t),i("stars",e),e),g=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(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,o,s)=>{let a;return i("tilde",e,t,r,n,o,s),g(r)?a="":g(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:g(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(i("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,i("tilde return",a),a})),_=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{i("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,n,o,s,a)=>{let c;return i("caret",e,t,n,o,s,a),g(n)?c="":g(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:g(s)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(i("replaceCaret pr",a),c="0"===n?"0"===o?`>=${n}.${o}.${s}-${a} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s}-${a} <${+n+1}.0.0-0`):(i("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${s}${r} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s} <${+n+1}.0.0-0`),i("caret return",c),c}))},O=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>(e=e.trim()).replace(t.loose?a[c.XRANGELOOSE]:a[c.XRANGE],((r,n,o,s,a,c)=>{i("xRange",e,r,n,o,s,a,c);const l=g(o),u=l||g(s),p=u||g(a);return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(u&&(s=0),a=0,">"===n?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",u?o=+o+1:s=+s+1),"<"===n&&(c="-0"),r=`${n+o}.${s}.${a}${c}`):u?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:p&&(r=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),i("xRange return",r),r})),S=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),I=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),T=e=>(t,r,n,o,i,s,a,c,l,u,p,f)=>`${r=g(n)?"":g(o)?`>=${n}.0.0${e?"-0":""}`:g(i)?`>=${n}.${o}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=g(l)?"":g(u)?`<${+l+1}.0.0-0`:g(p)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${p}-${f}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),x=(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(i(e[r].semver),e[r].semver!==o.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 If}function fe(){if(Pf)return xf;Pf=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,o){if(o=r(o),n instanceof t){if(n.loose===!!o.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,o),this.options=o,this.loose=!!o.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[o.COMPARATORLOOSE]:n[o.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 i(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("="))&&!(i(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}xf=t;const r=gp,{safeRe:n,t:o}=mp,i=wf,s=hp,a=Pp,c=pe();return xf}function de(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{a(n.next(e))}catch(t){o(t)}}function s(e){try{a(n.throw(e))}catch(t){o(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(i,s)}a((n=n.call(e)).next())}))}function he(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,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&i[3]>r[1])){a.label=r[1];break}if(6===r[0]&&i[1]>a.label){a.label=i[1],i=r;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,o,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function me(e){return null==e?[]:Array.isArray(e)?e:[e]}function ve(e,t,r,n){var o,i=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*(o=+r)==0?o:r),!!r)):0*(o=+r)==0?o:r;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s]}async function ye(e,t,r,n=40){zr.GITHUB_ACTIONS?await async function(e,t,r=40){await U("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Fu(r),await Ud(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function ge(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 we(){return null!==oa.sync("nala",{nothrow:!0})}function Ee(){let e;return e=we()?"nala":"apt-get",e}function _e(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function be(e){try{const{stdout:t}=await P("dpkg",["-s",e],{env:ge("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Oe(e,t=Ee()){return(await Promise.all(e.map((e=>Re(e,t))))).filter((e=>void 0!==e))}async function Re(e,t=Ee()){const r=await async function(e,t,r){switch(await Se(e,t,r)){case Bd.NameDashVersion:return`${t}-${r}`;case Bd.NameEqualsVersion:return`${t}=${r}`;case Bd.Name:return void 0!==r&&""!==r&&y(`Could not find package ${t} with version ${r}. Installing the latest version.`),t;default:throw Error(`Could not find package ${t} ${null!=r?r:""}`)}}(t,e.name,e.version);return await be(r)?void 0:r}async function Se(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await P("apt-cache",["search","--names-only",`^${_e(t)}-${_e(r)}$`],{env:ge(e),stdio:"pipe"});if(""!==n.trim())return Bd.NameDashVersion;try{const{stdout:n}=await P("apt-cache",["show",`${t}=${r}`],{env:ge(e)});if(""===n.trim())return Bd.NameEqualsVersion}catch{}}try{const{stdout:r}=await P("apt-cache",["show",t],{env:ge(e),stdio:"pipe"});if(""!==r.trim())return Bd.Name}catch{}return Md?Bd.None:(Gd(e),Se(e,t,r))}async function Ie(e,t=!1){const r=Ee();for(const{name:i,version:s}of e)w(`Installing ${i} ${null!=s?s:""} via ${r}`);t&&Gd(r),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=Ee()){await Hd(t),await async function(e){await be("software-properties-common")||j(e,["install","-y","--fix-broken","-o",Fd,"software-properties-common"],{...ca,env:ge(e)})}(t),j("add-apt-repository",["-y","--no-update",e],{...ca,env:ge(t)}),Gd.clear(),Gd(t)}(t,e))))}(r,e);const n=await Oe(e,r);if(0===n.length)return w("All packages are already installed"),{binDir:"/usr/bin/"};await Hd(r);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?Te(t):async function({key:e,keyServer:t=Xd,fileName:r,keyStorePath:n=Xd}){try{Pe(r);const o=Ir.join(n,r);return await ee(o)||(xe(),await U("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await U("chmod",["644",o])),o}catch(o){return void y(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),j(r,["install","--fix-broken","-y",...n],{...ca,env:ge(r)})}catch(o){if(!function(e){return"string"==typeof e.stderr}(o))throw o;Vd.some((e=>o.stderr.includes(e)))&&(y(`Failed to install packages ${n}. Retrying...`),j(r,["install","--fix-broken","-y","-o",Fd,...n],{...ca,env:ge(r)}))}return{binDir:"/usr/bin/"}}async function Te({keyUrl:e,fileName:t,keyStorePath:r=zd}){try{Pe(t);const n=Ir.join(r,t);if(!(await ee(n))){xe(),await Ie([{name:"ca-certificates"}]);const r=Ir.join(Or.tmpdir(),t),o=new jd.DownloaderHelper(e,Or.tmpdir(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),j("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),j("chmod",["644",n])}return n}catch(n){return void y(`Failed to add apt key via download ${e}: ${n}`)}}function xe(){j("gpg",["-k"])}function Pe(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function Ae(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof Wd)return{binDir:Wd};const t=await oa("brew",{nothrow:!0});if(null!==t)return Wd=Ir.dirname(t),{binDir:Wd};await Ie([{name:"ca-certificates"}]);const r=new jd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",Or.tmpdir(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),A("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),Wd=Ne(),await se(Wd,e.rcOptions),{binDir:Wd}}function Ne(){return Ir.join(Ce(),"bin")}function Ce(){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")}async function $e(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};w(`Installing ${e} ${null!=t?t:""} via brew`),Zd&&null!==oa.sync("brew",{nothrow:!0})||(await Ae(),Zd=!0);const o=Ne(),i=Ir.join(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return n.overwrite&&s.push("--overwrite"),n.cask&&s.push("--cask"),A(i,s,{stdio:"inherit"}),{binDir:o}}function Le(){return"linux"===process.platform&&(void 0===Yd&&(Yd=null!==oa.sync("dnf",{nothrow:!0})),Yd)}function De(){return"linux"===process.platform&&(void 0===Kd&&(Kd=null!==oa.sync("pacman",{nothrow:!0})),Kd)}function ke(){return"linux"===process.platform&&(void 0===Jd&&(Jd=null!==oa.sync("apt-get",{nothrow:!0})),Jd)}async function je(e,t,r){var n;if("win32"!==process.platform)return;if("string"==typeof Qd)return{binDir:Qd};const o=oa.sync("choco",{nothrow:!0});if(null!==o)return Qd=Ir.dirname(o),{binDir:Qd};let i="powershell.exe";const s=oa.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==s&&(i=s),A(i,["-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 se(a,cy);const c=oa.sync("choco",{nothrow:!0});return Qd=null!==c?Ir.dirname(c):(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin",await ee(Qd)?{binDir:Qd}:void 0}async function Ue(e,t,r=[]){var n;w(`Installing ${e} ${null!=t?t:""} via chocolatey`),eh&&null!==oa.sync("choco",{nothrow:!0})||(await je(0,0,process),eh=!0);const o=process.env.PATH,i={...process.env};if(i.TMP=void 0,i.TEMP=void 0,i.Path=void 0,i.PATH=o,void 0!==t&&""!==t)A("choco",["install","-y",e,"--version="+t,...r],{env:i,extendEnv:!1,stdio:"inherit"});else try{A("choco",["install","-y",e,...r],{env:i,extendEnv:!1,stdio:"inherit"})}catch(a){if(!a.message.includes("exit code 3010"))throw a;w(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 se(s,cy),{binDir:s}}async function Fe(e){for(const{name:t,version:r}of e)w(`Installing ${t} ${null!=r?r:""} via dnf`);return j("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:r}=await P("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;{const{stdout:r}=await P("dnf",["search","-q",`${e}${t}`]);if(""!==r.trim())return`${e}${t}`;y(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function Me(e,t,r){w(`Installing ${e} ${null!=t?t:""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===oa.sync("yay",{nothrow:!0}))try{j("pacman",["-S","--noconfirm","base-devel","git"]);const e=Ir.join(Or.tmpdir(),"yay");j("mkdir",["-p",e]),L()?(y("Creating a non-root user to build yay"),j("useradd",["-m","-G","wheel","builder"]),j("passwd",["-d","builder"]),j("chown",["-R","builder:builder",e]),j("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),oh=!0,A("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),A("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(A("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:Or.tmpdir()}),A("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),A("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),th||"yay"===r||(j(n,["-Sy","--noconfirm"]),th=!0),rh||"yay"===r||(j(n,["-S","--noconfirm","base-devel"]),rh=!0);const o=e=>"yay"===r?L()&&oh?j("su",["-","builder","-c","yay -S --noconfirm "+e]):A(r,["-S","--noconfirm",e]):j(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 P(e,["-Si",t]);for(const e of n.matchAll(nh))r.push(e[1])}catch(n){y(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{o(`${e}=${t}`)}catch{o(`${e}${t}`)}else w(`Failed to install ${e} ${t} via pacman, trying without version`),o(e)}else o(e);return{binDir:"/usr/bin/"}}function Ge(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 Be(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function qe(e,t=!0){return t?Ir.basename(e):Ir.basename(e,Ir.extname(e))}function He(e){return Ir.normalize(e).replace(RegExp(_e(Ir.sep)+"$"),"")}function Ve(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function ze(e,t){const r=Ir.extname(e),n=`${t}${Ir.basename(e,r)}${r}`;return Ir.join(Ir.dirname(e),n)}function Xe(e,t){const r=Ir.extname(e),n=`${Ir.basename(e,r)}${t}${r}`;return Ir.join(Ir.dirname(e),n)}function We(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ye(e){return"win32"===process.platform?e:"./"+e}function Ke(e){const t=Ir.extname(e).length;return e.slice(0,-t)}function Je(e,t){return sh(e,t)}function Qe(e,t){const r=Ir.relative(t,e);return!(!r||".."===r||r.startsWith(".."+Ir.sep)||r===Ir.resolve(e))}function Ze(e){return Ah(this,void 0,void 0,(function*(){if($h.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield $h.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function et(e){return Ah(this,void 0,void 0,(function*(){Nh.ok(e,"a path argument must be provided"),yield $h.mkdir(e,{recursive:!0})}))}function tt(e){return Ah(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if($h.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(Ch.delimiter))e&&t.push(e);if($h.isRooted(e)){const r=yield $h.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(Ch.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(Ch.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield $h.tryGetExecutablePath(Ch.join(o,e),t);r&&n.push(r)}return n}))}function rt(e,t,r,n){return Ah(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield et(t);const o=yield $h.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield $h.lstat(o)).isDirectory()?yield rt(o,s,r,n):yield nt(o,s,n)}yield $h.chmod(t,(yield $h.stat(e)).mode)}))}function nt(e,t,r){return Ah(this,void 0,void 0,(function*(){if((yield $h.lstat(e)).isSymbolicLink()){try{yield $h.lstat(t),yield $h.unlink(t)}catch(n){"EPERM"===n.code&&(yield $h.chmod(t,"0666"),yield $h.unlink(t))}const r=yield $h.readlink(e);yield $h.symlink(r,t,$h.IS_WINDOWS?"junction":null)}else(yield $h.exists(t))&&!r||(yield $h.copyFile(e,t))}))}function ot(e,t,r){return lm(this,void 0,void 0,(function*(){const n=pm.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=n[0];return t=n.slice(1).concat(t||[]),new pm.ToolRunner(o,t,r).exec()}))}function it(e,t){const r=[];t=t||Tm.arch();const n=xm.join(pt(),e);if(Sm.existsSync(n)){const e=Sm.readdirSync(n);for(const o of e)if(lt(o)){const e=xm.join(n,o,t||"");Sm.existsSync(e)&&Sm.existsSync(e+".complete")&&r.push(o)}}return r}function st(e){return _m(this,void 0,void 0,(function*(){return e||(e=xm.join(ft(),Lm.default())),yield Rm.mkdirP(e),e}))}function at(e,t,r){return _m(this,void 0,void 0,(function*(){const n=xm.join(pt(),e,Am.clean(t)||t,r||"");Om.debug("destination "+n);const o=n+".complete";return yield Rm.rmRF(n),yield Rm.rmRF(o),yield Rm.mkdirP(n),n}))}function ct(e,t,r){const n=xm.join(pt(),e,Am.clean(t)||t,r||"");Sm.writeFileSync(n+".complete",""),Om.debug("finished caching tool")}function lt(e){const t=Am.clean(e)||"";Om.debug("isExplicit: "+t);const r=null!=Am.valid(t);return Om.debug("explicit? "+r),r}function ut(e,t){let r="";Om.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Am.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Am.satisfies(o,t)){r=o;break}}return Om.debug(r?"matched: "+r:"match not found"),r}function pt(){const e=process.env.RUNNER_TOOL_CACHE||"";return $m.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function ft(){const e=process.env.RUNNER_TEMP||"";return $m.ok(e,"Expected RUNNER_TEMP to be defined"),e}function dt(e,t){const r=Vr[e];return void 0!==r?r:t}function ht(e,t){if(!e||!t)throw Error("retry-as-promised must be passed a callback and a options set");const r={$current:"$current"in(t="number"==typeof t?{max:t}:t)?t.$current:1,max:t.max,timeout:t.timeout||void 0,match:t.match?Array.isArray(t.match)?t.match:[t.match]:[],backoffBase:void 0===t.backoffBase?100:t.backoffBase,backoffExponent:t.backoffExponent||1.1,report:t.report,name:t.name||e.name||"unknown"};return r.match&&!Array.isArray(r.match)&&(r.match=[r.match]),r.report&&r.report("Trying "+r.name+" #"+r.$current+" at "+(new Date).toLocaleTimeString(),r),new Promise((function(t,n){let o,i,s;r.timeout&&(o=setTimeout((function(){i&&clearTimeout(i),n(new Hm(r.name+" timed out",s))}),r.timeout)),Promise.resolve(e({current:r.$current})).then(t).then((function(){o&&clearTimeout(o),i&&clearTimeout(i)})).catch((function(a){o&&clearTimeout(o),i&&clearTimeout(i),s=a,r.report&&r.report(a&&""+a||a,r,a);var c=r.max>r.$current;if(!c)return n(a);if(c=0===r.match.length||r.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,a)})),!c)return n(a);var l=r.backoffBase*Math.pow(r.backoffExponent,r.$current-1);r.$current++,r.report&&r.report(`Retrying ${r.name} (${r.$current})`,r),l?(r.report&&r.report(`Delaying retry of ${r.name} by ${l}`,r),i=setTimeout((function(){ht(e,r).then(t).catch(n)}),l)):ht(e,r).then(t).catch(n)}))}))}function mt(e,t,r){switch(process.platform){case"win32":return Ue("7zip",e);case"darwin":return $e("p7zip",e);case"linux":if(De())return Me("p7zip",e);if(Le())return Fe([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(ke())return Ie([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function vt(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||y(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function yt(e,t){return await P(await async function(){return void 0===zm&&(null===oa.sync("7z",{nothrow:!0})&&await mt("",0,process),zm="7z"),zm}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await B(t),t}function gt(e,t){return yt(e,t)}async function wt(e,t){return null!==oa.sync("7z",{nothrow:!0})?yt(e,t):null!==oa.sync("unzip",{nothrow:!0})?(await P("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await B(t),t):yt(e,t)}async function Et(e,t,r=0,n=[]){await async function(e){switch(w("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(De()?(await Me("gzip"),await Me("tar")):Le()?await Fe([{name:"gzip"},{name:"tar"}]):ke()&&await Ie([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(De()?(await Me("xz"),await Me("tar")):Le()?await Fe([{name:"xz"},{name:"tar"}]):ke()&&await Ie([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(vt(e));try{await Lh(t)}catch{}try{await P("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&y(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await B(t),t}async function _t(e,t,r,n,o){var i,s;w(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=null!=(i=process.env.RUNNER_TEMP)?i:Or.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:Ir.join(Or.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:l,extractedFolderName:u,extractFunction:p}=await r(t,process.platform,o);if(zr.GITHUB_ACTIONS)try{const r=Bm(e,t);if(r){const n=Ir.join(r,u),o=Ir.join(n,c);if(await ee(Ir.join(o,l)))return w(`${e} ${t} was found in the cache at ${o}.`),await se(o,cy),{installDir:n,binDir:o}}}catch{}const f=Ir.join(n,u),d=Ir.join(f,c),h=Ir.join(d,l);return await async function(e,t,r,n,o,i,s,a){if((await Promise.all([ee(e),ee(t)])).includes(!1))try{const e=await async function(e,t,r){w(`Download ${e} ${t}`);const n=await Vm((()=>{var e;const t=Ir.join(null!=(e=process.env.RUNNER_TEMP)?e:Or.tmpdir(),`${Date.now()}-${Ir.basename(r)}`);return Mm(r,t)}),{name:r,max:4,backoffBase:2e3,report:e=>w(e)});return n}(r,n,o);w(`Extracting ${e} to ${i}`);const t=null!=s?s:function(e){switch(e){case 0:case 1:case 2:return Et;case 3:return wt;default:return yt}}(vt(o));await t(e,i)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${o}: ${c}`)}if(w(`Add ${e} to PATH`),await se(e,cy),!(await ee(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await ps(t,"755")}catch(c){y(`Failed to make ${t} executable: ${c}`)}}(d,h,e,t,a,n,p,o),await async function(e,t,r){zr.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==_r("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await Gm(e,t,r))}(n,e,t),{installDir:f,binDir:d}}function bt(e,t,r){var n;const o=null!=(n=Sf(e))?n:e;switch(t){case"win32":{const t=ff(o,"v3.19.6");let n;gh.includes(r)?n=t?"win64-x64":"windows-x86_64":wh.includes(r)?n=t?"win32-x86":"windows-i386":Eh.includes(r)?n="windows-arm64":(w(`Trying unsupported arch '${r}' for cmake on Windows`),n="windows-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:Ve("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${ff(o,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:Ve("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=ff(o,"v3.19.8");let n;Eh.includes(r)?n=t?"Linux-aarch64":"linux-aarch64":gh.includes(r)?n=t?"Linux-x86_64":"linux-x86_64":(w(`Trying unsupported arch '${r}' for cmake on Linux`),n="linux-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:Ve("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function Ot(e,t,r){return _t("cmake",e,bt,t,r)}async function Rt(e,t,r=cv){const n=await async function(e,t=cv){var r,n;try{const o=await exports.getExecOutput_1(e,["--version"]),i=null==(r=(o.stdout||o.stderr||"").trim().match(t))?void 0:r[1];return null!=(n=Sf(i))?n:void 0}catch(o){return void console.error(o)}}(e,r);return void 0!==n&&""!==t&&-1!==zp(n,t)}function St(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function It(e,t,r){const n=await async function(e,t,r){let n,o=await Tt(t);if(void 0!==o){const e=Ir.dirname(o);n={bin:o,installDir:e,binDir:e}}else{if(zr.GITHUB_ACTIONS)try{w("Installing python in GitHub Actions");const{setupActionsPython:i}=await Promise.resolve().then((()=>require("./assets/actions_python-BF80bhWt.js")));if(await i(e,t,r),o=await Tt(t),void 0===o)throw Error("Python binary could not be found");const s=Ir.dirname(o);n={bin:o,installDir:s,binDir:s}}catch(i){y(""+i)}void 0===n&&(n=await async function(e,t){let r;switch(process.platform){case"win32":{e?await Ue("python3",t,["--params=/InstallDir:"+e]):await Ue("python3",t);const n=await Tt(e);if(void 0===n)throw Error("Python binary could not be found");const o=Ir.dirname(n);await se(o,cy),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await $e("python3",t);const e=await P("brew",["--prefix","python"],{stdio:"pipe"}),n=Ir.join(e.stdout,"libexec","bin");await se(n,cy);break}case"linux":if(De())r=await Me("python",t);else if(Le())r=await Fe([{name:"python3",version:t}]);else{if(!ke())throw Error("Unsupported linux distributions");r=await Ie([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return r}(t,e))}if(void 0===o||void 0===n.bin){if(o=await Tt(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:Ir.dirname(o),binDir:Ir.dirname(o)}}return n}(e,t,r);Dr(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await Pt();return void 0===t?(w("pip was not found. Installing pip"),await async function(e){await Nt(e)||(await Ut("pip"),await Nt(e))}(e),Pt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await jt(e)))try{await kt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===Ut("pipx",!1))throw Error("pipx was not installed correctly "+t)}await P(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await kt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){y(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await kt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await kt(e,"wheel",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1})}catch(t){y(`Failed to install setuptools or wheel: ${""+t}. Ignoring...`)}}(o),n}async function Tt(e){for(const t of["python3","python"]){const r=await xt(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Ir.parse(Or.homedir()).root,t=(await _s(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await xt(t,Ir.join(e,r));if(void 0!==n)return n}}}async function xt(e,t){var r;try{if(void 0!==t){const r=Ir.join(t,Ve(e));if(await ee(r)&&await Rt(r,fv))return r}const n=null!=(r=await oa(e,{nothrow:!0,all:!0}))?r:[];for(const e of n)if(await Rt(e,fv))return e}catch{}}async function Pt(){for(const e of["pip3","pip"]){const t=await At(e);if(void 0!==t)return t}}async function At(e){var t;try{const r=null!=(t=await oa(e,{nothrow:!0,all:!0}))?t:[];for(const e of r)if(await Rt(e,pv))return e}catch{}}async function Nt(e){try{return await P(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){w(""+t);try{return await P(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){w(""+r)}}return!1}function Ct(e,t,r=null){var n;return $t(t)&&"linux"===process.platform&&null!==r&&e in dv?function(e,t){const r=e[0],n=Object.keys(t).map((e=>Number.parseInt(e,10))).sort(((e,t)=>t-e)).find((e=>r>=e));return void 0===n?"":t[n]}(r,dv[e]):$t(t)&&e in uv?null!=(n=uv[e])?n:"":"true"===t?"":null!=t?t:""}function $t(e){return"true"===e||void 0===e}function Lt(){if(!("version"in Or)||"function"!=typeof Or.version)return null;const e=Or.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 Dt(e,t,r={}){return kt(await _v(),e,t,r)}async function kt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await jt(e),l=c?"pipx":"pip",u=await async function(e,t){return 0===(await P(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,t);if(u)try{so.info(`Installing ${t} ${null!=r?r:""} via ${l}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,o=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&i?["--user"]:[],u=process.env;c&&i&&(u.PIPX_HOME=await wv(),u.PIPX_BIN_DIR=await Ev()),A(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(d){if(so.info(`Failed to install ${t} via ${l}: ${d}.`),null===await Ut(t))throw Error(`Failed to install ${t} via ${l}: ${d}.`)}else if(null===await Ut(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);const p=await hv(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>ee(Ir.join(e,Ve(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=oa.sync(Ve(t),{nothrow:!0});return null!==n?Ir.dirname(n):e[e.length-1]}(p,t);return await se(f,cy),{binDir:f}}async function jt(e){return 0===(await P(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Ut(e,t=!0){if("linux"===process.platform){if(so.info(`Installing ${e} via the system package manager`),De())return Me(t?"python-"+e:e);if(Le())return Fe([{name:t?"python3-"+e:e}]);if(ke())return Ie([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return $e(e);return null}async function Ft(e,t,r){switch(process.platform){case"win32":return await Ue("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await se(e,cy),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return $e("graphviz",e);case"linux":if(De())return Me("graphviz",e);if(Le())return Fe([{name:"graphviz",version:e}]);if(ke())return Ie([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Mt(e,t){const{ArchiveHdi:r}=await Promise.resolve().then((()=>require("./assets/hdi-HMjVj8JE.js"))),n=new r(e);await n.read((async e=>{await e.extract(Ir.join(t,e.path))}))}function Gt(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:Ve("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:Ve("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:Ve("doxygen"),extractedFolderName:t,extractFunction:Mt,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Bt(){if("darwin"===process.platform)try{const e=await exports.getExecOutput_1("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await oe("SDKROOT",t.trim(),cy):v("SDKROOT not set")}catch(e){v(e)}}async function qt(e){const t=await bs(e,"utf-8");return JSON.parse(t)}function Ht(e,t){const r=Object.keys(e),n=new Map;if(void 0===t.filterMapTag)for(const i of r)n.set(i,i);else for(const i of r){const e=t.filterMapTag(i);void 0!==e&&n.set(e,i)}if(0===n.size)return;const o=[];for(const[i,s]of n.entries())i.startsWith(t.version)&&o.push(s);if(0!==o.length)for(const i of o){let r=e[i];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=Vt(i,r,t);if(void 0!==n)return n}}function Vt(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 o of t)r.keywords.every((e=>o.includes(e)))&&n.push(o);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)e.includes(n)&&t++;return t})),o=Math.max(...t);return{tag:e,name:n[t.indexOf(o)]}}return{tag:e,name:n[0]}}}async function zt(e,t,r){var n;if("win32"===t){const t=Ht(await qt(Ir.join(Rv,"github_brechtsanders_winlibs_mingw.json")),{version:e,keywords:[null!=(n={x64:"x86_64",ia32:"i386"}[r])?n:r]});if(void 0===t)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:Ve("g++"),extractedFolderName:"mingw64",extractFunction:yt,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${t.tag}/${t.name}`}}throw Error(`Unsupported platform '${t}'`)}async function Xt(e,t,r,n=40){let o;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||await Ue("gcc-arm-embedded",e);try{o=await _t("g++",e,zt,t,r)}catch(i){w(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),o=await async function(e,t){var r,n;let o;if(await Ue("mingw",e),"x64"===t&&await ee("C:/tools/mingw64/bin")?(o="C:/tools/mingw64/bin",await se(o,cy)):"ia32"===t&&await ee("C:/tools/mingw32/bin")?(o="C:/tools/mingw32/bin",await se(o,cy)):await ee((null!=(r=process.env.ChocolateyInstall)?r:"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(o=(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin"),void 0!==o)return{binDir:o}}(e,r)}break;case"darwin":o=await $e("gcc",e);break;case"linux":"x64"===r?De()?o=await Me("gcc",e):Le()?o=await Fe([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):ke()&&(o=""===e?await Ie([{name:"gcc"},{name:"g++"}]):await Ie([{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"}}])):(w(`Install g++-multilib because gcc for ${r} was requested`),De()?o=await Me("gcc-multilib",e):ke()&&(o=""===e?await Ie([{name:"gcc-multilib"}]):await Ie([{name:"gcc-multilib",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!==o)return await async function(e,t,r=40){var n;const o=[];if("win32"===process.platform)o.push(oe("CC",Ve(t+"/gcc"),cy),oe("CXX",Ve(t+"/g++"),cy));else{let s=e;""===e&&(s=await async function(e,t){try{let r="gcc";if(await ee(e+"/gcc"))r=e+"/gcc";else{const t=(await _s(e)).sort(((e,t)=>{var r,n,o,i;return function(e,t){const r=Sf(e),n=Sf(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(null!=(n=null==(r=e.match(/^gcc-?(.*)(\.exe)?$/))?void 0:r[1])?n:"",null!=(i=null==(o=t.match(/^gcc-?(.*)(\.exe)?$/))?void 0:o[1])?i:"")}));for(const n of t)if(n.startsWith("gcc")){r=`${e}/${n}`;break}}const{stdout:n}=await P(r,["--version"],{stdio:"pipe"}),o=n.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(y("Failed to parse gcc version from: "+n),t)}catch(i){return v("Failed to get gcc version: "+i),t}}(t,s),w("Using gcc version "+s));const a=Mp(null!=(n=Sf(s))?n:s);5>a?(o.push(oe("CC",`${t}/gcc-${s}`,cy),oe("CXX",`${t}/g++-${s}`,cy)),ke()&&o.push(ye("cc",`${t}/gcc-${s}`,cy,r),ye("cxx",`${t}/g++-${s}`,cy,r),ye("gcc",`${t}/gcc-${s}`,cy,r),ye("g++",`${t}/g++-${s}`,cy,r))):(o.push(oe("CC",`${t}/gcc-${a}`,cy),oe("CXX",`${t}/g++-${a}`,cy)),ke()&&o.push(ye("cc",`${t}/gcc-${a}`,cy,r),ye("cxx",`${t}/g++-${a}`,cy,r),ye("gcc",`${t}/gcc-${a}`,cy,r),ye("g++",`${t}/g++-${a}`,cy,r)))}o.push(Bt()),zr.GITHUB_ACTIONS&&await async function(){const e=Ir.join(Rv,"gcc_matcher.json");if(!(await ee(e)))return y("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}(),await Promise.all(o)}(e,o.binDir,n),o}async function Wt(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return Xt(e,t,r);case"linux":De()?n=await Me("mingw-w64-gcc",e):Le()?n=await Fe([{name:"mingw64-gcc",version:e}]):ke()&&(n=await Ie([{name:"mingw-w64",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!==n)return n}function Yt(e){const t=Lp(e),r=null!==t?Mp(t):e;return oe("GCOV",""!==r?"gcov-"+r:"gcov",cy)}function Kt(e,t,r){const n=function(e,t){switch(e){case"win32":return gh.includes(t)||wh.includes(t)?"win":Eh.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return gh.includes(t)||wh.includes(t)?"linux":Eh.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:Ve("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function Jt(e,t,r){return _t("ninja",e,Kt,t,r)}function Qt(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:Ve("kcov")}}function Zt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:Ve("kcov"),extractFunction:er}}async function er(e,t){const r=await Et(e,t,1),n=await async function(){let e=oa.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await Ot(Ct("cmake",void 0,await gv()),Ir.join(te("~"),"cmake"),"");e=Ir.join(t,"cmake")}return null===oa.sync("ninja",{nothrow:!0})&&await Jt(Ct("ninja",void 0,await gv()),Ir.join(te("~"),"ninja"),""),e}();"linux"===process.platform&&(De()?await Promise.all([Me("libdwarf"),Me("libcurl-openssl")]):Le()?await Fe([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):ke()&&await Ie([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==oa.sync("patch",{nothrow:!0})){const e=Ir.join(Sv,"gcc13.patch");await P("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else w("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const o=Ir.join(r,"build");return await P(n,["-S",r,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await P(n,["--build",o,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function tr(){"darwin"===process.platform&&(null!==await oa("clang",{nothrow:!0})&&null!==await oa("clang++",{nothrow:!0})&&(g("Assuming clang is an Apple Clang compiler"),await Promise.all([oe("CC","clang",cy),oe("CXX","clang++",cy)])),Mr.error("Apple Clang automatic installation is not supported yet"))}function rr(e){return Object.values(Fv).includes(e)?e:e in Fv?Fv[e]:e}function nr(e){if(Object.keys(Fv).includes(e))return e;for(const[t,r]of Object.entries(Fv))if(r===e)return t;return e}function or(e){const t=rr(e);let r;if(t){const e=t.split(".")[0]+".9";r=`-version "${t},${e}"`}else r="-latest";let n=function(e,t){try{return(""+Nv.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Av.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Cv.existsSync(n))return Av.info("Found with vswhere: "+n),n;Av.info("Not found with vswhere");const o=e?[nr(e)]:Uv;for(const i of kv)for(const e of o)for(const t of jv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Av.info("Trying standard location: "+n),Cv.existsSync(n))return Av.info("Found standard location: "+n),n;if(Av.info("Not found in standard locations"),n=Dv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Cv.existsSync(n))return Av.info("Found VS 2015: "+n),n;throw Av.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function ir(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function sr(e,t,r,n,o,i,s){void 0!==t&&await ee(t)&&(w(`Adding ${t} to PATH`),await oe("VCTargetsPath",t,cy)),await qv(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),o,n,i,s,e)}async function ar(e,t,r,n,o,i,s,a=12e5){so.startGroup(`Installing ${e} ${t}`);try{await function(e,t){const{milliseconds:r,fallback:n,message:o,customTimers:i={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(t.signal){const{signal:e}=t;e.aborted&&c(Pv(e)),e.addEventListener("abort",(()=>{c(Pv(e))}))}if(r===1/0)return void e.then(a,c);const l=new Iv;s=i.setTimeout.call(void 0,(()=>{if(n)try{a(n())}catch(t){c(t)}else"function"==typeof e.cancel&&e.cancel(),!1===o?a():o instanceof Error?c(o):(l.message=null!=o?o:`Promise timed out after ${r} milliseconds`,c(l))}),r),(async()=>{try{a(await e)}catch(t){c(t)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{i.clearTimeout.call(void 0,s),s=void 0},a}(async function(e,t,r,n,o,i){const s=oy.includes(e);let a;if("vcvarsall"===e)await sr(Ct(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Ae({rcOptions:cy});else{const i=Ir.join(o,s?"llvm":e),c=Ct(e,t,r),l=iy[e];a=await l(c,i,n)}i.push(br(e,a))}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(c){v(c),c instanceof Error&&void 0!==c.stack&&v(c.stack),s.push(e+" failed to install")}so.endGroup()}async function cr(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:o}=await async function(e,t){const r=[],n=[];switch(e){case"win32":gh.includes(t)?r.push("win64"):wh.includes(t)?r.push("win32"):Eh.includes(t)?r.push("woa64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"linux":if(r.push("linux"),ke()){n.push("ubuntu");const e=await gv();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 Le()&&n.push("rhel");gh.includes(t)?r.push("x86_64"):wh.includes(t)?r.push("x86"):Eh.includes(t)?r.push("aarch64"):_h.includes(t)?r.push("armv7a"):bh.includes(t)?r.push("powerpc64le"):Oh.includes(t)?r.push("sparc64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),gh.includes(t)?r.push("x86_64"):Eh.includes(t)?n.push("arm64"):(w(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),gh.includes(t)?r.push("amd64"):wh.includes(t)?r.push("i386"):(w(`Using arch ${t} for LLVM`),r.push(t));break;default:w(`Using ${e} ${t} for LLVM`),n.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),i=Ht(await qt(Ir.join(Vv,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:o,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==i)return`https://github.com/llvm/llvm-project/releases/download/${i.tag}/${i.name}`;const s=Ht(await qt(Ir.join(Vv,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:o});if(void 0!==s)return`https://llvm.org/releases/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${o}`)}(t,r,e);return w("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:Ve("clang"),extractFunction:"win32"===t?gt:(e,t)=>Et(e,t,1)}}async function lr(e,t,r){var n;const o=await Xv(e,t,r);return await async function(e,t){var r,n;const o=null!=(r=process.env.LD_LIBRARY_PATH)?r:"",i=null!=(n=process.env.DYLD_LIBRARY_PATH)?n:"",s=dr(t),a=[oe("CC",Ve(e+"/bin/clang"),cy),oe("CXX",Ve(e+"/bin/clang++"),cy),oe("LLVM_PATH",e,cy),oe("LD_LIBRARY_PATH",`${o}${Ir.delimiter}${e}/lib`,cy),oe("DYLD_LIBRARY_PATH",`${i}${Ir.delimiter}${e}/lib`,cy),oe("LLVM_LDFLAGS","-L"+St(e+"/lib"),cy),oe("LLVM_CPPFLAGS","-I"+St(e+"/include"),cy),await ee(`${e}/lib/clang/${t}/include`)?oe("LLVM_CPATH",`${e}/lib/clang/${t}/include`,cy):await ee(`${e}/lib/clang/${s}/include`)?oe("LLVM_CPATH",`${e}/lib/clang/${s}/include`,cy):Promise.resolve(),oe("LIBRARY_PATH",e+"/lib",cy),Bt()];if(ke()){const t=60;a.push(ye("cc",e+"/bin/clang",cy,t),ye("cxx",e+"/bin/clang++",cy,t),ye("clang",e+"/bin/clang",cy),ye("clang++",e+"/bin/clang++",cy),ye("lld",e+"/bin/lld",cy),ye("ld.lld",e+"/bin/ld.lld",cy),ye("llvm-ar",e+"/bin/llvm-ar",cy))}await Promise.all(a)}(null!=(n=o.installDir)?n:t,e),o}function ur(e,t,r){return fr(e,t,r,Hv.ClangFormat)}function pr(e,t,r){return fr(e,t,r)}async function fr(e,t,r,n=Hv.All){const o=dr(e);try{if(ke())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Ie([{name:"ca-certificates"}]);const n=new jd.DownloaderHelper("https://apt.llvm.org/llvm.sh",Or.tmpdir(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await bs(n.getDownloadPath(),"utf-8"),i=Ir.join(Or.tmpdir(),"llvm-setup-cpp.sh"),s=await async function(e,t,r,n){let o=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);return o=function(e){return e.replace(/add-apt-repository "\${REPO_NAME}"/g,`add-apt-repository -y -n "\${REPO_NAME}"\napt-get update -o ${Fd} -y`)}(o),o=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,o,r),o=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${Fd} -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 P("dpkg",["-l",e],{env:ge("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(Mr.info("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return we()?e.replace(/apt-get/g,"nala"):e}(o),await Cs(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Ie(s),await ps(i,"755"),await U("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await se(r+"/bin",cy),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(o,n)}catch(s){w("Failed to install llvm via system package manager "+s)}const i=await _t("llvm",e,cr,t,r);return await Wv(o),i}function dr(e){const t=function(e){if(null===Lp(e))try{const t=Sf(e);if(null!==t)return w(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e);return Number.parseInt(t.split(".")[0],10)}async function hr(){if(zr.GITHUB_ACTIONS){const e=Ir.join(zv,"llvm_matcher.json");if(!(await ee(e)))return y("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}}async function mr(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Mv(e);w(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=Bv(s);l=!0,w("Found the pre-installed version of MSVC at "+e)}catch{}if(!l)try{"14.0"===s?(a="14.0",await Ue("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 Ue("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 Ue("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 Ue("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):v(`The given MSVC versions ${e} is not supported yet.`)}catch(u){v(u)}await sr(s,c,r,a,n,o,i),zr.GITHUB_ACTIONS&&await async function(){const e=Ir.join(Kv,"msvc_matcher.json");if(!(await ee(e)))return y("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");w("::add-matcher::"+e)}()}async function vr(e,t,r){if("win32"===process.platform)return await Ue("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await se(e,cy),e}()}}function yr(e,t,r){return{url:gr(t,r,e),binRelativeDir:"",binFileName:Ve("pwsh"),extractedFolderName:""}}function gr(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 wr(e,t,r){try{return await _t("pwsh",e,yr,t,r)}catch(n){return v(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Ue("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await se(t,cy),{binDir:t}}case"darwin":return $e("powershell",e,{cask:!0,overwrite:!1});case"linux":if(De())return Me("powershell-bin",e,"yay");if(Le())return await Fe([{name:"curl"}]),j("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),Fe([{name:"powershell",version:e}]);if(ke()){await Ie([{name:"curl"}]);const t=await gv();return j("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),j("dpkg",["-i","packages-microsoft-prod.deb"]),Ie([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function Er(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),o=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),i="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:Ve("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${o}.${i}`}}function _r(e){const t=so.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function br(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}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Or=require("os"),Rr=require("fs"),Sr=require("crypto"),Ir=require("path"),Tr=require("http"),xr=require("https");require("net");const Pr=require("tls"),Ar=require("events"),Nr=require("util"),Cr=require("buffer"),$r=require("process"),Lr=require("child_process"),Dr=require("assert"),kr=require("stream"),jr=require("url"),Ur=require("string_decoder"),Fr=require("timers"),Mr=require("console");var Gr="undefined"!=typeof document?document.currentScript:null;const Br=e(Rr),qr=e(Tr),Hr=e(xr);var Vr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},zr={};const Xr=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{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:"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"}];!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=Xr,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,r.forEach((function(r){const o=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));if(e[r.constant]=o,o)switch(e.name=r.name,typeof r.pr){case"string":e.isPR=!!n[r.pr];break;case"object":e.isPR="env"in r.pr?r.pr.env in n&&n[r.pr.env]!==r.pr.ne:"any"in r.pr?r.pr.any.some((function(e){return!!n[e]})):t(r.pr);break;default:e.isPR=null}})),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))}(zr);var Wr={},Yr={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.toCommandProperties=Kr.toCommandValue=void 0,Kr.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Kr.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}:{}};var Jr=Vr&&Vr.__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]}),Qr=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zr=Vr&&Vr.__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)&&Jr(t,e,r);return Qr(t,e),t};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.issue=Yr.issueCommand=void 0;const en=Zr(Or),tn=Kr;Yr.issueCommand=n,Yr.issue=function(e,t=""){n(e,{},t)};class rn{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 o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${t=o,tn.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 tn.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var nn={};const on=new Uint8Array(256);let sn=on.length;const an=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,cn=[];for(let uy=0;256>uy;++uy)cn.push((uy+256).toString(16).substr(1));let ln,un,pn=0,fn=0;const dn=c("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Sr.createHash("md5").update(e).digest()})),hn=c("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Sr.createHash("sha1").update(e).digest()})),mn=Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:a,stringify:s,v1:function(e,t,r){let n=t&&r||0;const i=t||Array(16);let a=(e=e||{}).node||ln,c=void 0!==e.clockseq?e.clockseq:un;if(null==a||null==c){const t=e.random||(e.rng||o)();null==a&&(a=ln=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=un=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:fn+1;const p=l-pn+(u-fn)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||l>pn)&&void 0===e.nsecs&&(u=0),u>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");pn=l,fn=u,un=c,l+=122192928e5;const f=(1e4*(268435455&l)+u)%4294967296;i[n++]=f>>>24&255,i[n++]=f>>>16&255,i[n++]=f>>>8&255,i[n++]=255&f;const d=l/4294967296*1e4&268435455;i[n++]=d>>>8&255,i[n++]=255&d,i[n++]=d>>>24&15|16,i[n++]=d>>>16&255,i[n++]=c>>>8|128,i[n++]=255&c;for(let o=0;6>o;++o)i[n+o]=a[o];return t||s(i)},v3:dn,v4:function(e,t,r){const n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;16>e;++e)t[r+e]=n[e];return t}return s(n)},v5:hn,validate:i,version:function(e){if(!i(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),vn=r(mn);var yn=Vr&&Vr.__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]}),gn=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),wn=Vr&&Vr.__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)&&yn(t,e,r);return gn(t,e),t};Object.defineProperty(nn,"__esModule",{value:!0}),nn.prepareKeyValueMessage=nn.issueFileCommand=void 0;const En=wn(Rr),_n=wn(Or),bn=vn,On=Kr;nn.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!En.existsSync(r))throw Error("Missing file at path: "+r);En.appendFileSync(r,`${On.toCommandValue(t)}${_n.EOL}`,{encoding:"utf8"})},nn.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+bn.v4(),n=On.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}${_n.EOL}${n}${_n.EOL}${r}`};var Rn={};class Sn 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 In,Tn={},xn=Pr,Pn=Tr,An=xr,Nn=Ar,Cn=Nr;Tn.httpOverHttp=function(e){var t=new u(e);return t.request=Pn.request,t},Tn.httpsOverHttp=function(e){var t=new u(e);return t.request=Pn.request,t.createSocket=p,t.defaultPort=443,t},Tn.httpOverHttps=function(e){var t=new u(e);return t.request=An.request,t},Tn.httpsOverHttps=function(e){var t=new u(e);return t.request=An.request,t.createSocket=p,t.defaultPort=443,t},Cn.inherits(u,Nn.EventEmitter),u.prototype.addRequest=function(e,t,r,n){var o=this,i=d({request:e},o.options,f(t,r,n));this.maxSockets>o.sockets.length?o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.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)})):o.requests.push(i)},u.prototype.createSocket=function(e,t){function r(r,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==r.statusCode?(In("tunneling socket could not be established, statusCode=%d",r.statusCode),i.destroy(),(c=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):a.length>0?(In("got illegal response body from proxy"),i.destroy(),(c=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):(In("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=i,t(i))}var n=this,o={};n.sockets.push(o);var i=d({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),In("making CONNECT request");var s=n.request(i);s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),s.once("connect",r),s.once("error",(function(t){s.removeAllListeners(),In("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),n.removeSocket(o)})),s.end()},u.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)}))}},In=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(){},Tn.debug=In;var $n,Ln,Dn,kn,jn,Un=Tn;(Ln=$n||($n={}))[Ln.OK=200]="OK",Ln[Ln.MultipleChoices=300]="MultipleChoices",Ln[Ln.MovedPermanently=301]="MovedPermanently",Ln[Ln.ResourceMoved=302]="ResourceMoved",Ln[Ln.SeeOther=303]="SeeOther",Ln[Ln.NotModified=304]="NotModified",Ln[Ln.UseProxy=305]="UseProxy",Ln[Ln.SwitchProxy=306]="SwitchProxy",Ln[Ln.TemporaryRedirect=307]="TemporaryRedirect",Ln[Ln.PermanentRedirect=308]="PermanentRedirect",Ln[Ln.BadRequest=400]="BadRequest",Ln[Ln.Unauthorized=401]="Unauthorized",Ln[Ln.PaymentRequired=402]="PaymentRequired",Ln[Ln.Forbidden=403]="Forbidden",Ln[Ln.NotFound=404]="NotFound",Ln[Ln.MethodNotAllowed=405]="MethodNotAllowed",Ln[Ln.NotAcceptable=406]="NotAcceptable",Ln[Ln.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Ln[Ln.RequestTimeout=408]="RequestTimeout",Ln[Ln.Conflict=409]="Conflict",Ln[Ln.Gone=410]="Gone",Ln[Ln.TooManyRequests=429]="TooManyRequests",Ln[Ln.InternalServerError=500]="InternalServerError",Ln[Ln.NotImplemented=501]="NotImplemented",Ln[Ln.BadGateway=502]="BadGateway",Ln[Ln.ServiceUnavailable=503]="ServiceUnavailable",Ln[Ln.GatewayTimeout=504]="GatewayTimeout",(kn=Dn||(Dn={})).Accept="accept",kn.ContentType="content-type",(jn||(jn={})).ApplicationJson="application/json";const Fn=[$n.MovedPermanently,$n.ResourceMoved,$n.SeeOther,$n.TemporaryRedirect,$n.PermanentRedirect],Mn=[$n.BadGateway,$n.ServiceUnavailable,$n.GatewayTimeout],Gn=["OPTIONS","GET","DELETE","HEAD"];class Bn extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,Bn.prototype)}statusCode;result}class qn{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))}))}))}}const Hn=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),Vn=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return Dn},HttpClient:class{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[Dn.Accept]=this._getExistingOrDefaultHeader(t,Dn.Accept,jn.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[Dn.Accept]=this._getExistingOrDefaultHeader(r,Dn.Accept,jn.ApplicationJson),r[Dn.ContentType]=this._getExistingOrDefaultHeader(r,Dn.ContentType,jn.ApplicationJson);const o=await this.post(e,n,r);return this._processResponse(o,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Dn.Accept]=this._getExistingOrDefaultHeader(r,Dn.Accept,jn.ApplicationJson),r[Dn.ContentType]=this._getExistingOrDefaultHeader(r,Dn.ContentType,jn.ApplicationJson);const o=await this.put(e,n,r);return this._processResponse(o,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[Dn.Accept]=this._getExistingOrDefaultHeader(r,Dn.Accept,jn.ApplicationJson),r[Dn.ContentType]=this._getExistingOrDefaultHeader(r,Dn.ContentType,jn.ApplicationJson);const o=await this.patch(e,n,r);return this._processResponse(o,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const o=new URL(t);let i=this._prepareRequest(e,o,n);const s=this._allowRetries&&Gn.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===$n.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,i,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&Fn.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===o.protocol&&o.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!==o.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];i=this._prepareRequest(e,c,n),a=await this.requestRaw(i,r),t--}if(!a.message.statusCode||!Mn.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){o||(o=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let o=!1;const i=e.httpModule.request(e.options,(e=>{n(void 0,new qn(e))}));let s;i.on("socket",(e=>{s=e})),i.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),i.on("error",(function(e){n(e)})),t&&"string"==typeof t&&i.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){i.end()})),t.pipe(i)):i.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=l(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o="https:"===n.parsedUrl.protocol;n.httpModule=o?Hr:qr;const i=o?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i,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({},Hn(this.requestOptions.headers),Hn(e||{})):Hn(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=Hn(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=l(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 i=100;if(this.requestOptions&&(i=this.requestOptions.maxSockets||qr.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const s="https:"===r.protocol;n=o?s?Un.httpsOverHttps:Un.httpsOverHttp:s?Un.httpOverHttps:Un.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new Hr.Agent(e):new qr.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-B6ncb0bd.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 o=e.message.statusCode||0,i={statusCode:o,result:null,headers:{}};let s,a;o===$n.NotFound&&r(i);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),i.result=s),i.headers=e.message.headers}catch(c){}if(o>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${o})`;const t=new Bn(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:Bn,HttpClientResponse:qn,get HttpCodes(){return $n},get MediaTypes(){return jn},getProxyUrl:function(e){const t=l(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})),zn=r(Vn);var Xn,Wn={},Yn=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Wn,"__esModule",{value:!0}),Wn.PersonalAccessTokenCredentialHandler=Wn.BearerCredentialHandler=Wn.BasicCredentialHandler=void 0,Wn.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 Yn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Wn.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 Yn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Wn.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 Yn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var Kn,Jn,Qn,Zn,eo,to,ro,no,oo={},io={},so=m(),ao={exports:{}};no="win32"===process.platform||Vr.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 o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function t(t,n,o){r.stat(t,(function(r,i){o(r,!r&&e(i,t,n))}))}if(eo)return Zn;eo=1,Zn=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=Rr;return Zn}():function(){function e(e,n,o){r.stat(e,(function(e,r){o(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=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),l=a|c;return r&parseInt("001",8)||r&c&&o===s||r&a&&n===i||r&l&&0===i}(e,t)}if(ro)return to;ro=1,to=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=Rr;return to}();var co=E;E.sync=function(e,t){try{return no.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const lo="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,uo=Ir,po=lo?";":":",fo=co,ho=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),mo=(e,t)=>{const r=t.colon||po,n=e.match(/\//)||lo&&e.match(/\\/)?[""]:[...lo?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=lo?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=lo?o.split(r):[""];return lo&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},vo=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=mo(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(ho(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=uo.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(c(p,r,0))})),c=(e,r,n)=>new Promise(((l,u)=>{if(n===o.length)return l(a(r+1));const p=o[n];fo(e+p,{pathExt:i},((o,i)=>{if(!o&&i){if(!t.all)return l(e+p);s.push(e+p)}return l(c(e,r,n+1))}))}));return r?a(0).then((e=>r(null,e)),r):a(0)};var yo=vo;vo.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=mo(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=uo.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;n.length>e;e++){const r=p+n[e];try{if(fo.sync(r,{pathExt:o})){if(!t.all)return r;i.push(r)}}catch(s){}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw ho(e)};var go={exports:{}};const wo=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};go.exports=wo,go.exports.default=wo;const Eo=Ir,_o=yo,bo=go.exports;var Oo={};const Ro=/([()\][%!^"`<>&|;, *?])/g;Oo.command=function(e){return e.replace(Ro,"^$1")},Oo.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Ro,"^$1"),t&&(e=e.replace(Ro,"^$1")),e};const So=/^#!(.*)/,Io=Rr,To=Ir,xo=function(e){return _(e)||_(e,!0)},Po=Oo,Ao=function(e){const t=Buffer.alloc(150);let r;try{r=Io.openSync(e,"r"),Io.readSync(r,t,0,150,0),Io.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(So);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},No="win32"===process.platform,Co=/\.(?:com|exe)$/i,$o=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,Lo="win32"===process.platform,Do=Lr,ko=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:function(e){if(!No)return e;const t=function(e){e.file=xo(e);const t=e.file&&Ao(e.file);return t?(e.args.unshift(e.file),e.command=t,xo(e)):e.file}(e),r=!Co.test(t);if(e.options.forceShell||r){const r=$o.test(t);e.command=To.normalize(e.command),e.command=Po.command(e.command),e.args=e.args.map((e=>Po.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(n)},jo={hookChildProcess:function(e,t){if(!Lo)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=O(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:O,verifyENOENTSync:function(e,t){return Lo&&1===e&&!t.file?b(t.original,"spawnSync"):null},notFoundError:b};ao.exports=R,ao.exports.spawn=R,ao.exports.sync=function(e,t,r){const n=ko(e,t,r),o=Do.spawnSync(n.command,n.args,n.options);return o.error=o.error||jo.verifyENOENTSync(o.status,n),o},ao.exports._parse=ko,ao.exports._enoent=jo;const Uo=t(ao.exports),Fo=({env:e=$r.env,...t}={})=>{const r=S({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=$r.cwd(),path:t=$r.env[S()],preferLocal:r=!0,execPath:n=$r.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?jr.fileURLToPath(e):e,s=Ir.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(Ir.join(t,"node_modules/.bin")),r=t,t=Ir.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?jr.fileURLToPath(t):t;e.push(Ir.resolve(r,n,".."))})(a,n,s),[...a,t].join(Ir.delimiter)})(t),e},Mo=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const o=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!Go(o,i)&&n||Object.defineProperty(e,r,i)},Go=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)},Bo=(e,t)=>`/* Wrapped ${e}*/\n${t}`,qo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Ho=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),Vo=new WeakMap,zo=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const o=e.displayName||e.name||"",i=function(...s){if(Vo.set(i,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${o}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const o of Reflect.ownKeys(t))Mo(e,t,o,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()}() `,o=Bo.bind(null,n,""+t);Object.defineProperty(o,"name",Ho),Object.defineProperty(e,"toString",{...qo,value:o})})(e,t,n)}(i,e),Vo.set(i,n),i};zo.callCount=e=>{if(!Vo.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Vo.get(e)};const Xo=(e,t)=>({name:"SIGRT"+(t+1),number:Wo+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Wo=34,Yo=[{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"}],Ko=()=>{const e=Array.from({length:64-Wo+1},Xo);return[...Yo,...e].map(Jo)},Jo=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=Or.constants,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Qo=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Zo=(()=>{const e=Ko();return Object.fromEntries(e.map(Qo))})(),ei=(e,t)=>{const r=t.find((({name:t})=>Or.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Ko(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=ei(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const ti=({stdout:e,stderr:t,all:r,error:n,signal:o,exitCode:i,command:s,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:p,cwd:f=$r.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:Zo[o].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?"failed with exit code "+i:"failed")({timedOut:c,timeout:p,errorCode:n&&n.code,signal:o,signalDescription:d,exitCode:i=null===i?void 0:i,isCanceled:l}),m=`Command ${h}: ${s}`,v="[object Error]"==={}.toString.call(n),y=v?`${m}\n${n.message}`:m,g=[y,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=g):n=Error(g),n.shortMessage=y,n.command=s,n.escapedCommand=a,n.exitCode=i,n.signal=o,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=f,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=u&&!c,n},ri=["stdin","stdout","stderr"];var ni,oi={exports:{}},ii={exports:{}},si=Vr.process;const ai=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(ai(si)){var ci,li=Dr,ui=(ni||(ni=1,(bi=ii).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&bi.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&bi.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ii.exports),pi=/^win/i.test(si.platform),fi=Ar;"function"!=typeof fi&&(fi=fi.EventEmitter),si.__signal_exit_emitter__?ci=si.__signal_exit_emitter__:((ci=si.__signal_exit_emitter__=new fi).count=0,ci.emitted={}),ci.infinite||(ci.setMaxListeners(1/0),ci.infinite=!0),oi.exports=function(e,t){if(!ai(Vr.process))return function(){};li.equal(typeof e,"function","a callback must be provided for exit handler"),!1===vi&&yi();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),ci.on(r,e),function(){ci.removeListener(r,e),0===ci.listeners("exit").length&&0===ci.listeners("afterexit").length&&di()}};var di=function(){vi&&ai(Vr.process)&&(vi=!1,ui.forEach((function(e){try{si.removeListener(e,mi[e])}catch(t){}})),si.emit=Ei,si.reallyExit=gi,ci.count-=1)};oi.exports.unload=di;var hi=function(e,t,r){ci.emitted[e]||(ci.emitted[e]=!0,ci.emit(e,t,r))},mi={};ui.forEach((function(e){mi[e]=function(){ai(Vr.process)&&si.listeners(e).length===ci.count&&(di(),hi("exit",null,e),hi("afterexit",null,e),pi&&"SIGHUP"===e&&(e="SIGINT"),si.kill(si.pid,e))}})),oi.exports.signals=function(){return ui};var vi=!1,yi=function(){!vi&&ai(Vr.process)&&(vi=!0,ci.count+=1,ui=ui.filter((function(e){try{return si.on(e,mi[e]),!0}catch(t){return!1}})),si.emit=_i,si.reallyExit=wi)};oi.exports.load=yi;var gi=si.reallyExit,wi=function(e){ai(Vr.process)&&(si.exitCode=e||0,hi("exit",si.exitCode,null),hi("afterexit",si.exitCode,null),gi.call(si,si.exitCode))},Ei=si.emit,_i=function(e,t){if("exit"===e&&ai(Vr.process)){void 0!==t&&(si.exitCode=t);var r=Ei.apply(this,arguments);return hi("exit",si.exitCode,null),hi("afterexit",si.exitCode,null),r}return Ei.apply(this,arguments)}}else oi.exports=function(){return function(){}};var bi;const Oi=t(oi.exports),Ri=(e,t="SIGTERM",r={})=>{const n=e(t);return Si(e,t,r,n),n},Si=(e,t,r,n)=>{if(!Ii(t,r,n))return;const o=xi(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},Ii=(e,{forceKillAfterTimeout:t},r)=>Ti(e)&&!1!==t&&r,Ti=e=>e===Or.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),xi=({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},Pi=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Ai=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(Rr.createWriteStream(r)),e;if(T(r))return e[t].pipe(r),e;if(!(e=>e instanceof Lr.ChildProcess&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!T(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var Ni={exports:{}};const{PassThrough:Ci}=kr,{constants:$i}=Cr,Li=kr,{promisify:Di}=Nr,ki=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new Ci({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",(e=>{a.push(e),o?s=a.length:s+=e.length})),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i},ji=Di(Li.pipeline);class Ui extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}Ni.exports=x,Ni.exports.buffer=(e,t)=>x(e,{...t,encoding:"buffer"}),Ni.exports.array=(e,t)=>x(e,{...t,array:!0}),Ni.exports.MaxBufferError=Ui;const Fi=t(Ni.exports),{PassThrough:Mi}=kr,Gi=t((function(){function e(o){return Array.isArray(o)?(o.forEach(e),this):(r.push(o),o.once("end",t.bind(null,o)),o.once("error",n.emit.bind(n,"error")),o.pipe(n,{end:!1}),this)}function t(e){!(r=r.filter((function(t){return t!==e}))).length&&n.readable&&n.end()}var r=[],n=new Mi({objectMode:!0});return n.setMaxListeners(0),n.add=e,n.isEmpty=function(){return 0==r.length},n.on("unpipe",t),[].slice.call(arguments).forEach(e),n})),Bi=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},qi=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},Hi=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?Fi(e,{encoding:t,maxBuffer:n}):Fi.buffer(e,{maxBuffer:n})},Vi=(async()=>{})().constructor.prototype,zi=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Vi,e)])),Xi=(e,t)=>{for(const[r,n]of zi){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Wi=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Yi=/^[\w.-]+$/,Ki=/"/g,Ji=(e,t)=>Wi(e,t).join(" "),Qi=(e,t)=>Wi(e,t).map((e=>(e=>"string"!=typeof e||Yi.test(e)?e:`"${e.replace(Ki,'\\"')}"`)(e))).join(" "),Zi=/ +/g,es=e=>{const t=[];for(const r of e.trim().split(Zi)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},ts=Nr.debuglog("execa").enabled,rs=(e,t)=>(e+"").padStart(t,"0"),ns=(e,{verbose:t})=>{t&&$r.stderr.write(`[${(()=>{const e=new Date;return`${rs(e.getHours(),2)}:${rs(e.getMinutes(),2)}:${rs(e.getSeconds(),2)}.${rs(e.getMilliseconds(),3)}`})()}] ${e}\n`)},os=(e,t,r={})=>{const n=Uo._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||$r.cwd(),execPath:$r.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:ts,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...$r.env,...e}:e;return r?Fo({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return ri.map((t=>e[t]));if((e=>ri.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+ri.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,ri.length)},((e,r)=>t[r]))})(r),"win32"===$r.platform&&"cmd"===Ir.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},is=(e,t,r)=>"string"==typeof t||Cr.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 ss={},as={};const cs=Br.promises,{access:ls,appendFile:us,chmod:ps,chown:fs,copyFile:ds,lchmod:hs,lchown:ms,link:vs,lstat:ys,mkdir:gs,mkdtemp:ws,open:Es,readdir:_s,readFile:bs,readlink:Os,realpath:Rs,rename:Ss,rmdir:Is,stat:Ts,symlink:xs,truncate:Ps,unlink:As,utimes:Ns,writeFile:Cs}=Br.promises,$s="rm"in Br.promises?Br.promises.rm:Nr.promisify(Br.unlink),Ls=r(Object.freeze(Object.defineProperty({__proto__:null,access:ls,appendFile:us,chmod:ps,chown:fs,copyFile:ds,default:cs,lchmod:hs,lchown:ms,link:vs,lstat:ys,mkdir:gs,mkdtemp:ws,open:Es,readFile:bs,readdir:_s,readlink:Os,realpath:Rs,rename:Ss,rm:$s,rmdir:Is,stat:Ts,symlink:xs,truncate:Ps,unlink:As,utimes:Ns,writeFile:Cs},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(as,"__esModule",{value:!0}),as.sync=as.isexe=void 0;const Ds=Rr,ks=Ls;as.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return js(await(0,ks.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},as.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return js((0,Ds.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const js=(e,t)=>e.isFile()&&Us(e,t),Us=(e,t)=>{var r,n,o,i,s,a,c,l;const u=null!=(n=t.uid)?n:null==(r=process.getuid)?void 0:r.call(process),p=null!=(s=null!=(i=t.groups)?i:null==(o=process.getgroups)?void 0:o.call(process))?s:[],f=null!=(l=null!=(c=t.gid)?c:null==(a=process.getgid)?void 0:a.call(process))?l:p[0];if(void 0===u||void 0===f)throw Error("cannot get uid or gid");const d=new Set([f,...p]),h=e.mode,m=e.uid,v=e.gid,y=parseInt("100",8),g=parseInt("010",8),w=y|g;return!!(h&parseInt("001",8)||h&g&&d.has(v)||h&y&&m===u||h&w&&0===u)};var Fs={};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.sync=Fs.isexe=void 0;const Ms=Rr,Gs=Ls;Fs.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Bs(await(0,Gs.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Fs.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Bs((0,Ms.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Bs=(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 o=0;n.length>o;o++){const t=n[o].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);var qs={};Object.defineProperty(qs,"__esModule",{value:!0}),function(e){var t=Vr&&Vr.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=Vr&&Vr.__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 i=n(as);e.posix=i;const s=n(Fs);e.win32=s,o(qs,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(ss);const{isexe:Hs,sync:Vs}=ss,{join:zs,delimiter:Xs,sep:Ws,posix:Ys}=Ir,Ks="win32"===process.platform,Js=RegExp(`[${Ys.sep}${Ws===Ys.sep?"":Ws}]`.replace(/(\\)/g,"\\$1")),Qs=RegExp("^\\."+Js.source),Zs=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),ea=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=Xs})=>{const o=e.match(Js)?[""]:[...Ks?[process.cwd()]:[],...(t||"").split(n)];if(Ks){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),i=t.split(n).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==i[0]&&i.unshift(""),{pathEnv:o,pathExt:i,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},ta=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&Qs.test(t)?t.slice(0,2):"")+zs(r,t)},ra=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=ea(e,t),i=[];for(const s of r){const r=ta(s,e);for(const e of n){const n=r+e;if(await Hs(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Zs(e)};var na=ra;ra.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=ea(e,t),i=[];for(const s of r){const r=ta(s,e);for(const e of n){const n=r+e;if(Vs(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Zs(e)};const oa=t(na);let ia;var sa,aa={};C(aa,"hasSudo",(()=>$)),C(aa,"isRoot",(()=>L)),C(aa,"isSudo",(()=>D)),C(aa,"prependSudo",(()=>k)),C(aa,"defaultExecOptions",(()=>ca)),C(aa,"execRootSync",(()=>j)),C(aa,"execRoot",(()=>U));let ca={stdio:"inherit",shell:!0};C(sa={},"isAdminWindows",(()=>la)),C(sa,"isAdminPosix",(()=>ua)),C(sa,"isAdmin",(()=>G));let la=async function(){var e;if("win32"!==process.platform)return!1;try{return await P("fsutil",["dirty","query",null!=(e=process.env.systemdrive)?e:""]),!0}catch(t){return"ENOENT"===t.code&&async function(){try{return await P("fltmc"),!0}catch{return!1}}()}},ua=L;C({},"grantUserWriteAccess",(()=>B));var pa,fa,da,ha,ma,va,ya,ga,wa,Ea,_a,ba,Oa,Ra,Sa=function(e){return null!=e},Ia=Sa,Ta=[].forEach,xa=Object.create,Pa=function(e){var t=xa(null);return Ta.call(arguments,(function(e){Ia(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},Aa="function"==typeof(da=Math.sign)&&1===da(10)&&-1===da(-20)?Math.sign:fa?pa:(fa=1,pa=function(e){return isNaN(e=+e)||0===e?e:e>0?1:-1}),Na=Math.abs,Ca=Math.floor,$a=Math.max,La=function(e){return $a(0,function(e){return isNaN(e)?0:0!=(e=+e)&&isFinite(e)?Aa(e)*Ca(Na(e)):e}(e))},Da=La,ka=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&Da(e)},ja=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},Ua=Sa,Fa=function(e){if(!Ua(e))throw new TypeError("Cannot use null or undefined");return e},Ma=ja,Ga=Fa,Ba=function(){}.bind,qa=function(){}.call,Ha=Object.keys,Va={}.propertyIsEnumerable,za=(ha="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(Ga(e)),Ma(t),r=Ha(e),o&&r.sort("function"==typeof o?Ba.call(o,e):void 0),"function"!=typeof ha&&(ha=r[ha]),qa.call(ha,r,(function(r,o){return Va.call(e,r)?qa.call(t,n,e[r],r,e,o):undefined}))}),Xa={},Wa={exports:{}},Ya="function"==typeof(Ra=Object.assign)&&(Ra(Oa={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Oa.foo+Oa.bar+Oa.trzy==="razdwatrzy")?Object.assign:function(){if(ba)return _a;ba=1;var e=Ea?wa:(Ea=1,wa=(va?ma:(va=1,ma=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(ga)return ya;ga=1;var e=Sa,t=Object.keys;return ya=function(r){return t(e(r)?Object(r):r)}}()),t=Fa,r=Math.max;return _a=function(n,o){var i,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=o[e]}catch(t){i||(i=t)}},s=1;c>s;++s)e(o=arguments[s]).forEach(a);if(void 0!==i)throw i;return n},_a}(),Ka=Sa,Ja={function:!0,object:!0},Qa=function(e){return Ka(e)&&Ja[typeof e]||!1};!function(e){var t=Ya,r=Qa,n=Sa,o=Error.captureStackTrace;e.exports=function(i){var s=Error(i),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),o&&o(s,e.exports),s}}(Wa);var Za,ec,tc,rc,nc=Wa.exports,oc={exports:{}},ic=La;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(ly){}rc=q(),tc=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); };")}}(),oc.exports=function(e,t){var r;if(t=ic(t),e.length===t)return e;r=tc(t)(e);try{rc(r,e)}catch(ly){}return r};var sc,ac,cc=oc.exports,lc={exports:{}},uc=function(e){return null!=e},pc=uc,fc={object:!0,function:!0,undefined:!0},dc=function(e){if(!function(e){return!!pc(e)&&hasOwnProperty.call(fc,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},hc=/^\s*class[\s{/}]/,mc=function(){}.toString,vc="razdwatrzy",yc="function"==typeof vc.contains&&!0===vc.contains("dwa")&&!1===vc.contains("foo")?"".contains:function(){if(ac)return sc;ac=1;var e="".indexOf;return sc=function(t){return e.call(this,t,arguments[1])>-1}}(),gc=uc,wc=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!dc(e)}(e)&&!hc.test(mc.call(e))},Ec=Ya,_c=Pa,bc=yc;(lc.exports=function(e,t){var r,n,o,i,s;return 2>arguments.length||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],gc(e)?(r=bc.call(e,"c"),n=bc.call(e,"e"),o=bc.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?Ec(_c(i),s):s}).gs=function(e,t,r){var n,o,i,s;return"string"!=typeof e?(i=r,r=t,t=e,e=null):i=arguments[3],gc(t)?wc(t)?gc(r)?wc(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,gc(e)?(n=bc.call(e,"c"),o=bc.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?Ec(_c(i),s):s};var Oc=lc.exports,Rc={exports:{}};!function(e,t){var r,n,o,i,s,a,c,l=Oc,u=ja,p=function(){}.apply,f=function(){}.call,d=Object.create,h=Object.defineProperty,m=Object.defineProperties,v={}.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n,i;return u(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),p.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(u(t),!v.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:n.splice(i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},i=function(e){var t,r,n,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;n=o[t];++t)p.call(n,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];p.call(o,this,i)}},s={on:r=function(e,t){var r;return u(t),v.call(this,"__ee__")?r=this.__ee__:(r=y.value=d(null),h(this,"__ee__",y),y.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:o,emit:i},a={on:l(r),once:l(n),off:l(o),emit:l(i)},c=m({},a),e.exports=t=function(e){return null==e?d(c):m(Object(e),a)},t.methods=s}(Rc,Rc.exports);var Sc,Ic,Tc,xc,Pc,Ac,Nc,Cc,$c,Lc,Dc,kc,jc,Uc,Fc,Mc,Gc,Bc,qc,Hc,Vc,zc,Xc,Wc,Yc,Kc,Jc,Qc,Zc,el,tl,rl,nl,ol,il,sl=Rc.exports,al=X(),cl=Array.isArray,ll=Sa,ul=ja,pl=[].slice;il=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(pl.call(e,this.length))};var fl,dl,hl,ml,vl,yl,gl,wl,El,_l,bl,Ol,Rl,Sl,Il,Tl,xl,Pl,Al,Nl,Cl,$l,Ll,Dl,kl,jl,Ul,Fl,Ml,Gl,Bl,ql,Hl,Vl,zl,Xl,Wl,Yl,Kl,Jl,Ql,Zl,eu,tu,ru,nu,ou,iu=ja,su=nc,au=cc,cu=Oc,lu=sl.methods,uu=function(e){return(t=e,e=cl(t)?t:al(t)).forEach((function(e){ll(e)&&ul(e)})),il.bind(e);var t},pu=function(){}.apply,fu=function(){}.call,du=Object.create,hu=Object.defineProperties,mu=lu.on,vu=lu.emit,yu=ja,gu=za,wu=Xa,Eu=function(e,t,r){var n,o,i,s,a,c,l,u,p,f,d,h,m,v,y,g=du(null);return o=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(f=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:iu(e.get)},void 0!==e.set?(t.set=iu(e.set),e.delete&&(t.delete=iu(e.delete)),e.clear&&(t.clear=iu(e.clear)),t):(t.set=t.get,t))}(r.normalizer),i=f.get,s=f.set,a=f.delete,c=f.clear),null!=r.resolvers&&(y=uu(r.resolvers)),v=i?au((function(t){var r,o,a=arguments;if(y&&(a=y(a)),null!==(r=i(a))&&hasOwnProperty.call(g,r))return d&&n.emit("get",r,a,this),g[r];if(o=1===a.length?fu.call(e,this,a[0]):pu.call(e,this,a),null===r){if(null!==(r=i(a)))throw su("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(g,r))throw su("Circular invocation","CIRCULAR_INVOCATION");return g[r]=o,h&&n.emit("set",r,null,o),o}),o):0===t?function(){var t;if(hasOwnProperty.call(g,"data"))return d&&n.emit("get","data",arguments,this),g.data;if(t=arguments.length?pu.call(e,this,arguments):fu.call(e,this),hasOwnProperty.call(g,"data"))throw su("Circular invocation","CIRCULAR_INVOCATION");return g.data=t,h&&n.emit("set","data",null,t),t}:function(t){var r,o,i=arguments;if(y&&(i=y(arguments)),o=i[0]+"",hasOwnProperty.call(g,o))return d&&n.emit("get",o,i,this),g[o];if(r=1===i.length?fu.call(e,this,i[0]):pu.call(e,this,i),hasOwnProperty.call(g,o))throw su("Circular invocation","CIRCULAR_INVOCATION");return g[o]=r,h&&n.emit("set",o,null,r),r},n={original:e,memoized:v,profileName:r.profileName,get:function(e){return y&&(e=y(e)),i?i(e):e[0]+""},has:function(e){return hasOwnProperty.call(g,e)},delete:function(e){var t;hasOwnProperty.call(g,e)&&(a&&a(e),t=g[e],delete g[e],m&&n.emit("delete",e,t))},clear:function(){var e=g;c&&c(),g=du(null),n.emit("clear",e)},on:function(e,t){return"get"===e?d=!0:"set"===e?h=!0:"delete"===e&&(m=!0),mu.call(this,e,t)},emit:vu,updateEnv:function(){e=n.original}},l=i?au((function(e){var t,r=arguments;y&&(r=y(r)),null!==(t=i(r))&&n.delete(t)}),o):0===t?function(){return n.delete("data")}:function(e){return y&&(e=y(arguments)[0]),n.delete(e)},u=au((function(){var e,r=arguments;return 0===t?g.data:(y&&(r=y(r)),e=i?i(r):r[0]+"",g[e])})),p=au((function(){var e,r=arguments;return 0===t?n.has("data"):(y&&(r=y(r)),null!==(e=i?i(r):r[0]+"")&&n.has(e))})),hu(v,{__memoized__:cu(!0),delete:cu(l),clear:cu(n.clear),_get:cu(u),_has:cu(p)}),n},_u=ka,bu={},Ou={},Ru={exports:{}},Su={},Iu={},Tu={},xu={},Pu=Pa,Au=ka,Nu=function e(t){var r,n,o;if(yu(t),(r=Object(arguments[1])).async&&r.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(n=_u(r.length,t.length,r.async&&wu.async),o=Eu(t,n,r),gu(wu,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},Cu=function(e){var t,r=Pu(arguments[1]);return r.normalizer||0!==(t=r.length=Au(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(dl||(dl=1,fl=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),fl):t>1&&(r.normalizer=(ml||(ml=1,hl=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),hl)(t)):r.normalizer=!1===t?function(){if(Sl)return Rl;Sl=1;var e=W(),t=Object.create;return Rl=function(){var r=0,n=[],o=t(null);return{get:function(t){var r,o=0,i=n,s=t.length;if(0===s)return i[s]||null;if(i=i[s]){for(;s-1>o;){if(-1===(r=e.call(i[0],t[o])))return null;i=i[1][r],++o}return-1===(r=e.call(i[0],t[o]))?null:i[1][r]||null}return null},set:function(t){var i,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===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][i],++s;-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1),a[1][i]=++r}return o[r]=t,r},delete:function(t){var r,i=0,s=n,a=o[t],c=a.length,l=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>i;){if(-1===(r=e.call(s[0],a[i])))return;l.push(s,r),s=s[1][r],++i}if(-1===(r=e.call(s[0],a[i])))return;for(t=s[1][r],s[0].splice(r,1),s[1].splice(r,1);!s[0].length&&l.length;)r=l.pop(),(s=l.pop())[0].splice(r,1),s[1].splice(r,1)}delete o[t]},clear:function(){n=[],o=t(null)}}},Rl}()():1===t?function(){if(Tl)return Il;Tl=1;var e=W();return Il=function(){var t=0,r=[],n=[];return{get:function(t){var o=e.call(r,t[0]);return-1===o?null:n[o]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var o=e.call(n,t);-1!==o&&(r.splice(o,1),n.splice(o,1))},clear:function(){r=[],n=[]}}}}()():function(){if(Pl)return xl;Pl=1;var e=W(),t=Object.create;return xl=function(r){var n=0,o=[[],[]],i=t(null);return{get:function(t){for(var n,i=0,s=o;r-1>i;){if(-1===(n=e.call(s[0],t[i])))return null;s=s[1][n],++i}return-1===(n=e.call(s[0],t[i]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=o;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,i[n]=t,n},delete:function(t){for(var n,s=0,a=o,c=[],l=i[t];r-1>s;){if(-1===(n=e.call(a[0],l[s])))return;c.push(a,n),a=a[1][n],++s}if(-1!==(n=e.call(a[0],l[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 i[t]}},clear:function(){o=[[],[]],i=t(null)}}},xl}()(t)),r.async&&function(){if(Ll)return bu;Ll=1;var e=X(),t=Y(),r=q(),n=cc,o=K(),i=[].slice,s=function(){}.apply,a=Object.create;Xa.async=function(c,l){var u,p,f,d=a(null),h=a(null),m=l.memoized,v=l.original;l.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(u=r,t=i.call(t,0,-1)),m.apply(p=this,f=t)}),m);try{r(l.memoized,m)}catch(ly){}l.on("get",(function(e){var t,r,n;if(u){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],u]:d[e].push(u),void(u=null);t=u,r=p,n=f,u=p=f=null,o((function(){var o;hasOwnProperty.call(h,e)?(o=h[e],l.emit("getasync",e,n,r),s.call(t,o.context,o.args)):(u=t,p=r,f=n,m.apply(r,n))}))}})),l.original=function(){var t,r,n,i;return u?(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),l.has(c)&&(r?l.delete(c):(h[c]={context:this,args:a},l.emit("setasync",c,"function"==typeof n?1:n.length))),"function"==typeof n?i=s.call(n,this,a):n.forEach((function(e){i=s.call(e,this,a)}),this),i}else o(s.bind(t,this,arguments))},n=u,u=p=f=null,t.push(r),i=s.call(v,this,t),r.cb=n,u=r,i):s.call(v,this,arguments)},l.on("set",(function(e){u?(d[e]?"function"==typeof d[e]?d[e]=[d[e],u.cb]:d[e].push(u.cb):d[e]=u.cb,delete u.cb,u.id=e,u=null):l.delete(e)})),l.on("delete",(function(e){var t;hasOwnProperty.call(d,e)||h[e]&&(t=h[e],delete h[e],l.emit("deleteasync",e,i.call(t.args,1)))})),l.on("clear",(function(){var e=h;h=a(null),l.emit("clearasync",t(e,(function(e){return i.call(e.args,1)})))}))}}(),r.promise&&Z(),r.dispose&&function(){if(Yl)return Su;Yl=1;var e=ja,t=za,r=Xa,n=function(){}.apply;r.dispose=function(o,i,s){var a;if(e(o),s.async&&r.async||s.promise&&r.promise)return i.on("deleteasync",a=function(e,t){n.call(o,null,t)}),void i.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));i.on("delete",a=function(e,t){o(t)}),i.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),r.maxAge&&function(){if(eu)return Iu;eu=1;var e=X(),t=za,r=K(),n=Q(),o=function(){if(Zl)return Ql;Zl=1;var e=La,t=Jl?Kl:(Jl=1,Kl=2147483647);return Ql=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),i=Xa,s=Function.prototype,a=Math.max,c=Math.min,l=Object.create;i.maxAge=function(u,p,f){var d,h,m,v;(u=o(u))&&(d=l(null),p.on("set"+(h=f.async&&i.async||f.promise&&i.promise?"async":""),(function(e){d[e]=setTimeout((function(){p.delete(e)}),u),"function"==typeof d[e].unref&&d[e].unref(),v&&(v[e]&&"nextTick"!==v[e]&&clearTimeout(v[e]),v[e]=setTimeout((function(){delete v[e]}),m),"function"==typeof v[e].unref&&v[e].unref())})),p.on("delete"+h,(function(e){clearTimeout(d[e]),delete d[e],v&&("nextTick"!==v[e]&&clearTimeout(v[e]),delete v[e])})),f.preFetch&&(m=!0===f.preFetch||isNaN(f.preFetch)?.333:a(c(+f.preFetch,1),0))&&(v={},m=(1-m)*u,p.on("get"+h,(function(t,o,i){v[t]||(v[t]="nextTick",r((function(){var r;"nextTick"===v[t]&&(delete v[t],p.delete(t),f.async&&(o=e(o)).push(s),r=p.memoized.apply(i,o),f.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),p.on("clear"+h,(function(){t(d,(function(e){clearTimeout(e)})),d={},v&&(t(v,(function(e){"nextTick"!==e&&clearTimeout(e)})),v={})})))}}(),r.max&&function(){if(nu)return Tu;nu=1;var e=La,t=function(){if(ru)return tu;ru=1;var e=La,t=Object.create,r={}.hasOwnProperty;return tu=function(n){var o,i=0,s=1,a=t(null),c=t(null),l=0;return n=e(n),{hit:function(e){var t=c[e],u=++l;if(a[u]=e,c[e]=u,!t){if(++i,n>=i)return;return o(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:o=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--i,s===t)){if(!i)return l=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){i=0,s=1,a=t(null),c=t(null),l=0}}}}(),r=Xa;r.max=function(n,o,i){var s,a,c;(n=e(n))&&(a=t(n),o.on("set"+(s=i.async&&r.async||i.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&o.delete(e)}),o.on("get"+s,c),o.on("delete"+s,a.delete),o.on("clear"+s,a.clear))}}(),r.refCounter&&function(){if(ou)return xu;ou=1;var e=Oc,t=Xa,r=Object.create,n=Object.defineProperties;t.refCounter=function(o,i,s){var a,c;a=r(null),i.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),i.on("get"+c,(function(e){++a[e]})),i.on("delete"+c,(function(e){delete a[e]})),i.on("clear"+c,(function(){a={}})),n(i.memoized,{deleteRef:e((function(){var e=i.get(arguments);return null===e?null:a[e]?! --a[e]&&(i.delete(e),!0):null})),getRefCount:e((function(){var e=i.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),Nu(e,r)};const $u=t(Cu),Lu=/^~(?=$|\/|\\)/,{appendFile:Du,readFile:ku,writeFile:ju}=Rr.promises,Uu=te("~/.bashrc"),Fu=$u((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([re(e),ne(t,te("~/.bashrc")),ne(t,te("~/.profile"))])}catch(r){y(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0}),Mu=Or,Gu="win32"!==Mu.platform(),Bu=Mu.release(),qu=/(\d+\.\d+)\.(\d+)/,Hu=t((function(e){return Gu?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&+t>=17134.1184)(...qu.exec(Bu).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var Vu,zu,Xu,Wu,Yu={exports:{}};Xu=function(){if(zu)return Vu;zu=1;var e=/[|\\{}()[\]^$+*?.]/g;return Vu=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Wu=function(e){return e.split("").reverse().join("")},Yu.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+Xu(t)+"])(?!"+Xu(r)+")","g"),Wu(Wu(e).replace(n,"$1"+r)))};const Ku=t(Yu.exports),{appendFile:Ju}=Rr.promises,{appendFile:Qu}=Rr.promises,Zu=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var ep={exports:{}};!function(e){!function(){function t(e,t,o){if(r(e),"object"!=typeof o)throw Error("List of variants should be specified as an object");var i=n[e](t);return void 0!==o[i]?o[i]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{ce(__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}}()}(ep);var tp=ep.exports,rp=tp,np={};tp.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 op={exports:{}};op.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const ip=rp,sp=op.exports,ap=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],cp={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},lp={};var up={create:function(e){return e=Object.assign({},cp,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!lp[e]){if(!sp||!r)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{le(ce(`../locales/${e}.js`))}catch(t){throw Error(`Failed to load locale: ${e} from ../locales/${e}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${t}`)}}(e)}}(r.locale,{autoload:r.autoloadLocales}),!e)throw Error("Missing first date argument");if(!t)throw Error("Missing second date argument");const n=function(e,t){let r=t-e;const n=[];return ap.some((function(e){const t=e[0],o=e[1],i=Math.floor(r/o);if(r-=i*o,n.push([t,i]),0>=r)return!0})),n}(e,t),o=[];for(const i of n){const[e,t]=i;if(t>0&&o.push(ue(e,t,r)),o.length>=r.span)break}return o.join(r.delimiter)}(t,r,n=Object.assign({},e,n||{}))}}},addLocale:le,defaultConfig:cp};const pp=t({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"}}}});var fp={exports:{}},dp={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},hp="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=dp,i=hp,s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[p,n]],d=(e,t,r)=>{const n=(e=>{for(const[t,r]of f)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),o=u++;i(e,o,t),l[e]=o,c[o]=t,s[o]=RegExp(t,r?"g":void 0),a[o]=RegExp(n,r?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",p+"+"),d("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),d("FULL",`^${c[l.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),d("LOOSE",`^${c[l.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),d("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),d("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),d("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",c[l.COERCEPLAIN]+"(?:$|[^\\d])"),d("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",c[l.COERCE],!0),d("COERCERTLFULL",c[l.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(fp,fp.exports);var mp=fp.exports;const vp=Object.freeze({loose:!0}),yp=Object.freeze({});var gp=e=>e?"object"!=typeof e?vp:e:yp;const wp=/^[0-9]+$/,Ep=(e,t)=>{const r=wp.test(e),n=wp.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var _p={compareIdentifiers:Ep,rcompareIdentifiers:(e,t)=>Ep(t,e)};const bp=hp,{MAX_LENGTH:Op,MAX_SAFE_INTEGER:Rp}=dp,{safeRe:Sp,t:Ip}=mp,Tp=gp,{compareIdentifiers:xp}=_p;var Pp=class e{constructor(t,r){if(r=Tp(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Op)throw new TypeError(`version is longer than ${Op} characters`);bp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Sp[Ip.LOOSE]:Sp[Ip.FULL]);if(!n)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Rp||0>this.major)throw new TypeError("Invalid major version");if(this.minor>Rp||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>Rp||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=n[4]?n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&Rp>t)return t}return e})):[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(t){if(bp("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),xp(this.major,t.major)||xp(this.minor,t.minor)||xp(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(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 e=this.prerelease[r],n=t.prerelease[r];if(bp("prerelease compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return xp(e,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{const e=this.build[r],n=t.build[r];if(bp("build compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return xp(e,n)}while(++r)}inc(e,t,r){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"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=+r?1:0;if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");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===xp(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}};const Ap=Pp;var Np=(e,t,r=!1)=>{if(e instanceof Ap)return e;try{return new Ap(e,t)}catch(n){if(!r)return null;throw n}};const Cp=Np;var $p=(e,t)=>{const r=Cp(e,t);return r?r.version:null};const Lp=t($p),Dp=Np;const kp=Pp;const jp=Np;const Up=Pp;var Fp=(e,t)=>new Up(e,t).major;const Mp=t(Fp),Gp=Pp;const Bp=Pp;const qp=Np;const Hp=Pp;var Vp=(e,t,r)=>new Hp(e,r).compare(new Hp(t,r));const zp=t(Vp),Xp=Vp;const Wp=Vp;const Yp=Pp;var Kp=(e,t,r)=>{const n=new Yp(e,r),o=new Yp(t,r);return n.compare(o)||n.compareBuild(o)};const Jp=Kp;const Qp=Kp;const Zp=Vp;var ef=(e,t,r)=>Zp(e,t,r)>0;const tf=Vp;var rf=(e,t,r)=>0>tf(e,t,r);const nf=Vp;var of=(e,t,r)=>0===nf(e,t,r);const sf=Vp;var af=(e,t,r)=>0!==sf(e,t,r);const cf=Vp;var lf=(e,t,r)=>cf(e,t,r)>=0;const uf=Vp;var pf=(e,t,r)=>0>=uf(e,t,r);const ff=t(pf),df=of,hf=af,mf=ef,vf=lf,yf=rf,gf=pf;var wf=(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 df(e,r,n);case"!=":return hf(e,r,n);case">":return mf(e,r,n);case">=":return vf(e,r,n);case"<":return yf(e,r,n);case"<=":return gf(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const Ef=Pp,_f=Np,{safeRe:bf,t:Of}=mp;var Rf=(e,t)=>{if(e instanceof Ef)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?bf[Of.COERCERTLFULL]:bf[Of.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?bf[Of.COERCEFULL]:bf[Of.COERCE]);return null===r?null:_f(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const Sf=t(Rf);var If,Tf,xf,Pf,Af=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}};const Nf=pe();var Cf=(e,t,r)=>{try{t=new Nf(t,r)}catch(n){return!1}return t.test(e)};const $f=pe();const Lf=Pp,Df=pe();const kf=Pp,jf=pe();const Uf=Pp,Ff=pe(),Mf=ef;const Gf=pe();const Bf=Pp,qf=fe(),{ANY:Hf}=qf,Vf=pe(),zf=Cf,Xf=ef,Wf=rf,Yf=pf,Kf=lf;var Jf=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new Bf(e,n),t=new Vf(t,n),r){case">":o=Xf,i=Yf,s=Wf,a=">",c=">=";break;case"<":o=Wf,i=Kf,s=Xf,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(zf(e,t,n))return!1;for(let l=0;t.set.length>l;++l){let r=null,u=null;if(t.set[l].forEach((e=>{e.semver===Hf&&(e=new qf(">=0.0.0")),r=r||e,u=u||e,o(e.semver,r.semver,n)?r=e:s(e.semver,u.semver,n)&&(u=e)})),r.operator===a||r.operator===c)return!1;if((!u.operator||u.operator===a)&&i(e,u.semver))return!1;if(u.operator===c&&s(e,u.semver))return!1}return!0};const Qf=Jf;const Zf=Jf;const ed=pe();const td=Cf,rd=Vp,nd=pe(),od=fe(),{ANY:id}=od,sd=Cf,ad=Vp,cd=[new od(">=0.0.0-0")],ld=[new od(">=0.0.0")],ud=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===id){if(1===t.length&&t[0].semver===id)return!0;e=r.includePrerelease?cd:ld}if(1===t.length&&t[0].semver===id){if(r.includePrerelease)return!0;t=ld}const n=new Set;let o,i,s,a,c,l,u;for(const d of e)">"===d.operator||">="===d.operator?o=pd(o,d,r):"<"===d.operator||"<="===d.operator?i=fd(i,d,r):n.add(d.semver);if(n.size>1)return null;if(o&&i){if(s=ad(o.semver,i.semver,r),s>0)return null;if(0===s&&(">="!==o.operator||"<="!==i.operator))return null}for(const d of n){if(o&&!sd(d,o+"",r))return null;if(i&&!sd(d,i+"",r))return null;for(const e of t)if(!sd(d,e+"",r))return!1;return!0}let p=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver,f=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;p&&1===p.prerelease.length&&"<"===i.operator&&0===p.prerelease[0]&&(p=!1);for(const d of t){if(u=u||">"===d.operator||">="===d.operator,l=l||"<"===d.operator||"<="===d.operator,o)if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),">"===d.operator||">="===d.operator){if(a=pd(o,d,r),a===d&&a!==o)return!1}else if(">="===o.operator&&!sd(o.semver,d+"",r))return!1;if(i)if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),"<"===d.operator||"<="===d.operator){if(c=fd(i,d,r),c===d&&c!==i)return!1}else if("<="===i.operator&&!sd(i.semver,d+"",r))return!1;if(!d.operator&&(i||o)&&0!==s)return!1}return!(o&&l&&!i&&0!==s||i&&u&&!o&&0!==s||f||p)},pd=(e,t,r)=>{if(!e)return t;const n=ad(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},fd=(e,t,r)=>{if(!e)return t;const n=ad(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const dd=mp,hd=dp,md=Pp,vd=_p;var yd={parse:Np,valid:$p,clean:(e,t)=>{const r=Dp(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},inc:(e,t,r,n,o)=>{"string"==typeof r&&(o=n,n=r,r=void 0);try{return new kp(e instanceof kp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=jp(e,null,!0),n=jp(t,null,!0),o=r.compare(n);if(0===o)return null;const i=o>0,s=i?r:n,a=i?n:r,c=!!s.prerelease.length;if(a.prerelease.length&&!c)return a.patch||a.minor?s.patch?"patch":s.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"},major:Fp,minor:(e,t)=>new Gp(e,t).minor,patch:(e,t)=>new Bp(e,t).patch,prerelease:(e,t)=>{const r=qp(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:Vp,rcompare:(e,t,r)=>Xp(t,e,r),compareLoose:(e,t)=>Wp(e,t,!0),compareBuild:Kp,sort:(e,t)=>e.sort(((e,r)=>Jp(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>Qp(r,e,t))),gt:ef,lt:rf,eq:of,neq:af,gte:lf,lte:pf,cmp:wf,coerce:Rf,Comparator:fe(),Range:pe(),satisfies:Cf,toComparators:(e,t)=>new $f(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),maxSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Df(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Lf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new jf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new kf(n,r)))})),n},minVersion:(e,t)=>{e=new Ff(e,t);let r=new Uf("0.0.0");if(e.test(r))return r;if(r=new Uf("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;e.set.length>n;++n){let t=null;e.set[n].forEach((e=>{const r=new Uf(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!Mf(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!Mf(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new Gf(e,t).range||"*"}catch(r){return null}},outside:Jf,gtr:(e,t,r)=>Qf(e,t,">",r),ltr:(e,t,r)=>Zf(e,t,"<",r),intersects:(e,t,r)=>(e=new ed(e,r),t=new ed(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>rd(e,t,r)));for(const l of s)td(l,t,r)?(i=l,o||(o=l)):(i&&n.push([o,i]),i=null,o=null);o&&n.push([o,null]);const a=[];for(const[l,u]of n)a.push(l===u?l:u||l!==s[0]?u?l===s[0]?"<="+u:`${l} - ${u}`:">="+l:"*");const c=a.join(" || ");return("string"==typeof t.raw?t.raw:t+"").length>c.length?c:t},subset:(e,t,r={})=>{if(e===t)return!0;e=new nd(e,r),t=new nd(t,r);let n=!1;e:for(const o of e.set){for(const e of t.set){const t=ud(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:md,re:dd.re,src:dd.src,tokens:dd.t,SEMVER_SPEC_VERSION:hd.SEMVER_SPEC_VERSION,RELEASE_TYPES:hd.RELEASE_TYPES,compareIdentifiers:vd.compareIdentifiers,rcompareIdentifiers:vd.rcompareIdentifiers},gd=yd,wd=Or,Ed=Ir,_d=Rr,bd=xr,Od=$r.env.npm_package_json,Rd=$r.env.npm_config_user_agent,Sd=!(!Rd||!Rd.startsWith("npm")),Id=!(!Od||!Od.endsWith("package.json")),Td=Sd||Id,xd=!(!Rd||!Rd.startsWith("yarn")),Pd=Td||xd,Ad=wd.homedir(),Nd=process.env.XDG_CONFIG_HOME||Ed.join(Ad,".config","simple-update-notifier"),Cd=function(e){return Ed.join(Nd,"".concat(e.replace("@","").replace("/","__"),".json"))},$d=function(e,t){return de(void 0,0,void 0,(function(){var r;return he(this,(function(n){return r="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,n){bd.get(r,(function(r){var o="";r.on("data",(function(e){return o+=e})),r.on("end",(function(){try{var r=JSON.parse(o)[t];r||n(Error("Error getting version")),e(r)}catch(i){n(Error("Could not parse version response"))}}))})).on("error",(function(e){return n(e)}))}))]}))}))},Ld=function(e){var t=e.pkg,r=e.updateCheckInterval,n=void 0===r?864e5:r,o=e.distTag,i=void 0===o?"latest":o,s=e.alwaysRun,a=e.debug;return de(void 0,0,void 0,(function(){var r,o;return he(this,(function(c){switch(c.label){case 0:return _d.existsSync(Nd)||_d.mkdirSync(Nd,{recursive:!0}),r=function(t){var r=Cd(t);try{if(!_d.existsSync(r))return;return JSON.parse(_d.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,$d(t.name,i)]:[3,2];case 1:return o=c.sent(),l=Cd(t.name),_d.writeFileSync(l,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),gd.gt(o,t.version)?[2,o]:(a&&console.error("Latest version (".concat(o,") not newer than current version (").concat(t.version,")")),[3,3]);case 2:a&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(n,"ms but only ").concat((new Date).getTime()-r,"ms since last check.")),c.label=3;case 3:return[2,!1]}var l}))}))};const Dd=t((function(e){return de(void 0,0,void 0,(function(){var t,r;return he(this,(function(n){switch(n.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||Pd&&!e.shouldNotifyInNpmScript))return e.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Ld(e)];case 2:return(t=n.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),"┐")],o=0,i=t;i.length>o;o++)n.push("│ ".concat(i[o].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(e.pkg.name," available!\nCurrent Version: ").concat(e.pkg.version,"\nLatest Version: ").concat(t))),[3,4];case 3:return r=n.sent(),e.debug&&r instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",r),[3,4];case 4:return[2]}}))}))})),kd={name:"setup-cpp",version:"0.41.1"};var jd={};!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},o=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}}(),i=t(Rr),s=jr,a=t(Ir),c=t(Tr),l=t(xr),u=Ar,p=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 o=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 i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return i.__validate(e,n)?(i.url=i.requestURL=e.trim(),i.state=p.IDLE,i.__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},i.__opts=Object.assign({},i.__defaultOpts),i.__pipes=[],i.__total=0,i.__downloaded=0,i.__progress=0,i.__retryCount=0,i.__retryTimeout=null,i.__resumeRetryCount=0,i.__states=p,i.__promise=null,i.__request=null,i.__response=null,i.__isAborted=!1,i.__isResumed=!1,i.__isResumable=!1,i.__isRedirected=!1,i.__destFolder=n,i.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},i.__fileName="",i.__filePath="",i.updateOptions(o),i):r(i)}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),o(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,o=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&i.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===o?t():e.resumeFromFile(e.__filePath,{total:o,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){i.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void i.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)},o=function(i,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,i).href;return e.emit("redirected",c,i),o(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()};o(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 o=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(o),r.emit("redirected",o,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var i=Error("Response status was "+n.statusCode);return i.status=n.statusCode||0,i.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",i),t(i)}(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 o=this,s=e;if(this.__isResumed)this.__fileStream=i.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(),i.existsSync(this.__filePath)){var l=this.__getFilesizeInBytes(this.__filePath),u=this.__total?this.__total:0;if("object"===n(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||l>=u))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:l}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=i.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 o.__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 o=!!r.__total&&r.__downloaded!==r.__total;if(o&&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:o,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,o=r.delay,i=void 0===o?0:o,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())}),i)}))}))):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"),o=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,i=!n||o?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||o||i?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(o||i||c)?(r=(r=e["content-disposition"]).trim(),o?r=o[1]:i?r=i[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 o=this.__opts.fileName,i=o.name,s=!!o.hasOwnProperty("ext")&&o.ext;if("string"==typeof s)return i+"."+s;if("boolean"==typeof s){if(s)return i;var c=e.includes(".")?e.split(".").pop():"";return""===c?i:i+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,o=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===o?0:this.__downloaded/o*100,(this.__downloaded===o||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===o||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),o={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(o.headers=r),o}},{key:"__getFilesizeInBytes",value:function(e){try{return i.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(!i.existsSync(t))throw Error("Destination Folder must exist");if(!i.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{i.accessSync(t,i.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=l,t.agent=new l.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{i.accessSync(e,i.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,o=e.split(".").pop();return o!==e&&o.length>0?r=r.replace(o="."+o,""):o="",this.__uniqFileNameSync(r+" ("+ ++n+")"+o)}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?i.access(e.__filePath,(function(n){return n?t():void i.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}(u.EventEmitter)}(jd);const{appendFile:Ud}=Rr.promises,Fd="Dpkg::Lock::Timeout=300";let Md=!1;const Gd=$u((function(e=Ee()){j(e,"nala"!==e?["update","-y","-o",Fd]:["update","-o",Fd],{...ca,env:ge(e)}),Md=!0}));var Bd,qd;(qd=Bd||(Bd={}))[qd.NameDashVersion=0]="NameDashVersion",qd[qd.NameEqualsVersion=1]="NameEqualsVersion",qd[qd.Name=2]="Name",qd[qd.None=3]="None";const Hd=$u((async function(e){Gd(e);const t=await Oe([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&j(e,["install","-y","--fix-broken","-o",Fd,...t],{...ca,env:ge(e)})}),{promise:!0}),Vd=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],zd="/etc/apt/trusted.gpg.d",Xd="keyserver.ubuntu.com";let Wd,Yd,Kd,Jd,Qd,Zd=!1,eh=!1,th=!1,rh=!1;const nh=/Version\s*:\s*(.*)/g;let oh=!1;var ih=Ir;const sh=t((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=ih.basename(e,ih.extname(e))+t,o=ih.join(ih.dirname(e),n);return(r=e.slice(0,2))==="."+ih.sep||"./"===r?"."+ih.sep+o:o}));var ah={},ch={};Be(ch,"name",(()=>qe));var lh={};Be(lh,"normalizeTrim",(()=>He));var uh={};Be(uh,"addExeExt",(()=>Ve));var ph={};Be(ph,"addNamePrefix",(()=>ze));var fh={};Be(fh,"addNameSuffix",(()=>Xe));var dh={};Be(dh,"addShExt",(()=>We));var hh={};Be(hh,"addShRelativePrefix",(()=>Ye));var mh={};Be(mh,"removeExt",(()=>Ke));var vh={};Be(vh,"replaceExt",(()=>Je));var yh={};Be(yh,"isPathInside",(()=>Qe)),Ge(ah,ch),Ge(ah,lh),Ge(ah,uh),Ge(ah,ph),Ge(ah,fh),Ge(ah,dh),Ge(ah,hh),Ge(ah,mh),Ge(ah,vh),Ge(ah,yh);const gh=["x64","amd64","x86_64","win64","64"],wh=["x86","i386","ia32","win32","32","x32"],Eh=["aarch64","arm64","woa64","arm"],_h=["armv7","armv7a"],bh=["powerpc64le","ppc64le"],Oh=["sparc64"];var Rh={},Sh={},Ih={};!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=Vr&&Vr.__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]}),o=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=Vr&&Vr.__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 o(t,e),t},s=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=i(Rr),c=i(Ir);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 o;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(o))return r;const i=r;for(const a of n){r=i+a,o=void 0;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const o of yield e.readdir(t))if(n===o.toUpperCase()){r=c.join(t,o);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(o))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(Ih);var Th=Vr&&Vr.__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]}),xh=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ph=Vr&&Vr.__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)&&Th(t,e,r);return xh(t,e),t},Ah=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Sh,"__esModule",{value:!0}),Sh.findInPath=Sh.which=Lh=Sh.mkdirP=Sh.rmRF=Sh.mv=Sh.cp=void 0;const Nh=Dr,Ch=Ph(Ir),$h=Ph(Ih);Sh.cp=function(e,t,r={}){return Ah(this,void 0,void 0,(function*(){const{force:n,recursive:o,copySourceDirectory:i}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),s=(yield $h.exists(t))?yield $h.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?Ch.join(t,Ch.basename(e)):t;if(!(yield $h.exists(e)))throw Error("no such file or directory: "+e);if((yield $h.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield rt(e,a,0,n)}else{if(""===Ch.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield nt(e,a,n)}}))},Sh.mv=function(e,t,r={}){return Ah(this,void 0,void 0,(function*(){if(yield $h.exists(t)){let n=!0;if((yield $h.isDirectory(t))&&(t=Ch.join(t,Ch.basename(e)),n=yield $h.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield Ze(t)}}yield et(Ch.dirname(t)),yield $h.rename(e,t)}))},Sh.rmRF=Ze;var Lh=Sh.mkdirP=et;Sh.which=function e(t,r){return Ah(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(r){const r=yield e(t,!1);if(!r)throw Error($h.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 n=yield tt(t);return n&&n.length>0?n[0]:""}))},Sh.findInPath=tt;var Dh={exports:{}},kh={exports:{}};!function(e,t){function r(e){A[e]=N++}function n(e){for(var t=0;$.length>t;t++){var r=$[t][0],n=$[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>R)return null;if(!(t.loose?x[A.LOOSE]:x[A.FULL]).test(e))return null;try{return new i(e,t)}catch(r){return null}}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>R)throw new TypeError("version is longer than "+R+" characters");if(!(this instanceof i))return new i(e,t);O("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?x[A.LOOSE]:x[A.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>S||0>this.major)throw new TypeError("Invalid major version");if(this.minor>S||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>S||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&&S>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=D.test(e),n=D.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 i(e,r).compare(new i(t,r))}function c(e,t,r){return a(e,t,r)>0}function l(e,t,r){return 0>a(e,t,r)}function u(e,t,r){return 0===a(e,t,r)}function p(e,t,r){return 0!==a(e,t,r)}function f(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 u(e,r,n);case"!=":return p(e,r,n);case">":return c(e,r,n);case">=":return f(e,r,n);case"<":return l(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(" "),O("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===k?"":this.operator+this.semver.version,O("comp",this)}function v(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof v)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new v(e.raw,t);if(e instanceof m)return new v(e.value,t);if(!(this instanceof v))return new v(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 y(e,t){for(var r=!0,n=e.slice(),o=n.pop();r&&n.length;)r=n.every((function(e){return o.intersects(e,t)})),o=n.pop();return r}function g(e){return!e||"x"===e.toLowerCase()||"*"===e}function w(e,t,r,n,o,i,s,a,c,l,u,p,f){return((t=g(r)?"":g(n)?">="+r+".0.0":g(o)?">="+r+"."+n+".0":">="+t)+" "+(a=g(c)?"":g(l)?"<"+(+c+1)+".0.0":g(u)?"<"+c+"."+(+l+1)+".0":p?"<="+c+"."+l+"."+u+"-"+p:"<="+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(O(e[n].semver),e[n].semver!==k&&e[n].semver.prerelease.length>0){var o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function _(e,t,r){try{t=new v(t,r)}catch(n){return!1}return t.test(e)}function b(e,t,r,n){var o,s,a,u,p;switch(e=new i(e,n),t=new v(t,n),r){case">":o=c,s=d,a=l,u=">",p=">=";break;case"<":o=l,s=f,a=c,u="<",p="<=";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 y=null,g=null;if(t.set[h].forEach((function(e){e.semver===k&&(e=new m(">=0.0.0")),g=g||e,o(e.semver,(y=y||e).semver,n)?y=e:a(e.semver,g.semver,n)&&(g=e)})),y.operator===u||y.operator===p)return!1;if((!g.operator||g.operator===u)&&s(e,g.semver))return!1;if(g.operator===p&&a(e,g.semver))return!1}return!0}var O;t=kh.exports=i,O="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 R=256,S=Number.MAX_SAFE_INTEGER||9007199254740991,I=R-6,T=t.re=[],x=t.safeRe=[],P=t.src=[],A=t.tokens={},N=0,C="[a-zA-Z0-9-]",$=[["\\s",1],["\\d",R],[C,I]];r("NUMERICIDENTIFIER"),P[A.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),P[A.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),P[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+C+"*",r("MAINVERSION"),P[A.MAINVERSION]="("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),P[A.MAINVERSIONLOOSE]="("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),P[A.PRERELEASEIDENTIFIER]="(?:"+P[A.NUMERICIDENTIFIER]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),P[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+P[A.NUMERICIDENTIFIERLOOSE]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),P[A.PRERELEASE]="(?:-("+P[A.PRERELEASEIDENTIFIER]+"(?:\\."+P[A.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),P[A.PRERELEASELOOSE]="(?:-?("+P[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+P[A.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),P[A.BUILDIDENTIFIER]=C+"+",r("BUILD"),P[A.BUILD]="(?:\\+("+P[A.BUILDIDENTIFIER]+"(?:\\."+P[A.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),P[A.FULLPLAIN]="v?"+P[A.MAINVERSION]+P[A.PRERELEASE]+"?"+P[A.BUILD]+"?",P[A.FULL]="^"+P[A.FULLPLAIN]+"$",r("LOOSEPLAIN"),P[A.LOOSEPLAIN]="[v=\\s]*"+P[A.MAINVERSIONLOOSE]+P[A.PRERELEASELOOSE]+"?"+P[A.BUILD]+"?",r("LOOSE"),P[A.LOOSE]="^"+P[A.LOOSEPLAIN]+"$",r("GTLT"),P[A.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),P[A.XRANGEIDENTIFIERLOOSE]=P[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),P[A.XRANGEIDENTIFIER]=P[A.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),P[A.XRANGEPLAIN]="[v=\\s]*("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:"+P[A.PRERELEASE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),P[A.XRANGEPLAINLOOSE]="[v=\\s]*("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:"+P[A.PRERELEASELOOSE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGE"),P[A.XRANGE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAIN]+"$",r("XRANGELOOSE"),P[A.XRANGELOOSE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAINLOOSE]+"$",r("COERCE"),P[A.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),T[A.COERCERTL]=RegExp(P[A.COERCE],"g"),x[A.COERCERTL]=RegExp(n(P[A.COERCE]),"g"),r("LONETILDE"),P[A.LONETILDE]="(?:~>?)",r("TILDETRIM"),P[A.TILDETRIM]="(\\s*)"+P[A.LONETILDE]+"\\s+",T[A.TILDETRIM]=RegExp(P[A.TILDETRIM],"g"),x[A.TILDETRIM]=RegExp(n(P[A.TILDETRIM]),"g"),r("TILDE"),P[A.TILDE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAIN]+"$",r("TILDELOOSE"),P[A.TILDELOOSE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAINLOOSE]+"$",r("LONECARET"),P[A.LONECARET]="(?:\\^)",r("CARETTRIM"),P[A.CARETTRIM]="(\\s*)"+P[A.LONECARET]+"\\s+",T[A.CARETTRIM]=RegExp(P[A.CARETTRIM],"g"),x[A.CARETTRIM]=RegExp(n(P[A.CARETTRIM]),"g"),r("CARET"),P[A.CARET]="^"+P[A.LONECARET]+P[A.XRANGEPLAIN]+"$",r("CARETLOOSE"),P[A.CARETLOOSE]="^"+P[A.LONECARET]+P[A.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),P[A.COMPARATORLOOSE]="^"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),P[A.COMPARATOR]="^"+P[A.GTLT]+"\\s*("+P[A.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),P[A.COMPARATORTRIM]="(\\s*)"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+"|"+P[A.XRANGEPLAIN]+")",T[A.COMPARATORTRIM]=RegExp(P[A.COMPARATORTRIM],"g"),x[A.COMPARATORTRIM]=RegExp(n(P[A.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),P[A.HYPHENRANGE]="^\\s*("+P[A.XRANGEPLAIN]+")\\s+-\\s+("+P[A.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),P[A.HYPHENRANGELOOSE]="^\\s*("+P[A.XRANGEPLAINLOOSE]+")\\s+-\\s+("+P[A.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),P[A.STAR]="(<|>)?=?\\s*\\*";for(var L=0;N>L;L++)O(L,P[L]),T[L]||(T[L]=RegExp(P[L]),x[L]=RegExp(n(P[L])));t.parse=o,t.valid=function(e,t){var r=o(e,t);return r?r.version:null},t.clean=function(e,t){var r=o(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=i,i.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},i.prototype.toString=function(){return this.version},i.prototype.compare=function(e){return O("SemVer.compare",this.version,this.options,e),e instanceof i||(e=new i(e,this.options)),this.compareMain(e)||this.comparePre(e)},i.prototype.compareMain=function(e){return e instanceof i||(e=new i(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},i.prototype.comparePre=function(e){if(e instanceof i||(e=new i(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(O("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)},i.prototype.compareBuild=function(e){e instanceof i||(e=new i(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(O("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)},i.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 i(e,r).inc(t,n).version}catch(o){return null}},t.diff=function(e,t){if(u(e,t))return null;var r=o(e),n=o(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return s},t.compareIdentifiers=s;var D=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new i(e,t).major},t.minor=function(e,t){return new i(e,t).minor},t.patch=function(e,t){return new i(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 i(e,r),o=new i(t,r);return n.compare(o)||n.compareBuild(o)},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=l,t.eq=u,t.neq=p,t.gte=f,t.lte=d,t.cmp=h,t.Comparator=m;var k={};m.prototype.parse=function(e){var t=e.match(this.options.loose?x[A.COMPARATORLOOSE]:x[A.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 i(t[2],this.options.loose):k},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(O("Comparator.test",e,this.options.loose),this.semver===k||e===k)return!0;if("string"==typeof e)try{e=new i(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 v(e.value,t),_(this.value,r,t));if(""===e.operator)return""===e.value||(r=new v(this.value,t),_(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=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||o||i&&s||a||c},t.Range=v,v.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},v.prototype.toString=function(){return this.range},v.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?x[A.HYPHENRANGELOOSE]:x[A.HYPHENRANGE],w),O("hyphen replace",e),e=e.replace(x[A.COMPARATORTRIM],"$1$2$3"),O("comparator trim",e,x[A.COMPARATORTRIM]),e=(e=(e=e.replace(x[A.TILDETRIM],"$1~")).replace(x[A.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?x[A.COMPARATORLOOSE]:x[A.COMPARATOR],n=e.split(" ").map((function(e){return function(e,t){return O("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return O("caret",e,t),e.replace(t.loose?x[A.CARETLOOSE]:x[A.CARET],(function(t,r,n,o,i){var s;return O("caret",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":i?(O("replaceCaret pr",i),s="0"===r?"0"===n?">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+"-"+i+" <"+(+r+1)+".0.0"):(O("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+o+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+" <"+(+r+1)+".0.0"),O("caret return",s),s}))}(e,t)})).join(" ")}(e,t),O("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?x[A.TILDELOOSE]:x[A.TILDE],(function(t,r,n,o,i){var s;return O("tilde",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":i?(O("replaceTilde pr",i),s=">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0",O("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),O("tildes",e),e=function(e,t){return O("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?x[A.XRANGELOOSE]:x[A.XRANGE],(function(r,n,o,i,s,a){O("xRange",e,r,n,o,i,s,a);var c=g(o),l=c||g(i),u=l||g(s);return"="===n&&u&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&u?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),r=n+o+"."+i+"."+s+a):l?r=">="+o+".0.0"+a+" <"+(+o+1)+".0.0"+a:u&&(r=">="+o+"."+i+".0"+a+" <"+o+"."+(+i+1)+".0"+a),O("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),O("xrange",e),e=function(e,t){return O("replaceStars",e,t),e.trim().replace(x[A.STAR],"")}(e,t),O("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)},v.prototype.intersects=function(e,t){if(!(e instanceof v))throw new TypeError("a Range is required");return this.set.some((function(r){return y(r,t)&&e.set.some((function(e){return y(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new v(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},v.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new i(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,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minVersion=function(e,t){e=new v(e,t);var r=new i("0.0.0");if(e.test(r))return r;if(r=new i("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 i(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 v(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=o(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new v(e,r),t=new v(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof i)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=x[A.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),x[A.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;x[A.COERCERTL].lastIndex=-1}else r=e.match(x[A.COERCE]);return null===r?null:o(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,kh.exports);var jh=kh.exports;!function(e,t){var r=Vr&&Vr.__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]}),n=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Vr&&Vr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t},i=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=o(jh),a=m(),c=Or,l=Lr,u=Rr;t._findMatch=function(t,r,n,o){return i(this,void 0,void 0,(function*(){const i=c.platform();let l,u,p;for(const c of n){const n=c.version;if(a.debug(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(p=c.files.find((t=>{a.debug(`${t.arch}===${o} && ${t.platform}===${i}`);let r=t.arch===o&&t.platform===i;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),p)){a.debug("matched "+c.version),u=c;break}}return u&&p&&(l=Object.assign({},u),l.files=[p]),l}))},t._getOsVersion=function(){const t=c.platform();let r="";if("darwin"===t)r=""+l.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 u.existsSync(e)?r=""+u.readFileSync(e):u.existsSync(t)&&(r=""+u.readFileSync(t)),r}}(Dh,Dh.exports);for(var Uh=Dh.exports,Fh=Sr,Mh=[],Gh=0;256>Gh;++Gh)Mh[Gh]=(Gh+256).toString(16).substr(1);var Bh=function(){return Fh.randomBytes(16)},qh=function(e,t){var r=t||0;return""+Mh[e[r++]]+Mh[e[r++]]+Mh[e[r++]]+Mh[e[r++]]+"-"+Mh[e[r++]]+Mh[e[r++]]+"-"+Mh[e[r++]]+Mh[e[r++]]+"-"+Mh[e[r++]]+Mh[e[r++]]+"-"+Mh[e[r++]]+Mh[e[r++]]+Mh[e[r++]]+Mh[e[r++]]+Mh[e[r++]]+Mh[e[r++]]},Hh=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Bh)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;16>i;++i)t[n+i]=o[i];return t||qh(o)},Vh={},zh={},Xh=Vr&&Vr.__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]}),Wh=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yh=Vr&&Vr.__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)&&Xh(t,e,r);return Wh(t,e),t},Kh=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(zh,"__esModule",{value:!0}),zh.argStringToArray=zh.ToolRunner=void 0;const Jh=Yh(Or),Qh=Yh(Ar),Zh=Yh(Lr),em=Yh(Ir),tm=Yh(Sh),rm=Yh(Ih),nm=Fr,om="win32"===process.platform;zh.ToolRunner=class extends Qh.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 o=t?"":"[command]";if(om)if(this._isCmdFile()){o+=r;for(const e of n)o+=" "+e}else if(e.windowsVerbatimArguments){o+=`"${r}"`;for(const e of n)o+=" "+e}else{o+=this._windowsQuoteCmdArg(r);for(const e of n)o+=" "+this._windowsQuoteCmdArg(e)}else{o+=r;for(const e of n)o+=" "+e}return o}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(Jh.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+Jh.EOL.length),o=n.indexOf(Jh.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return om&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(om&&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 i of e)if(t.some((e=>e===i))){r=!0;break}if(!r)return e;let n='"',o=!0;for(let i=e.length;i>0;i--)n+=e[i-1],o&&"\\"===e[i-1]?n+="\\":'"'===e[i-1]?(o=!0,n+='"'):o=!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 Kh(this,void 0,void 0,(function*(){return!rm.isRooted(this.toolPath)&&(this.toolPath.includes("/")||om&&this.toolPath.includes("\\"))&&(this.toolPath=em.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield tm.which(this.toolPath,!0),new Promise(((e,t)=>Kh(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)+Jh.EOL);const n=new im(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield rm.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=Zh.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let s="";i.stdout&&i.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),s=this._processLineBuffer(e,s,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let a="";if(i.stderr&&i.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),a=this._processLineBuffer(e,a,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),i.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),i.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),i.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)=>{s.length>0&&this.emit("stdline",s),a.length>0&&this.emit("errline",a),i.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!i.stdin)throw Error("child process missing stdin");i.stdin.end(this.options.input)}}))))}))}},zh.argStringToArray=function(e){function t(e){o&&'"'!==e&&(i+="\\"),i+=e,o=!1}const r=[];let n=!1,o=!1,i="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&o?t(a):"\\"===a&&n?o=!0:" "!==a||n?t(a):i.length>0&&(r.push(i),i=""):o?t(a):n=!n}return i.length>0&&r.push(i.trim()),r};class im extends Qh.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=nm.setTimeout(im.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())}}var sm=Vr&&Vr.__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]}),am=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cm=Vr&&Vr.__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)&&sm(t,e,r);return am(t,e),t},lm=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Vh,"__esModule",{value:!0}),exports.getExecOutput_1=Vh.getExecOutput=exports.exec_2=Vh.exec=void 0;const um=Ur,pm=cm(zh);exports.exec_2=Vh.exec=ot,exports.getExecOutput_1=Vh.getExecOutput=function(e,t,r){var n,o;return lm(this,void 0,void 0,(function*(){let i="",s="";const a=new um.StringDecoder("utf8"),c=new um.StringDecoder("utf8"),l=null===(n=null==r?void 0:r.listeners)||void 0===n?void 0:n.stdout,u=null===(o=null==r?void 0:r.listeners)||void 0===o?void 0:o.stderr,p=Object.assign(Object.assign({},null==r?void 0:r.listeners),{stdout:e=>{i+=a.write(e),l&&l(e)},stderr:e=>{s+=c.write(e),u&&u(e)}}),f=yield ot(e,t,Object.assign(Object.assign({},r),{listeners:p}));return i+=a.end(),s+=c.end(),{exitCode:f,stdout:i,stderr:s}}))};var fm={},dm=Vr&&Vr.__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]}),hm=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mm=Vr&&Vr.__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)&&dm(t,e,r);return hm(t,e),t},vm=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(fm,"__esModule",{value:!0}),fm.RetryHelper=void 0;const ym=mm(m());fm.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 vm(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;ym.info(n.message)}const o=this.getSleepAmount();ym.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 vm(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var gm=Vr&&Vr.__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]}),wm=Vr&&Vr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Em=Vr&&Vr.__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)&&gm(t,e,r);return wm(t,e),t},_m=Vr&&Vr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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())}))},bm=Vr&&Vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rh,"__esModule",{value:!0}),Rh.evaluateVersions=Rh.isExplicitVersion=Rh.findFromManifest=Rh.getManifestFromRepo=Rh.findAllVersions=Bm=Rh.find=Rh.cacheFile=Gm=Rh.cacheDir=Rh.extractZip=Rh.extractXar=Rh.extractTar=Rh.extract7z=Mm=Rh.downloadTool=Rh.HTTPError=void 0;const Om=Em(m()),Rm=Em(Sh),Sm=Em(Rr),Im=Em(Uh),Tm=Em(Or),xm=Em(Ir),Pm=Em(zn),Am=Em(jh),Nm=Em(kr),Cm=Em(Nr),$m=Dr,Lm=bm(Hh),Dm=Vh,km=fm;class jm extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Rh.HTTPError=jm;const Um="win32"===process.platform,Fm="darwin"===process.platform;var Mm=Rh.downloadTool=function(e,t,r,n){return _m(this,void 0,void 0,(function*(){t=t||xm.join(ft(),Lm.default()),yield Rm.mkdirP(xm.dirname(t)),Om.debug("Downloading "+e),Om.debug("Destination "+t);const o=dt("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=dt("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new km.RetryHelper(3,o,i);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(Sm.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new Pm.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(Om.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const i=yield o.get(e,n);if(200!==i.message.statusCode){const t=new jm(i.message.statusCode);throw Om.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=Cm.promisify(Nm.pipeline),a=dt("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,Sm.createWriteStream(t)),Om.debug("download complete"),c=!0,t}finally{if(!c){Om.debug("download failed");try{yield Rm.rmRF(t)}catch(l){Om.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof jm&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))};Rh.extract7z=function(e,t,r){return _m(this,void 0,void 0,(function*(){$m.ok(Um,"extract7z() not supported on current OS"),$m.ok(e,'parameter "file" is required'),t=yield st(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",Om.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield Dm.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${xm.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],o={silent:!0};try{const e=yield Rm.which("powershell",!0);yield Dm.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},Rh.extractTar=function(e,t,r="xz"){return _m(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield st(t),Om.debug("Checking tar --version");let n="";yield Dm.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),Om.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],Om.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return Um&&o&&(i.push("--force-local"),s=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),o&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",s,"-f",a),yield Dm.exec("tar",i),t}))},Rh.extractXar=function(e,t,r=[]){return _m(this,void 0,void 0,(function*(){let n;$m.ok(Fm,"extractXar() not supported on current OS"),$m.ok(e,'parameter "file" is required'),t=yield st(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),Om.isDebug()&&n.push("-v");const o=yield Rm.which("xar",!0);var i;return yield Dm.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},Rh.extractZip=function(e,t){return _m(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield st(t),Um?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,""),o=yield Rm.which("pwsh",!1);if(o){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(" ")];Om.debug("Using pwsh at path: "+o),yield Dm.exec(`"${o}"`,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 Rm.which("powershell",!0);Om.debug("Using powershell at path: "+t),yield Dm.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return _m(this,void 0,void 0,(function*(){const r=yield Rm.which("unzip",!0),n=[e];Om.isDebug()||n.unshift("-q"),n.unshift("-o"),yield Dm.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))};var Gm=Rh.cacheDir=function(e,t,r,n){return _m(this,void 0,void 0,(function*(){if(r=Am.clean(r)||r,n=n||Tm.arch(),Om.debug(`Caching tool ${t} ${r} ${n}`),Om.debug("source dir: "+e),!Sm.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield at(t,r,n);for(const t of Sm.readdirSync(e)){const r=xm.join(e,t);yield Rm.cp(r,o,{recursive:!0})}return ct(t,r,n),o}))};Rh.cacheFile=function(e,t,r,n,o){return _m(this,void 0,void 0,(function*(){if(n=Am.clean(n)||n,o=o||Tm.arch(),Om.debug(`Caching tool ${r} ${n} ${o}`),Om.debug("source file: "+e),!Sm.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield at(r,n,o),s=xm.join(i,t);return Om.debug("destination file "+s),yield Rm.cp(e,s),ct(r,n,o),i}))};var Bm=Rh.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||Tm.arch(),lt(t)||(t=ut(it(e,r),t));let n="";if(t){t=Am.clean(t)||"";const o=xm.join(pt(),e,t,r);Om.debug("checking cache: "+o),Sm.existsSync(o)&&Sm.existsSync(o+".complete")?(Om.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):Om.debug("not found")}return n};Rh.findAllVersions=it,Rh.getManifestFromRepo=function(e,t,r,n="master"){return _m(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new Pm.HttpClient("tool-cache"),a={};r&&(Om.debug("set auth"),a.authorization=r);const c=yield s.getJson(i,a);if(!c.result)return o;let l="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){l=e.url;break}a.accept="application/vnd.github.VERSION.raw";let u=yield(yield s.get(l,a)).readBody();if(u){u=u.replace(/^\uFEFF/,"");try{o=JSON.parse(u)}catch(p){Om.debug("Invalid json")}}return o}))},Rh.findFromManifest=function(e,t,r,n=Tm.arch()){return _m(this,void 0,void 0,(function*(){return yield Im._findMatch(e,t,r,n)}))},Rh.isExplicitVersion=lt,Rh.evaluateVersions=ut;var qm={};Object.defineProperty(qm,"__esModule",{value:!0}),qm.retryAsPromised=qm.TimeoutError=void 0;let Hm=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};qm.TimeoutError=Hm,qm.retryAsPromised=ht;var Vm=qm.default=ht;let zm;const Xm=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||Rr.mkdir,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,o)=>t.mkdir(e,r,((e,t)=>e?o(e):n(t))))),e.stat=e.stat||r.stat||Rr.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||Rr.statSync,e.mkdirSync=e.mkdirSync||r.mkdirSync||Rr.mkdirSync,t},Wm=(e,t,r)=>{const n=Ir.dirname(e),o={...Xm(t),recursive:!1};if(n===e)try{return o.mkdirSync(e,o)}catch(i){if(i&&"EISDIR"!==i.code)throw i;return}try{return o.mkdirSync(e,o),r||e}catch(i){const t=i;if(t&&"ENOENT"===t.code)return Wm(e,o,Wm(n,o,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw i;try{if(!o.statSync(e).isDirectory())throw i}catch(s){throw i}}},Ym=Object.assign((async(e,t,r)=>{const n=Xm(t);n.recursive=!1;const o=Ir.dirname(e);return o===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const i=t;if(i&&"ENOENT"===i.code)return Ym(o,n).then((t=>Ym(e,n,t)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:Wm}),Km=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?Km(e,Ir.dirname(t),t):void 0))},Jm=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?Jm(e,Ir.dirname(t),t):void 0}},Qm=(e,t)=>{const r=Xm(t);if(r.recursive=!0,Ir.dirname(e)===e)return r.mkdirSync(e,r);const n=Jm(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return Wm(e,r);throw o}},Zm=Object.assign((async(e,t)=>{const r={...Xm(t),recursive:!0};return Ir.dirname(e)===e?await r.mkdirAsync(e,r):Km(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return Ym(e,r);throw t}))))}),{sync:Qm}),ev=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,tv=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=Ir.resolve(e),"win32"===ev){const t=/[*|"<>?:]/,{root:r}=Ir.parse(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},rv=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),nv=+rv[0]>10||10==+rv[0]&&+rv[1]>=12,ov=nv?e=>Xm(e).mkdirSync===Rr.mkdirSync:()=>!1,iv=Object.assign(nv?e=>Xm(e).mkdir===Rr.mkdir:()=>!1,{sync:ov}),sv=(e,t)=>{e=tv(e);const r=Xm(t);return ov(r)?Qm(e,r):Wm(e,r)},av=Object.assign((async(e,t)=>{e=tv(e);const r=Xm(t);return iv(r)?Zm(e,r):Ym(e,r)}),{mkdirpSync:sv,mkdirpNative:Zm,mkdirpNativeSync:Qm,mkdirpManual:Ym,mkdirpManualSync:Wm,sync:sv,native:Zm,nativeSync:Qm,manual:Ym,manualSync:Wm,useNative:iv,useNativeSync:ov}),cv=/v?(\d\S*)/,lv="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",uv={llvm:lv,clang:lv,"clang++":lv,"clang-tidy":lv,clangtidy:lv,"clang-format":lv,clangformat:lv,ninja:"1.12.1",cmake:"3.30.2",gcovr:"5.2",conan:"1.64.1",meson:"1.5.1",kcov:"42",task:"3.38.0",doxygen:De()?"1.11.0-4":"1.11.0",gcc:"win32"===process.platform?"14.2.0posix-18.1.8-12.0.0-ucrt-r1":"",powershell:"7.4.5"},pv="22.2.0",fv="3.7.9",dv={mingw:{24:"8.0.0-1",22:"8.0.0-1",20:"7.0.0-2"},gcovr:{24:"6.0",22:"6.0",20:"6.0",18:"5.0"},meson:{24:"1.0.0",22:"1.0.0",20:"1.0.0",18:"0.61.4"},nala:{24:"",22:"",21:"legacy",20:"legacy",18:"legacy",16:"legacy",14:"legacy"},kcov:{24:"42-binary",22:"42-binary",20:"40-binary",18:"40",16:"40",14:"40"},doxygen:{24:"1.11.0",22:"1.11.0",20:"1.10.0",18:"1.10.0"}},hv=$u((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 exports.getExecOutput_1(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Ir.join(r,"Scripts"),Ir.join(r,"Scripts","bin"),Ir.join(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var mv={};Object.defineProperty(mv,"__esModule",{value:!0});var vv=mv.getUbuntuVersion=void 0;const yv=Lr;vv=mv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{yv.execFile(t,r,{encoding:"utf8",shell:!1},((o,i,s)=>{if(o)return"errno"in o&&"ENOENT"===o.code?void e(null):void n(Error(`Could not execute \`${t} ${r.join(" ")}\`: ${o} (stderr=${s})`));e(i)}))})));var t,r;if(null===e)return[];const n=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,i=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let s=null,a=null,c=!1;for(const l of e.split("\n")){const e=l.match(n);if(null!==e){if("Ubuntu"!==e[1])return[];c=!0}const t=l.match(o);t&&(s=t);const r=l.match(i);if(r&&(a=r),c&&s&&a)break}if(!c)return[];for(const l of[s,a])if(l){const e=[l[1],l[2]];return l[3]&&e.push(l[3]),e.map((e=>parseInt(e,10)))}return[]};const gv=$u((async function(){try{if(ke()){try{null===oa.sync("lsb_release",{nothrow:!0})&&await Ie([{name:"lsb-release"}])}catch{return Lt()}const e=await vv();return 0===e.length?Lt():e}return null}catch(e){return y(""+e),null}}),{promise:!0}),wv=$u((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=te("~/.local/pipx");if(await ee(t))return t;switch(process.platform){case"win32":e=te("~/AppData/Local/pipx");break;case"darwin":e=te("~/Library/Application Support/pipx");break;default:e=te("~/.local/share/pipx")}return await av(e),await av(Ir.join(e,"trash")),await av(Ir.join(e,"shared")),await av(Ir.join(e,"venv")),e}),{promise:!0}),Ev=$u((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=te("~/.local/bin");return await se(e,cy),await av(e),e}),{promise:!0}),_v=$u((async function(){const e=(await It(Ct("python",void 0,await gv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),bv=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"]]]),Ov=$u((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||Or.release()).split(".")[0];const[t,r]=bv.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Rv="string"==typeof __dirname?__dirname:Ir.dirname(jr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Gr&&Gr.src||new URL("setup-cpp.js",document.baseURI).href)),Sv="string"==typeof __dirname?__dirname:Ir.dirname(jr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Gr&&Gr.src||new URL("setup-cpp.js",document.baseURI).href));class Iv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Tv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const xv=e=>void 0===globalThis.DOMException?new Tv(e):new DOMException(e),Pv=e=>{const t=void 0===e.reason?xv("This operation was aborted."):e.reason;return t instanceof Error?t:xv(t)},Av=m(),Nv=Lr,Cv=Rr,$v=Ir,Lv=$r,Dv=Lv.env["ProgramFiles(x86)"],kv=[Lv.env["ProgramFiles(x86)"],Lv.env.ProgramFiles],jv=["Enterprise","Professional","Community","BuildTools"],Uv=["2022","2019","2017"],Fv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Mv=rr;const Gv=Dv+"\\Microsoft Visual Studio\\Installer";var Bv=or,qv=function(e,t,r,n,o,i){if("win32"!=Lv.platform)return void Av.info("This is not a Windows virtual environment, bye!");Lv.env.PATH+=$v.delimiter+Gv;let s={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in s&&(e=s[e.toLowerCase()]);var a=[e];n&&!0===JSON.parse(n)&&a.push("uwp"),t&&a.push(t),r&&a.push("-vcvars_ver="+r),o&&!0===JSON.parse(o)&&a.push("-vcvars_spectre_libs=spectre");const c=`"${or(i)}" ${a.join(" ")}`;Av.debug("vcvars command-line: "+c);const l=(""+Nv.execSync(`set && cls && ${c} && cls && set`,{shell:"cmd"})).split("\f"),u=l[0].split("\r\n"),p=l[1].split("\r\n"),f=l[2].split("\r\n"),d=p.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(d.length>0)throw Error("invalid parameters\r\n"+d.join("\r\n"));let h={};for(let m of u){const[e,t]=m.split("=");h[e]=t}Av.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Av.info("Setting "+e),ir(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Av.exportVariable(e,t))}Av.endGroup(),Av.info("Configured Developer Command Prompt")},Hv=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(Hv||{});const Vv="string"==typeof __dirname?__dirname:Ir.dirname(jr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Gr&&Gr.src||new URL("setup-cpp.js",document.baseURI).href)),zv="string"==typeof __dirname?__dirname:Ir.dirname(jr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Gr&&Gr.src||new URL("setup-cpp.js",document.baseURI).href)),Xv=$u((async function(e,t,r){const[n,o]=await Promise.all([fr(e,t,r),hr()]);return await Yv(r),n}),{promise:!0}),Wv=$u((async function(e){ke()?e>10?await Ie([{name:"libtinfo-dev"}]):await Ie([{name:"libtinfo5"}]):De()?await Me("ncurses5-compat-libs",void 0,"yay"):Le()&&await Fe([{name:"ncurses-compat-libs"}])}),{promise:!0}),Yv=$u((async function(e){"linux"===process.platform&&await Xt(Ct("gcc",void 0,await gv()),"",e,40)}),{promise:!0}),Kv="string"==typeof __dirname?__dirname:Ir.dirname(jr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Gr&&Gr.src||new URL("setup-cpp.js",document.baseURI).href));let Jv,Qv=!1;const Zv={llvm:lr,clang:lr,"clang++":lr},ey={gcc:Xt,"g++":Xt},ty={mingw:Wt},ry={msvc:mr,cl:mr,msbuild:mr,visualstudio:mr},ny={appleclang:tr,applellvm:tr,"apple-clang":tr,"apple-llvm":tr},oy=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],iy={...Zv,...ey,...ty,...ry,...ny,nala:async function(e,t,r){if(!ke())return;if("string"==typeof Jv)return{binDir:Jv};const n=oa.sync("nala",{nothrow:!0});if(null!==n)return Jv=Ir.dirname(n),{binDir:Jv};await Ie([{name:"python3-apt"}]),Jv="/usr/bin";try{const t=await Re({name:"nala",version:e});if(void 0!==t)return await Ie([{name:t}]),{binDir:Jv}}catch(o){w("Failed to install nala: "+o)}try{const e=await Re({name:"nala-legacy"});if(void 0!==e)return await Ie([{name:e}],!0),{binDir:Jv}}catch(o){w("Failed to install nala-legacy: "+o)}return await async function(){const e=new jd.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",Or.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Ir.join(Or.tmpdir(),"install-nala.sh"),r=await bs(t,"utf8");await Cs(t,r.replace(/sudo/g,"")),await Ie([{name:"wget"}]);try{j("bash",[t])}catch(o){v("Failed to install nala via installer: "+o),j("apt",["install","-y","-t","nala","nala"])}}(),{binDir:Jv}},cmake:Ot,ninja:Jt,python:It,vcpkg:async function(e,t,r){return Qv&&null!==oa.sync("vcpkg",{nothrow:!0})?{binDir:Ir.dirname(oa.sync("vcpkg"))}:("linux"===process.platform&&(De()?await Promise.all([Me("curl"),Me("zip"),Me("unzip"),Me("tar"),Me("git"),Me("pkg-config")]):Le()?await Fe([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):ke()&&await Ie([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await ee(Ir.join(t,We("bootstrap-vcpkg",".bat")))?g(`Vcpkg folder already exists at ${t}. Skipping the clone`):A("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Ir.dirname(t),stdio:"inherit"}),""!==e&&"true"!==e&&(w("Checking out vcpkg version "+e),A("git",["checkout",e],{cwd:t,stdio:"inherit"})),A(We(Ye("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await B(t),await se(t,cy),Qv=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return Ue("bazelisk",e);case"darwin":return $e("bazelisk",e);case"linux":if(De())throw Error("installing bazel on Arch linux is not supported yet");if(Le())return await Fe([{name:"dnf-plugins-core"}]),j("dnf",["copr","enable","vbatts/bazel"]),Fe([{name:"bazel4"}]);if(ke())return j("bash",["-c",`echo "deb [arch=amd64 signed-by=${await Te({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`]),Ie([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Dt("conan",e)},meson:function(e,t,r){return Dt("meson",e)},gcovr:function(e,t,r){return Dt("gcovr",e)},opencppcoverage:vr,OpenCppCoverage:vr,choco:je,brew:Ae,powershell:wr,pwsh:wr,ccache:function(e,t,r){switch(process.platform){case"win32":return Ue("ccache",e);case"darwin":return $e("ccache",e);case"linux":if(De())return Me("ccache",e);if(Le())return Fe([{name:"ccache",version:e}]);if(ke())return Ie([{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 Ue("sccache",e);case"linux":case"darwin":return $e("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await Vm((()=>Ue("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>w(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 ee(Ir.join(e,"doxygen.exe")))return await se(e,cy),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Ft(Ct("graphviz",void 0)),t}case"darwin":{const e=await $e("doxygen",void 0);return Ov()[0]>11&&await Ft(Ct("graphviz",void 0)),e}case"linux":{let o;if(""===e||De()||Le())if(De())o=await Me("doxygen",e);else{if(Le())return Fe([{name:"doxygen",version:e}]);if(!ke())throw Error("Unsupported linux distributions");o=await Ie([{name:"doxygen",version:e}])}else{if(!ke())throw Error("Unsupported linux distributions");try{o=await _t("doxygen",e,Gt,t,r);try{await Ie([{name:"libclang-cpp9"}])}catch(n){w("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){g(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),o=await Ie([{name:"doxygen"}])}}return await Ft(Ct("graphviz",void 0,await gv())),o}default:throw Error("Unsupported platform")}},graphviz:Ft,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await Ue("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await se(e,cy),e}()};case"darwin":return $e("cppcheck",e);case"linux":if(De())return Me("cppcheck",e);if(Le())return Fe([{name:"ccache",version:e}]);if(ke())return Ie([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},"clang-tidy":pr,clangtidy:pr,"clang-format":ur,clangformat:ur,vcvarsall:sr,kcov:async function(e,t,r){if("linux"!==process.platform)return void w("Kcov is not supported on non-linux");const n=e.split("-");let o=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const i=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(o);let a;return 38===s&&(o="v38"),"binary"!==i||39>s?(a=await _t("kcov",o,Zt,t,r),a):(a=await _t("kcov",o,Qt,t,r),De()?await Me("binutils"):Le()?await Fe([{name:"binutils"}]):ke()&&await Ie([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return Ue("make",e);case"darwin":{await $e("make",e);const t=Ir.join(Ce(),"opt/make/libexec/gnubin");return await se(t,cy),{binDir:t}}case"linux":if(De())return Me("make",e);if(Le())return Fe([{name:"make",version:e}]);if(ke())return Ie([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return _t("task",e,Er,t,r)},sevenzip:mt,"7zip":mt,"7z":mt},sy=Object.keys(iy),ay=["compiler","architecture","timeout",...sy],cy={rcPath:te("~/.cpprc"),guard:"cpp"};(async function(e){var t,r,n;let o=Promise.resolve();zr.GITHUB_ACTIONS||(o=async function(){try{await Dd({pkg:kd})}catch(e){y("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS="true");const i=function(e){return function(e,t){var r,n,o,i,s,a={_:[]},c=0,l=0,u=0,p=(e=e||[]).length;const f=void 0!==(t=t||{}).alias,d=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=me(t.string),t.boolean=me(t.boolean),f)for(r in t.alias)for(n=t.alias[r]=me(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(l=(n=t.alias[t.boolean[c]]||[]).length;l-- >0;)t.boolean.push(n[l]);for(c=t.string.length;c-- >0;)for(l=(n=t.alias[t.string[c]]||[]).length;l-- >0;)t.string.push(n[l]);if(h)for(r in t.default)if(i=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],void 0!==t[i])for(t[i].push(r),c=0;n.length>c;c++)t[i].push(n[c]);const m=d?Object.keys(t.alias):[];for(c=0;p>c;c++){if("--"===(o=e[c])){a._=a._.concat(e.slice(++c));break}for(l=0;o.length>l&&45===o.charCodeAt(l);l++);if(0===l)a._.push(o);else if("no-"===o.substring(l,l+3)){if(i=o.substring(l+3),d&&!~m.indexOf(i))return t.unknown(o);a[i]=!1}else{for(u=l+1;o.length>u&&61!==o.charCodeAt(u);u++);for(i=o.substring(l,u),s=o.substring(++u)||c+1===p||45===(""+e[c+1]).charCodeAt(0)||e[++c],n=2===l?[i]:i,u=0;n.length>u;u++){if(i=n[u],d&&!~m.indexOf(i))return t.unknown("-".repeat(l)+i);ve(a,i,n.length>u+1||s,t)}}}if(h)for(r in t.default)void 0===a[r]&&(a[r]=t.default[r]);if(f)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}(e,{string:[...ay,"timeout"],default:Object.fromEntries(ay.map((e=>[e,_r(e)]))),alias:{h:"help"},boolean:"help"})}(e);i.help&&(w('\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 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 you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));const s=null!=(t=i.architecture)?t:process.arch,a=null!=(r=process.env.SETUP_CPP_DIR)?r:te("~"),c=[],l=[],u=up.create({autoloadLocales:!0});let p,f;up.addLocale(pp),rp.addLocale(np);const d=await gv();if(!function(e){const t=oy.filter((t=>void 0!==e[t])),r=t.filter((t=>!$t(e[t]))),n=1>r.length?"true":e[r[0]];if(r.some((t=>e[t]!==n)))return!1;for(const o of t)e[o]=n;return!0}(i))return v("The same version must be used for llvm, clang-format and clang-tidy"),1;De()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&(w("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await Me("python-pygments"));let h=!1;for(const m of sy){if(zr.isCI&&0!==l.length){h=!0;break}const e=i[m];void 0!==e&&(p=Date.now(),await ar(m,e,d,s,a,c,l,6e4*Number.parseFloat(null!=(n=i.timeout)?n:"20")),f=Date.now(),w("took "+(u.format(p,f)||"0 seconds")))}if(!h){const e=i.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i){const{compiler:s,version:a}=function(e){try{const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null===Lp(e)&&w(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}catch(t){return v(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(e);let c;try{if(so.startGroup(`Installing ${s} ${null!=a?a:""}`),s in Zv)c=await lr(Ct("llvm",a,t),Ir.join(r,"llvm"),n),await oe("GCOV","llvm-cov gcov",cy);else if(s in ey){const e=Ct("gcc",a,t);c=await Xt(e,Ir.join(r,"gcc"),n),await Yt(e)}else if(s in ty){const e=Ct("mingw",a,t);c=await Wt(e,Ir.join(r,"gcc"),n),await Yt(e)}else s in ry?c=await mr(Ct("msvc",a,t),Ir.join(r,"msvc"),n):s in ny?await tr():(c=null,i.push("Unsupported compiler "+s))}catch(l){v(l),i.push("Failed to install the "+e)}null!==c&&o.push(br(s,c)),so.endGroup()}(e,d,a,s,c,l);const r=Date.now();w("took "+(u.format(t,r)||"0 seconds"))}}if(await async function(e){if(await ee(e.rcPath)){const t=(await ku(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await ju(e.rcPath,r.join("\n")),await B(e.rcPath)}}(cy),0===c.length&&0===l.length)return y("setup-cpp was called without any arguments. Nothing to do."),0;for(const m of c)console.log(`${m}`);for(const m of l)v(m);if(w("setup-cpp finished"),!zr.GITHUB_ACTIONS)switch(process.platform){case"win32":y("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":y("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await o,0===l.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{v("main() panicked!"),v(e),process.exitCode=1})),exports.ciInfo=zr,exports.commonjsGlobal=Vr,exports.coreExports=so,exports.exec=Vh,exports.getAugmentedNamespace=r,exports.getDefaultExportFromCjs=t,exports.info=w,exports.io=Sh,exports.pathExists=ee,exports.requireCore=m,exports.semver=yd,exports.semverExports=jh,exports.tunnel=Un,exports.v4_1=Hh,exports.warning=y; //# sourceMappingURL=setup-cpp.js.map diff --git a/dist/legacy/setup-cpp.js.map b/dist/legacy/setup-cpp.js.map index e7d9e421..df42973c 100644 --- a/dist/legacy/setup-cpp.js.map +++ b/dist/legacy/setup-cpp.js.map @@ -1 +1 @@ -{"version":3,"file":"setup-cpp.js","sources":["../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/proxy.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js","../../packages/ci-log/dist/index.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js","../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js","../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js","../../packages/exec-powershell/dist/index.js","../../node_modules/.pnpm/admina@1.0.1/node_modules/admina/dist/index.node.mjs","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/mixin.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/index.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/is-implemented.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/implementation.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/validate-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/index.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-implemented.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/polyfill.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/generate-name.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/standard-symbols.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/symbol-registry.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-arguments.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-function.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/is-string.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/e-index-of.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/map.js","../../node_modules/.pnpm/next-tick@1.1.0/node_modules/next-tick/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-callable.js","../../node_modules/.pnpm/is-promise@2.2.2/node_modules/is-promise/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/promise.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/primitive-set.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/to-short-string-representation.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/safe-to-string.js","../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js","../../packages/untildify-user/dist/index.js","../../packages/envosman/dist/rc-file.js","../../packages/envosman/dist/add-env.js","../../packages/envosman/dist/utils.js","../../packages/envosman/dist/add-path.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/lib/time-delta.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js","../../node_modules/.pnpm/simple-update-notifier@2.0.0/node_modules/simple-update-notifier/build/index.js","../../node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs","../../packages/setup-apt/dist/alternatives.js","../../packages/setup-apt/dist/apt-env.js","../../packages/setup-apt/dist/get-apt.js","../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js","../../packages/setup-apt/dist/is-installed.js","../../packages/setup-apt/dist/qualify-install.js","../../packages/setup-apt/dist/install.js","../../packages/setup-apt/dist/apt-repository.js","../../packages/setup-apt/dist/apt-key.js","../../packages/setup-brew/dist/install.js","../../packages/setup-brew/dist/install-pack.js","../../src/utils/env/hasDnf.ts","../../src/utils/env/isArch.ts","../../src/utils/env/isUbuntu.ts","../../src/chocolatey/chocolatey.ts","../../src/utils/setup/setupChocoPack.ts","../../src/utils/setup/setupDnfPack.ts","../../src/utils/setup/setupPacmanPack.ts","../../node_modules/.pnpm/patha@0.4.1/node_modules/patha/dist/index.node.mjs","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/tool-cache.js","../../node_modules/.pnpm/retry-as-promised@7.0.4/node_modules/retry-as-promised/dist/index.js","../../src/sevenzip/sevenzip.ts","../../src/utils/setup/extract.ts","../../src/utils/setup/setupBin.ts","../../src/cmake/cmake.ts","../../src/utils/setup/version.ts","../../src/utils/std/index.ts","../../src/python/python.ts","../../src/versions/versions.ts","../../src/utils/env/ubuntu_version.ts","../../src/utils/setup/setupPipPack.ts","../../src/graphviz/graphviz.ts","../../src/utils/setup/setupDmg.ts","../../src/doxygen/doxygen.ts","../../src/macos-sdk/macos-sdk.ts","../../src/utils/asset/load-assets.ts","../../src/gcc/gcc.ts","../../src/ninja/ninja.ts","../../src/kcov/kcov.ts","../../node_modules/.pnpm/msvc-dev-cmd@https+++codeload.github.com+aminya+msvc-dev-cmd+tar.gz+c01f519bd995460228ed3dec4df51df92dc290fd/node_modules/msvc-dev-cmd/lib.js","../../src/vcvarsall/vcvarsall.ts","../../src/installTool.ts","../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js","../../src/llvm/llvm_url.ts","../../src/llvm/llvm.ts","../../src/llvm/llvm_installer.ts","../../src/msvc/msvc.ts","../../src/powershell/powershell.ts","../../src/task/task.ts","../../src/cli-options.ts","../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/auth.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js","../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js","../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js","../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js","../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js","../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js","../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js","../../src/utils/compat/fs/promises.ts","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js","../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/_iterate.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/normalize-options.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-integer.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-pos-integer.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-length.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-callable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/for-each.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-object.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/error/custom.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/_define-length.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/value/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/object/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/function/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/prototype/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/is.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/shim.js","../../node_modules/.pnpm/d@1.0.2/node_modules/d/index.js","../../node_modules/.pnpm/event-emitter@0.3.5/node_modules/event-emitter/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-resolve.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/to-array.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-normalize.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/configure-map.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/plain.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/primitive.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-primitive-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-1.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/async.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/dispose.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max-age.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/valid-timeout.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/max-timeout.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max.js","../../node_modules/.pnpm/lru-queue@0.1.0/node_modules/lru-queue/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/ref-counter.js","../../node_modules/.pnpm/escape-path-with-spaces@1.0.2/node_modules/escape-path-with-spaces/index.js","../../node_modules/.pnpm/escape-quotes@1.0.2/node_modules/escape-quotes/lib/escape-quotes.js","../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/lib/numerous.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/locales/en.js","../../node_modules/.pnpm/is-node@1.0.2/node_modules/is-node/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/locales/en.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js","../../node_modules/.pnpm/node-downloader-helper@2.1.9/node_modules/node-downloader-helper/dist/index.js","../../packages/setup-apt/dist/apt-timeout.js","../../packages/setup-apt/dist/update.js","../../packages/setup-apt/dist/init-apt.js","../../node_modules/.pnpm/replace-ext@2.0.0/node_modules/replace-ext/index.js","../../src/utils/env/arch.ts","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","../../node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/manifest.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/retry-helper.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/opts-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-manual.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/find-made.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/path-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/use-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/index.js","../../src/versions/default_versions.ts","../../node_modules/.pnpm/ubuntu-version@2.0.0/node_modules/ubuntu-version/index.js","../../node_modules/.pnpm/macos-release@3.3.0/node_modules/macos-release/index.js","../../src/utils/env/macos_version.ts","../../src/nala/nala.ts","../../src/vcpkg/vcpkg.ts","../../src/tool.ts","../../src/bazel/bazel.ts","../../src/conan/conan.ts","../../src/meson/meson.ts","../../src/gcovr/gcovr.ts","../../src/opencppcoverage/opencppcoverage.ts","../../src/ccache/ccache.ts","../../src/sccache/sccache.ts","../../src/cppcheck/cppcheck.ts","../../src/make/make.ts","../../src/setup-cpp.ts","../../src/check-updates.ts","../../src/compilers.ts"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","export function getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new DecodedURL(proxyVar);\n }\n catch {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new DecodedURL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexport function checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\nclass DecodedURL extends URL {\n _decodedUsername;\n _decodedPassword;\n constructor(url, base) {\n super(url, base);\n this._decodedUsername = decodeURIComponent(super.username);\n this._decodedPassword = decodeURIComponent(super.password);\n }\n get username() {\n return this._decodedUsername;\n }\n get password() {\n return this._decodedPassword;\n }\n}\n//# sourceMappingURL=proxy.js.map","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","import * as core from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nexport function error(err) {\n return GITHUB_ACTIONS ? core.error(err) : console.log(`\\x1b[31m${err}\\x1b[0m`);\n}\nexport function success(msg) {\n return console.log(`\\x1b[32m${msg}\\x1b[0m`);\n}\nexport function warning(msg) {\n return GITHUB_ACTIONS ? core.warning(msg) : console.log(`\\x1b[33m${msg}\\x1b[0m`);\n}\nexport function notice(msg) {\n return GITHUB_ACTIONS ? core.notice(msg) : console.log(`\\x1b[94m${msg}\\x1b[0m`);\n}\nexport function info(msg) {\n return GITHUB_ACTIONS ? core.info(msg) : console.log(msg);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxlQUFlLENBQUE7QUFDckMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUV4QyxNQUFNLFVBQVUsS0FBSyxDQUFDLEdBQW1CO0lBQ3ZDLE9BQU8sY0FBYyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLFdBQVcsR0FBRyxTQUFTLENBQUMsQ0FBQTtBQUNoRixDQUFDO0FBRUQsTUFBTSxVQUFVLE9BQU8sQ0FBQyxHQUFXO0lBQ2pDLE9BQU8sT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLEdBQUcsU0FBUyxDQUFDLENBQUE7QUFDN0MsQ0FBQztBQUVELE1BQU0sVUFBVSxPQUFPLENBQUMsR0FBVztJQUNqQyxPQUFPLGNBQWMs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zogc3RyaW5nKSB7XG4gIHJldHVybiBHSVRIVUJfQUNUSU9OUyA/IGNvcmUud2FybmluZyhtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzMzbSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vdGljZShtc2c6IHN0cmluZykge1xuICByZXR1cm4gR0lUSFVCX0FDVElPTlMgPyBjb3JlLm5vdGljZShtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzk0bSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGluZm8obXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5pbmZvKG1zZykgOiBjb25zb2xlLmxvZyhtc2cpXG59XG4iXX0=","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n","export function isStream(stream) {\n\treturn stream !== null\n\t\t&& typeof stream === 'object'\n\t\t&& typeof stream.pipe === 'function';\n}\n\nexport function isWritableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.writable !== false\n\t\t&& typeof stream._write === 'function'\n\t\t&& typeof stream._writableState === 'object';\n}\n\nexport function isReadableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.readable !== false\n\t\t&& typeof stream._read === 'function'\n\t\t&& typeof stream._readableState === 'object';\n}\n\nexport function isDuplexStream(stream) {\n\treturn isWritableStream(stream)\n\t\t&& isReadableStream(stream);\n}\n\nexport function isTransformStream(stream) {\n\treturn isDuplexStream(stream)\n\t\t&& typeof stream._transform === 'function';\n}\n","'use strict';\nconst {constants: BufferConstants} = require('buffer');\nconst stream = require('stream');\nconst {promisify} = require('util');\nconst bufferStream = require('./buffer-stream');\n\nconst streamPipelinePromisified = promisify(stream.pipeline);\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nasync function getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\tthrow new Error('Expected a stream');\n\t}\n\n\toptions = {\n\t\tmaxBuffer: Infinity,\n\t\t...options\n\t};\n\n\tconst {maxBuffer} = options;\n\tconst stream = bufferStream(options);\n\n\tawait new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\t// Don't retrieve an oversized buffer.\n\t\t\tif (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\n\t\t\treject(error);\n\t\t};\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tawait streamPipelinePromisified(inputStream, stream);\n\t\t\t\tresolve();\n\t\t\t} catch (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t}\n\t\t})();\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t});\n\n\treturn stream.getBufferedValue();\n}\n\nmodule.exports = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});\nmodule.exports.array = (stream, options) => getStream(stream, {...options, array: true});\nmodule.exports.MaxBufferError = MaxBufferError;\n","import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n","import os from 'node:os';\nimport onExit from 'signal-exit';\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior\nexport const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {\n\tconst killResult = kill(signal);\n\tsetKillTimeout(kill, signal, options, killResult);\n\treturn killResult;\n};\n\nconst setKillTimeout = (kill, signal, options, killResult) => {\n\tif (!shouldForceKill(signal, options, killResult)) {\n\t\treturn;\n\t}\n\n\tconst timeout = getForceKillAfterTimeout(options);\n\tconst t = setTimeout(() => {\n\t\tkill('SIGKILL');\n\t}, timeout);\n\n\t// Guarded because there's no `.unref()` when `execa` is used in the renderer\n\t// process in Electron. This cannot be tested since we don't run tests in\n\t// Electron.\n\t// istanbul ignore else\n\tif (t.unref) {\n\t\tt.unref();\n\t}\n};\n\nconst shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;\n\nconst isSigterm = signal => signal === os.constants.signals.SIGTERM\n\t\t|| (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');\n\nconst getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {\n\tif (forceKillAfterTimeout === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterTimeout\\` option to be a non-negative integer, got \\`${forceKillAfterTimeout}\\` (${typeof forceKillAfterTimeout})`);\n\t}\n\n\treturn forceKillAfterTimeout;\n};\n\n// `childProcess.cancel()`\nexport const spawnedCancel = (spawned, context) => {\n\tconst killResult = spawned.kill();\n\n\tif (killResult) {\n\t\tcontext.isCanceled = true;\n\t}\n};\n\nconst timeoutKill = (spawned, signal, reject) => {\n\tspawned.kill(signal);\n\treject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));\n};\n\n// `timeout` option handling\nexport const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {\n\tif (timeout === 0 || timeout === undefined) {\n\t\treturn spawnedPromise;\n\t}\n\n\tlet timeoutId;\n\tconst timeoutPromise = new Promise((resolve, reject) => {\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutKill(spawned, killSignal, reject);\n\t\t}, timeout);\n\t});\n\n\tconst safeSpawnedPromise = spawnedPromise.finally(() => {\n\t\tclearTimeout(timeoutId);\n\t});\n\n\treturn Promise.race([timeoutPromise, safeSpawnedPromise]);\n};\n\nexport const validateTimeout = ({timeout}) => {\n\tif (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) {\n\t\tthrow new TypeError(`Expected the \\`timeout\\` option to be a non-negative integer, got \\`${timeout}\\` (${typeof timeout})`);\n\t}\n};\n\n// `cleanup` option handling\nexport const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {\n\tif (!cleanup || detached) {\n\t\treturn timedPromise;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tspawned.kill();\n\t});\n\n\treturn timedPromise.finally(() => {\n\t\tremoveExitHandler();\n\t});\n};\n","// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n","import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n","import {createWriteStream} from 'node:fs';\nimport {ChildProcess} from 'node:child_process';\nimport {isWritableStream} from 'is-stream';\n\nconst isExecaChildProcess = target => target instanceof ChildProcess && typeof target.then === 'function';\n\nconst pipeToTarget = (spawned, streamName, target) => {\n\tif (typeof target === 'string') {\n\t\tspawned[streamName].pipe(createWriteStream(target));\n\t\treturn spawned;\n\t}\n\n\tif (isWritableStream(target)) {\n\t\tspawned[streamName].pipe(target);\n\t\treturn spawned;\n\t}\n\n\tif (!isExecaChildProcess(target)) {\n\t\tthrow new TypeError('The second argument must be a string, a stream or an Execa child process.');\n\t}\n\n\tif (!isWritableStream(target.stdin)) {\n\t\tthrow new TypeError('The target child process\\'s stdin must be available.');\n\t}\n\n\tspawned[streamName].pipe(target.stdin);\n\treturn target;\n};\n\nexport const addPipeMethods = spawned => {\n\tif (spawned.stdout !== null) {\n\t\tspawned.pipeStdout = pipeToTarget.bind(undefined, spawned, 'stdout');\n\t}\n\n\tif (spawned.stderr !== null) {\n\t\tspawned.pipeStderr = pipeToTarget.bind(undefined, spawned, 'stderr');\n\t}\n\n\tif (spawned.all !== undefined) {\n\t\tspawned.pipeAll = pipeToTarget.bind(undefined, spawned, 'all');\n\t}\n};\n","import * as execa from \"execa\";\nimport which from \"which\";\n/** The cached powershell path */\nlet powershell;\n/**\n * Asynchronously execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns A promise to the execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershell(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execa(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns The execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershellSync(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execaSync(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Get the path to the powershell executable.\n *\n * @note It prefers `pwsh` over `powershell`\n * @note It caches the path for the subsequent calls to this function\n */\nexport function getPowerShell() {\n if (powershell === undefined) {\n const maybePwsh = which.sync(\"pwsh\", { nothrow: true });\n if (maybePwsh !== null) {\n powershell = maybePwsh;\n }\n const maybePowerShell = which.sync(\"powershell\", { nothrow: true });\n if (maybePowerShell !== null) {\n powershell = maybePowerShell;\n }\n }\n if (powershell === undefined) {\n throw new Error(\"Could not find powershell\");\n }\n return powershell;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLGlDQUFpQztBQUNqQyxJQUFJLFVBQThCLENBQUE7QUFFbEM7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLGNBQWMsQ0FDNUIsT0FBZSxFQUNmLGVBQXlCLENBQUMsWUFBWSxFQUFFLFNBQVMsRUFBRSxpQkFBaUIsQ0FBQyxFQUNyRSxjQUE2QixFQUFFLEtBQUssRUFBRSxTQUFTLEV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gIGlmIChtYXliZVBvd2VyU2hlbGwgIT09IG51bGwpIHtcbiAgICAgIHBvd2Vyc2hlbGwgPSBtYXliZVBvd2VyU2hlbGxcbiAgICB9XG4gIH1cbiAgaWYgKHBvd2Vyc2hlbGwgPT09IHVuZGVmaW5lZCkge1xuICAgIHRocm93IG5ldyBFcnJvcihcIkNvdWxkIG5vdCBmaW5kIHBvd2Vyc2hlbGxcIilcbiAgfVxuICByZXR1cm4gcG93ZXJzaGVsbFxufVxuIl19","function e(e,t,r,o){Object.defineProperty(e,t,{get:r,set:o,enumerable:!0,configurable:!0})}function t(){return null!==m.sync(\"sudo\",{nothrow:!0})}function r(){return process.getuid?.()===0||!!process.env.CI}function o(){return r()&&t()}function n(e){return o()?`sudo ${e}`:e}function s(e,t=[],r=h){return o()?b(a(e,t),r):l(e,i(t),r)}function c(e,t=[],r=h){return o()?y(a(e,t),r):S(e,i(t),r)}function a(e,t){return`sudo ${i([e,...t]).join(\" \")}`}function i(e){return e.map(e=>`'${e}'`)}async function d(){try{return await S(\"fltmc\"),!0}catch{return!1}}async function u(){if(\"win32\"!==process.platform)return!1;try{return await S(\"fsutil\",[\"dirty\",\"query\",process.env.systemdrive??\"\"]),!0}catch(e){if(\"ENOENT\"===e.code)return d();return!1}}function f(){return\"win32\"===process.platform?R():r()}async function p(e){if((\"linux\"===process.platform||\"darwin\"===process.platform)&&o()&&void 0!==process.env.SUDO_USER){let t=w.statSync(e).isDirectory();await c(\"chown\",[...t?[\"-R\"]:[],process.env.SUDO_USER,e],h)}}var $,x={};import m from\"which\";import{execaCommandSync as b,execaSync as l,execaCommand as y,execa as S}from\"execa\";import w from\"fs\";e(x,\"hasSudo\",()=>t),e(x,\"isRoot\",()=>r),e(x,\"isSudo\",()=>o),e(x,\"prependSudo\",()=>n),e(x,\"defaultExecOptions\",()=>h),e(x,\"execRootSync\",()=>s),e(x,\"execRoot\",()=>c);let h={stdio:\"inherit\",shell:!0};e($={},\"isAdminWindows\",()=>R),e($,\"isAdminPosix\",()=>A),e($,\"isAdmin\",()=>f);let R=u,A=r;e({},\"grantUserWriteAccess\",()=>p);export{t as hasSudo,r as isRoot,o as isSudo,n as prependSudo,h as defaultExecOptions,s as execRootSync,c as execRoot,R as isAdminWindows,A as isAdminPosix,f as isAdmin,p as grantUserWriteAccess};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\n\nvar value = require(\"./valid-value\")\n , defineProperty = Object.defineProperty\n , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor\n , getOwnPropertyNames = Object.getOwnPropertyNames\n , getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\nmodule.exports = function (target, source) {\n\tvar error, sourceObject = Object(value(source));\n\ttarget = Object(value(target));\n\tgetOwnPropertyNames(sourceObject).forEach(function (name) {\n\t\ttry {\n\t\t\tdefineProperty(target, name, getOwnPropertyDescriptor(source, name));\n\t\t} catch (e) { error = e; }\n\t});\n\tif (typeof getOwnPropertySymbols === \"function\") {\n\t\tgetOwnPropertySymbols(sourceObject).forEach(function (symbol) {\n\t\t\ttry {\n\t\t\t\tdefineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));\n\t\t\t} catch (e) { error = e; }\n\t\t});\n\t}\n\tif (error !== undefined) throw error;\n\treturn target;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? globalThis : require(\"./implementation\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tif (typeof globalThis !== \"object\") return false;\n\tif (!globalThis) return false;\n\treturn globalThis.Array === Array;\n};\n","var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ is resolved with global context, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n","\"use strict\";\n\nvar isSymbol = require(\"./is-symbol\");\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tif (!value) return false;\n\tif (typeof value === \"symbol\") return true;\n\tif (!value.constructor) return false;\n\tif (value.constructor.name !== \"Symbol\") return false;\n\treturn value[value.constructor.toStringTag] === \"Symbol\";\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")()\n\t? require(\"ext/global-this\").Symbol\n\t: require(\"./polyfill\");\n","\"use strict\";\n\nvar global = require(\"ext/global-this\")\n , validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar Symbol = global.Symbol;\n\tvar symbol;\n\tif (typeof Symbol !== \"function\") return false;\n\tsymbol = Symbol(\"test symbol\");\n\ttry { String(symbol); }\n\tcatch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n","// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"./validate-symbol\")\n , NativeSymbol = require(\"ext/global-this\").Symbol\n , generateName = require(\"./lib/private/generate-name\")\n , setupStandardSymbols = require(\"./lib/private/setup/standard-symbols\")\n , setupSymbolRegistry = require(\"./lib/private/setup/symbol-registry\");\n\nvar create = Object.create\n , defineProperties = Object.defineProperties\n , defineProperty = Object.defineProperty;\n\nvar SymbolPolyfill, HiddenSymbol, isNativeSafe;\n\nif (typeof NativeSymbol === \"function\") {\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n} else {\n\tNativeSymbol = null;\n}\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError(\"Symbol is not a constructor\");\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError(\"Symbol is not a constructor\");\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = description === undefined ? \"\" : String(description);\n\treturn defineProperties(symbol, {\n\t\t__description__: d(\"\", description),\n\t\t__name__: d(\"\", generateName(description))\n\t});\n};\n\nsetupStandardSymbols(SymbolPolyfill);\nsetupSymbolRegistry(SymbolPolyfill);\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d(\"\", function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return \"Symbol (\" + validateSymbol(this).__description__ + \")\"; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(\n\tSymbolPolyfill.prototype, SymbolPolyfill.toPrimitive,\n\td(\"\", function () {\n\t\tvar symbol = validateSymbol(this);\n\t\tif (typeof symbol === \"symbol\") return symbol;\n\t\treturn symbol.toString();\n\t})\n);\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(\"c\", \"Symbol\"));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])\n);\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])\n);\n","\"use strict\";\n\nvar d = require(\"d\");\n\nvar create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;\n\nvar created = create(null);\nmodule.exports = function (desc) {\n\tvar postfix = 0, name, ie11BugWorkaround;\n\twhile (created[desc + (postfix || \"\")]) ++postfix;\n\tdesc += postfix || \"\";\n\tcreated[desc] = true;\n\tname = \"@@\" + desc;\n\tdefineProperty(\n\t\tobjPrototype, name,\n\t\td.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t// ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t})\n\t);\n\treturn name;\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , NativeSymbol = require(\"ext/global-this\").Symbol;\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t\t// fallback to eventual native implementation of given symbol\n\t\thasInstance: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill(\"hasInstance\")\n\t\t),\n\t\tisConcatSpreadable: d(\n\t\t\t\"\",\n\t\t\t(NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\t\t\tSymbolPolyfill(\"isConcatSpreadable\")\n\t\t),\n\t\titerator: d(\"\", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill(\"iterator\")),\n\t\tmatch: d(\"\", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill(\"match\")),\n\t\treplace: d(\"\", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill(\"replace\")),\n\t\tsearch: d(\"\", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill(\"search\")),\n\t\tspecies: d(\"\", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill(\"species\")),\n\t\tsplit: d(\"\", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill(\"split\")),\n\t\ttoPrimitive: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill(\"toPrimitive\")\n\t\t),\n\t\ttoStringTag: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill(\"toStringTag\")\n\t\t),\n\t\tunscopables: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill(\"unscopables\")\n\t\t)\n\t});\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"../../../validate-symbol\");\n\nvar registry = Object.create(null);\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\tfor: d(function (key) {\n\t\t\tif (registry[key]) return registry[key];\n\t\t\treturn (registry[key] = SymbolPolyfill(String(key)));\n\t\t}),\n\t\tkeyFor: d(function (symbol) {\n\t\t\tvar key;\n\t\t\tvalidateSymbol(symbol);\n\t\t\tfor (key in registry) {\n\t\t\t\tif (registry[key] === symbol) return key;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t});\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Array.from : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && result !== arr && result[1] === \"dwa\");\n};\n","\"use strict\";\n\nvar iteratorSymbol = require(\"es6-symbol\").iterator\n , isArguments = require(\"../../function/is-arguments\")\n , isFunction = require(\"../../function/is-function\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , callable = require(\"../../object/valid-callable\")\n , validValue = require(\"../../object/valid-value\")\n , isValue = require(\"../../object/is-value\")\n , isString = require(\"../../string/is-string\")\n , isArray = Array.isArray\n , call = Function.prototype.call\n , desc = { configurable: true, enumerable: true, writable: true, value: null }\n , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity, max-lines-per-function\nmodule.exports = function (arrayLike /*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t , thisArg = arguments[2]\n\t , Context\n\t , i\n\t , j\n\t , arr\n\t , length\n\t , code\n\t , iterator\n\t , result\n\t , getIterator\n\t , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array((length = arrayLike.length));\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , id = objToString.call((function () { return arguments; })());\n\nmodule.exports = function (value) { return objToString.call(value) === id; };\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && isFunctionStringTag(objToString.call(value));\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n","\"use strict\";\n\nvar numberIsNaN = require(\"../../number/is-nan\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , value = require(\"../../object/valid-value\")\n , indexOf = Array.prototype.indexOf\n , objHasOwnProperty = Object.prototype.hasOwnProperty\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (searchElement /*, fromIndex*/) {\n\tvar i, length, fromIndex, val;\n\tif (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);\n\n\tlength = toPosInt(value(this).length);\n\tfromIndex = arguments[1];\n\tif (isNaN(fromIndex)) fromIndex = 0;\n\telse if (fromIndex >= 0) fromIndex = floor(fromIndex);\n\telse fromIndex = toPosInt(this.length) - floor(abs(fromIndex));\n\n\tfor (i = fromIndex; i < length; ++i) {\n\t\tif (objHasOwnProperty.call(this, i)) {\n\t\t\tval = this[i];\n\t\t\tif (numberIsNaN(val)) return i; // Jslint: ignore\n\t\t}\n\t}\n\treturn -1;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Number.isNaN : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar numberIsNaN = Number.isNaN;\n\tif (typeof numberIsNaN !== \"function\") return false;\n\treturn !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\t// eslint-disable-next-line no-self-compare\n\treturn value !== value;\n};\n","\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , forEach = require(\"./for-each\")\n , call = Function.prototype.call;\n\nmodule.exports = function (obj, cb /*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n","'use strict';\n\nvar ensureCallable = function (fn) {\n\tif (typeof fn !== 'function') throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\nvar byObserver = function (Observer) {\n\tvar node = document.createTextNode(''), queue, currentQueue, i = 0;\n\tnew Observer(function () {\n\t\tvar callback;\n\t\tif (!queue) {\n\t\t\tif (!currentQueue) return;\n\t\t\tqueue = currentQueue;\n\t\t} else if (currentQueue) {\n\t\t\tqueue = currentQueue.concat(queue);\n\t\t}\n\t\tcurrentQueue = queue;\n\t\tqueue = null;\n\t\tif (typeof currentQueue === 'function') {\n\t\t\tcallback = currentQueue;\n\t\t\tcurrentQueue = null;\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\tnode.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash\n\t\twhile (currentQueue) {\n\t\t\tcallback = currentQueue.shift();\n\t\t\tif (!currentQueue.length) currentQueue = null;\n\t\t\tcallback();\n\t\t}\n\t}).observe(node, { characterData: true });\n\treturn function (fn) {\n\t\tensureCallable(fn);\n\t\tif (queue) {\n\t\t\tif (typeof queue === 'function') queue = [queue, fn];\n\t\t\telse queue.push(fn);\n\t\t\treturn;\n\t\t}\n\t\tqueue = fn;\n\t\tnode.data = (i = ++i % 2);\n\t};\n};\n\nmodule.exports = (function () {\n\t// Node.js\n\tif ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) {\n\t\treturn process.nextTick;\n\t}\n\n\t// queueMicrotask\n\tif (typeof queueMicrotask === \"function\") {\n\t\treturn function (cb) { queueMicrotask(ensureCallable(cb)); };\n\t}\n\n\t// MutationObserver\n\tif ((typeof document === 'object') && document) {\n\t\tif (typeof MutationObserver === 'function') return byObserver(MutationObserver);\n\t\tif (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver);\n\t}\n\n\t// W3C Draft\n\t// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html\n\tif (typeof setImmediate === 'function') {\n\t\treturn function (cb) { setImmediate(ensureCallable(cb)); };\n\t}\n\n\t// Wide available standard\n\tif ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) {\n\t\treturn function (cb) { setTimeout(ensureCallable(cb), 0); };\n\t}\n\n\treturn null;\n}());\n","// Deprecated\n\n\"use strict\";\n\nmodule.exports = function (obj) { return typeof obj === \"function\"; };\n","module.exports = isPromise;\nmodule.exports.default = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","/* eslint max-statements: 0 */\n\n// Support for functions returning promise\n\n\"use strict\";\n\nvar objectMap = require(\"es5-ext/object/map\")\n , primitiveSet = require(\"es5-ext/object/primitive-set\")\n , ensureString = require(\"es5-ext/object/validate-stringifiable-value\")\n , toShortString = require(\"es5-ext/to-short-string-representation\")\n , isPromise = require(\"is-promise\")\n , nextTick = require(\"next-tick\");\n\nvar create = Object.create\n , supportedModes = primitiveSet(\"then\", \"then:finally\", \"done\", \"done:finally\");\n\nrequire(\"../lib/registered-extensions\").promise = function (mode, conf) {\n\tvar waiting = create(null), cache = create(null), promises = create(null);\n\n\tif (mode === true) {\n\t\tmode = null;\n\t} else {\n\t\tmode = ensureString(mode);\n\t\tif (!supportedModes[mode]) {\n\t\t\tthrow new TypeError(\"'\" + toShortString(mode) + \"' is not valid promise mode\");\n\t\t}\n\t}\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id, ignore, promise) {\n\t\tvar isFailed = false;\n\n\t\tif (!isPromise(promise)) {\n\t\t\t// Non promise result\n\t\t\tcache[id] = promise;\n\t\t\tconf.emit(\"setasync\", id, 1);\n\t\t\treturn;\n\t\t}\n\t\twaiting[id] = 1;\n\t\tpromises[id] = promise;\n\t\tvar onSuccess = function (result) {\n\t\t\tvar count = waiting[id];\n\t\t\tif (isFailed) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Detected unordered then|done & finally resolution, which \" +\n\t\t\t\t\t\t\"in turn makes proper detection of success/failure impossible (when in \" +\n\t\t\t\t\t\t\"'done:finally' mode)\\n\" +\n\t\t\t\t\t\t\"Consider to rely on 'then' or 'done' mode instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!count) return; // Deleted from cache before resolved\n\t\t\tdelete waiting[id];\n\t\t\tcache[id] = result;\n\t\t\tconf.emit(\"setasync\", id, count);\n\t\t};\n\t\tvar onFailure = function () {\n\t\t\tisFailed = true;\n\t\t\tif (!waiting[id]) return; // Deleted from cache (or succeed in case of finally)\n\t\t\tdelete waiting[id];\n\t\t\tdelete promises[id];\n\t\t\tconf.delete(id);\n\t\t};\n\n\t\tvar resolvedMode = mode;\n\t\tif (!resolvedMode) resolvedMode = \"then\";\n\n\t\tif (resolvedMode === \"then\") {\n\t\t\tvar nextTickFailure = function () { nextTick(onFailure); };\n\t\t\t// Eventual finally needs to be attached to non rejected promise\n\t\t\t// (so we not force propagation of unhandled rejection)\n\t\t\tpromise = promise.then(function (result) {\n\t\t\t\tnextTick(onSuccess.bind(this, result));\n\t\t\t}, nextTickFailure);\n\t\t\t// If `finally` is a function we attach to it to remove cancelled promises.\n\t\t\tif (typeof promise.finally === \"function\") {\n\t\t\t\tpromise.finally(nextTickFailure);\n\t\t\t}\n\t\t} else if (resolvedMode === \"done\") {\n\t\t\t// Not recommended, as it may mute any eventual \"Unhandled error\" events\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess, onFailure);\n\t\t} else if (resolvedMode === \"done:finally\") {\n\t\t\t// The only mode with no side effects assuming library does not throw unconditionally\n\t\t\t// for rejected promises.\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof promise.finally !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'finally' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess);\n\t\t\tpromise.finally(onFailure);\n\t\t}\n\t});\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id, args, context) {\n\t\tvar promise;\n\t\tif (waiting[id]) {\n\t\t\t++waiting[id]; // Still waiting\n\t\t\treturn;\n\t\t}\n\t\tpromise = promises[id];\n\t\tvar emit = function () { conf.emit(\"getasync\", id, args, context); };\n\t\tif (isPromise(promise)) {\n\t\t\tif (typeof promise.done === \"function\") promise.done(emit);\n\t\t\telse {\n\t\t\t\tpromise.then(function () { nextTick(emit); });\n\t\t\t}\n\t\t} else {\n\t\t\temit();\n\t\t}\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tdelete promises[id];\n\t\tif (waiting[id]) {\n\t\t\tdelete waiting[id];\n\t\t\treturn; // Not yet resolved\n\t\t}\n\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\tvar result = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, [result]);\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\twaiting = create(null);\n\t\tpromises = create(null);\n\t\tconf.emit(\"clearasync\", objectMap(oldCache, function (data) { return [data]; }));\n\t});\n};\n","\"use strict\";\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (arg /*, …args*/) {\n\tvar set = create(null);\n\tforEach.call(arguments, function (name) { set[name] = true; });\n\treturn set;\n};\n","\"use strict\";\n\nvar ensureValue = require(\"./valid-value\")\n , stringifiable = require(\"./validate-stringifiable\");\n\nmodule.exports = function (value) { return stringifiable(ensureValue(value)); };\n","\"use strict\";\n\nvar isCallable = require(\"./is-callable\");\n\nmodule.exports = function (stringifiable) {\n\ttry {\n\t\tif (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString();\n\t\treturn String(stringifiable);\n\t} catch (e) {\n\t\tthrow new TypeError(\"Passed argument cannot be stringifed\");\n\t}\n};\n","\"use strict\";\n\nvar safeToString = require(\"./safe-to-string\");\n\nvar reNewLine = /[\\n\\r\\u2028\\u2029]/g;\n\nmodule.exports = function (value) {\n\tvar string = safeToString(value);\n\t// Trim if too long\n\tif (string.length > 100) string = string.slice(0, 99) + \"…\";\n\t// Replace eventual new lines\n\tstring = string.replace(reNewLine, function (char) {\n\t\treturn JSON.stringify(char).slice(1, -1);\n\t});\n\treturn string;\n};\n","\"use strict\";\n\nvar isCallable = require(\"./object/is-callable\");\n\nmodule.exports = function (value) {\n\ttry {\n\t\tif (value && isCallable(value.toString)) return value.toString();\n\t\treturn String(value);\n\t} catch (e) {\n\t\treturn \"\";\n\t}\n};\n","import fs, {promises as fsPromises} from 'node:fs';\n\nexport async function pathExists(path) {\n\ttry {\n\t\tawait fsPromises.access(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function pathExistsSync(path) {\n\ttry {\n\t\tfs.accessSync(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { homedir } from \"os\";\nimport { join } from \"path\";\nimport { isSudo } from \"admina\";\nexport function userHomeDir() {\n if (isSudo() && typeof process.env.SUDO_USER === \"string\" && process.env.SUDO_USER !== \"\") {\n // use the user profile even if root\n if (process.platform === \"darwin\") {\n return join(\"/Users/\", process.env.SUDO_USER);\n }\n else {\n return join(\"/home/\", process.env.SUDO_USER);\n }\n }\n else {\n const maybeHomeDir = homedir();\n if (maybeHomeDir === \"\") {\n return undefined;\n }\n return maybeHomeDir;\n }\n}\nconst tildeRegex = /^~(?=$|\\/|\\\\)/;\n/**\n * Replaces a tilde with the user's home directory\n *\n * @example UntildifyUser(\"~/foo\") // /home/user/foo\n *\n * @param path The path to untildify\n * @returns The untildified path\n */\nexport function untildifyUser(path) {\n const maybeHomeDir = userHomeDir();\n if (maybeHomeDir === undefined) {\n return path;\n }\n return path.replace(tildeRegex, maybeHomeDir);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM1QixPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFL0IsTUFBTSxVQUFVLFdBQVc7SUFDekIsSUFBSSxNQUFNLEVBQUUsSUFBSSxPQUFPLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxLQUFLLFFBQVEsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsS0FBSyxFQUFFLEVBQUUsQ0FBQztRQUM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gcGF0aFxuICB9XG5cbiAgcmV0dXJuIHBhdGgucmVwbGFjZSh0aWxkZVJlZ2V4LCBtYXliZUhvbWVEaXIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { grantUserWriteAccess } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport memoize from \"memoizee\";\nimport { pathExists } from \"path-exists\";\nimport { untildifyUser } from \"untildify-user\";\nconst { appendFile, readFile, writeFile } = promises;\nexport const defaultRcPath = untildifyUser(\"~/.bashrc\");\nasync function sourceRCInRc_(options) {\n const sourceRcString = options.guard === undefined\n ? `\\nsource \"${options.rcPath}\"\\n`\n : `\\n# ${options.guard}\\nif [[ \"$SOURCE_${options.guard.toUpperCase()}RC\" != 0 && -f \"${options.rcPath}\" ]]; then source \"${options.rcPath}\"; fi\\n`;\n try {\n await Promise.all([\n addRCHeader(options),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.bashrc\")),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.profile\")),\n ]);\n }\n catch (err) {\n warning(`Failed to add ${sourceRcString} to .profile or .bashrc. You should add it manually: ${err}`);\n }\n}\n/**\n * handles adding conditions to source rc file from .bashrc and .profile\n */\nexport const sourceRCInRc = memoize(sourceRCInRc_, { promise: true });\nasync function addRCHeader(options) {\n // a variable that prevents source rc from being called from .bashrc and .profile\n const rcHeader = options.guard === undefined\n ? \"\\n# Automatically Generated by envosman\\n\"\n : `\\n# Automatically Generated by envosman ${options.guard}\\nexport SOURCE_${options.guard.toUpperCase()}RC=0\\n`;\n if (await pathExists(options.rcPath)) {\n const rcContent = await readFile(options.rcPath, \"utf8\");\n if (!rcContent.includes(rcHeader)) {\n // already executed setupCppInProfile\n await appendFile(options.rcPath, `\\n${rcHeader}\\n`);\n info(`Added ${rcHeader} to ${options.rcPath}`);\n }\n }\n}\nasync function addSourceToTargetRc(sourceRcString, targetRcPath) {\n if (await pathExists(targetRcPath)) {\n const bashrcContent = await readFile(targetRcPath, \"utf-8\");\n if (!bashrcContent.includes(sourceRcString)) {\n await appendFile(targetRcPath, sourceRcString);\n info(`${sourceRcString} was added to ${targetRcPath}`);\n }\n }\n}\nexport async function finalizeRC(rcOptions) {\n if (await pathExists(rcOptions.rcPath)) {\n const entries = (await readFile(rcOptions.rcPath, \"utf-8\")).split(\"\\n\");\n const uniqueEntries = [...new Set(entries.reverse())].reverse(); // remove duplicates, keeping the latest entry\n await writeFile(rcOptions.rcPath, uniqueEntries.join(\"\\n\"));\n await grantUserWriteAccess(rcOptions.rcPath);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmMtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yYy1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQzdDLE9BQU8sRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3RDLE9BQU8sT0FBTyxNQUFNLFVBQVUsQ0FBQTtBQUM5QixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUM5QyxNQUFNLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFFcEQsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFHLGFBQWEsQ0FBQyxXQUFXLENBQUMsQ0FBQTtBQWF2RCxLQUFLLFVBQVUsYUFBYSxDQUFDLE9BQWtCO0lBQzdDLE1BQU0sY0FBYyxHQUFHLE9BQU8sQ0FBQyxLQUFLLEtBQUssU0FBUztR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RyeVxuXG4gICAgYXdhaXQgd3JpdGVGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIHVuaXF1ZUVudHJpZXMuam9pbihcIlxcblwiKSlcblxuICAgIGF3YWl0IGdyYW50VXNlcldyaXRlQWNjZXNzKHJjT3B0aW9ucy5yY1BhdGgpXG4gIH1cbn1cbiJdfQ==","import { promises } from \"fs\";\nimport { exportVariable as ghExportVariable } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nimport { escapeString } from \"./utils.js\";\nconst { appendFile } = promises;\n/**\n * Add an environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addEnv(name, valGiven, givenOptions = {}) {\n const options = {\n escapeSpace: false,\n overwrite: true,\n rcPath: defaultRcPath,\n ...givenOptions,\n };\n const val = escapeString(valGiven ?? \"\", options.escapeSpace);\n try {\n if (GITHUB_ACTIONS) {\n try {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n ghExportVariable(name, val);\n }\n catch (err) {\n error(err);\n await addEnvSystem(name, val, options);\n }\n }\n else {\n await addEnvSystem(name, val, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to export environment variable ${name}=${val}. You should add it manually.`);\n }\n}\nasync function addEnvSystem(name, valGiven, options) {\n const val = valGiven ?? \"\";\n switch (process.platform) {\n case \"win32\": {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit\n await execPowershell(`[Environment]::SetEnvironmentVariable('${name}', '${val}', \"User\")`);\n info(`${name}='${val}' was set in the environment.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n if (!options.overwrite) {\n await appendFile(options.rcPath, `\\nif [ -z \"\\${${name}}\" ]; then export ${name}=\"${val}\"; fi\\n`);\n info(`if not defined ${name} then ${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n else {\n await appendFile(options.rcPath, `\\nexport ${name}=\"${val}\"\\n`);\n info(`${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n return;\n }\n default: {\n // fall through shell path modification\n }\n }\n process.env[name] = val;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hZGQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLGNBQWMsSUFBSSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUNsRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sU0FBUyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3BDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUNoRCxPQUFPLEVBQUUsYUFBYSxFQUFFLFlBQVksRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUMxRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ3pDLE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFpQi9COzs7O0dBSUc7QUFFSCxNQUFNLENBQUMsS0FBSyxVQUFVLE1BQU0sQ0FDMUIsSUFBWSxFQUNaLFFBQTRCLEVBQzVCLGVBQXVDLEVBQUU7SUFFekMsTUFBTSxPQUFPLEdBQUc7UUFDZCxXQUFXLEVBQUUsS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biAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgYXdhaXQgYXBwZW5kRmlsZShvcHRpb25zLnJjUGF0aCwgYFxcbmV4cG9ydCAke25hbWV9PVwiJHt2YWx9XCJcXG5gKVxuICAgICAgICBpbmZvKGAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGRlZmF1bHQ6IHtcbiAgICAgIC8vIGZhbGwgdGhyb3VnaCBzaGVsbCBwYXRoIG1vZGlmaWNhdGlvblxuICAgIH1cbiAgfVxuICBwcm9jZXNzLmVudltuYW1lXSA9IHZhbFxufVxuIl19","import escapeSpace from \"escape-path-with-spaces\";\nimport escapeQuote from \"escape-quotes\";\n/**\n * Escape a string for use in a shell command\n * @param valGiven The string to escape\n * @param shouldEscapeSpace Whether to escape spaces in the string\n *\n * @private\n */\nexport function escapeString(valGiven, shouldEscapeSpace = false) {\n const spaceEscaped = shouldEscapeSpace ? escapeSpace(valGiven) : valGiven;\n return escapeQuote(spaceEscaped, \"\\\"\", \"\\\\\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxXQUFXLE1BQU0seUJBQXlCLENBQUE7QUFDakQsT0FBTyxXQUFXLE1BQU0sZUFBZSxDQUFBO0FBRXZDOzs7Ozs7R0FNRztBQUNILE1BQU0sVUFBVSxZQUFZLENBQUMsUUFBZ0IsRUFBRSxvQkFBNkIsS0FBSztJQUMvRSxNQUFNLFlBQVksR0FBRyxpQkFBaUIsQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUE7SUFDekUsT0FBTyxXQUFXLENBQUMsWUFBWSxFQUFFLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQTtBQUM5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGVzY2FwZVNwYWNlIGZyb20gXCJlc2NhcGUtcGF0aC13aXRoLXNwYWNlc1wiXG5pbXBvcnQgZXNjYXBlUXVvdGUgZnJvbSBcImVzY2FwZS1xdW90ZXNcIlxuXG4vKipcbiAqIEVzY2FwZSBhIHN0cmluZyBmb3IgdXNlIGluIGEgc2hlbGwgY29tbWFuZFxuICogQHBhcmFtIHZhbEdpdmVuIFRoZSBzdHJpbmcgdG8gZXNjYXBlXG4gKiBAcGFyYW0gc2hvdWxkRXNjYXBlU3BhY2UgV2hldGhlciB0byBlc2NhcGUgc3BhY2VzIGluIHRoZSBzdHJpbmdcbiAqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgZnVuY3Rpb24gZXNjYXBlU3RyaW5nKHZhbEdpdmVuOiBzdHJpbmcsIHNob3VsZEVzY2FwZVNwYWNlOiBib29sZWFuID0gZmFsc2UpIHtcbiAgY29uc3Qgc3BhY2VFc2NhcGVkID0gc2hvdWxkRXNjYXBlU3BhY2UgPyBlc2NhcGVTcGFjZSh2YWxHaXZlbikgOiB2YWxHaXZlblxuICByZXR1cm4gZXNjYXBlUXVvdGUoc3BhY2VFc2NhcGVkLCBcIlxcXCJcIiwgXCJcXFxcXCIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { delimiter } from \"path\";\nimport { addPath as ghAddPath } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nconst { appendFile } = promises;\n/**\n * Add a path to the PATH environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addPath(path, givenOptions = {}) {\n const options = { rcPath: defaultRcPath, ...givenOptions };\n if (isIgnoredPath(path)) {\n return;\n }\n process.env.PATH = `${path}${delimiter}${process.env.PATH}`;\n try {\n if (GITHUB_ACTIONS) {\n try {\n ghAddPath(path);\n }\n catch (err) {\n error(err);\n await addPathSystem(path, options);\n }\n }\n else {\n await addPathSystem(path, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to add ${path} to the percistent PATH. You should add it manually.`);\n }\n}\nasync function addPathSystem(path, options) {\n switch (process.platform) {\n case \"win32\": {\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit and also because %PATH% is different for user and system\n await execPowershell(`$USER_PATH=([Environment]::GetEnvironmentVariable(\"PATH\", \"User\")); [Environment]::SetEnvironmentVariable(\"PATH\", \"${path};$USER_PATH\", \"User\")`);\n info(`\"${path}\" was added to the PATH.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n await appendFile(options.rcPath, `\\nexport PATH=\"${path}:$PATH\"\\n`);\n info(`\"${path}\" was added to \"${options.rcPath}\"`);\n return;\n }\n default: {\n return;\n }\n }\n}\nconst ignoredPaths = [/\\/usr\\/bin\\/?/, /\\/usr\\/local\\/bin\\/?/];\n/** Skip adding /usr/bin to PATH if it is already there */\nfunction isIgnoredPath(path) {\n if (ignoredPaths.some((checkedPath) => checkedPath.test(path))) {\n const paths = process.env.PATH?.split(delimiter) ?? [];\n return paths.includes(path);\n }\n return false;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLXBhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWRkLXBhdGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM3QixPQUFPLE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KG9wdGlvbnMpXG4gICAgICBhd2FpdCBhcHBlbmRGaWxlKG9wdGlvbnMucmNQYXRoLCBgXFxuZXhwb3J0IFBBVEg9XCIke3BhdGh9OiRQQVRIXCJcXG5gKVxuICAgICAgaW5mbyhgXCIke3BhdGh9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1cImApXG4gICAgICByZXR1cm5cbiAgICB9XG4gICAgZGVmYXVsdDoge1xuICAgICAgcmV0dXJuXG4gICAgfVxuICB9XG59XG5cbmNvbnN0IGlnbm9yZWRQYXRocyA9IFsvXFwvdXNyXFwvYmluXFwvPy8sIC9cXC91c3JcXC9sb2NhbFxcL2JpblxcLz8vXVxuXG4vKiogU2tpcCBhZGRpbmcgL3Vzci9iaW4gdG8gUEFUSCBpZiBpdCBpcyBhbHJlYWR5IHRoZXJlICovXG5mdW5jdGlvbiBpc0lnbm9yZWRQYXRoKHBhdGg6IHN0cmluZykge1xuICBpZiAoaWdub3JlZFBhdGhzLnNvbWUoKGNoZWNrZWRQYXRoKSA9PiBjaGVja2VkUGF0aC50ZXN0KHBhdGgpKSkge1xuICAgIGNvbnN0IHBhdGhzID0gcHJvY2Vzcy5lbnYuUEFUSD8uc3BsaXQoZGVsaW1pdGVyKSA/PyBbXVxuICAgIHJldHVybiBwYXRocy5pbmNsdWRlcyhwYXRoKVxuICB9XG4gIHJldHVybiBmYWxzZVxufVxuIl19","\n//==============//\n// DEPENDENCIES //\n//==============//\n\nconst numerous = require('numerous');\nconst isNode = require('is-node');\n\n\n//================//\n// MODULE GLOBALS //\n//================//\n\n/**\n * Pre-calculating millisecond values for each time unit.\n */\nconst timeUnits = [\n ['years', 12 * 4 * 7 * 24 * 60 * 60 * 1000],\n ['months', 4 * 7 * 24 * 60 * 60 * 1000],\n ['weeks', 7 * 24 * 60 * 60 * 1000],\n ['days', 24 * 60 * 60 * 1000],\n ['hours', 60 * 60 * 1000],\n ['minutes', 60 * 1000],\n ['seconds', 1000],\n];\n\nconst defaultConfig = {\n locale: 'en',\n span: 2,\n delimiter: ', ',\n unitType: 'long',\n unitTypeLookupOrder: ['long', 'short', 'narrow'],\n autoloadLocales: true,\n};\n\n/**\n * Contains data of loaded locales.\n * @type {Object}\n */\nconst locales = {};\n\n\n//=========//\n// EXPORTS //\n//=========//\n\nmodule.exports = {\n create: timeDeltaFactory,\n addLocale,\n defaultConfig,\n};\n\n\n//===========//\n// FUNCTIONS //\n//===========//\n\n/**\n * Adds pluralization data for the specified locale.\n * Should be called in browser.\n *\n * @param {Object|Object[]} localeData\n */\nfunction addLocale(localeData) {\n\n // Normalizing input\n if (!Array.isArray(localeData)) {\n localeData = [localeData];\n }\n\n for (const item of localeData) {\n const { id, data } = item;\n locales[id] = data;\n }\n\n}\n\n\n/**\n * Creates new instance.\n *\n * @param {object?} config\n *\n * @returns {object}\n */\nfunction timeDeltaFactory(config) {\n\n // Initializing config by extending the default one\n config = Object.assign({}, defaultConfig, config || {});\n\n return {\n\n /**\n * Public proxy for internal format function.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object?} options\n *\n * @returns {string}\n */\n format: function (firstDate, secondDate, options) {\n\n // Allowing to override config with each individual call\n options = Object.assign({}, config, options || {});\n\n return format(firstDate, secondDate, options);\n\n }\n\n };\n\n}\n\n\n/**\n * Returns difference between two dates as a text string.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object} config\n *\n * @returns {string}\n */\nfunction format(firstDate, secondDate, config) {\n\n ensureLocaleLoadedOrThrow(config.locale, {\n autoload: config.autoloadLocales,\n });\n\n // Handling input arguments\n // -----\n\n if (!firstDate) {\n throw new Error('Missing first date argument');\n }\n\n if (!secondDate) {\n throw new Error('Missing second date argument');\n }\n\n // Calculating\n // -----\n\n const difference = getDifference(firstDate, secondDate);\n const parts = [];\n\n for (const unit of difference) {\n const [name, value] = unit;\n if (value > 0) {\n parts.push(pluralize(name, value, config));\n }\n if (parts.length >= config.span) {\n break;\n }\n }\n\n // Returning the string value\n return parts.join(config.delimiter);\n\n}\n\n\n/**\n * Checks if locale is loaded. If not, tries to load it in Node.js,\n * or throws and error in Browser.\n *\n * @param {string} locale\n * @param {Object?} options\n */\nfunction ensureLocaleLoadedOrThrow(locale, options) {\n\n const { autoload } = options;\n\n if (hasLocale(locale)) {\n return;\n }\n\n if (isNode && autoload) {\n requireLocale(locale);\n\n } else {\n throw new Error(\n `Missing locale: ${locale}, you must load it manually before using it`\n );\n }\n\n}\n\n\n/**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} localeId\n *\n * @returns {boolean}\n */\nfunction hasLocale(localeId) {\n return Boolean(locales[localeId]);\n}\n\n/**\n * Tries to load the specified locale.\n *\n * @param {string} localeId\n */\nfunction requireLocale(localeId) {\n try {\n addLocale(\n require(`../locales/${localeId}.js`)\n );\n\n } catch (error) {\n throw Error(\n `Failed to load locale: ${localeId} from ../locales/${localeId}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${error}`\n );\n\n }\n}\n\n\n/**\n * Returns difference as separate time units.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n *\n * @returns {Array}\n */\nfunction getDifference(firstDate, secondDate) {\n let difference = (secondDate - firstDate);\n const results = [];\n timeUnits.some(function (unit) {\n const name = unit[0];\n const divider = unit[1];\n const value = Math.floor(difference / divider);\n difference -= value * divider;\n results.push([name, value]);\n if (difference <= 0) {\n // Breaking the loop.\n return true;\n }\n });\n return results;\n}\n\n/**\n * Returns localized and pluralized time unit.\n *\n * @param {string} unit\n * @param {int} value\n * @param {object} config\n *\n * @returns {string}\n */\nfunction pluralize(unit, value, config) {\n const unitTypeData = getLocaleDataForUnitType(config);\n const unitString = numerous.pluralize(\n config.locale,\n value,\n unitTypeData[unit]\n );\n return unitString.replace('{0}', value);\n}\n\n\n/**\n * Returns locale data for preferred unit type.\n *\n * @param {object} config\n *\n * @returns {Array}\n */\nfunction getLocaleDataForUnitType(config) {\n\n const localeData = locales[config.locale];\n\n // Making a copy of array from config.\n let lookupOrder = config.unitTypeLookupOrder.slice();\n\n // Adding interested type to the top.\n lookupOrder.unshift(config.unitType);\n\n // Making sure only unique items are present.\n lookupOrder = arrayUnique(lookupOrder);\n\n let unitTypeData = null;\n lookupOrder.some(function (unitType) {\n if ('undefined' !== typeof localeData[unitType]) {\n unitTypeData = localeData[unitType];\n // Breaking the loop.\n return true;\n }\n });\n\n if (null === unitTypeData) {\n throw new Error('Can not find any unit type data for locale: ' + config.locale);\n }\n\n return unitTypeData;\n}\n\n/**\n * Returns array with only unique items.\n *\n * @param {Array} array\n *\n * @returns {Array}\n */\nfunction arrayUnique(array) {\n return Array.from(\n new Set(array)\n );\n}\n","const SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict';\n\nvar process$1 = require('process');\nvar semver = require('semver');\nvar os = require('os');\nvar path = require('path');\nvar fs = require('fs');\nvar https = require('https');\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar packageJson = process$1.env.npm_package_json;\nvar userAgent = process$1.env.npm_config_user_agent;\nvar isNpm6 = Boolean(userAgent && userAgent.startsWith('npm'));\nvar isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));\nvar isNpm = isNpm6 || isNpm7;\nvar isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));\nvar isNpmOrYarn = isNpm || isYarn;\n\nvar homeDirectory = os.homedir();\nvar configDir = process.env.XDG_CONFIG_HOME ||\n path.join(homeDirectory, '.config', 'simple-update-notifier');\nvar getConfigFile = function (packageName) {\n return path.join(configDir, \"\".concat(packageName.replace('@', '').replace('/', '__'), \".json\"));\n};\nvar createConfigDir = function () {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n};\nvar getLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n try {\n if (!fs.existsSync(configFile)) {\n return undefined;\n }\n var file = JSON.parse(fs.readFileSync(configFile, 'utf8'));\n return file.lastUpdateCheck;\n }\n catch (_a) {\n return undefined;\n }\n};\nvar saveLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n fs.writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: new Date().getTime() }));\n};\n\nvar getDistVersion = function (packageName, distTag) { return __awaiter(void 0, void 0, void 0, function () {\n var url;\n return __generator(this, function (_a) {\n url = \"https://registry.npmjs.org/-/package/\".concat(packageName, \"/dist-tags\");\n return [2 /*return*/, new Promise(function (resolve, reject) {\n https\n .get(url, function (res) {\n var body = '';\n res.on('data', function (chunk) { return (body += chunk); });\n res.on('end', function () {\n try {\n var json = JSON.parse(body);\n var version = json[distTag];\n if (!version) {\n reject(new Error('Error getting version'));\n }\n resolve(version);\n }\n catch (_a) {\n reject(new Error('Could not parse version response'));\n }\n });\n })\n .on('error', function (err) { return reject(err); });\n })];\n });\n}); };\n\nvar hasNewVersion = function (_a) {\n var pkg = _a.pkg, _b = _a.updateCheckInterval, updateCheckInterval = _b === void 0 ? 1000 * 60 * 60 * 24 : _b, _c = _a.distTag, distTag = _c === void 0 ? 'latest' : _c, alwaysRun = _a.alwaysRun, debug = _a.debug;\n return __awaiter(void 0, void 0, void 0, function () {\n var lastUpdateCheck, latestVersion;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n createConfigDir();\n lastUpdateCheck = getLastUpdate(pkg.name);\n if (!(alwaysRun ||\n !lastUpdateCheck ||\n lastUpdateCheck < new Date().getTime() - updateCheckInterval)) return [3 /*break*/, 2];\n return [4 /*yield*/, getDistVersion(pkg.name, distTag)];\n case 1:\n latestVersion = _d.sent();\n saveLastUpdate(pkg.name);\n if (semver.gt(latestVersion, pkg.version)) {\n return [2 /*return*/, latestVersion];\n }\n else if (debug) {\n console.error(\"Latest version (\".concat(latestVersion, \") not newer than current version (\").concat(pkg.version, \")\"));\n }\n return [3 /*break*/, 3];\n case 2:\n if (debug) {\n console.error(\"Too recent to check for a new update. simpleUpdateNotifier() interval set to \".concat(updateCheckInterval, \"ms but only \").concat(new Date().getTime() - lastUpdateCheck, \"ms since last check.\"));\n }\n _d.label = 3;\n case 3: return [2 /*return*/, false];\n }\n });\n });\n};\n\nvar borderedText = function (text) {\n var lines = text.split('\\n');\n var width = Math.max.apply(Math, lines.map(function (l) { return l.length; }));\n var res = [\"\\u250C\".concat('─'.repeat(width + 2), \"\\u2510\")];\n for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {\n var line = lines_1[_i];\n res.push(\"\\u2502 \".concat(line.padEnd(width), \" \\u2502\"));\n }\n res.push(\"\\u2514\".concat('─'.repeat(width + 2), \"\\u2518\"));\n return res.join('\\n');\n};\n\nvar simpleUpdateNotifier = function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var latestVersion, err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!args.alwaysRun &&\n (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))) {\n if (args.debug) {\n console.error('Opting out of running simpleUpdateNotifier()');\n }\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, hasNewVersion(args)];\n case 2:\n latestVersion = _a.sent();\n if (latestVersion) {\n console.error(borderedText(\"New version of \".concat(args.pkg.name, \" available!\\nCurrent Version: \").concat(args.pkg.version, \"\\nLatest Version: \").concat(latestVersion)));\n }\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n // Catch any network errors or cache writing errors so module doesn't cause a crash\n if (args.debug && err_1 instanceof Error) {\n console.error('Unexpected error in simpleUpdateNotifier():', err_1);\n }\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n}); };\n\nmodule.exports = simpleUpdateNotifier;\n","function toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\n\nfunction toVal(out, key, val, opts) {\n\tvar x, old=out[key], nxt=(\n\t\t!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))\n\t\t: typeof val === 'boolean' ? val\n\t\t: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))\n\t\t: (x = +val,x * 0 === 0) ? x : val\n\t);\n\tout[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);\n}\n\nexport default function (args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\n\tvar k, arr, arg, name, val, out={ _:[] };\n\tvar i=0, j=0, idx=0, len=args.length;\n\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\n\tif (alibi) {\n\t\tfor (k in opts.alias) {\n\t\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i=opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\n\tfor (i=opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tname = typeof opts.default[k];\n\t\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\t\tif (opts[name] !== void 0) {\n\t\t\t\topts[name].push(k);\n\t\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t\topts[name].push(arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\n\tfor (i=0; i < len; i++) {\n\t\targ = args[i];\n\n\t\tif (arg === '--') {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (j=0; j < arg.length; j++) {\n\t\t\tif (arg.charCodeAt(j) !== 45) break; // \"-\"\n\t\t}\n\n\t\tif (j === 0) {\n\t\t\tout._.push(arg);\n\t\t} else if (arg.substring(j, j + 3) === 'no-') {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) {\n\t\t\t\treturn opts.unknown(arg);\n\t\t\t}\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx=j+1; idx < arg.length; idx++) {\n\t\t\t\tif (arg.charCodeAt(idx) === 61) break; // \"=\"\n\t\t\t}\n\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);\n\t\t\tarr = (j === 2 ? [name] : name);\n\n\t\t\tfor (idx=0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);\n\t\t\t\ttoVal(out, name, (idx + 1 < arr.length) || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tif (out[k] === void 0) {\n\t\t\t\tout[k] = opts.default[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (alibi) {\n\t\tfor (k in out) {\n\t\t\tarr = opts.alias[k] || [];\n\t\t\twhile (arr.length > 0) {\n\t\t\t\tout[arr.shift()] = out[k];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n","import { promises } from \"fs\";\nimport { execRoot } from \"admina\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { sourceRC } from \"envosman\";\nconst { appendFile } = promises;\n/**\n * Update the alternatives for a package\n * @param name The name of the package\n * @param path The path to the binary\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function updateAptAlternatives(name, path, priority = 40) {\n await execRoot(\"update-alternatives\", [\"--install\", `/usr/bin/${name}`, name, path, priority.toString()]);\n}\n/**\n * Add the update-alternatives command to the rc file\n * @param name The name of the package\n * @param path The path to the binary\n * @param rcOptions The options for the rc file to add the update-alternatives command to\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function addUpdateAlternativesToRc(name, path, rcOptions, priority = 40) {\n if (GITHUB_ACTIONS) {\n await updateAptAlternatives(name, path, priority);\n }\n else {\n await sourceRC(rcOptions);\n await appendFile(rcOptions.rcPath, `\\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} ${priority}; fi\\n`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWx0ZXJuYXRpdmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FsdGVybmF0aXZlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sSUFBSSxDQUFBO0FBQzdCLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDakMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBRW5DLE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFFL0I7Ozs7O0dBS0c7QUFDSCxNQUFNLENBQUMsS0FBSyxVQUFVLHFCQUFxQixDQUFDLElBQVksRUFBRSxJQUFZLEVBQUUsV0FBbUIsRUFBRTtJQUMzRixNQUFNLFFBQVEsQ0FBQyxxQkFBcUIsRUFBRSxDQUFDLFdBQVcsRUFBRSxZQUFZLElBQUksRUFBRSxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsUUFBUSxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUMsQ0FBQTtBQUMzRyxDQUFDO0FBRUQ7Ozs7OztHQU1HO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSx5QkFBeUIsQ0FDN0MsSUFBWSxFQUNaLElBQVksRUFDWixTQUFvQixFQUNwQixXQUFtQixFQUFFO0lBRXJCLElBQUksY0FBYyxFQUFFLENBQUM7UUFDbkIsTUFBTSxxQkFBcUIsQ0FBQyxJQUFJLEVBQUUsSUFBSSxFQUFFLFFB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gJHtwcmlvcml0eX07IGZpXFxuYCxcbiAgICApXG4gIH1cbn1cbiJdfQ==","/**\n * Get the environment variables to use for the apt command\n * @param apt The apt command to use\n * @private Used internally\n */\nexport function getAptEnv(apt) {\n const env = { ...process.env, DEBIAN_FRONTEND: \"noninteractive\" };\n if (apt === \"nala\") {\n // if LANG/LC_ALL is not set, enable utf8 otherwise nala fails because of ASCII encoding\n if (env.LANG === undefined) {\n env.LANG = \"C.UTF-8\";\n }\n if (env.LC_ALL === undefined) {\n env.LC_ALL = \"C.UTF-8\";\n }\n }\n return env;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFFSCxNQUFNLFVBQVUsU0FBUyxDQUFDLEdBQVc7SUFDbkMsTUFBTSxHQUFHLEdBQXNCLEVBQUUsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsRUFBRSxDQUFBO0lBRXBGLElBQUksR0FBRyxLQUFLLE1BQU0sRUFBRSxDQUFDO1FBQ25CLHdGQUF3RjtRQUN4RixJQUFJLEdBQUcsQ0FBQyxJQUFJLEtBQUssU0FBUyxFQUFFLENBQUM7WUFDM0IsR0FBRyxDQUFDLElBQUksR0FBRyxTQUFTLENBQUE7UUFDdEIsQ0FBQztRQUNELElBQUksR0FBRyxDQUFDLE1BQU0sS0FBSyxTQUFTLEVBQUUsQ0FBQztZQUM3QixHQUFHLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQTtRQUN4QixDQUFDO0lBQ0gsQ0FBQztJQUVELE9BQU8sR0FBRyxDQUFBO0FBQ1osQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2V0IHRoZSBlbnZpcm9ubWVudCB2YXJpYWJsZXMgdG8gdXNlIGZvciB0aGUgYXB0IGNvbW1hbmRcbiAqIEBwYXJhbSBhcHQgVGhlIGFwdCBjb21tYW5kIHRvIHVzZVxuICogQHByaXZhdGUgVXNlZCBpbnRlcm5hbGx5XG4gKi9cblxuZXhwb3J0IGZ1bmN0aW9uIGdldEFwdEVudihhcHQ6IHN0cmluZykge1xuICBjb25zdCBlbnY6IE5vZGVKUy5Qcm9jZXNzRW52ID0geyAuLi5wcm9jZXNzLmVudiwgREVCSUFOX0ZST05URU5EOiBcIm5vbmludGVyYWN0aXZlXCIgfVxuXG4gIGlmIChhcHQgPT09IFwibmFsYVwiKSB7XG4gICAgLy8gaWYgTEFORy9MQ19BTEwgaXMgbm90IHNldCwgZW5hYmxlIHV0Zjggb3RoZXJ3aXNlIG5hbGEgZmFpbHMgYmVjYXVzZSBvZiBBU0NJSSBlbmNvZGluZ1xuICAgIGlmIChlbnYuTEFORyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICBlbnYuTEFORyA9IFwiQy5VVEYtOFwiXG4gICAgfVxuICAgIGlmIChlbnYuTENfQUxMID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGVudi5MQ19BTEwgPSBcIkMuVVRGLThcIlxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBlbnZcbn1cbiJdfQ==","import which from \"which\";\n/**\n * Check if nala is installed\n */\nexport function hasNala() {\n return which.sync(\"nala\", { nothrow: true }) !== null;\n}\n/**\n * Get the apt command to use\n * If nala is installed, use that, otherwise use apt-get\n */\nexport function getApt() {\n let apt;\n if (hasNala()) {\n apt = \"nala\";\n }\n else {\n apt = \"apt-get\";\n }\n return apt;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9nZXQtYXB0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOi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StringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","import { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\n/**\n * Check if a package is installed\n * @param pack The package to check\n * @returns `true` if the package is installed, `false` otherwise\n */\nexport async function isAptPackInstalled(pack) {\n try {\n // check if a package is installed\n const { stdout } = await execa(\"dpkg\", [\"-s\", pack], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains a line that starts with \"Status: install ok installed\"\n return lines.some((line) => line.startsWith(\"Status: install ok installed\"));\n }\n catch {\n return false;\n }\n}\n/**\n * Check if a package matching a regexp is installed\n * @param regexp The regexp to check\n * @returns `true` if a package is installed, `false` otherwise\n */\nexport async function isAptPackRegexInstalled(regexp) {\n try {\n // check if a package matching the regexp is installed\n const { stdout } = await execa(\"dpkg\", [\"-l\", regexp], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains any lines that start with \"ii\"\n return lines.some((line) => line.startsWith(\"ii\"));\n }\n catch {\n return false;\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtaW5zdGFsbGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2lzLWluc3RhbGxlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sT0FBTyxDQU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xuICAgICAgcmV0dXJuIGZhbHNlXG4gICAgfVxuICAgIGNvbnN0IGxpbmVzID0gc3Rkb3V0LnNwbGl0KFwiXFxuXCIpXG4gICAgLy8gY2hlY2sgaWYgdGhlIG91dHB1dCBjb250YWlucyBhbnkgbGluZXMgdGhhdCBzdGFydCB3aXRoIFwiaWlcIlxuICAgIHJldHVybiBsaW5lcy5zb21lKChsaW5lKSA9PiBsaW5lLnN0YXJ0c1dpdGgoXCJpaVwiKSlcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlXG4gIH1cbn1cbiJdfQ==","import { warning } from \"ci-log\";\nimport escapeRegex from \"escape-string-regexp\";\nimport { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized, updatedRepos } from \"./update.js\";\n/**\n * The type of apt package to install\n */\nexport var AptPackageType;\n(function (AptPackageType) {\n AptPackageType[AptPackageType[\"NameDashVersion\"] = 0] = \"NameDashVersion\";\n AptPackageType[AptPackageType[\"NameEqualsVersion\"] = 1] = \"NameEqualsVersion\";\n AptPackageType[AptPackageType[\"Name\"] = 2] = \"Name\";\n AptPackageType[AptPackageType[\"None\"] = 3] = \"None\";\n})(AptPackageType || (AptPackageType = {}));\n/**\n * Filter out the packages that are already installed and qualify the packages into a full package name/version\n */\nexport async function filterAndQualifyAptPackages(packages, apt = getApt()) {\n return (await Promise.all(packages.map((pack) => qualifiedNeededAptPackage(pack, apt))))\n .filter((pack) => pack !== undefined);\n}\n/**\n * Qualify the package into full package name/version.\n * If the package is not installed, return the full package name/version.\n * If the package is already installed, return undefined\n */\nexport async function qualifiedNeededAptPackage(pack, apt = getApt()) {\n // Qualify the package into full package name/version\n const qualified = await getAptArg(apt, pack.name, pack.version);\n // filter out the package that are already installed\n return (await isAptPackInstalled(qualified)) ? undefined : qualified;\n}\nasync function aptPackageType(apt, name, version) {\n if (version !== undefined && version !== \"\") {\n const { stdout } = await execa(\"apt-cache\", [\n \"search\",\n \"--names-only\",\n `^${escapeRegex(name)}-${escapeRegex(version)}$`,\n ], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (stdout.trim() !== \"\") {\n return AptPackageType.NameDashVersion;\n }\n try {\n // check if apt-get show can find the version\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"apt-cache\", [\"show\", `${name}=${version}`], { env: getAptEnv(apt) });\n if (stdout.trim() === \"\") {\n return AptPackageType.NameEqualsVersion;\n }\n }\n catch {\n // ignore\n }\n }\n try {\n const { stdout: showStdout } = await execa(\"apt-cache\", [\"show\", name], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (showStdout.trim() !== \"\") {\n return AptPackageType.Name;\n }\n }\n catch {\n // ignore\n }\n // If apt-cache fails, update the repos and try again\n if (!updatedRepos) {\n updateAptReposMemoized(apt);\n return aptPackageType(apt, name, version);\n }\n return AptPackageType.None;\n}\nasync function getAptArg(apt, name, version) {\n const package_type = await aptPackageType(apt, name, version);\n switch (package_type) {\n case AptPackageType.NameDashVersion:\n return `${name}-${version}`;\n case AptPackageType.NameEqualsVersion:\n return `${name}=${version}`;\n case AptPackageType.Name:\n if (version !== undefined && version !== \"\") {\n warning(`Could not find package ${name} with version ${version}. Installing the latest version.`);\n }\n return name;\n default:\n throw new Error(`Could not find package ${name} ${version ?? \"\"}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVhbGlmeS1pbnN0YWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3F1YWxpZnktaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sV0FBVyxNQUFNLHNCQUFzQixDQUFBO0FBQzlDLE9BQU8sRUFBRSx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n1cblxuYXN5bmMgZnVuY3Rpb24gZ2V0QXB0QXJnKGFwdDogc3RyaW5nLCBuYW1lOiBzdHJpbmcsIHZlcnNpb246IHN0cmluZyB8IHVuZGVmaW5lZCkge1xuICBjb25zdCBwYWNrYWdlX3R5cGUgPSBhd2FpdCBhcHRQYWNrYWdlVHlwZShhcHQsIG5hbWUsIHZlcnNpb24pXG4gIHN3aXRjaCAocGFja2FnZV90eXBlKSB7XG4gICAgY2FzZSBBcHRQYWNrYWdlVHlwZS5OYW1lRGFzaFZlcnNpb246XG4gICAgICByZXR1cm4gYCR7bmFtZX0tJHt2ZXJzaW9ufWBcbiAgICBjYXNlIEFwdFBhY2thZ2VUeXBlLk5hbWVFcXVhbHNWZXJzaW9uOlxuICAgICAgcmV0dXJuIGAke25hbWV9PSR7dmVyc2lvbn1gXG4gICAgY2FzZSBBcHRQYWNrYWdlVHlwZS5OYW1lOlxuICAgICAgaWYgKHZlcnNpb24gIT09IHVuZGVmaW5lZCAmJiB2ZXJzaW9uICE9PSBcIlwiKSB7XG4gICAgICAgIHdhcm5pbmcoYENvdWxkIG5vdCBmaW5kIHBhY2thZ2UgJHtuYW1lfSB3aXRoIHZlcnNpb24gJHt2ZXJzaW9ufS4gSW5zdGFsbGluZyB0aGUgbGF0ZXN0IHZlcnNpb24uYClcbiAgICAgIH1cbiAgICAgIHJldHVybiBuYW1lXG4gICAgZGVmYXVsdDpcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ291bGQgbm90IGZpbmQgcGFja2FnZSAke25hbWV9ICR7dmVyc2lvbiA/PyBcIlwifWApXG4gIH1cbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { addAptKey } from \"./apt-key.js\";\nimport { addAptRepository } from \"./apt-repository.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { filterAndQualifyAptPackages } from \"./qualify-install.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nconst retryErrors = [\n \"E: Could not get lock\",\n \"dpkg: error processing archive\",\n \"dpkg: error: dpkg status database is locked by another process\",\n];\n/**\n * Install a package using apt\n *\n * @param packages The packages to install (name, and optional info like version and repositories)\n * @param update Whether to update the package list before installing (Defaults to `false`)\n *\n * @returns The installation information\n *\n * @example\n * ```ts\n * await installAptPack([{ name: \"ca-certificates\" }, { name: \"gnupg\" }])\n * ```\n *\n * @example\n * ```ts\n await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n * ```\n */\nexport async function installAptPack(packages, update = false) {\n const apt = getApt();\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via ${apt}`);\n }\n // Update the repos if needed\n if (update) {\n updateAptReposMemoized(apt);\n }\n // Add the repos if needed\n await addRepositories(apt, packages);\n const needToInstall = await filterAndQualifyAptPackages(packages, apt);\n if (needToInstall.length === 0) {\n info(\"All packages are already installed\");\n return { binDir: \"/usr/bin/\" };\n }\n // Initialize apt if needed\n await initAptMemoized(apt);\n try {\n // Add the keys if needed\n await addAptKeys(packages);\n // Install\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", ...needToInstall], {\n ...defaultExecOptions,\n env: getAptEnv(apt),\n });\n }\n catch (err) {\n if (isExecaError(err)) {\n if (retryErrors.some((error) => err.stderr.includes(error))) {\n warning(`Failed to install packages ${needToInstall}. Retrying...`);\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", \"-o\", aptTimeout, ...needToInstall], { ...defaultExecOptions, env: getAptEnv(apt) });\n }\n }\n else {\n throw err;\n }\n }\n return { binDir: \"/usr/bin/\" };\n}\nasync function addRepositories(apt, packages) {\n const allRepositories = [...new Set(packages.flatMap((pack) => pack.repository ?? []))];\n await Promise.all(allRepositories.map((repo) => addAptRepository(repo, apt)));\n}\nasync function addAptKeys(packages) {\n await Promise.all(packages.map(async (pack) => {\n if (pack.key !== undefined) {\n await addAptKey(pack.key);\n }\n }));\n}\nfunction isExecaError(err) {\n return typeof err.stderr === \"string\";\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDekQsT0FBTyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFdEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUN4QyxPQUFPLEVBQXlCLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUMvRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQTtBQUN0RCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFDN0MsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUNyQyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQy9DLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLHNCQUFzQixDQUFBO0FBQ2xFLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLGFBQWEsQ0FBQTtBQTRCcEQsTUFBTSxXQUFXLEdBQUc7SUFDbEIsdUJBQXVCO0lBQ3ZCLGdDQUFnQztJQUNoQyxnRUFBZ0U7Q0FDakUsQ0FBQTtBQUVEOzs7Ozs7Ozs7Ozs7Ozs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EaXI6IFwiL3Vzci9iaW4vXCIgfVxufVxuXG5hc3luYyBmdW5jdGlvbiBhZGRSZXBvc2l0b3JpZXMoYXB0OiBzdHJpbmcsIHBhY2thZ2VzOiBBcHRQYWNrYWdlW10pIHtcbiAgY29uc3QgYWxsUmVwb3NpdG9yaWVzID0gWy4uLm5ldyBTZXQocGFja2FnZXMuZmxhdE1hcCgocGFjaykgPT4gcGFjay5yZXBvc2l0b3J5ID8/IFtdKSldXG4gIGF3YWl0IFByb21pc2UuYWxsKGFsbFJlcG9zaXRvcmllcy5tYXAoKHJlcG8pID0+IGFkZEFwdFJlcG9zaXRvcnkocmVwbywgYXB0KSkpXG59XG5cbmFzeW5jIGZ1bmN0aW9uIGFkZEFwdEtleXMocGFja2FnZXM6IEFwdFBhY2thZ2VbXSkge1xuICBhd2FpdCBQcm9taXNlLmFsbChwYWNrYWdlcy5tYXAoYXN5bmMgKHBhY2spID0+IHtcbiAgICBpZiAocGFjay5rZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgYXdhaXQgYWRkQXB0S2V5KHBhY2sua2V5KVxuICAgIH1cbiAgfSkpXG59XG5cbmZ1bmN0aW9uIGlzRXhlY2FFcnJvcihlcnI6IHVua25vd24pOiBlcnIgaXMgRXhlY2FFcnJvciB7XG4gIHJldHVybiB0eXBlb2YgKGVyciBhcyBFeGVjYUVycm9yKS5zdGRlcnIgPT09IFwic3RyaW5nXCJcbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nexport async function addAptRepository(repo, apt = getApt()) {\n await initAptMemoized(apt);\n await installAddAptRepo(apt);\n execRootSync(\"add-apt-repository\", [\"-y\", \"--no-update\", repo], { ...defaultExecOptions, env: getAptEnv(apt) });\n // Update the repos\n updateAptReposMemoized.clear(); // ensure update is called\n updateAptReposMemoized(apt);\n}\nexport async function installAddAptRepo(apt) {\n if (await isAptPackInstalled(\"software-properties-common\")) {\n return;\n }\n execRootSync(apt, [\"install\", \"-y\", \"--fix-broken\", \"-o\", aptTimeout, \"software-properties-common\"], { ...defaultExecOptions, env: getAptEnv(apt) });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LXJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXB0LXJlcG9zaXRvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3JDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFDL0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFDdEQsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sYUFBYSxDQUFBO0FBRXBELE1BQU0sQ0FBQyxLQUFLLFVBQVUsZ0JBQWdCLENBQUMsSUFBWSxFQUFFLEdBQUcsR0FBRyxNQUFNLEVBQUU7SUFDakUsTUFBTSxlQUFlLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDMUIsTUFBTSxpQkFBaUIsQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUM1QixZQUFZLENBQUMsb0JBQW9CLEVBQUUsQ0FBQyxJQUFJLEVBQUUsYUFBYS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join } from \"path\";\nimport { execRoot, execRootSync } from \"admina\";\nimport { warning } from \"ci-log\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { pathExists } from \"path-exists\";\nimport { installAptPack } from \"./install.js\";\n/**\n * Add an apt key\n * @param options The options for adding the key\n * @returns The file name of the key that was added or `undefined` if it failed\n *\n * @example\n * ```ts\n * await addAptKey({ key: \"3B4FE6ACC0B21F32\" fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n *\n * @example\n * ```ts\n * await addAptKey({ keyUrl: \"https://bazel.build/bazel-release.pub.gpg\", fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n */\nexport function addAptKey(options) {\n if (\"keyUrl\" in options) {\n return addAptKeyViaURL(options);\n }\n else {\n return addAptKeyViaServer(options);\n }\n}\nexport const defaultKeyStorePath = \"/etc/apt/trusted.gpg.d\";\nexport const defaultKeyServer = \"keyserver.ubuntu.com\";\n/**\n * Add an apt key via a keyserver\n * @returns The file name of the key that was added or `undefined` if it failed\n */\nexport async function addAptKeyViaServer({ key, keyServer = defaultKeyServer, fileName, keyStorePath = defaultKeyServer }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await execRoot(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--keyserver\",\n keyServer,\n \"--recv-keys\",\n key,\n ]);\n await execRoot(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via server ${keyServer}: ${err}`);\n return undefined;\n }\n}\n/**\n * Add an apt key via a download\n * @param options The options for adding the key\n * @returns The file name of the key that was added\n */\nexport async function addAptKeyViaURL({ keyUrl, fileName, keyStorePath = defaultKeyStorePath }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dlPath = join(tmpdir(), fileName);\n const dl = new DownloaderHelper(keyUrl, tmpdir(), { fileName });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download ${keyUrl}: ${err}`);\n });\n await dl.start();\n execRootSync(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--import\",\n dlPath,\n ]);\n execRootSync(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via download ${keyUrl}: ${err}`);\n return undefined;\n }\n}\nfunction initGpg() {\n execRootSync(\"gpg\", [\"-k\"]);\n}\nfunction assertGpgFileName(fileName) {\n if (!fileName.endsWith(\".gpg\")) {\n throw new Error(`Key file name must end with .gpg: ${fileName}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWtleS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQta2V5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUMzQixPQUFPLEVBQUUsUUFBUSxFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUMvQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3pELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxhQUFhLENBQUE7QUFDeEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUk3Qzs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUNILE1BQU0sVUFBVSxTQUFTLENBQUMsT0FBeUI7SUFDakQsSUFBSSx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wiLFxuICAgICAgICBkbFBhdGgsXG4gICAgICBdKVxuICAgICAgZXhlY1Jvb3RTeW5jKFwiY2htb2RcIiwgW1wiNjQ0XCIsIGZpbGVQYXRoXSlcbiAgICB9XG4gICAgcmV0dXJuIGZpbGVQYXRoXG4gIH0gY2F0Y2ggKGVycikge1xuICAgIHdhcm5pbmcoYEZhaWxlZCB0byBhZGQgYXB0IGtleSB2aWEgZG93bmxvYWQgJHtrZXlVcmx9OiAke2Vycn1gKVxuICAgIHJldHVybiB1bmRlZmluZWRcbiAgfVxufVxuXG5mdW5jdGlvbiBpbml0R3BnKCkge1xuICBleGVjUm9vdFN5bmMoXCJncGdcIiwgW1wiLWtcIl0pXG59XG5cbmZ1bmN0aW9uIGFzc2VydEdwZ0ZpbGVOYW1lKGZpbGVOYW1lOiBzdHJpbmcpIHtcbiAgaWYgKCFmaWxlTmFtZS5lbmRzV2l0aChcIi5ncGdcIikpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYEtleSBmaWxlIG5hbWUgbXVzdCBlbmQgd2l0aCAuZ3BnOiAke2ZpbGVOYW1lfWApXG4gIH1cbn1cbiJdfQ==","import { tmpdir } from \"os\";\nimport { dirname, join } from \"path\";\nimport { addPath } from \"envosman\";\nimport { execaSync } from \"execa\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { installAptPack } from \"setup-apt\";\nimport which from \"which\";\n/* eslint-disable require-atomic-updates */\nlet binDir;\nexport async function setupBrew(options = {}) {\n // brew is only available on darwin and linux\n if (![\"darwin\", \"linux\"].includes(process.platform)) {\n return undefined;\n }\n // check if the function has already been called\n if (typeof binDir === \"string\") {\n return { binDir };\n }\n // check if brew is already installed\n const maybeBinDir = await which(\"brew\", { nothrow: true });\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir);\n return { binDir };\n }\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dl = new DownloaderHelper(\"https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh\", tmpdir(), {\n fileName: \"install-brew.sh\",\n });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the brew installer script: ${err}`);\n });\n await dl.start();\n // brew installation is not thread-safe\n execaSync(\"/bin/bash\", [dl.getDownloadPath()], {\n stdio: \"inherit\",\n env: {\n NONINTERACTIVE: \"1\",\n },\n });\n // add the bin directory to the PATH\n binDir = getBrewBinDir();\n await addPath(binDir, options.rcOptions);\n return { binDir };\n}\n/**\n * Get the path to the bin directory of brew\n * @returns {string} The path where brew binary is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewBinDir() {\n return join(getBrewDir(), \"bin\");\n}\n/**\n * Get the path where brew is installed\n * @returns {string} The path where brew is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewDir() {\n if (process.platform === \"darwin\") {\n if (process.arch === \"arm64\") {\n return \"/opt/homebrew\";\n }\n else {\n return \"/usr/local\";\n }\n }\n if (process.platform === \"linux\") {\n return \"/home/linuxbrew/.linuxbrew\";\n }\n throw new Error(\"Unsupported platform for brew\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxNQUFNLENBQUE7QUFDcEMsT0FBTyxFQUF1QixPQUFPLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDdkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUNqQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsY0FBYyxFQUFF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ZXdCaW5EaXIoKSB7XG4gIHJldHVybiBqb2luKGdldEJyZXdEaXIoKSwgXCJiaW5cIilcbn1cblxuLyoqXG4gKiBHZXQgdGhlIHBhdGggd2hlcmUgYnJldyBpcyBpbnN0YWxsZWRcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBwYXRoIHdoZXJlIGJyZXcgaXMgaW5zdGFsbGVkXG4gKlxuICogQmFzZWQgb24gdGhlIGluc3RhbGxhdGlvbiBzY3JpcHQgZnJvbSBodHRwczovL2JyZXcuc2hcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEJyZXdEaXIoKSB7XG4gIGlmIChwcm9jZXNzLnBsYXRmb3JtID09PSBcImRhcndpblwiKSB7XG4gICAgaWYgKHByb2Nlc3MuYXJjaCA9PT0gXCJhcm02NFwiKSB7XG4gICAgICByZXR1cm4gXCIvb3B0L2hvbWVicmV3XCJcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIFwiL3Vzci9sb2NhbFwiXG4gICAgfVxuICB9XG5cbiAgaWYgKHByb2Nlc3MucGxhdGZvcm0gPT09IFwibGludXhcIikge1xuICAgIHJldHVybiBcIi9ob21lL2xpbnV4YnJldy8ubGludXhicmV3XCJcbiAgfVxuXG4gIHRocm93IG5ldyBFcnJvcihcIlVuc3VwcG9ydGVkIHBsYXRmb3JtIGZvciBicmV3XCIpXG59XG4iXX0=","import { join } from \"path\";\nimport { info } from \"ci-log\";\nimport { execaSync } from \"execa\";\nimport which from \"which\";\nimport { getBrewBinDir, setupBrew } from \"./install.js\";\n/* eslint-disable require-atomic-updates */\nlet hasBrew = false;\n/** A function that installs a package using brew\n *\n * @param name The name of the package\n * @param version The version of the package (optional)\n * @param options The options for installing the package\n *\n * @returns The installation information\n */\nexport async function installBrewPack(name, version, givenOptions = {}) {\n const options = {\n overwrite: true,\n cask: false,\n args: [],\n ...givenOptions,\n };\n info(`Installing ${name} ${version ?? \"\"} via brew`);\n if (!hasBrew || which.sync(\"brew\", { nothrow: true }) === null) {\n await setupBrew();\n hasBrew = true;\n }\n const binDir = getBrewBinDir();\n const brewPath = join(binDir, \"brew\");\n // Args\n const args = [\n \"install\",\n (version !== undefined && version !== \"\") ? `${name}@${version}` : name,\n ];\n if (options.overwrite) {\n args.push(\"--overwrite\");\n }\n if (options.cask) {\n args.push(\"--cask\");\n }\n // brew is not thread-safe\n execaSync(brewPath, args, { stdio: \"inherit\" });\n return { binDir };\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC1wYWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2luc3RhbGwtcGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUNqQyxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsT0FBTyxFQUFFLGFBQWEsRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFdkQsMkNBQTJDO0FBQzNDLElBQUksT0FBTyxHQUFHLEtBQUssQ0FBQTtBQVduQjs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSxlQUFlLENBQ25DLElBQVksRUFDWixPQUFnQixFQUNoQixlQUFnQyxFQUFFO0lBRWxDLE1BQU0sT0FBTyxHQUFHO1FBQ2QsU0FBUyxFQUFFLElBQUk7UUFDZixJQUFJLEVBQUUsS0FBSztRQUNYLElBQUksRUFBRSxFQUFFO1FBQ1IsR0FBRyxZQUFZO0tBQ2hCLENBQUE7SUFFRCxJQUFJLENBQUMsY0FBYyxJQUFJLElBQUksT0FBTyxJQUFJLEVBQUU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wiaW5oZXJpdFwiIH0pXG5cbiAgcmV0dXJuIHsgYmluRGlyIH1cbn1cbiJdfQ==","import which from \"which\"\n\nlet hasDnfCache: undefined | boolean = undefined\n\nexport function hasDnf(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (hasDnfCache === undefined) {\n hasDnfCache = which.sync(\"dnf\", { nothrow: true }) !== null\n }\n\n return hasDnfCache\n}\n","import which from \"which\"\n\nlet isArchCache: undefined | boolean = undefined\n\nexport function isArch(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isArchCache === undefined) {\n // detect arch by checking if pacman exists\n isArchCache = which.sync(\"pacman\", { nothrow: true }) !== null\n }\n\n return isArchCache\n}\n","import which from \"which\"\n\nlet isUbuntuCache: undefined | boolean = undefined\n\nexport function isUbuntu(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isUbuntuCache === undefined) {\n const apt = \"apt-get\"\n isUbuntuCache = which.sync(apt, { nothrow: true }) !== null\n }\n\n return isUbuntuCache\n}\n","import { dirname } from \"path\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet binDir: string | undefined\n\nexport async function setupChocolatey(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _version: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setupDir: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _arch: string,\n): Promise {\n if (process.platform !== \"win32\") {\n return undefined\n }\n\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"choco\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n let powershell = \"powershell.exe\"\n const maybePowerShell = which.sync(`${process.env.SystemRoot}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, {\n nothrow: true,\n })\n if (maybePowerShell !== null) {\n powershell = maybePowerShell\n }\n\n // https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe\n execaSync(\n powershell,\n [\n \"-NoProfile\",\n \"-InputFormat\",\n \"None\",\n \"-ExecutionPolicy\",\n \"Bypass\",\n \"-Command\",\n \"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\",\n ],\n { stdio: \"inherit\" },\n )\n\n const chocoPath = `${process.env.ALLUSERSPROFILE}\\\\chocolatey\\\\bin`\n await addPath(chocoPath, rcOptions)\n\n const maybeChoco = which.sync(\"choco\", { nothrow: true })\n if (maybeChoco !== null) {\n binDir = dirname(maybeChoco)\n } else {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n\n if (await pathExists(binDir)) {\n return { binDir }\n }\n return undefined\n}\n","/* eslint-disable require-atomic-updates */\nimport { info } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport which from \"which\"\nimport { setupChocolatey } from \"../../chocolatey/chocolatey.js\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\nlet hasChoco = false\n\n/** A function that installs a package using choco */\nexport async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise {\n info(`Installing ${name} ${version ?? \"\"} via chocolatey`)\n\n if (!hasChoco || which.sync(\"choco\", { nothrow: true }) === null) {\n await setupChocolatey(\"\", \"\", process.arch)\n hasChoco = true\n }\n\n // https://github.com/jberezanski/ChocolateyPackages/issues/97#issuecomment-986825694\n const PATH = process.env.PATH\n const env = { ...process.env }\n env.TMP = undefined\n env.TEMP = undefined\n env.Path = undefined\n env.PATH = PATH\n\n if (version !== undefined && version !== \"\") {\n execaSync(\"choco\", [\"install\", \"-y\", name, `--version=${version}`, ...args], {\n env,\n extendEnv: false,\n stdio: \"inherit\",\n })\n } else {\n try {\n execaSync(\"choco\", [\"install\", \"-y\", name, ...args], { env, extendEnv: false, stdio: \"inherit\" })\n } catch (err) {\n // if the package requires a reboot, downgrade the error to a notice\n if ((err as Error).message.includes(\"exit code 3010\")) {\n info(`${name} might require a reboot for the completion of the installation.`)\n } else {\n throw err\n }\n }\n }\n\n const binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n","import { execRootSync } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\ntype DnfPackage = {\n name: string\n version?: string\n}\n\n/** A function that installs a package using dnf */\nexport async function setupDnfPack(packages: DnfPackage[]): Promise {\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via dnf`)\n }\n\n const dnfArgs = await Promise.all(packages.map((pack) => getDnfArg(pack.name, pack.version)))\n execRootSync(\"dnf\", [\"-y\", \"install\", ...dnfArgs])\n\n return { binDir: \"/usr/bin/\" }\n}\n\nasync function getDnfArg(name: string, version: string | undefined) {\n if (version !== undefined && version !== \"\") {\n // check if name-version is available\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}-${version}`])\n\n if (stdout.trim() !== \"\") {\n return `${name}-${version}`\n } else {\n // try with ${name}${version}\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}${version}`])\n if (stdout.trim() !== \"\") {\n return `${name}${version}`\n }\n\n warning(`Failed to install ${name} ${version} via dnf, trying without version`)\n }\n }\n return name\n}\n","import { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRootSync, isRoot } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa, execaSync } from \"execa\"\nimport which from \"which\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet didUpdate: boolean = false\nlet didInit: boolean = false\n\n/** A function that installs a package using pacman */\nexport async function setupPacmanPack(name: string, version?: string, aur?: string): Promise {\n info(`Installing ${name} ${version ?? \"\"} via pacman`)\n\n const pacman = \"pacman\"\n\n if (aur === \"yay\") {\n setupYay()\n }\n\n // yay can't run as root, so skip update\n if (!didUpdate && aur !== \"yay\") {\n execRootSync(pacman, [\"-Sy\", \"--noconfirm\"])\n didUpdate = true\n }\n\n // install base-devel\n if (!didInit && aur !== \"yay\") {\n execRootSync(pacman, [\"-S\", \"--noconfirm\", \"base-devel\"])\n didInit = true\n }\n\n const runInstall = (arg: string) => {\n if (aur === \"yay\") {\n // run yay as non-root to fix ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.\n if (isRoot() && createdBuilderUser) {\n // Run yay as builder user\n return execRootSync(\"su\", [\"-\", \"builder\", \"-c\", `yay -S --noconfirm ${arg}`])\n } else {\n return execaSync(aur, [\"-S\", \"--noconfirm\", arg])\n }\n }\n return execRootSync(aur ?? pacman, [\"-S\", \"--noconfirm\", arg])\n }\n\n if (version !== undefined && version !== \"\") {\n // check if version is available\n const availableVersions = await availablePacmanVersions(pacman, name)\n if (availableVersions.includes(version)) {\n // try different version formats\n try {\n runInstall(`${name}=${version}`)\n } catch {\n runInstall(`${name}${version}`)\n }\n } else {\n // try without version\n info(`Failed to install ${name} ${version} via pacman, trying without version`)\n runInstall(name)\n }\n } else {\n // version not specified, install latest\n runInstall(name)\n }\n\n return { binDir: \"/usr/bin/\" }\n}\n\nconst pacmanSiVersionRegex = /Version\\s*:\\s*(.*)/g\n\n/** Query pacman for available versions */\nasync function availablePacmanVersions(pacman: string, name: string) {\n const availableVersions = []\n try {\n const { stdout } = await execa(pacman, [\"-Si\", name])\n\n for (const match of stdout.matchAll(pacmanSiVersionRegex)) {\n availableVersions.push(match[1])\n }\n } catch (err) {\n warning(`Failed to get available versions for ${name}: ${err}`)\n }\n return availableVersions\n}\n\nlet createdBuilderUser = false\n\nfunction setupYay() {\n if (which.sync(\"yay\", { nothrow: true }) === null) {\n try {\n // Install prerequisites\n execRootSync(\"pacman\", [\"-S\", \"--noconfirm\", \"base-devel\", \"git\"])\n\n const yayBuildDir = join(tmpdir(), \"yay\")\n\n execRootSync(\"mkdir\", [\"-p\", yayBuildDir])\n\n if (isRoot()) {\n // Create a non-root user to build yay\n warning(\"Creating a non-root user to build yay\")\n execRootSync(\"useradd\", [\"-m\", \"-G\", \"wheel\", \"builder\"])\n execRootSync(\"passwd\", [\"-d\", \"builder\"])\n execRootSync(\"chown\", [\"-R\", \"builder:builder\", yayBuildDir])\n execRootSync(\"bash\", [\"-c\", `echo \"builder ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers`])\n createdBuilderUser = true\n\n // Clone the yay repository into a temporary directory\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `git clone https://aur.archlinux.org/yay.git ${yayBuildDir}`], {\n stdio: \"inherit\",\n })\n\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `cd ${yayBuildDir} && makepkg -si --noconfirm`], {\n stdio: \"inherit\",\n })\n } else {\n // Clone the yay repository into a temporary directory\n execaSync(\"git\", [\"clone\", \"https://aur.archlinux.org/yay.git\", yayBuildDir], {\n stdio: \"inherit\",\n cwd: tmpdir(),\n })\n\n // Build and install yay\n execaSync(\"makepkg\", [\"-si\", \"--noconfirm\"], {\n stdio: \"inherit\",\n cwd: yayBuildDir,\n })\n }\n\n // clean-up\n execaSync(\"rm\", [\"-rf\", yayBuildDir], { stdio: \"inherit\" })\n } catch (error) {\n throw new Error(`Failed to install yay: ${error}. Install yay manually and re-run the script.`)\n }\n }\n}\n","function e(e,a){return Object.keys(a).forEach((r=>{\"default\"===r||\"__esModule\"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get(){return a[r]}})})),e}function a(e,a,r,s){Object.defineProperty(e,a,{get:r,set:s,enumerable:!0,configurable:!0})}function r(e,a=!0){return a?u(e):u(e,x(e))}function s(e){return E(e).replace(RegExp(y(N)+\"$\"),\"\")}function t(e,a=\".exe\",r=\"\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function n(e,a){const r=x(e),s=`${a}${u(e,r)}${r}`;return h(l(e),s)}function i(e,a){const r=x(e),s=`${u(e,r)}${a}${r}`;return h(l(e),s)}function o(e,a=\".cmd\",r=\".sh\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function m(e){return\"win32\"===process.platform?e:\"./\"+e}function c(e){const a=x(e).length;return e.slice(0,-a)}function d(e,a){return z(e,a)}function f(e,a){const r=g(a,e);return!(!r||\"..\"===r||r.startsWith(\"..\"+N)||r===w(e))}import{basename as u,delimiter as p,dirname as l,extname as x,format as v,isAbsolute as $,join as h,normalize as E,parse as P,posix as b,relative as g,resolve as w,sep as N,toNamespacedPath as S,win32 as j}from\"path\";import y from\"escape-string-regexp\";import z from\"replace-ext\";var O={},R={};a(R,\"name\",(()=>r));var A={};a(A,\"normalizeTrim\",(()=>s));var I={};a(I,\"addExeExt\",(()=>t));var T={};a(T,\"addNamePrefix\",(()=>n));var _={};a(_,\"addNameSuffix\",(()=>i));var k={};a(k,\"addShExt\",(()=>o));var M={};a(M,\"addShRelativePrefix\",(()=>m));var W={};a(W,\"removeExt\",(()=>c));var q={};a(q,\"replaceExt\",(()=>d));var B={};a(B,\"isPathInside\",(()=>f)),e(O,R),e(O,A),e(O,I),e(O,T),e(O,_),e(O,k),e(O,M),e(O,W),e(O,q),e(O,B);export{u as basename,p as delimiter,l as dirname,x as extname,v as format,$ as isAbsolute,h as join,E as normalize,P as parse,b as posix,g as relative,w as resolve,N as sep,S as toNamespacedPath,j as win32,r as name,s as normalizeTrim,t as addExeExt,n as addNamePrefix,i as addNameSuffix,o as addShExt,m as addShRelativePrefix,c as removeExt,d as replaceExt,f as isPathInside};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst mm = __importStar(require(\"./manifest\"));\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst httpm = __importStar(require(\"@actions/http-client\"));\nconst semver = __importStar(require(\"semver\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst assert_1 = require(\"assert\");\nconst v4_1 = __importDefault(require(\"uuid/v4\"));\nconst exec_1 = require(\"@actions/exec/lib/exec\");\nconst retry_helper_1 = require(\"./retry-helper\");\nclass HTTPError extends Error {\n constructor(httpStatusCode) {\n super(`Unexpected HTTP response: ${httpStatusCode}`);\n this.httpStatusCode = httpStatusCode;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nexports.HTTPError = HTTPError;\nconst IS_WINDOWS = process.platform === 'win32';\nconst IS_MAC = process.platform === 'darwin';\nconst userAgent = 'actions/tool-cache';\n/**\n * Download a tool from an url and stream it into a file\n *\n * @param url url of tool to download\n * @param dest path to download tool\n * @param auth authorization header\n * @param headers other headers\n * @returns path to downloaded tool\n */\nfunction downloadTool(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n dest = dest || path.join(_getTempDirectory(), v4_1.default());\n yield io.mkdirP(path.dirname(dest));\n core.debug(`Downloading ${url}`);\n core.debug(`Destination ${dest}`);\n const maxAttempts = 3;\n const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10);\n const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);\n const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);\n return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {\n return yield downloadToolAttempt(url, dest || '', auth, headers);\n }), (err) => {\n if (err instanceof HTTPError && err.httpStatusCode) {\n // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests\n if (err.httpStatusCode < 500 &&\n err.httpStatusCode !== 408 &&\n err.httpStatusCode !== 429) {\n return false;\n }\n }\n // Otherwise retry\n return true;\n });\n });\n}\nexports.downloadTool = downloadTool;\nfunction downloadToolAttempt(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(dest)) {\n throw new Error(`Destination file path ${dest} already exists`);\n }\n // Get the response headers\n const http = new httpm.HttpClient(userAgent, [], {\n allowRetries: false\n });\n if (auth) {\n core.debug('set auth');\n if (headers === undefined) {\n headers = {};\n }\n headers.authorization = auth;\n }\n const response = yield http.get(url, headers);\n if (response.message.statusCode !== 200) {\n const err = new HTTPError(response.message.statusCode);\n core.debug(`Failed to download from \"${url}\". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);\n throw err;\n }\n // Download the response body\n const pipeline = util.promisify(stream.pipeline);\n const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message);\n const readStream = responseMessageFactory();\n let succeeded = false;\n try {\n yield pipeline(readStream, fs.createWriteStream(dest));\n core.debug('download complete');\n succeeded = true;\n return dest;\n }\n finally {\n // Error, delete dest before retry\n if (!succeeded) {\n core.debug('download failed');\n try {\n yield io.rmRF(dest);\n }\n catch (err) {\n core.debug(`Failed to delete '${dest}'. ${err.message}`);\n }\n }\n }\n });\n}\n/**\n * Extract a .7z file\n *\n * @param file path to the .7z file\n * @param dest destination directory. Optional.\n * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this\n * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will\n * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is\n * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line\n * interface, it is smaller than the full command line interface, and it does support long paths. At the\n * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website.\n * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path\n * to 7zr.exe can be pass to this function.\n * @returns path to the destination directory\n */\nfunction extract7z(file, dest, _7zPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n const originalCwd = process.cwd();\n process.chdir(dest);\n if (_7zPath) {\n try {\n const logLevel = core.isDebug() ? '-bb1' : '-bb0';\n const args = [\n 'x',\n logLevel,\n '-bd',\n '-sccUTF-8',\n file\n ];\n const options = {\n silent: true\n };\n yield exec_1.exec(`\"${_7zPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n else {\n const escapedScript = path\n .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1')\n .replace(/'/g, \"''\")\n .replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const escapedTarget = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`;\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n command\n ];\n const options = {\n silent: true\n };\n try {\n const powershellPath = yield io.which('powershell', true);\n yield exec_1.exec(`\"${powershellPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n return dest;\n });\n}\nexports.extract7z = extract7z;\n/**\n * Extract a compressed tar archive\n *\n * @param file path to the tar\n * @param dest destination directory. Optional.\n * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.\n * @returns path to the destination directory\n */\nfunction extractTar(file, dest, flags = 'xz') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n // Create dest\n dest = yield _createExtractFolder(dest);\n // Determine whether GNU tar\n core.debug('Checking tar --version');\n let versionOutput = '';\n yield exec_1.exec('tar --version', [], {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n core.debug(versionOutput.trim());\n const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');\n // Initialize args\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n if (core.isDebug() && !flags.includes('v')) {\n args.push('-v');\n }\n let destArg = dest;\n let fileArg = file;\n if (IS_WINDOWS && isGnuTar) {\n args.push('--force-local');\n destArg = dest.replace(/\\\\/g, '/');\n // Technically only the dest needs to have `/` but for aesthetic consistency\n // convert slashes in the file arg too.\n fileArg = file.replace(/\\\\/g, '/');\n }\n if (isGnuTar) {\n // Suppress warnings when using GNU tar to extract archives created by BSD tar\n args.push('--warning=no-unknown-keyword');\n args.push('--overwrite');\n }\n args.push('-C', destArg, '-f', fileArg);\n yield exec_1.exec(`tar`, args);\n return dest;\n });\n}\nexports.extractTar = extractTar;\n/**\n * Extract a xar compatible archive\n *\n * @param file path to the archive\n * @param dest destination directory. Optional.\n * @param flags flags for the xar. Optional.\n * @returns path to the destination directory\n */\nfunction extractXar(file, dest, flags = []) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n args.push('-x', '-C', dest, '-f', file);\n if (core.isDebug()) {\n args.push('-v');\n }\n const xarPath = yield io.which('xar', true);\n yield exec_1.exec(`\"${xarPath}\"`, _unique(args));\n return dest;\n });\n}\nexports.extractXar = extractXar;\n/**\n * Extract a zip\n *\n * @param file path to the zip\n * @param dest destination directory. Optional.\n * @returns path to the destination directory\n */\nfunction extractZip(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n dest = yield _createExtractFolder(dest);\n if (IS_WINDOWS) {\n yield extractZipWin(file, dest);\n }\n else {\n yield extractZipNix(file, dest);\n }\n return dest;\n });\n}\nexports.extractZip = extractZip;\nfunction extractZipWin(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n // build the powershell command\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedDest = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const pwshPath = yield io.which('pwsh', false);\n //To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory\n //and the -Force flag for Expand-Archive as a fallback\n if (pwshPath) {\n //attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive\n const pwshCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,\n `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`,\n `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n pwshCommand\n ];\n core.debug(`Using pwsh at path: ${pwshPath}`);\n yield exec_1.exec(`\"${pwshPath}\"`, args);\n }\n else {\n const powershellCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,\n `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`,\n `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n powershellCommand\n ];\n const powershellPath = yield io.which('powershell', true);\n core.debug(`Using powershell at path: ${powershellPath}`);\n yield exec_1.exec(`\"${powershellPath}\"`, args);\n }\n });\n}\nfunction extractZipNix(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n const unzipPath = yield io.which('unzip', true);\n const args = [file];\n if (!core.isDebug()) {\n args.unshift('-q');\n }\n args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run\n yield exec_1.exec(`\"${unzipPath}\"`, args, { cwd: dest });\n });\n}\n/**\n * Caches a directory and installs it into the tool cacheDir\n *\n * @param sourceDir the directory to cache into tools\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheDir(sourceDir, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source dir: ${sourceDir}`);\n if (!fs.statSync(sourceDir).isDirectory()) {\n throw new Error('sourceDir is not a directory');\n }\n // Create the tool dir\n const destPath = yield _createToolPath(tool, version, arch);\n // copy each child item. do not move. move can fail on Windows\n // due to anti-virus software having an open handle on a file.\n for (const itemName of fs.readdirSync(sourceDir)) {\n const s = path.join(sourceDir, itemName);\n yield io.cp(s, destPath, { recursive: true });\n }\n // write .complete\n _completeToolPath(tool, version, arch);\n return destPath;\n });\n}\nexports.cacheDir = cacheDir;\n/**\n * Caches a downloaded file (GUID) and installs it\n * into the tool cache with a given targetName\n *\n * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid.\n * @param targetFile the name of the file name in the tools directory\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheFile(sourceFile, targetFile, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source file: ${sourceFile}`);\n if (!fs.statSync(sourceFile).isFile()) {\n throw new Error('sourceFile is not a file');\n }\n // create the tool dir\n const destFolder = yield _createToolPath(tool, version, arch);\n // copy instead of move. move can fail on Windows due to\n // anti-virus software having an open handle on a file.\n const destPath = path.join(destFolder, targetFile);\n core.debug(`destination file ${destPath}`);\n yield io.cp(sourceFile, destPath);\n // write .complete\n _completeToolPath(tool, version, arch);\n return destFolder;\n });\n}\nexports.cacheFile = cacheFile;\n/**\n * Finds the path to a tool version in the local installed tool cache\n *\n * @param toolName name of the tool\n * @param versionSpec version of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction find(toolName, versionSpec, arch) {\n if (!toolName) {\n throw new Error('toolName parameter is required');\n }\n if (!versionSpec) {\n throw new Error('versionSpec parameter is required');\n }\n arch = arch || os.arch();\n // attempt to resolve an explicit version\n if (!isExplicitVersion(versionSpec)) {\n const localVersions = findAllVersions(toolName, arch);\n const match = evaluateVersions(localVersions, versionSpec);\n versionSpec = match;\n }\n // check for the explicit version in the cache\n let toolPath = '';\n if (versionSpec) {\n versionSpec = semver.clean(versionSpec) || '';\n const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch);\n core.debug(`checking cache: ${cachePath}`);\n if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) {\n core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`);\n toolPath = cachePath;\n }\n else {\n core.debug('not found');\n }\n }\n return toolPath;\n}\nexports.find = find;\n/**\n * Finds the paths to all versions of a tool that are installed in the local tool cache\n *\n * @param toolName name of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction findAllVersions(toolName, arch) {\n const versions = [];\n arch = arch || os.arch();\n const toolPath = path.join(_getCacheDirectory(), toolName);\n if (fs.existsSync(toolPath)) {\n const children = fs.readdirSync(toolPath);\n for (const child of children) {\n if (isExplicitVersion(child)) {\n const fullPath = path.join(toolPath, child, arch || '');\n if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {\n versions.push(child);\n }\n }\n }\n }\n return versions;\n}\nexports.findAllVersions = findAllVersions;\nfunction getManifestFromRepo(owner, repo, auth, branch = 'master') {\n return __awaiter(this, void 0, void 0, function* () {\n let releases = [];\n const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;\n const http = new httpm.HttpClient('tool-cache');\n const headers = {};\n if (auth) {\n core.debug('set auth');\n headers.authorization = auth;\n }\n const response = yield http.getJson(treeUrl, headers);\n if (!response.result) {\n return releases;\n }\n let manifestUrl = '';\n for (const item of response.result.tree) {\n if (item.path === 'versions-manifest.json') {\n manifestUrl = item.url;\n break;\n }\n }\n headers['accept'] = 'application/vnd.github.VERSION.raw';\n let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();\n if (versionsRaw) {\n // shouldn't be needed but protects against invalid json saved with BOM\n versionsRaw = versionsRaw.replace(/^\\uFEFF/, '');\n try {\n releases = JSON.parse(versionsRaw);\n }\n catch (_a) {\n core.debug('Invalid json');\n }\n }\n return releases;\n });\n}\nexports.getManifestFromRepo = getManifestFromRepo;\nfunction findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) {\n return __awaiter(this, void 0, void 0, function* () {\n // wrap the internal impl\n const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter);\n return match;\n });\n}\nexports.findFromManifest = findFromManifest;\nfunction _createExtractFolder(dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!dest) {\n // create a temp dir\n dest = path.join(_getTempDirectory(), v4_1.default());\n }\n yield io.mkdirP(dest);\n return dest;\n });\n}\nfunction _createToolPath(tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n core.debug(`destination ${folderPath}`);\n const markerPath = `${folderPath}.complete`;\n yield io.rmRF(folderPath);\n yield io.rmRF(markerPath);\n yield io.mkdirP(folderPath);\n return folderPath;\n });\n}\nfunction _completeToolPath(tool, version, arch) {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n const markerPath = `${folderPath}.complete`;\n fs.writeFileSync(markerPath, '');\n core.debug('finished caching tool');\n}\n/**\n * Check if version string is explicit\n *\n * @param versionSpec version string to check\n */\nfunction isExplicitVersion(versionSpec) {\n const c = semver.clean(versionSpec) || '';\n core.debug(`isExplicit: ${c}`);\n const valid = semver.valid(c) != null;\n core.debug(`explicit? ${valid}`);\n return valid;\n}\nexports.isExplicitVersion = isExplicitVersion;\n/**\n * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec`\n *\n * @param versions array of versions to evaluate\n * @param versionSpec semantic version spec to satisfy\n */\nfunction evaluateVersions(versions, versionSpec) {\n let version = '';\n core.debug(`evaluating ${versions.length} versions`);\n versions = versions.sort((a, b) => {\n if (semver.gt(a, b)) {\n return 1;\n }\n return -1;\n });\n for (let i = versions.length - 1; i >= 0; i--) {\n const potential = versions[i];\n const satisfied = semver.satisfies(potential, versionSpec);\n if (satisfied) {\n version = potential;\n break;\n }\n }\n if (version) {\n core.debug(`matched: ${version}`);\n }\n else {\n core.debug('match not found');\n }\n return version;\n}\nexports.evaluateVersions = evaluateVersions;\n/**\n * Gets RUNNER_TOOL_CACHE\n */\nfunction _getCacheDirectory() {\n const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';\n assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');\n return cacheDirectory;\n}\n/**\n * Gets RUNNER_TEMP\n */\nfunction _getTempDirectory() {\n const tempDirectory = process.env['RUNNER_TEMP'] || '';\n assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');\n return tempDirectory;\n}\n/**\n * Gets a global variable\n */\nfunction _getGlobal(key, defaultValue) {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const value = global[key];\n /* eslint-enable @typescript-eslint/no-explicit-any */\n return value !== undefined ? value : defaultValue;\n}\n/**\n * Returns an array of unique values.\n * @param values Values to make unique.\n */\nfunction _unique(values) {\n return Array.from(new Set(values));\n}\n//# sourceMappingURL=tool-cache.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryAsPromised = exports.TimeoutError = void 0;\nclass TimeoutError extends Error {\n constructor(message, previousError) {\n super(message);\n this.name = \"TimeoutError\";\n this.previous = previousError;\n }\n}\nexports.TimeoutError = TimeoutError;\nfunction matches(match, err) {\n if (typeof match === 'function') {\n try {\n if (err instanceof match)\n return true;\n }\n catch (_) {\n return !!match(err);\n }\n }\n if (match === err.toString())\n return true;\n if (match === err.message)\n return true;\n return match instanceof RegExp\n && (match.test(err.message) || match.test(err.toString()));\n}\nfunction retryAsPromised(callback, optionsInput) {\n if (!callback || !optionsInput) {\n throw new Error('retry-as-promised must be passed a callback and a options set');\n }\n optionsInput = (typeof optionsInput === \"number\" ? { max: optionsInput } : optionsInput);\n const options = {\n $current: \"$current\" in optionsInput ? optionsInput.$current : 1,\n max: optionsInput.max,\n timeout: optionsInput.timeout || undefined,\n match: optionsInput.match ? Array.isArray(optionsInput.match) ? optionsInput.match : [optionsInput.match] : [],\n backoffBase: optionsInput.backoffBase === undefined ? 100 : optionsInput.backoffBase,\n backoffExponent: optionsInput.backoffExponent || 1.1,\n report: optionsInput.report,\n name: optionsInput.name || callback.name || 'unknown'\n };\n if (options.match && !Array.isArray(options.match))\n options.match = [options.match];\n if (options.report)\n options.report('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString(), options);\n return new Promise(function (resolve, reject) {\n let timeout;\n let backoffTimeout;\n let lastError;\n if (options.timeout) {\n timeout = setTimeout(function () {\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n reject(new TimeoutError(options.name + ' timed out', lastError));\n }, options.timeout);\n }\n Promise.resolve(callback({ current: options.$current }))\n .then(resolve)\n .then(function () {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n })\n .catch(function (err) {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n lastError = err;\n if (options.report)\n options.report((err && err.toString()) || err, options, err);\n // Should not retry if max has been reached\n var shouldRetry = options.$current < options.max;\n if (!shouldRetry)\n return reject(err);\n shouldRetry = options.match.length === 0 || options.match.some(function (match) {\n return matches(match, err);\n });\n if (!shouldRetry)\n return reject(err);\n var retryDelay = options.backoffBase * Math.pow(options.backoffExponent, options.$current - 1);\n // Do some accounting\n options.$current++;\n if (options.report)\n options.report(`Retrying ${options.name} (${options.$current})`, options);\n if (retryDelay) {\n // Use backoff function to ease retry rate\n if (options.report)\n options.report(`Delaying retry of ${options.name} by ${retryDelay}`, options);\n backoffTimeout = setTimeout(function () {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }, retryDelay);\n }\n else {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }\n });\n });\n}\nexports.retryAsPromised = retryAsPromised;\n;\nexports.default = retryAsPromised;\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSevenZip(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"7zip\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"p7zip\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"p7zip\", version)\n } else if (hasDnf()) {\n return setupDnfPack([\n { name: \"p7zip\", version },\n { name: \"p7zip-plugins\", version },\n ])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"p7zip-full\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { mkdirP } from \"@actions/io\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { setupSevenZip } from \"../../sevenzip/sevenzip.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\nexport { extractTar, extractXar } from \"@actions/tool-cache\"\n\nexport enum ArchiveType {\n Tar = 0,\n TarGz = 1,\n TarXz = 2,\n Zip = 3,\n SevenZip = 4,\n}\n\nexport function getArchiveType(file: string): ArchiveType {\n const ext = file.split(\".\").pop()\n\n if (ext === \"tar\") {\n return ArchiveType.Tar\n }\n\n if (ext === \"gz\" || ext === \"tgz\") {\n return ArchiveType.TarGz\n }\n\n if (ext === \"xz\" || ext === \"txz\") {\n return ArchiveType.TarXz\n }\n\n if (ext === \"zip\") {\n return ArchiveType.Zip\n }\n\n if (ext === \"7z\" || ext === \"exe\") {\n return ArchiveType.SevenZip\n }\n\n // default to 7z\n warning(`Unknown archive type: ${ext}. Defaulting to 7z`)\n return ArchiveType.SevenZip\n}\n\nexport function getExtractFunction(archiveType: ArchiveType) {\n switch (archiveType) {\n case ArchiveType.Tar:\n case ArchiveType.TarGz:\n return extractTarByExe\n case ArchiveType.TarXz:\n return extractTarByExe\n case ArchiveType.Zip:\n return extractZip\n default:\n return extract7Zip\n }\n}\n\nlet sevenZip: string | undefined\n\n/// Extract 7z using 7z\nexport async function extract7Zip(file: string, dest: string) {\n await execa(await getSevenZip(), [\"x\", file, `-o${dest}`, \"-y\"], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n}\n\n/// install 7z if needed\nasync function getSevenZip() {\n if (sevenZip === undefined) {\n if (which.sync(\"7z\", { nothrow: true }) === null) {\n await setupSevenZip(\"\", \"\", process.arch)\n }\n // eslint-disable-next-line require-atomic-updates\n sevenZip = \"7z\"\n }\n return sevenZip\n}\n\n/// Extract Exe using 7z\nexport function extractExe(file: string, dest: string) {\n return extract7Zip(file, dest)\n}\n\n/// Extract Zip using unzip or 7z\nexport async function extractZip(file: string, dest: string) {\n // prefer 7z if available (faster especially on Windows)\n if (which.sync(\"7z\", { nothrow: true }) !== null) {\n return extract7Zip(file, dest)\n }\n\n // if unzip is available use it (usually available on posix systems)\n if (which.sync(\"unzip\", { nothrow: true }) !== null) {\n await execa(\"unzip\", [\"-q\", file, \"-d\", dest], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n }\n\n // fallback to 7z (will install 7z if needed)\n return extract7Zip(file, dest)\n}\n\nexport async function extractTarByExe(file: string, dest: string, stripComponents: number = 0, flags: string[] = []) {\n await installTarDependencies(getArchiveType(file))\n\n try {\n await mkdirP(dest)\n } catch {\n // ignore\n }\n\n // TODO windows fails to create symlinks\n // https://github.com/heroku/heroku-slugs/issues/3\n\n try {\n await execa(\"tar\", [\"xf\", file, \"-C\", dest, `--strip-components=${stripComponents}`, ...flags], {\n stdio: \"inherit\",\n })\n } catch (e) {\n if (process.platform === \"win32\" && (e as Error).message.includes(\"Can't create '\\\\\\\\?\\\\C:\")) {\n warning(`Failed to extract symlink ${file} to ${dest}. Ignoring this symlink.`)\n }\n }\n\n await grantUserWriteAccess(dest)\n return dest\n}\n\nasync function installTarDependencies(archiveType: ArchiveType) {\n info(\"Installing tar extraction dependencies\")\n\n switch (archiveType) {\n case ArchiveType.TarGz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"gzip\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"gzip\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"gzip\" }, { name: \"tar\" }])\n }\n }\n break\n }\n case ArchiveType.TarXz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"xz\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"xz\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"xz-utils\" }, { name: \"tar\" }])\n }\n }\n break\n }\n default:\n throw new Error(`Unsupported archive type: ${archiveType} for tar extraction`)\n }\n}\n","import { tmpdir } from \"os\"\nimport { basename, join } from \"path\"\nimport { cacheDir, downloadTool, find } from \"@actions/tool-cache\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { chmod } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { maybeGetInput, rcOptions } from \"../../cli-options.js\"\nimport { getArchiveType, getExtractFunction } from \"./extract.js\"\n\n/** A type that describes a package */\nexport type PackageInfo = {\n /** Url to download the package */\n url: string\n /** The top folder name once it is extracted. It can be `\"\"` if there is no top folder */\n extractedFolderName: string\n /** The relative directory in which the binary is located. It can be `\"\"` if the exe is in the top folder */\n binRelativeDir: string\n /** The main binary file. */\n binFileName: string\n /** The function to extract the downloaded archive. It can be `undefined`, if the binary itself is downloaded directly. */\n extractFunction?: (file: string, dest: string) => Promise\n}\n\nexport type InstallationInfo = {\n /** The top install dir */\n installDir?: string\n binDir: string\n bin?: string\n}\n\n/**\n * A function that:\n *\n * - Downloads and extracts a package\n * - Adds the bin path of the package to PATH\n * - Caches the downloaded directory into tool cache for usage from other sessions\n *\n * @returns The installation directory\n */\nexport async function setupBin(\n name: string,\n version: string,\n getPackageInfo: (version: string, platform: NodeJS.Platform, arch: string) => PackageInfo | Promise,\n setupDir: string,\n arch: string,\n): Promise {\n info(`Installing ${name} ${version} ${arch} via direct downloading`)\n\n process.env.RUNNER_TEMP = process.env.RUNNER_TEMP ?? tmpdir()\n process.env.RUNNER_TOOL_CACHE = process.env.RUNNER_TOOL_CACHE ?? join(tmpdir(), \"setup-cpp\", \"hostedtoolcache\")\n\n const { url, binRelativeDir, binFileName, extractedFolderName, extractFunction } = await getPackageInfo(\n version,\n process.platform,\n arch,\n )\n\n // Restore from cache (if found).\n if (GITHUB_ACTIONS) {\n try {\n const dir = find(name, version)\n if (dir) {\n const installDir = join(dir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n if (await pathExists(join(binDir, binFileName))) {\n info(`${name} ${version} was found in the cache at ${binDir}.`)\n await addPath(binDir, rcOptions)\n\n return { installDir, binDir }\n }\n }\n } catch {\n // fails on a local machine?\n }\n }\n\n const installDir = join(setupDir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n const binFile = join(binDir, binFileName)\n\n await downloadExtractInstall(binDir, binFile, name, version, url, setupDir, extractFunction, arch)\n\n await cacheInstallation(setupDir, name, version)\n\n return { installDir, binDir }\n}\n\nasync function downloadExtractInstall(\n binDir: string,\n binFile: string,\n name: string,\n version: string,\n url: string,\n setupDir: string,\n givenExtractFunction: PackageInfo[\"extractFunction\"],\n arch: string,\n) {\n // download ane extract the package into the installation directory.\n if ((await Promise.all([pathExists(binDir), pathExists(binFile)])).includes(false)) {\n try {\n const downloaded = await tryDownload(name, version, url)\n\n info(`Extracting ${downloaded} to ${setupDir}`)\n\n const extractFunction = givenExtractFunction ?? getExtractFunction(getArchiveType(url))\n await extractFunction(downloaded, setupDir)\n } catch (err) {\n throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)\n }\n }\n\n // Adding the bin dir to the path\n /** The directory which the tool is installed to */\n info(`Add ${binDir} to PATH`)\n await addPath(binDir, rcOptions)\n\n // Check if the binary exists after extraction\n if (!(await pathExists(binFile))) {\n throw new Error(`Failed to find the binary ${binFile} after extracting ${name} ${version} ${arch}`)\n }\n\n // make the binary executable on non-windows platforms\n if (process.platform !== \"win32\") {\n try {\n await chmod(binFile, \"755\")\n } catch (err) {\n warning(`Failed to make ${binFile} executable: ${err}`)\n }\n }\n}\n\nasync function tryDownload(name: string, version: string, url: string) {\n info(`Download ${name} ${version}`)\n // try to download the package 4 times with 2 seconds delay\n const downloaded = await retry(\n () => {\n const downloadedFilePath = join(process.env.RUNNER_TEMP ?? tmpdir(), `${Date.now()}-${basename(url)}`)\n\n return downloadTool(url, downloadedFilePath)\n },\n { name: url, max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n return downloaded\n}\n\nasync function cacheInstallation(setupDir: string, name: string, version: string) {\n // check if inside Github Actions. If so, cache the installation\n if (GITHUB_ACTIONS && typeof process.env.RUNNER_TOOL_CACHE === \"string\") {\n if (maybeGetInput(\"cache-tools\") === \"true\" || process.env.CACHE_TOOLS === \"true\") {\n await cacheDir(setupDir, name, version)\n }\n }\n}\n","import { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverLte from \"semver/functions/lte\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform data for cmake */\nfunction getCmakePackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const semVersion = semverCoerce(version) ?? version\n switch (platform) {\n case \"win32\": {\n const isOld = semverLte(semVersion, \"v3.19.6\")\n let osArchStr: string\n if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"win64-x64\" : \"windows-x86_64\"\n } else if (x86.includes(arch)) {\n osArchStr = isOld ? \"win32-x86\" : \"windows-i386\"\n } else if (arm64.includes(arch)) {\n osArchStr = \"windows-arm64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Windows`)\n osArchStr = `windows-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.zip`,\n }\n }\n case \"darwin\": {\n const isOld = semverLte(semVersion, \"v3.19.1\")\n const osArchStr = isOld ? \"Darwin-x86_64\" : \"macos-universal\"\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"CMake.app/Contents/bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n case \"linux\": {\n const isOld = semverLte(semVersion, \"v3.19.8\")\n let osArchStr: string\n if (arm64.includes(arch)) {\n osArchStr = isOld ? \"Linux-aarch64\" : \"linux-aarch64\"\n } else if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"Linux-x86_64\" : \"linux-x86_64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Linux`)\n osArchStr = `linux-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Setup cmake */\nexport function setupCmake(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"cmake\", version, getCmakePackageInfo, setupDir, arch)\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { info } from \"ci-log\"\nimport { isUrlOnline } from \"is-url-online\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverCompare from \"semver/functions/compare\"\nimport semverValid from \"semver/functions/valid\"\n\n/**\n * Gets the specific versions supported by this action compatible with the supplied (specific or minimum) version in\n * descending order of release (e.g., `5.0.2`, `5.0.1`, and `5.0.0` for `5`).\n */\nexport function getSpecificVersions(versions: Set, semversion: string): string[] {\n return Array.from(versions)\n .filter((v) => /^\\d+\\.\\d+\\.\\d+$/.test(v) && v.startsWith(semversion))\n .sort((a, b) => {\n try {\n return semverCompare(a, b)\n } catch (err) {\n return a.localeCompare(b)\n }\n })\n .reverse()\n}\n\n/**\n * Gets the specific and minimum versions that can be used to refer to the supplied specific versions (e.g., `3`, `3.5`,\n * `3.5.2` for `3.5.2`).\n */\nexport function getVersions(specific: string[]): Set {\n const versions = new Set(specific)\n\n for (const version of specific) {\n versions.add(/^\\d+/.exec(version)![0])\n versions.add(/^\\d+\\.\\d+/.exec(version)![0])\n }\n\n return versions\n}\n\n/** Gets the most recent specific version for which there is a valid download URL. */\nexport async function getSpecificVersionAndUrl(\n versions: Set,\n platform: string,\n version: string,\n getUrl: (platform: string, version: string) => string | null | Promise,\n): Promise<[string, string]> {\n // specific ubuntu version\n if (platform === \"linux\" && version.includes(\"ubuntu\")) {\n const url = await getUrl(platform, version)\n // eslint-disable-next-line no-await-in-loop\n if (url !== null && (await isUrlOnline(url))) {\n return [version, url]\n }\n }\n\n // if the given set doesn't include the version, throw an error\n if (!versions.has(version)) {\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n }\n\n const offlineUrls: string[] = []\n\n // TODO use Promise.any\n for (const specificVersion of getSpecificVersions(versions, version)) {\n // eslint-disable-next-line no-await-in-loop\n const url = await getUrl(platform, specificVersion)\n if (url !== null) {\n // eslint-disable-next-line no-await-in-loop\n if (await isUrlOnline(url)) {\n return [specificVersion, url]\n } else {\n offlineUrls.push(url)\n }\n }\n }\n\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n}\n\nexport const defaultVersionRegex = /v?(\\d\\S*)/\n\n/** Get the version of a binary */\nexport async function getBinVersion(file: string, versionRegex: RegExp = defaultVersionRegex) {\n try {\n const execout = await getExecOutput(file, [\"--version\"])\n const version_output = execout.stdout || execout.stderr || \"\"\n const version = version_output.trim().match(versionRegex)?.[1]\n return semverCoerce(version) ?? undefined\n } catch (e) {\n console.error(e)\n return undefined\n }\n}\n\n/** Check if the given bin is up to date against the target version */\nexport async function isBinUptoDate(\n givenFile: string,\n targetVersion: string,\n versionRegex: RegExp = defaultVersionRegex,\n) {\n const givenVersion = await getBinVersion(givenFile, versionRegex)\n if (givenVersion !== undefined && targetVersion !== \"\") {\n return semverCompare(givenVersion, targetVersion) !== -1\n } else {\n // assume given version is old\n return false\n }\n}\n\n/** Coerce the given version if it is invalid */\nexport function semverCoerceIfInvalid(version: string) {\n if (semverValid(version) === null) {\n // version coercion\n try {\n // find the semver version of an integer\n const coercedVersion = semverCoerce(version)\n if (coercedVersion !== null) {\n info(`Coerced version '${version}' to '${coercedVersion}'`)\n return coercedVersion.version\n }\n } catch (err) {\n // handled below\n }\n }\n return version\n}\n\nexport function removeVPrefix(version: string) {\n return Number.parseInt(version.replace(/^v/, \"\"), 10)\n}\n\nexport function addVPrefix(version: string) {\n if (!version.match(/^v/)) {\n return `v${version}`\n }\n return version\n}\n\nexport function compareVersion(tag1: string, tag2: string) {\n const v1 = semverCoerce(tag1)\n const v2 = semverCoerce(tag2)\n if (v1 !== null && v2 !== null) {\n // put the latest version first\n return v2.compare(v1)\n }\n\n // if the tags are not semver, compare them as strings, putting the latest tag first\n return tag2.localeCompare(tag1)\n}\n","export function unique(dirs: string[]) {\n return [...new Set(dirs)]\n}\n\nexport function quoteIfHasSpace(str: string, quoteChar = \"\\\"\") {\n return str.includes(\" \") ? `${quoteChar}${str}${quoteChar}` : str\n}\n","import assert from \"assert\"\nimport { homedir } from \"os\"\nimport { dirname, join, parse as pathParse } from \"path\"\nimport { getExecOutput } from \"@actions/exec\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { hasPipx, setupPipPackSystem, setupPipPackWithPython } from \"../utils/setup/setupPipPack.js\"\nimport { isBinUptoDate } from \"../utils/setup/version.js\"\nimport { unique } from \"../utils/std/index.js\"\nimport { MinVersions } from \"../versions/default_versions.js\"\n\nexport async function setupPython(version: string, setupDir: string, arch: string): Promise {\n const installInfo = await findOrSetupPython(version, setupDir, arch)\n assert(installInfo.bin !== undefined)\n const foundPython = installInfo.bin\n\n // setup pip\n const foundPip = await findOrSetupPip(foundPython)\n if (foundPip === undefined) {\n throw new Error(\"pip was not installed correctly\")\n }\n\n await setupPipx(foundPython)\n\n await setupWheel(foundPython)\n\n return installInfo\n}\n\nasync function setupPipx(foundPython: string) {\n try {\n if (!(await hasPipx(foundPython))) {\n try {\n await setupPipPackWithPython(foundPython, \"pipx\", undefined, { upgrade: true, usePipx: false })\n } catch (err) {\n if (setupPipPackSystem(\"pipx\", false) === null) {\n throw new Error(`pipx was not installed correctly ${err}`)\n }\n }\n }\n await execa(foundPython, [\"-m\", \"pipx\", \"ensurepath\"], { stdio: \"inherit\" })\n await setupPipPackWithPython(foundPython, \"venv\", undefined, { upgrade: false, usePipx: false })\n } catch (err) {\n warning(`Failed to install pipx: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\n/** Setup wheel and setuptools */\nasync function setupWheel(foundPython: string) {\n try {\n await setupPipPackWithPython(foundPython, \"setuptools\", undefined, {\n upgrade: true,\n isLibrary: true,\n usePipx: false,\n })\n await setupPipPackWithPython(foundPython, \"wheel\", undefined, { upgrade: true, isLibrary: true, usePipx: false })\n } catch (err) {\n warning(`Failed to install setuptools or wheel: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\nasync function findOrSetupPython(version: string, setupDir: string, arch: string): Promise {\n let installInfo: InstallationInfo | undefined\n let foundPython = await findPython(setupDir)\n\n if (foundPython !== undefined) {\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } else {\n // if python is not found, try to install it\n if (GITHUB_ACTIONS) {\n // install python in GitHub Actions\n try {\n info(\"Installing python in GitHub Actions\")\n const { setupActionsPython } = await import(\"./actions_python.js\")\n await setupActionsPython(version, setupDir, arch)\n\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } catch (err) {\n warning((err as Error).toString())\n }\n }\n if (installInfo === undefined) {\n // install python via system package manager\n installInfo = await setupPythonSystem(setupDir, version)\n }\n }\n\n if (foundPython === undefined || installInfo.bin === undefined) {\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n installInfo = { bin: foundPython, installDir: dirname(foundPython), binDir: dirname(foundPython) }\n }\n\n return installInfo\n}\n\nasync function setupPythonSystem(setupDir: string, version: string) {\n let installInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (setupDir) {\n await setupChocoPack(\"python3\", version, [`--params=/InstallDir:${setupDir}`])\n } else {\n await setupChocoPack(\"python3\", version)\n }\n // Adding the bin dir to the path\n const bin = await findPython(setupDir)\n if (bin === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(bin)\n /** The directory which the tool is installed to */\n await addPath(binDir, rcOptions)\n installInfo = { installDir: binDir, binDir, bin }\n break\n }\n case \"darwin\": {\n installInfo = await installBrewPack(\"python3\", version)\n // add the python and pip binaries to the path\n const brewPythonPrefix: {\n stdout: string\n stderr: string\n } = await execa(\"brew\", [\"--prefix\", \"python\"], { stdio: \"pipe\" })\n const brewPythonBin = join(brewPythonPrefix.stdout, \"libexec\", \"bin\")\n await addPath(brewPythonBin, rcOptions)\n\n break\n }\n case \"linux\": {\n if (isArch()) {\n installInfo = await setupPacmanPack(\"python\", version)\n } else if (hasDnf()) {\n installInfo = await setupDnfPack([{ name: \"python3\", version }])\n } else if (isUbuntu()) {\n installInfo = await installAptPack([{ name: \"python3\", version }, { name: \"python-is-python3\" }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n break\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n return installInfo\n}\n\nasync function findPython(binDir?: string) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, binDir)\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n\n // On Windows, search in C:\\PythonXX\n if (process.platform === \"win32\") {\n const rootDir = pathParse(homedir()).root\n // find all directories in rootDir using readdir\n const pythonDirs = (await readdir(rootDir)).filter((dir) => dir.startsWith(\"Python\"))\n\n for (const pythonDir of pythonDirs) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, join(rootDir, pythonDir))\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n }\n }\n\n return undefined\n}\n\nasync function isPythonUpToDate(candidate: string, binDir?: string) {\n try {\n if (binDir !== undefined) {\n const pythonBinPath = join(binDir, addExeExt(candidate))\n if (await pathExists(pythonBinPath)) {\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pythonBinPaths = (await which(candidate, { nothrow: true, all: true })) ?? []\n for (const pythonBinPath of pythonBinPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function findOrSetupPip(foundPython: string) {\n const maybePip = await findPip()\n\n if (maybePip === undefined) {\n // install pip if not installed\n info(\"pip was not found. Installing pip\")\n await setupPip(foundPython)\n return findPip() // recurse to check if pip is on PATH and up-to-date\n }\n\n return maybePip\n}\n\nasync function findPip() {\n for (const pipCandidate of [\"pip3\", \"pip\"]) {\n // eslint-disable-next-line no-await-in-loop\n const maybePip = await isPipUptoDate(pipCandidate)\n if (maybePip !== undefined) {\n return maybePip\n }\n }\n return undefined\n}\n\nasync function isPipUptoDate(pip: string) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pipPaths = (await which(pip, { nothrow: true, all: true })) ?? []\n for (const pipPath of pipPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pipPath, MinVersions.pip!)) {\n return pipPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function setupPip(foundPython: string) {\n const upgraded = await ensurePipUpgrade(foundPython)\n if (!upgraded) {\n // ensure that pip is installed on Linux (happens when python is found but pip not installed)\n await setupPipPackSystem(\"pip\")\n\n // upgrade pip\n await ensurePipUpgrade(foundPython)\n }\n}\n\nasync function ensurePipUpgrade(foundPython: string) {\n try {\n await execa(foundPython, [\"-m\", \"ensurepip\", \"-U\", \"--upgrade\"], { stdio: \"inherit\" })\n return true\n } catch (err1) {\n info((err1 as Error).toString())\n try {\n // ensure pip is disabled on Ubuntu\n await execa(foundPython, [\"-m\", \"pip\", \"install\", \"--upgrade\", \"pip\"], { stdio: \"inherit\" })\n return true\n } catch (err2) {\n info((err2 as Error).toString())\n // pip module not found\n }\n }\n // all methods failed\n return false\n}\n\nasync function addPythonBaseExecPrefix_(python: string) {\n const dirs: string[] = []\n\n // detection based on the platform\n if (process.platform === \"linux\") {\n dirs.push(\"/home/runner/.local/bin/\")\n } else if (process.platform === \"darwin\") {\n dirs.push(\"/usr/local/bin/\")\n }\n\n // detection using python.sys\n const base_exec_prefix = (await getExecOutput(`${python} -c \"import sys;print(sys.base_exec_prefix);\"`)).stdout.trim()\n // any of these are possible depending on the operating system!\n dirs.push(join(base_exec_prefix, \"Scripts\"), join(base_exec_prefix, \"Scripts\", \"bin\"), join(base_exec_prefix, \"bin\"))\n\n // remove duplicates\n return unique(dirs)\n}\n\n/**\n * Add the base exec prefix to the PATH. This is required for Conan, Meson, etc. to work properly.\n *\n * The answer is cached for subsequent calls\n */\nexport const addPythonBaseExecPrefix = memoize(addPythonBaseExecPrefix_, { promise: true })\n","import type { Opts } from \"../cli-options.js\"\nimport type { Inputs } from \"../tool.js\"\nimport { DefaultUbuntuVersion, DefaultVersions } from \"./default_versions.js\"\n\n/** Get the default version if passed true or undefined, otherwise return the version itself */\nexport function getVersion(name: string, version: string | undefined, osVersion: number[] | null = null) {\n if (isVersionDefault(version) && process.platform === \"linux\" && osVersion !== null && name in DefaultUbuntuVersion) {\n return getDefaultLinuxVersion(osVersion, DefaultUbuntuVersion[name]!)\n } else if (isVersionDefault(version) && name in DefaultVersions) {\n return DefaultVersions[name] ?? \"\"\n } else if (version === \"true\") {\n return \"\"\n }\n return version ?? \"\"\n}\n\nfunction isVersionDefault(version: string | undefined) {\n return version === \"true\" || version === undefined\n}\n\n/// choose the default linux version based on ubuntu version\nfunction getDefaultLinuxVersion(osVersion: number[], toolLinuxVersions: Record) {\n const osVersionMaj = osVersion[0]\n\n // find which version block the os version is in\n const satisfyingVersion = Object.keys(toolLinuxVersions)\n .map((v) => Number.parseInt(v, 10))\n .sort((a, b) => b - a) // sort in descending order\n .find((v) => osVersionMaj >= v)\n\n return satisfyingVersion === undefined ? \"\" : toolLinuxVersions[satisfyingVersion]\n}\n\n/**\n * Sync the versions for the given inputs\n *\n * If the return is false, it means that versions don't match the target version\n */\nexport function syncVersions(opts: Opts, tools: Inputs[]): boolean {\n const toolsInUse = tools.filter((tool) => opts[tool] !== undefined)\n const toolsNonDefaultVersion = toolsInUse.filter((tool) => !isVersionDefault(opts[tool]))\n\n const targetVersion = toolsNonDefaultVersion.length >= 1 ? opts[toolsNonDefaultVersion[0]] : \"true\"\n\n if (toolsNonDefaultVersion.some((tool) => opts[tool] !== targetVersion)) {\n // error if any explicit versions don't match the target version\n return false\n }\n\n for (const tool of toolsInUse) {\n opts[tool] = targetVersion\n }\n\n return true\n}\n","import os from \"os\"\nimport { warning } from \"ci-log\"\nimport memoize from \"memoizee\"\nimport { installAptPack } from \"setup-apt\"\nimport { getUbuntuVersion } from \"ubuntu-version\"\nimport which from \"which\"\nimport { isUbuntu } from \"./isUbuntu.js\"\n\nasync function ubuntuVersion_(): Promise {\n try {\n if (isUbuntu()) {\n try {\n if (which.sync(\"lsb_release\", { nothrow: true }) === null) {\n await installAptPack([{ name: \"lsb-release\" }])\n }\n } catch {\n return detectUsingOsVersion()\n }\n\n const versionSplitted = await getUbuntuVersion()\n\n if (versionSplitted.length === 0) {\n return detectUsingOsVersion()\n }\n\n return versionSplitted\n } else {\n return null\n }\n } catch (err) {\n warning((err as Error).toString())\n return null\n }\n}\n\n/** Detect Ubuntu version */\nexport const ubuntuVersion = memoize(ubuntuVersion_, { promise: true })\n\n/** Detect Ubuntu version using os.version() for Ubuntu based distros */\nfunction detectUsingOsVersion() {\n if (!(\"version\" in os && typeof os.version === \"function\")) {\n return null\n }\n\n // #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2\n const osVersion: string = os.version()\n // parse the version\n const versionMatch = osVersion.match(/(\\d+)\\.(\\d+)\\.(\\d+)/)\n if (versionMatch === null) {\n return null\n }\n\n const majorVersion = Number.parseInt(versionMatch[1], 10)\n const minorVersion = Number.parseInt(versionMatch[2], 10)\n const patchVersion = Number.parseInt(versionMatch[3], 10)\n\n return [majorVersion, minorVersion, patchVersion]\n}\n","import { dirname, join } from \"path\"\nimport { info } from \"@actions/core\"\nimport { addPath } from \"envosman\"\nimport { execa, execaSync } from \"execa\"\nimport memoize from \"memoizee\"\nimport { mkdirp } from \"mkdirp\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport { addPythonBaseExecPrefix, setupPython } from \"../../python/python.js\"\nimport { getVersion } from \"../../versions/versions.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../env/ubuntu_version.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\n\nexport type SetupPipPackOptions = {\n /** Whether to use pipx instead of pip */\n usePipx?: boolean\n /** Whether to install the package as a user */\n user?: boolean\n /** Whether to upgrade the package */\n upgrade?: boolean\n /** Whether the package is a library */\n isLibrary?: boolean\n}\n\n/** A function that installs a package using pip */\nexport async function setupPipPack(\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n return setupPipPackWithPython(await getPython(), name, version, options)\n}\n\nexport async function setupPipPackWithPython(\n givenPython: string,\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n const { usePipx = true, user = true, upgrade = false, isLibrary = false } = options\n\n const isPipx = usePipx && !isLibrary && (await hasPipx(givenPython))\n const pip = isPipx ? \"pipx\" : \"pip\"\n\n const hasPackage = await pipHasPackage(givenPython, name)\n if (hasPackage) {\n try {\n info(`Installing ${name} ${version ?? \"\"} via ${pip}`)\n\n const nameAndVersion = version !== undefined && version !== \"\" ? `${name}==${version}` : name\n const upgradeFlag = upgrade ? (isPipx ? [\"upgrade\"] : [\"install\", \"--upgrade\"]) : [\"install\"]\n const userFlag = !isPipx && user ? [\"--user\"] : []\n\n const env = process.env\n\n if (isPipx && user) {\n // install to user home\n env.PIPX_HOME = await getPipxHome()\n env.PIPX_BIN_DIR = await getPipxBinDir()\n }\n\n execaSync(givenPython, [\"-m\", pip, ...upgradeFlag, ...userFlag, nameAndVersion], {\n stdio: \"inherit\",\n env,\n })\n } catch (err) {\n info(`Failed to install ${name} via ${pip}: ${err}.`)\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} via ${pip}: ${err}.`)\n }\n }\n } else {\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} as it was not found via ${pip} or the system package manager`)\n }\n }\n\n const execPaths = await addPythonBaseExecPrefix(givenPython)\n const binDir = await findBinDir(execPaths, name)\n\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n\nexport async function hasPipx(givenPython: string) {\n return (await execa(givenPython, [\"-m\", \"pipx\", \"--help\"], { stdio: \"ignore\", reject: false })).exitCode === 0\n}\n\nasync function getPipxHome_() {\n let pipxHome = process.env.PIPX_HOME\n if (pipxHome !== undefined) {\n return pipxHome\n }\n\n // Based on https://pipx.pypa.io/stable/installation/\n const compatHome = untildifyUser(\"~/.local/pipx\")\n if (await pathExists(compatHome)) {\n return compatHome\n }\n\n switch (process.platform) {\n case \"win32\": {\n pipxHome = untildifyUser(\"~/AppData/Local/pipx\")\n break\n }\n case \"darwin\": {\n pipxHome = untildifyUser(\"~/Library/Application Support/pipx\")\n break\n }\n default: {\n pipxHome = untildifyUser(\"~/.local/share/pipx\")\n break\n }\n }\n\n await mkdirp(pipxHome)\n await mkdirp(join(pipxHome, \"trash\"))\n await mkdirp(join(pipxHome, \"shared\"))\n await mkdirp(join(pipxHome, \"venv\"))\n return pipxHome\n}\nconst getPipxHome = memoize(getPipxHome_, { promise: true })\n\nasync function getPipxBinDir_() {\n if (process.env.PIPX_BIN_DIR !== undefined) {\n return process.env.PIPX_BIN_DIR\n }\n\n const pipxBinDir = untildifyUser(\"~/.local/bin\")\n await addPath(pipxBinDir, rcOptions)\n await mkdirp(pipxBinDir)\n return pipxBinDir\n}\nconst getPipxBinDir = memoize(getPipxBinDir_, { promise: true })\n\nasync function getPython_(): Promise {\n const pythonBin = (await setupPython(getVersion(\"python\", undefined, await ubuntuVersion()), \"\", process.arch)).bin\n if (pythonBin === undefined) {\n throw new Error(\"Python binary was not found\")\n }\n return pythonBin\n}\nconst getPython = memoize(getPython_, { promise: true })\n\nasync function pipHasPackage(python: string, name: string) {\n const result = await execa(python, [\"-m\", \"pip\", \"-qq\", \"index\", \"versions\", name], {\n stdio: \"ignore\",\n reject: false,\n })\n return result.exitCode === 0\n}\n\nasync function findBinDir(dirs: string[], name: string) {\n const exists = await Promise.all(dirs.map((dir) => pathExists(join(dir, addExeExt(name)))))\n const dirIndex = exists.findIndex((exist) => exist)\n if (dirIndex !== -1) {\n const foundDir = dirs[dirIndex]\n return foundDir\n }\n\n const whichDir = which.sync(addExeExt(name), { nothrow: true })\n if (whichDir !== null) {\n return dirname(whichDir)\n }\n\n return dirs[dirs.length - 1]\n}\n\nexport function setupPipPackSystem(name: string, addPythonPrefix = true) {\n if (process.platform === \"linux\") {\n info(`Installing ${name} via the system package manager`)\n if (isArch()) {\n return setupPacmanPack(addPythonPrefix ? `python-${name}` : name)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n }\n } else if (process.platform === \"darwin\") {\n return installBrewPack(name)\n }\n return null\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupGraphviz(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"graphviz\", version)\n return activateGraphviz()\n }\n case \"darwin\": {\n return installBrewPack(\"graphviz\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"graphviz\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"graphviz\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"graphviz\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateGraphviz(): Promise {\n switch (process.platform) {\n case \"win32\": {\n const binDir = \"C:/Program Files/Graphviz/bin\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { join } from \"path\"\n\nexport async function setupDmg(path: string, destDir: string) {\n const { ArchiveHdi } = await import(\"@shockpkg/archive-files/esm/archive/hdi.mjs\")\n\n const dmg = new ArchiveHdi(path)\n await dmg.read(async (entry) => {\n await entry.extract(join(destDir, entry.path))\n })\n}\n","import { join } from \"path\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { setupGraphviz } from \"../graphviz/graphviz.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { macosVersion } from \"../utils/env/macos_version.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { setupDmg } from \"../utils/setup/setupDmg.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n/** Get the platform data for cmake */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch: string): PackageInfo {\n switch (platform) {\n case \"linux\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.linux.bin.tar.gz`,\n }\n }\n case \"win32\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.windows.x64.bin.zip`,\n }\n }\n case \"darwin\": {\n const folderName = `Doxygen-${version}`\n return {\n binRelativeDir: \"Doxygen/Doxygen.app/Contents/Resources/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n extractFunction: setupDmg,\n url: `https://doxygen.nl/files/${folderName}.dmg`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupDoxygen(version: string, setupDir: string, arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // try to download the package 4 times with 2 seconds delay\n await retry(\n () => {\n return setupChocoPack(\"doxygen.install\", version)\n },\n { name: \"doxygen.install\", max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n const binDir = await activateWinDoxygen()\n const installationInfo = { binDir }\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n return installationInfo\n }\n case \"darwin\": {\n // let installationInfo: InstallationInfo\n // try {\n // installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n // } catch {\n const installationInfo = await installBrewPack(\"doxygen\", undefined)\n // }\n\n // only install graphviz if the macOS version is greater than 11\n if (macosVersion()[0] > 11) {\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n }\n return installationInfo\n }\n case \"linux\": {\n let installationInfo: InstallationInfo\n if (version === \"\" || isArch() || hasDnf()) {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"doxygen\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"doxygen\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([{ name: \"doxygen\", version }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n } else if (isUbuntu()) {\n try {\n // doxygen on stable Ubuntu repositories is very old. So, we use get the binary from the website itself\n installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n try {\n await installAptPack([{ name: \"libclang-cpp9\" }])\n } catch (err) {\n info(`Failed to download libclang-cpp9 that might be needed for running doxygen. ${err}`)\n }\n } catch (err) {\n notice(`Failed to download doxygen binary. ${err}. Falling back to apt-get.`)\n installationInfo = await installAptPack([{ name: \"doxygen\" }])\n }\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n await setupGraphviz(getVersion(\"graphviz\", undefined, await ubuntuVersion()), \"\", arch)\n return installationInfo\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinDoxygen() {\n switch (process.platform) {\n case \"win32\": {\n for (\n const binDir of [\n \"C:/ProgramData/chocolatey/bin\",\n \"C:/Program Files/doxygen/bin\",\n \"C:/Program Files (x86)/doxygen\",\n ]\n ) {\n // eslint-disable-next-line no-await-in-loop\n if (await pathExists(join(binDir, \"doxygen.exe\"))) {\n // eslint-disable-next-line no-await-in-loop\n await addPath(binDir, rcOptions)\n return binDir\n }\n }\n throw new Error(\"Failed to find doxygen binary\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { error } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupMacOSSDK() {\n if (process.platform === \"darwin\") {\n try {\n const xcrun = await getExecOutput(\"xcrun --sdk macosx --show-sdk-path\")\n const sdkroot = xcrun.stdout || xcrun.stderr\n if (sdkroot) {\n await addEnv(\"SDKROOT\", sdkroot.trim(), rcOptions)\n } else {\n error(\"SDKROOT not set\")\n }\n } catch (e) {\n error(e as Error | string)\n }\n }\n}\n","import { readFile } from \"fs/promises\"\n\n/**\n * The list of assets\n * @key tag The tag of the release\n * @value assets The names of the assets of the release\n */\nexport type Assets = Record\n\n/**\n * Load the list of assets from a json file\n */\nexport async function loadAssetList(path: string): Promise {\n const data = await readFile(path, \"utf-8\")\n return JSON.parse(data)\n}\n\ntype MatchAssetOpts = {\n version: string\n keywords?: string[]\n optionalKeywords?: string[]\n filterMapTag?: (tag: string) => string | undefined\n filterName?: (asset: string) => boolean\n}\n\n/**\n * Match the asset that matches the version and given keywords\n */\nexport function matchAsset(\n assets: Assets,\n opts: MatchAssetOpts,\n): { tag: string; name: string } | undefined {\n // get the list of versions\n const origTags = Object.keys(assets)\n\n // filter/map the tags\n const versionMap: Map = new Map()\n if (opts.filterMapTag === undefined) {\n for (const origTag of origTags) {\n versionMap.set(origTag, origTag)\n }\n } else {\n for (const origTag of origTags) {\n const mappedTag = opts.filterMapTag(origTag)\n if (mappedTag !== undefined) {\n versionMap.set(mappedTag, origTag)\n }\n }\n }\n\n if (versionMap.size === 0) {\n return undefined\n }\n\n // find the first tag that starts with the version\n // loop over the versions starting with the latest\n const candidateTags: string[] = []\n for (const [version, origTag] of versionMap.entries()) {\n if (version.startsWith(opts.version)) {\n candidateTags.push(origTag)\n }\n }\n\n if (candidateTags.length === 0) {\n return undefined\n }\n\n // Loop over the candidate tags and return the first one that has assets\n for (const candidateTag of candidateTags) {\n // get the list of assets\n let assetNames = assets[candidateTag]\n if (assetNames === undefined) {\n continue\n }\n\n // filter the assets\n if (opts.filterName !== undefined) {\n assetNames = assetNames.filter(opts.filterName)\n }\n\n if (assetNames.length === 0) {\n continue\n }\n\n // check if this version contains the keywords and optional keywords in the asset name\n const match = matchAssetName(candidateTag, assetNames, opts)\n if (match !== undefined) {\n return match\n }\n }\n\n return undefined\n}\n\nfunction matchAssetName(tag: string, assetNames: string[], opts: MatchAssetOpts) {\n // if no keywords are given, return the first asset\n if (\n (opts.keywords === undefined\n || opts.keywords.length === 0)\n && (opts.optionalKeywords === undefined\n || opts.optionalKeywords.length === 0)\n ) {\n return { tag, name: assetNames[0] }\n }\n\n // check if the asset contains all the keywords\n let candidates: string[] = []\n if (\n opts.keywords !== undefined\n && opts.keywords.length !== 0\n ) {\n for (const name of assetNames) {\n if (opts.keywords!.every((keyword) => name.includes(keyword))) {\n candidates.push(name)\n }\n }\n } else {\n candidates = assetNames\n }\n\n if (candidates.length === 0) {\n return undefined\n }\n\n // prefer the candidates that contain more optional keywords\n if (\n opts.optionalKeywords !== undefined\n && opts.optionalKeywords.length !== 0\n ) {\n // rate the candidates based on the number of optional keywords they contain\n const candidateScores = candidates.map((name) => {\n let score = 0\n for (const keyword of opts.optionalKeywords!) {\n if (name.includes(keyword)) {\n score++\n }\n }\n return score\n })\n\n // find the candidate with the highest score\n const maxScore = Math.max(...candidateScores)\n const maxIndex = candidateScores.indexOf(maxScore)\n return { tag, name: candidates[maxIndex] }\n }\n\n // return the first candidate if no optional keywords are given\n return { tag, name: candidates[0] }\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { addEnv, addPath } from \"envosman\"\nimport { type ExecaReturnValue, execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverMajor from \"semver/functions/major\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { extract7Zip } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { compareVersion } from \"../utils/setup/version.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nasync function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: string): Promise {\n switch (platform) {\n case \"win32\": {\n const mingwAssets = await loadAssetList(\n join(dirname, \"github_brechtsanders_winlibs_mingw.json\"),\n )\n\n const mingwArchMap = {\n x64: \"x86_64\",\n ia32: \"i386\",\n } as Record\n\n const asset = matchAsset(\n mingwAssets,\n {\n version,\n keywords: [\n mingwArchMap[arch] ?? arch,\n ],\n },\n )\n\n if (asset === undefined) {\n throw new Error(`No asset found for version ${version} and arch ${arch}`)\n }\n\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"g++\"),\n extractedFolderName: \"mingw64\",\n extractFunction: extract7Zip,\n url: `https://github.com/brechtsanders/winlibs_mingw/releases/download/${asset.tag}/${asset.name}`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupGcc(version: string, setupDir: string, arch: string, priority: number = 40) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (arch === \"arm\" || arch === \"arm64\") {\n await setupChocoPack(\"gcc-arm-embedded\", version)\n }\n try {\n installationInfo = await setupBin(\"g++\", version, getGccPackageInfo, setupDir, arch)\n } catch (err) {\n info(`Failed to download g++ binary. ${err}. Falling back to chocolatey.`)\n installationInfo = await setupChocoMingw(version, arch)\n }\n break\n }\n case \"darwin\": {\n installationInfo = await installBrewPack(\"gcc\", version)\n break\n }\n case \"linux\": {\n if (arch === \"x64\") {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([\n { name: \"gcc\", version },\n { name: \"gcc-c++\", version },\n { name: \"libstdc++-devel\" },\n ])\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc\" }, { name: \"g++\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n {\n name: \"g++\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n }\n } else {\n info(`Install g++-multilib because gcc for ${arch} was requested`)\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc-multilib\", version)\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc-multilib\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([{\n name: \"gcc-multilib\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n }])\n }\n }\n }\n break\n }\n // TODO support bare-metal (need to support passing it as the input)\n // TODO support abi\n // case \"none\": {\n // if (arch === \"arm\" || arch === \"arm64\") {\n // return installAptPack(\"gcc-arm-none-eabi\", version, [\n // \"ppa:ubuntu-toolchain-r/test\",\n // ])\n // } else {\n // throw new Error(`Unsupported platform for ${arch}`)\n // }\n // }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n await activateGcc(version, installationInfo.binDir, priority)\n return installationInfo\n }\n return undefined\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMingw(version: string, setupDir: string, arch: string) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\":\n case \"darwin\": {\n return setupGcc(version, setupDir, arch)\n }\n case \"linux\": {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"mingw-w64-gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([{ name: \"mingw64-gcc\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([\n {\n name: \"mingw-w64\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n break\n }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n // TODO: setup alternatives and update CC/CXX env. ?\n // Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode\n // Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode\n // await activateGcc(version, installationInfo.binDir)\n return installationInfo\n }\n return undefined\n}\n\nasync function setupChocoMingw(version: string, arch: string): Promise {\n await setupChocoPack(\"mingw\", version)\n let binDir: string | undefined\n if (arch === \"x64\" && (await pathExists(\"C:/tools/mingw64/bin\"))) {\n binDir = \"C:/tools/mingw64/bin\"\n await addPath(binDir, rcOptions)\n } else if (arch === \"ia32\" && (await pathExists(\"C:/tools/mingw32/bin\"))) {\n binDir = \"C:/tools/mingw32/bin\"\n await addPath(binDir, rcOptions)\n } else if (await pathExists(`${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin/g++.exe`)) {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n if (binDir !== undefined) {\n return { binDir }\n }\n return undefined\n}\n\nasync function activateGcc(givenVersion: string, binDir: string, priority: number = 40) {\n const promises: Promise>[] = []\n // Setup gcc as the compiler\n\n // TODO\n // const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n // const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n // promises.push(\n // addEnv(\"LD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${ld}`, rcOptions),\n // addEnv(\"DYLD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${dyld}`, rcOptions),\n // addEnv(\"CPATH\", `${installDir}/lib/gcc/${majorVersion}/include`, rcOptions),\n // addEnv(\"LDFLAGS\", `-L${installDir}/lib`, rcOptions),\n // addEnv(\"CPPFLAGS\", `-I${installDir}/include`, rcOptions),\n // )\n\n if (process.platform === \"win32\") {\n promises.push(\n addEnv(\"CC\", addExeExt(`${binDir}/gcc`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${binDir}/g++`), rcOptions),\n )\n } else {\n // if version is empty, get the version from the gcc command\n let version = givenVersion\n if (givenVersion === \"\") {\n version = await getGccCmdVersion(binDir, version)\n info(`Using gcc version ${version}`)\n }\n\n const majorVersion = semverMajor(semverCoerce(version) ?? version)\n if (majorVersion >= 5) {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${majorVersion}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${majorVersion}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n )\n }\n } else {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${version}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${version}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${version}`, rcOptions, priority),\n )\n }\n }\n }\n\n promises.push(setupMacOSSDK())\n\n if (GITHUB_ACTIONS) {\n await addGccLoggingMatcher()\n }\n\n await Promise.all(promises)\n}\n\nasync function getGccCmdVersion(binDir: string, givenVersion: string) {\n // TODO get the version from the package manager\n try {\n let gccExe = \"gcc\"\n if (await pathExists(`${binDir}/gcc`)) {\n gccExe = `${binDir}/gcc`\n } else {\n // try to find the gcc exe in the bin dir\n const files = (await readdir(binDir)).sort(\n (exe1, exe2) => {\n const version1 = exe1.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n const version2 = exe2.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n return compareVersion(version1, version2)\n },\n )\n for (const file of files) {\n if (file.startsWith(\"gcc\")) {\n gccExe = `${binDir}/${file}`\n break\n }\n }\n }\n\n const { stdout: versionStdout } = await execa(gccExe, [\"--version\"], { stdio: \"pipe\" })\n\n // gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\n // gcc-12 (Homebrew GCC 12.4.0) 12.4.0\n // gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0\n\n const versionMatch = (versionStdout as string).match(/gcc.* \\(.*\\) ([\\d.]+)/)\n\n if (versionMatch !== null) {\n return versionMatch[1]\n }\n\n warning(`Failed to parse gcc version from: ${versionStdout}`)\n return givenVersion\n } catch (err) {\n error(`Failed to get gcc version: ${err}`)\n return givenVersion\n }\n}\n\nasync function addGccLoggingMatcher() {\n const matcherPath = join(dirname, \"gcc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the gcc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addExeExt } from \"patha\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name Ninja uses in their download links */\nfunction getNinjaPlatformArch(platform: NodeJS.Platform, arch: string) {\n switch (platform) {\n case \"win32\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"win\"\n : arm64.includes(arch)\n ? \"winarm64\"\n : \"win\"\n case \"darwin\":\n return \"mac\"\n case \"linux\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"linux\"\n : arm64.includes(arch)\n ? \"linux-aarch64\"\n : \"linux\"\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Get the platform data for ninja */\nfunction getNinjaPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const ninjaPlatform = getNinjaPlatformArch(platform, arch)\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"ninja\"),\n extractedFolderName: \"\",\n url: `https://github.com/ninja-build/ninja/releases/download/v${version}/ninja-${ninjaPlatform}.zip`,\n }\n}\n\nexport function setupNinja(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"ninja\", version, getNinjaPackageInfo, setupDir, arch)\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { setupCmake } from \"../cmake/cmake.js\"\nimport { setupNinja } from \"../ninja/ninja.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractTarByExe } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { addVPrefix, removeVPrefix } from \"../utils/setup/version.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nfunction getDownloadKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/releases/download/${version}/kcov-amd64.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"usr/local/bin\",\n binFileName: addExeExt(\"kcov\"),\n }\n}\n\nfunction getBuildKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/archive/refs/tags/${version}.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"build/src\",\n binFileName: addExeExt(\"kcov\"),\n extractFunction: buildKcov,\n }\n}\n\nasync function buildKcov(file: string, dest: string) {\n const out = await extractTarByExe(file, dest, 1)\n\n // build after extraction using CMake\n const cmake = await getCmake()\n\n if (process.platform === \"linux\") {\n if (isArch()) {\n await Promise.all([setupPacmanPack(\"libdwarf\"), setupPacmanPack(\"libcurl-openssl\")])\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"libdwarf-devel\" }, { name: \"libcurl-devel\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libdw-dev\" }, { name: \"libcurl4-openssl-dev\" }])\n }\n }\n\n // apply gcc13.patch\n try {\n if (which.sync(\"patch\", { nothrow: true }) !== null) {\n const patch = join(dirname, \"gcc13.patch\")\n await execa(\"patch\", [\"-N\", \"-p1\", \"-i\", patch], { cwd: out, stdio: \"inherit\" })\n } else {\n info(\"`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13\")\n }\n } catch {\n // ignore\n }\n\n const buildDir = join(out, \"build\")\n await execa(cmake, [\"-S\", out, \"-B\", buildDir, \"-DCMAKE_BUILD_TYPE=Release\", \"-G\", \"Ninja\"], {\n cwd: out,\n stdio: \"inherit\",\n })\n await execa(cmake, [\"--build\", buildDir, \"--config\", \"Release\"], { cwd: out, stdio: \"inherit\" })\n // execRootSync(cmake, [\"--install\", buildDir], out)\n // return \"user/local/bin\" // the cmake install prefix\n return out\n}\n\nasync function getCmake() {\n let cmake = which.sync(\"cmake\", { nothrow: true })\n if (cmake === null) {\n const { binDir } = await setupCmake(\n getVersion(\"cmake\", undefined, await ubuntuVersion()),\n join(untildifyUser(\"~\"), \"cmake\"),\n \"\",\n )\n cmake = join(binDir, \"cmake\")\n }\n const ninja = which.sync(\"ninja\", { nothrow: true })\n if (ninja === null) {\n await setupNinja(getVersion(\"ninja\", undefined, await ubuntuVersion()), join(untildifyUser(\"~\"), \"ninja\"), \"\")\n }\n return cmake\n}\n\nexport async function setupKcov(versionGiven: string, setupDir: string, arch: string) {\n if (process.platform !== \"linux\") {\n info(\"Kcov is not supported on non-linux\")\n return\n }\n\n // parse version\n const versionSplit = versionGiven.split(\"-\")\n let version = addVPrefix(versionSplit[0])\n const installMethod = versionSplit[1] as \"binary\" | undefined\n const version_number = removeVPrefix(version)\n // fix inconsistency in tagging\n if (version_number === 38) {\n version = \"v38\"\n }\n\n let installationInfo: InstallationInfo\n if (installMethod === \"binary\" && version_number >= 39) {\n installationInfo = await setupBin(\"kcov\", version, getDownloadKcovPackageInfo, setupDir, arch)\n if (isArch()) {\n await setupPacmanPack(\"binutils\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"binutils\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libbinutils\" }])\n }\n return installationInfo\n } else {\n installationInfo = await setupBin(\"kcov\", version, getBuildKcovPackageInfo, setupDir, arch)\n }\n return installationInfo\n}\n","const core = require('@actions/core')\nconst child_process = require('child_process')\nconst fs = require('fs')\nconst path = require('path')\nconst process = require('process')\n\nconst PROGRAM_FILES_X86 = process.env['ProgramFiles(x86)']\nconst PROGRAM_FILES = [process.env['ProgramFiles(x86)'], process.env['ProgramFiles']]\n\n\nconst EDITIONS = ['Enterprise', 'Professional', 'Community', 'BuildTools']\nconst YEARS = ['2022', '2019', '2017']\n\nconst VsYearVersion = {\n '2022': '17.0',\n '2019': '16.0',\n '2017': '15.0',\n '2015': '14.0',\n '2013': '12.0',\n}\n\n/**\n * Convert the vs version (e.g. 2022) or year (e.g. 17.0) to the version number (e.g. 17.0)\n * @param {string | undefined} vsversion the year (e.g. 2022) or version number (e.g. 17.0)\n * @returns {string | undefined} the version number (e.g. 17.0)\n */\nfunction vsversion_to_versionnumber(vsversion) {\n if (Object.values(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n if (vsversion in VsYearVersion) {\n return VsYearVersion[vsversion]\n }\n }\n return vsversion\n}\nexports.vsversion_to_versionnumber = vsversion_to_versionnumber\n\n/**\n * Convert the vs version (e.g. 17.0) or year (e.g. 2022) to the year (e.g. 2022)\n * @param {string} vsversion the version number (e.g. 17.0) or year (e.g. 2022)\n * @returns {string} the year (e.g. 2022)\n */\nfunction vsversion_to_year(vsversion) {\n if (Object.keys(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n for (const [year, ver] of Object.entries(VsYearVersion)) {\n if (ver === vsversion) {\n return year\n }\n }\n }\n return vsversion\n}\nexports.vsversion_to_year = vsversion_to_year\n\nconst VSWHERE_PATH = `${PROGRAM_FILES_X86}\\\\Microsoft Visual Studio\\\\Installer`\n\n/**\n * Find MSVC tools with vswhere\n * @param {string} pattern the pattern to search for\n * @param {string} version_pattern the version pattern to search for\n * @returns {string | null} the path to the found MSVC tools\n */\nfunction findWithVswhere(pattern, version_pattern) {\n try {\n let installationPath = child_process.execSync(`vswhere -products * ${version_pattern} -prerelease -property installationPath`).toString().trim()\n return installationPath + '\\\\' + pattern\n } catch (e) {\n core.warning(`vswhere failed: ${e}`)\n }\n return null\n}\nexports.findWithVswhere = findWithVswhere\n\n/**\n * Find the vcvarsall.bat file for the given Visual Studio version\n * @param {string | undefined} vsversion the version of Visual Studio to find (year or version number)\n * @returns {string} the path to the vcvarsall.bat file\n */\nfunction findVcvarsall(vsversion) {\n const vsversion_number = vsversion_to_versionnumber(vsversion)\n let version_pattern\n if (vsversion_number) {\n const upper_bound = vsversion_number.split('.')[0] + '.9'\n version_pattern = `-version \"${vsversion_number},${upper_bound}\"`\n } else {\n version_pattern = \"-latest\"\n }\n\n // If vswhere is available, ask it about the location of the latest Visual Studio.\n let path = findWithVswhere('VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat', version_pattern)\n if (path && fs.existsSync(path)) {\n core.info(`Found with vswhere: ${path}`)\n return path\n }\n core.info(\"Not found with vswhere\")\n\n // If that does not work, try the standard installation locations,\n // starting with the latest and moving to the oldest.\n const years = vsversion ? [vsversion_to_year(vsversion)] : YEARS\n for (const prog_files of PROGRAM_FILES) {\n for (const ver of years) {\n for (const ed of EDITIONS) {\n path = `${prog_files}\\\\Microsoft Visual Studio\\\\${ver}\\\\${ed}\\\\VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat`\n core.info(`Trying standard location: ${path}`)\n if (fs.existsSync(path)) {\n core.info(`Found standard location: ${path}`)\n return path\n }\n }\n }\n }\n core.info(\"Not found in standard locations\")\n\n // Special case for Visual Studio 2015 (and maybe earlier), try it out too.\n path = `${PROGRAM_FILES_X86}\\\\Microsoft Visual C++ Build Tools\\\\vcbuildtools.bat`\n if (fs.existsSync(path)) {\n core.info(`Found VS 2015: ${path}`)\n return path\n }\n core.info(`Not found in VS 2015 location: ${path}`)\n\n throw new Error('Microsoft Visual Studio not found')\n}\nexports.findVcvarsall = findVcvarsall\n\nfunction isPathVariable(name) {\n const pathLikeVariables = ['PATH', 'INCLUDE', 'LIB', 'LIBPATH']\n return pathLikeVariables.indexOf(name.toUpperCase()) != -1\n}\n\nfunction filterPathValue(path) {\n let paths = path.split(';')\n // Remove duplicates by keeping the first occurance and preserving order.\n // This keeps path shadowing working as intended.\n function unique(value, index, self) {\n return self.indexOf(value) === index\n }\n return paths.filter(unique).join(';')\n}\n\n/**\n * Setup MSVC Developer Command Prompt\n * @param {string} arch - Target architecture\n * @param {string | undefined} sdk - Windows SDK number to build for\n * @param {string | undefined} toolset - VC++ compiler toolset version\n * @param {boolean | 'true' | 'false' | undefined} uwp - Build for Universal Windows Platform\n * @param {boolean | 'true' | 'false' | undefined} spectre - Enable Spectre mitigations\n * @param {string | undefined} vsversion - The Visual Studio version to use. This can be the version number (e.g. 16.0 for 2019) or the year (e.g. \"2019\").\n */\nfunction setupMSVCDevCmd(arch, sdk, toolset, uwp, spectre, vsversion) {\n if (process.platform != 'win32') {\n core.info('This is not a Windows virtual environment, bye!')\n return\n }\n\n // Add standard location of \"vswhere\" to PATH, in case it's not there.\n process.env.PATH += path.delimiter + VSWHERE_PATH\n\n // There are all sorts of way the architectures are called. In addition to\n // values supported by Microsoft Visual C++, recognize some common aliases.\n let arch_aliases = {\n \"win32\": \"x86\",\n \"win64\": \"x64\",\n \"x86_64\": \"x64\",\n \"x86-64\": \"x64\",\n }\n // Ignore case when matching as that's what humans expect.\n if (arch.toLowerCase() in arch_aliases) {\n arch = arch_aliases[arch.toLowerCase()]\n }\n\n // Due to the way Microsoft Visual C++ is configured, we have to resort to the following hack:\n // Call the configuration batch file and then output *all* the environment variables.\n\n var args = [arch]\n\n if (uwp && JSON.parse(uwp) === true) {\n args.push('uwp')\n }\n if (sdk) {\n args.push(sdk)\n }\n if (toolset) {\n args.push(`-vcvars_ver=${toolset}`)\n }\n if (spectre && JSON.parse(spectre) === true) {\n args.push('-vcvars_spectre_libs=spectre')\n }\n\n const vcvars = `\"${findVcvarsall(vsversion)}\" ${args.join(' ')}`\n core.debug(`vcvars command-line: ${vcvars}`)\n\n const cmd_output_string = child_process.execSync(`set && cls && ${vcvars} && cls && set`, {shell: \"cmd\"}).toString()\n const cmd_output_parts = cmd_output_string.split('\\f')\n\n const old_environment = cmd_output_parts[0].split('\\r\\n')\n const vcvars_output = cmd_output_parts[1].split('\\r\\n')\n const new_environment = cmd_output_parts[2].split('\\r\\n')\n\n // If vsvars.bat is given an incorrect command line, it will print out\n // an error and *still* exit successfully. Parse out errors from output\n // which don't look like environment variables, and fail if appropriate.\n const error_messages = vcvars_output.filter((line) => {\n if (line.match(/^\\[ERROR.*\\]/)) {\n // Don't print this particular line which will be confusing in output.\n if (!line.match(/Error in script usage. The correct usage is:$/)) {\n return true\n }\n }\n return false\n })\n if (error_messages.length > 0) {\n throw new Error('invalid parameters' + '\\r\\n' + error_messages.join('\\r\\n'))\n }\n\n // Convert old environment lines into a dictionary for easier lookup.\n let old_env_vars = {}\n for (let string of old_environment) {\n const [name, value] = string.split('=')\n old_env_vars[name] = value\n }\n\n // Now look at the new environment and export everything that changed.\n // These are the variables set by vsvars.bat. Also export everything\n // that was not there during the first sweep: those are new variables.\n core.startGroup('Environment variables')\n for (let string of new_environment) {\n // vsvars.bat likes to print some fluff at the beginning.\n // Skip lines that don't look like environment variables.\n if (!string.includes('=')) {\n continue;\n }\n let [name, new_value] = string.split('=')\n let old_value = old_env_vars[name]\n // For new variables \"old_value === undefined\".\n if (new_value !== old_value) {\n core.info(`Setting ${name}`)\n // Special case for a bunch of PATH-like variables: vcvarsall.bat\n // just prepends its stuff without checking if its already there.\n // This makes repeated invocations of this action fail after some\n // point, when the environment variable overflows. Avoid that.\n if (isPathVariable(name)) {\n new_value = filterPathValue(new_value)\n }\n core.exportVariable(name, new_value)\n }\n }\n core.endGroup()\n\n core.info(`Configured Developer Command Prompt`)\n}\nexports.setupMSVCDevCmd = setupMSVCDevCmd\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { setupMSVCDevCmd } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { rcOptions } from \"../cli-options.js\"\n\nfunction getArch(arch: string): string {\n switch (arch) {\n case \"x32\":\n case \"32\":\n case \"ia32\": {\n return \"x86\"\n }\n case \"64\": {\n return \"x64\"\n }\n default: {\n return arch\n }\n }\n}\n\nexport async function setupVCVarsall(\n vsversion: string,\n VCTargetsPath: string | undefined,\n arch: string,\n toolset: string | undefined,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (VCTargetsPath !== undefined && (await pathExists(VCTargetsPath))) {\n info(`Adding ${VCTargetsPath} to PATH`)\n await addEnv(\"VCTargetsPath\", VCTargetsPath, rcOptions)\n }\n\n await setupMSVCDevCmd(getArch(arch), sdk, toolset, uwp, spectre, vsversion)\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error } from \"ci-log\"\nimport pTimeout from \"p-timeout\"\nimport { setupBrew } from \"setup-brew\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { type ToolName, setups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\nexport const DEFAULT_TIMEOUT = 20 * 60 * 1000 // 20 minutes\n\nexport async function installTool(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n errorMessages: string[],\n timeout: number = DEFAULT_TIMEOUT,\n) {\n startGroup(`Installing ${tool} ${version}`)\n try {\n await pTimeout(installToolImpl(tool, version, osVersion, arch, setupCppDir, successMessages), {\n milliseconds: timeout,\n message: `Timeout while installing ${tool} ${version}. You can increase the timeout from options`,\n })\n } catch (e) {\n // push error message to the logger\n error(e as string | Error)\n if (e instanceof Error && e.stack !== undefined) {\n error(e.stack)\n }\n errorMessages.push(`${tool} failed to install`)\n }\n endGroup()\n}\n\nasync function installToolImpl(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n) {\n const hasLLVM = [\"llvm\", \"clangformat\", \"clangtidy\"].includes(tool)\n\n let installationInfo: InstallationInfo | undefined | void\n if (tool === \"vcvarsall\") {\n // eslint-disable-next-line no-await-in-loop\n await setupVCVarsall(getVersion(tool, version, osVersion), undefined, arch, undefined, undefined, false, false)\n } else if (tool === \"brew\") {\n // eslint-disable no-await-in-loop\n installationInfo = await setupBrew({ rcOptions })\n } else {\n // the tool installation directory (for the functions that ue it)\n const setupDir = join(setupCppDir, hasLLVM ? \"llvm\" : tool)\n\n const setupVersion = getVersion(tool, version, osVersion)\n\n // get the setup function\n const setupFunction = setups[tool]\n\n // eslint-disable no-await-in-loop\n installationInfo = await setupFunction(setupVersion, setupDir, arch)\n }\n // preparing a report string\n successMessages.push(getSuccessMessage(tool, installationInfo))\n}\n","export class TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new AbortError(errorMessage)\n\t: new DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined\n\t\t? getDOMException('This operation was aborted.')\n\t\t: signal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nexport default function pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t} = options;\n\n\tlet timer;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tpromise.then(resolve, reject);\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t})();\n\t});\n\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { arm64, armv7, powerpc64le, sparc64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractExe, extractTarByExe } from \"../utils/setup/extract.js\"\nimport type { PackageInfo } from \"../utils/setup/setupBin.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function getLLVMPackageInfo(\n version: string,\n platform: NodeJS.Platform,\n arch: string,\n): Promise {\n const url = await getLLVMAssetURL(platform, arch, version)\n info(`Downloading LLVM from ${url}`)\n\n return {\n url,\n extractedFolderName: \"\",\n binRelativeDir: \"bin\",\n binFileName: addExeExt(\"clang\"),\n extractFunction: platform === \"win32\"\n ? extractExe\n : (file: string, dest: string) => {\n return extractTarByExe(file, dest, 1)\n },\n }\n}\n\nexport async function getLLVMAssetURL(platform: string, arch: string, version: string) {\n const { keywords, optionalKeywords } = await getAssetKeywords(platform, arch)\n\n // first check the github releases\n const llvmGitHubAssets = await loadAssetList(\n join(dirname, \"github_llvm_llvm-project.json\"),\n )\n const ghAsset = matchAsset(\n llvmGitHubAssets,\n {\n version,\n keywords,\n optionalKeywords,\n filterMapTag(tag) {\n return tag.replace(/^llvmorg-/, \"\")\n },\n },\n )\n\n if (ghAsset !== undefined) {\n return `https://github.com/llvm/llvm-project/releases/download/${ghAsset.tag}/${ghAsset.name}`\n }\n\n // check the llvm website\n const llvmWebsiteAssets = await loadAssetList(\n join(dirname, \"llvm_org_releases.json\"),\n )\n\n const websiteAsset = matchAsset(\n llvmWebsiteAssets,\n {\n version,\n keywords,\n optionalKeywords,\n },\n )\n\n if (websiteAsset !== undefined) {\n return `https://llvm.org/releases/${websiteAsset.tag}/${websiteAsset.name}`\n }\n\n throw new Error(`No asset found for version ${version} matching ${keywords} and ${optionalKeywords}`)\n}\n\nasync function getAssetKeywords(platform: string, arch: string) {\n const keywords: string[] = []\n const optionalKeywords: string[] = []\n\n switch (platform) {\n case \"win32\": {\n if (x86_64.includes(arch)) {\n keywords.push(\"win64\")\n // TODO fallback to win32 if win64 is not available (e.g. for LLVM 3.6.2 and older)\n } else if (x86.includes(arch)) {\n keywords.push(\"win32\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"woa64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"linux\": {\n keywords.push(\"linux\")\n\n if (isUbuntu()) {\n optionalKeywords.push(\"ubuntu\")\n\n const ubuntuVer = await ubuntuVersion()\n if (ubuntuVer !== null) {\n optionalKeywords.push(`${ubuntuVer[0]}`)\n const ubuntuMin = ubuntuVer[1] < 10 ? `0${ubuntuVer[1]}` : `${ubuntuVer[1]}`\n\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}`)\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}.${ubuntuVer[2]}`)\n }\n } else if (hasDnf()) {\n optionalKeywords.push(\"rhel\")\n }\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"x86\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"aarch64\")\n } else if (armv7.includes(arch)) {\n keywords.push(\"armv7a\")\n } else if (powerpc64le.includes(arch)) {\n keywords.push(\"powerpc64le\")\n } else if (sparc64.includes(arch)) {\n keywords.push(\"sparc64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n case \"darwin\": {\n keywords.push(\"apple\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (arm64.includes(arch)) {\n // allow falling back to x86_64 if arm64 is not available\n optionalKeywords.push(\"arm64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"freebsd\": {\n keywords.push(\"freebsd\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"amd64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"i386\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n default:\n info(`Using ${platform} ${arch} for LLVM`)\n optionalKeywords.push(platform, arch)\n break\n }\n return { keywords, optionalKeywords }\n}\n","import path, { delimiter, join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupGcc } from \"../gcc/gcc.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type InstallationInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { semverCoerceIfInvalid } from \"../utils/setup/version.js\"\nimport { quoteIfHasSpace } from \"../utils/std/index.js\"\nimport { getVersion } from \"../versions/versions.js\"\nimport { LLVMPackages, setupLLVMApt } from \"./llvm_installer.js\"\nimport { getLLVMPackageInfo } from \"./llvm_url.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function setupLLVM(version: string, setupDir: string, arch: string): Promise {\n const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)\n await activateLLVM(installationInfo.installDir ?? setupDir, version)\n return installationInfo\n}\n\nasync function setupLLVMWithoutActivation_(version: string, setupDir: string, arch: string) {\n // install LLVM\n const [installationInfo, _1] = await Promise.all([\n setupLLVMOnly(version, setupDir, arch),\n addLLVMLoggingMatcher(),\n ])\n\n // install LLVM dependencies\n await setupLLVMDeps(arch)\n\n return installationInfo\n}\nconst setupLLVMWithoutActivation = memoize(setupLLVMWithoutActivation_, { promise: true })\n\n/**\n * Setup clang-format\n *\n * This uses the LLVM installer on Ubuntu, and the LLVM binaries on other platforms\n */\nexport function setupClangFormat(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch, LLVMPackages.ClangFormat)\n}\n\n/** Setup llvm tools (clang tidy, etc.) without activating llvm and using it as the compiler */\nexport function setupClangTools(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch)\n}\n\nasync function setupLLVMOnly(\n version: string,\n setupDir: string,\n arch: string,\n packages: LLVMPackages = LLVMPackages.All,\n) {\n const majorVersion = majorLLVMVersion(version)\n try {\n if (isUbuntu()) {\n return await setupLLVMApt(majorVersion, packages)\n }\n } catch (err) {\n info(`Failed to install llvm via system package manager ${err}`)\n }\n\n const installationInfo = await setupBin(\"llvm\", version, getLLVMPackageInfo, setupDir, arch)\n await llvmBinaryDeps(majorVersion)\n return installationInfo\n}\n\nfunction majorLLVMVersion(version: string) {\n const coeredVersion = semverCoerceIfInvalid(version)\n return Number.parseInt(coeredVersion.split(\".\")[0], 10)\n}\n\nasync function llvmBinaryDeps_(majorVersion: number) {\n if (isUbuntu()) {\n if (majorVersion <= 10) {\n await installAptPack([{ name: \"libtinfo5\" }])\n } else {\n await installAptPack([{ name: \"libtinfo-dev\" }])\n }\n } else if (isArch()) {\n // https://aur.archlinux.org/packages/ncurses5-compat-libs\n await setupPacmanPack(\"ncurses5-compat-libs\", undefined, \"yay\")\n } else if (hasDnf()) {\n // https://packages.fedoraproject.org/pkgs/ncurses/ncurses-compat-libs/index.html\n await setupDnfPack([\n { name: \"ncurses-compat-libs\" },\n ])\n }\n}\nconst llvmBinaryDeps = memoize(llvmBinaryDeps_, { promise: true })\n\nasync function setupLLVMDeps_(arch: string) {\n if (process.platform === \"linux\") {\n // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first,\n // but with a lower priority than the one used by activateLLVM()\n await setupGcc(getVersion(\"gcc\", undefined, await ubuntuVersion()), \"\", arch, 40)\n }\n}\nconst setupLLVMDeps = memoize(setupLLVMDeps_, { promise: true })\n\nexport async function activateLLVM(directory: string, version: string) {\n const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n\n const llvmMajor = majorLLVMVersion(version)\n\n const actPromises: Promise[] = [\n // compiler paths\n addEnv(\"CC\", addExeExt(`${directory}/bin/clang`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${directory}/bin/clang++`), rcOptions),\n\n // the output of this action\n addEnv(\"LLVM_PATH\", directory, rcOptions),\n\n // Setup LLVM as the compiler\n addEnv(\"LD_LIBRARY_PATH\", `${ld}${delimiter}${directory}/lib`, rcOptions),\n addEnv(\"DYLD_LIBRARY_PATH\", `${dyld}${delimiter}${directory}/lib`, rcOptions),\n\n // compiler flags\n addEnv(\"LLVM_LDFLAGS\", `-L${quoteIfHasSpace(`${directory}/lib`)}`, rcOptions),\n addEnv(\"LLVM_CPPFLAGS\", `-I${quoteIfHasSpace(`${directory}/include`)}`, rcOptions),\n\n // CPATH\n await pathExists(`${directory}/lib/clang/${version}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${version}/include`, rcOptions)\n : await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${llvmMajor}/include`, rcOptions)\n : Promise.resolve(),\n\n addEnv(\"LIBRARY_PATH\", `${directory}/lib`, rcOptions),\n\n // os sdks\n setupMacOSSDK(),\n ]\n\n if (isUbuntu()) {\n const priority = 60\n actPromises.push(\n addUpdateAlternativesToRc(\"cc\", `${directory}/bin/clang`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${directory}/bin/clang++`, rcOptions, priority),\n addUpdateAlternativesToRc(\"clang\", `${directory}/bin/clang`, rcOptions),\n addUpdateAlternativesToRc(\"clang++\", `${directory}/bin/clang++`, rcOptions),\n addUpdateAlternativesToRc(\"lld\", `${directory}/bin/lld`, rcOptions),\n addUpdateAlternativesToRc(\"ld.lld\", `${directory}/bin/ld.lld`, rcOptions),\n addUpdateAlternativesToRc(\"llvm-ar\", `${directory}/bin/llvm-ar`, rcOptions),\n )\n }\n\n await Promise.all(actPromises)\n}\n\nasync function addLLVMLoggingMatcher() {\n if (GITHUB_ACTIONS) {\n const matcherPath = join(dirname, \"llvm_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the llvm_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n }\n}\n","import { info } from \"console\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRoot } from \"admina\"\nimport { addPath } from \"envosman\"\nimport { chmod, readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { aptTimeout, hasNala, installAptPack, isAptPackRegexInstalled } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { DEFAULT_TIMEOUT } from \"../installTool.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\nexport enum LLVMPackages {\n All = 0,\n ClangFormat = 1,\n Core = 2,\n}\n\nexport async function setupLLVMApt(\n majorVersion: number,\n packages: LLVMPackages = LLVMPackages.All,\n): Promise {\n // TODO for older versions, this also includes the minor version\n const installationFolder = `/usr/lib/llvm-${majorVersion}`\n\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }])\n const dl = new DownloaderHelper(\"https://apt.llvm.org/llvm.sh\", tmpdir(), { fileName: \"llvm.sh\" })\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the LLVM installer script: ${err}`)\n })\n await dl.start()\n const installerScript = await readFile(dl.getDownloadPath(), \"utf-8\")\n\n const installerPath = join(tmpdir(), \"llvm-setup-cpp.sh\")\n const neededPackages = await patchAptLLVMScript(\n installerScript,\n installerPath,\n majorVersion,\n packages,\n )\n await installAptPack(neededPackages)\n await chmod(installerPath, \"755\")\n await execRoot(\n \"bash\",\n [installerPath, `${majorVersion}`, ...(packages === LLVMPackages.All ? [\"all\"] : [])],\n {\n stdio: \"inherit\",\n shell: true,\n timeout: DEFAULT_TIMEOUT,\n },\n )\n\n await addPath(`${installationFolder}/bin`, rcOptions)\n\n return {\n installDir: `${installationFolder}`,\n binDir: `${installationFolder}/bin`,\n bin: `${installationFolder}/bin/clang++`,\n }\n}\n\nasync function patchAptLLVMScript(\n givenScript: string,\n target_path: string,\n majorVersion: number,\n packages: LLVMPackages,\n) {\n let script = debugScript(givenScript)\n script = nonInteractiveScript(script)\n script = choosePackages(packages, script, majorVersion)\n script = await removeConflictingPackages(script)\n script = useNalaScript(script)\n\n await writeFile(target_path, script)\n\n // the packages needed by the script\n return [{ name: \"lsb-release\" }, { name: \"wget\" }, { name: \"software-properties-common\" }, { name: \"gnupg\" }]\n}\n\nfunction debugScript(script: string) {\n if (process.env.NODE_DEBUG !== \"1\" && process.env.NODE_DEBUG !== \"true\") {\n return script.replace(/set -eux/g, \"set -eu\")\n }\n return script\n}\n\nfunction nonInteractiveScript(script: string) {\n // make the scirpt non-interactive and fix broken packages\n return script.replace(\n /add-apt-repository \"\\${REPO_NAME}\"/g,\n `add-apt-repository -y -n \"\\${REPO_NAME}\"\napt-get update -o ${aptTimeout} -y`,\n )\n}\n\nasync function removeConflictingPackages(givenScript: string) {\n // fix conflicts between libclang-rt and libclang\n let script = givenScript.replace(\n /apt-get install -y/g,\n `apt-get install -o Dpkg::Options::=\"--force-overwrite\" -o ${aptTimeout} -y --fix-broken`,\n )\n\n // check if these are installed and if so, remove them from the script as they conflict\n const conflictingPackages = [\"libc++-$LLVM_VERSION-dev\", \"libc++abi-$LLVM_VERSION-dev\", \"libunwind-$LLVM_VERSION-dev\"]\n await Promise.all(\n conflictingPackages.map(async (pack) => {\n const installingPack = pack.replace(\"$LLVM_VERSION\", \"*\")\n if (await isAptPackRegexInstalled(installingPack)) {\n info(`Removing conflicting package ${installingPack}`)\n script = script.replace(pack, \"\")\n }\n }),\n )\n return script\n}\n\nfunction useNalaScript(script: string) {\n // use nala if it is available\n if (hasNala()) {\n return script.replace(/apt-get/g, \"nala\")\n }\n return script\n}\n\nfunction choosePackages(packages: LLVMPackages, script: string, majorVersion: number) {\n if (packages === LLVMPackages.ClangFormat) {\n return script.replace(/ -y \\$PKG/g, ` -y clang-format-${majorVersion}`)\n }\n return script\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { findVcvarsall, vsversion_to_versionnumber } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupVCVarsall } from \"../vcvarsall/vcvarsall.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\ntype MSVCVersion = \"2022\" | \"17.0\" | \"2019\" | \"16.0\" | \"2017\" | \"15.0\" | \"2015\" | \"14.0\" | \"2013\" | \"12.0\" | string\n\nexport async function setupMSVC(\n versionGiven: MSVCVersion,\n _setupDir: string,\n arch: string,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (process.platform !== \"win32\") {\n return\n }\n const version = vsversion_to_versionnumber(versionGiven) as string\n\n // check if the given version is already installed\n info(`Checking if MSVC ${version} is already installed`)\n let installed = false\n try {\n const vcvarsall_path = findVcvarsall(version) as string\n installed = true\n info(`Found the pre-installed version of MSVC at ${vcvarsall_path}`)\n } catch {\n // not installed, try installing\n }\n\n let toolset: string | undefined\n let VCTargetsPath: string | undefined\n // https://github.com/aminya/setup-cpp/issues/1\n if (!installed) {\n try {\n if (version === \"14.0\") {\n toolset = \"14.0\"\n await setupChocoPack(\"visualcpp-build-tools\", \"14.0.25420.1\", [\"--ignore-dependencies\"])\n VCTargetsPath = \"C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140\"\n } else if (version === \"15.0\") {\n toolset = \"14.16\"\n await setupChocoPack(\"visualstudio2017buildtools\", \"15.9.41.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16\" // TODO verify path\n } else if (version === \"16.0\") {\n toolset = \"14.29\"\n await setupChocoPack(\"visualstudio2019buildtools\", \"16.11.7.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133\"\n } else if (version === \"17.0\") {\n toolset = undefined\n await setupChocoPack(\"visualstudio2022buildtools\", \"117.0.5.0\", [])\n VCTargetsPath = undefined\n } else {\n error(`The given MSVC versions ${versionGiven} is not supported yet.`)\n }\n } catch (e) {\n error(e as string | Error)\n }\n }\n // run vcvarsall.bat environment variables\n await setupVCVarsall(version, VCTargetsPath, arch, toolset, sdk, uwp, spectre)\n\n if (GITHUB_ACTIONS) {\n await addMSVCLoggingMatcher()\n }\n}\n\nasync function addMSVCLoggingMatcher() {\n const matcherPath = join(dirname, \"msvc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the msvc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { execRootSync } from \"admina\"\nimport { error } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n/** Get the platform data for cmake */\nfunction getPowerShellPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n return {\n url: getPowershellUrl(platform, arch, version),\n binRelativeDir: \"\",\n binFileName: addExeExt(\"pwsh\"),\n extractedFolderName: \"\",\n }\n}\n\nfunction getPowershellUrl(\n platform: string,\n arch: string,\n version: string,\n) {\n switch (platform) {\n case \"win32\": {\n const osArchStr = ([\"ia32\", \"x86\", \"i386\", \"x32\"].includes(arch))\n ? \"win-x86\"\n : \"win-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/PowerShell-${version}-${osArchStr}.zip`\n }\n case \"darwin\": {\n const osArchStr = [\"arm\", \"arm64\"].includes(arch) ? \"osx-arm64\" : \"osx-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n case \"linux\": {\n const archMap = {\n arm64: \"linux-arm64\",\n arm: \"linux-arm64\",\n arm32: \"linux-arm32\",\n aarch64: \"linux-arm64\",\n x64: \"linux-x64\",\n } as Record\n const osArchStr = archMap[arch] ?? \"linux-x64\"\n // TODO support musl\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershell(version: string, setupDir: string, arch: string) {\n try {\n return await setupBin(\"pwsh\", version, getPowerShellPackageInfo, setupDir, arch)\n } catch (err) {\n error(`Failed to setup pwsh via download: ${err}. Trying package managers...`)\n return setupPowershellSystem(version, setupDir, arch)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershellSystem(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"powershell-core\", version)\n const binDir = \"C:/Program Files/PowerShell/7\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"powershell\", version, { cask: true, overwrite: false })\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"powershell-bin\", version, \"yay\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"curl\" }])\n execRootSync(\"/bin/bash\", [\n \"-c\",\n \"curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo\",\n ])\n return setupDnfPack([{ name: \"powershell\", version }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"curl\" }])\n const ubuntuVerSplitted = (await ubuntuVersion())!\n const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`\n\n execRootSync(\"curl\", [\n \"-LJO\",\n `https://packages.microsoft.com/config/ubuntu/${ubuntuVersionString}/packages-microsoft-prod.deb`,\n ])\n execRootSync(\"dpkg\", [\"-i\", \"packages-microsoft-prod.deb\"])\n\n // TODO Debian\n // const keyFileName = await addAptKeyViaURL(\n // \"microsoft.asc\",\n // \"https://packages.microsoft.com/keys/microsoft.asc\"\n // )\n // execRootSync(\"/bin/bash\", [\n // \"-c\",\n // `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main\" > /etc/apt/sources.list.d/microsoft.list`,\n // ])\n\n return installAptPack([{ name: \"powershell\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addExeExt } from \"patha\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name task uses in their download links */\nfunction getTaskPlatform(platform: NodeJS.Platform) {\n switch (platform) {\n case \"win32\":\n return \"windows\"\n default:\n return platform\n }\n}\n\n/** Get the arch name task uses in their download links */\nfunction getTaskArch(arch: string) {\n switch (arch) {\n case \"x64\":\n return \"amd64\"\n case \"ia32\":\n case \"x86\":\n case \"i386\":\n case \"x32\":\n return \"386\"\n default:\n return arch\n }\n}\n\n/** Get the platform data for task */\nfunction getTaskPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const taskPlatform = getTaskPlatform(platform)\n const taskArch = getTaskArch(arch)\n const extension = platform === \"win32\" ? \"zip\" : \"tar.gz\"\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"task\"),\n extractedFolderName: \"\",\n url: `https://github.com/go-task/task/releases/download/v${version}/task_${taskPlatform}_${taskArch}.${extension}`,\n }\n}\n\nexport function setupTask(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"task\", version, getTaskPackageInfo, setupDir, arch)\n}\n","import { getInput } from \"@actions/core\"\nimport { info } from \"ci-log\"\nimport mri from \"mri\"\nimport { untildifyUser } from \"untildify-user\"\nimport { type Inputs, inputs } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\n\nexport function parseArgs(args: string[]): Opts {\n return mri & { help: boolean }>(args, {\n string: [...inputs, \"timeout\"],\n default: Object.fromEntries(inputs.map((inp) => [inp, maybeGetInput(inp)])),\n alias: { h: \"help\" },\n boolean: \"help\",\n })\n}\n\nexport function printHelp() {\n info(`\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 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 you would like to install for this tool. e.g. --conan true or --conan \"1.42.1\"\n\nAll the available tools:\n`)\n\n console.table(\n {\n \"compiler and analyzer\": { tools: \"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat\" },\n \"build system\": { tools: \"--cmake, --ninja, --meson, --make, --task, --bazel\" },\n \"package manager\": { tools: \"--vcpkg, --conan, --choco, --brew, --nala\" },\n cache: { tools: \"--ccache, --sccache\" },\n documentation: { tools: \"--doxygen, --graphviz\" },\n coverage: { tools: \"--gcovr, --opencppcoverage, --kcov\" },\n other: { tools: \"--python, --powershell, --sevenzip\" },\n },\n [\"tools\"],\n )\n}\n/** Get an object from github actions */\n\nexport function maybeGetInput(key: string) {\n const value = getInput(key.toLowerCase())\n if (value !== \"false\" && value !== \"\") {\n return value\n }\n return undefined // skip installation\n}\nexport type Opts = mri.Argv<\n Record & {\n help: boolean\n timeout?: string\n }\n>\n\nexport function getSuccessMessage(tool: string, installationInfo: InstallationInfo | undefined | void) {\n let msg = `✅ ${tool} was installed successfully:`\n if (installationInfo === undefined) {\n return msg\n }\n if (\"installDir\" in installationInfo) {\n msg += `\\n- The installation directory is ${installationInfo.installDir}`\n }\n if (installationInfo.binDir !== \"\") {\n msg += `\\n- The binary directory is ${installationInfo.binDir}`\n }\n return msg\n}\n\nexport const rcOptions = {\n rcPath: untildifyUser(\"~/.cpprc\"),\n guard: \"cpp\",\n}\n","'use strict'\n\nconst vendors = require('./vendors.json')\n\nconst env = process.env\n\n// Used for testing only\nObject.defineProperty(exports, '_vendors', {\n value: vendors.map(function (v) {\n return v.constant\n })\n})\n\nexports.name = null\nexports.isPR = null\n\nvendors.forEach(function (vendor) {\n const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]\n const isCI = envs.every(function (obj) {\n return checkEnv(obj)\n })\n\n exports[vendor.constant] = isCI\n\n if (!isCI) {\n return\n }\n\n exports.name = vendor.name\n\n switch (typeof vendor.pr) {\n case 'string':\n // \"pr\": \"CIRRUS_PR\"\n exports.isPR = !!env[vendor.pr]\n break\n case 'object':\n if ('env' in vendor.pr) {\n // \"pr\": { \"env\": \"BUILDKITE_PULL_REQUEST\", \"ne\": \"false\" }\n exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne\n } else if ('any' in vendor.pr) {\n // \"pr\": { \"any\": [\"ghprbPullId\", \"CHANGE_ID\"] }\n exports.isPR = vendor.pr.any.some(function (key) {\n return !!env[key]\n })\n } else {\n // \"pr\": { \"DRONE_BUILD_EVENT\": \"pull_request\" }\n exports.isPR = checkEnv(vendor.pr)\n }\n break\n default:\n // PR detection not supported for this vendor\n exports.isPR = null\n }\n})\n\nexports.isCI = !!(\n env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'\n (env.BUILD_ID || // Jenkins, Cloudbees\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari\n env.CI_APP_ID || // Appflow\n env.CI_BUILD_ID || // Appflow\n env.CI_BUILD_NUMBER || // Appflow\n env.CI_NAME || // Codeship and others\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.RUN_ID || // TaskCluster, dsari\n exports.name ||\n false)\n)\n\nfunction checkEnv (obj) {\n // \"env\": \"CIRRUS\"\n if (typeof obj === 'string') return !!env[obj]\n\n // \"env\": { \"env\": \"NODE\", \"includes\": \"/app/.heroku/node/bin/node\" }\n if ('env' in obj) {\n // Currently there are no other types, uncomment when there are\n // if ('includes' in obj) {\n return env[obj.env] && env[obj.env].includes(obj.includes)\n // }\n }\n if ('any' in obj) {\n return obj.any.some(function (k) {\n return !!env[k]\n })\n }\n return Object.keys(obj).every(function (k) {\n return env[k] === obj[k]\n })\n}\n","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;","import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;","import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;","export default '00000000-0000-0000-0000-000000000000';","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","module.exports = require('./lib/tunnel');\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as pm from './proxy';\nimport * as tunnel from 'tunnel';\nexport var HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (HttpCodes = {}));\nexport var Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (Headers = {}));\nexport var MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nexport function getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nexport class HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n statusCode;\n result;\n}\nexport class HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n message;\n async readBody() {\n return new Promise(async (resolve) => {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n });\n }\n async readBodyBuffer() {\n return new Promise(async (resolve) => {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n });\n }\n}\nexport function isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexport class HttpClient {\n userAgent;\n handlers;\n requestOptions;\n _ignoreSslError = false;\n _socketTimeout;\n _allowRedirects = true;\n _allowRedirectDowngrade = false;\n _maxRedirects = 50;\n _allowRetries = false;\n _maxRetries = 1;\n _agent;\n _proxyAgent;\n _proxyAgentDispatcher;\n _keepAlive = false;\n _disposed = false;\n constructor(userAgent, handlers, requestOptions) {\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n async options(requestUrl, additionalHeaders) {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n }\n async get(requestUrl, additionalHeaders) {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n }\n async del(requestUrl, additionalHeaders) {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n }\n async post(requestUrl, data, additionalHeaders) {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n }\n async patch(requestUrl, data, additionalHeaders) {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n }\n async put(requestUrl, data, additionalHeaders) {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n }\n async head(requestUrl, additionalHeaders) {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n }\n async sendStream(verb, requestUrl, stream, additionalHeaders) {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n async getJson(requestUrl, additionalHeaders = {}) {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = await this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async postJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async putJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async patchJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n async request(verb, requestUrl, data, headers) {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = await this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n await response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = await this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n await response.readBody();\n await this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n async requestRaw(info, data) {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n async getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return undefined;\n }\n return await this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (!useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: {\n ...((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n }),\n host: proxyUrl.hostname,\n port: proxyUrl.port\n }\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if tunneling agent isn't assigned create a new agent\n if (!agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n async _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n // Lazy load ProxyAgent to avoid bundling all the undici\n const ProxyAgent = (await import('undici/lib/proxy-agent'));\n proxyAgent = new ProxyAgent({\n uri: proxyUrl.href,\n pipelining: !this._keepAlive ? 0 : 1,\n ...((proxyUrl.username || proxyUrl.password) && {\n token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`\n })\n });\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n async _performExponentialBackoff(retryNumber) {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n }\n async _processResponse(res, options) {\n return new Promise(async (resolve, reject) => {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = await res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n }\n}\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport pathKey from 'path-key';\n\nexport const npmRunPath = ({\n\tcwd = process.cwd(),\n\tpath: pathOption = process.env[pathKey()],\n\tpreferLocal = true,\n\texecPath = process.execPath,\n\taddExecPath = true,\n} = {}) => {\n\tconst cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;\n\tconst cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\tif (preferLocal) {\n\t\tapplyPreferLocal(result, cwdPath);\n\t}\n\n\tif (addExecPath) {\n\t\tapplyExecPath(result, execPath, cwdPath);\n\t}\n\n\treturn [...result, pathOption].join(path.delimiter);\n};\n\nconst applyPreferLocal = (result, cwdPath) => {\n\tlet previous;\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n};\n\n// Ensure the running `node` binary is used\nconst applyExecPath = (result, execPath, cwdPath) => {\n\tconst execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;\n\tresult.push(path.resolve(cwdPath, execPathString, '..'));\n};\n\nexport const npmRunPathEnv = ({env = process.env, ...options} = {}) => {\n\tenv = {...env};\n\n\tconst pathName = pathKey({env});\n\toptions.path = env[pathName];\n\tenv[pathName] = npmRunPath(options);\n\n\treturn env;\n};\n","const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n","\nexport const getRealtimeSignals=()=>{\nconst length=SIGRTMAX-SIGRTMIN+1;\nreturn Array.from({length},getRealtimeSignal);\n};\n\nconst getRealtimeSignal=(value,index)=>({\nname:`SIGRT${index+1}`,\nnumber:SIGRTMIN+index,\naction:\"terminate\",\ndescription:\"Application-specific signal (realtime)\",\nstandard:\"posix\"\n});\n\nconst SIGRTMIN=34;\nexport const SIGRTMAX=64;","\n\nexport const SIGNALS=[\n{\nname:\"SIGHUP\",\nnumber:1,\naction:\"terminate\",\ndescription:\"Terminal closed\",\nstandard:\"posix\"\n},\n{\nname:\"SIGINT\",\nnumber:2,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-C\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGQUIT\",\nnumber:3,\naction:\"core\",\ndescription:\"User interruption with CTRL-\\\\\",\nstandard:\"posix\"\n},\n{\nname:\"SIGILL\",\nnumber:4,\naction:\"core\",\ndescription:\"Invalid machine instruction\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGTRAP\",\nnumber:5,\naction:\"core\",\ndescription:\"Debugger breakpoint\",\nstandard:\"posix\"\n},\n{\nname:\"SIGABRT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGIOT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGBUS\",\nnumber:7,\naction:\"core\",\ndescription:\n\"Bus error due to misaligned, non-existing address or paging error\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGEMT\",\nnumber:7,\naction:\"terminate\",\ndescription:\"Command should be emulated but is not implemented\",\nstandard:\"other\"\n},\n{\nname:\"SIGFPE\",\nnumber:8,\naction:\"core\",\ndescription:\"Floating point arithmetic error\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGKILL\",\nnumber:9,\naction:\"terminate\",\ndescription:\"Forced termination\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGUSR1\",\nnumber:10,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGSEGV\",\nnumber:11,\naction:\"core\",\ndescription:\"Segmentation fault\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGUSR2\",\nnumber:12,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGPIPE\",\nnumber:13,\naction:\"terminate\",\ndescription:\"Broken pipe or socket\",\nstandard:\"posix\"\n},\n{\nname:\"SIGALRM\",\nnumber:14,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTERM\",\nnumber:15,\naction:\"terminate\",\ndescription:\"Termination\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGSTKFLT\",\nnumber:16,\naction:\"terminate\",\ndescription:\"Stack is empty or overflowed\",\nstandard:\"other\"\n},\n{\nname:\"SIGCHLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"posix\"\n},\n{\nname:\"SIGCLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"other\"\n},\n{\nname:\"SIGCONT\",\nnumber:18,\naction:\"unpause\",\ndescription:\"Unpaused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGSTOP\",\nnumber:19,\naction:\"pause\",\ndescription:\"Paused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGTSTP\",\nnumber:20,\naction:\"pause\",\ndescription:\"Paused using CTRL-Z or \\\"suspend\\\"\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTTIN\",\nnumber:21,\naction:\"pause\",\ndescription:\"Background process cannot read terminal input\",\nstandard:\"posix\"\n},\n{\nname:\"SIGBREAK\",\nnumber:21,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-BREAK\",\nstandard:\"other\"\n},\n{\nname:\"SIGTTOU\",\nnumber:22,\naction:\"pause\",\ndescription:\"Background process cannot write to terminal output\",\nstandard:\"posix\"\n},\n{\nname:\"SIGURG\",\nnumber:23,\naction:\"ignore\",\ndescription:\"Socket received out-of-band data\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXCPU\",\nnumber:24,\naction:\"core\",\ndescription:\"Process timed out\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXFSZ\",\nnumber:25,\naction:\"core\",\ndescription:\"File too big\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGVTALRM\",\nnumber:26,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGPROF\",\nnumber:27,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGWINCH\",\nnumber:28,\naction:\"ignore\",\ndescription:\"Terminal window size changed\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGIO\",\nnumber:29,\naction:\"terminate\",\ndescription:\"I/O is available\",\nstandard:\"other\"\n},\n{\nname:\"SIGPOLL\",\nnumber:29,\naction:\"terminate\",\ndescription:\"Watched event\",\nstandard:\"other\"\n},\n{\nname:\"SIGINFO\",\nnumber:29,\naction:\"ignore\",\ndescription:\"Request for process information\",\nstandard:\"other\"\n},\n{\nname:\"SIGPWR\",\nnumber:30,\naction:\"terminate\",\ndescription:\"Device running out of power\",\nstandard:\"systemv\"\n},\n{\nname:\"SIGSYS\",\nnumber:31,\naction:\"core\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n},\n{\nname:\"SIGUNUSED\",\nnumber:31,\naction:\"terminate\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n}];","import{constants}from\"node:os\";\n\nimport{SIGNALS}from\"./core.js\";\nimport{getRealtimeSignals}from\"./realtime.js\";\n\n\n\nexport const getSignals=()=>{\nconst realtimeSignals=getRealtimeSignals();\nconst signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);\nreturn signals;\n};\n\n\n\n\n\n\n\nconst normalizeSignal=({\nname,\nnumber:defaultNumber,\ndescription,\naction,\nforced=false,\nstandard\n})=>{\nconst{\nsignals:{[name]:constantSignal}\n}=constants;\nconst supported=constantSignal!==undefined;\nconst number=supported?constantSignal:defaultNumber;\nreturn{name,number,description,supported,action,forced,standard};\n};","import{constants}from\"node:os\";\n\nimport{SIGRTMAX}from\"./realtime.js\";\nimport{getSignals}from\"./signals.js\";\n\n\n\nconst getSignalsByName=()=>{\nconst signals=getSignals();\nreturn Object.fromEntries(signals.map(getSignalByName));\n};\n\nconst getSignalByName=({\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n})=>[name,{name,number,description,supported,action,forced,standard}];\n\nexport const signalsByName=getSignalsByName();\n\n\n\n\nconst getSignalsByNumber=()=>{\nconst signals=getSignals();\nconst length=SIGRTMAX+1;\nconst signalsA=Array.from({length},(value,number)=>\ngetSignalByNumber(number,signals));\n\nreturn Object.assign({},...signalsA);\n};\n\nconst getSignalByNumber=(number,signals)=>{\nconst signal=findSignalByNumber(number,signals);\n\nif(signal===undefined){\nreturn{};\n}\n\nconst{name,description,supported,action,forced,standard}=signal;\nreturn{\n[number]:{\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n}\n};\n};\n\n\n\nconst findSignalByNumber=(number,signals)=>{\nconst signal=signals.find(({name})=>constants.signals[name]===number);\n\nif(signal!==undefined){\nreturn signal;\n}\n\nreturn signals.find((signalA)=>signalA.number===number);\n};\n\nexport const signalsByNumber=getSignalsByNumber();","import process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n","const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nvar process = global.process\n\nconst processOk = function (process) {\n return process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n}\n\n// some kind of non-node environment, just no-op\n/* istanbul ignore if */\nif (!processOk(process)) {\n module.exports = function () {\n return function () {}\n }\n} else {\n var assert = require('assert')\n var signals = require('./signals.js')\n var isWin = /^win/i.test(process.platform)\n\n var EE = require('events')\n /* istanbul ignore if */\n if (typeof EE !== 'function') {\n EE = EE.EventEmitter\n }\n\n var emitter\n if (process.__signal_exit_emitter__) {\n emitter = process.__signal_exit_emitter__\n } else {\n emitter = process.__signal_exit_emitter__ = new EE()\n emitter.count = 0\n emitter.emitted = {}\n }\n\n // Because this emitter is a global, we have to check to see if a\n // previous version of this library failed to enable infinite listeners.\n // I know what you're about to say. But literally everything about\n // signal-exit is a compromise with evil. Get used to it.\n if (!emitter.infinite) {\n emitter.setMaxListeners(Infinity)\n emitter.infinite = true\n }\n\n module.exports = function (cb, opts) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return function () {}\n }\n assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')\n\n if (loaded === false) {\n load()\n }\n\n var ev = 'exit'\n if (opts && opts.alwaysLast) {\n ev = 'afterexit'\n }\n\n var remove = function () {\n emitter.removeListener(ev, cb)\n if (emitter.listeners('exit').length === 0 &&\n emitter.listeners('afterexit').length === 0) {\n unload()\n }\n }\n emitter.on(ev, cb)\n\n return remove\n }\n\n var unload = function unload () {\n if (!loaded || !processOk(global.process)) {\n return\n }\n loaded = false\n\n signals.forEach(function (sig) {\n try {\n process.removeListener(sig, sigListeners[sig])\n } catch (er) {}\n })\n process.emit = originalProcessEmit\n process.reallyExit = originalProcessReallyExit\n emitter.count -= 1\n }\n module.exports.unload = unload\n\n var emit = function emit (event, code, signal) {\n /* istanbul ignore if */\n if (emitter.emitted[event]) {\n return\n }\n emitter.emitted[event] = true\n emitter.emit(event, code, signal)\n }\n\n // { : , ... }\n var sigListeners = {}\n signals.forEach(function (sig) {\n sigListeners[sig] = function listener () {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n var listeners = process.listeners(sig)\n if (listeners.length === emitter.count) {\n unload()\n emit('exit', null, sig)\n /* istanbul ignore next */\n emit('afterexit', null, sig)\n /* istanbul ignore next */\n if (isWin && sig === 'SIGHUP') {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n sig = 'SIGINT'\n }\n /* istanbul ignore next */\n process.kill(process.pid, sig)\n }\n }\n })\n\n module.exports.signals = function () {\n return signals\n }\n\n var loaded = false\n\n var load = function load () {\n if (loaded || !processOk(global.process)) {\n return\n }\n loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n emitter.count += 1\n\n signals = signals.filter(function (sig) {\n try {\n process.on(sig, sigListeners[sig])\n return true\n } catch (er) {\n return false\n }\n })\n\n process.emit = processEmit\n process.reallyExit = processReallyExit\n }\n module.exports.load = load\n\n var originalProcessReallyExit = process.reallyExit\n var processReallyExit = function processReallyExit (code) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n process.exitCode = code || /* istanbul ignore next */ 0\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n originalProcessReallyExit.call(process, process.exitCode)\n }\n\n var originalProcessEmit = process.emit\n var processEmit = function processEmit (ev, arg) {\n if (ev === 'exit' && processOk(global.process)) {\n /* istanbul ignore else */\n if (arg !== undefined) {\n process.exitCode = arg\n }\n var ret = originalProcessEmit.apply(this, arguments)\n /* istanbul ignore next */\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n return ret\n } else {\n return originalProcessEmit.apply(this, arguments)\n }\n }\n}\n","// This is not the set of all possible signals.\n//\n// It IS, however, the set of all signals that trigger\n// an exit on either Linux or BSD systems. Linux is a\n// superset of the signal names supported on BSD, and\n// the unknown signals just fail to register, so we can\n// catch that easily enough.\n//\n// Don't bother with SIGKILL. It's uncatchable, which\n// means that we can't fire any callbacks anyway.\n//\n// If a user does happen to register a handler on a non-\n// fatal signal like SIGWINCH or something, and then\n// exit, it'll end up firing `process.emit('exit')`, so\n// the handler will be fired anyway.\n//\n// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n// artificially, inherently leave the process in a\n// state from which it is not safe to try and enter JS\n// listeners.\nmodule.exports = [\n 'SIGABRT',\n 'SIGALRM',\n 'SIGHUP',\n 'SIGINT',\n 'SIGTERM'\n]\n\nif (process.platform !== 'win32') {\n module.exports.push(\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n module.exports.push(\n 'SIGIO',\n 'SIGPOLL',\n 'SIGPWR',\n 'SIGSTKFLT',\n 'SIGUNUSED'\n )\n}\n","'use strict';\nconst {PassThrough: PassThroughStream} = require('stream');\n\nmodule.exports = options => {\n\toptions = {...options};\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst isBuffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || isBuffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (isBuffer) {\n\t\tencoding = null;\n\t}\n\n\tconst stream = new PassThroughStream({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tlet length = 0;\n\tconst chunks = [];\n\n\tstream.on('data', chunk => {\n\t\tchunks.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlength = chunks.length;\n\t\t} else {\n\t\t\tlength += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn chunks;\n\t\t}\n\n\t\treturn isBuffer ? Buffer.concat(chunks, length) : chunks.join('');\n\t};\n\n\tstream.getBufferedLength = () => length;\n\n\treturn stream;\n};\n","'use strict';\n\nconst { PassThrough } = require('stream');\n\nmodule.exports = function (/*streams...*/) {\n var sources = []\n var output = new PassThrough({objectMode: true})\n\n output.setMaxListeners(0)\n\n output.add = add\n output.isEmpty = isEmpty\n\n output.on('unpipe', remove)\n\n Array.prototype.slice.call(arguments).forEach(add)\n\n return output\n\n function add (source) {\n if (Array.isArray(source)) {\n source.forEach(add)\n return this\n }\n\n sources.push(source);\n source.once('end', remove.bind(null, source))\n source.once('error', output.emit.bind(output, 'error'))\n source.pipe(output, {end: false})\n return this\n }\n\n function isEmpty () {\n return sources.length == 0;\n }\n\n function remove (source) {\n sources = sources.filter(function (it) { return it !== source })\n if (!sources.length && output.readable) { output.end() }\n }\n}\n","import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\nconst DOUBLE_QUOTES_REGEXP = /\"/g;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens[tokens.length - 1];\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens[tokens.length - 1]}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n","import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n","export default function stripFinalNewline(input) {\n\tconst LF = typeof input === 'string' ? '\\n' : '\\n'.charCodeAt();\n\tconst CR = typeof input === 'string' ? '\\r' : '\\r'.charCodeAt();\n\n\tif (input[input.length - 1] === LF) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\tif (input[input.length - 1] === CR) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\treturn input;\n}\n","import * as fs from \"fs\"\nexport default fs.promises\n\nexport const {\n access,\n appendFile,\n chmod,\n chown,\n copyFile,\n lchmod,\n lchown,\n link,\n lstat,\n mkdir,\n mkdtemp,\n open,\n readdir,\n readFile,\n readlink,\n realpath,\n rename,\n rmdir,\n stat,\n symlink,\n truncate,\n unlink,\n utimes,\n writeFile,\n} = fs.promises\n\nimport { promisify } from \"util\"\nexport const rm = \"rm\" in fs.promises\n ? (\n fs.promises as typeof fs.promises & {\n rm: (path: string, options?: fs.RmDirOptions) => Promise\n }\n ).rm\n : promisify(fs.unlink)\n","\"use strict\";\n/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkStat = (stat, options) => stat.isFile() && checkMode(stat, options);\nconst checkMode = (stat, options) => {\n const myUid = options.uid ?? process.getuid?.();\n const myGroups = options.groups ?? process.getgroups?.() ?? [];\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid');\n }\n const groups = new Set([myGid, ...myGroups]);\n const mod = stat.mode;\n const uid = stat.uid;\n const gid = stat.gid;\n const u = parseInt('100', 8);\n const g = parseInt('010', 8);\n const o = parseInt('001', 8);\n const ug = u | g;\n return !!(mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0));\n};\n//# sourceMappingURL=posix.js.map","\"use strict\";\n/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkPathExt = (path, options) => {\n const { pathExt = process.env.PATHEXT || '' } = options;\n const peSplit = pathExt.split(';');\n if (peSplit.indexOf('') !== -1) {\n return true;\n }\n for (let i = 0; i < peSplit.length; i++) {\n const p = peSplit[i].toLowerCase();\n const ext = path.substring(path.length - p.length).toLowerCase();\n if (p && ext === p) {\n return true;\n }\n }\n return false;\n};\nconst checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options);\n//# sourceMappingURL=win32.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = exports.posix = exports.win32 = void 0;\nconst posix = __importStar(require(\"./posix.js\"));\nexports.posix = posix;\nconst win32 = __importStar(require(\"./win32.js\"));\nexports.win32 = win32;\n__exportStar(require(\"./options.js\"), exports);\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;\nconst impl = platform === 'win32' ? win32 : posix;\n/**\n * Determine whether a path is executable on the current platform.\n */\nexports.isexe = impl.isexe;\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexports.sync = impl.sync;\n//# sourceMappingURL=index.js.map","const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn sign(10) === 1 && sign(-20) === -1;\n};\n","// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , value = require(\"./valid-value\")\n , bind = Function.prototype.bind\n , call = Function.prototype.call\n , keys = Object.keys\n , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb /*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n","\"use strict\";\n\nvar _undefined = require(\"../function/noop\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1 /*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n","\"use strict\";\n\nvar sign = require(\"../math/sign\")\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif (value === 0 || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Math.sign : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || value === 0) return value;\n\treturn value > 0 ? 1 : -1;\n};\n","\"use strict\";\n\nvar toInteger = require(\"./to-integer\")\n , max = Math.max;\n\nmodule.exports = function (value) { return max(0, toInteger(value)); };\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\");\n\nmodule.exports = function (optsLength, fnLength, isAsync) {\n\tvar length;\n\tif (isNaN(optsLength)) {\n\t\tlength = fnLength;\n\t\tif (!(length >= 0)) return 1;\n\t\tif (isAsync && length) return length - 1;\n\t\treturn length;\n\t}\n\tif (optsLength === false) return false;\n\treturn toPosInt(optsLength);\n};\n","\"use strict\";\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./_iterate\")(\"forEach\");\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.assign : require(\"./shim\");\n","\"use strict\";\n\nvar keys = require(\"../keys\")\n , value = require(\"../valid-value\")\n , max = Math.max;\n\nmodule.exports = function (dest, src /*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.keys : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isValue = require(\"../is-value\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };\n","\"use strict\";\n\nvar assign = require(\"../object/assign\")\n , isObject = require(\"../object/is-object\")\n , isValue = require(\"../object/is-value\")\n , captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (message /*, code, ext*/) {\n\tvar err = new Error(message), code = arguments[1], ext = arguments[2];\n\tif (!isValue(ext)) {\n\t\tif (isObject(code)) {\n\t\t\text = code;\n\t\t\tcode = null;\n\t\t}\n\t}\n\tif (isValue(ext)) assign(err, ext);\n\tif (isValue(code)) err.code = code;\n\tif (captureStackTrace) captureStackTrace(err, module.exports);\n\treturn err;\n};\n","\"use strict\";\n\nvar toPosInt = require(\"../number/to-pos-integer\");\n\nvar test = function (arg1, arg2) { return arg2; };\n\nvar desc, defineProperty, generate, mixin;\n\ntry {\n\tObject.defineProperty(test, \"length\", {\n\t\tconfigurable: true,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tvalue: 1\n\t});\n}\ncatch (ignore) {}\n\nif (test.length === 1) {\n\t// ES6\n\tdesc = { configurable: true, writable: false, enumerable: false };\n\tdefineProperty = Object.defineProperty;\n\tmodule.exports = function (fn, length) {\n\t\tlength = toPosInt(length);\n\t\tif (fn.length === length) return fn;\n\t\tdesc.value = length;\n\t\treturn defineProperty(fn, \"length\", desc);\n\t};\n} else {\n\tmixin = require(\"../object/mixin\");\n\tgenerate = (function () {\n\t\tvar cache = [];\n\t\treturn function (length) {\n\t\t\tvar args, i = 0;\n\t\t\tif (cache[length]) return cache[length];\n\t\t\targs = [];\n\t\t\twhile (length--) args.push(\"a\" + (++i).toString(36));\n\t\t\t// eslint-disable-next-line no-new-func\n\t\t\treturn new Function(\n\t\t\t\t\"fn\",\n\t\t\t\t\"return function (\" + args.join(\", \") + \") { return fn.apply(this, arguments); };\"\n\t\t\t);\n\t\t};\n\t})();\n\tmodule.exports = function (src, length) {\n\t\tvar target;\n\t\tlength = toPosInt(length);\n\t\tif (src.length === length) return src;\n\t\ttarget = generate(length)(src);\n\t\ttry { mixin(target, src); }\n\t\tcatch (ignore) {}\n\t\treturn target;\n\t};\n}\n","\"use strict\";\n\n// ES3 safe\nvar _undefined = void 0;\n\nmodule.exports = function (value) { return value !== _undefined && value !== null; };\n","\"use strict\";\n\nvar isValue = require(\"../value/is\");\n\n// prettier-ignore\nvar possibleTypes = { \"object\": true, \"function\": true, \"undefined\": true /* document.all */ };\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\treturn hasOwnProperty.call(possibleTypes, typeof value);\n};\n","\"use strict\";\n\nvar isPrototype = require(\"../prototype/is\");\n\nmodule.exports = function (value) {\n\tif (typeof value !== \"function\") return false;\n\n\tif (!hasOwnProperty.call(value, \"length\")) return false;\n\n\ttry {\n\t\tif (typeof value.length !== \"number\") return false;\n\t\tif (typeof value.call !== \"function\") return false;\n\t\tif (typeof value.apply !== \"function\") return false;\n\t} catch (error) {\n\t\treturn false;\n\t}\n\n\treturn !isPrototype(value);\n};\n","\"use strict\";\n\nvar isObject = require(\"../object/is\");\n\nmodule.exports = function (value) {\n\tif (!isObject(value)) return false;\n\ttry {\n\t\tif (!value.constructor) return false;\n\t\treturn value.constructor.prototype === value;\n\t} catch (error) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isFunction = require(\"../function/is\");\n\nvar classRe = /^\\s*class[\\s{/}]/, functionToString = Function.prototype.toString;\n\nmodule.exports = function (value) {\n\tif (!isFunction(value)) return false;\n\tif (classRe.test(functionToString.call(value))) return false;\n\treturn true;\n};\n","\"use strict\";\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? String.prototype.contains : require(\"./shim\");\n","\"use strict\";\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString /*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n","\"use strict\";\n\nvar isValue = require(\"type/value/is\")\n , isPlainFunction = require(\"type/plain-function/is\")\n , assign = require(\"es5-ext/object/assign\")\n , normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , contains = require(\"es5-ext/string/#/contains\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n","'use strict';\n\nvar d = require('d')\n , callable = require('es5-ext/object/valid-callable')\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n","\"use strict\";\n\nvar toArray = require(\"es5-ext/array/to-array\")\n , isValue = require(\"es5-ext/object/is-value\")\n , callable = require(\"es5-ext/object/valid-callable\");\n\nvar slice = Array.prototype.slice, resolveArgs;\n\nresolveArgs = function (args) {\n\treturn this.map(function (resolve, i) { return resolve ? resolve(args[i]) : args[i]; }).concat(\n\t\tslice.call(args, this.length)\n\t);\n};\n\nmodule.exports = function (resolvers) {\n\tresolvers = toArray(resolvers);\n\tresolvers.forEach(function (resolve) { if (isValue(resolve)) callable(resolve); });\n\treturn resolveArgs.bind(resolvers);\n};\n","\"use strict\";\n\nvar from = require(\"./from\")\n , isArray = Array.isArray;\n\nmodule.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); };\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\");\n\nmodule.exports = function (userNormalizer) {\n\tvar normalizer;\n\tif (typeof userNormalizer === \"function\") return { set: userNormalizer, get: userNormalizer };\n\tnormalizer = { get: callable(userNormalizer.get) };\n\tif (userNormalizer.set !== undefined) {\n\t\tnormalizer.set = callable(userNormalizer.set);\n\t\tif (userNormalizer.delete) normalizer.delete = callable(userNormalizer.delete);\n\t\tif (userNormalizer.clear) normalizer.clear = callable(userNormalizer.clear);\n\t\treturn normalizer;\n\t}\n\tnormalizer.set = normalizer.get;\n\treturn normalizer;\n};\n","/* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n\"use strict\";\n\nvar customError = require(\"es5-ext/error/custom\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , d = require(\"d\")\n , ee = require(\"event-emitter\").methods\n , resolveResolve = require(\"./resolve-resolve\")\n , resolveNormalize = require(\"./resolve-normalize\");\n\nvar apply = Function.prototype.apply\n , call = Function.prototype.call\n , create = Object.create\n , defineProperties = Object.defineProperties\n , on = ee.on\n , emit = ee.emit;\n\nmodule.exports = function (original, length, options) {\n\tvar cache = create(null)\n\t , conf\n\t , memLength\n\t , get\n\t , set\n\t , del\n\t , clear\n\t , extDel\n\t , extGet\n\t , extHas\n\t , normalizer\n\t , getListeners\n\t , setListeners\n\t , deleteListeners\n\t , memoized\n\t , resolve;\n\tif (length !== false) memLength = length;\n\telse if (isNaN(original.length)) memLength = 1;\n\telse memLength = original.length;\n\n\tif (options.normalizer) {\n\t\tnormalizer = resolveNormalize(options.normalizer);\n\t\tget = normalizer.get;\n\t\tset = normalizer.set;\n\t\tdel = normalizer.delete;\n\t\tclear = normalizer.clear;\n\t}\n\tif (options.resolvers != null) resolve = resolveResolve(options.resolvers);\n\n\tif (get) {\n\t\tmemoized = defineLength(function (arg) {\n\t\t\tvar id, result, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id !== null) {\n\t\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\t\treturn cache[id];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (id === null) {\n\t\t\t\tid = get(args);\n\t\t\t\tif (id !== null) throw customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t\tid = set(args);\n\t\t\t} else if (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\tmemoized = function () {\n\t\t\tvar result;\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", \"data\", arguments, this);\n\t\t\t\treturn cache.data;\n\t\t\t}\n\t\t\tif (arguments.length) result = apply.call(original, this, arguments);\n\t\t\telse result = call.call(original, this);\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache.data = result;\n\t\t\tif (setListeners) conf.emit(\"set\", \"data\", null, result);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\tmemoized = function (arg) {\n\t\t\tvar result, args = arguments, id;\n\t\t\tif (resolve) args = resolve(arguments);\n\t\t\tid = String(args[0]);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\treturn cache[id];\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t};\n\t}\n\tconf = {\n\t\toriginal: original,\n\t\tmemoized: memoized,\n\t\tprofileName: options.profileName,\n\t\tget: function (args) {\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tif (get) return get(args);\n\t\t\treturn String(args[0]);\n\t\t},\n\t\thas: function (id) { return hasOwnProperty.call(cache, id); },\n\t\tdelete: function (id) {\n\t\t\tvar result;\n\t\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\t\tif (del) del(id);\n\t\t\tresult = cache[id];\n\t\t\tdelete cache[id];\n\t\t\tif (deleteListeners) conf.emit(\"delete\", id, result);\n\t\t},\n\t\tclear: function () {\n\t\t\tvar oldCache = cache;\n\t\t\tif (clear) clear();\n\t\t\tcache = create(null);\n\t\t\tconf.emit(\"clear\", oldCache);\n\t\t},\n\t\ton: function (type, listener) {\n\t\t\tif (type === \"get\") getListeners = true;\n\t\t\telse if (type === \"set\") setListeners = true;\n\t\t\telse if (type === \"delete\") deleteListeners = true;\n\t\t\treturn on.call(this, type, listener);\n\t\t},\n\t\temit: emit,\n\t\tupdateEnv: function () { original = conf.original; },\n\t};\n\tif (get) {\n\t\textDel = defineLength(function (arg) {\n\t\t\tvar id, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id === null) return;\n\t\t\tconf.delete(id);\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\textDel = function () { return conf.delete(\"data\"); };\n\t} else {\n\t\textDel = function (arg) {\n\t\t\tif (resolve) arg = resolve(arguments)[0];\n\t\t\treturn conf.delete(arg);\n\t\t};\n\t}\n\textGet = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return cache.data;\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\treturn cache[id];\n\t});\n\textHas = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return conf.has(\"data\");\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\tif (id === null) return false;\n\t\treturn conf.has(id);\n\t});\n\tdefineProperties(memoized, {\n\t\t__memoized__: d(true),\n\t\tdelete: d(extDel),\n\t\tclear: d(conf.clear),\n\t\t_get: d(extGet),\n\t\t_has: d(extHas),\n\t});\n\treturn conf;\n};\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"./lib/registered-extensions\")\n , configure = require(\"./lib/configure-map\")\n , resolveLength = require(\"./lib/resolve-length\");\n\nmodule.exports = function self(fn/*, options */) {\n\tvar options, length, conf;\n\n\tcallable(fn);\n\toptions = Object(arguments[1]);\n\n\tif (options.async && options.promise) {\n\t\tthrow new Error(\"Options 'async' and 'promise' cannot be used together\");\n\t}\n\n\t// Do not memoize already memoized function\n\tif (hasOwnProperty.call(fn, \"__memoized__\") && !options.force) return fn;\n\n\t// Resolve length;\n\tlength = resolveLength(options.length, fn.length, options.async && extensions.async);\n\n\t// Configure cache map\n\tconf = configure(fn, length, options);\n\n\t// Bind eventual extensions\n\tforEach(extensions, function (extFn, name) {\n\t\tif (options[name]) extFn(options[name], conf, options);\n\t});\n\n\tif (self.__profiler__) self.__profiler__(conf);\n\n\tconf.updateEnv();\n\treturn conf.memoized;\n};\n","\"use strict\";\n\nvar normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , resolveLength = require(\"./lib/resolve-length\")\n , plain = require(\"./plain\");\n\nmodule.exports = function (fn/*, options*/) {\n\tvar options = normalizeOpts(arguments[1]), length;\n\n\tif (!options.normalizer) {\n\t\tlength = options.length = resolveLength(options.length, fn.length, options.async);\n\t\tif (length !== 0) {\n\t\t\tif (options.primitive) {\n\t\t\t\tif (length === false) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/primitive\");\n\t\t\t\t} else if (length > 1) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/get-primitive-fixed\")(length);\n\t\t\t\t}\n\t\t\t} else if (length === false) options.normalizer = require(\"./normalizers/get\")();\n\t\t\telse if (length === 1) options.normalizer = require(\"./normalizers/get-1\")();\n\t\t\telse options.normalizer = require(\"./normalizers/get-fixed\")(length);\n\t\t}\n\t}\n\n\t// Assure extensions\n\tif (options.async) require(\"./ext/async\");\n\tif (options.promise) require(\"./ext/promise\");\n\tif (options.dispose) require(\"./ext/dispose\");\n\tif (options.maxAge) require(\"./ext/max-age\");\n\tif (options.max) require(\"./ext/max\");\n\tif (options.refCounter) require(\"./ext/ref-counter\");\n\n\treturn plain(fn, options);\n};\n","\"use strict\";\n\nmodule.exports = function (args) {\n\tvar id, i, length = args.length;\n\tif (!length) return \"\\u0002\";\n\tid = String(args[(i = 0)]);\n\twhile (--length) id += \"\\u0001\" + args[++i];\n\treturn id;\n};\n","\"use strict\";\n\nmodule.exports = function (length) {\n\tif (!length) {\n\t\treturn function () { return \"\"; };\n\t}\n\treturn function (args) {\n\t\tvar id = String(args[0]), i = 0, currentLength = length;\n\t\twhile (--currentLength) {\n\t\t\tid += \"\\u0001\" + args[++i];\n\t\t}\n\t\treturn id;\n\t};\n};\n","/* eslint max-statements: 0 */\n\n\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nvar create = Object.create;\n\nmodule.exports = function () {\n\tvar lastId = 0, map = [], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) return set[length] || null;\n\t\t\tif ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) return null;\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\treturn set[1][i] || null;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) {\n\t\t\t\tset[length] = ++lastId;\n\t\t\t} else {\n\t\t\t\tif (!set[length]) {\n\t\t\t\t\tset[length] = [[], []];\n\t\t\t\t}\n\t\t\t\tset = set[length];\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t\t}\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t}\n\t\t\t\tset[1][i] = ++lastId;\n\t\t\t}\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, args = cache[id], length = args.length, path = [];\n\t\t\tif (length === 0) {\n\t\t\t\tdelete set[length];\n\t\t\t} else if ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tpath.push(set, i);\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tid = set[1][i];\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\t\ti = path.pop();\n\t\t\t\t\tset = path.pop();\n\t\t\t\t\tset[0].splice(i, 1);\n\t\t\t\t\tset[1].splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nmodule.exports = function () {\n\tvar lastId = 0, argsMap = [], cache = [];\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = indexOf.call(argsMap, args[0]);\n\t\t\treturn index === -1 ? null : cache[index];\n\t\t},\n\t\tset: function (args) {\n\t\t\targsMap.push(args[0]);\n\t\t\tcache.push(++lastId);\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = indexOf.call(cache, id);\n\t\t\tif (index !== -1) {\n\t\t\t\targsMap.splice(index, 1);\n\t\t\t\tcache.splice(index, 1);\n\t\t\t}\n\t\t},\n\t\tclear: function () {\n\t\t\targsMap = [];\n\t\t\tcache = [];\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\")\n , create = Object.create;\n\nmodule.exports = function (length) {\n\tvar lastId = 0, map = [[], []], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) return null;\n\t\t\treturn set[1][i] || null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t}\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t}\n\t\t\tset[1][i] = ++lastId;\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, path = [], args = cache[id];\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpath.push(set, i);\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tid = set[1][i];\n\t\t\tset[0].splice(i, 1);\n\t\t\tset[1].splice(i, 1);\n\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\ti = path.pop();\n\t\t\t\tset = path.pop();\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [[], []];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","/* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n// Support for asynchronous functions\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , objectMap = require(\"es5-ext/object/map\")\n , mixin = require(\"es5-ext/object/mixin\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , nextTick = require(\"next-tick\");\n\nvar slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create;\n\nrequire(\"../lib/registered-extensions\").async = function (tbi, conf) {\n\tvar waiting = create(null)\n\t , cache = create(null)\n\t , base = conf.memoized\n\t , original = conf.original\n\t , currentCallback\n\t , currentContext\n\t , currentArgs;\n\n\t// Initial\n\tconf.memoized = defineLength(function (arg) {\n\t\tvar args = arguments, last = args[args.length - 1];\n\t\tif (typeof last === \"function\") {\n\t\t\tcurrentCallback = last;\n\t\t\targs = slice.call(args, 0, -1);\n\t\t}\n\t\treturn base.apply((currentContext = this), (currentArgs = args));\n\t}, base);\n\ttry { mixin(conf.memoized, base); }\n\tcatch (ignore) {}\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id) {\n\t\tvar cb, context, args;\n\t\tif (!currentCallback) return;\n\n\t\t// Unresolved\n\t\tif (waiting[id]) {\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback];\n\t\t\telse waiting[id].push(currentCallback);\n\t\t\tcurrentCallback = null;\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolved, assure next tick invocation\n\t\tcb = currentCallback;\n\t\tcontext = currentContext;\n\t\targs = currentArgs;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\tnextTick(function () {\n\t\t\tvar data;\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tdata = cache[id];\n\t\t\t\tconf.emit(\"getasync\", id, args, context);\n\t\t\t\tapply.call(cb, data.context, data.args);\n\t\t\t} else {\n\t\t\t\t// Purged in a meantime, we shouldn't rely on cached value, recall\n\t\t\t\tcurrentCallback = cb;\n\t\t\t\tcurrentContext = context;\n\t\t\t\tcurrentArgs = args;\n\t\t\t\tbase.apply(context, args);\n\t\t\t}\n\t\t});\n\t});\n\n\t// Not from cache\n\tconf.original = function () {\n\t\tvar args, cb, origCb, result;\n\t\tif (!currentCallback) return apply.call(original, this, arguments);\n\t\targs = aFrom(arguments);\n\t\tcb = function self(err) {\n\t\t\tvar cb, args, id = self.id;\n\t\t\tif (id == null) {\n\t\t\t\t// Shouldn't happen, means async callback was called sync way\n\t\t\t\tnextTick(apply.bind(self, this, arguments));\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tdelete self.id;\n\t\t\tcb = waiting[id];\n\t\t\tdelete waiting[id];\n\t\t\tif (!cb) {\n\t\t\t\t// Already processed,\n\t\t\t\t// outcome of race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\targs = aFrom(arguments);\n\t\t\tif (conf.has(id)) {\n\t\t\t\tif (err) {\n\t\t\t\t\tconf.delete(id);\n\t\t\t\t} else {\n\t\t\t\t\tcache[id] = { context: this, args: args };\n\t\t\t\t\tconf.emit(\"setasync\", id, typeof cb === \"function\" ? 1 : cb.length);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof cb === \"function\") {\n\t\t\t\tresult = apply.call(cb, this, args);\n\t\t\t} else {\n\t\t\t\tcb.forEach(function (cb) { result = apply.call(cb, this, args); }, this);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\torigCb = currentCallback;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\targs.push(cb);\n\t\tresult = apply.call(original, this, args);\n\t\tcb.cb = origCb;\n\t\tcurrentCallback = cb;\n\t\treturn result;\n\t};\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id) {\n\t\tif (!currentCallback) {\n\t\t\tconf.delete(id);\n\t\t\treturn;\n\t\t}\n\t\tif (waiting[id]) {\n\t\t\t// Race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback.cb];\n\t\t\telse waiting[id].push(currentCallback.cb);\n\t\t} else {\n\t\t\twaiting[id] = currentCallback.cb;\n\t\t}\n\t\tdelete currentCallback.cb;\n\t\tcurrentCallback.id = id;\n\t\tcurrentCallback = null;\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tvar result;\n\t\t// If false, we don't have value yet, so we assume that intention is not\n\t\t// to memoize this call. After value is obtained we don't cache it but\n\t\t// gracefully pass to callback\n\t\tif (hasOwnProperty.call(waiting, id)) return;\n\t\tif (!cache[id]) return;\n\t\tresult = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, slice.call(result.args, 1));\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\tconf.emit(\n\t\t\t\"clearasync\", objectMap(oldCache, function (data) { return slice.call(data.args, 1); })\n\t\t);\n\t});\n};\n","// Call dispose callback on each cache purge\n\n\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"../lib/registered-extensions\")\n , apply = Function.prototype.apply;\n\nextensions.dispose = function (dispose, conf, options) {\n\tvar del;\n\tcallable(dispose);\n\tif ((options.async && extensions.async) || (options.promise && extensions.promise)) {\n\t\tconf.on(\n\t\t\t\"deleteasync\",\n\t\t\t(del = function (id, resultArray) { apply.call(dispose, null, resultArray); })\n\t\t);\n\t\tconf.on(\"clearasync\", function (cache) {\n\t\t\tforEach(cache, function (result, id) { del(id, result); });\n\t\t});\n\t\treturn;\n\t}\n\tconf.on(\"delete\", (del = function (id, result) { dispose(result); }));\n\tconf.on(\"clear\", function (cache) {\n\t\tforEach(cache, function (result, id) { del(id, result); });\n\t});\n};\n","/* eslint consistent-this: 0 */\n\n// Timeout cached values\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , forEach = require(\"es5-ext/object/for-each\")\n , nextTick = require(\"next-tick\")\n , isPromise = require(\"is-promise\")\n , timeout = require(\"timers-ext/valid-timeout\")\n , extensions = require(\"../lib/registered-extensions\");\n\nvar noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create;\n\nextensions.maxAge = function (maxAge, conf, options) {\n\tvar timeouts, postfix, preFetchAge, preFetchTimeouts;\n\n\tmaxAge = timeout(maxAge);\n\tif (!maxAge) return;\n\n\ttimeouts = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\tconf.on(\"set\" + postfix, function (id) {\n\t\ttimeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge);\n\t\tif (typeof timeouts[id].unref === \"function\") timeouts[id].unref();\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id]) {\n\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\t}\n\t\tpreFetchTimeouts[id] = setTimeout(function () {\n\t\t\tdelete preFetchTimeouts[id];\n\t\t}, preFetchAge);\n\t\tif (typeof preFetchTimeouts[id].unref === \"function\") preFetchTimeouts[id].unref();\n\t});\n\tconf.on(\"delete\" + postfix, function (id) {\n\t\tclearTimeout(timeouts[id]);\n\t\tdelete timeouts[id];\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\tdelete preFetchTimeouts[id];\n\t});\n\n\tif (options.preFetch) {\n\t\tif (options.preFetch === true || isNaN(options.preFetch)) {\n\t\t\tpreFetchAge = 0.333;\n\t\t} else {\n\t\t\tpreFetchAge = max(min(Number(options.preFetch), 1), 0);\n\t\t}\n\t\tif (preFetchAge) {\n\t\t\tpreFetchTimeouts = {};\n\t\t\tpreFetchAge = (1 - preFetchAge) * maxAge;\n\t\t\tconf.on(\"get\" + postfix, function (id, args, context) {\n\t\t\t\tif (!preFetchTimeouts[id]) {\n\t\t\t\t\tpreFetchTimeouts[id] = \"nextTick\";\n\t\t\t\t\tnextTick(function () {\n\t\t\t\t\t\tvar result;\n\t\t\t\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") return;\n\t\t\t\t\t\tdelete preFetchTimeouts[id];\n\t\t\t\t\t\tconf.delete(id);\n\t\t\t\t\t\tif (options.async) {\n\t\t\t\t\t\t\targs = aFrom(args);\n\t\t\t\t\t\t\targs.push(noop);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult = conf.memoized.apply(context, args);\n\t\t\t\t\t\tif (options.promise) {\n\t\t\t\t\t\t\t// Supress eventual error warnings\n\t\t\t\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\t\t\t\tif (typeof result.done === \"function\") result.done(noop, noop);\n\t\t\t\t\t\t\t\telse result.then(noop, noop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tconf.on(\"clear\" + postfix, function () {\n\t\tforEach(timeouts, function (id) { clearTimeout(id); });\n\t\ttimeouts = {};\n\t\tif (preFetchTimeouts) {\n\t\t\tforEach(preFetchTimeouts, function (id) { if (id !== \"nextTick\") clearTimeout(id); });\n\t\t\tpreFetchTimeouts = {};\n\t\t}\n\t});\n};\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\")\n , maxTimeout = require(\"./max-timeout\");\n\nmodule.exports = function (value) {\n\tvalue = toPosInt(value);\n\tif (value > maxTimeout) throw new TypeError(value + \" exceeds maximum possible timeout\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = 2147483647;\n","// Limit cache size, LRU (least recently used) algorithm.\n\n\"use strict\";\n\nvar toPosInteger = require(\"es5-ext/number/to-pos-integer\")\n , lruQueue = require(\"lru-queue\")\n , extensions = require(\"../lib/registered-extensions\");\n\nextensions.max = function (max, conf, options) {\n\tvar postfix, queue, hit;\n\n\tmax = toPosInteger(max);\n\tif (!max) return;\n\n\tqueue = lruQueue(max);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\n\t\t\"set\" + postfix,\n\t\t(hit = function (id) {\n\t\t\tid = queue.hit(id);\n\t\t\tif (id === undefined) return;\n\t\t\tconf.delete(id);\n\t\t})\n\t);\n\tconf.on(\"get\" + postfix, hit);\n\tconf.on(\"delete\" + postfix, queue.delete);\n\tconf.on(\"clear\" + postfix, queue.clear);\n};\n","'use strict';\n\nvar toPosInt = require('es5-ext/number/to-pos-integer')\n\n , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;\n\nmodule.exports = function (limit) {\n\tvar size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;\n\tlimit = toPosInt(limit);\n\treturn {\n\t\thit: function (id) {\n\t\t\tvar oldIndex = map[id], nuIndex = ++index;\n\t\t\tqueue[nuIndex] = id;\n\t\t\tmap[id] = nuIndex;\n\t\t\tif (!oldIndex) {\n\t\t\t\t++size;\n\t\t\t\tif (size <= limit) return;\n\t\t\t\tid = queue[base];\n\t\t\t\tdel(id);\n\t\t\t\treturn id;\n\t\t\t}\n\t\t\tdelete queue[oldIndex];\n\t\t\tif (base !== oldIndex) return;\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tdelete: del = function (id) {\n\t\t\tvar oldIndex = map[id];\n\t\t\tif (!oldIndex) return;\n\t\t\tdelete queue[oldIndex];\n\t\t\tdelete map[id];\n\t\t\t--size;\n\t\t\tif (base !== oldIndex) return;\n\t\t\tif (!size) {\n\t\t\t\tindex = 0;\n\t\t\t\tbase = 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tclear: function () {\n\t\t\tsize = 0;\n\t\t\tbase = 1;\n\t\t\tqueue = create(null);\n\t\t\tmap = create(null);\n\t\t\tindex = 0;\n\t\t}\n\t};\n};\n","// Reference counter, useful for garbage collector like functionality\n\n\"use strict\";\n\nvar d = require(\"d\")\n , extensions = require(\"../lib/registered-extensions\")\n , create = Object.create\n , defineProperties = Object.defineProperties;\n\nextensions.refCounter = function (ignore, conf, options) {\n\tvar cache, postfix;\n\n\tcache = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\"set\" + postfix, function (id, length) { cache[id] = length || 1; });\n\tconf.on(\"get\" + postfix, function (id) { ++cache[id]; });\n\tconf.on(\"delete\" + postfix, function (id) { delete cache[id]; });\n\tconf.on(\"clear\" + postfix, function () { cache = {}; });\n\n\tdefineProperties(conf.memoized, {\n\t\tdeleteRef: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return null;\n\t\t\tif (!cache[id]) return null;\n\t\t\tif (!--cache[id]) {\n\t\t\t\tconf.delete(id);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}),\n\t\tgetRefCount: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return 0;\n\t\t\tif (!cache[id]) return 0;\n\t\t\treturn cache[id];\n\t\t}),\n\t});\n};\n","const os = require(\"os\");\r\n\r\n// to detect on with os user had used path.resolve(...)\r\nconst is_posix_os = (os.platform() !== \"win32\");\r\nconst version = os.release();\r\n\r\n// For some windows version (Windows 10 v1803), it is not useful to escape spaces in path\r\n// https://docs.microsoft.com/en-us/windows/release-information/\r\nconst windows_version_regex = /(\\d+\\.\\d+)\\.(\\d+)/;\r\nconst should_not_escape = (major_release = \"\", os_build = \"\") =>\r\n /1\\d+\\.\\d+/.test(major_release) && Number(os_build) >= 17134.1184;\r\n\r\nmodule.exports = function (given_path) {\r\n return (is_posix_os)\r\n // for posix path, escape is simple\r\n ? given_path.replace(/(\\s+)/g, '\\\\$1')\r\n // for windows, it depend of the build\r\n : (should_not_escape(...windows_version_regex.exec(version).splice(1)))\r\n // on major version, no need to escape anymore\r\n // https://support.microsoft.com/en-us/help/4467268/url-encoded-unc-paths-not-url-decoded-in-windows-10-version-1803-later\r\n ? given_path\r\n // on older version, replace space with symbol %20\r\n : given_path.replace(/(\\s+)/g, '%20');\r\n};","// Generated by CoffeeScript 1.10.0\n(function() {\n var regexEscape, reverse;\n\n regexEscape = require('escape-string-regexp');\n\n reverse = function(s) {\n return s.split('').reverse().join('');\n };\n\n module.exports = function(s, chars, escapeChar) {\n var regex;\n if (chars == null) {\n chars = '\\'';\n }\n if (escapeChar == null) {\n escapeChar = '\\\\';\n }\n if (typeof s !== 'string') {\n return s;\n }\n regex = new RegExp(\"([\" + (regexEscape(chars)) + \"])(?!\" + (regexEscape(escapeChar)) + \")\", 'g');\n return reverse(reverse(s).replace(regex, \"$1\" + escapeChar));\n };\n\n}).call(this);\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","(function () {\n\n 'use strict';\n\n var root = this;\n\n\n //=========//\n // GLOBALS //\n //=========//\n\n var locales = {};\n\n\n //==========//\n // EXPOSING //\n //==========//\n\n var moduleDefinition = {\n create: factory,\n addLocale: addLocale,\n pluralize: pluralize\n };\n\n if ('undefined' !== typeof module && 'undefined' !== typeof module.exports) {\n module.exports = moduleDefinition;\n } else {\n root.numerous = moduleDefinition;\n }\n\n\n //==================//\n // PUBLIC FUNCTIONS //\n //==================//\n\n /**\n * Creates new instance of numerous.\n *\n * @param {string} locale\n * @returns {object}\n */\n function factory (locale) {\n\n checkLocale(locale);\n\n return {\n pluralize: function (value, variants) {\n return pluralize(locale, value, variants);\n }\n };\n }\n\n /**\n * Adds pluralization function for specified locale.\n * Usually externally called by locale itself.\n *\n * @param {string} locale\n * @param {function} callable\n */\n function addLocale (locale, callable) {\n locales[locale] = callable;\n }\n\n /**\n * Returns variant from the specified list of variants\n * according to the specified value and locale.\n *\n * @param {string} locale\n * @param {int} value\n * @param {object} variants\n */\n function pluralize (locale, value, variants) {\n\n checkLocale(locale);\n\n if ('object' !== typeof variants) {\n throw new Error('List of variants should be specified as an object');\n }\n\n var key = locales[locale](value);\n\n return ('undefined' !== typeof variants[key] ? variants[key] : null);\n }\n\n\n //===================//\n // PRIVATE FUNCTIONS //\n //===================//\n\n /**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} locale\n *\n * @returns {boolean}\n */\n function hasLocale (locale) {\n return ('undefined' !== typeof locales[locale]);\n }\n\n /**\n * Checks if locale is loaded. If not, tries to load it.\n *\n * @param {string} locale\n */\n function checkLocale (locale) {\n if (!hasLocale(locale)) {\n requireLocale(locale);\n }\n }\n\n /**\n * Tries to load the specified locale.\n *\n * @param {string} locale\n */\n function requireLocale (locale) {\n try {\n require(__dirname + '/../locales/' + locale + '.js');\n } catch (error) {\n throw Error('Failed to load the following locale: ' + locale);\n }\n }\n\n}).call(this);\n","module.exports = require('./lib/numerous.js');\n","(function () {\n var root = this;\n var numerous;\n if ('function' === typeof require) {\n numerous = require('../lib/numerous.js');\n } else {\n numerous = root.numerous;\n }\n numerous.addLocale('en', function pluralize_en(n /*``*/ ) {\n var i = Math.floor(Math.abs(n)),\n v = n.toString().replace(/^[^.]*\\.?/, \"\").length;\n if (typeof n === \"string\") n = parseInt(n, 10);\n if (i === 1 && v === 0) return \"one\";\n return \"other\"\n });\n}).call(this);","// Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md\n'use strict';\n\nexports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node);\n","\nmodule.exports = require('./lib/time-delta.js');\n","module.exports = {\n \"id\": \"en\",\n \"data\": {\n \"long\": {\n \"years\": {\n \"one\": \"{0} year\",\n \"other\": \"{0} years\"\n },\n \"months\": {\n \"one\": \"{0} month\",\n \"other\": \"{0} months\"\n },\n \"weeks\": {\n \"one\": \"{0} week\",\n \"other\": \"{0} weeks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hour\",\n \"other\": \"{0} hours\"\n },\n \"minutes\": {\n \"one\": \"{0} minute\",\n \"other\": \"{0} minutes\"\n },\n \"seconds\": {\n \"one\": \"{0} second\",\n \"other\": \"{0} seconds\"\n }\n },\n \"narrow\": {\n \"years\": {\n \"one\": \"{0}y\",\n \"other\": \"{0}y\"\n },\n \"months\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"weeks\": {\n \"one\": \"{0}w\",\n \"other\": \"{0}w\"\n },\n \"days\": {\n \"one\": \"{0}d\",\n \"other\": \"{0}d\"\n },\n \"hours\": {\n \"one\": \"{0}h\",\n \"other\": \"{0}h\"\n },\n \"minutes\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"seconds\": {\n \"one\": \"{0}s\",\n \"other\": \"{0}s\"\n }\n },\n \"short\": {\n \"years\": {\n \"one\": \"{0} yr\",\n \"other\": \"{0} yrs\"\n },\n \"months\": {\n \"one\": \"{0} mth\",\n \"other\": \"{0} mths\"\n },\n \"weeks\": {\n \"one\": \"{0} wk\",\n \"other\": \"{0} wks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hr\",\n \"other\": \"{0} hr\"\n },\n \"minutes\": {\n \"one\": \"{0} min\",\n \"other\": \"{0} min\"\n },\n \"seconds\": {\n \"one\": \"{0} sec\",\n \"other\": \"{0} sec\"\n }\n }\n }\n};\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","class LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.DownloaderHelper=exports.DH_STATES=void 0;var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},_createClass=function(){function a(a,b){for(var c,d=0;dthis.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=b||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:'getOptions',value:function a(){return this.__opts}},{key:'getMetadata',value:function a(){return this.__opts.metadata}},{key:'getStats',value:function a(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:'getTotalSize',value:function b(){var a=this;return new Promise(function(b,c){var d=function(b){a.__initProtocol(b);var c=Object.assign({},a.__headers);c.hasOwnProperty('range')&&delete c.range;var d=a.__getReqOptions('HEAD',b,c);return Object.assign({},a.__reqOptions,d)},e=function(f,g){var h=a.__protocol.request(g,function(g){if(a.__isRequireRedirect(g)){var h=/^https?:\\/\\//.test(g.headers.location)?g.headers.location:new _url.URL(g.headers.location,f).href;return a.emit('redirected',h,f),e(h,d(h))}return 200===g.statusCode?void b({name:a.__getFileNameFromHeaders(g.headers,g),total:parseInt(g.headers['content-length'])||null}):c(new Error('Response status was '+g.statusCode))});h.on('error',function(a){return c(a)}),h.on('timeout',function(){return c(new Error('timeout'))}),h.on('uncaughtException',function(a){return c(a)}),h.end()};e(a.url,d(a.url))})}},{key:'getResumeState',value:function a(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:'resumeFromFile',value:function d(a){var b=this,c=1=g))return this.emit('skip',{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:f}),this.__setState(this.__states.SKIPPED),b(!0)}this.__fileStream=fs.createWriteStream(this.__filePath,{})}else this.__fileStream=fs.createWriteStream(this.__filePath,{flags:'a'});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,e.on('data',function(a){return d.__calculateStats(a.length)}),this.__pipes.forEach(function(a){e.pipe(a.stream,a.options),e=a.stream}),e.pipe(this.__fileStream),e.on('error',this.__onError(b,c)),this.__fileStream.on('finish',this.__onFinished(b,c)),this.__fileStream.on('error',this.__onError(b,c))}},{key:'__hasFinished',value:function a(){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 b(a){return 300a.statusCode&&a.headers.hasOwnProperty('location')&&a.headers.location}},{key:'__onFinished',value:function d(a,b){var c=this;return function(){c.__fileStream.close(function(d){if(d)return b(d);if(c.__hasFinished()){var e=!!c.__total&&c.__downloaded!==c.__total;if(e&&c.__isResumable&&c.__opts.resumeOnIncomplete&&c.__resumeRetryCount<=c.__opts.resumeOnIncompleteMaxRetry)return c.__resumeRetryCount++,c.emit('warning',new Error('uncomplete download, retrying')),c.resume();c.__setState(c.__states.FINISHED),c.__pipes=[],c.emit('end',{fileName:c.__fileName,filePath:c.__filePath,totalSize:c.__total,incomplete:e,onDiskSize:c.__getFilesizeInBytes(c.__filePath),downloadedSize:c.__downloaded})}return a(c.__downloaded===c.__total)})}}},{key:'__closeFileStream',value:function b(){var a=this;return this.__fileStream?new Promise(function(b,c){a.__fileStream.close(function(a){return a?c(a):b(!0)})}):Promise.resolve(!0)}},{key:'__onError',value:function e(a,b){var c=this,d=!!(2=g?Promise.reject(b||new Error('reached the maximum retries')):(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit('retry',this.__retryCount,this.__opts.retry,b),this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(a){return a.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return new Promise(function(b){return a.__retryTimeout=setTimeout(function(){return b(0this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=b,this.emit('progress.throttled',this.getStats())),this.emit('progress',this.getStats()))}},{key:'__setState',value:function b(a){this.state=a,this.emit('stateChanged',this.state)}},{key:'__getReqOptions',value:function f(a,b){var c=2 validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;\nconst semver = __importStar(require(\"semver\"));\nconst core_1 = require(\"@actions/core\");\n// needs to be require for core node modules to be mocked\n/* eslint @typescript-eslint/no-require-imports: 0 */\nconst os = require(\"os\");\nconst cp = require(\"child_process\");\nconst fs = require(\"fs\");\nfunction _findMatch(versionSpec, stable, candidates, archFilter) {\n return __awaiter(this, void 0, void 0, function* () {\n const platFilter = os.platform();\n let result;\n let match;\n let file;\n for (const candidate of candidates) {\n const version = candidate.version;\n core_1.debug(`check ${version} satisfies ${versionSpec}`);\n if (semver.satisfies(version, versionSpec) &&\n (!stable || candidate.stable === stable)) {\n file = candidate.files.find(item => {\n core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);\n let chk = item.arch === archFilter && item.platform === platFilter;\n if (chk && item.platform_version) {\n const osVersion = module.exports._getOsVersion();\n if (osVersion === item.platform_version) {\n chk = true;\n }\n else {\n chk = semver.satisfies(osVersion, item.platform_version);\n }\n }\n return chk;\n });\n if (file) {\n core_1.debug(`matched ${candidate.version}`);\n match = candidate;\n break;\n }\n }\n }\n if (match && file) {\n // clone since we're mutating the file list to be only the file that matches\n result = Object.assign({}, match);\n result.files = [file];\n }\n return result;\n });\n}\nexports._findMatch = _findMatch;\nfunction _getOsVersion() {\n // TODO: add windows and other linux, arm variants\n // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python)\n const plat = os.platform();\n let version = '';\n if (plat === 'darwin') {\n version = cp.execSync('sw_vers -productVersion').toString();\n }\n else if (plat === 'linux') {\n // lsb_release process not in some containers, readfile\n // Run cat /etc/lsb-release\n // DISTRIB_ID=Ubuntu\n // DISTRIB_RELEASE=18.04\n // DISTRIB_CODENAME=bionic\n // DISTRIB_DESCRIPTION=\"Ubuntu 18.04.4 LTS\"\n const lsbContents = module.exports._readLinuxVersionFile();\n if (lsbContents) {\n const lines = lsbContents.split('\\n');\n for (const line of lines) {\n const parts = line.split('=');\n if (parts.length === 2 &&\n (parts[0].trim() === 'VERSION_ID' ||\n parts[0].trim() === 'DISTRIB_RELEASE')) {\n version = parts[1]\n .trim()\n .replace(/^\"/, '')\n .replace(/\"$/, '');\n break;\n }\n }\n }\n }\n return version;\n}\nexports._getOsVersion = _getOsVersion;\nfunction _readLinuxVersionFile() {\n const lsbReleaseFile = '/etc/lsb-release';\n const osReleaseFile = '/etc/os-release';\n let contents = '';\n if (fs.existsSync(lsbReleaseFile)) {\n contents = fs.readFileSync(lsbReleaseFile).toString();\n }\n else if (fs.existsSync(osReleaseFile)) {\n contents = fs.readFileSync(osReleaseFile).toString();\n }\n return contents;\n}\nexports._readLinuxVersionFile = _readLinuxVersionFile;\n//# sourceMappingURL=manifest.js.map","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RetryHelper = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Internal class for retries\n */\nclass RetryHelper {\n constructor(maxAttempts, minSeconds, maxSeconds) {\n if (maxAttempts < 1) {\n throw new Error('max attempts should be greater than or equal to 1');\n }\n this.maxAttempts = maxAttempts;\n this.minSeconds = Math.floor(minSeconds);\n this.maxSeconds = Math.floor(maxSeconds);\n if (this.minSeconds > this.maxSeconds) {\n throw new Error('min seconds should be less than or equal to max seconds');\n }\n }\n execute(action, isRetryable) {\n return __awaiter(this, void 0, void 0, function* () {\n let attempt = 1;\n while (attempt < this.maxAttempts) {\n // Try\n try {\n return yield action();\n }\n catch (err) {\n if (isRetryable && !isRetryable(err)) {\n throw err;\n }\n core.info(err.message);\n }\n // Sleep\n const seconds = this.getSleepAmount();\n core.info(`Waiting ${seconds} seconds before trying again`);\n yield this.sleep(seconds);\n attempt++;\n }\n // Last attempt\n return yield action();\n });\n }\n getSleepAmount() {\n return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) +\n this.minSeconds);\n }\n sleep(seconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, seconds * 1000));\n });\n }\n}\nexports.RetryHelper = RetryHelper;\n//# sourceMappingURL=retry-helper.js.map","import { mkdir, mkdirSync, stat, statSync, } from 'fs';\nexport const optsArg = (opts) => {\n if (!opts) {\n opts = { mode: 0o777 };\n }\n else if (typeof opts === 'object') {\n opts = { mode: 0o777, ...opts };\n }\n else if (typeof opts === 'number') {\n opts = { mode: opts };\n }\n else if (typeof opts === 'string') {\n opts = { mode: parseInt(opts, 8) };\n }\n else {\n throw new TypeError('invalid options argument');\n }\n const resolved = opts;\n const optsFs = opts.fs || {};\n opts.mkdir = opts.mkdir || optsFs.mkdir || mkdir;\n opts.mkdirAsync = opts.mkdirAsync\n ? opts.mkdirAsync\n : async (path, options) => {\n return new Promise((res, rej) => resolved.mkdir(path, options, (er, made) => er ? rej(er) : res(made)));\n };\n opts.stat = opts.stat || optsFs.stat || stat;\n opts.statAsync = opts.statAsync\n ? opts.statAsync\n : async (path) => new Promise((res, rej) => resolved.stat(path, (err, stats) => (err ? rej(err) : res(stats))));\n opts.statSync = opts.statSync || optsFs.statSync || statSync;\n opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || mkdirSync;\n return resolved;\n};\n//# sourceMappingURL=opts-arg.js.map","import { dirname } from 'path';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpManualSync = (path, options, made) => {\n const parent = dirname(path);\n const opts = { ...optsArg(options), recursive: false };\n if (parent === path) {\n try {\n return opts.mkdirSync(path, opts);\n }\n catch (er) {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n return;\n }\n }\n try {\n opts.mkdirSync(path, opts);\n return made || path;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') {\n throw er;\n }\n try {\n if (!opts.statSync(path).isDirectory())\n throw er;\n }\n catch (_) {\n throw er;\n }\n }\n};\nexport const mkdirpManual = Object.assign(async (path, options, made) => {\n const opts = optsArg(options);\n opts.recursive = false;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirAsync(path, opts).catch(er => {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n });\n }\n return opts.mkdirAsync(path, opts).then(() => made || path, async (er) => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(parent, opts).then((made) => mkdirpManual(path, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer.code !== 'EROFS') {\n throw er;\n }\n return opts.statAsync(path).then(st => {\n if (st.isDirectory()) {\n return made;\n }\n else {\n throw er;\n }\n }, () => {\n throw er;\n });\n });\n}, { sync: mkdirpManualSync });\n//# sourceMappingURL=mkdirp-manual.js.map","import { dirname } from 'path';\nexport const findMade = async (opts, parent, path) => {\n // we never want the 'made' return value to be a root directory\n if (path === parent) {\n return;\n }\n return opts.statAsync(parent).then(st => (st.isDirectory() ? path : undefined), // will fail later\n // will fail later\n er => {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMade(opts, dirname(parent), parent)\n : undefined;\n });\n};\nexport const findMadeSync = (opts, parent, path) => {\n if (path === parent) {\n return undefined;\n }\n try {\n return opts.statSync(parent).isDirectory() ? path : undefined;\n }\n catch (er) {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMadeSync(opts, dirname(parent), parent)\n : undefined;\n }\n};\n//# sourceMappingURL=find-made.js.map","import { dirname } from 'path';\nimport { findMade, findMadeSync } from './find-made.js';\nimport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpNativeSync = (path, options) => {\n const opts = optsArg(options);\n opts.recursive = true;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirSync(path, opts);\n }\n const made = findMadeSync(opts, path);\n try {\n opts.mkdirSync(path, opts);\n return made;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts);\n }\n else {\n throw er;\n }\n }\n};\nexport const mkdirpNative = Object.assign(async (path, options) => {\n const opts = { ...optsArg(options), recursive: true };\n const parent = dirname(path);\n if (parent === path) {\n return await opts.mkdirAsync(path, opts);\n }\n return findMade(opts, path).then((made) => opts\n .mkdirAsync(path, opts)\n .then(m => made || m)\n .catch(er => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(path, opts);\n }\n else {\n throw er;\n }\n }));\n}, { sync: mkdirpNativeSync });\n//# sourceMappingURL=mkdirp-native.js.map","const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;\nimport { parse, resolve } from 'path';\nexport const pathArg = (path) => {\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n throw Object.assign(new TypeError('path must be a string without null bytes'), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n });\n }\n path = resolve(path);\n if (platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/;\n const { root } = parse(path);\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n });\n }\n }\n return path;\n};\n//# sourceMappingURL=path-arg.js.map","import { mkdir, mkdirSync } from 'fs';\nimport { optsArg } from './opts-arg.js';\nconst version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version;\nconst versArr = version.replace(/^v/, '').split('.');\nconst hasNative = +versArr[0] > 10 || (+versArr[0] === 10 && +versArr[1] >= 12);\nexport const useNativeSync = !hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdirSync === mkdirSync;\nexport const useNative = Object.assign(!hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdir === mkdir, {\n sync: useNativeSync,\n});\n//# sourceMappingURL=use-native.js.map","import { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nimport { optsArg } from './opts-arg.js';\nimport { pathArg } from './path-arg.js';\nimport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore start */\nexport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nexport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nexport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore stop */\nexport const mkdirpSync = (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNativeSync(resolved)\n ? mkdirpNativeSync(path, resolved)\n : mkdirpManualSync(path, resolved);\n};\nexport const sync = mkdirpSync;\nexport const manual = mkdirpManual;\nexport const manualSync = mkdirpManualSync;\nexport const native = mkdirpNative;\nexport const nativeSync = mkdirpNativeSync;\nexport const mkdirp = Object.assign(async (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNative(resolved)\n ? mkdirpNative(path, resolved)\n : mkdirpManual(path, resolved);\n}, {\n mkdirpSync,\n mkdirpNative,\n mkdirpNativeSync,\n mkdirpManual,\n mkdirpManualSync,\n sync: mkdirpSync,\n native: mkdirpNative,\n nativeSync: mkdirpNativeSync,\n manual: mkdirpManual,\n manualSync: mkdirpManualSync,\n useNative,\n useNativeSync,\n});\n//# sourceMappingURL=index.js.map","import { isArch } from \"../utils/env/isArch.js\"\n\nconst defaultLLVM = process.platform === \"darwin\" && process.arch === \"x64\"\n ? \"15.0.7\"\n : \"18.1.8\"\n\n/**\n * Default versions for the tools\n * DefaultUbuntuVersion overrides the default version for the tools on Ubuntu\n */\nexport const DefaultVersions: Record = {\n // https://github.com/llvm/llvm-project/releases\n llvm: defaultLLVM,\n clangtidy: defaultLLVM,\n clangformat: defaultLLVM,\n ninja: \"1.12.1\", // https://github.com/ninja-build/ninja/releases\n cmake: \"3.30.2\", // https://github.com/Kitware/CMake/releases\n gcovr: \"5.2\", // \"6.0\", // https://pypi.org/project/gcovr/\n conan: \"1.64.1\", // 2.0.17 // https://github.com/conan-io/conan/releases\n meson: \"1.5.1\", // https://github.com/mesonbuild/meson/releases\n kcov: \"42\", // https://github.com/SimonKagstrom/kcov/releases\n task: \"3.38.0\", // https://github.com/go-task/task/releases\n doxygen: isArch() ? \"1.11.0-4\" : \"1.11.0\", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/\n gcc: process.platform === \"win32\"\n ? \"14.2.0posix-18.1.8-12.0.0-ucrt-r1\"\n : \"\", // use the default version on Ubuntu, Fedora, Arch, macOS, etc.\n // mingw: isArch() ? \"12.2.0-1\" : \"8\", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/\n powershell: \"7.4.5\",\n}\n\nexport const MinVersions: Record = {\n pip: \"22.2.0\",\n python: \"3.7.9\",\n}\n\n/// If an ubuntu versions is not in this map:\n// - the newer ubuntu versions use the first entry (e.g. v20),\n// - the older ones use \"\"\nexport const DefaultUbuntuVersion: Record | undefined> = {\n // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64\n mingw: {\n 24: \"8.0.0-1\",\n 22: \"8.0.0-1\",\n 20: \"7.0.0-2\",\n },\n gcovr: {\n 24: \"6.0\",\n 22: \"6.0\",\n 20: \"6.0\",\n 18: \"5.0\",\n },\n meson: {\n 24: \"1.0.0\",\n 22: \"1.0.0\",\n 20: \"1.0.0\",\n 18: \"0.61.4\",\n },\n nala: {\n 24: \"\",\n 22: \"\",\n 21: \"legacy\",\n 20: \"legacy\",\n 18: \"legacy\",\n 16: \"legacy\",\n 14: \"legacy\",\n },\n kcov: {\n 24: \"42-binary\",\n 22: \"42-binary\",\n 20: \"40-binary\", // https://github.com/SimonKagstrom/kcov/releases\n 18: \"40\",\n 16: \"40\",\n 14: \"40\",\n },\n doxygen: {\n 24: \"1.11.0\",\n 22: \"1.11.0\",\n 20: \"1.10.0\",\n 18: \"1.10.0\",\n },\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUbuntuVersion = void 0;\nconst child_process_1 = require(\"child_process\");\nfunction isSystemError(e) {\n return 'errno' in e;\n}\nfunction command(exe, args) {\n return new Promise((resolve, reject) => {\n child_process_1.execFile(exe, args, { encoding: 'utf8', shell: false }, (error, stdout, stderr) => {\n if (error) {\n if (isSystemError(error) && error.code === 'ENOENT') {\n resolve(null); // When lsb_release is not found\n return;\n }\n reject(new Error(`Could not execute \\`${exe} ${args.join(' ')}\\`: ${error} (stderr=${stderr})`));\n return;\n }\n resolve(stdout);\n });\n });\n}\nasync function getUbuntuVersion() {\n if (process.platform !== 'linux') {\n return [];\n }\n const stdout = await command('lsb_release', ['-a']);\n if (stdout === null) {\n return [];\n }\n const reDistributor = /^Distributor ID:\\s*(.+)$/;\n const reDescription = /^Description:\\s*Ubuntu\\s+(\\d+)\\.(\\d+)(?:\\.(\\d+))?/;\n const reRelease = /^Release:\\s*(\\d+)\\.(\\d+)(?:\\.(\\d+))?$/;\n let description = null;\n let release = null;\n let distributorFound = false;\n for (const line of stdout.split('\\n')) {\n const m = line.match(reDistributor);\n if (m !== null) {\n const distributor = m[1];\n if (distributor !== 'Ubuntu') {\n return [];\n }\n distributorFound = true;\n }\n const desc = line.match(reDescription);\n if (desc) {\n description = desc;\n }\n const rel = line.match(reRelease);\n if (rel) {\n release = rel;\n }\n if (distributorFound && description && release) {\n break;\n }\n }\n if (!distributorFound) {\n return [];\n }\n for (const m of [description, release]) {\n if (m) {\n const ss = [m[1], m[2]];\n if (m[3]) {\n ss.push(m[3]);\n }\n return ss.map(s => parseInt(s, 10));\n }\n }\n return [];\n}\nexports.getUbuntuVersion = getUbuntuVersion;\n//# sourceMappingURL=index.js.map","import os from 'node:os';\n\nconst nameMap = new Map([\n\t[24, ['Sequoia', '15']],\n\t[23, ['Sonoma', '14']],\n\t[22, ['Ventura', '13']],\n\t[21, ['Monterey', '12']],\n\t[20, ['Big Sur', '11']],\n\t[19, ['Catalina', '10.15']],\n\t[18, ['Mojave', '10.14']],\n\t[17, ['High Sierra', '10.13']],\n\t[16, ['Sierra', '10.12']],\n\t[15, ['El Capitan', '10.11']],\n\t[14, ['Yosemite', '10.10']],\n\t[13, ['Mavericks', '10.9']],\n\t[12, ['Mountain Lion', '10.8']],\n\t[11, ['Lion', '10.7']],\n\t[10, ['Snow Leopard', '10.6']],\n\t[9, ['Leopard', '10.5']],\n\t[8, ['Tiger', '10.4']],\n\t[7, ['Panther', '10.3']],\n\t[6, ['Jaguar', '10.2']],\n\t[5, ['Puma', '10.1']],\n]);\n\nexport default function macosRelease(release) {\n\trelease = Number((release || os.release()).split('.')[0]);\n\n\tconst [name, version] = nameMap.get(release) || ['Unknown', ''];\n\n\treturn {\n\t\tname,\n\t\tversion,\n\t};\n}\n","import macosRelease from \"macos-release\"\nimport memoize from \"memoizee\"\n\n/**\n * Get macOS version\n *\n * @returns {number[]} - The macOS version as an array of numbers\n */\nfunction macosVersion_() {\n if (process.platform !== \"darwin\") {\n return []\n }\n\n const { version } = macosRelease()\n return version.split(\".\").map((v) => Number.parseInt(v, 10))\n}\nexport const macosVersion = memoize(macosVersion_)\n","import { tmpdir } from \"os\"\nimport { dirname, join } from \"path\"\nimport { execRootSync } from \"admina\"\nimport { error, info } from \"ci-log\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { hasNala, installAptPack, qualifiedNeededAptPackage } from \"setup-apt\"\nimport which from \"which\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\n\nlet binDir: string | undefined\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupNala(version: string, _setupDir: string, _arch: string) {\n if (!isUbuntu()) {\n return undefined\n }\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"nala\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n await installAptPack([{ name: \"python3-apt\" }])\n\n binDir = \"/usr/bin\" // eslint-disable-line require-atomic-updates\n\n // If nala is available in the default repositories, install it\n try {\n const nalaPack = await qualifiedNeededAptPackage({ name: \"nala\", version })\n if (nalaPack !== undefined) {\n await installAptPack([{ name: nalaPack }])\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala: ${err}`)\n }\n\n // Nala is not available in the default repositories\n // Check if the legacy version is available\n try {\n const nalaLegacyPack = await qualifiedNeededAptPackage({ name: \"nala-legacy\" })\n if (nalaLegacyPack !== undefined) {\n await installAptPack([{ name: nalaLegacyPack }], true)\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala-legacy: ${err}`)\n }\n\n // Install via the installer script\n await setupNalaViaInstaller()\n\n return { binDir }\n}\n\nasync function setupNalaViaInstaller() {\n const installer = new DownloaderHelper(\n \"https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh\",\n tmpdir(),\n { fileName: \"install-nala.sh\" },\n )\n installer.on(\"error\", (err) => {\n throw new Error(`Failed to download install-nala.sh: ${err}`)\n })\n await installer.start()\n\n const installerPath = join(tmpdir(), \"install-nala.sh\")\n\n // Patch the installer script to not use sudo explicitly\n const script = await readFile(installerPath, \"utf8\")\n await writeFile(installerPath, script.replace(/sudo/g, \"\"))\n\n await installAptPack([{ name: \"wget\" }])\n\n try {\n execRootSync(\"bash\", [installerPath])\n } catch (err) {\n error(`Failed to install nala via installer: ${err}`)\n execRootSync(\"apt\", [\"install\", \"-y\", \"-t\", \"nala\", \"nala\"])\n }\n}\n\nexport function bashWithNala(script: string) {\n if (hasNala()) {\n return `apt-get() { nala $@; }; export -f apt-get; ${script}; unset -f apt-get`\n }\n return script\n}\n","import { dirname, join } from \"path\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport { addShExt, addShRelativePrefix } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\nlet hasVCPKG = false\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupVcpkg(version: string, setupDir: string, _arch: string): Promise {\n if (!hasVCPKG || which.sync(\"vcpkg\", { nothrow: true }) === null) {\n if (process.platform === \"linux\") {\n // vcpkg download and extraction dependencies\n if (isArch()) {\n await Promise.all([\n setupPacmanPack(\"curl\"),\n setupPacmanPack(\"zip\"),\n setupPacmanPack(\"unzip\"),\n setupPacmanPack(\"tar\"),\n setupPacmanPack(\"git\"),\n setupPacmanPack(\"pkg-config\"),\n ])\n } else if (hasDnf()) {\n await setupDnfPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n } else if (isUbuntu()) {\n await installAptPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n }\n }\n\n // clone if not already exists\n if (!(await pathExists(join(setupDir, addShExt(\"bootstrap-vcpkg\", \".bat\"))))) {\n execaSync(\"git\", [\"clone\", \"https://github.com/microsoft/vcpkg\"], { cwd: dirname(setupDir), stdio: \"inherit\" })\n } else {\n notice(`Vcpkg folder already exists at ${setupDir}. Skipping the clone`)\n }\n\n // if version specified, checkout the version\n if (version !== \"\" && version !== \"true\") {\n info(`Checking out vcpkg version ${version}`)\n execaSync(\"git\", [\"checkout\", version], {\n cwd: setupDir,\n stdio: \"inherit\",\n })\n }\n\n // bootstrap vcpkg\n execaSync(addShExt(addShRelativePrefix(\"bootstrap-vcpkg\"), \".bat\"), {\n cwd: setupDir,\n shell: true,\n stdio: \"inherit\",\n })\n\n await grantUserWriteAccess(setupDir)\n\n await addPath(setupDir, rcOptions)\n // eslint-disable-next-line require-atomic-updates\n hasVCPKG = true\n return { binDir: setupDir }\n }\n\n return { binDir: dirname(which.sync(\"vcpkg\")) }\n}\n","import { setupBrew } from \"setup-brew\"\nimport { setupBazel } from \"./bazel/bazel.js\"\nimport { setupCcache } from \"./ccache/ccache.js\"\nimport { setupChocolatey } from \"./chocolatey/chocolatey.js\"\nimport { setupCmake } from \"./cmake/cmake.js\"\nimport { setupConan } from \"./conan/conan.js\"\nimport { setupCppcheck } from \"./cppcheck/cppcheck.js\"\nimport { setupDoxygen } from \"./doxygen/doxygen.js\"\nimport { setupGcc } from \"./gcc/gcc.js\"\nimport { setupGcovr } from \"./gcovr/gcovr.js\"\nimport { setupGraphviz } from \"./graphviz/graphviz.js\"\nimport { setupKcov } from \"./kcov/kcov.js\"\nimport { setupClangFormat, setupClangTools, setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMake } from \"./make/make.js\"\nimport { setupMeson } from \"./meson/meson.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { setupNala } from \"./nala/nala.js\"\nimport { setupNinja } from \"./ninja/ninja.js\"\nimport { setupOpencppcoverage } from \"./opencppcoverage/opencppcoverage.js\"\nimport { setupPowershell } from \"./powershell/powershell.js\"\nimport { setupPython } from \"./python/python.js\"\nimport { setupSccache } from \"./sccache/sccache.js\"\nimport { setupSevenZip } from \"./sevenzip/sevenzip.js\"\nimport { setupTask } from \"./task/task.js\"\nimport { setupVcpkg } from \"./vcpkg/vcpkg.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\n\n/** The setup functions */\nexport const setups = {\n nala: setupNala,\n cmake: setupCmake,\n ninja: setupNinja,\n python: setupPython,\n vcpkg: setupVcpkg,\n bazel: setupBazel,\n conan: setupConan,\n meson: setupMeson,\n gcovr: setupGcovr,\n opencppcoverage: setupOpencppcoverage,\n llvm: setupLLVM,\n gcc: setupGcc,\n choco: setupChocolatey,\n brew: setupBrew,\n powershell: setupPowershell,\n ccache: setupCcache,\n sccache: setupSccache,\n doxygen: setupDoxygen,\n graphviz: setupGraphviz,\n cppcheck: setupCppcheck,\n clangtidy: setupClangTools,\n clangformat: setupClangFormat,\n msvc: setupMSVC,\n vcvarsall: setupVCVarsall,\n kcov: setupKcov,\n make: setupMake,\n task: setupTask,\n sevenzip: setupSevenZip,\n}\n\nexport type ToolName = keyof typeof setups\n\n/** The tools that can be installed */\nexport const tools = Object.keys(setups) as Array\n\n/** The possible inputs to the program */\nexport type Inputs = keyof typeof setups | \"compiler\" | \"architecture\" | \"timeout\"\n\n/** An array of possible inputs */\nexport const inputs: Array = [\"compiler\", \"architecture\", \"timeout\", ...tools]\n","import { execRootSync } from \"admina\"\nimport { addAptKeyViaURL, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupBazel(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // install bazelisk because it contains both\n return setupChocoPack(\"bazelisk\", version)\n }\n case \"darwin\": {\n // install bazelisk because it contains both\n return installBrewPack(\"bazelisk\", version)\n }\n case \"linux\": {\n if (isArch()) {\n throw new Error(\"installing bazel on Arch linux is not supported yet\")\n } else if (hasDnf()) {\n // https://bazel.build/install/redhat\n await setupDnfPack([{ name: \"dnf-plugins-core\" }])\n execRootSync(\"dnf\", [\"copr\", \"enable\", \"vbatts/bazel\"])\n return setupDnfPack([{ name: \"bazel4\" }])\n } else if (isUbuntu()) {\n // https://bazel.build/install/ubuntu\n const keyFileName = await addAptKeyViaURL({\n fileName: \"bazel-archive-keyring.gpg\",\n keyUrl: \"https://bazel.build/bazel-release.pub.gpg\",\n })\n execRootSync(\"bash\", [\n \"-c\",\n `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://storage.googleapis.com/bazel-apt stable jdk1.8\" | tee /etc/apt/sources.list.d/bazel.list`,\n ])\n return installAptPack([{ name: \"bazel\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupConan(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"conan\", version)\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupMeson(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"meson\", version)\n}\n","import { addEnv } from \"envosman\"\nimport semverMajor from \"semver/functions/major\"\nimport semverValid from \"semver/functions/valid\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupGcovr(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"gcovr\", version)\n}\n\nexport function activateGcovLLVM() {\n return addEnv(\"GCOV\", \"llvm-cov gcov\", rcOptions)\n}\n\nexport function activateGcovGCC(gccVersion: string) {\n const gccSemver = semverValid(gccVersion)\n const gccMajor = gccSemver !== null ? semverMajor(gccSemver) : gccVersion\n const gcov = gccMajor !== \"\" ? `gcov-${gccMajor}` : \"gcov\"\n\n return addEnv(\"GCOV\", gcov, rcOptions)\n}\n","import { addPath } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupOpencppcoverage(version: string | undefined, _setupDir: string, _arch: string) {\n if (process.platform !== \"win32\") {\n return\n }\n await setupChocoPack(\"opencppcoverage\", version)\n const binDir = await activateOpencppcoverage()\n return { binDir }\n}\n\nasync function activateOpencppcoverage() {\n const binDir = \"C:/Program Files/OpenCppCoverage\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupCcache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"ccache\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"ccache\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"ccache\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"ccache\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { installBrewPack } from \"setup-brew\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSccache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"sccache\", version)\n }\n case \"linux\":\n case \"darwin\": {\n return installBrewPack(\"sccache\", version)\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupCppcheck(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"cppcheck\", version)\n const binDir = await activateWinCppcheck()\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"cppcheck\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"cppcheck\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"cppcheck\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinCppcheck() {\n const binDir = \"C:/Program Files/Cppcheck\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { join } from \"path\"\nimport { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { getBrewDir, installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMake(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"make\", version)\n }\n case \"darwin\": {\n await installBrewPack(\"make\", version)\n\n const gnuBinDir = join(getBrewDir(), \"opt/make/libexec/gnubin\")\n await addPath(gnuBinDir, rcOptions)\n return { binDir: gnuBinDir }\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"make\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"make\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"make\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","#!/usr/bin/env node\n/* eslint-disable node/shebang */\n\nimport { GITHUB_ACTIONS, isCI } from \"ci-info\"\nimport { error, info, success, warning } from \"ci-log\"\nimport { finalizeRC } from \"envosman\"\nimport * as numerous from \"numerous\"\nimport numerousLocale from \"numerous/locales/en.js\"\nimport * as timeDelta from \"time-delta\"\nimport timeDeltaLocale from \"time-delta/locales/en.js\"\nimport { untildifyUser } from \"untildify-user\"\nimport { checkUpdates } from \"./check-updates.js\"\nimport { parseArgs, printHelp, rcOptions } from \"./cli-options.js\"\nimport { installCompiler } from \"./compilers.js\"\nimport { installTool } from \"./installTool.js\"\nimport { tools } from \"./tool.js\"\nimport { isArch } from \"./utils/env/isArch.js\"\nimport { ubuntuVersion } from \"./utils/env/ubuntu_version.js\"\nimport { setupPacmanPack } from \"./utils/setup/setupPacmanPack.js\"\nimport { syncVersions } from \"./versions/versions.js\"\n\n/** The main entry function */\nasync function main(args: string[]): Promise {\n let checkUpdatePromise = Promise.resolve()\n if (!GITHUB_ACTIONS) {\n checkUpdatePromise = checkUpdates()\n process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS = \"true\"\n }\n\n // parse options using mri or github actions\n const opts = parseArgs(args)\n\n // print help\n if (opts.help) {\n printHelp()\n }\n\n // cpu architecture\n const arch = opts.architecture ?? process.arch\n\n // the installation dir for the tools that are downloaded directly\n const setupCppDir = process.env.SETUP_CPP_DIR ?? untildifyUser(\"~\")\n\n // report messages\n const successMessages: string[] = []\n const errorMessages: string[] = []\n\n const timeFormatter = timeDelta.create({ autoloadLocales: true })\n timeDelta.addLocale(timeDeltaLocale as timeDelta.Locale)\n numerous.addLocale(numerousLocale as numerous.Locale)\n let time1: number\n let time2: number\n\n // installing the specified tools\n\n const osVersion = await ubuntuVersion()\n\n // sync the version for the llvm tools\n if (!syncVersions(opts, [\"llvm\", \"clangtidy\", \"clangformat\"])) {\n error(\"The same version must be used for llvm, clangformat and clangtidy\")\n return 1\n }\n\n if (isArch() && typeof opts.cppcheck === \"string\" && typeof opts.gcovr === \"string\") {\n info(\"installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux\")\n await setupPacmanPack(\"python-pygments\")\n }\n\n // loop over the tools and run their setup function\n\n let failedFast = false\n for (const tool of tools) {\n // fail fast inside CI when any tool fails\n if (isCI) {\n if (errorMessages.length !== 0) {\n failedFast = true\n break\n }\n }\n\n // get the version or \"true\" or undefined for this tool from the options\n const version = opts[tool]\n\n // skip if undefined\n if (version !== undefined) {\n // running the setup function for this tool\n time1 = Date.now()\n // eslint-disable-next-line no-await-in-loop\n await installTool(\n tool,\n version,\n osVersion,\n arch,\n setupCppDir,\n successMessages,\n errorMessages,\n Number.parseFloat(opts.timeout ?? \"20\") * 60 * 1000,\n )\n time2 = Date.now()\n info(`took ${timeFormatter.format(time1, time2) || \"0 seconds\"}`)\n }\n }\n\n if (!failedFast) {\n // installing the specified compiler\n const maybeCompiler = opts.compiler\n if (maybeCompiler !== undefined) {\n const time1Compiler = Date.now()\n await installCompiler(maybeCompiler, osVersion, setupCppDir, arch, successMessages, errorMessages)\n const time2Compiler = Date.now()\n info(`took ${timeFormatter.format(time1Compiler, time2Compiler) || \"0 seconds\"}`)\n }\n }\n\n await finalizeRC(rcOptions)\n\n if (successMessages.length === 0 && errorMessages.length === 0) {\n warning(\"setup-cpp was called without any arguments. Nothing to do.\")\n return 0\n }\n\n // report the messages in the end\n for (const tool of successMessages) {\n success(tool)\n }\n for (const tool of errorMessages) {\n error(tool)\n }\n\n info(\"setup-cpp finished\")\n\n if (!GITHUB_ACTIONS) {\n switch (process.platform) {\n case \"win32\": {\n warning(\"Run `RefreshEnv.cmd` or restart your shell to update the environment.\")\n break\n }\n case \"linux\":\n case \"darwin\": {\n warning(\"Run `source ~/.cpprc` or restart your shell to update the environment.\")\n break\n }\n default: {\n // nothing\n }\n }\n }\n\n await checkUpdatePromise\n\n return errorMessages.length === 0 ? 0 : 1 // exit with non-zero if any error message\n}\n\n// Run main\nmain(process.argv)\n .then((ret) => {\n process.exitCode = ret\n })\n .catch((err) => {\n error(\"main() panicked!\")\n error(err as string | Error)\n process.exitCode = 1\n })\n","import { warning } from \"ci-log\"\nimport updateNotifier from \"simple-update-notifier\"\nimport packageJson from \"../package-version.json\"\n\n// auto self update notifier\nexport async function checkUpdates() {\n try {\n await updateNotifier({ pkg: packageJson })\n } catch (err) {\n warning(`Failed to check for updates: ${err instanceof Error ? err.message + err.stack : err}`)\n }\n}\n","import { join } from \"path\"\nimport { endGroup, notice, startGroup } from \"@actions/core\"\nimport { error, info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport semverValid from \"semver/functions/valid\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { activateGcovGCC, activateGcovLLVM } from \"./gcovr/gcovr.js\"\nimport { setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\n/** Detecting the compiler version. Divide the given string by `-` and use the second element as the version */\nexport function getCompilerInfo(compilerAndVersion: string) {\n const compilerAndMaybeVersion = compilerAndVersion.split(\"-\")\n const compiler = compilerAndMaybeVersion[0]\n if (1 in compilerAndMaybeVersion) {\n const maybeVersion = compilerAndMaybeVersion[1]\n if (semverValid(maybeVersion) !== null) {\n return { compiler, version: maybeVersion }\n } else {\n info(`Invalid semver version ${maybeVersion} used for the compiler.`)\n return { compiler, version: maybeVersion }\n }\n }\n return { compiler, version: undefined }\n}\n\n/** Installing the specified compiler */\nexport async function installCompiler(\n compilerAndVersion: string,\n osVersion: number[] | null,\n setupCppDir: string,\n arch: string,\n successMessages: string[],\n errorMessages: string[],\n) {\n try {\n const { compiler, version } = getCompilerInfo(compilerAndVersion)\n\n // install the compiler. We allow some aliases for the compiler name\n startGroup(`Installing ${compiler} ${version ?? \"\"}`)\n switch (compiler) {\n case \"llvm\":\n case \"clang\":\n case \"clang++\": {\n const installationInfo = await setupLLVM(\n getVersion(\"llvm\", version, osVersion),\n join(setupCppDir, \"llvm\"),\n arch,\n )\n\n await activateGcovLLVM()\n\n successMessages.push(getSuccessMessage(\"llvm\", installationInfo))\n break\n }\n case \"gcc\":\n case \"mingw\":\n case \"cygwin\":\n case \"msys\": {\n const gccVersion = compiler === \"mingw\"\n ? getVersion(\"mingw\", version, osVersion)\n : getVersion(\"gcc\", version, osVersion)\n const installationInfo = compiler === \"mingw\"\n ? await setupMingw(gccVersion, join(setupCppDir, \"gcc\"), arch)\n : await setupGcc(gccVersion, join(setupCppDir, \"gcc\"), arch)\n\n await activateGcovGCC(gccVersion)\n\n successMessages.push(getSuccessMessage(\"gcc\", installationInfo))\n break\n }\n case \"cl\":\n case \"msvc\":\n case \"msbuild\":\n case \"vs\":\n case \"visualstudio\":\n case \"visualcpp\":\n case \"visualc++\": {\n const installationInfo = await setupMSVC(\n getVersion(\"msvc\", version, osVersion),\n join(setupCppDir, \"msvc\"),\n arch,\n )\n\n successMessages.push(getSuccessMessage(\"msvc\", installationInfo))\n break\n }\n case \"appleclang\":\n case \"applellvm\": {\n notice(\"Assuming apple-clang is already installed\")\n await Promise.all([addEnv(\"CC\", \"clang\", rcOptions), addEnv(\"CXX\", \"clang++\", rcOptions)])\n successMessages.push(getSuccessMessage(\"apple-clang\", undefined))\n break\n }\n default: {\n errorMessages.push(`Unsupported compiler ${compiler}`)\n }\n }\n } catch (err) {\n error(err as string | Error)\n errorMessages.push(`Failed to install the ${compilerAndVersion}`)\n }\n\n endGroup()\n}\n"],"names":["issueCommand","command","properties","message","cmd","Command","process","stdout","write","os","EOL","rng","poolPtr","rnds8Pool","length","crypto","randomFillSync","slice","validate","uuid","REGEX","test","stringify","arr","offset","byteToHex","toLowerCase","TypeError","parse","v","Uint8Array","parseInt","v35","name","version","hashfunc","generateUUID","value","namespace","buf","str","unescape","encodeURIComponent","bytes","i","push","charCodeAt","stringToBytes","set","err","DNS","URL","getProxyUrl","reqUrl","usingSsl","protocol","checkBypass","hostname","isLoopbackAddress","host","hostLower","startsWith","noProxy","env","reqPort","port","Number","upperReqHosts","toUpperCase","upperNoProxyItem","split","map","x","trim","filter","some","endsWith","undefined","proxyVar","DecodedURL","TunnelingAgent","options","self","this","proxyOptions","proxy","maxSockets","http","Agent","defaultMaxSockets","requests","sockets","on","socket","localAddress","toOptions","len","pending","splice","request","onSocket","destroy","removeSocket","createSecureSocket","cb","prototype","createSocket","call","hostHeader","getHeader","tlsOptions","mergeOptions","servername","replace","secureSocket","tls","connect","indexOf","target","arguments","overrides","j","keys","Object","keyLen","k","os_1","require","fs_1","access","appendFile","writeFile","promises","exports","_summary","constructor","_buffer","filePath","_filePath","pathFromEnv","SUMMARY_ENV_VAR","Error","constants","R_OK","W_OK","_a","wrap","tag","content","attrs","htmlAttrs","entries","key","join","overwrite","writeFunc","encoding","emptyBuffer","clear","isEmptyBuffer","addRaw","text","addEOL","addCodeBlock","code","lang","assign","element","addList","items","ordered","listItems","item","addTable","rows","tableBody","row","cells","cell","header","data","colspan","rowspan","addDetails","label","addImage","src","alt","width","height","addHeading","level","includes","addSeparator","addBreak","addQuote","cite","addLink","href","getInput","val","required","trimWhitespace","error","utils_1","toCommandProperties","startGroup","issue","endGroup","command_1","file_command_1","__importStar","path","oidc_utils_1","http_client_1","auth_1","core_1","OidcClient","createHttpClient","allowRetry","maxRetry","requestOptions","allowRetries","maxRetries","HttpClient","BearerCredentialHandler","getRequestToken","token","getIDTokenUrl","runtimeUrl","getCall","id_token_url","httpclient","res","getJson","catch","statusCode","id_token","result","getIDToken","audience","debug","setSecret","ExitCode","exportVariable","convertedVal","toCommandValue","issueFileCommand","prepareKeyValueMessage","secret","inputPath","delimiter","getMultilineInput","inputs","input","getBooleanInput","setOutput","enabled","exitCode","Failure","group","fn","saveState","aud","summary_1","defineProperty","enumerable","get","summary","summary_2","markdownSummary","path_utils_1","pathUtils","toPosixPath","pth","toWin32Path","sep","toPlatformPath","GITHUB_ACTIONS","core","console","log","warning","msg","notice","info","isexe","Promise","resolve","reject","er","is","ignoreErrors","resolveCommandAttempt","parsed","withoutPathExt","cwd","hasCustomCwd","shouldSwitchCwd","chdir","disabled","resolved","which","sync","getPathKey","pathExt","e","notFoundError","original","syscall","errno","spawnargs","args","verifyENOENT","status","isWin","file","spawn","spawned","cp","hookChildProcess","pathKey","platform","reverse","find","isStream","stream","pipe","isWritableStream","writable","_write","_writableState","async","getStream","inputStream","maxBuffer","Infinity","bufferStream","rejectPromise","getBufferedLength","BufferConstants","MAX_LENGTH","bufferedData","getBufferedValue","streamPipelinePromisified","MaxBufferError","execa","handleArguments","joinCommand","escapedCommand","getEscapedCommand","validateTimeout","timeout","isFinite","childProcess","dummySpawned","ChildProcess","errorPromise","makeError","stderr","all","timedOut","isCanceled","killed","mergePromise","spawnedPromise","signal","stdin","getSpawnedPromise","timedPromise","setupTimeout","killSignal","timeoutId","timeoutPromise","setTimeout","timeoutKill","kill","safeSpawnedPromise","finally","clearTimeout","race","processDone","cleanup","detached","removeExitHandler","onExit","setExitHandler","spawnedKill","bind","cancel","spawnedCancel","handlePromiseOnce","onetime","stdoutResult","stderrResult","allResult","buffer","stdoutPromise","getStreamPromise","stderrPromise","allPromise","getBufferedData","getSpawnedResult","handleOutput","returnedError","aborted","failed","handleInput","inputFile","validateInputOptions","createReadStream","end","makeAllStream","mixed","mergeStream","add","pipeStdout","pipeToTarget","pipeStderr","pipeAll","addPipeMethods","execaSync","getInputSync","readFileSync","handleInputSync","spawnSync","execPowershell","startupFlags","execOptions","stdio","powershell","maybePwsh","nothrow","maybePowerShell","getPowerShell","t","r","o","configurable","m","getuid","CI","n","s","h","parseCommand","b","a","l","c","y","S","f","R","p","SUDO_USER","w","statSync","isDirectory","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","mixin$1","source","sourceObject","forEach","symbol","module","globalThis","Array","naiveFallback","window","__global__","isSymbol","toStringTag","validateSymbol","es6Symbol","global","validTypes","object","Symbol","iterator","toPrimitive","SymbolPolyfill","HiddenSymbol","isNativeSafe","d","NativeSymbol","generateName","objPrototype","created","create","desc","postfix","ie11BugWorkaround","gs","setupStandardSymbols","standardSymbols","defineProperties","hasInstance","isConcatSpreadable","match","search","species","unscopables","setupSymbolRegistry","registry","symbolRegistry","for","String","keyFor","ignore","description","__description__","__name__","toString","valueOf","from","iteratorSymbol","isArguments","objToString","id","isFunction","isFunctionStringTag","RegExp","toPosInt","callable","validValue","isValue","isString","isArray","Function","shim","arrayLike","Context","getIterator","mapFn","thisArg","apply","next","done","numberIsNaN","isNan","isNaN","NaN","objHasOwnProperty","hasOwnProperty","abs","Math","floor","eIndexOf","searchElement","fromIndex","obj","targetObj","index","ensureCallable","byObserver","Observer","queue","currentQueue","node","document","createTextNode","callback","concat","shift","observe","characterData","nextTick","queueMicrotask","MutationObserver","WebKitMutationObserver","setImmediate","isCallable","isPromise","then","isPromiseModule","default","objectMap","primitiveSet","arg","ensureString","ensureValue","stringifiable","validateStringifiable","validateStringifiableValue","toShortString","safeToString","toShortStringRepresentation","string","char","JSON","supportedModes","promise","mode","conf","waiting","cache","isFailed","emit","onSuccess","count","onFailure","delete","resolvedMode","nextTickFailure","context","oldCache","pathExists","fsPromises","untildifyUser","maybeHomeDir","isSudo","homedir","userHomeDir","tildeRegex","addRCHeader","rcHeader","guard","rcPath","readFile","addSourceToTargetRc","sourceRcString","targetRcPath","addEnv","valGiven","givenOptions","escapeSpace","defaultRcPath","shouldEscapeSpace","spaceEscaped","escapeQuote","escapeString","addEnvSystem","sourceRCInRc","addPath","isIgnoredPath","ignoredPaths","checkedPath","PATH","ghAddPath","addPathSystem","addLocale","localeData","locales","pluralize","unit","config","unitTypeData","locale","lookupOrder","unitTypeLookupOrder","unshift","unitType","Set","getLocaleDataForUnitType","unitString","numerous","SPACE_CHARACTERS","Range","range","parseOptions","loose","includePrerelease","raw","Comparator","formatted","parseRange","first","isNullSet","isAny","comps","format","memoKey","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","cached","re","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","comparatorTrimReplace","TILDETRIM","tildeTrimReplace","CARETTRIM","caretTrimReplace","rangeList","parseComparator","comp","replaceGTE0","COMPARATORLOOSE","rangeMap","Map","comparators","size","has","values","intersects","thisComparators","isSatisfiable","rangeComparators","every","thisComparator","rangeComparator","SemVer","testSet","safeRe","remainingComparators","testComparator","pop","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","TILDELOOSE","TILDE","_","M","pr","ret","replaceCaret","z","CARETLOOSE","CARET","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","to","tM","tm","tp","tpr","prerelease","semver","ANY","allowed","major","minor","patch","operator","COMPARATOR","cmp","__awaiter","_arguments","P","generator","fulfilled","rejected","step","__generator","body","verb","op","g","ops","trys","sent","throw","return","toArr","any","toVal","out","opts","old","nxt","boolean","addUpdateAlternativesToRc","rcOptions","priority","execRoot","updateAptAlternatives","sourceRC","getAptEnv","apt","DEBIAN_FRONTEND","LANG","LC_ALL","hasNala","getApt","escapeStringRegexp","isAptPackInstalled","pack","line","filterAndQualifyAptPackages","packages","qualifiedNeededAptPackage","qualified","aptPackageType","AptPackageType","NameDashVersion","NameEqualsVersion","Name","getAptArg","escapeRegex","showStdout","updatedRepos","None","updateAptReposMemoized","installAptPack","update","allRepositories","flatMap","repository","repo","initAptMemoized","aptTimeout","defaultExecOptions","installAddAptRepo","execRootSync","addAptRepository","addRepositories","needToInstall","binDir","addAptKeyViaURL","keyServer","defaultKeyServer","fileName","keyStorePath","assertGpgFileName","addAptKeyViaServer","addAptKeys","isExecaError","retryErrors","keyUrl","defaultKeyStorePath","dlPath","tmpdir","dl","DownloaderHelper","start","s$1","initGpg","setupBrew","maybeBinDir","dirname","getDownloadPath","NONINTERACTIVE","getBrewBinDir","getBrewDir","arch","installBrewPack","cask","hasBrew","brewPath","hasDnf","hasDnfCache","isArch","isArchCache","isUbuntu","isUbuntuCache","setupChocolatey","_version","_setupDir","_arch","SystemRoot","chocoPath","ALLUSERSPROFILE","maybeChoco","ChocolateyInstall","setupChocoPack","hasChoco","TMP","TEMP","Path","extendEnv","setupDnfPack","getDnfArg","setupPacmanPack","aur","pacman","yayBuildDir","isRoot","createdBuilderUser","didUpdate","didInit","runInstall","availableVersions","matchAll","pacmanSiVersionRegex","availablePacmanVersions","u","basename","E","N","extname","relative","rmRF","ioUtil","IS_WINDOWS","rm","force","recursive","retryDelay","mkdirP","fsPath","ok","mkdir","findInPath","tool","extensions","extension","isRooted","tryGetExecutablePath","directories","matches","directory","cpDirRecursive","sourceDir","destDir","currentDepth","files","readdir","srcFile","destFile","lstat","copyFile","chmod","stat","isSymbolicLink","unlink","symlinkFull","readlink","symlink","exists","exec","commandLine","commandArgs","tr","argStringToArray","toolPath","ToolRunner","findAllVersions","toolName","versions","_getCacheDirectory","fs","existsSync","children","readdirSync","child","isExplicitVersion","fullPath","_createExtractFolder","dest","_getTempDirectory","v4_1","io","_createToolPath","folderPath","clean","markerPath","_completeToolPath","writeFileSync","versionSpec","valid","evaluateVersions","sort","gt","potential","satisfies","cacheDirectory","tempDirectory","_getGlobal","defaultValue","retryAsPromised","optionsInput","$current","max","backoffBase","backoffExponent","report","Date","toLocaleTimeString","backoffTimeout","lastError","TimeoutError","current","shouldRetry","pow","setupSevenZip","getArchiveType","ext","extract7Zip","sevenZip","getSevenZip","grantUserWriteAccess","extractExe","extractZip","extractTarByExe","stripComponents","flags","archiveType","installTarDependencies","setupBin","getPackageInfo","setupDir","RUNNER_TEMP","RUNNER_TOOL_CACHE","_b","url","binRelativeDir","binFileName","extractedFolderName","extractFunction","dir","installDir","binFile","givenExtractFunction","downloaded","retry","downloadedFilePath","now","downloadTool","tryDownload","getExtractFunction","downloadExtractInstall","maybeGetInput","CACHE_TOOLS","cacheDir","cacheInstallation","getCmakePackageInfo","semVersion","semverCoerce","isOld","semverLte","osArchStr","x86_64","x86","arm64","folderName","addExeExt","setupCmake","isBinUptoDate","givenFile","targetVersion","versionRegex","defaultVersionRegex","givenVersion","execout","getExecOutput","getExecOutput_1","getBinVersion","semverCompare","quoteIfHasSpace","quoteChar","setupPython","installInfo","foundPython","findPython","bin","setupActionsPython","brewPythonPrefix","brewPythonBin","setupPythonSystem","findOrSetupPython","require$$0$2","foundPip","maybePip","findPip","ensurePipUpgrade","setupPipPackSystem","setupPip","findOrSetupPip","hasPipx","setupPipPackWithPython","upgrade","usePipx","setupPipx","isLibrary","setupWheel","pythonBin","isPythonUpToDate","rootDir","pathParse","root","pythonDirs","pythonDir","candidate","pythonBinPath","MinVersions","pythonBinPaths","pipCandidate","isPipUptoDate","pip","pipPaths","pipPath","err1","err2","getVersion","osVersion","isVersionDefault","DefaultUbuntuVersion","toolLinuxVersions","osVersionMaj","satisfyingVersion","getDefaultLinuxVersion","DefaultVersions","detectUsingOsVersion","versionMatch","setupPipPack","getPython","givenPython","user","isPipx","hasPackage","python","pipHasPackage","nameAndVersion","upgradeFlag","userFlag","PIPX_HOME","getPipxHome","PIPX_BIN_DIR","getPipxBinDir","execPaths","addPythonBaseExecPrefix","dirs","dirIndex","findIndex","exist","whichDir","findBinDir","addPythonPrefix","setupGraphviz","activateGraphviz","setupDmg","ArchiveHdi","dmg","read","entry","extract","getDoxygenPackageInfo","setupMacOSSDK","xcrun","sdkroot","loadAssetList","matchAsset","assets","origTags","versionMap","filterMapTag","origTag","mappedTag","candidateTags","candidateTag","assetNames","filterName","matchAssetName","keywords","optionalKeywords","candidates","keyword","candidateScores","score","maxScore","getGccPackageInfo","asset","x64","ia32","setupGcc","installationInfo","setupChocoMingw","gccExe","exe1","exe2","tag1","tag2","v1","v2","compare","localeCompare","compareVersion","_d","_c","versionStdout","getGccCmdVersion","majorVersion","semverMajor","matcherPath","addGccLoggingMatcher","activateGcc","getNinjaPackageInfo","ninjaPlatform","getNinjaPlatformArch","setupNinja","getDownloadKcovPackageInfo","getBuildKcovPackageInfo","buildKcov","cmake","ubuntuVersion","getCmake","buildDir","vsversion_to_versionnumber","vsversion","VsYearVersion","vsversion_to_year","year","ver","findVcvarsall","vsversion_number","version_pattern","upper_bound","pattern","child_process","execSync","installationPath","findWithVswhere","years","YEARS","prog_files","PROGRAM_FILES","ed","EDITIONS","PROGRAM_FILES_X86","isPathVariable","setupVCVarsall","VCTargetsPath","toolset","sdk","uwp","spectre","setupMSVCDevCmd","getArch","installTool","setupCppDir","successMessages","errorMessages","milliseconds","fallback","customTimers","timer","cancelablePromise","sign","getAbortedReason","addEventListener","timeoutError","pTimeout","hasLLVM","setupVersion","setupFunction","setups","getSuccessMessage","installToolImpl","stack","getLLVMPackageInfo","ubuntuVer","ubuntuMin","armv7","powerpc64le","sparc64","getAssetKeywords","ghAsset","websiteAsset","getLLVMAssetURL","setupLLVM","setupLLVMWithoutActivation","ld","LD_LIBRARY_PATH","dyld","DYLD_LIBRARY_PATH","llvmMajor","majorLLVMVersion","actPromises","activateLLVM","setupLLVMOnly","LLVMPackages","All","installationFolder","installerScript","installerPath","neededPackages","givenScript","target_path","script","NODE_DEBUG","debugScript","nonInteractiveScript","choosePackages","installingPack","regexp","isAptPackRegexInstalled","removeConflictingPackages","useNalaScript","patchAptLLVMScript","shell","setupLLVMApt","llvmBinaryDeps","coeredVersion","semverValid","coercedVersion","semverCoerceIfInvalid","addLLVMLoggingMatcher","setupMSVC","versionGiven","installed","vcvarsall_path","addMSVCLoggingMatcher","getPowerShellPackageInfo","getPowershellUrl","arm","arm32","aarch64","getTaskPackageInfo","taskPlatform","getTaskPlatform","taskArch","getTaskArch","checkEnv","vendors","constant","vendor","envs","isCI","ne","BUILD_ID","BUILD_NUMBER","CI_APP_ID","CI_BUILD_ID","CI_BUILD_NUMBER","CI_NAME","CONTINUOUS_INTEGRATION","RUN_ID","utils","annotationProperties","title","startLine","endLine","col","startColumn","endColumn","cmdStr","escapeData","substr","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v3$1","Buffer","createHash","digest","v5","clockseq","seedBytes","random","msecs","nsecs","dt","tl","tmh","rnds","uuid_1","fileCommand","appendFileSync","v4","convertedValue","_decodedUsername","_decodedPassword","base","super","decodeURIComponent","username","password","https","events","util","tunnel","httpOverHttp","agent","httpsOverHttp","defaultPort","httpOverHttps","httpsOverHttps","inherits","EventEmitter","addRequest","req","onFree","onCloseOrRemove","removeListener","onConnect","head","connectReq","removeAllListeners","debug$2","placeholder","connectOptions","method","headers","proxyAuth","useChunkedEncodingByDefault","once","onUpgrade","cause","pos","HttpCodes","Headers","MediaTypes","HttpRedirectCodes","MovedPermanently","ResourceMoved","SeeOther","TemporaryRedirect","PermanentRedirect","HttpResponseRetryCodes","BadGateway","ServiceUnavailable","GatewayTimeout","RetryableHttpVerbs","HttpClientError","setPrototypeOf","HttpClientResponse","readBody","output","alloc","chunk","readBodyBuffer","chunks","lowercaseKeys","reduce","userAgent","handlers","_ignoreSslError","_socketTimeout","_allowRedirects","_allowRedirectDowngrade","_maxRedirects","_allowRetries","_maxRetries","_agent","_proxyAgent","_proxyAgentDispatcher","_keepAlive","_disposed","ignoreSslError","socketTimeout","allowRedirects","allowRedirectDowngrade","maxRedirects","keepAlive","requestUrl","additionalHeaders","del","post","put","sendStream","Accept","_getExistingOrDefaultHeader","ApplicationJson","_processResponse","postJson","ContentType","putJson","patchJson","parsedUrl","_prepareRequest","maxTries","response","numTries","requestRaw","Unauthorized","authenticationHandler","handler","canHandleAuthentication","handleAuthentication","redirectsRemaining","redirectUrl","parsedRedirectUrl","_performExponentialBackoff","dispose","requestRawWithCallback","callbackForResult","onResult","handleResult","callbackCalled","byteLength","httpModule","sock","getAgent","serverUrl","_getAgent","getAgentDispatcher","proxyUrl","pm","_getProxyAgentDispatcher","pathname","_mergeHeaders","prepareRequest","_default","clientHeader","useProxy","globalAgent","agentOptions","tunnelAgent","overHttps","rejectUnauthorized","proxyAgent","uri","pipelining","requestTls","retryNumber","ms","min","contents","NotFound","deserializeDates","dateTimeDeserializer","auth","BasicCredentialHandler","TESTING_WINDOWS","checkStat","isFile","checkPathExt","pathext","PATHEXT","checkMode","mod","uid","gid","myUid","myGid","getgid","ug","isWindows","OSTYPE","COLON","getNotFoundError","getPathInfo","opt","colon","pathEnv","pathExtExe","found","ppRaw","pathPart","pCmd","subStep","ii","whichSync","cur","ex","environment","metaCharsRegExp","_escape","doubleEscapeMetaChars","shebangRegex","resolveCommand","escape","readShebang","fd","openSync","readSync","closeSync","shebangCommand","argument","binary","isExecutableRegExp","isCmdShimRegExp","commandFile","shebang","detectShebang","needsShell","forceShell","needsDoubleEscapeMetaChars","normalize","shellCommand","comspec","windowsVerbatimArguments","parseNonShell","enoent","originalEmit","arg1","verifyENOENTSync","crossSpawnModule","_parse","npmRunPathEnv","pathName","npmRunPath","pathOption","preferLocal","execPath","addExecPath","cwdString","fileURLToPath","cwdPath","applyPreferLocal","previous","applyExecPath","execPathString","copyProperty","property","ignoreNonConfigurable","toDescriptor","fromDescriptor","canCopyProperty","wrappedToString","withName","fromBody","toStringDescriptor","toStringName","calledFunctions","WeakMap","function_","returnValue","callCount","functionName","displayName","arguments_","Reflect","ownKeys","changePrototype","fromPrototype","getPrototypeOf","changeToString","newToString","mimicFunction","getRealtimeSignal","number","SIGRTMIN","action","standard","SIGNALS","forced","getSignals","realtimeSignals","signals","normalizeSignal","defaultNumber","name2","constantSignal","supported","getSignalByName","signalsByName","getSignalsByName","fromEntries","findSignalByNumber","signalA","getSignalsByNumber","signalsA","SIGRTMAX","getSignalByNumber","signalDescription","prefix","getErrorPrefix","errorCode","execaMessage","isError","shortMessage","Boolean","originalMessage","aliases","processOk","reallyExit","listeners","pid","emitter","assert","EE","__signal_exit_emitter__","emitted","infinite","setMaxListeners","equal","loaded","ev","remove","alwaysLast","unload","sig","sigListeners","originalProcessEmit","originalProcessReallyExit","event","emit$1","load","processEmit","processReallyExit","killResult","setKillTimeout","shouldForceKill","getForceKillAfterTimeout","unref","forceKillAfterTimeout","isSigterm","SIGTERM","DEFAULT_FORCE_KILL_TIMEOUT","streamName","createWriteStream","isExecaChildProcess","PassThrough","PassThroughStream","promisify","array","isBuffer","objectMode","setEncoding","pipeline","getStreamModule","sources","it","readable","isEmpty","streamPromise","nativePromisePrototype","descriptors","descriptor","normalizeArgs","NO_ESCAPE_REGEXP","DOUBLE_QUOTES_REGEXP","escapeArg","SPACES_REGEXP","tokens","previousToken","verboseDefault","debuglog","padField","field","padding","padStart","logCommand","verbose","getTimestamp","date","getHours","getMinutes","getSeconds","getMilliseconds","crossSpawn","stripFinalNewline","localDir","windowsHide","getEnv","envOption","alias","hasAlias","normalizeStdio","CR","chown","lchmod","lchown","link","mkdtemp","open","realpath","rename","rmdir","truncate","utimes","promises_1","posix","myGroups","groups","getgroups","win32","peSplit","substring","__exportStar","impl","_ISEXE_TEST_PLATFORM_","isexeSync","rSlash","rRel","optPath","optPathExt","optDelimiter","getPathPart","envPart","withExt","pathEnvPart","$","A","systemdrive","opts1","toInteger","optsLength","fnLength","isAsync","objPropertyIsEnumerable","propertyIsEnumerable","list","compareFn","defVal","foo","bar","trzy","shim$3","function","isObject","captureStackTrace","generate","mixin","arg2","possibleTypes","isPrototype","classRe","functionToString","contains","searchString","isPlainFunction","normalizeOpts","dscr","off","methods","type","listener","__eeOnceListener__","__ee__","resolveArgs","customError","defineLength","ee","resolveResolve","resolvers","configure","memLength","extDel","extGet","extHas","normalizer","getListeners","setListeners","deleteListeners","memoized","resolveNormalize","userNormalizer","profileName","updateEnv","__memoized__","_get","_has","resolveLength","plain","extFn","__profiler__","primitive","getPrimitiveFixed","currentLength","lastId","argsMap","getFixed","aFrom","tbi","currentCallback","currentContext","currentArgs","last","origCb","resultArray","maxAge","maxTimeout","validTimeout","noop","timeouts","preFetchAge","preFetchTimeouts","preFetch","toPosInteger","lruQueue","limit","hit","oldIndex","nuIndex","refCounter","deleteRef","getRefCount","memoize","is_posix_os","release","windows_version_regex","given_path","should_not_escape","major_release","os_build","regexEscape","matchOperatorsRe","chars","escapeChar","regex","variants","checkLocale","hasLocale","__dirname","requireLocale","isNode","timeUnits","defaultConfig","span","autoloadLocales","firstDate","secondDate","autoload","localeId","ensureLocaleLoadedOrThrow","difference","results","divider","getDifference","parts","long","one","other","months","weeks","days","hours","minutes","seconds","narrow","short","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","LONECARET","looseOption","freeze","emptyOpts","numeric","compareIdentifiers","anum","bnum","rcompareIdentifiers","LOOSE","FULL","num","build","compareMain","comparePre","compareBuild","inc","identifier","identifierBase","throwErrors","versionA","versionB","lt","eq","neq","gte","lte","coerce","rtl","coerceRtlRegex","COERCERTLFULL","COERCERTL","lastIndex","firstKey","outside","hilo","gtfn","ltefn","ltfn","ecomp","high","low","comparator","minimumVersionWithPreRelease","minimumVersion","simpleSubset","sub","dom","eqSet","gtltComp","higher","lower","hasDomLT","hasDomGT","higherGT","lowerLT","needDomLTPre","needDomGTPre","internalRe","identifiers","diff","version1","version2","comparison","v1Higher","highVersion","lowVersion","highHasPre","lowHasPre","rcompare","compareLoose","rsort","toComparators","maxSatisfying","maxSV","rangeObj","minSatisfying","minSV","minVersion","minver","setMin","compver","validRange","gtr","ltr","r1","r2","simplifyRange","prev","ranges","simplified","subset","sawNonNull","OUTER","simpleSub","simpleDom","isSub","packageJson","npm_package_json","npm_config_user_agent","isNpm6","isNpm7","isNpm","isYarn","isNpmOrYarn","homeDirectory","configDir","XDG_CONFIG_HOME","getConfigFile","packageName","getDistVersion","distTag","json","hasNewVersion","pkg","updateCheckInterval","alwaysRun","lastUpdateCheck","latestVersion","mkdirSync","getLastUpdate","configFile","getTime","err_1","isTTY","shouldNotifyInNpmScript","lines","repeat","_i","lines_1","padEnd","borderedText","_interopRequireWildcard","__esModule","_possibleConstructorReturn","ReferenceError","DH_STATES","_typeof","_createClass","_url","_events","IDLE","SKIPPED","STARTED","DOWNLOADING","RETRY","PAUSED","RESUMED","STOPPED","FINISHED","FAILED","_classCallCheck","__proto__","captureRejections","__validate","requestURL","state","__defaultOpts","metadata","override","forceResume","removeOnStop","removeOnFail","progressThrottle","httpRequestOptions","httpsRequestOptions","resumeOnIncomplete","resumeIfFileExists","resumeOnIncompleteMaxRetry","__opts","__pipes","__total","__downloaded","__progress","__retryCount","__retryTimeout","__resumeRetryCount","__states","__promise","__request","__response","__isAborted","__isResumed","__isResumable","__isRedirected","__destFolder","__statsEstimate","time","prevBytes","throttleTime","__fileName","__filePath","updateOptions","_inherits","__start","getTotalSize","total","__getFilePath","__getFilesizeInBytes","resumeFromFile","unpipe","__fileStream","__requestAbort","__closeFileStream","__setState","__reqOptions","__emitStop","__headers","__getReqOptions","__initProtocol","progress","speed","__protocol","__isRequireRedirect","location","__getFileNameFromHeaders","destroyed","__downloadRequest","__onError","__onTimeout","__resetStats","__startDownload","skip","skipSmaller","totalSize","downloadedSize","isResumed","__calculateStats","__onFinished","close","__hasFinished","resume","incomplete","onDiskSize","__retry","__removeFile","delay","__getFileNameFromOpts","__uniqFileNameSync","prevPath","prevFileName","getStats","throwIfNoEntry","accessSync","F_OK","abort","__resolvePending","toInstall","npath","nFileName","first2chars","nFilepath","startsWithSingleDot","O","I","T","W","q","B","isUnixExecutable","stats","O_RDONLY","useStat","normalizeSeparators","upperExt","validExt","originalFilePath","upperName","actualName","assert_1","copySourceDirectory","readCopyOptions","destStat","newDest","sourceStat","mv","destExists","mkdirP_1","check","tok","makeSafeRe","tb","defaultResult","rangeTmp","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","compRe","stable","archFilter","platFilter","chk","platform_version","_getOsVersion","plat","lsbContents","_readLinuxVersionFile","lsbReleaseFile","osReleaseFile","randomBytes","bytesToUuid","timers_1","toolrunner","_debug","_getCommandString","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","_windowsQuoteCmdArg","_processLineBuffer","strBuffer","onLine","argline","_endsWith","upperToolPath","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","quoteHit","_cloneExecOptions","silent","failOnStdErr","ignoreReturnCode","outStream","errStream","_getSpawnOptions","argv0","optionsNonNull","ExecState","stdbuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","processExitCode","argString","append","escaped","inQuotes","charAt","_setResult","HandleTimeout","string_decoder_1","exec_2","exec_1","stdoutDecoder","StringDecoder","stderrDecoder","originalStdoutListener","originalStdErrListener","maxAttempts","minSeconds","maxSeconds","execute","isRetryable","attempt","getSleepAmount","sleep","mm","httpm","__importDefault","retry_helper_1","HTTPError","httpStatusCode","toolCache","IS_MAC","downloadTool_1","retryHelper","RetryHelper","authorization","statusMessage","readStream","responseMessageFactory","succeeded","downloadToolAttempt","extract7z","_7zPath","originalCwd","isDebug","powershellPath","extractTar","versionOutput","isGnuTar","destArg","fileArg","extractXar","xarPath","escapedFile","escapedDest","pwshPath","extractZipWin","unzipPath","extractZipNix","cacheDir_1","destPath","itemName","cacheFile","sourceFile","targetFile","destFolder","find_1","cachePath","getManifestFromRepo","owner","branch","releases","treeUrl","manifestUrl","tree","versionsRaw","findFromManifest","manifest","_findMatch","previousError","dist","optsArg","optsFs","mkdirAsync","rej","made","statAsync","mkdirpManualSync","parent","fer","mkdirpManual","st","findMade","findMadeSync","mkdirpNativeSync","mkdirpNative","__TESTING_MKDIRP_PLATFORM__","pathArg","badWinChars","versArr","__TESTING_MKDIRP_NODE_VERSION__","hasNative","useNativeSync","useNative","mkdirpSync","mkdirp","native","nativeSync","manual","manualSync","defaultLLVM","llvm","clangtidy","clangformat","ninja","gcovr","conan","meson","kcov","task","doxygen","gcc","mingw","nala","base_exec_prefix","unique","getUbuntuVersion_1","getUbuntuVersion","child_process_1","exe","execFile","reDistributor","reDescription","reRelease","distributorFound","rel","ss","versionSplitted","pipxHome","compatHome","pipxBinDir","nameMap","macosVersion","macosRelease","pathToFileURL","__filename","_documentCurrentScript","baseURI","AbortError","getDOMException","DOMException","errorMessage","reason","vsversion_to_versionnumber_1","VSWHERE_PATH","findVcvarsall_1","arch_aliases","win64","vcvars","cmd_output_parts","old_environment","vcvars_output","new_environment","error_messages","old_env_vars","new_value","_1","setupLLVMDeps","hasVCPKG","nalaPack","nalaLegacyPack","installer","setupNalaViaInstaller","vcpkg","addShExt","addShRelativePrefix","bazel","opencppcoverage","activateOpencppcoverage","choco","brew","ubuntuVerSplitted","setupPowershellSystem","ccache","sccache","activateWinDoxygen","graphviz","cppcheck","activateWinCppcheck","ClangFormat","msvc","vcvarsall","versionSplit","addVPrefix","installMethod","version_number","removeVPrefix","make","gnuBinDir","sevenzip","tools","checkUpdatePromise","updateNotifier","checkUpdates","ACTIONS_ALLOW_UNSECURE_COMMANDS","idx","alibi","strict","unknown","defaults","mri","inp","parseArgs","help","table","documentation","coverage","architecture","SETUP_CPP_DIR","timeFormatter","timeDelta.create","time1","time2","timeDelta.addLocale","timeDeltaLocale","numerous.addLocale","numerousLocale","toolsInUse","toolsNonDefaultVersion","syncVersions","failedFast","parseFloat","maybeCompiler","compiler","time1Compiler","compilerAndVersion","compilerAndMaybeVersion","maybeVersion","getCompilerInfo","coreExports","gccVersion","setupMingw","gccSemver","gccMajor","activateGcovGCC","installCompiler","time2Compiler","uniqueEntries","finalizeRC","main","argv"],"mappings":";gzBAsBA,SAAgBA,EACdC,EACAC,EACAC,GAEA,MAAMC,EAAM,IAAIC,GAAQJ,EAASC,EAAYC,GAC7CG,QAAQC,OAAOC,MAAMJ,KAAiBK,GAAGC,IAC3C,CCzBe,SAASC,IAMtB,OALIC,GAAUC,GAAUC,OAAS,KAC/BC,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GACPE,OAAO,OACPvmC,YAAY,qBACZwmC,SAAS,QAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,8BACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,wBACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,mBACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,cACZwmC,SAAS,QAET,CACAvkD,KAAK,YACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,+BACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,SACPvmC,YAAY,+CACZwmC,SAAS,SAET,CACAvkD,KAAK,SACLokD,OAAO,GACPE,OAAO,SACPvmC,YAAY,+CACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,UACPvmC,YAAY,WACZwmC,SAAS,QACTE,QAAO,GAEP,CACAzkD,KAAK,UACLokD,OAAO,GACPE,OAAO,QACPvmC,YAAY,SACZwmC,SAAS,QACTE,QAAO,GAEP,CACAzkD,KAAK,UACLokD,OAAO,GACPE,OAAO,QACPvmC,YAAY,mCACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,QACPvmC,YAAY,gDACZwmC,SAAS,SAET,CACAvkD,KAAK,WACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,oCACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,QACPvmC,YAAY,qDACZwmC,SAAS,SAET,CACAvkD,KAAK,SACLokD,OAAO,GACPE,OAAO,SACPvmC,YAAY,mCACZwmC,SAAS,OAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,OACPvmC,YAAY,oBACZwmC,SAAS,OAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,OACPvmC,YAAY,eACZwmC,SAAS,OAET,CACAvkD,KAAK,YACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,mBACZwmC,SAAS,OAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,mBACZwmC,SAAS,OAET,CACAvkD,KAAK,WACLokD,OAAO,GACPE,OAAO,SACPvmC,YAAY,+BACZwmC,SAAS,OAET,CACAvkD,KAAK,QACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,mBACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,gBACZwmC,SAAS,SAET,CACAvkD,KAAK,UACLokD,OAAO,GACPE,OAAO,SACPvmC,YAAY,kCACZwmC,SAAS,SAET,CACAvkD,KAAK,SACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,8BACZwmC,SAAS,WAET,CACAvkD,KAAK,SACLokD,OAAO,GACPE,OAAO,OACPvmC,YAAY,sBACZwmC,SAAS,SAET,CACAvkD,KAAK,YACLokD,OAAO,GACPE,OAAO,YACPvmC,YAAY,sBACZwmC,SAAS,UCxQIG,GAAWA,KACxB,MAAMC,EFLCvpC,MAAMgD,KAAK,CAACvf,OAYG,GAbAwlD,GAAS,GACJF,IEOpBS,MADO,IAAIJ,MAAWG,GAAiBriD,IAAIuiD,GAC3CD,EASDC,GAAgBA,EACtB7kD,KAAAA,EACAokD,OAAOU,EACP/mC,cACAumC,SACAG,UAAO,EACPF,eAEK,MACLK,SAASG,CAAC/kD,GAAMglD,IACdn+C,aACIo+C,OAA2BriD,IAAjBoiD,EAEV,MAAA,CAAChlD,KAAAA,EAAKokD,OADCa,EAAUD,EAAeF,EACnB/mC,cAAYknC,YAAUX,SAAOG,SAAOF,aCpBjDW,GAAgBA,EACtBllD,KAAAA,EACAokD,SACArmC,cACAknC,YACAX,SACAG,SACAF,cACI,CAACvkD,EAAK,CAACA,KAAAA,EAAKokD,SAAOrmC,cAAYknC,YAAUX,SA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n/E,QAAQo/E,MACV17D,MAAMoJ,IACL9sB,QAAQ4P,SAAWkd,CAAA,IAEpBze,OAAO1L,IACN0J,EAAM,oBACNA,EAAM1J,GACN3C,QAAQ4P,SAAW,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,65,66,67,68,69,73,88,89,90,91,92,111,114,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,273,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,291,292]} \ No newline at end of file +{"version":3,"file":"setup-cpp.js","sources":["../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/proxy.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js","../../packages/ci-log/dist/index.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js","../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js","../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js","../../packages/exec-powershell/dist/index.js","../../node_modules/.pnpm/admina@1.0.1/node_modules/admina/dist/index.node.mjs","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/mixin.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/index.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/is-implemented.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/implementation.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/validate-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/index.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-implemented.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/polyfill.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/generate-name.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/standard-symbols.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/symbol-registry.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-arguments.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-function.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/is-string.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/e-index-of.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/map.js","../../node_modules/.pnpm/next-tick@1.1.0/node_modules/next-tick/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-callable.js","../../node_modules/.pnpm/is-promise@2.2.2/node_modules/is-promise/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/promise.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/primitive-set.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/to-short-string-representation.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/safe-to-string.js","../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js","../../packages/untildify-user/dist/index.js","../../packages/envosman/dist/rc-file.js","../../packages/envosman/dist/add-env.js","../../packages/envosman/dist/utils.js","../../packages/envosman/dist/add-path.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/lib/time-delta.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js","../../node_modules/.pnpm/simple-update-notifier@2.0.0/node_modules/simple-update-notifier/build/index.js","../../node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs","../../packages/setup-apt/dist/alternatives.js","../../packages/setup-apt/dist/apt-env.js","../../packages/setup-apt/dist/get-apt.js","../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js","../../packages/setup-apt/dist/is-installed.js","../../packages/setup-apt/dist/qualify-install.js","../../packages/setup-apt/dist/install.js","../../packages/setup-apt/dist/apt-repository.js","../../packages/setup-apt/dist/apt-key.js","../../packages/setup-brew/dist/install.js","../../packages/setup-brew/dist/install-pack.js","../../src/utils/env/hasDnf.ts","../../src/utils/env/isArch.ts","../../src/utils/env/isUbuntu.ts","../../src/chocolatey/chocolatey.ts","../../src/utils/setup/setupChocoPack.ts","../../src/utils/setup/setupDnfPack.ts","../../src/utils/setup/setupPacmanPack.ts","../../node_modules/.pnpm/patha@0.4.1/node_modules/patha/dist/index.node.mjs","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/tool-cache.js","../../node_modules/.pnpm/retry-as-promised@7.0.4/node_modules/retry-as-promised/dist/index.js","../../src/sevenzip/sevenzip.ts","../../src/utils/setup/extract.ts","../../src/utils/setup/setupBin.ts","../../src/cmake/cmake.ts","../../src/utils/setup/version.ts","../../src/utils/std/index.ts","../../src/python/python.ts","../../src/versions/versions.ts","../../src/utils/env/ubuntu_version.ts","../../src/utils/setup/setupPipPack.ts","../../src/graphviz/graphviz.ts","../../src/utils/setup/setupDmg.ts","../../src/doxygen/doxygen.ts","../../src/macos-sdk/macos-sdk.ts","../../src/utils/asset/load-assets.ts","../../src/gcc/gcc.ts","../../src/gcovr/gcovr.ts","../../src/ninja/ninja.ts","../../src/kcov/kcov.ts","../../src/llvm/apple-clang.ts","../../node_modules/.pnpm/msvc-dev-cmd@https+++codeload.github.com+aminya+msvc-dev-cmd+tar.gz+c01f519bd995460228ed3dec4df51df92dc290fd/node_modules/msvc-dev-cmd/lib.js","../../src/vcvarsall/vcvarsall.ts","../../src/installTool.ts","../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js","../../src/llvm/llvm_url.ts","../../src/llvm/llvm.ts","../../src/llvm/llvm_installer.ts","../../src/msvc/msvc.ts","../../src/opencppcoverage/opencppcoverage.ts","../../src/powershell/powershell.ts","../../src/task/task.ts","../../src/cli-options.ts","../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/auth.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js","../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js","../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js","../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js","../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js","../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js","../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js","../../src/utils/compat/fs/promises.ts","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js","../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/_iterate.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/normalize-options.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-integer.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-pos-integer.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-length.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-callable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/for-each.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-object.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/error/custom.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/_define-length.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/value/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/object/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/function/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/prototype/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/is.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/shim.js","../../node_modules/.pnpm/d@1.0.2/node_modules/d/index.js","../../node_modules/.pnpm/event-emitter@0.3.5/node_modules/event-emitter/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-resolve.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/to-array.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-normalize.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/configure-map.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/plain.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/primitive.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-primitive-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-1.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/async.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/dispose.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max-age.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/valid-timeout.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/max-timeout.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max.js","../../node_modules/.pnpm/lru-queue@0.1.0/node_modules/lru-queue/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/ref-counter.js","../../node_modules/.pnpm/escape-path-with-spaces@1.0.2/node_modules/escape-path-with-spaces/index.js","../../node_modules/.pnpm/escape-quotes@1.0.2/node_modules/escape-quotes/lib/escape-quotes.js","../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/lib/numerous.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/locales/en.js","../../node_modules/.pnpm/is-node@1.0.2/node_modules/is-node/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/locales/en.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js","../../node_modules/.pnpm/node-downloader-helper@2.1.9/node_modules/node-downloader-helper/dist/index.js","../../packages/setup-apt/dist/apt-timeout.js","../../packages/setup-apt/dist/update.js","../../packages/setup-apt/dist/init-apt.js","../../node_modules/.pnpm/replace-ext@2.0.0/node_modules/replace-ext/index.js","../../src/utils/env/arch.ts","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","../../node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/manifest.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/retry-helper.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/opts-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-manual.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/find-made.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/path-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/use-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/index.js","../../src/versions/default_versions.ts","../../node_modules/.pnpm/ubuntu-version@2.0.0/node_modules/ubuntu-version/index.js","../../node_modules/.pnpm/macos-release@3.3.0/node_modules/macos-release/index.js","../../src/utils/env/macos_version.ts","../../src/nala/nala.ts","../../src/vcpkg/vcpkg.ts","../../src/tool.ts","../../src/bazel/bazel.ts","../../src/conan/conan.ts","../../src/meson/meson.ts","../../src/ccache/ccache.ts","../../src/sccache/sccache.ts","../../src/cppcheck/cppcheck.ts","../../src/make/make.ts","../../src/setup-cpp.ts","../../src/check-updates.ts","../../src/compilers.ts"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","export function getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new DecodedURL(proxyVar);\n }\n catch {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new DecodedURL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexport function checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\nclass DecodedURL extends URL {\n _decodedUsername;\n _decodedPassword;\n constructor(url, base) {\n super(url, base);\n this._decodedUsername = decodeURIComponent(super.username);\n this._decodedPassword = decodeURIComponent(super.password);\n }\n get username() {\n return this._decodedUsername;\n }\n get password() {\n return this._decodedPassword;\n }\n}\n//# sourceMappingURL=proxy.js.map","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","import * as core from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nexport function error(err) {\n return GITHUB_ACTIONS ? core.error(err) : console.log(`\\x1b[31m${err}\\x1b[0m`);\n}\nexport function success(msg) {\n return console.log(`\\x1b[32m${msg}\\x1b[0m`);\n}\nexport function warning(msg) {\n return GITHUB_ACTIONS ? core.warning(msg) : console.log(`\\x1b[33m${msg}\\x1b[0m`);\n}\nexport function notice(msg) {\n return GITHUB_ACTIONS ? core.notice(msg) : console.log(`\\x1b[94m${msg}\\x1b[0m`);\n}\nexport function info(msg) {\n return GITHUB_ACTIONS ? core.info(msg) : console.log(msg);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxlQUFlLENBQU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QUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgY29yZSBmcm9tIFwiQGFjdGlvbnMvY29yZVwiXG5pbXBvcnQgeyBHSVRIVUJfQUNUSU9OUyB9IGZyb20gXCJjaS1pbmZvXCJcblxuZXhwb3J0IGZ1bmN0aW9uIGVycm9yKGVycjogc3RyaW5nIHwgRXJyb3IpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5lcnJvcihlcnIpIDogY29uc29sZS5sb2coYFxceDFiWzMxbSR7ZXJyfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHN1Y2Nlc3MobXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIGNvbnNvbGUubG9nKGBcXHgxYlszMm0ke21zZ31cXHgxYlswbWApXG59XG5cbmV4cG9ydCBmdW5jdGlvbiB3YXJuaW5nKG1zZzogc3RyaW5nKSB7XG4gIHJldHVybiBHSVRIVUJfQUNUSU9OUyA/IGNvcmUud2FybmluZyhtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzMzbSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vdGljZShtc2c6IHN0cmluZykge1xuICByZXR1cm4gR0lUSFVCX0FDVElPTlMgPyBjb3JlLm5vdGljZShtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzk0bSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGluZm8obXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5pbmZvKG1zZykgOiBjb25zb2xlLmxvZyhtc2cpXG59XG4iXX0=","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n","export function isStream(stream) {\n\treturn stream !== null\n\t\t&& typeof stream === 'object'\n\t\t&& typeof stream.pipe === 'function';\n}\n\nexport function isWritableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.writable !== false\n\t\t&& typeof stream._write === 'function'\n\t\t&& typeof stream._writableState === 'object';\n}\n\nexport function isReadableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.readable !== false\n\t\t&& typeof stream._read === 'function'\n\t\t&& typeof stream._readableState === 'object';\n}\n\nexport function isDuplexStream(stream) {\n\treturn isWritableStream(stream)\n\t\t&& isReadableStream(stream);\n}\n\nexport function isTransformStream(stream) {\n\treturn isDuplexStream(stream)\n\t\t&& typeof stream._transform === 'function';\n}\n","'use strict';\nconst {constants: BufferConstants} = require('buffer');\nconst stream = require('stream');\nconst {promisify} = require('util');\nconst bufferStream = require('./buffer-stream');\n\nconst streamPipelinePromisified = promisify(stream.pipeline);\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nasync function getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\tthrow new Error('Expected a stream');\n\t}\n\n\toptions = {\n\t\tmaxBuffer: Infinity,\n\t\t...options\n\t};\n\n\tconst {maxBuffer} = options;\n\tconst stream = bufferStream(options);\n\n\tawait new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\t// Don't retrieve an oversized buffer.\n\t\t\tif (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\n\t\t\treject(error);\n\t\t};\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tawait streamPipelinePromisified(inputStream, stream);\n\t\t\t\tresolve();\n\t\t\t} catch (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t}\n\t\t})();\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t});\n\n\treturn stream.getBufferedValue();\n}\n\nmodule.exports = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});\nmodule.exports.array = (stream, options) => getStream(stream, {...options, array: true});\nmodule.exports.MaxBufferError = MaxBufferError;\n","import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n","import os from 'node:os';\nimport onExit from 'signal-exit';\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior\nexport const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {\n\tconst killResult = kill(signal);\n\tsetKillTimeout(kill, signal, options, killResult);\n\treturn killResult;\n};\n\nconst setKillTimeout = (kill, signal, options, killResult) => {\n\tif (!shouldForceKill(signal, options, killResult)) {\n\t\treturn;\n\t}\n\n\tconst timeout = getForceKillAfterTimeout(options);\n\tconst t = setTimeout(() => {\n\t\tkill('SIGKILL');\n\t}, timeout);\n\n\t// Guarded because there's no `.unref()` when `execa` is used in the renderer\n\t// process in Electron. This cannot be tested since we don't run tests in\n\t// Electron.\n\t// istanbul ignore else\n\tif (t.unref) {\n\t\tt.unref();\n\t}\n};\n\nconst shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;\n\nconst isSigterm = signal => signal === os.constants.signals.SIGTERM\n\t\t|| (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');\n\nconst getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {\n\tif (forceKillAfterTimeout === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterTimeout\\` option to be a non-negative integer, got \\`${forceKillAfterTimeout}\\` (${typeof forceKillAfterTimeout})`);\n\t}\n\n\treturn forceKillAfterTimeout;\n};\n\n// `childProcess.cancel()`\nexport const spawnedCancel = (spawned, context) => {\n\tconst killResult = spawned.kill();\n\n\tif (killResult) {\n\t\tcontext.isCanceled = true;\n\t}\n};\n\nconst timeoutKill = (spawned, signal, reject) => {\n\tspawned.kill(signal);\n\treject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));\n};\n\n// `timeout` option handling\nexport const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {\n\tif (timeout === 0 || timeout === undefined) {\n\t\treturn spawnedPromise;\n\t}\n\n\tlet timeoutId;\n\tconst timeoutPromise = new Promise((resolve, reject) => {\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutKill(spawned, killSignal, reject);\n\t\t}, timeout);\n\t});\n\n\tconst safeSpawnedPromise = spawnedPromise.finally(() => {\n\t\tclearTimeout(timeoutId);\n\t});\n\n\treturn Promise.race([timeoutPromise, safeSpawnedPromise]);\n};\n\nexport const validateTimeout = ({timeout}) => {\n\tif (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) {\n\t\tthrow new TypeError(`Expected the \\`timeout\\` option to be a non-negative integer, got \\`${timeout}\\` (${typeof timeout})`);\n\t}\n};\n\n// `cleanup` option handling\nexport const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {\n\tif (!cleanup || detached) {\n\t\treturn timedPromise;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tspawned.kill();\n\t});\n\n\treturn timedPromise.finally(() => {\n\t\tremoveExitHandler();\n\t});\n};\n","// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n","import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n","import {createWriteStream} from 'node:fs';\nimport {ChildProcess} from 'node:child_process';\nimport {isWritableStream} from 'is-stream';\n\nconst isExecaChildProcess = target => target instanceof ChildProcess && typeof target.then === 'function';\n\nconst pipeToTarget = (spawned, streamName, target) => {\n\tif (typeof target === 'string') {\n\t\tspawned[streamName].pipe(createWriteStream(target));\n\t\treturn spawned;\n\t}\n\n\tif (isWritableStream(target)) {\n\t\tspawned[streamName].pipe(target);\n\t\treturn spawned;\n\t}\n\n\tif (!isExecaChildProcess(target)) {\n\t\tthrow new TypeError('The second argument must be a string, a stream or an Execa child process.');\n\t}\n\n\tif (!isWritableStream(target.stdin)) {\n\t\tthrow new TypeError('The target child process\\'s stdin must be available.');\n\t}\n\n\tspawned[streamName].pipe(target.stdin);\n\treturn target;\n};\n\nexport const addPipeMethods = spawned => {\n\tif (spawned.stdout !== null) {\n\t\tspawned.pipeStdout = pipeToTarget.bind(undefined, spawned, 'stdout');\n\t}\n\n\tif (spawned.stderr !== null) {\n\t\tspawned.pipeStderr = pipeToTarget.bind(undefined, spawned, 'stderr');\n\t}\n\n\tif (spawned.all !== undefined) {\n\t\tspawned.pipeAll = pipeToTarget.bind(undefined, spawned, 'all');\n\t}\n};\n","import * as execa from \"execa\";\nimport which from \"which\";\n/** The cached powershell path */\nlet powershell;\n/**\n * Asynchronously execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns A promise to the execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershell(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execa(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns The execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershellSync(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execaSync(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Get the path to the powershell executable.\n *\n * @note It prefers `pwsh` over `powershell`\n * @note It caches the path for the subsequent calls to this function\n */\nexport function getPowerShell() {\n if (powershell === undefined) {\n const maybePwsh = which.sync(\"pwsh\", { nothrow: true });\n if (maybePwsh !== null) {\n powershell = maybePwsh;\n }\n const maybePowerShell = which.sync(\"powershell\", { nothrow: true });\n if (maybePowerShell !== null) {\n powershell = maybePowerShell;\n }\n }\n if (powershell === undefined) {\n throw new Error(\"Could not find powershell\");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2Vyc2hlbGxgXG4gKiBAbm90ZSBJdCBjYWNoZXMgdGhlIHBhdGggZm9yIHRoZSBzdWJzZXF1ZW50IGNhbGxzIHRvIHRoaXMgZnVuY3Rpb25cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldFBvd2VyU2hlbGwoKSB7XG4gIGlmIChwb3dlcnNoZWxsID09PSB1bmRlZmluZWQpIHtcbiAgICBjb25zdCBtYXliZVB3c2ggPSB3aGljaC5zeW5jKFwicHdzaFwiLCB7IG5vdGhyb3c6IHRydWUgfSlcbiAgICBpZiAobWF5YmVQd3NoICE9PSBudWxsKSB7XG4gICAgICBwb3dlcnNoZWxsID0gbWF5YmVQd3NoXG4gICAgfVxuICAgIGNvbnN0IG1heWJlUG93ZXJTaGVsbCA9IHdoaWNoLnN5bmMoXCJwb3dlcnNoZWxsXCIsIHsgbm90aHJvdzogdHJ1ZSB9KVxuICAgIGlmIChtYXliZVBvd2VyU2hlbGwgIT09IG51bGwpIHtcbiAgICAgIHBvd2Vyc2hlbGwgPSBtYXliZVBvd2VyU2hlbGxcbiAgICB9XG4gIH1cbiAgaWYgKHBvd2Vyc2hlbGwgPT09IHVuZGVmaW5lZCkge1xuICAgIHRocm93IG5ldyBFcnJvcihcIkNvdWxkIG5vdCBmaW5kIHBvd2Vyc2hlbGxcIilcbiAgfVxuICByZXR1cm4gcG93ZXJzaGVsbFxufVxuIl19","function e(e,t,r,o){Object.defineProperty(e,t,{get:r,set:o,enumerable:!0,configurable:!0})}function t(){return null!==m.sync(\"sudo\",{nothrow:!0})}function r(){return process.getuid?.()===0||!!process.env.CI}function o(){return r()&&t()}function n(e){return o()?`sudo ${e}`:e}function s(e,t=[],r=h){return o()?b(a(e,t),r):l(e,i(t),r)}function c(e,t=[],r=h){return o()?y(a(e,t),r):S(e,i(t),r)}function a(e,t){return`sudo ${i([e,...t]).join(\" \")}`}function i(e){return e.map(e=>`'${e}'`)}async function d(){try{return await S(\"fltmc\"),!0}catch{return!1}}async function u(){if(\"win32\"!==process.platform)return!1;try{return await S(\"fsutil\",[\"dirty\",\"query\",process.env.systemdrive??\"\"]),!0}catch(e){if(\"ENOENT\"===e.code)return d();return!1}}function f(){return\"win32\"===process.platform?R():r()}async function p(e){if((\"linux\"===process.platform||\"darwin\"===process.platform)&&o()&&void 0!==process.env.SUDO_USER){let t=w.statSync(e).isDirectory();await c(\"chown\",[...t?[\"-R\"]:[],process.env.SUDO_USER,e],h)}}var $,x={};import m from\"which\";import{execaCommandSync as b,execaSync as l,execaCommand as y,execa as S}from\"execa\";import w from\"fs\";e(x,\"hasSudo\",()=>t),e(x,\"isRoot\",()=>r),e(x,\"isSudo\",()=>o),e(x,\"prependSudo\",()=>n),e(x,\"defaultExecOptions\",()=>h),e(x,\"execRootSync\",()=>s),e(x,\"execRoot\",()=>c);let h={stdio:\"inherit\",shell:!0};e($={},\"isAdminWindows\",()=>R),e($,\"isAdminPosix\",()=>A),e($,\"isAdmin\",()=>f);let R=u,A=r;e({},\"grantUserWriteAccess\",()=>p);export{t as hasSudo,r as isRoot,o as isSudo,n as prependSudo,h as defaultExecOptions,s as execRootSync,c as execRoot,R as isAdminWindows,A as isAdminPosix,f as isAdmin,p as grantUserWriteAccess};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\n\nvar value = require(\"./valid-value\")\n , defineProperty = Object.defineProperty\n , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor\n , getOwnPropertyNames = Object.getOwnPropertyNames\n , getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\nmodule.exports = function (target, source) {\n\tvar error, sourceObject = Object(value(source));\n\ttarget = Object(value(target));\n\tgetOwnPropertyNames(sourceObject).forEach(function (name) {\n\t\ttry {\n\t\t\tdefineProperty(target, name, getOwnPropertyDescriptor(source, name));\n\t\t} catch (e) { error = e; }\n\t});\n\tif (typeof getOwnPropertySymbols === \"function\") {\n\t\tgetOwnPropertySymbols(sourceObject).forEach(function (symbol) {\n\t\t\ttry {\n\t\t\t\tdefineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));\n\t\t\t} catch (e) { error = e; }\n\t\t});\n\t}\n\tif (error !== undefined) throw error;\n\treturn target;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? globalThis : require(\"./implementation\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tif (typeof globalThis !== \"object\") return false;\n\tif (!globalThis) return false;\n\treturn globalThis.Array === Array;\n};\n","var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ is resolved with global context, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n","\"use strict\";\n\nvar isSymbol = require(\"./is-symbol\");\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tif (!value) return false;\n\tif (typeof value === \"symbol\") return true;\n\tif (!value.constructor) return false;\n\tif (value.constructor.name !== \"Symbol\") return false;\n\treturn value[value.constructor.toStringTag] === \"Symbol\";\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")()\n\t? require(\"ext/global-this\").Symbol\n\t: require(\"./polyfill\");\n","\"use strict\";\n\nvar global = require(\"ext/global-this\")\n , validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar Symbol = global.Symbol;\n\tvar symbol;\n\tif (typeof Symbol !== \"function\") return false;\n\tsymbol = Symbol(\"test symbol\");\n\ttry { String(symbol); }\n\tcatch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n","// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"./validate-symbol\")\n , NativeSymbol = require(\"ext/global-this\").Symbol\n , generateName = require(\"./lib/private/generate-name\")\n , setupStandardSymbols = require(\"./lib/private/setup/standard-symbols\")\n , setupSymbolRegistry = require(\"./lib/private/setup/symbol-registry\");\n\nvar create = Object.create\n , defineProperties = Object.defineProperties\n , defineProperty = Object.defineProperty;\n\nvar SymbolPolyfill, HiddenSymbol, isNativeSafe;\n\nif (typeof NativeSymbol === \"function\") {\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n} else {\n\tNativeSymbol = null;\n}\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError(\"Symbol is not a constructor\");\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError(\"Symbol is not a constructor\");\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = description === undefined ? \"\" : String(description);\n\treturn defineProperties(symbol, {\n\t\t__description__: d(\"\", description),\n\t\t__name__: d(\"\", generateName(description))\n\t});\n};\n\nsetupStandardSymbols(SymbolPolyfill);\nsetupSymbolRegistry(SymbolPolyfill);\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d(\"\", function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return \"Symbol (\" + validateSymbol(this).__description__ + \")\"; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(\n\tSymbolPolyfill.prototype, SymbolPolyfill.toPrimitive,\n\td(\"\", function () {\n\t\tvar symbol = validateSymbol(this);\n\t\tif (typeof symbol === \"symbol\") return symbol;\n\t\treturn symbol.toString();\n\t})\n);\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(\"c\", \"Symbol\"));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])\n);\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])\n);\n","\"use strict\";\n\nvar d = require(\"d\");\n\nvar create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;\n\nvar created = create(null);\nmodule.exports = function (desc) {\n\tvar postfix = 0, name, ie11BugWorkaround;\n\twhile (created[desc + (postfix || \"\")]) ++postfix;\n\tdesc += postfix || \"\";\n\tcreated[desc] = true;\n\tname = \"@@\" + desc;\n\tdefineProperty(\n\t\tobjPrototype, name,\n\t\td.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t// ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t})\n\t);\n\treturn name;\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , NativeSymbol = require(\"ext/global-this\").Symbol;\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t\t// fallback to eventual native implementation of given symbol\n\t\thasInstance: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill(\"hasInstance\")\n\t\t),\n\t\tisConcatSpreadable: d(\n\t\t\t\"\",\n\t\t\t(NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\t\t\tSymbolPolyfill(\"isConcatSpreadable\")\n\t\t),\n\t\titerator: d(\"\", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill(\"iterator\")),\n\t\tmatch: d(\"\", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill(\"match\")),\n\t\treplace: d(\"\", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill(\"replace\")),\n\t\tsearch: d(\"\", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill(\"search\")),\n\t\tspecies: d(\"\", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill(\"species\")),\n\t\tsplit: d(\"\", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill(\"split\")),\n\t\ttoPrimitive: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill(\"toPrimitive\")\n\t\t),\n\t\ttoStringTag: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill(\"toStringTag\")\n\t\t),\n\t\tunscopables: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill(\"unscopables\")\n\t\t)\n\t});\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"../../../validate-symbol\");\n\nvar registry = Object.create(null);\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\tfor: d(function (key) {\n\t\t\tif (registry[key]) return registry[key];\n\t\t\treturn (registry[key] = SymbolPolyfill(String(key)));\n\t\t}),\n\t\tkeyFor: d(function (symbol) {\n\t\t\tvar key;\n\t\t\tvalidateSymbol(symbol);\n\t\t\tfor (key in registry) {\n\t\t\t\tif (registry[key] === symbol) return key;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t});\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Array.from : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && result !== arr && result[1] === \"dwa\");\n};\n","\"use strict\";\n\nvar iteratorSymbol = require(\"es6-symbol\").iterator\n , isArguments = require(\"../../function/is-arguments\")\n , isFunction = require(\"../../function/is-function\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , callable = require(\"../../object/valid-callable\")\n , validValue = require(\"../../object/valid-value\")\n , isValue = require(\"../../object/is-value\")\n , isString = require(\"../../string/is-string\")\n , isArray = Array.isArray\n , call = Function.prototype.call\n , desc = { configurable: true, enumerable: true, writable: true, value: null }\n , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity, max-lines-per-function\nmodule.exports = function (arrayLike /*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t , thisArg = arguments[2]\n\t , Context\n\t , i\n\t , j\n\t , arr\n\t , length\n\t , code\n\t , iterator\n\t , result\n\t , getIterator\n\t , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array((length = arrayLike.length));\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , id = objToString.call((function () { return arguments; })());\n\nmodule.exports = function (value) { return objToString.call(value) === id; };\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && isFunctionStringTag(objToString.call(value));\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n","\"use strict\";\n\nvar numberIsNaN = require(\"../../number/is-nan\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , value = require(\"../../object/valid-value\")\n , indexOf = Array.prototype.indexOf\n , objHasOwnProperty = Object.prototype.hasOwnProperty\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (searchElement /*, fromIndex*/) {\n\tvar i, length, fromIndex, val;\n\tif (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);\n\n\tlength = toPosInt(value(this).length);\n\tfromIndex = arguments[1];\n\tif (isNaN(fromIndex)) fromIndex = 0;\n\telse if (fromIndex >= 0) fromIndex = floor(fromIndex);\n\telse fromIndex = toPosInt(this.length) - floor(abs(fromIndex));\n\n\tfor (i = fromIndex; i < length; ++i) {\n\t\tif (objHasOwnProperty.call(this, i)) {\n\t\t\tval = this[i];\n\t\t\tif (numberIsNaN(val)) return i; // Jslint: ignore\n\t\t}\n\t}\n\treturn -1;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Number.isNaN : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar numberIsNaN = Number.isNaN;\n\tif (typeof numberIsNaN !== \"function\") return false;\n\treturn !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\t// eslint-disable-next-line no-self-compare\n\treturn value !== value;\n};\n","\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , forEach = require(\"./for-each\")\n , call = Function.prototype.call;\n\nmodule.exports = function (obj, cb /*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n","'use strict';\n\nvar ensureCallable = function (fn) {\n\tif (typeof fn !== 'function') throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\nvar byObserver = function (Observer) {\n\tvar node = document.createTextNode(''), queue, currentQueue, i = 0;\n\tnew Observer(function () {\n\t\tvar callback;\n\t\tif (!queue) {\n\t\t\tif (!currentQueue) return;\n\t\t\tqueue = currentQueue;\n\t\t} else if (currentQueue) {\n\t\t\tqueue = currentQueue.concat(queue);\n\t\t}\n\t\tcurrentQueue = queue;\n\t\tqueue = null;\n\t\tif (typeof currentQueue === 'function') {\n\t\t\tcallback = currentQueue;\n\t\t\tcurrentQueue = null;\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\tnode.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash\n\t\twhile (currentQueue) {\n\t\t\tcallback = currentQueue.shift();\n\t\t\tif (!currentQueue.length) currentQueue = null;\n\t\t\tcallback();\n\t\t}\n\t}).observe(node, { characterData: true });\n\treturn function (fn) {\n\t\tensureCallable(fn);\n\t\tif (queue) {\n\t\t\tif (typeof queue === 'function') queue = [queue, fn];\n\t\t\telse queue.push(fn);\n\t\t\treturn;\n\t\t}\n\t\tqueue = fn;\n\t\tnode.data = (i = ++i % 2);\n\t};\n};\n\nmodule.exports = (function () {\n\t// Node.js\n\tif ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) {\n\t\treturn process.nextTick;\n\t}\n\n\t// queueMicrotask\n\tif (typeof queueMicrotask === \"function\") {\n\t\treturn function (cb) { queueMicrotask(ensureCallable(cb)); };\n\t}\n\n\t// MutationObserver\n\tif ((typeof document === 'object') && document) {\n\t\tif (typeof MutationObserver === 'function') return byObserver(MutationObserver);\n\t\tif (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver);\n\t}\n\n\t// W3C Draft\n\t// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html\n\tif (typeof setImmediate === 'function') {\n\t\treturn function (cb) { setImmediate(ensureCallable(cb)); };\n\t}\n\n\t// Wide available standard\n\tif ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) {\n\t\treturn function (cb) { setTimeout(ensureCallable(cb), 0); };\n\t}\n\n\treturn null;\n}());\n","// Deprecated\n\n\"use strict\";\n\nmodule.exports = function (obj) { return typeof obj === \"function\"; };\n","module.exports = isPromise;\nmodule.exports.default = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","/* eslint max-statements: 0 */\n\n// Support for functions returning promise\n\n\"use strict\";\n\nvar objectMap = require(\"es5-ext/object/map\")\n , primitiveSet = require(\"es5-ext/object/primitive-set\")\n , ensureString = require(\"es5-ext/object/validate-stringifiable-value\")\n , toShortString = require(\"es5-ext/to-short-string-representation\")\n , isPromise = require(\"is-promise\")\n , nextTick = require(\"next-tick\");\n\nvar create = Object.create\n , supportedModes = primitiveSet(\"then\", \"then:finally\", \"done\", \"done:finally\");\n\nrequire(\"../lib/registered-extensions\").promise = function (mode, conf) {\n\tvar waiting = create(null), cache = create(null), promises = create(null);\n\n\tif (mode === true) {\n\t\tmode = null;\n\t} else {\n\t\tmode = ensureString(mode);\n\t\tif (!supportedModes[mode]) {\n\t\t\tthrow new TypeError(\"'\" + toShortString(mode) + \"' is not valid promise mode\");\n\t\t}\n\t}\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id, ignore, promise) {\n\t\tvar isFailed = false;\n\n\t\tif (!isPromise(promise)) {\n\t\t\t// Non promise result\n\t\t\tcache[id] = promise;\n\t\t\tconf.emit(\"setasync\", id, 1);\n\t\t\treturn;\n\t\t}\n\t\twaiting[id] = 1;\n\t\tpromises[id] = promise;\n\t\tvar onSuccess = function (result) {\n\t\t\tvar count = waiting[id];\n\t\t\tif (isFailed) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Detected unordered then|done & finally resolution, which \" +\n\t\t\t\t\t\t\"in turn makes proper detection of success/failure impossible (when in \" +\n\t\t\t\t\t\t\"'done:finally' mode)\\n\" +\n\t\t\t\t\t\t\"Consider to rely on 'then' or 'done' mode instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!count) return; // Deleted from cache before resolved\n\t\t\tdelete waiting[id];\n\t\t\tcache[id] = result;\n\t\t\tconf.emit(\"setasync\", id, count);\n\t\t};\n\t\tvar onFailure = function () {\n\t\t\tisFailed = true;\n\t\t\tif (!waiting[id]) return; // Deleted from cache (or succeed in case of finally)\n\t\t\tdelete waiting[id];\n\t\t\tdelete promises[id];\n\t\t\tconf.delete(id);\n\t\t};\n\n\t\tvar resolvedMode = mode;\n\t\tif (!resolvedMode) resolvedMode = \"then\";\n\n\t\tif (resolvedMode === \"then\") {\n\t\t\tvar nextTickFailure = function () { nextTick(onFailure); };\n\t\t\t// Eventual finally needs to be attached to non rejected promise\n\t\t\t// (so we not force propagation of unhandled rejection)\n\t\t\tpromise = promise.then(function (result) {\n\t\t\t\tnextTick(onSuccess.bind(this, result));\n\t\t\t}, nextTickFailure);\n\t\t\t// If `finally` is a function we attach to it to remove cancelled promises.\n\t\t\tif (typeof promise.finally === \"function\") {\n\t\t\t\tpromise.finally(nextTickFailure);\n\t\t\t}\n\t\t} else if (resolvedMode === \"done\") {\n\t\t\t// Not recommended, as it may mute any eventual \"Unhandled error\" events\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess, onFailure);\n\t\t} else if (resolvedMode === \"done:finally\") {\n\t\t\t// The only mode with no side effects assuming library does not throw unconditionally\n\t\t\t// for rejected promises.\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof promise.finally !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'finally' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess);\n\t\t\tpromise.finally(onFailure);\n\t\t}\n\t});\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id, args, context) {\n\t\tvar promise;\n\t\tif (waiting[id]) {\n\t\t\t++waiting[id]; // Still waiting\n\t\t\treturn;\n\t\t}\n\t\tpromise = promises[id];\n\t\tvar emit = function () { conf.emit(\"getasync\", id, args, context); };\n\t\tif (isPromise(promise)) {\n\t\t\tif (typeof promise.done === \"function\") promise.done(emit);\n\t\t\telse {\n\t\t\t\tpromise.then(function () { nextTick(emit); });\n\t\t\t}\n\t\t} else {\n\t\t\temit();\n\t\t}\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tdelete promises[id];\n\t\tif (waiting[id]) {\n\t\t\tdelete waiting[id];\n\t\t\treturn; // Not yet resolved\n\t\t}\n\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\tvar result = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, [result]);\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\twaiting = create(null);\n\t\tpromises = create(null);\n\t\tconf.emit(\"clearasync\", objectMap(oldCache, function (data) { return [data]; }));\n\t});\n};\n","\"use strict\";\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (arg /*, …args*/) {\n\tvar set = create(null);\n\tforEach.call(arguments, function (name) { set[name] = true; });\n\treturn set;\n};\n","\"use strict\";\n\nvar ensureValue = require(\"./valid-value\")\n , stringifiable = require(\"./validate-stringifiable\");\n\nmodule.exports = function (value) { return stringifiable(ensureValue(value)); };\n","\"use strict\";\n\nvar isCallable = require(\"./is-callable\");\n\nmodule.exports = function (stringifiable) {\n\ttry {\n\t\tif (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString();\n\t\treturn String(stringifiable);\n\t} catch (e) {\n\t\tthrow new TypeError(\"Passed argument cannot be stringifed\");\n\t}\n};\n","\"use strict\";\n\nvar safeToString = require(\"./safe-to-string\");\n\nvar reNewLine = /[\\n\\r\\u2028\\u2029]/g;\n\nmodule.exports = function (value) {\n\tvar string = safeToString(value);\n\t// Trim if too long\n\tif (string.length > 100) string = string.slice(0, 99) + \"…\";\n\t// Replace eventual new lines\n\tstring = string.replace(reNewLine, function (char) {\n\t\treturn JSON.stringify(char).slice(1, -1);\n\t});\n\treturn string;\n};\n","\"use strict\";\n\nvar isCallable = require(\"./object/is-callable\");\n\nmodule.exports = function (value) {\n\ttry {\n\t\tif (value && isCallable(value.toString)) return value.toString();\n\t\treturn String(value);\n\t} catch (e) {\n\t\treturn \"\";\n\t}\n};\n","import fs, {promises as fsPromises} from 'node:fs';\n\nexport async function pathExists(path) {\n\ttry {\n\t\tawait fsPromises.access(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function pathExistsSync(path) {\n\ttry {\n\t\tfs.accessSync(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { homedir } from \"os\";\nimport { join } from \"path\";\nimport { isSudo } from \"admina\";\nexport function userHomeDir() {\n if (isSudo() && typeof process.env.SUDO_USER === \"string\" && process.env.SUDO_USER !== \"\") {\n // use the user profile even if root\n if (process.platform === \"darwin\") {\n return join(\"/Users/\", process.env.SUDO_USER);\n }\n else {\n return join(\"/home/\", process.env.SUDO_USER);\n }\n }\n else {\n const maybeHomeDir = homedir();\n if (maybeHomeDir === \"\") {\n return undefined;\n }\n return maybeHomeDir;\n }\n}\nconst tildeRegex = /^~(?=$|\\/|\\\\)/;\n/**\n * Replaces a tilde with the user's home directory\n *\n * @example UntildifyUser(\"~/foo\") // /home/user/foo\n *\n * @param path The path to untildify\n * @returns The untildified path\n */\nexport function untildifyUser(path) {\n const maybeHomeDir = userHomeDir();\n if (maybeHomeDir === undefined) {\n return path;\n }\n return path.replace(tildeRegex, maybeHomeDir);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ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xuY29uc3QgdGlsZGVSZWdleCA9IC9efig/PSR8XFwvfFxcXFwpL1xuXG4vKipcbiAqIFJlcGxhY2VzIGEgdGlsZGUgd2l0aCB0aGUgdXNlcidzIGhvbWUgZGlyZWN0b3J5XG4gKlxuICogQGV4YW1wbGUgVW50aWxkaWZ5VXNlcihcIn4vZm9vXCIpIC8vIC9ob21lL3VzZXIvZm9vXG4gKlxuICogQHBhcmFtIHBhdGggVGhlIHBhdGggdG8gdW50aWxkaWZ5XG4gKiBAcmV0dXJucyBUaGUgdW50aWxkaWZpZWQgcGF0aFxuICovXG5leHBvcnQgZnVuY3Rpb24gdW50aWxkaWZ5VXNlcihwYXRoOiBzdHJpbmcpIHtcbiAgY29uc3QgbWF5YmVIb21lRGlyID0gdXNlckhvbWVEaXIoKVxuICBpZiAobWF5YmVIb21lRGlyID09PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gcGF0aFxuICB9XG5cbiAgcmV0dXJuIHBhdGgucmVwbGFjZSh0aWxkZVJlZ2V4LCBtYXliZUhvbWVEaXIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { grantUserWriteAccess } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport memoize from \"memoizee\";\nimport { pathExists } from \"path-exists\";\nimport { untildifyUser } from \"untildify-user\";\nconst { appendFile, readFile, writeFile } = promises;\nexport const defaultRcPath = untildifyUser(\"~/.bashrc\");\nasync function sourceRCInRc_(options) {\n const sourceRcString = options.guard === undefined\n ? `\\nsource \"${options.rcPath}\"\\n`\n : `\\n# ${options.guard}\\nif [[ \"$SOURCE_${options.guard.toUpperCase()}RC\" != 0 && -f \"${options.rcPath}\" ]]; then source \"${options.rcPath}\"; fi\\n`;\n try {\n await Promise.all([\n addRCHeader(options),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.bashrc\")),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.profile\")),\n ]);\n }\n catch (err) {\n warning(`Failed to add ${sourceRcString} to .profile or .bashrc. You should add it manually: ${err}`);\n }\n}\n/**\n * handles adding conditions to source rc file from .bashrc and .profile\n */\nexport const sourceRCInRc = memoize(sourceRCInRc_, { promise: true });\nasync function addRCHeader(options) {\n // a variable that prevents source rc from being called from .bashrc and .profile\n const rcHeader = options.guard === undefined\n ? \"\\n# Automatically Generated by envosman\\n\"\n : `\\n# Automatically Generated by envosman ${options.guard}\\nexport SOURCE_${options.guard.toUpperCase()}RC=0\\n`;\n if (await pathExists(options.rcPath)) {\n const rcContent = await readFile(options.rcPath, \"utf8\");\n if (!rcContent.includes(rcHeader)) {\n // already executed setupCppInProfile\n await appendFile(options.rcPath, `\\n${rcHeader}\\n`);\n info(`Added ${rcHeader} to ${options.rcPath}`);\n }\n }\n}\nasync function addSourceToTargetRc(sourceRcString, targetRcPath) {\n if (await pathExists(targetRcPath)) {\n const bashrcContent = await readFile(targetRcPath, \"utf-8\");\n if (!bashrcContent.includes(sourceRcString)) {\n await appendFile(targetRcPath, sourceRcString);\n info(`${sourceRcString} was added to ${targetRcPath}`);\n }\n }\n}\nexport async function finalizeRC(rcOptions) {\n if (await pathExists(rcOptions.rcPath)) {\n const entries = (await readFile(rcOptions.rcPath, \"utf-8\")).split(\"\\n\");\n const uniqueEntries = [...new Set(entries.reverse())].reverse(); // remove duplicates, keeping the latest entry\n await writeFile(rcOptions.rcPath, uniqueEntries.join(\"\\n\"));\n await grantUserWriteAccess(rcOptions.rcPath);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmMtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yYy1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQzdDLE9BQU8sRUFBRS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dXJjZVJjU3RyaW5nfSB3YXMgYWRkZWQgdG8gJHt0YXJnZXRSY1BhdGh9YClcbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGZpbmFsaXplUkMocmNPcHRpb25zOiBSY09wdGlvbnMpIHtcbiAgaWYgKGF3YWl0IHBhdGhFeGlzdHMocmNPcHRpb25zLnJjUGF0aCkpIHtcbiAgICBjb25zdCBlbnRyaWVzID0gKGF3YWl0IHJlYWRGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIFwidXRmLThcIikpLnNwbGl0KFwiXFxuXCIpXG5cbiAgICBjb25zdCB1bmlxdWVFbnRyaWVzID0gWy4uLm5ldyBTZXQoZW50cmllcy5yZXZlcnNlKCkpXS5yZXZlcnNlKCkgLy8gcmVtb3ZlIGR1cGxpY2F0ZXMsIGtlZXBpbmcgdGhlIGxhdGVzdCBlbnRyeVxuXG4gICAgYXdhaXQgd3JpdGVGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIHVuaXF1ZUVudHJpZXMuam9pbihcIlxcblwiKSlcblxuICAgIGF3YWl0IGdyYW50VXNlcldyaXRlQWNjZXNzKHJjT3B0aW9ucy5yY1BhdGgpXG4gIH1cbn1cbiJdfQ==","import { promises } from \"fs\";\nimport { exportVariable as ghExportVariable } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nimport { escapeString } from \"./utils.js\";\nconst { appendFile } = promises;\n/**\n * Add an environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addEnv(name, valGiven, givenOptions = {}) {\n const options = {\n escapeSpace: false,\n overwrite: true,\n rcPath: defaultRcPath,\n ...givenOptions,\n };\n const val = escapeString(valGiven ?? \"\", options.escapeSpace);\n try {\n if (GITHUB_ACTIONS) {\n try {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n ghExportVariable(name, val);\n }\n catch (err) {\n error(err);\n await addEnvSystem(name, val, options);\n }\n }\n else {\n await addEnvSystem(name, val, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to export environment variable ${name}=${val}. You should add it manually.`);\n }\n}\nasync function addEnvSystem(name, valGiven, options) {\n const val = valGiven ?? \"\";\n switch (process.platform) {\n case \"win32\": {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit\n await execPowershell(`[Environment]::SetEnvironmentVariable('${name}', '${val}', \"User\")`);\n info(`${name}='${val}' was set in the environment.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n if (!options.overwrite) {\n await appendFile(options.rcPath, `\\nif [ -z \"\\${${name}}\" ]; then export ${name}=\"${val}\"; fi\\n`);\n info(`if not defined ${name} then ${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n else {\n await appendFile(options.rcPath, `\\nexport ${name}=\"${val}\"\\n`);\n info(`${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n return;\n }\n default: {\n // fall through shell path modification\n }\n }\n process.env[name] = val;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hZGQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLGNBQWMsSUFBSSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUNsRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sU0FBUyxDQUFBO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ICcke3ZhbH0nLCBcIlVzZXJcIilgKVxuICAgICAgaW5mbyhgJHtuYW1lfT0nJHt2YWx9JyB3YXMgc2V0IGluIHRoZSBlbnZpcm9ubWVudC5gKVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGNhc2UgXCJsaW51eFwiOlxuICAgIGNhc2UgXCJkYXJ3aW5cIjoge1xuICAgICAgYXdhaXQgc291cmNlUkNJblJjKG9wdGlvbnMpXG4gICAgICBpZiAoIW9wdGlvbnMub3ZlcndyaXRlKSB7XG4gICAgICAgIGF3YWl0IGFwcGVuZEZpbGUob3B0aW9ucy5yY1BhdGgsIGBcXG5pZiBbIC16IFwiXFwkeyR7bmFtZX19XCIgXTsgdGhlbiBleHBvcnQgJHtuYW1lfT1cIiR7dmFsfVwiOyBmaVxcbmApXG4gICAgICAgIGluZm8oYGlmIG5vdCBkZWZpbmVkICR7bmFtZX0gdGhlbiAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgYXdhaXQgYXBwZW5kRmlsZShvcHRpb25zLnJjUGF0aCwgYFxcbmV4cG9ydCAke25hbWV9PVwiJHt2YWx9XCJcXG5gKVxuICAgICAgICBpbmZvKGAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGRlZmF1bHQ6IHtcbiAgICAgIC8vIGZhbGwgdGhyb3VnaCBzaGVsbCBwYXRoIG1vZGlmaWNhdGlvblxuICAgIH1cbiAgfVxuICBwcm9jZXNzLmVudltuYW1lXSA9IHZhbFxufVxuIl19","import escapeSpace from \"escape-path-with-spaces\";\nimport escapeQuote from \"escape-quotes\";\n/**\n * Escape a string for use in a shell command\n * @param valGiven The string to escape\n * @param shouldEscapeSpace Whether to escape spaces in the string\n *\n * @private\n */\nexport function escapeString(valGiven, shouldEscapeSpace = false) {\n const spaceEscaped = shouldEscapeSpace ? escapeSpace(valGiven) : valGiven;\n return escapeQuote(spaceEscaped, \"\\\"\", \"\\\\\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxXQUFXLE1BQU0seUJBQXlCLENBQUE7QUFDakQsT0FBTyxXQUFXLE1BQU0sZUFBZSxDQUFBO0FBRXZDOzs7Ozs7R0FNRztBQUNILE1BQU0sVUFBVSxZQUFZLENBQUMsUUFBZ0IsRUFBRSxvQkFBNkIsS0FBSztJQUMvRSxNQUFNLFlBQVksR0FBRyxpQkFBaUIsQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUE7SUFDekUsT0FBTyxXQUFXLENBQUMsWUFBWSxFQUFFLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQTtBQUM5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGVzY2FwZVNwYWNlIGZyb20gXCJlc2NhcGUtcGF0aC13aXRoLXNwYWNlc1wiXG5pbXBvcnQgZXNjYXBlUXVvdGUgZnJvbSBcImVzY2FwZS1xdW90ZXNcIlxuXG4vKipcbiAqIEVzY2FwZSBhIHN0cmluZyBmb3IgdXNlIGluIGEgc2hlbGwgY29tbWFuZFxuICogQHBhcmFtIHZhbEdpdmVuIFRoZSBzdHJpbmcgdG8gZXNjYXBlXG4gKiBAcGFyYW0gc2hvdWxkRXNjYXBlU3BhY2UgV2hldGhlciB0byBlc2NhcGUgc3BhY2VzIGluIHRoZSBzdHJpbmdcbiAqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgZnVuY3Rpb24gZXNjYXBlU3RyaW5nKHZhbEdpdmVuOiBzdHJpbmcsIHNob3VsZEVzY2FwZVNwYWNlOiBib29sZWFuID0gZmFsc2UpIHtcbiAgY29uc3Qgc3BhY2VFc2NhcGVkID0gc2hvdWxkRXNjYXBlU3BhY2UgPyBlc2NhcGVTcGFjZSh2YWxHaXZlbikgOiB2YWxHaXZlblxuICByZXR1cm4gZXNjYXBlUXVvdGUoc3BhY2VFc2NhcGVkLCBcIlxcXCJcIiwgXCJcXFxcXCIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { delimiter } from \"path\";\nimport { addPath as ghAddPath } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nconst { appendFile } = promises;\n/**\n * Add a path to the PATH environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addPath(path, givenOptions = {}) {\n const options = { rcPath: defaultRcPath, ...givenOptions };\n if (isIgnoredPath(path)) {\n return;\n }\n process.env.PATH = `${path}${delimiter}${process.env.PATH}`;\n try {\n if (GITHUB_ACTIONS) {\n try {\n ghAddPath(path);\n }\n catch (err) {\n error(err);\n await addPathSystem(path, options);\n }\n }\n else {\n await addPathSystem(path, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to add ${path} to the percistent PATH. You should add it manually.`);\n }\n}\nasync function addPathSystem(path, options) {\n switch (process.platform) {\n case \"win32\": {\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit and also because %PATH% is different for user and system\n await execPowershell(`$USER_PATH=([Environment]::GetEnvironmentVariable(\"PATH\", \"User\")); [Environment]::SetEnvironmentVariable(\"PATH\", \"${path};$USER_PATH\", \"User\")`);\n info(`\"${path}\" was added to the PATH.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n await appendFile(options.rcPath, `\\nexport PATH=\"${path}:$PATH\"\\n`);\n info(`\"${path}\" was added to \"${options.rcPath}\"`);\n return;\n }\n default: {\n return;\n }\n }\n}\nconst ignoredPaths = [/\\/usr\\/bin\\/?/, /\\/usr\\/local\\/bin\\/?/];\n/** Skip adding /usr/bin to PATH if it is already there */\nfunction isIgnoredPath(path) {\n if (ignoredPaths.some((checkedPath) => checkedPath.test(path))) {\n const paths = process.env.PATH?.split(delimiter) ?? [];\n return paths.includes(path);\n }\n return false;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLXBhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWRkLXBhdGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM3QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxPQUFPLElBQUksU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQ3BELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxTQUFTLENBQUE7QUFDeEMsT0FBTyxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDcEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGlCQUFpQixDQUFBO0FBQ2hELE9BQU8sRUFBRSxhQUFhLEVBQUUsWUFBWSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQzFELE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFhL0I7Ozs7R0FJRztBQUVILE1BQU0sQ0FBQyxLQUFLLFVBQVUsT0FBTyxDQUFDLElBQVksRUFBRSxlQUF3QyxFQUFFO0lBQ3BGLE1BQU0sT0FBTyxHQUFHLEVBQUUsTUFBTSxFQUFFLGFBQWEsRUFBRSxHQ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C50ZXN0KHBhdGgpKSkge1xuICAgIGNvbnN0IHBhdGhzID0gcHJvY2Vzcy5lbnYuUEFUSD8uc3BsaXQoZGVsaW1pdGVyKSA/PyBbXVxuICAgIHJldHVybiBwYXRocy5pbmNsdWRlcyhwYXRoKVxuICB9XG4gIHJldHVybiBmYWxzZVxufVxuIl19","\n//==============//\n// DEPENDENCIES //\n//==============//\n\nconst numerous = require('numerous');\nconst isNode = require('is-node');\n\n\n//================//\n// MODULE GLOBALS //\n//================//\n\n/**\n * Pre-calculating millisecond values for each time unit.\n */\nconst timeUnits = [\n ['years', 12 * 4 * 7 * 24 * 60 * 60 * 1000],\n ['months', 4 * 7 * 24 * 60 * 60 * 1000],\n ['weeks', 7 * 24 * 60 * 60 * 1000],\n ['days', 24 * 60 * 60 * 1000],\n ['hours', 60 * 60 * 1000],\n ['minutes', 60 * 1000],\n ['seconds', 1000],\n];\n\nconst defaultConfig = {\n locale: 'en',\n span: 2,\n delimiter: ', ',\n unitType: 'long',\n unitTypeLookupOrder: ['long', 'short', 'narrow'],\n autoloadLocales: true,\n};\n\n/**\n * Contains data of loaded locales.\n * @type {Object}\n */\nconst locales = {};\n\n\n//=========//\n// EXPORTS //\n//=========//\n\nmodule.exports = {\n create: timeDeltaFactory,\n addLocale,\n defaultConfig,\n};\n\n\n//===========//\n// FUNCTIONS //\n//===========//\n\n/**\n * Adds pluralization data for the specified locale.\n * Should be called in browser.\n *\n * @param {Object|Object[]} localeData\n */\nfunction addLocale(localeData) {\n\n // Normalizing input\n if (!Array.isArray(localeData)) {\n localeData = [localeData];\n }\n\n for (const item of localeData) {\n const { id, data } = item;\n locales[id] = data;\n }\n\n}\n\n\n/**\n * Creates new instance.\n *\n * @param {object?} config\n *\n * @returns {object}\n */\nfunction timeDeltaFactory(config) {\n\n // Initializing config by extending the default one\n config = Object.assign({}, defaultConfig, config || {});\n\n return {\n\n /**\n * Public proxy for internal format function.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object?} options\n *\n * @returns {string}\n */\n format: function (firstDate, secondDate, options) {\n\n // Allowing to override config with each individual call\n options = Object.assign({}, config, options || {});\n\n return format(firstDate, secondDate, options);\n\n }\n\n };\n\n}\n\n\n/**\n * Returns difference between two dates as a text string.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object} config\n *\n * @returns {string}\n */\nfunction format(firstDate, secondDate, config) {\n\n ensureLocaleLoadedOrThrow(config.locale, {\n autoload: config.autoloadLocales,\n });\n\n // Handling input arguments\n // -----\n\n if (!firstDate) {\n throw new Error('Missing first date argument');\n }\n\n if (!secondDate) {\n throw new Error('Missing second date argument');\n }\n\n // Calculating\n // -----\n\n const difference = getDifference(firstDate, secondDate);\n const parts = [];\n\n for (const unit of difference) {\n const [name, value] = unit;\n if (value > 0) {\n parts.push(pluralize(name, value, config));\n }\n if (parts.length >= config.span) {\n break;\n }\n }\n\n // Returning the string value\n return parts.join(config.delimiter);\n\n}\n\n\n/**\n * Checks if locale is loaded. If not, tries to load it in Node.js,\n * or throws and error in Browser.\n *\n * @param {string} locale\n * @param {Object?} options\n */\nfunction ensureLocaleLoadedOrThrow(locale, options) {\n\n const { autoload } = options;\n\n if (hasLocale(locale)) {\n return;\n }\n\n if (isNode && autoload) {\n requireLocale(locale);\n\n } else {\n throw new Error(\n `Missing locale: ${locale}, you must load it manually before using it`\n );\n }\n\n}\n\n\n/**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} localeId\n *\n * @returns {boolean}\n */\nfunction hasLocale(localeId) {\n return Boolean(locales[localeId]);\n}\n\n/**\n * Tries to load the specified locale.\n *\n * @param {string} localeId\n */\nfunction requireLocale(localeId) {\n try {\n addLocale(\n require(`../locales/${localeId}.js`)\n );\n\n } catch (error) {\n throw Error(\n `Failed to load locale: ${localeId} from ../locales/${localeId}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${error}`\n );\n\n }\n}\n\n\n/**\n * Returns difference as separate time units.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n *\n * @returns {Array}\n */\nfunction getDifference(firstDate, secondDate) {\n let difference = (secondDate - firstDate);\n const results = [];\n timeUnits.some(function (unit) {\n const name = unit[0];\n const divider = unit[1];\n const value = Math.floor(difference / divider);\n difference -= value * divider;\n results.push([name, value]);\n if (difference <= 0) {\n // Breaking the loop.\n return true;\n }\n });\n return results;\n}\n\n/**\n * Returns localized and pluralized time unit.\n *\n * @param {string} unit\n * @param {int} value\n * @param {object} config\n *\n * @returns {string}\n */\nfunction pluralize(unit, value, config) {\n const unitTypeData = getLocaleDataForUnitType(config);\n const unitString = numerous.pluralize(\n config.locale,\n value,\n unitTypeData[unit]\n );\n return unitString.replace('{0}', value);\n}\n\n\n/**\n * Returns locale data for preferred unit type.\n *\n * @param {object} config\n *\n * @returns {Array}\n */\nfunction getLocaleDataForUnitType(config) {\n\n const localeData = locales[config.locale];\n\n // Making a copy of array from config.\n let lookupOrder = config.unitTypeLookupOrder.slice();\n\n // Adding interested type to the top.\n lookupOrder.unshift(config.unitType);\n\n // Making sure only unique items are present.\n lookupOrder = arrayUnique(lookupOrder);\n\n let unitTypeData = null;\n lookupOrder.some(function (unitType) {\n if ('undefined' !== typeof localeData[unitType]) {\n unitTypeData = localeData[unitType];\n // Breaking the loop.\n return true;\n }\n });\n\n if (null === unitTypeData) {\n throw new Error('Can not find any unit type data for locale: ' + config.locale);\n }\n\n return unitTypeData;\n}\n\n/**\n * Returns array with only unique items.\n *\n * @param {Array} array\n *\n * @returns {Array}\n */\nfunction arrayUnique(array) {\n return Array.from(\n new Set(array)\n );\n}\n","const SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict';\n\nvar process$1 = require('process');\nvar semver = require('semver');\nvar os = require('os');\nvar path = require('path');\nvar fs = require('fs');\nvar https = require('https');\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar packageJson = process$1.env.npm_package_json;\nvar userAgent = process$1.env.npm_config_user_agent;\nvar isNpm6 = Boolean(userAgent && userAgent.startsWith('npm'));\nvar isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));\nvar isNpm = isNpm6 || isNpm7;\nvar isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));\nvar isNpmOrYarn = isNpm || isYarn;\n\nvar homeDirectory = os.homedir();\nvar configDir = process.env.XDG_CONFIG_HOME ||\n path.join(homeDirectory, '.config', 'simple-update-notifier');\nvar getConfigFile = function (packageName) {\n return path.join(configDir, \"\".concat(packageName.replace('@', '').replace('/', '__'), \".json\"));\n};\nvar createConfigDir = function () {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n};\nvar getLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n try {\n if (!fs.existsSync(configFile)) {\n return undefined;\n }\n var file = JSON.parse(fs.readFileSync(configFile, 'utf8'));\n return file.lastUpdateCheck;\n }\n catch (_a) {\n return undefined;\n }\n};\nvar saveLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n fs.writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: new Date().getTime() }));\n};\n\nvar getDistVersion = function (packageName, distTag) { return __awaiter(void 0, void 0, void 0, function () {\n var url;\n return __generator(this, function (_a) {\n url = \"https://registry.npmjs.org/-/package/\".concat(packageName, \"/dist-tags\");\n return [2 /*return*/, new Promise(function (resolve, reject) {\n https\n .get(url, function (res) {\n var body = '';\n res.on('data', function (chunk) { return (body += chunk); });\n res.on('end', function () {\n try {\n var json = JSON.parse(body);\n var version = json[distTag];\n if (!version) {\n reject(new Error('Error getting version'));\n }\n resolve(version);\n }\n catch (_a) {\n reject(new Error('Could not parse version response'));\n }\n });\n })\n .on('error', function (err) { return reject(err); });\n })];\n });\n}); };\n\nvar hasNewVersion = function (_a) {\n var pkg = _a.pkg, _b = _a.updateCheckInterval, updateCheckInterval = _b === void 0 ? 1000 * 60 * 60 * 24 : _b, _c = _a.distTag, distTag = _c === void 0 ? 'latest' : _c, alwaysRun = _a.alwaysRun, debug = _a.debug;\n return __awaiter(void 0, void 0, void 0, function () {\n var lastUpdateCheck, latestVersion;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n createConfigDir();\n lastUpdateCheck = getLastUpdate(pkg.name);\n if (!(alwaysRun ||\n !lastUpdateCheck ||\n lastUpdateCheck < new Date().getTime() - updateCheckInterval)) return [3 /*break*/, 2];\n return [4 /*yield*/, getDistVersion(pkg.name, distTag)];\n case 1:\n latestVersion = _d.sent();\n saveLastUpdate(pkg.name);\n if (semver.gt(latestVersion, pkg.version)) {\n return [2 /*return*/, latestVersion];\n }\n else if (debug) {\n console.error(\"Latest version (\".concat(latestVersion, \") not newer than current version (\").concat(pkg.version, \")\"));\n }\n return [3 /*break*/, 3];\n case 2:\n if (debug) {\n console.error(\"Too recent to check for a new update. simpleUpdateNotifier() interval set to \".concat(updateCheckInterval, \"ms but only \").concat(new Date().getTime() - lastUpdateCheck, \"ms since last check.\"));\n }\n _d.label = 3;\n case 3: return [2 /*return*/, false];\n }\n });\n });\n};\n\nvar borderedText = function (text) {\n var lines = text.split('\\n');\n var width = Math.max.apply(Math, lines.map(function (l) { return l.length; }));\n var res = [\"\\u250C\".concat('─'.repeat(width + 2), \"\\u2510\")];\n for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {\n var line = lines_1[_i];\n res.push(\"\\u2502 \".concat(line.padEnd(width), \" \\u2502\"));\n }\n res.push(\"\\u2514\".concat('─'.repeat(width + 2), \"\\u2518\"));\n return res.join('\\n');\n};\n\nvar simpleUpdateNotifier = function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var latestVersion, err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!args.alwaysRun &&\n (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))) {\n if (args.debug) {\n console.error('Opting out of running simpleUpdateNotifier()');\n }\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, hasNewVersion(args)];\n case 2:\n latestVersion = _a.sent();\n if (latestVersion) {\n console.error(borderedText(\"New version of \".concat(args.pkg.name, \" available!\\nCurrent Version: \").concat(args.pkg.version, \"\\nLatest Version: \").concat(latestVersion)));\n }\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n // Catch any network errors or cache writing errors so module doesn't cause a crash\n if (args.debug && err_1 instanceof Error) {\n console.error('Unexpected error in simpleUpdateNotifier():', err_1);\n }\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n}); };\n\nmodule.exports = simpleUpdateNotifier;\n","function toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\n\nfunction toVal(out, key, val, opts) {\n\tvar x, old=out[key], nxt=(\n\t\t!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))\n\t\t: typeof val === 'boolean' ? val\n\t\t: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))\n\t\t: (x = +val,x * 0 === 0) ? x : val\n\t);\n\tout[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);\n}\n\nexport default function (args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\n\tvar k, arr, arg, name, val, out={ _:[] };\n\tvar i=0, j=0, idx=0, len=args.length;\n\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\n\tif (alibi) {\n\t\tfor (k in opts.alias) {\n\t\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i=opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\n\tfor (i=opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tname = typeof opts.default[k];\n\t\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\t\tif (opts[name] !== void 0) {\n\t\t\t\topts[name].push(k);\n\t\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t\topts[name].push(arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\n\tfor (i=0; i < len; i++) {\n\t\targ = args[i];\n\n\t\tif (arg === '--') {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (j=0; j < arg.length; j++) {\n\t\t\tif (arg.charCodeAt(j) !== 45) break; // \"-\"\n\t\t}\n\n\t\tif (j === 0) {\n\t\t\tout._.push(arg);\n\t\t} else if (arg.substring(j, j + 3) === 'no-') {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) {\n\t\t\t\treturn opts.unknown(arg);\n\t\t\t}\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx=j+1; idx < arg.length; idx++) {\n\t\t\t\tif (arg.charCodeAt(idx) === 61) break; // \"=\"\n\t\t\t}\n\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);\n\t\t\tarr = (j === 2 ? [name] : name);\n\n\t\t\tfor (idx=0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);\n\t\t\t\ttoVal(out, name, (idx + 1 < arr.length) || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tif (out[k] === void 0) {\n\t\t\t\tout[k] = opts.default[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (alibi) {\n\t\tfor (k in out) {\n\t\t\tarr = opts.alias[k] || [];\n\t\t\twhile (arr.length > 0) {\n\t\t\t\tout[arr.shift()] = out[k];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n","import { promises } from \"fs\";\nimport { execRoot } from \"admina\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { sourceRC } from \"envosman\";\nconst { appendFile } = promises;\n/**\n * Update the alternatives for a package\n * @param name The name of the package\n * @param path The path to the binary\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function updateAptAlternatives(name, path, priority = 40) {\n await execRoot(\"update-alternatives\", [\"--install\", `/usr/bin/${name}`, name, path, priority.toString()]);\n}\n/**\n * Add the update-alternatives command to the rc file\n * @param name The name of the package\n * @param path The path to the binary\n * @param rcOptions The options for the rc file to add the update-alternatives command to\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function addUpdateAlternativesToRc(name, path, rcOptions, priority = 40) {\n if (GITHUB_ACTIONS) {\n await updateAptAlternatives(name, path, priority);\n }\n else {\n await sourceRC(rcOptions);\n await appendFile(rcOptions.rcPath, `\\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} ${priority}; fi\\n`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWx0ZXJuYXRpdmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FsdGVybmF0aXZlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sSUFBSSxDQUFBO0FBQzdCLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDakMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBRW5DLE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFFL0I7Ozs7O0dBS0c7QUFDSCxNQUFNL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Zlc1RvUmMoXG4gIG5hbWU6IHN0cmluZyxcbiAgcGF0aDogc3RyaW5nLFxuICByY09wdGlvbnM6IFJjT3B0aW9ucyxcbiAgcHJpb3JpdHk6IG51bWJlciA9IDQwLFxuKSB7XG4gIGlmIChHSVRIVUJfQUNUSU9OUykge1xuICAgIGF3YWl0IHVwZGF0ZUFwdEFsdGVybmF0aXZlcyhuYW1lLCBwYXRoLCBwcmlvcml0eSlcbiAgfSBlbHNlIHtcbiAgICBhd2FpdCBzb3VyY2VSQyhyY09wdGlvbnMpXG4gICAgYXdhaXQgYXBwZW5kRmlsZShcbiAgICAgIHJjT3B0aW9ucy5yY1BhdGgsXG4gICAgICBgXFxuaWYgWyAkVUlEIC1lcSAwIF07IHRoZW4gdXBkYXRlLWFsdGVybmF0aXZlcyAtLWluc3RhbGwgL3Vzci9iaW4vJHtuYW1lfSAke25hbWV9ICR7cGF0aH0gJHtwcmlvcml0eX07IGZpXFxuYCxcbiAgICApXG4gIH1cbn1cbiJdfQ==","/**\n * Get the environment variables to use for the apt command\n * @param apt The apt command to use\n * @private Used internally\n */\nexport function getAptEnv(apt) {\n const env = { ...process.env, DEBIAN_FRONTEND: \"noninteractive\" };\n if (apt === \"nala\") {\n // if LANG/LC_ALL is not set, enable utf8 otherwise nala fails because of ASCII encoding\n if (env.LANG === undefined) {\n env.LANG = \"C.UTF-8\";\n }\n if (env.LC_ALL === undefined) {\n env.LC_ALL = \"C.UTF-8\";\n }\n }\n return env;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFFSCxNQUFNLFVBQVUsU0FBUyxDQUFDLEdBQVc7SUFDbkMsTUFBTSxHQUFHLEdBQXNCLEVBQUUsR0FBRyxPQUFP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AgIGlmIChlbnYuTENfQUxMID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGVudi5MQ19BTEwgPSBcIkMuVVRGLThcIlxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBlbnZcbn1cbiJdfQ==","import which from \"which\";\n/**\n * Check if nala is installed\n */\nexport function hasNala() {\n return which.sync(\"nala\", { nothrow: true }) !== null;\n}\n/**\n * Get the apt command to use\n * If nala is installed, use that, otherwise use apt-get\n */\nexport function getApt() {\n let apt;\n if (hasNala()) {\n apt = \"nala\";\n }\n else {\n apt = \"apt-get\";\n }\n return apt;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9nZXQtYXB0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUV6Qjs7R0FFRztBQUNILE1BQU0sVUFBVSxPQUFPO0lBQ3JCLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLENBQUMsS0FBSyxJQUFJLENBQUE7QUFDdkQsQ0FBQztBQUVEOzs7R0FHRztBQUNILE1BQU0sVUFBVSxNQUFNO0lBQ3BCLElBQUksR0FBVyxDQUFBO0lBQ2YsSUFBSSxPQUFPLEVBQUUsRUFBRSxDQUFDO1FBQ2QsR0FBRyxHQUFHLE1BQU0sQ0FBQTtJQUNkLENBQUM7U0FBTSxDQUFDO1FBQ04sR0FBRyxHQUFHLFNBQVMsQ0FBQTtJQUNqQixDQUFDO0lBQ0QsT0FBTyxHQUFHLENBQUE7QUFDWixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHdoaWNoIGZyb20gXCJ3aGljaFwiXG5cbi8qKlxuICogQ2hlY2sgaWYgbmFsYSBpcyBpbnN0YWxsZWRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGhhc05hbGEoKSB7XG4gIHJldHVybiB3aGljaC5zeW5jKFwibmFsYVwiLCB7IG5vdGhyb3c6IHRydWUgfSkgIT09IG51bGxcbn1cblxuLyoqXG4gKiBHZXQgdGhlIGFwdCBjb21tYW5kIHRvIHVzZVxuICogSWYgbmFsYSBpcyBpbnN0YWxsZWQsIHVzZSB0aGF0LCBvdGhlcndpc2UgdXNlIGFwdC1nZXRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEFwdCgpIHtcbiAgbGV0IGFwdDogc3RyaW5nXG4gIGlmIChoYXNOYWxhKCkpIHtcbiAgICBhcHQgPSBcIm5hbGFcIlxuICB9IGVsc2Uge1xuICAgIGFwdCA9IFwiYXB0LWdldFwiXG4gIH1cbiAgcmV0dXJuIGFwdFxufVxuIl19","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","import { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\n/**\n * Check if a package is installed\n * @param pack The package to check\n * @returns `true` if the package is installed, `false` otherwise\n */\nexport async function isAptPackInstalled(pack) {\n try {\n // check if a package is installed\n const { stdout } = await execa(\"dpkg\", [\"-s\", pack], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains a line that starts with \"Status: install ok installed\"\n return lines.some((line) => line.startsWith(\"Status: install ok installed\"));\n }\n catch {\n return false;\n }\n}\n/**\n * Check if a package matching a regexp is installed\n * @param regexp The regexp to check\n * @returns `true` if a package is installed, `false` otherwise\n */\nexport async function isAptPackRegexInstalled(regexp) {\n try {\n // check if a package matching the regexp is installed\n const { stdout } = await execa(\"dpkg\", [\"-l\", regexp], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains any lines that start with \"ii\"\n return lines.some((line) => line.startsWith(\"ii\"));\n }\n catch {\n return false;\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtaW5zdGFsbGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2lzLWluc3RhbGxlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQzdCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFeEM7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxLQUFLLFVBQVUsa0JBQWtCLENBQUMsSUFBWTtJQUNuRCxJQUFJLENBQUM7UUFDSCxrQ0FBa0M7UUFDbEMsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLE1BQU0sS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLElBQUksRUFBRSxJQUFJLENBQUMsRUFBRSxFQUFFLEdBQUcsRUFBRSxTQUFTLENBQUMsU0FBUyxDQUFDLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUE7UUFDbEcsSUFBSSxPQUFPLE1BQU0sS0FBSyxRQUFRLEVBQUUsQ0FBQztZQUMvQixPQUFPLEtBQUssQ0FBQTtRQUNkLENBQUM7UUFDRCxNQUFNLEtBQUssR0FBRyxNQUFNLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFBO1FBQ2hDLHNGQUFzRjtRQUN0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AqIEByZXR1cm5zIGB0cnVlYCBpZiBhIHBhY2thZ2UgaXMgaW5zdGFsbGVkLCBgZmFsc2VgIG90aGVyd2lzZVxuICovXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gaXNBcHRQYWNrUmVnZXhJbnN0YWxsZWQocmVnZXhwOiBzdHJpbmcpIHtcbiAgdHJ5IHtcbiAgICAvLyBjaGVjayBpZiBhIHBhY2thZ2UgbWF0Y2hpbmcgdGhlIHJlZ2V4cCBpcyBpbnN0YWxsZWRcbiAgICBjb25zdCB7IHN0ZG91dCB9ID0gYXdhaXQgZXhlY2EoXCJkcGtnXCIsIFtcIi1sXCIsIHJlZ2V4cF0sIHsgZW52OiBnZXRBcHRFbnYoXCJhcHQtZ2V0XCIpLCBzdGRpbzogXCJwaXBlXCIgfSlcbiAgICBpZiAodHlwZW9mIHN0ZG91dCAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgcmV0dXJuIGZhbHNlXG4gICAgfVxuICAgIGNvbnN0IGxpbmVzID0gc3Rkb3V0LnNwbGl0KFwiXFxuXCIpXG4gICAgLy8gY2hlY2sgaWYgdGhlIG91dHB1dCBjb250YWlucyBhbnkgbGluZXMgdGhhdCBzdGFydCB3aXRoIFwiaWlcIlxuICAgIHJldHVybiBsaW5lcy5zb21lKChsaW5lKSA9PiBsaW5lLnN0YXJ0c1dpdGgoXCJpaVwiKSlcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlXG4gIH1cbn1cbiJdfQ==","import { warning } from \"ci-log\";\nimport escapeRegex from \"escape-string-regexp\";\nimport { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized, updatedRepos } from \"./update.js\";\n/**\n * The type of apt package to install\n */\nexport var AptPackageType;\n(function (AptPackageType) {\n AptPackageType[AptPackageType[\"NameDashVersion\"] = 0] = \"NameDashVersion\";\n AptPackageType[AptPackageType[\"NameEqualsVersion\"] = 1] = \"NameEqualsVersion\";\n AptPackageType[AptPackageType[\"Name\"] = 2] = \"Name\";\n AptPackageType[AptPackageType[\"None\"] = 3] = \"None\";\n})(AptPackageType || (AptPackageType = {}));\n/**\n * Filter out the packages that are already installed and qualify the packages into a full package name/version\n */\nexport async function filterAndQualifyAptPackages(packages, apt = getApt()) {\n return (await Promise.all(packages.map((pack) => qualifiedNeededAptPackage(pack, apt))))\n .filter((pack) => pack !== undefined);\n}\n/**\n * Qualify the package into full package name/version.\n * If the package is not installed, return the full package name/version.\n * If the package is already installed, return undefined\n */\nexport async function qualifiedNeededAptPackage(pack, apt = getApt()) {\n // Qualify the package into full package name/version\n const qualified = await getAptArg(apt, pack.name, pack.version);\n // filter out the package that are already installed\n return (await isAptPackInstalled(qualified)) ? undefined : qualified;\n}\nasync function aptPackageType(apt, name, version) {\n if (version !== undefined && version !== \"\") {\n const { stdout } = await execa(\"apt-cache\", [\n \"search\",\n \"--names-only\",\n `^${escapeRegex(name)}-${escapeRegex(version)}$`,\n ], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (stdout.trim() !== \"\") {\n return AptPackageType.NameDashVersion;\n }\n try {\n // check if apt-get show can find the version\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"apt-cache\", [\"show\", `${name}=${version}`], { env: getAptEnv(apt) });\n if (stdout.trim() === \"\") {\n return AptPackageType.NameEqualsVersion;\n }\n }\n catch {\n // ignore\n }\n }\n try {\n const { stdout: showStdout } = await execa(\"apt-cache\", [\"show\", name], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (showStdout.trim() !== \"\") {\n return AptPackageType.Name;\n }\n }\n catch {\n // ignore\n }\n // If apt-cache fails, update the repos and try again\n if (!updatedRepos) {\n updateAptReposMemoized(apt);\n return aptPackageType(apt, name, version);\n }\n return AptPackageType.None;\n}\nasync function getAptArg(apt, name, version) {\n const package_type = await aptPackageType(apt, name, version);\n switch (package_type) {\n case AptPackageType.NameDashVersion:\n return `${name}-${version}`;\n case AptPackageType.NameEqualsVersion:\n return `${name}=${version}`;\n case AptPackageType.Name:\n if (version !== undefined && version !== \"\") {\n warning(`Could not find package ${name} with version ${version}. Installing the latest version.`);\n }\n return name;\n default:\n throw new Error(`Could not find package ${name} ${version ?? \"\"}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVhbGlmeS1pbnN0YWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3F1YWxpZnktaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sV0FBVyxNQUFNLHNCQUFzQixDQUFBO0FBQzlDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBRXJDLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxZQUFZLEVBQUUsTUFBTSxhQUFhLENBQUE7QUFFbEU7O0dBRUc7QUFDSCxNQUFNLENBQU4sSUFBWSxjQUtYO0FBTEQsV0FBWSxjQUFjO0lBQ3hCLHlFQUFtQixDQUFBO0lBQ25CLDZFQUFxQixDQUFBO0lBQ3JCLG1EQUFRLENBQUE7SUFDUixtREFBUSxDQUFBO0FBQ1YsQ0FBQyxFQUxXLGNBQWMsS0FBZCxjQUFjLFFBS3pCO0FBRUQ7O0dBRUc7QUFDSCxNQUFNLENBQUMsS0FBSyxVQUFVLDJCQUEyQixDQUFDLFFBQXNCLEVBQUUsTUF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ENvdWxkIG5vdCBmaW5kIHBhY2thZ2UgJHtuYW1lfSB3aXRoIHZlcnNpb24gJHt2ZXJzaW9ufS4gSW5zdGFsbGluZyB0aGUgbGF0ZXN0IHZlcnNpb24uYClcbiAgICAgIH1cbiAgICAgIHJldHVybiBuYW1lXG4gICAgZGVmYXVsdDpcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ291bGQgbm90IGZpbmQgcGFja2FnZSAke25hbWV9ICR7dmVyc2lvbiA/PyBcIlwifWApXG4gIH1cbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { addAptKey } from \"./apt-key.js\";\nimport { addAptRepository } from \"./apt-repository.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { filterAndQualifyAptPackages } from \"./qualify-install.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nconst retryErrors = [\n \"E: Could not get lock\",\n \"dpkg: error processing archive\",\n \"dpkg: error: dpkg status database is locked by another process\",\n];\n/**\n * Install a package using apt\n *\n * @param packages The packages to install (name, and optional info like version and repositories)\n * @param update Whether to update the package list before installing (Defaults to `false`)\n *\n * @returns The installation information\n *\n * @example\n * ```ts\n * await installAptPack([{ name: \"ca-certificates\" }, { name: \"gnupg\" }])\n * ```\n *\n * @example\n * ```ts\n await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n * ```\n */\nexport async function installAptPack(packages, update = false) {\n const apt = getApt();\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via ${apt}`);\n }\n // Update the repos if needed\n if (update) {\n updateAptReposMemoized(apt);\n }\n // Add the repos if needed\n await addRepositories(apt, packages);\n const needToInstall = await filterAndQualifyAptPackages(packages, apt);\n if (needToInstall.length === 0) {\n info(\"All packages are already installed\");\n return { binDir: \"/usr/bin/\" };\n }\n // Initialize apt if needed\n await initAptMemoized(apt);\n try {\n // Add the keys if needed\n await addAptKeys(packages);\n // Install\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", ...needToInstall], {\n ...defaultExecOptions,\n env: getAptEnv(apt),\n });\n }\n catch (err) {\n if (isExecaError(err)) {\n if (retryErrors.some((error) => err.stderr.includes(error))) {\n warning(`Failed to install packages ${needToInstall}. Retrying...`);\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", \"-o\", aptTimeout, ...needToInstall], { ...defaultExecOptions, env: getAptEnv(apt) });\n }\n }\n else {\n throw err;\n }\n }\n return { binDir: \"/usr/bin/\" };\n}\nasync function addRepositories(apt, packages) {\n const allRepositories = [...new Set(packages.flatMap((pack) => pack.repository ?? []))];\n await Promise.all(allRepositories.map((repo) => addAptRepository(repo, apt)));\n}\nasync function addAptKeys(packages) {\n await Promise.all(packages.map(async (pack) => {\n if (pack.key !== undefined) {\n await addAptKey(pack.key);\n }\n }));\n}\nfunction isExecaError(err) {\n return typeof err.stderr === \"string\";\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDekQsT0FBTyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFdEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUN4QyxPQUFPLEVBQXlCLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUMvRCxP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KVxuICAgIH1cbiAgfSkpXG59XG5cbmZ1bmN0aW9uIGlzRXhlY2FFcnJvcihlcnI6IHVua25vd24pOiBlcnIgaXMgRXhlY2FFcnJvciB7XG4gIHJldHVybiB0eXBlb2YgKGVyciBhcyBFeGVjYUVycm9yKS5zdGRlcnIgPT09IFwic3RyaW5nXCJcbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nexport async function addAptRepository(repo, apt = getApt()) {\n await initAptMemoized(apt);\n await installAddAptRepo(apt);\n execRootSync(\"add-apt-repository\", [\"-y\", \"--no-update\", repo], { ...defaultExecOptions, env: getAptEnv(apt) });\n // Update the repos\n updateAptReposMemoized.clear(); // ensure update is called\n updateAptReposMemoized(apt);\n}\nexport async function installAddAptRepo(apt) {\n if (await isAptPackInstalled(\"software-properties-common\")) {\n return;\n }\n execRootSync(apt, [\"install\", \"-y\", \"--fix-broken\", \"-o\", aptTimeout, \"software-properties-common\"], { ...defaultExecOptions, env: getAptEnv(apt) });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LXJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXB0LXJlcG9zaXRvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUM3Qyx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vc01lbW9pemVkKGFwdClcbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGluc3RhbGxBZGRBcHRSZXBvKGFwdDogc3RyaW5nKSB7XG4gIGlmIChhd2FpdCBpc0FwdFBhY2tJbnN0YWxsZWQoXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiKSkge1xuICAgIHJldHVyblxuICB9XG4gIGV4ZWNSb290U3luYyhcbiAgICBhcHQsXG4gICAgW1wiaW5zdGFsbFwiLCBcIi15XCIsIFwiLS1maXgtYnJva2VuXCIsIFwiLW9cIiwgYXB0VGltZW91dCwgXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiXSxcbiAgICB7IC4uLmRlZmF1bHRFeGVjT3B0aW9ucywgZW52OiBnZXRBcHRFbnYoYXB0KSB9LFxuICApXG59XG4iXX0=","import { tmpdir } from \"os\";\nimport { join } from \"path\";\nimport { execRoot, execRootSync } from \"admina\";\nimport { warning } from \"ci-log\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { pathExists } from \"path-exists\";\nimport { installAptPack } from \"./install.js\";\n/**\n * Add an apt key\n * @param options The options for adding the key\n * @returns The file name of the key that was added or `undefined` if it failed\n *\n * @example\n * ```ts\n * await addAptKey({ key: \"3B4FE6ACC0B21F32\" fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n *\n * @example\n * ```ts\n * await addAptKey({ keyUrl: \"https://bazel.build/bazel-release.pub.gpg\", fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n */\nexport function addAptKey(options) {\n if (\"keyUrl\" in options) {\n return addAptKeyViaURL(options);\n }\n else {\n return addAptKeyViaServer(options);\n }\n}\nexport const defaultKeyStorePath = \"/etc/apt/trusted.gpg.d\";\nexport const defaultKeyServer = \"keyserver.ubuntu.com\";\n/**\n * Add an apt key via a keyserver\n * @returns The file name of the key that was added or `undefined` if it failed\n */\nexport async function addAptKeyViaServer({ key, keyServer = defaultKeyServer, fileName, keyStorePath = defaultKeyServer }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await execRoot(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--keyserver\",\n keyServer,\n \"--recv-keys\",\n key,\n ]);\n await execRoot(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via server ${keyServer}: ${err}`);\n return undefined;\n }\n}\n/**\n * Add an apt key via a download\n * @param options The options for adding the key\n * @returns The file name of the key that was added\n */\nexport async function addAptKeyViaURL({ keyUrl, fileName, keyStorePath = defaultKeyStorePath }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dlPath = join(tmpdir(), fileName);\n const dl = new DownloaderHelper(keyUrl, tmpdir(), { fileName });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download ${keyUrl}: ${err}`);\n });\n await dl.start();\n execRootSync(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--import\",\n dlPath,\n ]);\n execRootSync(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via download ${keyUrl}: ${err}`);\n return undefined;\n }\n}\nfunction initGpg() {\n execRootSync(\"gpg\", [\"-k\"]);\n}\nfunction assertGpgFileName(fileName) {\n if (!fileName.endsWith(\".gpg\")) {\n throw new Error(`Key file name must end with .gpg: ${fileName}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWtleS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQta2V5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQ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bGVOYW1lfWApXG4gIH1cbn1cbiJdfQ==","import { tmpdir } from \"os\";\nimport { dirname, join } from \"path\";\nimport { addPath } from \"envosman\";\nimport { execaSync } from \"execa\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { installAptPack } from \"setup-apt\";\nimport which from \"which\";\n/* eslint-disable require-atomic-updates */\nlet binDir;\nexport async function setupBrew(options = {}) {\n // brew is only available on darwin and linux\n if (![\"darwin\", \"linux\"].includes(process.platform)) {\n return undefined;\n }\n // check if the function has already been called\n if (typeof binDir === \"string\") {\n return { binDir };\n }\n // check if brew is already installed\n const maybeBinDir = await which(\"brew\", { nothrow: true });\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir);\n return { binDir };\n }\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dl = new DownloaderHelper(\"https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh\", tmpdir(), {\n fileName: \"install-brew.sh\",\n });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the brew installer script: ${err}`);\n });\n await dl.start();\n // brew installation is not thread-safe\n execaSync(\"/bin/bash\", [dl.getDownloadPath()], {\n stdio: \"inherit\",\n env: {\n NONINTERACTIVE: \"1\",\n },\n });\n // add the bin directory to the PATH\n binDir = getBrewBinDir();\n await addPath(binDir, options.rcOptions);\n return { binDir };\n}\n/**\n * Get the path to the bin directory of brew\n * @returns {string} The path where brew binary is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewBinDir() {\n return join(getBrewDir(), \"bin\");\n}\n/**\n * Get the path where brew is installed\n * @returns {string} The path where brew is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewDir() {\n if (process.platform === \"darwin\") {\n if (process.arch === \"arm64\") {\n return \"/opt/homebrew\";\n }\n else {\n return \"/usr/local\";\n }\n }\n if (process.platform === \"linux\") {\n return \"/home/linuxbrew/.linuxbrew\";\n }\n throw new Error(\"Unsupported platform for brew\");\n}\n//# sourceMappingURL=data:application/json;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GZvcm0gPT09IFwibGludXhcIikge1xuICAgIHJldHVybiBcIi9ob21lL2xpbnV4YnJldy8ubGludXhicmV3XCJcbiAgfVxuXG4gIHRocm93IG5ldyBFcnJvcihcIlVuc3VwcG9ydGVkIHBsYXRmb3JtIGZvciBicmV3XCIpXG59XG4iXX0=","import { join } from \"path\";\nimport { info } from \"ci-log\";\nimport { execaSync } from \"execa\";\nimport which from \"which\";\nimport { getBrewBinDir, setupBrew } from \"./install.js\";\n/* eslint-disable require-atomic-updates */\nlet hasBrew = false;\n/** A function that installs a package using brew\n *\n * @param name The name of the package\n * @param version The version of the package (optional)\n * @param options The options for installing the package\n *\n * @returns The installation information\n */\nexport async function installBrewPack(name, version, givenOptions = {}) {\n const options = {\n overwrite: true,\n cask: false,\n args: [],\n ...givenOptions,\n };\n info(`Installing ${name} ${version ?? \"\"} via brew`);\n if (!hasBrew || which.sync(\"brew\", { nothrow: true }) === null) {\n await setupBrew();\n hasBrew = true;\n }\n const binDir = getBrewBinDir();\n const brewPath = join(binDir, \"brew\");\n // Args\n const args = [\n \"install\",\n (version !== undefined && version !== \"\") ? `${name}@${version}` : name,\n ];\n if (options.overwrite) {\n args.push(\"--overwrite\");\n }\n if (options.cask) {\n args.push(\"--cask\");\n }\n // brew is not thread-safe\n execaSync(brewPath, args, { stdio: \"inherit\" });\n return { binDir };\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC1wYWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2luc3RhbGwtcGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTt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lyKClcbiAgY29uc3QgYnJld1BhdGggPSBqb2luKGJpbkRpciwgXCJicmV3XCIpXG5cbiAgLy8gQXJnc1xuICBjb25zdCBhcmdzID0gW1xuICAgIFwiaW5zdGFsbFwiLFxuICAgICh2ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgdmVyc2lvbiAhPT0gXCJcIikgPyBgJHtuYW1lfUAke3ZlcnNpb259YCA6IG5hbWUsXG4gIF1cbiAgaWYgKG9wdGlvbnMub3ZlcndyaXRlKSB7XG4gICAgYXJncy5wdXNoKFwiLS1vdmVyd3JpdGVcIilcbiAgfVxuICBpZiAob3B0aW9ucy5jYXNrKSB7XG4gICAgYXJncy5wdXNoKFwiLS1jYXNrXCIpXG4gIH1cblxuICAvLyBicmV3IGlzIG5vdCB0aHJlYWQtc2FmZVxuICBleGVjYVN5bmMoYnJld1BhdGgsIGFyZ3MsIHsgc3RkaW86IFwiaW5oZXJpdFwiIH0pXG5cbiAgcmV0dXJuIHsgYmluRGlyIH1cbn1cbiJdfQ==","import which from \"which\"\n\nlet hasDnfCache: undefined | boolean = undefined\n\nexport function hasDnf(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (hasDnfCache === undefined) {\n hasDnfCache = which.sync(\"dnf\", { nothrow: true }) !== null\n }\n\n return hasDnfCache\n}\n","import which from \"which\"\n\nlet isArchCache: undefined | boolean = undefined\n\nexport function isArch(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isArchCache === undefined) {\n // detect arch by checking if pacman exists\n isArchCache = which.sync(\"pacman\", { nothrow: true }) !== null\n }\n\n return isArchCache\n}\n","import which from \"which\"\n\nlet isUbuntuCache: undefined | boolean = undefined\n\nexport function isUbuntu(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isUbuntuCache === undefined) {\n const apt = \"apt-get\"\n isUbuntuCache = which.sync(apt, { nothrow: true }) !== null\n }\n\n return isUbuntuCache\n}\n","import { dirname } from \"path\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet binDir: string | undefined\n\nexport async function setupChocolatey(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _version: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setupDir: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _arch: string,\n): Promise {\n if (process.platform !== \"win32\") {\n return undefined\n }\n\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"choco\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n let powershell = \"powershell.exe\"\n const maybePowerShell = which.sync(`${process.env.SystemRoot}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, {\n nothrow: true,\n })\n if (maybePowerShell !== null) {\n powershell = maybePowerShell\n }\n\n // https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe\n execaSync(\n powershell,\n [\n \"-NoProfile\",\n \"-InputFormat\",\n \"None\",\n \"-ExecutionPolicy\",\n \"Bypass\",\n \"-Command\",\n \"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\",\n ],\n { stdio: \"inherit\" },\n )\n\n const chocoPath = `${process.env.ALLUSERSPROFILE}\\\\chocolatey\\\\bin`\n await addPath(chocoPath, rcOptions)\n\n const maybeChoco = which.sync(\"choco\", { nothrow: true })\n if (maybeChoco !== null) {\n binDir = dirname(maybeChoco)\n } else {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n\n if (await pathExists(binDir)) {\n return { binDir }\n }\n return undefined\n}\n","/* eslint-disable require-atomic-updates */\nimport { info } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport which from \"which\"\nimport { setupChocolatey } from \"../../chocolatey/chocolatey.js\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\nlet hasChoco = false\n\n/** A function that installs a package using choco */\nexport async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise {\n info(`Installing ${name} ${version ?? \"\"} via chocolatey`)\n\n if (!hasChoco || which.sync(\"choco\", { nothrow: true }) === null) {\n await setupChocolatey(\"\", \"\", process.arch)\n hasChoco = true\n }\n\n // https://github.com/jberezanski/ChocolateyPackages/issues/97#issuecomment-986825694\n const PATH = process.env.PATH\n const env = { ...process.env }\n env.TMP = undefined\n env.TEMP = undefined\n env.Path = undefined\n env.PATH = PATH\n\n if (version !== undefined && version !== \"\") {\n execaSync(\"choco\", [\"install\", \"-y\", name, `--version=${version}`, ...args], {\n env,\n extendEnv: false,\n stdio: \"inherit\",\n })\n } else {\n try {\n execaSync(\"choco\", [\"install\", \"-y\", name, ...args], { env, extendEnv: false, stdio: \"inherit\" })\n } catch (err) {\n // if the package requires a reboot, downgrade the error to a notice\n if ((err as Error).message.includes(\"exit code 3010\")) {\n info(`${name} might require a reboot for the completion of the installation.`)\n } else {\n throw err\n }\n }\n }\n\n const binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n","import { execRootSync } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\ntype DnfPackage = {\n name: string\n version?: string\n}\n\n/** A function that installs a package using dnf */\nexport async function setupDnfPack(packages: DnfPackage[]): Promise {\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via dnf`)\n }\n\n const dnfArgs = await Promise.all(packages.map((pack) => getDnfArg(pack.name, pack.version)))\n execRootSync(\"dnf\", [\"-y\", \"install\", ...dnfArgs])\n\n return { binDir: \"/usr/bin/\" }\n}\n\nasync function getDnfArg(name: string, version: string | undefined) {\n if (version !== undefined && version !== \"\") {\n // check if name-version is available\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}-${version}`])\n\n if (stdout.trim() !== \"\") {\n return `${name}-${version}`\n } else {\n // try with ${name}${version}\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}${version}`])\n if (stdout.trim() !== \"\") {\n return `${name}${version}`\n }\n\n warning(`Failed to install ${name} ${version} via dnf, trying without version`)\n }\n }\n return name\n}\n","import { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRootSync, isRoot } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa, execaSync } from \"execa\"\nimport which from \"which\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet didUpdate: boolean = false\nlet didInit: boolean = false\n\n/** A function that installs a package using pacman */\nexport async function setupPacmanPack(name: string, version?: string, aur?: string): Promise {\n info(`Installing ${name} ${version ?? \"\"} via pacman`)\n\n const pacman = \"pacman\"\n\n if (aur === \"yay\") {\n setupYay()\n }\n\n // yay can't run as root, so skip update\n if (!didUpdate && aur !== \"yay\") {\n execRootSync(pacman, [\"-Sy\", \"--noconfirm\"])\n didUpdate = true\n }\n\n // install base-devel\n if (!didInit && aur !== \"yay\") {\n execRootSync(pacman, [\"-S\", \"--noconfirm\", \"base-devel\"])\n didInit = true\n }\n\n const runInstall = (arg: string) => {\n if (aur === \"yay\") {\n // run yay as non-root to fix ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.\n if (isRoot() && createdBuilderUser) {\n // Run yay as builder user\n return execRootSync(\"su\", [\"-\", \"builder\", \"-c\", `yay -S --noconfirm ${arg}`])\n } else {\n return execaSync(aur, [\"-S\", \"--noconfirm\", arg])\n }\n }\n return execRootSync(aur ?? pacman, [\"-S\", \"--noconfirm\", arg])\n }\n\n if (version !== undefined && version !== \"\") {\n // check if version is available\n const availableVersions = await availablePacmanVersions(pacman, name)\n if (availableVersions.includes(version)) {\n // try different version formats\n try {\n runInstall(`${name}=${version}`)\n } catch {\n runInstall(`${name}${version}`)\n }\n } else {\n // try without version\n info(`Failed to install ${name} ${version} via pacman, trying without version`)\n runInstall(name)\n }\n } else {\n // version not specified, install latest\n runInstall(name)\n }\n\n return { binDir: \"/usr/bin/\" }\n}\n\nconst pacmanSiVersionRegex = /Version\\s*:\\s*(.*)/g\n\n/** Query pacman for available versions */\nasync function availablePacmanVersions(pacman: string, name: string) {\n const availableVersions = []\n try {\n const { stdout } = await execa(pacman, [\"-Si\", name])\n\n for (const match of stdout.matchAll(pacmanSiVersionRegex)) {\n availableVersions.push(match[1])\n }\n } catch (err) {\n warning(`Failed to get available versions for ${name}: ${err}`)\n }\n return availableVersions\n}\n\nlet createdBuilderUser = false\n\nfunction setupYay() {\n if (which.sync(\"yay\", { nothrow: true }) === null) {\n try {\n // Install prerequisites\n execRootSync(\"pacman\", [\"-S\", \"--noconfirm\", \"base-devel\", \"git\"])\n\n const yayBuildDir = join(tmpdir(), \"yay\")\n\n execRootSync(\"mkdir\", [\"-p\", yayBuildDir])\n\n if (isRoot()) {\n // Create a non-root user to build yay\n warning(\"Creating a non-root user to build yay\")\n execRootSync(\"useradd\", [\"-m\", \"-G\", \"wheel\", \"builder\"])\n execRootSync(\"passwd\", [\"-d\", \"builder\"])\n execRootSync(\"chown\", [\"-R\", \"builder:builder\", yayBuildDir])\n execRootSync(\"bash\", [\"-c\", `echo \"builder ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers`])\n createdBuilderUser = true\n\n // Clone the yay repository into a temporary directory\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `git clone https://aur.archlinux.org/yay.git ${yayBuildDir}`], {\n stdio: \"inherit\",\n })\n\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `cd ${yayBuildDir} && makepkg -si --noconfirm`], {\n stdio: \"inherit\",\n })\n } else {\n // Clone the yay repository into a temporary directory\n execaSync(\"git\", [\"clone\", \"https://aur.archlinux.org/yay.git\", yayBuildDir], {\n stdio: \"inherit\",\n cwd: tmpdir(),\n })\n\n // Build and install yay\n execaSync(\"makepkg\", [\"-si\", \"--noconfirm\"], {\n stdio: \"inherit\",\n cwd: yayBuildDir,\n })\n }\n\n // clean-up\n execaSync(\"rm\", [\"-rf\", yayBuildDir], { stdio: \"inherit\" })\n } catch (error) {\n throw new Error(`Failed to install yay: ${error}. Install yay manually and re-run the script.`)\n }\n }\n}\n","function e(e,a){return Object.keys(a).forEach((r=>{\"default\"===r||\"__esModule\"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get(){return a[r]}})})),e}function a(e,a,r,s){Object.defineProperty(e,a,{get:r,set:s,enumerable:!0,configurable:!0})}function r(e,a=!0){return a?u(e):u(e,x(e))}function s(e){return E(e).replace(RegExp(y(N)+\"$\"),\"\")}function t(e,a=\".exe\",r=\"\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function n(e,a){const r=x(e),s=`${a}${u(e,r)}${r}`;return h(l(e),s)}function i(e,a){const r=x(e),s=`${u(e,r)}${a}${r}`;return h(l(e),s)}function o(e,a=\".cmd\",r=\".sh\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function m(e){return\"win32\"===process.platform?e:\"./\"+e}function c(e){const a=x(e).length;return e.slice(0,-a)}function d(e,a){return z(e,a)}function f(e,a){const r=g(a,e);return!(!r||\"..\"===r||r.startsWith(\"..\"+N)||r===w(e))}import{basename as u,delimiter as p,dirname as l,extname as x,format as v,isAbsolute as $,join as h,normalize as E,parse as P,posix as b,relative as g,resolve as w,sep as N,toNamespacedPath as S,win32 as j}from\"path\";import y from\"escape-string-regexp\";import z from\"replace-ext\";var O={},R={};a(R,\"name\",(()=>r));var A={};a(A,\"normalizeTrim\",(()=>s));var I={};a(I,\"addExeExt\",(()=>t));var T={};a(T,\"addNamePrefix\",(()=>n));var _={};a(_,\"addNameSuffix\",(()=>i));var k={};a(k,\"addShExt\",(()=>o));var M={};a(M,\"addShRelativePrefix\",(()=>m));var W={};a(W,\"removeExt\",(()=>c));var q={};a(q,\"replaceExt\",(()=>d));var B={};a(B,\"isPathInside\",(()=>f)),e(O,R),e(O,A),e(O,I),e(O,T),e(O,_),e(O,k),e(O,M),e(O,W),e(O,q),e(O,B);export{u as basename,p as delimiter,l as dirname,x as extname,v as format,$ as isAbsolute,h as join,E as normalize,P as parse,b as posix,g as relative,w as resolve,N as sep,S as toNamespacedPath,j as win32,r as name,s as normalizeTrim,t as addExeExt,n as addNamePrefix,i as addNameSuffix,o as addShExt,m as addShRelativePrefix,c as removeExt,d as replaceExt,f as isPathInside};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst mm = __importStar(require(\"./manifest\"));\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst httpm = __importStar(require(\"@actions/http-client\"));\nconst semver = __importStar(require(\"semver\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst assert_1 = require(\"assert\");\nconst v4_1 = __importDefault(require(\"uuid/v4\"));\nconst exec_1 = require(\"@actions/exec/lib/exec\");\nconst retry_helper_1 = require(\"./retry-helper\");\nclass HTTPError extends Error {\n constructor(httpStatusCode) {\n super(`Unexpected HTTP response: ${httpStatusCode}`);\n this.httpStatusCode = httpStatusCode;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nexports.HTTPError = HTTPError;\nconst IS_WINDOWS = process.platform === 'win32';\nconst IS_MAC = process.platform === 'darwin';\nconst userAgent = 'actions/tool-cache';\n/**\n * Download a tool from an url and stream it into a file\n *\n * @param url url of tool to download\n * @param dest path to download tool\n * @param auth authorization header\n * @param headers other headers\n * @returns path to downloaded tool\n */\nfunction downloadTool(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n dest = dest || path.join(_getTempDirectory(), v4_1.default());\n yield io.mkdirP(path.dirname(dest));\n core.debug(`Downloading ${url}`);\n core.debug(`Destination ${dest}`);\n const maxAttempts = 3;\n const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10);\n const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);\n const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);\n return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {\n return yield downloadToolAttempt(url, dest || '', auth, headers);\n }), (err) => {\n if (err instanceof HTTPError && err.httpStatusCode) {\n // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests\n if (err.httpStatusCode < 500 &&\n err.httpStatusCode !== 408 &&\n err.httpStatusCode !== 429) {\n return false;\n }\n }\n // Otherwise retry\n return true;\n });\n });\n}\nexports.downloadTool = downloadTool;\nfunction downloadToolAttempt(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(dest)) {\n throw new Error(`Destination file path ${dest} already exists`);\n }\n // Get the response headers\n const http = new httpm.HttpClient(userAgent, [], {\n allowRetries: false\n });\n if (auth) {\n core.debug('set auth');\n if (headers === undefined) {\n headers = {};\n }\n headers.authorization = auth;\n }\n const response = yield http.get(url, headers);\n if (response.message.statusCode !== 200) {\n const err = new HTTPError(response.message.statusCode);\n core.debug(`Failed to download from \"${url}\". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);\n throw err;\n }\n // Download the response body\n const pipeline = util.promisify(stream.pipeline);\n const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message);\n const readStream = responseMessageFactory();\n let succeeded = false;\n try {\n yield pipeline(readStream, fs.createWriteStream(dest));\n core.debug('download complete');\n succeeded = true;\n return dest;\n }\n finally {\n // Error, delete dest before retry\n if (!succeeded) {\n core.debug('download failed');\n try {\n yield io.rmRF(dest);\n }\n catch (err) {\n core.debug(`Failed to delete '${dest}'. ${err.message}`);\n }\n }\n }\n });\n}\n/**\n * Extract a .7z file\n *\n * @param file path to the .7z file\n * @param dest destination directory. Optional.\n * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this\n * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will\n * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is\n * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line\n * interface, it is smaller than the full command line interface, and it does support long paths. At the\n * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website.\n * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path\n * to 7zr.exe can be pass to this function.\n * @returns path to the destination directory\n */\nfunction extract7z(file, dest, _7zPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n const originalCwd = process.cwd();\n process.chdir(dest);\n if (_7zPath) {\n try {\n const logLevel = core.isDebug() ? '-bb1' : '-bb0';\n const args = [\n 'x',\n logLevel,\n '-bd',\n '-sccUTF-8',\n file\n ];\n const options = {\n silent: true\n };\n yield exec_1.exec(`\"${_7zPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n else {\n const escapedScript = path\n .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1')\n .replace(/'/g, \"''\")\n .replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const escapedTarget = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`;\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n command\n ];\n const options = {\n silent: true\n };\n try {\n const powershellPath = yield io.which('powershell', true);\n yield exec_1.exec(`\"${powershellPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n return dest;\n });\n}\nexports.extract7z = extract7z;\n/**\n * Extract a compressed tar archive\n *\n * @param file path to the tar\n * @param dest destination directory. Optional.\n * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.\n * @returns path to the destination directory\n */\nfunction extractTar(file, dest, flags = 'xz') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n // Create dest\n dest = yield _createExtractFolder(dest);\n // Determine whether GNU tar\n core.debug('Checking tar --version');\n let versionOutput = '';\n yield exec_1.exec('tar --version', [], {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n core.debug(versionOutput.trim());\n const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');\n // Initialize args\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n if (core.isDebug() && !flags.includes('v')) {\n args.push('-v');\n }\n let destArg = dest;\n let fileArg = file;\n if (IS_WINDOWS && isGnuTar) {\n args.push('--force-local');\n destArg = dest.replace(/\\\\/g, '/');\n // Technically only the dest needs to have `/` but for aesthetic consistency\n // convert slashes in the file arg too.\n fileArg = file.replace(/\\\\/g, '/');\n }\n if (isGnuTar) {\n // Suppress warnings when using GNU tar to extract archives created by BSD tar\n args.push('--warning=no-unknown-keyword');\n args.push('--overwrite');\n }\n args.push('-C', destArg, '-f', fileArg);\n yield exec_1.exec(`tar`, args);\n return dest;\n });\n}\nexports.extractTar = extractTar;\n/**\n * Extract a xar compatible archive\n *\n * @param file path to the archive\n * @param dest destination directory. Optional.\n * @param flags flags for the xar. Optional.\n * @returns path to the destination directory\n */\nfunction extractXar(file, dest, flags = []) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n args.push('-x', '-C', dest, '-f', file);\n if (core.isDebug()) {\n args.push('-v');\n }\n const xarPath = yield io.which('xar', true);\n yield exec_1.exec(`\"${xarPath}\"`, _unique(args));\n return dest;\n });\n}\nexports.extractXar = extractXar;\n/**\n * Extract a zip\n *\n * @param file path to the zip\n * @param dest destination directory. Optional.\n * @returns path to the destination directory\n */\nfunction extractZip(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n dest = yield _createExtractFolder(dest);\n if (IS_WINDOWS) {\n yield extractZipWin(file, dest);\n }\n else {\n yield extractZipNix(file, dest);\n }\n return dest;\n });\n}\nexports.extractZip = extractZip;\nfunction extractZipWin(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n // build the powershell command\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedDest = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const pwshPath = yield io.which('pwsh', false);\n //To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory\n //and the -Force flag for Expand-Archive as a fallback\n if (pwshPath) {\n //attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive\n const pwshCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,\n `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`,\n `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n pwshCommand\n ];\n core.debug(`Using pwsh at path: ${pwshPath}`);\n yield exec_1.exec(`\"${pwshPath}\"`, args);\n }\n else {\n const powershellCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,\n `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`,\n `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n powershellCommand\n ];\n const powershellPath = yield io.which('powershell', true);\n core.debug(`Using powershell at path: ${powershellPath}`);\n yield exec_1.exec(`\"${powershellPath}\"`, args);\n }\n });\n}\nfunction extractZipNix(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n const unzipPath = yield io.which('unzip', true);\n const args = [file];\n if (!core.isDebug()) {\n args.unshift('-q');\n }\n args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run\n yield exec_1.exec(`\"${unzipPath}\"`, args, { cwd: dest });\n });\n}\n/**\n * Caches a directory and installs it into the tool cacheDir\n *\n * @param sourceDir the directory to cache into tools\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheDir(sourceDir, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source dir: ${sourceDir}`);\n if (!fs.statSync(sourceDir).isDirectory()) {\n throw new Error('sourceDir is not a directory');\n }\n // Create the tool dir\n const destPath = yield _createToolPath(tool, version, arch);\n // copy each child item. do not move. move can fail on Windows\n // due to anti-virus software having an open handle on a file.\n for (const itemName of fs.readdirSync(sourceDir)) {\n const s = path.join(sourceDir, itemName);\n yield io.cp(s, destPath, { recursive: true });\n }\n // write .complete\n _completeToolPath(tool, version, arch);\n return destPath;\n });\n}\nexports.cacheDir = cacheDir;\n/**\n * Caches a downloaded file (GUID) and installs it\n * into the tool cache with a given targetName\n *\n * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid.\n * @param targetFile the name of the file name in the tools directory\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheFile(sourceFile, targetFile, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source file: ${sourceFile}`);\n if (!fs.statSync(sourceFile).isFile()) {\n throw new Error('sourceFile is not a file');\n }\n // create the tool dir\n const destFolder = yield _createToolPath(tool, version, arch);\n // copy instead of move. move can fail on Windows due to\n // anti-virus software having an open handle on a file.\n const destPath = path.join(destFolder, targetFile);\n core.debug(`destination file ${destPath}`);\n yield io.cp(sourceFile, destPath);\n // write .complete\n _completeToolPath(tool, version, arch);\n return destFolder;\n });\n}\nexports.cacheFile = cacheFile;\n/**\n * Finds the path to a tool version in the local installed tool cache\n *\n * @param toolName name of the tool\n * @param versionSpec version of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction find(toolName, versionSpec, arch) {\n if (!toolName) {\n throw new Error('toolName parameter is required');\n }\n if (!versionSpec) {\n throw new Error('versionSpec parameter is required');\n }\n arch = arch || os.arch();\n // attempt to resolve an explicit version\n if (!isExplicitVersion(versionSpec)) {\n const localVersions = findAllVersions(toolName, arch);\n const match = evaluateVersions(localVersions, versionSpec);\n versionSpec = match;\n }\n // check for the explicit version in the cache\n let toolPath = '';\n if (versionSpec) {\n versionSpec = semver.clean(versionSpec) || '';\n const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch);\n core.debug(`checking cache: ${cachePath}`);\n if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) {\n core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`);\n toolPath = cachePath;\n }\n else {\n core.debug('not found');\n }\n }\n return toolPath;\n}\nexports.find = find;\n/**\n * Finds the paths to all versions of a tool that are installed in the local tool cache\n *\n * @param toolName name of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction findAllVersions(toolName, arch) {\n const versions = [];\n arch = arch || os.arch();\n const toolPath = path.join(_getCacheDirectory(), toolName);\n if (fs.existsSync(toolPath)) {\n const children = fs.readdirSync(toolPath);\n for (const child of children) {\n if (isExplicitVersion(child)) {\n const fullPath = path.join(toolPath, child, arch || '');\n if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {\n versions.push(child);\n }\n }\n }\n }\n return versions;\n}\nexports.findAllVersions = findAllVersions;\nfunction getManifestFromRepo(owner, repo, auth, branch = 'master') {\n return __awaiter(this, void 0, void 0, function* () {\n let releases = [];\n const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;\n const http = new httpm.HttpClient('tool-cache');\n const headers = {};\n if (auth) {\n core.debug('set auth');\n headers.authorization = auth;\n }\n const response = yield http.getJson(treeUrl, headers);\n if (!response.result) {\n return releases;\n }\n let manifestUrl = '';\n for (const item of response.result.tree) {\n if (item.path === 'versions-manifest.json') {\n manifestUrl = item.url;\n break;\n }\n }\n headers['accept'] = 'application/vnd.github.VERSION.raw';\n let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();\n if (versionsRaw) {\n // shouldn't be needed but protects against invalid json saved with BOM\n versionsRaw = versionsRaw.replace(/^\\uFEFF/, '');\n try {\n releases = JSON.parse(versionsRaw);\n }\n catch (_a) {\n core.debug('Invalid json');\n }\n }\n return releases;\n });\n}\nexports.getManifestFromRepo = getManifestFromRepo;\nfunction findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) {\n return __awaiter(this, void 0, void 0, function* () {\n // wrap the internal impl\n const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter);\n return match;\n });\n}\nexports.findFromManifest = findFromManifest;\nfunction _createExtractFolder(dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!dest) {\n // create a temp dir\n dest = path.join(_getTempDirectory(), v4_1.default());\n }\n yield io.mkdirP(dest);\n return dest;\n });\n}\nfunction _createToolPath(tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n core.debug(`destination ${folderPath}`);\n const markerPath = `${folderPath}.complete`;\n yield io.rmRF(folderPath);\n yield io.rmRF(markerPath);\n yield io.mkdirP(folderPath);\n return folderPath;\n });\n}\nfunction _completeToolPath(tool, version, arch) {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n const markerPath = `${folderPath}.complete`;\n fs.writeFileSync(markerPath, '');\n core.debug('finished caching tool');\n}\n/**\n * Check if version string is explicit\n *\n * @param versionSpec version string to check\n */\nfunction isExplicitVersion(versionSpec) {\n const c = semver.clean(versionSpec) || '';\n core.debug(`isExplicit: ${c}`);\n const valid = semver.valid(c) != null;\n core.debug(`explicit? ${valid}`);\n return valid;\n}\nexports.isExplicitVersion = isExplicitVersion;\n/**\n * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec`\n *\n * @param versions array of versions to evaluate\n * @param versionSpec semantic version spec to satisfy\n */\nfunction evaluateVersions(versions, versionSpec) {\n let version = '';\n core.debug(`evaluating ${versions.length} versions`);\n versions = versions.sort((a, b) => {\n if (semver.gt(a, b)) {\n return 1;\n }\n return -1;\n });\n for (let i = versions.length - 1; i >= 0; i--) {\n const potential = versions[i];\n const satisfied = semver.satisfies(potential, versionSpec);\n if (satisfied) {\n version = potential;\n break;\n }\n }\n if (version) {\n core.debug(`matched: ${version}`);\n }\n else {\n core.debug('match not found');\n }\n return version;\n}\nexports.evaluateVersions = evaluateVersions;\n/**\n * Gets RUNNER_TOOL_CACHE\n */\nfunction _getCacheDirectory() {\n const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';\n assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');\n return cacheDirectory;\n}\n/**\n * Gets RUNNER_TEMP\n */\nfunction _getTempDirectory() {\n const tempDirectory = process.env['RUNNER_TEMP'] || '';\n assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');\n return tempDirectory;\n}\n/**\n * Gets a global variable\n */\nfunction _getGlobal(key, defaultValue) {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const value = global[key];\n /* eslint-enable @typescript-eslint/no-explicit-any */\n return value !== undefined ? value : defaultValue;\n}\n/**\n * Returns an array of unique values.\n * @param values Values to make unique.\n */\nfunction _unique(values) {\n return Array.from(new Set(values));\n}\n//# sourceMappingURL=tool-cache.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryAsPromised = exports.TimeoutError = void 0;\nclass TimeoutError extends Error {\n constructor(message, previousError) {\n super(message);\n this.name = \"TimeoutError\";\n this.previous = previousError;\n }\n}\nexports.TimeoutError = TimeoutError;\nfunction matches(match, err) {\n if (typeof match === 'function') {\n try {\n if (err instanceof match)\n return true;\n }\n catch (_) {\n return !!match(err);\n }\n }\n if (match === err.toString())\n return true;\n if (match === err.message)\n return true;\n return match instanceof RegExp\n && (match.test(err.message) || match.test(err.toString()));\n}\nfunction retryAsPromised(callback, optionsInput) {\n if (!callback || !optionsInput) {\n throw new Error('retry-as-promised must be passed a callback and a options set');\n }\n optionsInput = (typeof optionsInput === \"number\" ? { max: optionsInput } : optionsInput);\n const options = {\n $current: \"$current\" in optionsInput ? optionsInput.$current : 1,\n max: optionsInput.max,\n timeout: optionsInput.timeout || undefined,\n match: optionsInput.match ? Array.isArray(optionsInput.match) ? optionsInput.match : [optionsInput.match] : [],\n backoffBase: optionsInput.backoffBase === undefined ? 100 : optionsInput.backoffBase,\n backoffExponent: optionsInput.backoffExponent || 1.1,\n report: optionsInput.report,\n name: optionsInput.name || callback.name || 'unknown'\n };\n if (options.match && !Array.isArray(options.match))\n options.match = [options.match];\n if (options.report)\n options.report('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString(), options);\n return new Promise(function (resolve, reject) {\n let timeout;\n let backoffTimeout;\n let lastError;\n if (options.timeout) {\n timeout = setTimeout(function () {\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n reject(new TimeoutError(options.name + ' timed out', lastError));\n }, options.timeout);\n }\n Promise.resolve(callback({ current: options.$current }))\n .then(resolve)\n .then(function () {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n })\n .catch(function (err) {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n lastError = err;\n if (options.report)\n options.report((err && err.toString()) || err, options, err);\n // Should not retry if max has been reached\n var shouldRetry = options.$current < options.max;\n if (!shouldRetry)\n return reject(err);\n shouldRetry = options.match.length === 0 || options.match.some(function (match) {\n return matches(match, err);\n });\n if (!shouldRetry)\n return reject(err);\n var retryDelay = options.backoffBase * Math.pow(options.backoffExponent, options.$current - 1);\n // Do some accounting\n options.$current++;\n if (options.report)\n options.report(`Retrying ${options.name} (${options.$current})`, options);\n if (retryDelay) {\n // Use backoff function to ease retry rate\n if (options.report)\n options.report(`Delaying retry of ${options.name} by ${retryDelay}`, options);\n backoffTimeout = setTimeout(function () {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }, retryDelay);\n }\n else {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }\n });\n });\n}\nexports.retryAsPromised = retryAsPromised;\n;\nexports.default = retryAsPromised;\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSevenZip(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"7zip\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"p7zip\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"p7zip\", version)\n } else if (hasDnf()) {\n return setupDnfPack([\n { name: \"p7zip\", version },\n { name: \"p7zip-plugins\", version },\n ])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"p7zip-full\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { mkdirP } from \"@actions/io\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { setupSevenZip } from \"../../sevenzip/sevenzip.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\nexport { extractTar, extractXar } from \"@actions/tool-cache\"\n\nexport enum ArchiveType {\n Tar = 0,\n TarGz = 1,\n TarXz = 2,\n Zip = 3,\n SevenZip = 4,\n}\n\nexport function getArchiveType(file: string): ArchiveType {\n const ext = file.split(\".\").pop()\n\n if (ext === \"tar\") {\n return ArchiveType.Tar\n }\n\n if (ext === \"gz\" || ext === \"tgz\") {\n return ArchiveType.TarGz\n }\n\n if (ext === \"xz\" || ext === \"txz\") {\n return ArchiveType.TarXz\n }\n\n if (ext === \"zip\") {\n return ArchiveType.Zip\n }\n\n if (ext === \"7z\" || ext === \"exe\") {\n return ArchiveType.SevenZip\n }\n\n // default to 7z\n warning(`Unknown archive type: ${ext}. Defaulting to 7z`)\n return ArchiveType.SevenZip\n}\n\nexport function getExtractFunction(archiveType: ArchiveType) {\n switch (archiveType) {\n case ArchiveType.Tar:\n case ArchiveType.TarGz:\n return extractTarByExe\n case ArchiveType.TarXz:\n return extractTarByExe\n case ArchiveType.Zip:\n return extractZip\n default:\n return extract7Zip\n }\n}\n\nlet sevenZip: string | undefined\n\n/// Extract 7z using 7z\nexport async function extract7Zip(file: string, dest: string) {\n await execa(await getSevenZip(), [\"x\", file, `-o${dest}`, \"-y\"], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n}\n\n/// install 7z if needed\nasync function getSevenZip() {\n if (sevenZip === undefined) {\n if (which.sync(\"7z\", { nothrow: true }) === null) {\n await setupSevenZip(\"\", \"\", process.arch)\n }\n // eslint-disable-next-line require-atomic-updates\n sevenZip = \"7z\"\n }\n return sevenZip\n}\n\n/// Extract Exe using 7z\nexport function extractExe(file: string, dest: string) {\n return extract7Zip(file, dest)\n}\n\n/// Extract Zip using unzip or 7z\nexport async function extractZip(file: string, dest: string) {\n // prefer 7z if available (faster especially on Windows)\n if (which.sync(\"7z\", { nothrow: true }) !== null) {\n return extract7Zip(file, dest)\n }\n\n // if unzip is available use it (usually available on posix systems)\n if (which.sync(\"unzip\", { nothrow: true }) !== null) {\n await execa(\"unzip\", [\"-q\", file, \"-d\", dest], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n }\n\n // fallback to 7z (will install 7z if needed)\n return extract7Zip(file, dest)\n}\n\nexport async function extractTarByExe(file: string, dest: string, stripComponents: number = 0, flags: string[] = []) {\n await installTarDependencies(getArchiveType(file))\n\n try {\n await mkdirP(dest)\n } catch {\n // ignore\n }\n\n // TODO windows fails to create symlinks\n // https://github.com/heroku/heroku-slugs/issues/3\n\n try {\n await execa(\"tar\", [\"xf\", file, \"-C\", dest, `--strip-components=${stripComponents}`, ...flags], {\n stdio: \"inherit\",\n })\n } catch (e) {\n if (process.platform === \"win32\" && (e as Error).message.includes(\"Can't create '\\\\\\\\?\\\\C:\")) {\n warning(`Failed to extract symlink ${file} to ${dest}. Ignoring this symlink.`)\n }\n }\n\n await grantUserWriteAccess(dest)\n return dest\n}\n\nasync function installTarDependencies(archiveType: ArchiveType) {\n info(\"Installing tar extraction dependencies\")\n\n switch (archiveType) {\n case ArchiveType.TarGz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"gzip\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"gzip\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"gzip\" }, { name: \"tar\" }])\n }\n }\n break\n }\n case ArchiveType.TarXz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"xz\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"xz\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"xz-utils\" }, { name: \"tar\" }])\n }\n }\n break\n }\n default:\n throw new Error(`Unsupported archive type: ${archiveType} for tar extraction`)\n }\n}\n","import { tmpdir } from \"os\"\nimport { basename, join } from \"path\"\nimport { cacheDir, downloadTool, find } from \"@actions/tool-cache\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { chmod } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { maybeGetInput, rcOptions } from \"../../cli-options.js\"\nimport { getArchiveType, getExtractFunction } from \"./extract.js\"\n\n/** A type that describes a package */\nexport type PackageInfo = {\n /** Url to download the package */\n url: string\n /** The top folder name once it is extracted. It can be `\"\"` if there is no top folder */\n extractedFolderName: string\n /** The relative directory in which the binary is located. It can be `\"\"` if the exe is in the top folder */\n binRelativeDir: string\n /** The main binary file. */\n binFileName: string\n /** The function to extract the downloaded archive. It can be `undefined`, if the binary itself is downloaded directly. */\n extractFunction?: (file: string, dest: string) => Promise\n}\n\nexport type InstallationInfo = {\n /** The top install dir */\n installDir?: string\n binDir: string\n bin?: string\n}\n\n/**\n * A function that:\n *\n * - Downloads and extracts a package\n * - Adds the bin path of the package to PATH\n * - Caches the downloaded directory into tool cache for usage from other sessions\n *\n * @returns The installation directory\n */\nexport async function setupBin(\n name: string,\n version: string,\n getPackageInfo: (version: string, platform: NodeJS.Platform, arch: string) => PackageInfo | Promise,\n setupDir: string,\n arch: string,\n): Promise {\n info(`Installing ${name} ${version} ${arch} via direct downloading`)\n\n process.env.RUNNER_TEMP = process.env.RUNNER_TEMP ?? tmpdir()\n process.env.RUNNER_TOOL_CACHE = process.env.RUNNER_TOOL_CACHE ?? join(tmpdir(), \"setup-cpp\", \"hostedtoolcache\")\n\n const { url, binRelativeDir, binFileName, extractedFolderName, extractFunction } = await getPackageInfo(\n version,\n process.platform,\n arch,\n )\n\n // Restore from cache (if found).\n if (GITHUB_ACTIONS) {\n try {\n const dir = find(name, version)\n if (dir) {\n const installDir = join(dir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n if (await pathExists(join(binDir, binFileName))) {\n info(`${name} ${version} was found in the cache at ${binDir}.`)\n await addPath(binDir, rcOptions)\n\n return { installDir, binDir }\n }\n }\n } catch {\n // fails on a local machine?\n }\n }\n\n const installDir = join(setupDir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n const binFile = join(binDir, binFileName)\n\n await downloadExtractInstall(binDir, binFile, name, version, url, setupDir, extractFunction, arch)\n\n await cacheInstallation(setupDir, name, version)\n\n return { installDir, binDir }\n}\n\nasync function downloadExtractInstall(\n binDir: string,\n binFile: string,\n name: string,\n version: string,\n url: string,\n setupDir: string,\n givenExtractFunction: PackageInfo[\"extractFunction\"],\n arch: string,\n) {\n // download ane extract the package into the installation directory.\n if ((await Promise.all([pathExists(binDir), pathExists(binFile)])).includes(false)) {\n try {\n const downloaded = await tryDownload(name, version, url)\n\n info(`Extracting ${downloaded} to ${setupDir}`)\n\n const extractFunction = givenExtractFunction ?? getExtractFunction(getArchiveType(url))\n await extractFunction(downloaded, setupDir)\n } catch (err) {\n throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)\n }\n }\n\n // Adding the bin dir to the path\n /** The directory which the tool is installed to */\n info(`Add ${binDir} to PATH`)\n await addPath(binDir, rcOptions)\n\n // Check if the binary exists after extraction\n if (!(await pathExists(binFile))) {\n throw new Error(`Failed to find the binary ${binFile} after extracting ${name} ${version} ${arch}`)\n }\n\n // make the binary executable on non-windows platforms\n if (process.platform !== \"win32\") {\n try {\n await chmod(binFile, \"755\")\n } catch (err) {\n warning(`Failed to make ${binFile} executable: ${err}`)\n }\n }\n}\n\nasync function tryDownload(name: string, version: string, url: string) {\n info(`Download ${name} ${version}`)\n // try to download the package 4 times with 2 seconds delay\n const downloaded = await retry(\n () => {\n const downloadedFilePath = join(process.env.RUNNER_TEMP ?? tmpdir(), `${Date.now()}-${basename(url)}`)\n\n return downloadTool(url, downloadedFilePath)\n },\n { name: url, max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n return downloaded\n}\n\nasync function cacheInstallation(setupDir: string, name: string, version: string) {\n // check if inside Github Actions. If so, cache the installation\n if (GITHUB_ACTIONS && typeof process.env.RUNNER_TOOL_CACHE === \"string\") {\n if (maybeGetInput(\"cache-tools\") === \"true\" || process.env.CACHE_TOOLS === \"true\") {\n await cacheDir(setupDir, name, version)\n }\n }\n}\n","import { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverLte from \"semver/functions/lte\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform data for cmake */\nfunction getCmakePackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const semVersion = semverCoerce(version) ?? version\n switch (platform) {\n case \"win32\": {\n const isOld = semverLte(semVersion, \"v3.19.6\")\n let osArchStr: string\n if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"win64-x64\" : \"windows-x86_64\"\n } else if (x86.includes(arch)) {\n osArchStr = isOld ? \"win32-x86\" : \"windows-i386\"\n } else if (arm64.includes(arch)) {\n osArchStr = \"windows-arm64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Windows`)\n osArchStr = `windows-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.zip`,\n }\n }\n case \"darwin\": {\n const isOld = semverLte(semVersion, \"v3.19.1\")\n const osArchStr = isOld ? \"Darwin-x86_64\" : \"macos-universal\"\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"CMake.app/Contents/bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n case \"linux\": {\n const isOld = semverLte(semVersion, \"v3.19.8\")\n let osArchStr: string\n if (arm64.includes(arch)) {\n osArchStr = isOld ? \"Linux-aarch64\" : \"linux-aarch64\"\n } else if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"Linux-x86_64\" : \"linux-x86_64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Linux`)\n osArchStr = `linux-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Setup cmake */\nexport function setupCmake(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"cmake\", version, getCmakePackageInfo, setupDir, arch)\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { info } from \"ci-log\"\nimport { isUrlOnline } from \"is-url-online\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverCompare from \"semver/functions/compare\"\nimport semverValid from \"semver/functions/valid\"\n\n/**\n * Gets the specific versions supported by this action compatible with the supplied (specific or minimum) version in\n * descending order of release (e.g., `5.0.2`, `5.0.1`, and `5.0.0` for `5`).\n */\nexport function getSpecificVersions(versions: Set, semversion: string): string[] {\n return Array.from(versions)\n .filter((v) => /^\\d+\\.\\d+\\.\\d+$/.test(v) && v.startsWith(semversion))\n .sort((a, b) => {\n try {\n return semverCompare(a, b)\n } catch (err) {\n return a.localeCompare(b)\n }\n })\n .reverse()\n}\n\n/**\n * Gets the specific and minimum versions that can be used to refer to the supplied specific versions (e.g., `3`, `3.5`,\n * `3.5.2` for `3.5.2`).\n */\nexport function getVersions(specific: string[]): Set {\n const versions = new Set(specific)\n\n for (const version of specific) {\n versions.add(/^\\d+/.exec(version)![0])\n versions.add(/^\\d+\\.\\d+/.exec(version)![0])\n }\n\n return versions\n}\n\n/** Gets the most recent specific version for which there is a valid download URL. */\nexport async function getSpecificVersionAndUrl(\n versions: Set,\n platform: string,\n version: string,\n getUrl: (platform: string, version: string) => string | null | Promise,\n): Promise<[string, string]> {\n // specific ubuntu version\n if (platform === \"linux\" && version.includes(\"ubuntu\")) {\n const url = await getUrl(platform, version)\n // eslint-disable-next-line no-await-in-loop\n if (url !== null && (await isUrlOnline(url))) {\n return [version, url]\n }\n }\n\n // if the given set doesn't include the version, throw an error\n if (!versions.has(version)) {\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n }\n\n const offlineUrls: string[] = []\n\n // TODO use Promise.any\n for (const specificVersion of getSpecificVersions(versions, version)) {\n // eslint-disable-next-line no-await-in-loop\n const url = await getUrl(platform, specificVersion)\n if (url !== null) {\n // eslint-disable-next-line no-await-in-loop\n if (await isUrlOnline(url)) {\n return [specificVersion, url]\n } else {\n offlineUrls.push(url)\n }\n }\n }\n\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n}\n\nexport const defaultVersionRegex = /v?(\\d\\S*)/\n\n/** Get the version of a binary */\nexport async function getBinVersion(file: string, versionRegex: RegExp = defaultVersionRegex) {\n try {\n const execout = await getExecOutput(file, [\"--version\"])\n const version_output = execout.stdout || execout.stderr || \"\"\n const version = version_output.trim().match(versionRegex)?.[1]\n return semverCoerce(version) ?? undefined\n } catch (e) {\n console.error(e)\n return undefined\n }\n}\n\n/** Check if the given bin is up to date against the target version */\nexport async function isBinUptoDate(\n givenFile: string,\n targetVersion: string,\n versionRegex: RegExp = defaultVersionRegex,\n) {\n const givenVersion = await getBinVersion(givenFile, versionRegex)\n if (givenVersion !== undefined && targetVersion !== \"\") {\n return semverCompare(givenVersion, targetVersion) !== -1\n } else {\n // assume given version is old\n return false\n }\n}\n\n/** Coerce the given version if it is invalid */\nexport function semverCoerceIfInvalid(version: string) {\n if (semverValid(version) === null) {\n // version coercion\n try {\n // find the semver version of an integer\n const coercedVersion = semverCoerce(version)\n if (coercedVersion !== null) {\n info(`Coerced version '${version}' to '${coercedVersion}'`)\n return coercedVersion.version\n }\n } catch (err) {\n // handled below\n }\n }\n return version\n}\n\nexport function removeVPrefix(version: string) {\n return Number.parseInt(version.replace(/^v/, \"\"), 10)\n}\n\nexport function addVPrefix(version: string) {\n if (!version.match(/^v/)) {\n return `v${version}`\n }\n return version\n}\n\nexport function compareVersion(tag1: string, tag2: string) {\n const v1 = semverCoerce(tag1)\n const v2 = semverCoerce(tag2)\n if (v1 !== null && v2 !== null) {\n // put the latest version first\n return v2.compare(v1)\n }\n\n // if the tags are not semver, compare them as strings, putting the latest tag first\n return tag2.localeCompare(tag1)\n}\n","export function unique(dirs: string[]) {\n return [...new Set(dirs)]\n}\n\nexport function quoteIfHasSpace(str: string, quoteChar = \"\\\"\") {\n return str.includes(\" \") ? `${quoteChar}${str}${quoteChar}` : str\n}\n","import assert from \"assert\"\nimport { homedir } from \"os\"\nimport { dirname, join, parse as pathParse } from \"path\"\nimport { getExecOutput } from \"@actions/exec\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { hasPipx, setupPipPackSystem, setupPipPackWithPython } from \"../utils/setup/setupPipPack.js\"\nimport { isBinUptoDate } from \"../utils/setup/version.js\"\nimport { unique } from \"../utils/std/index.js\"\nimport { MinVersions } from \"../versions/default_versions.js\"\n\nexport async function setupPython(version: string, setupDir: string, arch: string): Promise {\n const installInfo = await findOrSetupPython(version, setupDir, arch)\n assert(installInfo.bin !== undefined)\n const foundPython = installInfo.bin\n\n // setup pip\n const foundPip = await findOrSetupPip(foundPython)\n if (foundPip === undefined) {\n throw new Error(\"pip was not installed correctly\")\n }\n\n await setupPipx(foundPython)\n\n await setupWheel(foundPython)\n\n return installInfo\n}\n\nasync function setupPipx(foundPython: string) {\n try {\n if (!(await hasPipx(foundPython))) {\n try {\n await setupPipPackWithPython(foundPython, \"pipx\", undefined, { upgrade: true, usePipx: false })\n } catch (err) {\n if (setupPipPackSystem(\"pipx\", false) === null) {\n throw new Error(`pipx was not installed correctly ${err}`)\n }\n }\n }\n await execa(foundPython, [\"-m\", \"pipx\", \"ensurepath\"], { stdio: \"inherit\" })\n await setupPipPackWithPython(foundPython, \"venv\", undefined, { upgrade: false, usePipx: false })\n } catch (err) {\n warning(`Failed to install pipx: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\n/** Setup wheel and setuptools */\nasync function setupWheel(foundPython: string) {\n try {\n await setupPipPackWithPython(foundPython, \"setuptools\", undefined, {\n upgrade: true,\n isLibrary: true,\n usePipx: false,\n })\n await setupPipPackWithPython(foundPython, \"wheel\", undefined, { upgrade: true, isLibrary: true, usePipx: false })\n } catch (err) {\n warning(`Failed to install setuptools or wheel: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\nasync function findOrSetupPython(version: string, setupDir: string, arch: string): Promise {\n let installInfo: InstallationInfo | undefined\n let foundPython = await findPython(setupDir)\n\n if (foundPython !== undefined) {\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } else {\n // if python is not found, try to install it\n if (GITHUB_ACTIONS) {\n // install python in GitHub Actions\n try {\n info(\"Installing python in GitHub Actions\")\n const { setupActionsPython } = await import(\"./actions_python.js\")\n await setupActionsPython(version, setupDir, arch)\n\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } catch (err) {\n warning((err as Error).toString())\n }\n }\n if (installInfo === undefined) {\n // install python via system package manager\n installInfo = await setupPythonSystem(setupDir, version)\n }\n }\n\n if (foundPython === undefined || installInfo.bin === undefined) {\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n installInfo = { bin: foundPython, installDir: dirname(foundPython), binDir: dirname(foundPython) }\n }\n\n return installInfo\n}\n\nasync function setupPythonSystem(setupDir: string, version: string) {\n let installInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (setupDir) {\n await setupChocoPack(\"python3\", version, [`--params=/InstallDir:${setupDir}`])\n } else {\n await setupChocoPack(\"python3\", version)\n }\n // Adding the bin dir to the path\n const bin = await findPython(setupDir)\n if (bin === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(bin)\n /** The directory which the tool is installed to */\n await addPath(binDir, rcOptions)\n installInfo = { installDir: binDir, binDir, bin }\n break\n }\n case \"darwin\": {\n installInfo = await installBrewPack(\"python3\", version)\n // add the python and pip binaries to the path\n const brewPythonPrefix: {\n stdout: string\n stderr: string\n } = await execa(\"brew\", [\"--prefix\", \"python\"], { stdio: \"pipe\" })\n const brewPythonBin = join(brewPythonPrefix.stdout, \"libexec\", \"bin\")\n await addPath(brewPythonBin, rcOptions)\n\n break\n }\n case \"linux\": {\n if (isArch()) {\n installInfo = await setupPacmanPack(\"python\", version)\n } else if (hasDnf()) {\n installInfo = await setupDnfPack([{ name: \"python3\", version }])\n } else if (isUbuntu()) {\n installInfo = await installAptPack([{ name: \"python3\", version }, { name: \"python-is-python3\" }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n break\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n return installInfo\n}\n\nasync function findPython(binDir?: string) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, binDir)\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n\n // On Windows, search in C:\\PythonXX\n if (process.platform === \"win32\") {\n const rootDir = pathParse(homedir()).root\n // find all directories in rootDir using readdir\n const pythonDirs = (await readdir(rootDir)).filter((dir) => dir.startsWith(\"Python\"))\n\n for (const pythonDir of pythonDirs) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, join(rootDir, pythonDir))\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n }\n }\n\n return undefined\n}\n\nasync function isPythonUpToDate(candidate: string, binDir?: string) {\n try {\n if (binDir !== undefined) {\n const pythonBinPath = join(binDir, addExeExt(candidate))\n if (await pathExists(pythonBinPath)) {\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pythonBinPaths = (await which(candidate, { nothrow: true, all: true })) ?? []\n for (const pythonBinPath of pythonBinPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function findOrSetupPip(foundPython: string) {\n const maybePip = await findPip()\n\n if (maybePip === undefined) {\n // install pip if not installed\n info(\"pip was not found. Installing pip\")\n await setupPip(foundPython)\n return findPip() // recurse to check if pip is on PATH and up-to-date\n }\n\n return maybePip\n}\n\nasync function findPip() {\n for (const pipCandidate of [\"pip3\", \"pip\"]) {\n // eslint-disable-next-line no-await-in-loop\n const maybePip = await isPipUptoDate(pipCandidate)\n if (maybePip !== undefined) {\n return maybePip\n }\n }\n return undefined\n}\n\nasync function isPipUptoDate(pip: string) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pipPaths = (await which(pip, { nothrow: true, all: true })) ?? []\n for (const pipPath of pipPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pipPath, MinVersions.pip!)) {\n return pipPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function setupPip(foundPython: string) {\n const upgraded = await ensurePipUpgrade(foundPython)\n if (!upgraded) {\n // ensure that pip is installed on Linux (happens when python is found but pip not installed)\n await setupPipPackSystem(\"pip\")\n\n // upgrade pip\n await ensurePipUpgrade(foundPython)\n }\n}\n\nasync function ensurePipUpgrade(foundPython: string) {\n try {\n await execa(foundPython, [\"-m\", \"ensurepip\", \"-U\", \"--upgrade\"], { stdio: \"inherit\" })\n return true\n } catch (err1) {\n info((err1 as Error).toString())\n try {\n // ensure pip is disabled on Ubuntu\n await execa(foundPython, [\"-m\", \"pip\", \"install\", \"--upgrade\", \"pip\"], { stdio: \"inherit\" })\n return true\n } catch (err2) {\n info((err2 as Error).toString())\n // pip module not found\n }\n }\n // all methods failed\n return false\n}\n\nasync function addPythonBaseExecPrefix_(python: string) {\n const dirs: string[] = []\n\n // detection based on the platform\n if (process.platform === \"linux\") {\n dirs.push(\"/home/runner/.local/bin/\")\n } else if (process.platform === \"darwin\") {\n dirs.push(\"/usr/local/bin/\")\n }\n\n // detection using python.sys\n const base_exec_prefix = (await getExecOutput(`${python} -c \"import sys;print(sys.base_exec_prefix);\"`)).stdout.trim()\n // any of these are possible depending on the operating system!\n dirs.push(join(base_exec_prefix, \"Scripts\"), join(base_exec_prefix, \"Scripts\", \"bin\"), join(base_exec_prefix, \"bin\"))\n\n // remove duplicates\n return unique(dirs)\n}\n\n/**\n * Add the base exec prefix to the PATH. This is required for Conan, Meson, etc. to work properly.\n *\n * The answer is cached for subsequent calls\n */\nexport const addPythonBaseExecPrefix = memoize(addPythonBaseExecPrefix_, { promise: true })\n","import type { Opts } from \"../cli-options.js\"\nimport type { Inputs } from \"../tool.js\"\nimport { DefaultUbuntuVersion, DefaultVersions } from \"./default_versions.js\"\n\n/** Get the default version if passed true or undefined, otherwise return the version itself */\nexport function getVersion(name: string, version: string | undefined, osVersion: number[] | null = null) {\n if (isVersionDefault(version) && process.platform === \"linux\" && osVersion !== null && name in DefaultUbuntuVersion) {\n return getDefaultLinuxVersion(osVersion, DefaultUbuntuVersion[name]!)\n } else if (isVersionDefault(version) && name in DefaultVersions) {\n return DefaultVersions[name] ?? \"\"\n } else if (version === \"true\") {\n return \"\"\n }\n return version ?? \"\"\n}\n\nfunction isVersionDefault(version: string | undefined) {\n return version === \"true\" || version === undefined\n}\n\n/// choose the default linux version based on ubuntu version\nfunction getDefaultLinuxVersion(osVersion: number[], toolLinuxVersions: Record) {\n const osVersionMaj = osVersion[0]\n\n // find which version block the os version is in\n const satisfyingVersion = Object.keys(toolLinuxVersions)\n .map((v) => Number.parseInt(v, 10))\n .sort((a, b) => b - a) // sort in descending order\n .find((v) => osVersionMaj >= v)\n\n return satisfyingVersion === undefined ? \"\" : toolLinuxVersions[satisfyingVersion]\n}\n\n/**\n * Sync the versions for the given inputs\n *\n * If the return is false, it means that versions don't match the target version\n */\nexport function syncVersions(opts: Opts, tools: Inputs[]): boolean {\n const toolsInUse = tools.filter((tool) => opts[tool] !== undefined)\n const toolsNonDefaultVersion = toolsInUse.filter((tool) => !isVersionDefault(opts[tool]))\n\n const targetVersion = toolsNonDefaultVersion.length >= 1 ? opts[toolsNonDefaultVersion[0]] : \"true\"\n\n if (toolsNonDefaultVersion.some((tool) => opts[tool] !== targetVersion)) {\n // error if any explicit versions don't match the target version\n return false\n }\n\n for (const tool of toolsInUse) {\n opts[tool] = targetVersion\n }\n\n return true\n}\n","import os from \"os\"\nimport { warning } from \"ci-log\"\nimport memoize from \"memoizee\"\nimport { installAptPack } from \"setup-apt\"\nimport { getUbuntuVersion } from \"ubuntu-version\"\nimport which from \"which\"\nimport { isUbuntu } from \"./isUbuntu.js\"\n\nasync function ubuntuVersion_(): Promise {\n try {\n if (isUbuntu()) {\n try {\n if (which.sync(\"lsb_release\", { nothrow: true }) === null) {\n await installAptPack([{ name: \"lsb-release\" }])\n }\n } catch {\n return detectUsingOsVersion()\n }\n\n const versionSplitted = await getUbuntuVersion()\n\n if (versionSplitted.length === 0) {\n return detectUsingOsVersion()\n }\n\n return versionSplitted\n } else {\n return null\n }\n } catch (err) {\n warning((err as Error).toString())\n return null\n }\n}\n\n/** Detect Ubuntu version */\nexport const ubuntuVersion = memoize(ubuntuVersion_, { promise: true })\n\n/** Detect Ubuntu version using os.version() for Ubuntu based distros */\nfunction detectUsingOsVersion() {\n if (!(\"version\" in os && typeof os.version === \"function\")) {\n return null\n }\n\n // #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2\n const osVersion: string = os.version()\n // parse the version\n const versionMatch = osVersion.match(/(\\d+)\\.(\\d+)\\.(\\d+)/)\n if (versionMatch === null) {\n return null\n }\n\n const majorVersion = Number.parseInt(versionMatch[1], 10)\n const minorVersion = Number.parseInt(versionMatch[2], 10)\n const patchVersion = Number.parseInt(versionMatch[3], 10)\n\n return [majorVersion, minorVersion, patchVersion]\n}\n","import { dirname, join } from \"path\"\nimport { info } from \"@actions/core\"\nimport { addPath } from \"envosman\"\nimport { execa, execaSync } from \"execa\"\nimport memoize from \"memoizee\"\nimport { mkdirp } from \"mkdirp\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport { addPythonBaseExecPrefix, setupPython } from \"../../python/python.js\"\nimport { getVersion } from \"../../versions/versions.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../env/ubuntu_version.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\n\nexport type SetupPipPackOptions = {\n /** Whether to use pipx instead of pip */\n usePipx?: boolean\n /** Whether to install the package as a user */\n user?: boolean\n /** Whether to upgrade the package */\n upgrade?: boolean\n /** Whether the package is a library */\n isLibrary?: boolean\n}\n\n/** A function that installs a package using pip */\nexport async function setupPipPack(\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n return setupPipPackWithPython(await getPython(), name, version, options)\n}\n\nexport async function setupPipPackWithPython(\n givenPython: string,\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n const { usePipx = true, user = true, upgrade = false, isLibrary = false } = options\n\n const isPipx = usePipx && !isLibrary && (await hasPipx(givenPython))\n const pip = isPipx ? \"pipx\" : \"pip\"\n\n const hasPackage = await pipHasPackage(givenPython, name)\n if (hasPackage) {\n try {\n info(`Installing ${name} ${version ?? \"\"} via ${pip}`)\n\n const nameAndVersion = version !== undefined && version !== \"\" ? `${name}==${version}` : name\n const upgradeFlag = upgrade ? (isPipx ? [\"upgrade\"] : [\"install\", \"--upgrade\"]) : [\"install\"]\n const userFlag = !isPipx && user ? [\"--user\"] : []\n\n const env = process.env\n\n if (isPipx && user) {\n // install to user home\n env.PIPX_HOME = await getPipxHome()\n env.PIPX_BIN_DIR = await getPipxBinDir()\n }\n\n execaSync(givenPython, [\"-m\", pip, ...upgradeFlag, ...userFlag, nameAndVersion], {\n stdio: \"inherit\",\n env,\n })\n } catch (err) {\n info(`Failed to install ${name} via ${pip}: ${err}.`)\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} via ${pip}: ${err}.`)\n }\n }\n } else {\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} as it was not found via ${pip} or the system package manager`)\n }\n }\n\n const execPaths = await addPythonBaseExecPrefix(givenPython)\n const binDir = await findBinDir(execPaths, name)\n\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n\nexport async function hasPipx(givenPython: string) {\n return (await execa(givenPython, [\"-m\", \"pipx\", \"--help\"], { stdio: \"ignore\", reject: false })).exitCode === 0\n}\n\nasync function getPipxHome_() {\n let pipxHome = process.env.PIPX_HOME\n if (pipxHome !== undefined) {\n return pipxHome\n }\n\n // Based on https://pipx.pypa.io/stable/installation/\n const compatHome = untildifyUser(\"~/.local/pipx\")\n if (await pathExists(compatHome)) {\n return compatHome\n }\n\n switch (process.platform) {\n case \"win32\": {\n pipxHome = untildifyUser(\"~/AppData/Local/pipx\")\n break\n }\n case \"darwin\": {\n pipxHome = untildifyUser(\"~/Library/Application Support/pipx\")\n break\n }\n default: {\n pipxHome = untildifyUser(\"~/.local/share/pipx\")\n break\n }\n }\n\n await mkdirp(pipxHome)\n await mkdirp(join(pipxHome, \"trash\"))\n await mkdirp(join(pipxHome, \"shared\"))\n await mkdirp(join(pipxHome, \"venv\"))\n return pipxHome\n}\nconst getPipxHome = memoize(getPipxHome_, { promise: true })\n\nasync function getPipxBinDir_() {\n if (process.env.PIPX_BIN_DIR !== undefined) {\n return process.env.PIPX_BIN_DIR\n }\n\n const pipxBinDir = untildifyUser(\"~/.local/bin\")\n await addPath(pipxBinDir, rcOptions)\n await mkdirp(pipxBinDir)\n return pipxBinDir\n}\nconst getPipxBinDir = memoize(getPipxBinDir_, { promise: true })\n\nasync function getPython_(): Promise {\n const pythonBin = (await setupPython(getVersion(\"python\", undefined, await ubuntuVersion()), \"\", process.arch)).bin\n if (pythonBin === undefined) {\n throw new Error(\"Python binary was not found\")\n }\n return pythonBin\n}\nconst getPython = memoize(getPython_, { promise: true })\n\nasync function pipHasPackage(python: string, name: string) {\n const result = await execa(python, [\"-m\", \"pip\", \"-qq\", \"index\", \"versions\", name], {\n stdio: \"ignore\",\n reject: false,\n })\n return result.exitCode === 0\n}\n\nasync function findBinDir(dirs: string[], name: string) {\n const exists = await Promise.all(dirs.map((dir) => pathExists(join(dir, addExeExt(name)))))\n const dirIndex = exists.findIndex((exist) => exist)\n if (dirIndex !== -1) {\n const foundDir = dirs[dirIndex]\n return foundDir\n }\n\n const whichDir = which.sync(addExeExt(name), { nothrow: true })\n if (whichDir !== null) {\n return dirname(whichDir)\n }\n\n return dirs[dirs.length - 1]\n}\n\nexport function setupPipPackSystem(name: string, addPythonPrefix = true) {\n if (process.platform === \"linux\") {\n info(`Installing ${name} via the system package manager`)\n if (isArch()) {\n return setupPacmanPack(addPythonPrefix ? `python-${name}` : name)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n }\n } else if (process.platform === \"darwin\") {\n return installBrewPack(name)\n }\n return null\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupGraphviz(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"graphviz\", version)\n return activateGraphviz()\n }\n case \"darwin\": {\n return installBrewPack(\"graphviz\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"graphviz\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"graphviz\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"graphviz\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateGraphviz(): Promise {\n switch (process.platform) {\n case \"win32\": {\n const binDir = \"C:/Program Files/Graphviz/bin\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { join } from \"path\"\n\nexport async function setupDmg(path: string, destDir: string) {\n const { ArchiveHdi } = await import(\"@shockpkg/archive-files/esm/archive/hdi.mjs\")\n\n const dmg = new ArchiveHdi(path)\n await dmg.read(async (entry) => {\n await entry.extract(join(destDir, entry.path))\n })\n}\n","import { join } from \"path\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { setupGraphviz } from \"../graphviz/graphviz.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { macosVersion } from \"../utils/env/macos_version.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { setupDmg } from \"../utils/setup/setupDmg.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n/** Get the platform data for cmake */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch: string): PackageInfo {\n switch (platform) {\n case \"linux\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.linux.bin.tar.gz`,\n }\n }\n case \"win32\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.windows.x64.bin.zip`,\n }\n }\n case \"darwin\": {\n const folderName = `Doxygen-${version}`\n return {\n binRelativeDir: \"Doxygen/Doxygen.app/Contents/Resources/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n extractFunction: setupDmg,\n url: `https://doxygen.nl/files/${folderName}.dmg`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupDoxygen(version: string, setupDir: string, arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // try to download the package 4 times with 2 seconds delay\n await retry(\n () => {\n return setupChocoPack(\"doxygen.install\", version)\n },\n { name: \"doxygen.install\", max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n const binDir = await activateWinDoxygen()\n const installationInfo = { binDir }\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n return installationInfo\n }\n case \"darwin\": {\n // let installationInfo: InstallationInfo\n // try {\n // installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n // } catch {\n const installationInfo = await installBrewPack(\"doxygen\", undefined)\n // }\n\n // only install graphviz if the macOS version is greater than 11\n if (macosVersion()[0] > 11) {\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n }\n return installationInfo\n }\n case \"linux\": {\n let installationInfo: InstallationInfo\n if (version === \"\" || isArch() || hasDnf()) {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"doxygen\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"doxygen\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([{ name: \"doxygen\", version }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n } else if (isUbuntu()) {\n try {\n // doxygen on stable Ubuntu repositories is very old. So, we use get the binary from the website itself\n installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n try {\n await installAptPack([{ name: \"libclang-cpp9\" }])\n } catch (err) {\n info(`Failed to download libclang-cpp9 that might be needed for running doxygen. ${err}`)\n }\n } catch (err) {\n notice(`Failed to download doxygen binary. ${err}. Falling back to apt-get.`)\n installationInfo = await installAptPack([{ name: \"doxygen\" }])\n }\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n await setupGraphviz(getVersion(\"graphviz\", undefined, await ubuntuVersion()), \"\", arch)\n return installationInfo\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinDoxygen() {\n switch (process.platform) {\n case \"win32\": {\n for (\n const binDir of [\n \"C:/ProgramData/chocolatey/bin\",\n \"C:/Program Files/doxygen/bin\",\n \"C:/Program Files (x86)/doxygen\",\n ]\n ) {\n // eslint-disable-next-line no-await-in-loop\n if (await pathExists(join(binDir, \"doxygen.exe\"))) {\n // eslint-disable-next-line no-await-in-loop\n await addPath(binDir, rcOptions)\n return binDir\n }\n }\n throw new Error(\"Failed to find doxygen binary\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { error } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupMacOSSDK() {\n if (process.platform === \"darwin\") {\n try {\n const xcrun = await getExecOutput(\"xcrun --sdk macosx --show-sdk-path\")\n const sdkroot = xcrun.stdout || xcrun.stderr\n if (sdkroot) {\n await addEnv(\"SDKROOT\", sdkroot.trim(), rcOptions)\n } else {\n error(\"SDKROOT not set\")\n }\n } catch (e) {\n error(e as Error | string)\n }\n }\n}\n","import { readFile } from \"fs/promises\"\n\n/**\n * The list of assets\n * @key tag The tag of the release\n * @value assets The names of the assets of the release\n */\nexport type Assets = Record\n\n/**\n * Load the list of assets from a json file\n */\nexport async function loadAssetList(path: string): Promise {\n const data = await readFile(path, \"utf-8\")\n return JSON.parse(data)\n}\n\ntype MatchAssetOpts = {\n version: string\n keywords?: string[]\n optionalKeywords?: string[]\n filterMapTag?: (tag: string) => string | undefined\n filterName?: (asset: string) => boolean\n}\n\n/**\n * Match the asset that matches the version and given keywords\n */\nexport function matchAsset(\n assets: Assets,\n opts: MatchAssetOpts,\n): { tag: string; name: string } | undefined {\n // get the list of versions\n const origTags = Object.keys(assets)\n\n // filter/map the tags\n const versionMap: Map = new Map()\n if (opts.filterMapTag === undefined) {\n for (const origTag of origTags) {\n versionMap.set(origTag, origTag)\n }\n } else {\n for (const origTag of origTags) {\n const mappedTag = opts.filterMapTag(origTag)\n if (mappedTag !== undefined) {\n versionMap.set(mappedTag, origTag)\n }\n }\n }\n\n if (versionMap.size === 0) {\n return undefined\n }\n\n // find the first tag that starts with the version\n // loop over the versions starting with the latest\n const candidateTags: string[] = []\n for (const [version, origTag] of versionMap.entries()) {\n if (version.startsWith(opts.version)) {\n candidateTags.push(origTag)\n }\n }\n\n if (candidateTags.length === 0) {\n return undefined\n }\n\n // Loop over the candidate tags and return the first one that has assets\n for (const candidateTag of candidateTags) {\n // get the list of assets\n let assetNames = assets[candidateTag]\n if (assetNames === undefined) {\n continue\n }\n\n // filter the assets\n if (opts.filterName !== undefined) {\n assetNames = assetNames.filter(opts.filterName)\n }\n\n if (assetNames.length === 0) {\n continue\n }\n\n // check if this version contains the keywords and optional keywords in the asset name\n const match = matchAssetName(candidateTag, assetNames, opts)\n if (match !== undefined) {\n return match\n }\n }\n\n return undefined\n}\n\nfunction matchAssetName(tag: string, assetNames: string[], opts: MatchAssetOpts) {\n // if no keywords are given, return the first asset\n if (\n (opts.keywords === undefined\n || opts.keywords.length === 0)\n && (opts.optionalKeywords === undefined\n || opts.optionalKeywords.length === 0)\n ) {\n return { tag, name: assetNames[0] }\n }\n\n // check if the asset contains all the keywords\n let candidates: string[] = []\n if (\n opts.keywords !== undefined\n && opts.keywords.length !== 0\n ) {\n for (const name of assetNames) {\n if (opts.keywords!.every((keyword) => name.includes(keyword))) {\n candidates.push(name)\n }\n }\n } else {\n candidates = assetNames\n }\n\n if (candidates.length === 0) {\n return undefined\n }\n\n // prefer the candidates that contain more optional keywords\n if (\n opts.optionalKeywords !== undefined\n && opts.optionalKeywords.length !== 0\n ) {\n // rate the candidates based on the number of optional keywords they contain\n const candidateScores = candidates.map((name) => {\n let score = 0\n for (const keyword of opts.optionalKeywords!) {\n if (name.includes(keyword)) {\n score++\n }\n }\n return score\n })\n\n // find the candidate with the highest score\n const maxScore = Math.max(...candidateScores)\n const maxIndex = candidateScores.indexOf(maxScore)\n return { tag, name: candidates[maxIndex] }\n }\n\n // return the first candidate if no optional keywords are given\n return { tag, name: candidates[0] }\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { addEnv, addPath } from \"envosman\"\nimport { type ExecaReturnValue, execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverMajor from \"semver/functions/major\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { extract7Zip } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { compareVersion } from \"../utils/setup/version.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nasync function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: string): Promise {\n switch (platform) {\n case \"win32\": {\n const mingwAssets = await loadAssetList(\n join(dirname, \"github_brechtsanders_winlibs_mingw.json\"),\n )\n\n const mingwArchMap = {\n x64: \"x86_64\",\n ia32: \"i386\",\n } as Record\n\n const asset = matchAsset(\n mingwAssets,\n {\n version,\n keywords: [\n mingwArchMap[arch] ?? arch,\n ],\n },\n )\n\n if (asset === undefined) {\n throw new Error(`No asset found for version ${version} and arch ${arch}`)\n }\n\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"g++\"),\n extractedFolderName: \"mingw64\",\n extractFunction: extract7Zip,\n url: `https://github.com/brechtsanders/winlibs_mingw/releases/download/${asset.tag}/${asset.name}`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupGcc(version: string, setupDir: string, arch: string, priority: number = 40) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (arch === \"arm\" || arch === \"arm64\") {\n await setupChocoPack(\"gcc-arm-embedded\", version)\n }\n try {\n installationInfo = await setupBin(\"g++\", version, getGccPackageInfo, setupDir, arch)\n } catch (err) {\n info(`Failed to download g++ binary. ${err}. Falling back to chocolatey.`)\n installationInfo = await setupChocoMingw(version, arch)\n }\n break\n }\n case \"darwin\": {\n installationInfo = await installBrewPack(\"gcc\", version)\n break\n }\n case \"linux\": {\n if (arch === \"x64\") {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([\n { name: \"gcc\", version },\n { name: \"gcc-c++\", version },\n { name: \"libstdc++-devel\" },\n ])\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc\" }, { name: \"g++\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n {\n name: \"g++\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n }\n } else {\n info(`Install g++-multilib because gcc for ${arch} was requested`)\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc-multilib\", version)\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc-multilib\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([{\n name: \"gcc-multilib\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n }])\n }\n }\n }\n break\n }\n // TODO support bare-metal (need to support passing it as the input)\n // TODO support abi\n // case \"none\": {\n // if (arch === \"arm\" || arch === \"arm64\") {\n // return installAptPack(\"gcc-arm-none-eabi\", version, [\n // \"ppa:ubuntu-toolchain-r/test\",\n // ])\n // } else {\n // throw new Error(`Unsupported platform for ${arch}`)\n // }\n // }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n await activateGcc(version, installationInfo.binDir, priority)\n return installationInfo\n }\n return undefined\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMingw(version: string, setupDir: string, arch: string) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\":\n case \"darwin\": {\n return setupGcc(version, setupDir, arch)\n }\n case \"linux\": {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"mingw-w64-gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([{ name: \"mingw64-gcc\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([\n {\n name: \"mingw-w64\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n break\n }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n // TODO: setup alternatives and update CC/CXX env. ?\n // Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode\n // Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode\n // await activateGcc(version, installationInfo.binDir)\n return installationInfo\n }\n return undefined\n}\n\nasync function setupChocoMingw(version: string, arch: string): Promise {\n await setupChocoPack(\"mingw\", version)\n let binDir: string | undefined\n if (arch === \"x64\" && (await pathExists(\"C:/tools/mingw64/bin\"))) {\n binDir = \"C:/tools/mingw64/bin\"\n await addPath(binDir, rcOptions)\n } else if (arch === \"ia32\" && (await pathExists(\"C:/tools/mingw32/bin\"))) {\n binDir = \"C:/tools/mingw32/bin\"\n await addPath(binDir, rcOptions)\n } else if (await pathExists(`${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin/g++.exe`)) {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n if (binDir !== undefined) {\n return { binDir }\n }\n return undefined\n}\n\nasync function activateGcc(givenVersion: string, binDir: string, priority: number = 40) {\n const promises: Promise>[] = []\n // Setup gcc as the compiler\n\n // TODO\n // const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n // const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n // promises.push(\n // addEnv(\"LD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${ld}`, rcOptions),\n // addEnv(\"DYLD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${dyld}`, rcOptions),\n // addEnv(\"CPATH\", `${installDir}/lib/gcc/${majorVersion}/include`, rcOptions),\n // addEnv(\"LDFLAGS\", `-L${installDir}/lib`, rcOptions),\n // addEnv(\"CPPFLAGS\", `-I${installDir}/include`, rcOptions),\n // )\n\n if (process.platform === \"win32\") {\n promises.push(\n addEnv(\"CC\", addExeExt(`${binDir}/gcc`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${binDir}/g++`), rcOptions),\n )\n } else {\n // if version is empty, get the version from the gcc command\n let version = givenVersion\n if (givenVersion === \"\") {\n version = await getGccCmdVersion(binDir, version)\n info(`Using gcc version ${version}`)\n }\n\n const majorVersion = semverMajor(semverCoerce(version) ?? version)\n if (majorVersion >= 5) {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${majorVersion}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${majorVersion}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n )\n }\n } else {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${version}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${version}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${version}`, rcOptions, priority),\n )\n }\n }\n }\n\n promises.push(setupMacOSSDK())\n\n if (GITHUB_ACTIONS) {\n await addGccLoggingMatcher()\n }\n\n await Promise.all(promises)\n}\n\nasync function getGccCmdVersion(binDir: string, givenVersion: string) {\n // TODO get the version from the package manager\n try {\n let gccExe = \"gcc\"\n if (await pathExists(`${binDir}/gcc`)) {\n gccExe = `${binDir}/gcc`\n } else {\n // try to find the gcc exe in the bin dir\n const files = (await readdir(binDir)).sort(\n (exe1, exe2) => {\n const version1 = exe1.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n const version2 = exe2.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n return compareVersion(version1, version2)\n },\n )\n for (const file of files) {\n if (file.startsWith(\"gcc\")) {\n gccExe = `${binDir}/${file}`\n break\n }\n }\n }\n\n const { stdout: versionStdout } = await execa(gccExe, [\"--version\"], { stdio: \"pipe\" })\n\n // gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\n // gcc-12 (Homebrew GCC 12.4.0) 12.4.0\n // gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0\n\n const versionMatch = (versionStdout as string).match(/gcc.* \\(.*\\) ([\\d.]+)/)\n\n if (versionMatch !== null) {\n return versionMatch[1]\n }\n\n warning(`Failed to parse gcc version from: ${versionStdout}`)\n return givenVersion\n } catch (err) {\n error(`Failed to get gcc version: ${err}`)\n return givenVersion\n }\n}\n\nasync function addGccLoggingMatcher() {\n const matcherPath = join(dirname, \"gcc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the gcc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addEnv } from \"envosman\"\nimport semverMajor from \"semver/functions/major\"\nimport semverValid from \"semver/functions/valid\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupGcovr(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"gcovr\", version)\n}\n\nexport function activateGcovLLVM() {\n return addEnv(\"GCOV\", \"llvm-cov gcov\", rcOptions)\n}\n\nexport function activateGcovGCC(gccVersion: string) {\n const gccSemver = semverValid(gccVersion)\n const gccMajor = gccSemver !== null ? semverMajor(gccSemver) : gccVersion\n const gcov = gccMajor !== \"\" ? `gcov-${gccMajor}` : \"gcov\"\n\n return addEnv(\"GCOV\", gcov, rcOptions)\n}\n","import { addExeExt } from \"patha\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name Ninja uses in their download links */\nfunction getNinjaPlatformArch(platform: NodeJS.Platform, arch: string) {\n switch (platform) {\n case \"win32\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"win\"\n : arm64.includes(arch)\n ? \"winarm64\"\n : \"win\"\n case \"darwin\":\n return \"mac\"\n case \"linux\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"linux\"\n : arm64.includes(arch)\n ? \"linux-aarch64\"\n : \"linux\"\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Get the platform data for ninja */\nfunction getNinjaPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const ninjaPlatform = getNinjaPlatformArch(platform, arch)\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"ninja\"),\n extractedFolderName: \"\",\n url: `https://github.com/ninja-build/ninja/releases/download/v${version}/ninja-${ninjaPlatform}.zip`,\n }\n}\n\nexport function setupNinja(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"ninja\", version, getNinjaPackageInfo, setupDir, arch)\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { setupCmake } from \"../cmake/cmake.js\"\nimport { setupNinja } from \"../ninja/ninja.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractTarByExe } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { addVPrefix, removeVPrefix } from \"../utils/setup/version.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nfunction getDownloadKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/releases/download/${version}/kcov-amd64.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"usr/local/bin\",\n binFileName: addExeExt(\"kcov\"),\n }\n}\n\nfunction getBuildKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/archive/refs/tags/${version}.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"build/src\",\n binFileName: addExeExt(\"kcov\"),\n extractFunction: buildKcov,\n }\n}\n\nasync function buildKcov(file: string, dest: string) {\n const out = await extractTarByExe(file, dest, 1)\n\n // build after extraction using CMake\n const cmake = await getCmake()\n\n if (process.platform === \"linux\") {\n if (isArch()) {\n await Promise.all([setupPacmanPack(\"libdwarf\"), setupPacmanPack(\"libcurl-openssl\")])\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"libdwarf-devel\" }, { name: \"libcurl-devel\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libdw-dev\" }, { name: \"libcurl4-openssl-dev\" }])\n }\n }\n\n // apply gcc13.patch\n try {\n if (which.sync(\"patch\", { nothrow: true }) !== null) {\n const patch = join(dirname, \"gcc13.patch\")\n await execa(\"patch\", [\"-N\", \"-p1\", \"-i\", patch], { cwd: out, stdio: \"inherit\" })\n } else {\n info(\"`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13\")\n }\n } catch {\n // ignore\n }\n\n const buildDir = join(out, \"build\")\n await execa(cmake, [\"-S\", out, \"-B\", buildDir, \"-DCMAKE_BUILD_TYPE=Release\", \"-G\", \"Ninja\"], {\n cwd: out,\n stdio: \"inherit\",\n })\n await execa(cmake, [\"--build\", buildDir, \"--config\", \"Release\"], { cwd: out, stdio: \"inherit\" })\n // execRootSync(cmake, [\"--install\", buildDir], out)\n // return \"user/local/bin\" // the cmake install prefix\n return out\n}\n\nasync function getCmake() {\n let cmake = which.sync(\"cmake\", { nothrow: true })\n if (cmake === null) {\n const { binDir } = await setupCmake(\n getVersion(\"cmake\", undefined, await ubuntuVersion()),\n join(untildifyUser(\"~\"), \"cmake\"),\n \"\",\n )\n cmake = join(binDir, \"cmake\")\n }\n const ninja = which.sync(\"ninja\", { nothrow: true })\n if (ninja === null) {\n await setupNinja(getVersion(\"ninja\", undefined, await ubuntuVersion()), join(untildifyUser(\"~\"), \"ninja\"), \"\")\n }\n return cmake\n}\n\nexport async function setupKcov(versionGiven: string, setupDir: string, arch: string) {\n if (process.platform !== \"linux\") {\n info(\"Kcov is not supported on non-linux\")\n return\n }\n\n // parse version\n const versionSplit = versionGiven.split(\"-\")\n let version = addVPrefix(versionSplit[0])\n const installMethod = versionSplit[1] as \"binary\" | undefined\n const version_number = removeVPrefix(version)\n // fix inconsistency in tagging\n if (version_number === 38) {\n version = \"v38\"\n }\n\n let installationInfo: InstallationInfo\n if (installMethod === \"binary\" && version_number >= 39) {\n installationInfo = await setupBin(\"kcov\", version, getDownloadKcovPackageInfo, setupDir, arch)\n if (isArch()) {\n await setupPacmanPack(\"binutils\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"binutils\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libbinutils\" }])\n }\n return installationInfo\n } else {\n installationInfo = await setupBin(\"kcov\", version, getBuildKcovPackageInfo, setupDir, arch)\n }\n return installationInfo\n}\n","import { error } from \"console\"\nimport { notice } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupAppleClang() {\n if (process.platform !== \"darwin\") {\n return\n }\n\n if (await which(\"clang\", { nothrow: true }) !== null && await which(\"clang++\", { nothrow: true }) !== null) {\n notice(\"Assuming clang is an Apple Clang compiler\")\n await Promise.all([addEnv(\"CC\", \"clang\", rcOptions), addEnv(\"CXX\", \"clang++\", rcOptions)])\n }\n\n // TODO install Apple Clang automatically\n error(\"Apple Clang automatic installation is not supported yet\")\n}\n","const core = require('@actions/core')\nconst child_process = require('child_process')\nconst fs = require('fs')\nconst path = require('path')\nconst process = require('process')\n\nconst PROGRAM_FILES_X86 = process.env['ProgramFiles(x86)']\nconst PROGRAM_FILES = [process.env['ProgramFiles(x86)'], process.env['ProgramFiles']]\n\n\nconst EDITIONS = ['Enterprise', 'Professional', 'Community', 'BuildTools']\nconst YEARS = ['2022', '2019', '2017']\n\nconst VsYearVersion = {\n '2022': '17.0',\n '2019': '16.0',\n '2017': '15.0',\n '2015': '14.0',\n '2013': '12.0',\n}\n\n/**\n * Convert the vs version (e.g. 2022) or year (e.g. 17.0) to the version number (e.g. 17.0)\n * @param {string | undefined} vsversion the year (e.g. 2022) or version number (e.g. 17.0)\n * @returns {string | undefined} the version number (e.g. 17.0)\n */\nfunction vsversion_to_versionnumber(vsversion) {\n if (Object.values(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n if (vsversion in VsYearVersion) {\n return VsYearVersion[vsversion]\n }\n }\n return vsversion\n}\nexports.vsversion_to_versionnumber = vsversion_to_versionnumber\n\n/**\n * Convert the vs version (e.g. 17.0) or year (e.g. 2022) to the year (e.g. 2022)\n * @param {string} vsversion the version number (e.g. 17.0) or year (e.g. 2022)\n * @returns {string} the year (e.g. 2022)\n */\nfunction vsversion_to_year(vsversion) {\n if (Object.keys(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n for (const [year, ver] of Object.entries(VsYearVersion)) {\n if (ver === vsversion) {\n return year\n }\n }\n }\n return vsversion\n}\nexports.vsversion_to_year = vsversion_to_year\n\nconst VSWHERE_PATH = `${PROGRAM_FILES_X86}\\\\Microsoft Visual Studio\\\\Installer`\n\n/**\n * Find MSVC tools with vswhere\n * @param {string} pattern the pattern to search for\n * @param {string} version_pattern the version pattern to search for\n * @returns {string | null} the path to the found MSVC tools\n */\nfunction findWithVswhere(pattern, version_pattern) {\n try {\n let installationPath = child_process.execSync(`vswhere -products * ${version_pattern} -prerelease -property installationPath`).toString().trim()\n return installationPath + '\\\\' + pattern\n } catch (e) {\n core.warning(`vswhere failed: ${e}`)\n }\n return null\n}\nexports.findWithVswhere = findWithVswhere\n\n/**\n * Find the vcvarsall.bat file for the given Visual Studio version\n * @param {string | undefined} vsversion the version of Visual Studio to find (year or version number)\n * @returns {string} the path to the vcvarsall.bat file\n */\nfunction findVcvarsall(vsversion) {\n const vsversion_number = vsversion_to_versionnumber(vsversion)\n let version_pattern\n if (vsversion_number) {\n const upper_bound = vsversion_number.split('.')[0] + '.9'\n version_pattern = `-version \"${vsversion_number},${upper_bound}\"`\n } else {\n version_pattern = \"-latest\"\n }\n\n // If vswhere is available, ask it about the location of the latest Visual Studio.\n let path = findWithVswhere('VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat', version_pattern)\n if (path && fs.existsSync(path)) {\n core.info(`Found with vswhere: ${path}`)\n return path\n }\n core.info(\"Not found with vswhere\")\n\n // If that does not work, try the standard installation locations,\n // starting with the latest and moving to the oldest.\n const years = vsversion ? [vsversion_to_year(vsversion)] : YEARS\n for (const prog_files of PROGRAM_FILES) {\n for (const ver of years) {\n for (const ed of EDITIONS) {\n path = `${prog_files}\\\\Microsoft Visual Studio\\\\${ver}\\\\${ed}\\\\VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat`\n core.info(`Trying standard location: ${path}`)\n if (fs.existsSync(path)) {\n core.info(`Found standard location: ${path}`)\n return path\n }\n }\n }\n }\n core.info(\"Not found in standard locations\")\n\n // Special case for Visual Studio 2015 (and maybe earlier), try it out too.\n path = `${PROGRAM_FILES_X86}\\\\Microsoft Visual C++ Build Tools\\\\vcbuildtools.bat`\n if (fs.existsSync(path)) {\n core.info(`Found VS 2015: ${path}`)\n return path\n }\n core.info(`Not found in VS 2015 location: ${path}`)\n\n throw new Error('Microsoft Visual Studio not found')\n}\nexports.findVcvarsall = findVcvarsall\n\nfunction isPathVariable(name) {\n const pathLikeVariables = ['PATH', 'INCLUDE', 'LIB', 'LIBPATH']\n return pathLikeVariables.indexOf(name.toUpperCase()) != -1\n}\n\nfunction filterPathValue(path) {\n let paths = path.split(';')\n // Remove duplicates by keeping the first occurance and preserving order.\n // This keeps path shadowing working as intended.\n function unique(value, index, self) {\n return self.indexOf(value) === index\n }\n return paths.filter(unique).join(';')\n}\n\n/**\n * Setup MSVC Developer Command Prompt\n * @param {string} arch - Target architecture\n * @param {string | undefined} sdk - Windows SDK number to build for\n * @param {string | undefined} toolset - VC++ compiler toolset version\n * @param {boolean | 'true' | 'false' | undefined} uwp - Build for Universal Windows Platform\n * @param {boolean | 'true' | 'false' | undefined} spectre - Enable Spectre mitigations\n * @param {string | undefined} vsversion - The Visual Studio version to use. This can be the version number (e.g. 16.0 for 2019) or the year (e.g. \"2019\").\n */\nfunction setupMSVCDevCmd(arch, sdk, toolset, uwp, spectre, vsversion) {\n if (process.platform != 'win32') {\n core.info('This is not a Windows virtual environment, bye!')\n return\n }\n\n // Add standard location of \"vswhere\" to PATH, in case it's not there.\n process.env.PATH += path.delimiter + VSWHERE_PATH\n\n // There are all sorts of way the architectures are called. In addition to\n // values supported by Microsoft Visual C++, recognize some common aliases.\n let arch_aliases = {\n \"win32\": \"x86\",\n \"win64\": \"x64\",\n \"x86_64\": \"x64\",\n \"x86-64\": \"x64\",\n }\n // Ignore case when matching as that's what humans expect.\n if (arch.toLowerCase() in arch_aliases) {\n arch = arch_aliases[arch.toLowerCase()]\n }\n\n // Due to the way Microsoft Visual C++ is configured, we have to resort to the following hack:\n // Call the configuration batch file and then output *all* the environment variables.\n\n var args = [arch]\n\n if (uwp && JSON.parse(uwp) === true) {\n args.push('uwp')\n }\n if (sdk) {\n args.push(sdk)\n }\n if (toolset) {\n args.push(`-vcvars_ver=${toolset}`)\n }\n if (spectre && JSON.parse(spectre) === true) {\n args.push('-vcvars_spectre_libs=spectre')\n }\n\n const vcvars = `\"${findVcvarsall(vsversion)}\" ${args.join(' ')}`\n core.debug(`vcvars command-line: ${vcvars}`)\n\n const cmd_output_string = child_process.execSync(`set && cls && ${vcvars} && cls && set`, {shell: \"cmd\"}).toString()\n const cmd_output_parts = cmd_output_string.split('\\f')\n\n const old_environment = cmd_output_parts[0].split('\\r\\n')\n const vcvars_output = cmd_output_parts[1].split('\\r\\n')\n const new_environment = cmd_output_parts[2].split('\\r\\n')\n\n // If vsvars.bat is given an incorrect command line, it will print out\n // an error and *still* exit successfully. Parse out errors from output\n // which don't look like environment variables, and fail if appropriate.\n const error_messages = vcvars_output.filter((line) => {\n if (line.match(/^\\[ERROR.*\\]/)) {\n // Don't print this particular line which will be confusing in output.\n if (!line.match(/Error in script usage. The correct usage is:$/)) {\n return true\n }\n }\n return false\n })\n if (error_messages.length > 0) {\n throw new Error('invalid parameters' + '\\r\\n' + error_messages.join('\\r\\n'))\n }\n\n // Convert old environment lines into a dictionary for easier lookup.\n let old_env_vars = {}\n for (let string of old_environment) {\n const [name, value] = string.split('=')\n old_env_vars[name] = value\n }\n\n // Now look at the new environment and export everything that changed.\n // These are the variables set by vsvars.bat. Also export everything\n // that was not there during the first sweep: those are new variables.\n core.startGroup('Environment variables')\n for (let string of new_environment) {\n // vsvars.bat likes to print some fluff at the beginning.\n // Skip lines that don't look like environment variables.\n if (!string.includes('=')) {\n continue;\n }\n let [name, new_value] = string.split('=')\n let old_value = old_env_vars[name]\n // For new variables \"old_value === undefined\".\n if (new_value !== old_value) {\n core.info(`Setting ${name}`)\n // Special case for a bunch of PATH-like variables: vcvarsall.bat\n // just prepends its stuff without checking if its already there.\n // This makes repeated invocations of this action fail after some\n // point, when the environment variable overflows. Avoid that.\n if (isPathVariable(name)) {\n new_value = filterPathValue(new_value)\n }\n core.exportVariable(name, new_value)\n }\n }\n core.endGroup()\n\n core.info(`Configured Developer Command Prompt`)\n}\nexports.setupMSVCDevCmd = setupMSVCDevCmd\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { setupMSVCDevCmd } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { rcOptions } from \"../cli-options.js\"\n\nfunction getArch(arch: string): string {\n switch (arch) {\n case \"x32\":\n case \"32\":\n case \"ia32\": {\n return \"x86\"\n }\n case \"64\": {\n return \"x64\"\n }\n default: {\n return arch\n }\n }\n}\n\nexport async function setupVCVarsall(\n vsversion: string,\n VCTargetsPath: string | undefined,\n arch: string,\n toolset: string | undefined,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (VCTargetsPath !== undefined && (await pathExists(VCTargetsPath))) {\n info(`Adding ${VCTargetsPath} to PATH`)\n await addEnv(\"VCTargetsPath\", VCTargetsPath, rcOptions)\n }\n\n await setupMSVCDevCmd(getArch(arch), sdk, toolset, uwp, spectre, vsversion)\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error } from \"ci-log\"\nimport pTimeout from \"p-timeout\"\nimport { setupBrew } from \"setup-brew\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { type ToolName, llvmTools, setups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\nexport const DEFAULT_TIMEOUT = 20 * 60 * 1000 // 20 minutes\n\nexport async function installTool(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n errorMessages: string[],\n timeout: number = DEFAULT_TIMEOUT,\n) {\n startGroup(`Installing ${tool} ${version}`)\n try {\n await pTimeout(installToolImpl(tool, version, osVersion, arch, setupCppDir, successMessages), {\n milliseconds: timeout,\n message: `Timeout while installing ${tool} ${version}. You can increase the timeout from options`,\n })\n } catch (e) {\n // push error message to the logger\n error(e as string | Error)\n if (e instanceof Error && e.stack !== undefined) {\n error(e.stack)\n }\n errorMessages.push(`${tool} failed to install`)\n }\n endGroup()\n}\n\nasync function installToolImpl(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n) {\n const hasLLVM = llvmTools.includes(tool)\n\n let installationInfo: InstallationInfo | undefined | void\n if (tool === \"vcvarsall\") {\n // eslint-disable-next-line no-await-in-loop\n await setupVCVarsall(getVersion(tool, version, osVersion), undefined, arch, undefined, undefined, false, false)\n } else if (tool === \"brew\") {\n // eslint-disable no-await-in-loop\n installationInfo = await setupBrew({ rcOptions })\n } else {\n // the tool installation directory (for the functions that ue it)\n const setupDir = join(setupCppDir, hasLLVM ? \"llvm\" : tool)\n\n const setupVersion = getVersion(tool, version, osVersion)\n\n // get the setup function\n const setupFunction = setups[tool]\n\n // eslint-disable no-await-in-loop\n installationInfo = await setupFunction(setupVersion, setupDir, arch)\n }\n // preparing a report string\n successMessages.push(getSuccessMessage(tool, installationInfo))\n}\n","export class TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new AbortError(errorMessage)\n\t: new DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined\n\t\t? getDOMException('This operation was aborted.')\n\t\t: signal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nexport default function pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t} = options;\n\n\tlet timer;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tpromise.then(resolve, reject);\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t})();\n\t});\n\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { arm64, armv7, powerpc64le, sparc64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractExe, extractTarByExe } from \"../utils/setup/extract.js\"\nimport type { PackageInfo } from \"../utils/setup/setupBin.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function getLLVMPackageInfo(\n version: string,\n platform: NodeJS.Platform,\n arch: string,\n): Promise {\n const url = await getLLVMAssetURL(platform, arch, version)\n info(`Downloading LLVM from ${url}`)\n\n return {\n url,\n extractedFolderName: \"\",\n binRelativeDir: \"bin\",\n binFileName: addExeExt(\"clang\"),\n extractFunction: platform === \"win32\"\n ? extractExe\n : (file: string, dest: string) => {\n return extractTarByExe(file, dest, 1)\n },\n }\n}\n\nexport async function getLLVMAssetURL(platform: string, arch: string, version: string) {\n const { keywords, optionalKeywords } = await getAssetKeywords(platform, arch)\n\n // first check the github releases\n const llvmGitHubAssets = await loadAssetList(\n join(dirname, \"github_llvm_llvm-project.json\"),\n )\n const ghAsset = matchAsset(\n llvmGitHubAssets,\n {\n version,\n keywords,\n optionalKeywords,\n filterMapTag(tag) {\n return tag.replace(/^llvmorg-/, \"\")\n },\n },\n )\n\n if (ghAsset !== undefined) {\n return `https://github.com/llvm/llvm-project/releases/download/${ghAsset.tag}/${ghAsset.name}`\n }\n\n // check the llvm website\n const llvmWebsiteAssets = await loadAssetList(\n join(dirname, \"llvm_org_releases.json\"),\n )\n\n const websiteAsset = matchAsset(\n llvmWebsiteAssets,\n {\n version,\n keywords,\n optionalKeywords,\n },\n )\n\n if (websiteAsset !== undefined) {\n return `https://llvm.org/releases/${websiteAsset.tag}/${websiteAsset.name}`\n }\n\n throw new Error(`No asset found for version ${version} matching ${keywords} and ${optionalKeywords}`)\n}\n\nasync function getAssetKeywords(platform: string, arch: string) {\n const keywords: string[] = []\n const optionalKeywords: string[] = []\n\n switch (platform) {\n case \"win32\": {\n if (x86_64.includes(arch)) {\n keywords.push(\"win64\")\n // TODO fallback to win32 if win64 is not available (e.g. for LLVM 3.6.2 and older)\n } else if (x86.includes(arch)) {\n keywords.push(\"win32\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"woa64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"linux\": {\n keywords.push(\"linux\")\n\n if (isUbuntu()) {\n optionalKeywords.push(\"ubuntu\")\n\n const ubuntuVer = await ubuntuVersion()\n if (ubuntuVer !== null) {\n optionalKeywords.push(`${ubuntuVer[0]}`)\n const ubuntuMin = ubuntuVer[1] < 10 ? `0${ubuntuVer[1]}` : `${ubuntuVer[1]}`\n\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}`)\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}.${ubuntuVer[2]}`)\n }\n } else if (hasDnf()) {\n optionalKeywords.push(\"rhel\")\n }\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"x86\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"aarch64\")\n } else if (armv7.includes(arch)) {\n keywords.push(\"armv7a\")\n } else if (powerpc64le.includes(arch)) {\n keywords.push(\"powerpc64le\")\n } else if (sparc64.includes(arch)) {\n keywords.push(\"sparc64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n case \"darwin\": {\n keywords.push(\"apple\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (arm64.includes(arch)) {\n // allow falling back to x86_64 if arm64 is not available\n optionalKeywords.push(\"arm64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"freebsd\": {\n keywords.push(\"freebsd\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"amd64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"i386\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n default:\n info(`Using ${platform} ${arch} for LLVM`)\n optionalKeywords.push(platform, arch)\n break\n }\n return { keywords, optionalKeywords }\n}\n","import path, { delimiter, join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupGcc } from \"../gcc/gcc.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type InstallationInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { semverCoerceIfInvalid } from \"../utils/setup/version.js\"\nimport { quoteIfHasSpace } from \"../utils/std/index.js\"\nimport { getVersion } from \"../versions/versions.js\"\nimport { LLVMPackages, setupLLVMApt } from \"./llvm_installer.js\"\nimport { getLLVMPackageInfo } from \"./llvm_url.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function setupLLVM(version: string, setupDir: string, arch: string): Promise {\n const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)\n await activateLLVM(installationInfo.installDir ?? setupDir, version)\n return installationInfo\n}\n\nasync function setupLLVMWithoutActivation_(version: string, setupDir: string, arch: string) {\n // install LLVM\n const [installationInfo, _1] = await Promise.all([\n setupLLVMOnly(version, setupDir, arch),\n addLLVMLoggingMatcher(),\n ])\n\n // install LLVM dependencies\n await setupLLVMDeps(arch)\n\n return installationInfo\n}\nconst setupLLVMWithoutActivation = memoize(setupLLVMWithoutActivation_, { promise: true })\n\n/**\n * Setup clang-format\n *\n * This uses the LLVM installer on Ubuntu, and the LLVM binaries on other platforms\n */\nexport function setupClangFormat(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch, LLVMPackages.ClangFormat)\n}\n\n/** Setup llvm tools (clang tidy, etc.) without activating llvm and using it as the compiler */\nexport function setupClangTools(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch)\n}\n\nasync function setupLLVMOnly(\n version: string,\n setupDir: string,\n arch: string,\n packages: LLVMPackages = LLVMPackages.All,\n) {\n const majorVersion = majorLLVMVersion(version)\n try {\n if (isUbuntu()) {\n return await setupLLVMApt(majorVersion, packages)\n }\n } catch (err) {\n info(`Failed to install llvm via system package manager ${err}`)\n }\n\n const installationInfo = await setupBin(\"llvm\", version, getLLVMPackageInfo, setupDir, arch)\n await llvmBinaryDeps(majorVersion)\n return installationInfo\n}\n\nfunction majorLLVMVersion(version: string) {\n const coeredVersion = semverCoerceIfInvalid(version)\n return Number.parseInt(coeredVersion.split(\".\")[0], 10)\n}\n\nasync function llvmBinaryDeps_(majorVersion: number) {\n if (isUbuntu()) {\n if (majorVersion <= 10) {\n await installAptPack([{ name: \"libtinfo5\" }])\n } else {\n await installAptPack([{ name: \"libtinfo-dev\" }])\n }\n } else if (isArch()) {\n // https://aur.archlinux.org/packages/ncurses5-compat-libs\n await setupPacmanPack(\"ncurses5-compat-libs\", undefined, \"yay\")\n } else if (hasDnf()) {\n // https://packages.fedoraproject.org/pkgs/ncurses/ncurses-compat-libs/index.html\n await setupDnfPack([\n { name: \"ncurses-compat-libs\" },\n ])\n }\n}\nconst llvmBinaryDeps = memoize(llvmBinaryDeps_, { promise: true })\n\nasync function setupLLVMDeps_(arch: string) {\n if (process.platform === \"linux\") {\n // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first,\n // but with a lower priority than the one used by activateLLVM()\n await setupGcc(getVersion(\"gcc\", undefined, await ubuntuVersion()), \"\", arch, 40)\n }\n}\nconst setupLLVMDeps = memoize(setupLLVMDeps_, { promise: true })\n\nexport async function activateLLVM(directory: string, version: string) {\n const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n\n const llvmMajor = majorLLVMVersion(version)\n\n const actPromises: Promise[] = [\n // compiler paths\n addEnv(\"CC\", addExeExt(`${directory}/bin/clang`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${directory}/bin/clang++`), rcOptions),\n\n // the output of this action\n addEnv(\"LLVM_PATH\", directory, rcOptions),\n\n // Setup LLVM as the compiler\n addEnv(\"LD_LIBRARY_PATH\", `${ld}${delimiter}${directory}/lib`, rcOptions),\n addEnv(\"DYLD_LIBRARY_PATH\", `${dyld}${delimiter}${directory}/lib`, rcOptions),\n\n // compiler flags\n addEnv(\"LLVM_LDFLAGS\", `-L${quoteIfHasSpace(`${directory}/lib`)}`, rcOptions),\n addEnv(\"LLVM_CPPFLAGS\", `-I${quoteIfHasSpace(`${directory}/include`)}`, rcOptions),\n\n // CPATH\n await pathExists(`${directory}/lib/clang/${version}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${version}/include`, rcOptions)\n : await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${llvmMajor}/include`, rcOptions)\n : Promise.resolve(),\n\n addEnv(\"LIBRARY_PATH\", `${directory}/lib`, rcOptions),\n\n // os sdks\n setupMacOSSDK(),\n ]\n\n if (isUbuntu()) {\n const priority = 60\n actPromises.push(\n addUpdateAlternativesToRc(\"cc\", `${directory}/bin/clang`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${directory}/bin/clang++`, rcOptions, priority),\n addUpdateAlternativesToRc(\"clang\", `${directory}/bin/clang`, rcOptions),\n addUpdateAlternativesToRc(\"clang++\", `${directory}/bin/clang++`, rcOptions),\n addUpdateAlternativesToRc(\"lld\", `${directory}/bin/lld`, rcOptions),\n addUpdateAlternativesToRc(\"ld.lld\", `${directory}/bin/ld.lld`, rcOptions),\n addUpdateAlternativesToRc(\"llvm-ar\", `${directory}/bin/llvm-ar`, rcOptions),\n )\n }\n\n await Promise.all(actPromises)\n}\n\nasync function addLLVMLoggingMatcher() {\n if (GITHUB_ACTIONS) {\n const matcherPath = join(dirname, \"llvm_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the llvm_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n }\n}\n","import { info } from \"console\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRoot } from \"admina\"\nimport { addPath } from \"envosman\"\nimport { chmod, readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { aptTimeout, hasNala, installAptPack, isAptPackRegexInstalled } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { DEFAULT_TIMEOUT } from \"../installTool.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\nexport enum LLVMPackages {\n All = 0,\n ClangFormat = 1,\n Core = 2,\n}\n\nexport async function setupLLVMApt(\n majorVersion: number,\n packages: LLVMPackages = LLVMPackages.All,\n): Promise {\n // TODO for older versions, this also includes the minor version\n const installationFolder = `/usr/lib/llvm-${majorVersion}`\n\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }])\n const dl = new DownloaderHelper(\"https://apt.llvm.org/llvm.sh\", tmpdir(), { fileName: \"llvm.sh\" })\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the LLVM installer script: ${err}`)\n })\n await dl.start()\n const installerScript = await readFile(dl.getDownloadPath(), \"utf-8\")\n\n const installerPath = join(tmpdir(), \"llvm-setup-cpp.sh\")\n const neededPackages = await patchAptLLVMScript(\n installerScript,\n installerPath,\n majorVersion,\n packages,\n )\n await installAptPack(neededPackages)\n await chmod(installerPath, \"755\")\n await execRoot(\n \"bash\",\n [installerPath, `${majorVersion}`, ...(packages === LLVMPackages.All ? [\"all\"] : [])],\n {\n stdio: \"inherit\",\n shell: true,\n timeout: DEFAULT_TIMEOUT,\n },\n )\n\n await addPath(`${installationFolder}/bin`, rcOptions)\n\n return {\n installDir: `${installationFolder}`,\n binDir: `${installationFolder}/bin`,\n bin: `${installationFolder}/bin/clang++`,\n }\n}\n\nasync function patchAptLLVMScript(\n givenScript: string,\n target_path: string,\n majorVersion: number,\n packages: LLVMPackages,\n) {\n let script = debugScript(givenScript)\n script = nonInteractiveScript(script)\n script = choosePackages(packages, script, majorVersion)\n script = await removeConflictingPackages(script)\n script = useNalaScript(script)\n\n await writeFile(target_path, script)\n\n // the packages needed by the script\n return [{ name: \"lsb-release\" }, { name: \"wget\" }, { name: \"software-properties-common\" }, { name: \"gnupg\" }]\n}\n\nfunction debugScript(script: string) {\n if (process.env.NODE_DEBUG !== \"1\" && process.env.NODE_DEBUG !== \"true\") {\n return script.replace(/set -eux/g, \"set -eu\")\n }\n return script\n}\n\nfunction nonInteractiveScript(script: string) {\n // make the scirpt non-interactive and fix broken packages\n return script.replace(\n /add-apt-repository \"\\${REPO_NAME}\"/g,\n `add-apt-repository -y -n \"\\${REPO_NAME}\"\napt-get update -o ${aptTimeout} -y`,\n )\n}\n\nasync function removeConflictingPackages(givenScript: string) {\n // fix conflicts between libclang-rt and libclang\n let script = givenScript.replace(\n /apt-get install -y/g,\n `apt-get install -o Dpkg::Options::=\"--force-overwrite\" -o ${aptTimeout} -y --fix-broken`,\n )\n\n // check if these are installed and if so, remove them from the script as they conflict\n const conflictingPackages = [\"libc++-$LLVM_VERSION-dev\", \"libc++abi-$LLVM_VERSION-dev\", \"libunwind-$LLVM_VERSION-dev\"]\n await Promise.all(\n conflictingPackages.map(async (pack) => {\n const installingPack = pack.replace(\"$LLVM_VERSION\", \"*\")\n if (await isAptPackRegexInstalled(installingPack)) {\n info(`Removing conflicting package ${installingPack}`)\n script = script.replace(pack, \"\")\n }\n }),\n )\n return script\n}\n\nfunction useNalaScript(script: string) {\n // use nala if it is available\n if (hasNala()) {\n return script.replace(/apt-get/g, \"nala\")\n }\n return script\n}\n\nfunction choosePackages(packages: LLVMPackages, script: string, majorVersion: number) {\n if (packages === LLVMPackages.ClangFormat) {\n return script.replace(/ -y \\$PKG/g, ` -y clang-format-${majorVersion}`)\n }\n return script\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { findVcvarsall, vsversion_to_versionnumber } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupVCVarsall } from \"../vcvarsall/vcvarsall.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\ntype MSVCVersion = \"2022\" | \"17.0\" | \"2019\" | \"16.0\" | \"2017\" | \"15.0\" | \"2015\" | \"14.0\" | \"2013\" | \"12.0\" | string\n\nexport async function setupMSVC(\n versionGiven: MSVCVersion,\n _setupDir: string,\n arch: string,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (process.platform !== \"win32\") {\n return\n }\n const version = vsversion_to_versionnumber(versionGiven) as string\n\n // check if the given version is already installed\n info(`Checking if MSVC ${version} is already installed`)\n let installed = false\n try {\n const vcvarsall_path = findVcvarsall(version) as string\n installed = true\n info(`Found the pre-installed version of MSVC at ${vcvarsall_path}`)\n } catch {\n // not installed, try installing\n }\n\n let toolset: string | undefined\n let VCTargetsPath: string | undefined\n // https://github.com/aminya/setup-cpp/issues/1\n if (!installed) {\n try {\n if (version === \"14.0\") {\n toolset = \"14.0\"\n await setupChocoPack(\"visualcpp-build-tools\", \"14.0.25420.1\", [\"--ignore-dependencies\"])\n VCTargetsPath = \"C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140\"\n } else if (version === \"15.0\") {\n toolset = \"14.16\"\n await setupChocoPack(\"visualstudio2017buildtools\", \"15.9.41.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16\" // TODO verify path\n } else if (version === \"16.0\") {\n toolset = \"14.29\"\n await setupChocoPack(\"visualstudio2019buildtools\", \"16.11.7.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133\"\n } else if (version === \"17.0\") {\n toolset = undefined\n await setupChocoPack(\"visualstudio2022buildtools\", \"117.0.5.0\", [])\n VCTargetsPath = undefined\n } else {\n error(`The given MSVC versions ${versionGiven} is not supported yet.`)\n }\n } catch (e) {\n error(e as string | Error)\n }\n }\n // run vcvarsall.bat environment variables\n await setupVCVarsall(version, VCTargetsPath, arch, toolset, sdk, uwp, spectre)\n\n if (GITHUB_ACTIONS) {\n await addMSVCLoggingMatcher()\n }\n}\n\nasync function addMSVCLoggingMatcher() {\n const matcherPath = join(dirname, \"msvc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the msvc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addPath } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupOpencppcoverage(version: string | undefined, _setupDir: string, _arch: string) {\n if (process.platform !== \"win32\") {\n return\n }\n await setupChocoPack(\"opencppcoverage\", version)\n const binDir = await activateOpencppcoverage()\n return { binDir }\n}\n\nasync function activateOpencppcoverage() {\n const binDir = \"C:/Program Files/OpenCppCoverage\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { execRootSync } from \"admina\"\nimport { error } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n/** Get the platform data for cmake */\nfunction getPowerShellPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n return {\n url: getPowershellUrl(platform, arch, version),\n binRelativeDir: \"\",\n binFileName: addExeExt(\"pwsh\"),\n extractedFolderName: \"\",\n }\n}\n\nfunction getPowershellUrl(\n platform: string,\n arch: string,\n version: string,\n) {\n switch (platform) {\n case \"win32\": {\n const osArchStr = ([\"ia32\", \"x86\", \"i386\", \"x32\"].includes(arch))\n ? \"win-x86\"\n : \"win-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/PowerShell-${version}-${osArchStr}.zip`\n }\n case \"darwin\": {\n const osArchStr = [\"arm\", \"arm64\"].includes(arch) ? \"osx-arm64\" : \"osx-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n case \"linux\": {\n const archMap = {\n arm64: \"linux-arm64\",\n arm: \"linux-arm64\",\n arm32: \"linux-arm32\",\n aarch64: \"linux-arm64\",\n x64: \"linux-x64\",\n } as Record\n const osArchStr = archMap[arch] ?? \"linux-x64\"\n // TODO support musl\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershell(version: string, setupDir: string, arch: string) {\n try {\n return await setupBin(\"pwsh\", version, getPowerShellPackageInfo, setupDir, arch)\n } catch (err) {\n error(`Failed to setup pwsh via download: ${err}. Trying package managers...`)\n return setupPowershellSystem(version, setupDir, arch)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershellSystem(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"powershell-core\", version)\n const binDir = \"C:/Program Files/PowerShell/7\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"powershell\", version, { cask: true, overwrite: false })\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"powershell-bin\", version, \"yay\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"curl\" }])\n execRootSync(\"/bin/bash\", [\n \"-c\",\n \"curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo\",\n ])\n return setupDnfPack([{ name: \"powershell\", version }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"curl\" }])\n const ubuntuVerSplitted = (await ubuntuVersion())!\n const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`\n\n execRootSync(\"curl\", [\n \"-LJO\",\n `https://packages.microsoft.com/config/ubuntu/${ubuntuVersionString}/packages-microsoft-prod.deb`,\n ])\n execRootSync(\"dpkg\", [\"-i\", \"packages-microsoft-prod.deb\"])\n\n // TODO Debian\n // const keyFileName = await addAptKeyViaURL(\n // \"microsoft.asc\",\n // \"https://packages.microsoft.com/keys/microsoft.asc\"\n // )\n // execRootSync(\"/bin/bash\", [\n // \"-c\",\n // `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main\" > /etc/apt/sources.list.d/microsoft.list`,\n // ])\n\n return installAptPack([{ name: \"powershell\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addExeExt } from \"patha\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name task uses in their download links */\nfunction getTaskPlatform(platform: NodeJS.Platform) {\n switch (platform) {\n case \"win32\":\n return \"windows\"\n default:\n return platform\n }\n}\n\n/** Get the arch name task uses in their download links */\nfunction getTaskArch(arch: string) {\n switch (arch) {\n case \"x64\":\n return \"amd64\"\n case \"ia32\":\n case \"x86\":\n case \"i386\":\n case \"x32\":\n return \"386\"\n default:\n return arch\n }\n}\n\n/** Get the platform data for task */\nfunction getTaskPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const taskPlatform = getTaskPlatform(platform)\n const taskArch = getTaskArch(arch)\n const extension = platform === \"win32\" ? \"zip\" : \"tar.gz\"\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"task\"),\n extractedFolderName: \"\",\n url: `https://github.com/go-task/task/releases/download/v${version}/task_${taskPlatform}_${taskArch}.${extension}`,\n }\n}\n\nexport function setupTask(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"task\", version, getTaskPackageInfo, setupDir, arch)\n}\n","import { getInput } from \"@actions/core\"\nimport { info } from \"ci-log\"\nimport mri from \"mri\"\nimport { untildifyUser } from \"untildify-user\"\nimport { type Inputs, inputs } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\n\nexport function parseArgs(args: string[]): Opts {\n return mri & { help: boolean }>(args, {\n string: [...inputs, \"timeout\"],\n default: Object.fromEntries(inputs.map((inp) => [inp, maybeGetInput(inp)])),\n alias: { h: \"help\" },\n boolean: \"help\",\n })\n}\n\nexport function printHelp() {\n info(`\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 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 you would like to install for this tool. e.g. --conan true or --conan \"1.42.1\"\n\nAll the available tools:\n`)\n\n console.table(\n {\n \"compiler and analyzer\": {\n tools: \"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format\",\n },\n \"build system\": { tools: \"--cmake, --ninja, --meson, --make, --task, --bazel\" },\n \"package manager\": { tools: \"--vcpkg, --conan, --choco, --brew, --nala\" },\n cache: { tools: \"--ccache, --sccache\" },\n documentation: { tools: \"--doxygen, --graphviz\" },\n coverage: { tools: \"--gcovr, --opencppcoverage, --kcov\" },\n other: { tools: \"--python, --powershell, --sevenzip\" },\n },\n [\"tools\"],\n )\n}\n/** Get an object from github actions */\n\nexport function maybeGetInput(key: string) {\n const value = getInput(key.toLowerCase())\n if (value !== \"false\" && value !== \"\") {\n return value\n }\n return undefined // skip installation\n}\nexport type Opts = mri.Argv<\n Record & {\n help: boolean\n timeout?: string\n }\n>\n\nexport function getSuccessMessage(tool: string, installationInfo: InstallationInfo | undefined | void) {\n let msg = `✅ ${tool} was installed successfully:`\n if (installationInfo === undefined) {\n return msg\n }\n if (\"installDir\" in installationInfo) {\n msg += `\\n- The installation directory is ${installationInfo.installDir}`\n }\n if (installationInfo.binDir !== \"\") {\n msg += `\\n- The binary directory is ${installationInfo.binDir}`\n }\n return msg\n}\n\nexport const rcOptions = {\n rcPath: untildifyUser(\"~/.cpprc\"),\n guard: \"cpp\",\n}\n","'use strict'\n\nconst vendors = require('./vendors.json')\n\nconst env = process.env\n\n// Used for testing only\nObject.defineProperty(exports, '_vendors', {\n value: vendors.map(function (v) {\n return v.constant\n })\n})\n\nexports.name = null\nexports.isPR = null\n\nvendors.forEach(function (vendor) {\n const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]\n const isCI = envs.every(function (obj) {\n return checkEnv(obj)\n })\n\n exports[vendor.constant] = isCI\n\n if (!isCI) {\n return\n }\n\n exports.name = vendor.name\n\n switch (typeof vendor.pr) {\n case 'string':\n // \"pr\": \"CIRRUS_PR\"\n exports.isPR = !!env[vendor.pr]\n break\n case 'object':\n if ('env' in vendor.pr) {\n // \"pr\": { \"env\": \"BUILDKITE_PULL_REQUEST\", \"ne\": \"false\" }\n exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne\n } else if ('any' in vendor.pr) {\n // \"pr\": { \"any\": [\"ghprbPullId\", \"CHANGE_ID\"] }\n exports.isPR = vendor.pr.any.some(function (key) {\n return !!env[key]\n })\n } else {\n // \"pr\": { \"DRONE_BUILD_EVENT\": \"pull_request\" }\n exports.isPR = checkEnv(vendor.pr)\n }\n break\n default:\n // PR detection not supported for this vendor\n exports.isPR = null\n }\n})\n\nexports.isCI = !!(\n env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'\n (env.BUILD_ID || // Jenkins, Cloudbees\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari\n env.CI_APP_ID || // Appflow\n env.CI_BUILD_ID || // Appflow\n env.CI_BUILD_NUMBER || // Appflow\n env.CI_NAME || // Codeship and others\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.RUN_ID || // TaskCluster, dsari\n exports.name ||\n false)\n)\n\nfunction checkEnv (obj) {\n // \"env\": \"CIRRUS\"\n if (typeof obj === 'string') return !!env[obj]\n\n // \"env\": { \"env\": \"NODE\", \"includes\": \"/app/.heroku/node/bin/node\" }\n if ('env' in obj) {\n // Currently there are no other types, uncomment when there are\n // if ('includes' in obj) {\n return env[obj.env] && env[obj.env].includes(obj.includes)\n // }\n }\n if ('any' in obj) {\n return obj.any.some(function (k) {\n return !!env[k]\n })\n }\n return Object.keys(obj).every(function (k) {\n return env[k] === obj[k]\n })\n}\n","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;","import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;","import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;","export default '00000000-0000-0000-0000-000000000000';","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","module.exports = require('./lib/tunnel');\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as pm from './proxy';\nimport * as tunnel from 'tunnel';\nexport var HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (HttpCodes = {}));\nexport var Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (Headers = {}));\nexport var MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nexport function getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nexport class HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n statusCode;\n result;\n}\nexport class HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n message;\n async readBody() {\n return new Promise(async (resolve) => {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n });\n }\n async readBodyBuffer() {\n return new Promise(async (resolve) => {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n });\n }\n}\nexport function isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexport class HttpClient {\n userAgent;\n handlers;\n requestOptions;\n _ignoreSslError = false;\n _socketTimeout;\n _allowRedirects = true;\n _allowRedirectDowngrade = false;\n _maxRedirects = 50;\n _allowRetries = false;\n _maxRetries = 1;\n _agent;\n _proxyAgent;\n _proxyAgentDispatcher;\n _keepAlive = false;\n _disposed = false;\n constructor(userAgent, handlers, requestOptions) {\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n async options(requestUrl, additionalHeaders) {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n }\n async get(requestUrl, additionalHeaders) {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n }\n async del(requestUrl, additionalHeaders) {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n }\n async post(requestUrl, data, additionalHeaders) {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n }\n async patch(requestUrl, data, additionalHeaders) {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n }\n async put(requestUrl, data, additionalHeaders) {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n }\n async head(requestUrl, additionalHeaders) {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n }\n async sendStream(verb, requestUrl, stream, additionalHeaders) {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n async getJson(requestUrl, additionalHeaders = {}) {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = await this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async postJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async putJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async patchJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n async request(verb, requestUrl, data, headers) {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = await this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n await response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = await this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n await response.readBody();\n await this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n async requestRaw(info, data) {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n async getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return undefined;\n }\n return await this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (!useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: {\n ...((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n }),\n host: proxyUrl.hostname,\n port: proxyUrl.port\n }\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if tunneling agent isn't assigned create a new agent\n if (!agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n async _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n // Lazy load ProxyAgent to avoid bundling all the undici\n const ProxyAgent = (await import('undici/lib/proxy-agent'));\n proxyAgent = new ProxyAgent({\n uri: proxyUrl.href,\n pipelining: !this._keepAlive ? 0 : 1,\n ...((proxyUrl.username || proxyUrl.password) && {\n token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`\n })\n });\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n async _performExponentialBackoff(retryNumber) {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n }\n async _processResponse(res, options) {\n return new Promise(async (resolve, reject) => {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = await res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n }\n}\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport pathKey from 'path-key';\n\nexport const npmRunPath = ({\n\tcwd = process.cwd(),\n\tpath: pathOption = process.env[pathKey()],\n\tpreferLocal = true,\n\texecPath = process.execPath,\n\taddExecPath = true,\n} = {}) => {\n\tconst cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;\n\tconst cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\tif (preferLocal) {\n\t\tapplyPreferLocal(result, cwdPath);\n\t}\n\n\tif (addExecPath) {\n\t\tapplyExecPath(result, execPath, cwdPath);\n\t}\n\n\treturn [...result, pathOption].join(path.delimiter);\n};\n\nconst applyPreferLocal = (result, cwdPath) => {\n\tlet previous;\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n};\n\n// Ensure the running `node` binary is used\nconst applyExecPath = (result, execPath, cwdPath) => {\n\tconst execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;\n\tresult.push(path.resolve(cwdPath, execPathString, '..'));\n};\n\nexport const npmRunPathEnv = ({env = process.env, ...options} = {}) => {\n\tenv = {...env};\n\n\tconst pathName = pathKey({env});\n\toptions.path = env[pathName];\n\tenv[pathName] = npmRunPath(options);\n\n\treturn env;\n};\n","const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n","\nexport const getRealtimeSignals=()=>{\nconst length=SIGRTMAX-SIGRTMIN+1;\nreturn Array.from({length},getRealtimeSignal);\n};\n\nconst getRealtimeSignal=(value,index)=>({\nname:`SIGRT${index+1}`,\nnumber:SIGRTMIN+index,\naction:\"terminate\",\ndescription:\"Application-specific signal (realtime)\",\nstandard:\"posix\"\n});\n\nconst SIGRTMIN=34;\nexport const SIGRTMAX=64;","\n\nexport const SIGNALS=[\n{\nname:\"SIGHUP\",\nnumber:1,\naction:\"terminate\",\ndescription:\"Terminal closed\",\nstandard:\"posix\"\n},\n{\nname:\"SIGINT\",\nnumber:2,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-C\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGQUIT\",\nnumber:3,\naction:\"core\",\ndescription:\"User interruption with CTRL-\\\\\",\nstandard:\"posix\"\n},\n{\nname:\"SIGILL\",\nnumber:4,\naction:\"core\",\ndescription:\"Invalid machine instruction\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGTRAP\",\nnumber:5,\naction:\"core\",\ndescription:\"Debugger breakpoint\",\nstandard:\"posix\"\n},\n{\nname:\"SIGABRT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGIOT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGBUS\",\nnumber:7,\naction:\"core\",\ndescription:\n\"Bus error due to misaligned, non-existing address or paging error\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGEMT\",\nnumber:7,\naction:\"terminate\",\ndescription:\"Command should be emulated but is not implemented\",\nstandard:\"other\"\n},\n{\nname:\"SIGFPE\",\nnumber:8,\naction:\"core\",\ndescription:\"Floating point arithmetic error\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGKILL\",\nnumber:9,\naction:\"terminate\",\ndescription:\"Forced termination\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGUSR1\",\nnumber:10,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGSEGV\",\nnumber:11,\naction:\"core\",\ndescription:\"Segmentation fault\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGUSR2\",\nnumber:12,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGPIPE\",\nnumber:13,\naction:\"terminate\",\ndescription:\"Broken pipe or socket\",\nstandard:\"posix\"\n},\n{\nname:\"SIGALRM\",\nnumber:14,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTERM\",\nnumber:15,\naction:\"terminate\",\ndescription:\"Termination\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGSTKFLT\",\nnumber:16,\naction:\"terminate\",\ndescription:\"Stack is empty or overflowed\",\nstandard:\"other\"\n},\n{\nname:\"SIGCHLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"posix\"\n},\n{\nname:\"SIGCLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"other\"\n},\n{\nname:\"SIGCONT\",\nnumber:18,\naction:\"unpause\",\ndescription:\"Unpaused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGSTOP\",\nnumber:19,\naction:\"pause\",\ndescription:\"Paused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGTSTP\",\nnumber:20,\naction:\"pause\",\ndescription:\"Paused using CTRL-Z or \\\"suspend\\\"\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTTIN\",\nnumber:21,\naction:\"pause\",\ndescription:\"Background process cannot read terminal input\",\nstandard:\"posix\"\n},\n{\nname:\"SIGBREAK\",\nnumber:21,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-BREAK\",\nstandard:\"other\"\n},\n{\nname:\"SIGTTOU\",\nnumber:22,\naction:\"pause\",\ndescription:\"Background process cannot write to terminal output\",\nstandard:\"posix\"\n},\n{\nname:\"SIGURG\",\nnumber:23,\naction:\"ignore\",\ndescription:\"Socket received out-of-band data\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXCPU\",\nnumber:24,\naction:\"core\",\ndescription:\"Process timed out\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXFSZ\",\nnumber:25,\naction:\"core\",\ndescription:\"File too big\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGVTALRM\",\nnumber:26,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGPROF\",\nnumber:27,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGWINCH\",\nnumber:28,\naction:\"ignore\",\ndescription:\"Terminal window size changed\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGIO\",\nnumber:29,\naction:\"terminate\",\ndescription:\"I/O is available\",\nstandard:\"other\"\n},\n{\nname:\"SIGPOLL\",\nnumber:29,\naction:\"terminate\",\ndescription:\"Watched event\",\nstandard:\"other\"\n},\n{\nname:\"SIGINFO\",\nnumber:29,\naction:\"ignore\",\ndescription:\"Request for process information\",\nstandard:\"other\"\n},\n{\nname:\"SIGPWR\",\nnumber:30,\naction:\"terminate\",\ndescription:\"Device running out of power\",\nstandard:\"systemv\"\n},\n{\nname:\"SIGSYS\",\nnumber:31,\naction:\"core\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n},\n{\nname:\"SIGUNUSED\",\nnumber:31,\naction:\"terminate\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n}];","import{constants}from\"node:os\";\n\nimport{SIGNALS}from\"./core.js\";\nimport{getRealtimeSignals}from\"./realtime.js\";\n\n\n\nexport const getSignals=()=>{\nconst realtimeSignals=getRealtimeSignals();\nconst signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);\nreturn signals;\n};\n\n\n\n\n\n\n\nconst normalizeSignal=({\nname,\nnumber:defaultNumber,\ndescription,\naction,\nforced=false,\nstandard\n})=>{\nconst{\nsignals:{[name]:constantSignal}\n}=constants;\nconst supported=constantSignal!==undefined;\nconst number=supported?constantSignal:defaultNumber;\nreturn{name,number,description,supported,action,forced,standard};\n};","import{constants}from\"node:os\";\n\nimport{SIGRTMAX}from\"./realtime.js\";\nimport{getSignals}from\"./signals.js\";\n\n\n\nconst getSignalsByName=()=>{\nconst signals=getSignals();\nreturn Object.fromEntries(signals.map(getSignalByName));\n};\n\nconst getSignalByName=({\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n})=>[name,{name,number,description,supported,action,forced,standard}];\n\nexport const signalsByName=getSignalsByName();\n\n\n\n\nconst getSignalsByNumber=()=>{\nconst signals=getSignals();\nconst length=SIGRTMAX+1;\nconst signalsA=Array.from({length},(value,number)=>\ngetSignalByNumber(number,signals));\n\nreturn Object.assign({},...signalsA);\n};\n\nconst getSignalByNumber=(number,signals)=>{\nconst signal=findSignalByNumber(number,signals);\n\nif(signal===undefined){\nreturn{};\n}\n\nconst{name,description,supported,action,forced,standard}=signal;\nreturn{\n[number]:{\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n}\n};\n};\n\n\n\nconst findSignalByNumber=(number,signals)=>{\nconst signal=signals.find(({name})=>constants.signals[name]===number);\n\nif(signal!==undefined){\nreturn signal;\n}\n\nreturn signals.find((signalA)=>signalA.number===number);\n};\n\nexport const signalsByNumber=getSignalsByNumber();","import process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n","const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nvar process = global.process\n\nconst processOk = function (process) {\n return process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n}\n\n// some kind of non-node environment, just no-op\n/* istanbul ignore if */\nif (!processOk(process)) {\n module.exports = function () {\n return function () {}\n }\n} else {\n var assert = require('assert')\n var signals = require('./signals.js')\n var isWin = /^win/i.test(process.platform)\n\n var EE = require('events')\n /* istanbul ignore if */\n if (typeof EE !== 'function') {\n EE = EE.EventEmitter\n }\n\n var emitter\n if (process.__signal_exit_emitter__) {\n emitter = process.__signal_exit_emitter__\n } else {\n emitter = process.__signal_exit_emitter__ = new EE()\n emitter.count = 0\n emitter.emitted = {}\n }\n\n // Because this emitter is a global, we have to check to see if a\n // previous version of this library failed to enable infinite listeners.\n // I know what you're about to say. But literally everything about\n // signal-exit is a compromise with evil. Get used to it.\n if (!emitter.infinite) {\n emitter.setMaxListeners(Infinity)\n emitter.infinite = true\n }\n\n module.exports = function (cb, opts) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return function () {}\n }\n assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')\n\n if (loaded === false) {\n load()\n }\n\n var ev = 'exit'\n if (opts && opts.alwaysLast) {\n ev = 'afterexit'\n }\n\n var remove = function () {\n emitter.removeListener(ev, cb)\n if (emitter.listeners('exit').length === 0 &&\n emitter.listeners('afterexit').length === 0) {\n unload()\n }\n }\n emitter.on(ev, cb)\n\n return remove\n }\n\n var unload = function unload () {\n if (!loaded || !processOk(global.process)) {\n return\n }\n loaded = false\n\n signals.forEach(function (sig) {\n try {\n process.removeListener(sig, sigListeners[sig])\n } catch (er) {}\n })\n process.emit = originalProcessEmit\n process.reallyExit = originalProcessReallyExit\n emitter.count -= 1\n }\n module.exports.unload = unload\n\n var emit = function emit (event, code, signal) {\n /* istanbul ignore if */\n if (emitter.emitted[event]) {\n return\n }\n emitter.emitted[event] = true\n emitter.emit(event, code, signal)\n }\n\n // { : , ... }\n var sigListeners = {}\n signals.forEach(function (sig) {\n sigListeners[sig] = function listener () {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n var listeners = process.listeners(sig)\n if (listeners.length === emitter.count) {\n unload()\n emit('exit', null, sig)\n /* istanbul ignore next */\n emit('afterexit', null, sig)\n /* istanbul ignore next */\n if (isWin && sig === 'SIGHUP') {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n sig = 'SIGINT'\n }\n /* istanbul ignore next */\n process.kill(process.pid, sig)\n }\n }\n })\n\n module.exports.signals = function () {\n return signals\n }\n\n var loaded = false\n\n var load = function load () {\n if (loaded || !processOk(global.process)) {\n return\n }\n loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n emitter.count += 1\n\n signals = signals.filter(function (sig) {\n try {\n process.on(sig, sigListeners[sig])\n return true\n } catch (er) {\n return false\n }\n })\n\n process.emit = processEmit\n process.reallyExit = processReallyExit\n }\n module.exports.load = load\n\n var originalProcessReallyExit = process.reallyExit\n var processReallyExit = function processReallyExit (code) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n process.exitCode = code || /* istanbul ignore next */ 0\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n originalProcessReallyExit.call(process, process.exitCode)\n }\n\n var originalProcessEmit = process.emit\n var processEmit = function processEmit (ev, arg) {\n if (ev === 'exit' && processOk(global.process)) {\n /* istanbul ignore else */\n if (arg !== undefined) {\n process.exitCode = arg\n }\n var ret = originalProcessEmit.apply(this, arguments)\n /* istanbul ignore next */\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n return ret\n } else {\n return originalProcessEmit.apply(this, arguments)\n }\n }\n}\n","// This is not the set of all possible signals.\n//\n// It IS, however, the set of all signals that trigger\n// an exit on either Linux or BSD systems. Linux is a\n// superset of the signal names supported on BSD, and\n// the unknown signals just fail to register, so we can\n// catch that easily enough.\n//\n// Don't bother with SIGKILL. It's uncatchable, which\n// means that we can't fire any callbacks anyway.\n//\n// If a user does happen to register a handler on a non-\n// fatal signal like SIGWINCH or something, and then\n// exit, it'll end up firing `process.emit('exit')`, so\n// the handler will be fired anyway.\n//\n// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n// artificially, inherently leave the process in a\n// state from which it is not safe to try and enter JS\n// listeners.\nmodule.exports = [\n 'SIGABRT',\n 'SIGALRM',\n 'SIGHUP',\n 'SIGINT',\n 'SIGTERM'\n]\n\nif (process.platform !== 'win32') {\n module.exports.push(\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n module.exports.push(\n 'SIGIO',\n 'SIGPOLL',\n 'SIGPWR',\n 'SIGSTKFLT',\n 'SIGUNUSED'\n )\n}\n","'use strict';\nconst {PassThrough: PassThroughStream} = require('stream');\n\nmodule.exports = options => {\n\toptions = {...options};\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst isBuffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || isBuffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (isBuffer) {\n\t\tencoding = null;\n\t}\n\n\tconst stream = new PassThroughStream({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tlet length = 0;\n\tconst chunks = [];\n\n\tstream.on('data', chunk => {\n\t\tchunks.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlength = chunks.length;\n\t\t} else {\n\t\t\tlength += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn chunks;\n\t\t}\n\n\t\treturn isBuffer ? Buffer.concat(chunks, length) : chunks.join('');\n\t};\n\n\tstream.getBufferedLength = () => length;\n\n\treturn stream;\n};\n","'use strict';\n\nconst { PassThrough } = require('stream');\n\nmodule.exports = function (/*streams...*/) {\n var sources = []\n var output = new PassThrough({objectMode: true})\n\n output.setMaxListeners(0)\n\n output.add = add\n output.isEmpty = isEmpty\n\n output.on('unpipe', remove)\n\n Array.prototype.slice.call(arguments).forEach(add)\n\n return output\n\n function add (source) {\n if (Array.isArray(source)) {\n source.forEach(add)\n return this\n }\n\n sources.push(source);\n source.once('end', remove.bind(null, source))\n source.once('error', output.emit.bind(output, 'error'))\n source.pipe(output, {end: false})\n return this\n }\n\n function isEmpty () {\n return sources.length == 0;\n }\n\n function remove (source) {\n sources = sources.filter(function (it) { return it !== source })\n if (!sources.length && output.readable) { output.end() }\n }\n}\n","import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\nconst DOUBLE_QUOTES_REGEXP = /\"/g;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens[tokens.length - 1];\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens[tokens.length - 1]}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n","import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n","export default function stripFinalNewline(input) {\n\tconst LF = typeof input === 'string' ? '\\n' : '\\n'.charCodeAt();\n\tconst CR = typeof input === 'string' ? '\\r' : '\\r'.charCodeAt();\n\n\tif (input[input.length - 1] === LF) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\tif (input[input.length - 1] === CR) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\treturn input;\n}\n","import * as fs from \"fs\"\nexport default fs.promises\n\nexport const {\n access,\n appendFile,\n chmod,\n chown,\n copyFile,\n lchmod,\n lchown,\n link,\n lstat,\n mkdir,\n mkdtemp,\n open,\n readdir,\n readFile,\n readlink,\n realpath,\n rename,\n rmdir,\n stat,\n symlink,\n truncate,\n unlink,\n utimes,\n writeFile,\n} = fs.promises\n\nimport { promisify } from \"util\"\nexport const rm = \"rm\" in fs.promises\n ? (\n fs.promises as typeof fs.promises & {\n rm: (path: string, options?: fs.RmDirOptions) => Promise\n }\n ).rm\n : promisify(fs.unlink)\n","\"use strict\";\n/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkStat = (stat, options) => stat.isFile() && checkMode(stat, options);\nconst checkMode = (stat, options) => {\n const myUid = options.uid ?? process.getuid?.();\n const myGroups = options.groups ?? process.getgroups?.() ?? [];\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid');\n }\n const groups = new Set([myGid, ...myGroups]);\n const mod = stat.mode;\n const uid = stat.uid;\n const gid = stat.gid;\n const u = parseInt('100', 8);\n const g = parseInt('010', 8);\n const o = parseInt('001', 8);\n const ug = u | g;\n return !!(mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0));\n};\n//# sourceMappingURL=posix.js.map","\"use strict\";\n/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkPathExt = (path, options) => {\n const { pathExt = process.env.PATHEXT || '' } = options;\n const peSplit = pathExt.split(';');\n if (peSplit.indexOf('') !== -1) {\n return true;\n }\n for (let i = 0; i < peSplit.length; i++) {\n const p = peSplit[i].toLowerCase();\n const ext = path.substring(path.length - p.length).toLowerCase();\n if (p && ext === p) {\n return true;\n }\n }\n return false;\n};\nconst checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options);\n//# sourceMappingURL=win32.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = exports.posix = exports.win32 = void 0;\nconst posix = __importStar(require(\"./posix.js\"));\nexports.posix = posix;\nconst win32 = __importStar(require(\"./win32.js\"));\nexports.win32 = win32;\n__exportStar(require(\"./options.js\"), exports);\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;\nconst impl = platform === 'win32' ? win32 : posix;\n/**\n * Determine whether a path is executable on the current platform.\n */\nexports.isexe = impl.isexe;\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexports.sync = impl.sync;\n//# sourceMappingURL=index.js.map","const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn sign(10) === 1 && sign(-20) === -1;\n};\n","// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , value = require(\"./valid-value\")\n , bind = Function.prototype.bind\n , call = Function.prototype.call\n , keys = Object.keys\n , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb /*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n","\"use strict\";\n\nvar _undefined = require(\"../function/noop\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1 /*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n","\"use strict\";\n\nvar sign = require(\"../math/sign\")\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif (value === 0 || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Math.sign : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || value === 0) return value;\n\treturn value > 0 ? 1 : -1;\n};\n","\"use strict\";\n\nvar toInteger = require(\"./to-integer\")\n , max = Math.max;\n\nmodule.exports = function (value) { return max(0, toInteger(value)); };\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\");\n\nmodule.exports = function (optsLength, fnLength, isAsync) {\n\tvar length;\n\tif (isNaN(optsLength)) {\n\t\tlength = fnLength;\n\t\tif (!(length >= 0)) return 1;\n\t\tif (isAsync && length) return length - 1;\n\t\treturn length;\n\t}\n\tif (optsLength === false) return false;\n\treturn toPosInt(optsLength);\n};\n","\"use strict\";\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./_iterate\")(\"forEach\");\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.assign : require(\"./shim\");\n","\"use strict\";\n\nvar keys = require(\"../keys\")\n , value = require(\"../valid-value\")\n , max = Math.max;\n\nmodule.exports = function (dest, src /*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.keys : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isValue = require(\"../is-value\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };\n","\"use strict\";\n\nvar assign = require(\"../object/assign\")\n , isObject = require(\"../object/is-object\")\n , isValue = require(\"../object/is-value\")\n , captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (message /*, code, ext*/) {\n\tvar err = new Error(message), code = arguments[1], ext = arguments[2];\n\tif (!isValue(ext)) {\n\t\tif (isObject(code)) {\n\t\t\text = code;\n\t\t\tcode = null;\n\t\t}\n\t}\n\tif (isValue(ext)) assign(err, ext);\n\tif (isValue(code)) err.code = code;\n\tif (captureStackTrace) captureStackTrace(err, module.exports);\n\treturn err;\n};\n","\"use strict\";\n\nvar toPosInt = require(\"../number/to-pos-integer\");\n\nvar test = function (arg1, arg2) { return arg2; };\n\nvar desc, defineProperty, generate, mixin;\n\ntry {\n\tObject.defineProperty(test, \"length\", {\n\t\tconfigurable: true,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tvalue: 1\n\t});\n}\ncatch (ignore) {}\n\nif (test.length === 1) {\n\t// ES6\n\tdesc = { configurable: true, writable: false, enumerable: false };\n\tdefineProperty = Object.defineProperty;\n\tmodule.exports = function (fn, length) {\n\t\tlength = toPosInt(length);\n\t\tif (fn.length === length) return fn;\n\t\tdesc.value = length;\n\t\treturn defineProperty(fn, \"length\", desc);\n\t};\n} else {\n\tmixin = require(\"../object/mixin\");\n\tgenerate = (function () {\n\t\tvar cache = [];\n\t\treturn function (length) {\n\t\t\tvar args, i = 0;\n\t\t\tif (cache[length]) return cache[length];\n\t\t\targs = [];\n\t\t\twhile (length--) args.push(\"a\" + (++i).toString(36));\n\t\t\t// eslint-disable-next-line no-new-func\n\t\t\treturn new Function(\n\t\t\t\t\"fn\",\n\t\t\t\t\"return function (\" + args.join(\", \") + \") { return fn.apply(this, arguments); };\"\n\t\t\t);\n\t\t};\n\t})();\n\tmodule.exports = function (src, length) {\n\t\tvar target;\n\t\tlength = toPosInt(length);\n\t\tif (src.length === length) return src;\n\t\ttarget = generate(length)(src);\n\t\ttry { mixin(target, src); }\n\t\tcatch (ignore) {}\n\t\treturn target;\n\t};\n}\n","\"use strict\";\n\n// ES3 safe\nvar _undefined = void 0;\n\nmodule.exports = function (value) { return value !== _undefined && value !== null; };\n","\"use strict\";\n\nvar isValue = require(\"../value/is\");\n\n// prettier-ignore\nvar possibleTypes = { \"object\": true, \"function\": true, \"undefined\": true /* document.all */ };\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\treturn hasOwnProperty.call(possibleTypes, typeof value);\n};\n","\"use strict\";\n\nvar isPrototype = require(\"../prototype/is\");\n\nmodule.exports = function (value) {\n\tif (typeof value !== \"function\") return false;\n\n\tif (!hasOwnProperty.call(value, \"length\")) return false;\n\n\ttry {\n\t\tif (typeof value.length !== \"number\") return false;\n\t\tif (typeof value.call !== \"function\") return false;\n\t\tif (typeof value.apply !== \"function\") return false;\n\t} catch (error) {\n\t\treturn false;\n\t}\n\n\treturn !isPrototype(value);\n};\n","\"use strict\";\n\nvar isObject = require(\"../object/is\");\n\nmodule.exports = function (value) {\n\tif (!isObject(value)) return false;\n\ttry {\n\t\tif (!value.constructor) return false;\n\t\treturn value.constructor.prototype === value;\n\t} catch (error) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isFunction = require(\"../function/is\");\n\nvar classRe = /^\\s*class[\\s{/}]/, functionToString = Function.prototype.toString;\n\nmodule.exports = function (value) {\n\tif (!isFunction(value)) return false;\n\tif (classRe.test(functionToString.call(value))) return false;\n\treturn true;\n};\n","\"use strict\";\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? String.prototype.contains : require(\"./shim\");\n","\"use strict\";\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString /*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n","\"use strict\";\n\nvar isValue = require(\"type/value/is\")\n , isPlainFunction = require(\"type/plain-function/is\")\n , assign = require(\"es5-ext/object/assign\")\n , normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , contains = require(\"es5-ext/string/#/contains\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n","'use strict';\n\nvar d = require('d')\n , callable = require('es5-ext/object/valid-callable')\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n","\"use strict\";\n\nvar toArray = require(\"es5-ext/array/to-array\")\n , isValue = require(\"es5-ext/object/is-value\")\n , callable = require(\"es5-ext/object/valid-callable\");\n\nvar slice = Array.prototype.slice, resolveArgs;\n\nresolveArgs = function (args) {\n\treturn this.map(function (resolve, i) { return resolve ? resolve(args[i]) : args[i]; }).concat(\n\t\tslice.call(args, this.length)\n\t);\n};\n\nmodule.exports = function (resolvers) {\n\tresolvers = toArray(resolvers);\n\tresolvers.forEach(function (resolve) { if (isValue(resolve)) callable(resolve); });\n\treturn resolveArgs.bind(resolvers);\n};\n","\"use strict\";\n\nvar from = require(\"./from\")\n , isArray = Array.isArray;\n\nmodule.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); };\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\");\n\nmodule.exports = function (userNormalizer) {\n\tvar normalizer;\n\tif (typeof userNormalizer === \"function\") return { set: userNormalizer, get: userNormalizer };\n\tnormalizer = { get: callable(userNormalizer.get) };\n\tif (userNormalizer.set !== undefined) {\n\t\tnormalizer.set = callable(userNormalizer.set);\n\t\tif (userNormalizer.delete) normalizer.delete = callable(userNormalizer.delete);\n\t\tif (userNormalizer.clear) normalizer.clear = callable(userNormalizer.clear);\n\t\treturn normalizer;\n\t}\n\tnormalizer.set = normalizer.get;\n\treturn normalizer;\n};\n","/* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n\"use strict\";\n\nvar customError = require(\"es5-ext/error/custom\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , d = require(\"d\")\n , ee = require(\"event-emitter\").methods\n , resolveResolve = require(\"./resolve-resolve\")\n , resolveNormalize = require(\"./resolve-normalize\");\n\nvar apply = Function.prototype.apply\n , call = Function.prototype.call\n , create = Object.create\n , defineProperties = Object.defineProperties\n , on = ee.on\n , emit = ee.emit;\n\nmodule.exports = function (original, length, options) {\n\tvar cache = create(null)\n\t , conf\n\t , memLength\n\t , get\n\t , set\n\t , del\n\t , clear\n\t , extDel\n\t , extGet\n\t , extHas\n\t , normalizer\n\t , getListeners\n\t , setListeners\n\t , deleteListeners\n\t , memoized\n\t , resolve;\n\tif (length !== false) memLength = length;\n\telse if (isNaN(original.length)) memLength = 1;\n\telse memLength = original.length;\n\n\tif (options.normalizer) {\n\t\tnormalizer = resolveNormalize(options.normalizer);\n\t\tget = normalizer.get;\n\t\tset = normalizer.set;\n\t\tdel = normalizer.delete;\n\t\tclear = normalizer.clear;\n\t}\n\tif (options.resolvers != null) resolve = resolveResolve(options.resolvers);\n\n\tif (get) {\n\t\tmemoized = defineLength(function (arg) {\n\t\t\tvar id, result, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id !== null) {\n\t\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\t\treturn cache[id];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (id === null) {\n\t\t\t\tid = get(args);\n\t\t\t\tif (id !== null) throw customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t\tid = set(args);\n\t\t\t} else if (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\tmemoized = function () {\n\t\t\tvar result;\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", \"data\", arguments, this);\n\t\t\t\treturn cache.data;\n\t\t\t}\n\t\t\tif (arguments.length) result = apply.call(original, this, arguments);\n\t\t\telse result = call.call(original, this);\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache.data = result;\n\t\t\tif (setListeners) conf.emit(\"set\", \"data\", null, result);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\tmemoized = function (arg) {\n\t\t\tvar result, args = arguments, id;\n\t\t\tif (resolve) args = resolve(arguments);\n\t\t\tid = String(args[0]);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\treturn cache[id];\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t};\n\t}\n\tconf = {\n\t\toriginal: original,\n\t\tmemoized: memoized,\n\t\tprofileName: options.profileName,\n\t\tget: function (args) {\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tif (get) return get(args);\n\t\t\treturn String(args[0]);\n\t\t},\n\t\thas: function (id) { return hasOwnProperty.call(cache, id); },\n\t\tdelete: function (id) {\n\t\t\tvar result;\n\t\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\t\tif (del) del(id);\n\t\t\tresult = cache[id];\n\t\t\tdelete cache[id];\n\t\t\tif (deleteListeners) conf.emit(\"delete\", id, result);\n\t\t},\n\t\tclear: function () {\n\t\t\tvar oldCache = cache;\n\t\t\tif (clear) clear();\n\t\t\tcache = create(null);\n\t\t\tconf.emit(\"clear\", oldCache);\n\t\t},\n\t\ton: function (type, listener) {\n\t\t\tif (type === \"get\") getListeners = true;\n\t\t\telse if (type === \"set\") setListeners = true;\n\t\t\telse if (type === \"delete\") deleteListeners = true;\n\t\t\treturn on.call(this, type, listener);\n\t\t},\n\t\temit: emit,\n\t\tupdateEnv: function () { original = conf.original; },\n\t};\n\tif (get) {\n\t\textDel = defineLength(function (arg) {\n\t\t\tvar id, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id === null) return;\n\t\t\tconf.delete(id);\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\textDel = function () { return conf.delete(\"data\"); };\n\t} else {\n\t\textDel = function (arg) {\n\t\t\tif (resolve) arg = resolve(arguments)[0];\n\t\t\treturn conf.delete(arg);\n\t\t};\n\t}\n\textGet = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return cache.data;\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\treturn cache[id];\n\t});\n\textHas = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return conf.has(\"data\");\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\tif (id === null) return false;\n\t\treturn conf.has(id);\n\t});\n\tdefineProperties(memoized, {\n\t\t__memoized__: d(true),\n\t\tdelete: d(extDel),\n\t\tclear: d(conf.clear),\n\t\t_get: d(extGet),\n\t\t_has: d(extHas),\n\t});\n\treturn conf;\n};\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"./lib/registered-extensions\")\n , configure = require(\"./lib/configure-map\")\n , resolveLength = require(\"./lib/resolve-length\");\n\nmodule.exports = function self(fn/*, options */) {\n\tvar options, length, conf;\n\n\tcallable(fn);\n\toptions = Object(arguments[1]);\n\n\tif (options.async && options.promise) {\n\t\tthrow new Error(\"Options 'async' and 'promise' cannot be used together\");\n\t}\n\n\t// Do not memoize already memoized function\n\tif (hasOwnProperty.call(fn, \"__memoized__\") && !options.force) return fn;\n\n\t// Resolve length;\n\tlength = resolveLength(options.length, fn.length, options.async && extensions.async);\n\n\t// Configure cache map\n\tconf = configure(fn, length, options);\n\n\t// Bind eventual extensions\n\tforEach(extensions, function (extFn, name) {\n\t\tif (options[name]) extFn(options[name], conf, options);\n\t});\n\n\tif (self.__profiler__) self.__profiler__(conf);\n\n\tconf.updateEnv();\n\treturn conf.memoized;\n};\n","\"use strict\";\n\nvar normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , resolveLength = require(\"./lib/resolve-length\")\n , plain = require(\"./plain\");\n\nmodule.exports = function (fn/*, options*/) {\n\tvar options = normalizeOpts(arguments[1]), length;\n\n\tif (!options.normalizer) {\n\t\tlength = options.length = resolveLength(options.length, fn.length, options.async);\n\t\tif (length !== 0) {\n\t\t\tif (options.primitive) {\n\t\t\t\tif (length === false) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/primitive\");\n\t\t\t\t} else if (length > 1) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/get-primitive-fixed\")(length);\n\t\t\t\t}\n\t\t\t} else if (length === false) options.normalizer = require(\"./normalizers/get\")();\n\t\t\telse if (length === 1) options.normalizer = require(\"./normalizers/get-1\")();\n\t\t\telse options.normalizer = require(\"./normalizers/get-fixed\")(length);\n\t\t}\n\t}\n\n\t// Assure extensions\n\tif (options.async) require(\"./ext/async\");\n\tif (options.promise) require(\"./ext/promise\");\n\tif (options.dispose) require(\"./ext/dispose\");\n\tif (options.maxAge) require(\"./ext/max-age\");\n\tif (options.max) require(\"./ext/max\");\n\tif (options.refCounter) require(\"./ext/ref-counter\");\n\n\treturn plain(fn, options);\n};\n","\"use strict\";\n\nmodule.exports = function (args) {\n\tvar id, i, length = args.length;\n\tif (!length) return \"\\u0002\";\n\tid = String(args[(i = 0)]);\n\twhile (--length) id += \"\\u0001\" + args[++i];\n\treturn id;\n};\n","\"use strict\";\n\nmodule.exports = function (length) {\n\tif (!length) {\n\t\treturn function () { return \"\"; };\n\t}\n\treturn function (args) {\n\t\tvar id = String(args[0]), i = 0, currentLength = length;\n\t\twhile (--currentLength) {\n\t\t\tid += \"\\u0001\" + args[++i];\n\t\t}\n\t\treturn id;\n\t};\n};\n","/* eslint max-statements: 0 */\n\n\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nvar create = Object.create;\n\nmodule.exports = function () {\n\tvar lastId = 0, map = [], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) return set[length] || null;\n\t\t\tif ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) return null;\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\treturn set[1][i] || null;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) {\n\t\t\t\tset[length] = ++lastId;\n\t\t\t} else {\n\t\t\t\tif (!set[length]) {\n\t\t\t\t\tset[length] = [[], []];\n\t\t\t\t}\n\t\t\t\tset = set[length];\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t\t}\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t}\n\t\t\t\tset[1][i] = ++lastId;\n\t\t\t}\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, args = cache[id], length = args.length, path = [];\n\t\t\tif (length === 0) {\n\t\t\t\tdelete set[length];\n\t\t\t} else if ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tpath.push(set, i);\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tid = set[1][i];\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\t\ti = path.pop();\n\t\t\t\t\tset = path.pop();\n\t\t\t\t\tset[0].splice(i, 1);\n\t\t\t\t\tset[1].splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nmodule.exports = function () {\n\tvar lastId = 0, argsMap = [], cache = [];\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = indexOf.call(argsMap, args[0]);\n\t\t\treturn index === -1 ? null : cache[index];\n\t\t},\n\t\tset: function (args) {\n\t\t\targsMap.push(args[0]);\n\t\t\tcache.push(++lastId);\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = indexOf.call(cache, id);\n\t\t\tif (index !== -1) {\n\t\t\t\targsMap.splice(index, 1);\n\t\t\t\tcache.splice(index, 1);\n\t\t\t}\n\t\t},\n\t\tclear: function () {\n\t\t\targsMap = [];\n\t\t\tcache = [];\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\")\n , create = Object.create;\n\nmodule.exports = function (length) {\n\tvar lastId = 0, map = [[], []], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) return null;\n\t\t\treturn set[1][i] || null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t}\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t}\n\t\t\tset[1][i] = ++lastId;\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, path = [], args = cache[id];\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpath.push(set, i);\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tid = set[1][i];\n\t\t\tset[0].splice(i, 1);\n\t\t\tset[1].splice(i, 1);\n\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\ti = path.pop();\n\t\t\t\tset = path.pop();\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [[], []];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","/* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n// Support for asynchronous functions\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , objectMap = require(\"es5-ext/object/map\")\n , mixin = require(\"es5-ext/object/mixin\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , nextTick = require(\"next-tick\");\n\nvar slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create;\n\nrequire(\"../lib/registered-extensions\").async = function (tbi, conf) {\n\tvar waiting = create(null)\n\t , cache = create(null)\n\t , base = conf.memoized\n\t , original = conf.original\n\t , currentCallback\n\t , currentContext\n\t , currentArgs;\n\n\t// Initial\n\tconf.memoized = defineLength(function (arg) {\n\t\tvar args = arguments, last = args[args.length - 1];\n\t\tif (typeof last === \"function\") {\n\t\t\tcurrentCallback = last;\n\t\t\targs = slice.call(args, 0, -1);\n\t\t}\n\t\treturn base.apply((currentContext = this), (currentArgs = args));\n\t}, base);\n\ttry { mixin(conf.memoized, base); }\n\tcatch (ignore) {}\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id) {\n\t\tvar cb, context, args;\n\t\tif (!currentCallback) return;\n\n\t\t// Unresolved\n\t\tif (waiting[id]) {\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback];\n\t\t\telse waiting[id].push(currentCallback);\n\t\t\tcurrentCallback = null;\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolved, assure next tick invocation\n\t\tcb = currentCallback;\n\t\tcontext = currentContext;\n\t\targs = currentArgs;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\tnextTick(function () {\n\t\t\tvar data;\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tdata = cache[id];\n\t\t\t\tconf.emit(\"getasync\", id, args, context);\n\t\t\t\tapply.call(cb, data.context, data.args);\n\t\t\t} else {\n\t\t\t\t// Purged in a meantime, we shouldn't rely on cached value, recall\n\t\t\t\tcurrentCallback = cb;\n\t\t\t\tcurrentContext = context;\n\t\t\t\tcurrentArgs = args;\n\t\t\t\tbase.apply(context, args);\n\t\t\t}\n\t\t});\n\t});\n\n\t// Not from cache\n\tconf.original = function () {\n\t\tvar args, cb, origCb, result;\n\t\tif (!currentCallback) return apply.call(original, this, arguments);\n\t\targs = aFrom(arguments);\n\t\tcb = function self(err) {\n\t\t\tvar cb, args, id = self.id;\n\t\t\tif (id == null) {\n\t\t\t\t// Shouldn't happen, means async callback was called sync way\n\t\t\t\tnextTick(apply.bind(self, this, arguments));\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tdelete self.id;\n\t\t\tcb = waiting[id];\n\t\t\tdelete waiting[id];\n\t\t\tif (!cb) {\n\t\t\t\t// Already processed,\n\t\t\t\t// outcome of race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\targs = aFrom(arguments);\n\t\t\tif (conf.has(id)) {\n\t\t\t\tif (err) {\n\t\t\t\t\tconf.delete(id);\n\t\t\t\t} else {\n\t\t\t\t\tcache[id] = { context: this, args: args };\n\t\t\t\t\tconf.emit(\"setasync\", id, typeof cb === \"function\" ? 1 : cb.length);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof cb === \"function\") {\n\t\t\t\tresult = apply.call(cb, this, args);\n\t\t\t} else {\n\t\t\t\tcb.forEach(function (cb) { result = apply.call(cb, this, args); }, this);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\torigCb = currentCallback;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\targs.push(cb);\n\t\tresult = apply.call(original, this, args);\n\t\tcb.cb = origCb;\n\t\tcurrentCallback = cb;\n\t\treturn result;\n\t};\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id) {\n\t\tif (!currentCallback) {\n\t\t\tconf.delete(id);\n\t\t\treturn;\n\t\t}\n\t\tif (waiting[id]) {\n\t\t\t// Race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback.cb];\n\t\t\telse waiting[id].push(currentCallback.cb);\n\t\t} else {\n\t\t\twaiting[id] = currentCallback.cb;\n\t\t}\n\t\tdelete currentCallback.cb;\n\t\tcurrentCallback.id = id;\n\t\tcurrentCallback = null;\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tvar result;\n\t\t// If false, we don't have value yet, so we assume that intention is not\n\t\t// to memoize this call. After value is obtained we don't cache it but\n\t\t// gracefully pass to callback\n\t\tif (hasOwnProperty.call(waiting, id)) return;\n\t\tif (!cache[id]) return;\n\t\tresult = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, slice.call(result.args, 1));\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\tconf.emit(\n\t\t\t\"clearasync\", objectMap(oldCache, function (data) { return slice.call(data.args, 1); })\n\t\t);\n\t});\n};\n","// Call dispose callback on each cache purge\n\n\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"../lib/registered-extensions\")\n , apply = Function.prototype.apply;\n\nextensions.dispose = function (dispose, conf, options) {\n\tvar del;\n\tcallable(dispose);\n\tif ((options.async && extensions.async) || (options.promise && extensions.promise)) {\n\t\tconf.on(\n\t\t\t\"deleteasync\",\n\t\t\t(del = function (id, resultArray) { apply.call(dispose, null, resultArray); })\n\t\t);\n\t\tconf.on(\"clearasync\", function (cache) {\n\t\t\tforEach(cache, function (result, id) { del(id, result); });\n\t\t});\n\t\treturn;\n\t}\n\tconf.on(\"delete\", (del = function (id, result) { dispose(result); }));\n\tconf.on(\"clear\", function (cache) {\n\t\tforEach(cache, function (result, id) { del(id, result); });\n\t});\n};\n","/* eslint consistent-this: 0 */\n\n// Timeout cached values\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , forEach = require(\"es5-ext/object/for-each\")\n , nextTick = require(\"next-tick\")\n , isPromise = require(\"is-promise\")\n , timeout = require(\"timers-ext/valid-timeout\")\n , extensions = require(\"../lib/registered-extensions\");\n\nvar noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create;\n\nextensions.maxAge = function (maxAge, conf, options) {\n\tvar timeouts, postfix, preFetchAge, preFetchTimeouts;\n\n\tmaxAge = timeout(maxAge);\n\tif (!maxAge) return;\n\n\ttimeouts = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\tconf.on(\"set\" + postfix, function (id) {\n\t\ttimeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge);\n\t\tif (typeof timeouts[id].unref === \"function\") timeouts[id].unref();\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id]) {\n\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\t}\n\t\tpreFetchTimeouts[id] = setTimeout(function () {\n\t\t\tdelete preFetchTimeouts[id];\n\t\t}, preFetchAge);\n\t\tif (typeof preFetchTimeouts[id].unref === \"function\") preFetchTimeouts[id].unref();\n\t});\n\tconf.on(\"delete\" + postfix, function (id) {\n\t\tclearTimeout(timeouts[id]);\n\t\tdelete timeouts[id];\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\tdelete preFetchTimeouts[id];\n\t});\n\n\tif (options.preFetch) {\n\t\tif (options.preFetch === true || isNaN(options.preFetch)) {\n\t\t\tpreFetchAge = 0.333;\n\t\t} else {\n\t\t\tpreFetchAge = max(min(Number(options.preFetch), 1), 0);\n\t\t}\n\t\tif (preFetchAge) {\n\t\t\tpreFetchTimeouts = {};\n\t\t\tpreFetchAge = (1 - preFetchAge) * maxAge;\n\t\t\tconf.on(\"get\" + postfix, function (id, args, context) {\n\t\t\t\tif (!preFetchTimeouts[id]) {\n\t\t\t\t\tpreFetchTimeouts[id] = \"nextTick\";\n\t\t\t\t\tnextTick(function () {\n\t\t\t\t\t\tvar result;\n\t\t\t\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") return;\n\t\t\t\t\t\tdelete preFetchTimeouts[id];\n\t\t\t\t\t\tconf.delete(id);\n\t\t\t\t\t\tif (options.async) {\n\t\t\t\t\t\t\targs = aFrom(args);\n\t\t\t\t\t\t\targs.push(noop);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult = conf.memoized.apply(context, args);\n\t\t\t\t\t\tif (options.promise) {\n\t\t\t\t\t\t\t// Supress eventual error warnings\n\t\t\t\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\t\t\t\tif (typeof result.done === \"function\") result.done(noop, noop);\n\t\t\t\t\t\t\t\telse result.then(noop, noop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tconf.on(\"clear\" + postfix, function () {\n\t\tforEach(timeouts, function (id) { clearTimeout(id); });\n\t\ttimeouts = {};\n\t\tif (preFetchTimeouts) {\n\t\t\tforEach(preFetchTimeouts, function (id) { if (id !== \"nextTick\") clearTimeout(id); });\n\t\t\tpreFetchTimeouts = {};\n\t\t}\n\t});\n};\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\")\n , maxTimeout = require(\"./max-timeout\");\n\nmodule.exports = function (value) {\n\tvalue = toPosInt(value);\n\tif (value > maxTimeout) throw new TypeError(value + \" exceeds maximum possible timeout\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = 2147483647;\n","// Limit cache size, LRU (least recently used) algorithm.\n\n\"use strict\";\n\nvar toPosInteger = require(\"es5-ext/number/to-pos-integer\")\n , lruQueue = require(\"lru-queue\")\n , extensions = require(\"../lib/registered-extensions\");\n\nextensions.max = function (max, conf, options) {\n\tvar postfix, queue, hit;\n\n\tmax = toPosInteger(max);\n\tif (!max) return;\n\n\tqueue = lruQueue(max);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\n\t\t\"set\" + postfix,\n\t\t(hit = function (id) {\n\t\t\tid = queue.hit(id);\n\t\t\tif (id === undefined) return;\n\t\t\tconf.delete(id);\n\t\t})\n\t);\n\tconf.on(\"get\" + postfix, hit);\n\tconf.on(\"delete\" + postfix, queue.delete);\n\tconf.on(\"clear\" + postfix, queue.clear);\n};\n","'use strict';\n\nvar toPosInt = require('es5-ext/number/to-pos-integer')\n\n , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;\n\nmodule.exports = function (limit) {\n\tvar size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;\n\tlimit = toPosInt(limit);\n\treturn {\n\t\thit: function (id) {\n\t\t\tvar oldIndex = map[id], nuIndex = ++index;\n\t\t\tqueue[nuIndex] = id;\n\t\t\tmap[id] = nuIndex;\n\t\t\tif (!oldIndex) {\n\t\t\t\t++size;\n\t\t\t\tif (size <= limit) return;\n\t\t\t\tid = queue[base];\n\t\t\t\tdel(id);\n\t\t\t\treturn id;\n\t\t\t}\n\t\t\tdelete queue[oldIndex];\n\t\t\tif (base !== oldIndex) return;\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tdelete: del = function (id) {\n\t\t\tvar oldIndex = map[id];\n\t\t\tif (!oldIndex) return;\n\t\t\tdelete queue[oldIndex];\n\t\t\tdelete map[id];\n\t\t\t--size;\n\t\t\tif (base !== oldIndex) return;\n\t\t\tif (!size) {\n\t\t\t\tindex = 0;\n\t\t\t\tbase = 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tclear: function () {\n\t\t\tsize = 0;\n\t\t\tbase = 1;\n\t\t\tqueue = create(null);\n\t\t\tmap = create(null);\n\t\t\tindex = 0;\n\t\t}\n\t};\n};\n","// Reference counter, useful for garbage collector like functionality\n\n\"use strict\";\n\nvar d = require(\"d\")\n , extensions = require(\"../lib/registered-extensions\")\n , create = Object.create\n , defineProperties = Object.defineProperties;\n\nextensions.refCounter = function (ignore, conf, options) {\n\tvar cache, postfix;\n\n\tcache = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\"set\" + postfix, function (id, length) { cache[id] = length || 1; });\n\tconf.on(\"get\" + postfix, function (id) { ++cache[id]; });\n\tconf.on(\"delete\" + postfix, function (id) { delete cache[id]; });\n\tconf.on(\"clear\" + postfix, function () { cache = {}; });\n\n\tdefineProperties(conf.memoized, {\n\t\tdeleteRef: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return null;\n\t\t\tif (!cache[id]) return null;\n\t\t\tif (!--cache[id]) {\n\t\t\t\tconf.delete(id);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}),\n\t\tgetRefCount: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return 0;\n\t\t\tif (!cache[id]) return 0;\n\t\t\treturn cache[id];\n\t\t}),\n\t});\n};\n","const os = require(\"os\");\r\n\r\n// to detect on with os user had used path.resolve(...)\r\nconst is_posix_os = (os.platform() !== \"win32\");\r\nconst version = os.release();\r\n\r\n// For some windows version (Windows 10 v1803), it is not useful to escape spaces in path\r\n// https://docs.microsoft.com/en-us/windows/release-information/\r\nconst windows_version_regex = /(\\d+\\.\\d+)\\.(\\d+)/;\r\nconst should_not_escape = (major_release = \"\", os_build = \"\") =>\r\n /1\\d+\\.\\d+/.test(major_release) && Number(os_build) >= 17134.1184;\r\n\r\nmodule.exports = function (given_path) {\r\n return (is_posix_os)\r\n // for posix path, escape is simple\r\n ? given_path.replace(/(\\s+)/g, '\\\\$1')\r\n // for windows, it depend of the build\r\n : (should_not_escape(...windows_version_regex.exec(version).splice(1)))\r\n // on major version, no need to escape anymore\r\n // https://support.microsoft.com/en-us/help/4467268/url-encoded-unc-paths-not-url-decoded-in-windows-10-version-1803-later\r\n ? given_path\r\n // on older version, replace space with symbol %20\r\n : given_path.replace(/(\\s+)/g, '%20');\r\n};","// Generated by CoffeeScript 1.10.0\n(function() {\n var regexEscape, reverse;\n\n regexEscape = require('escape-string-regexp');\n\n reverse = function(s) {\n return s.split('').reverse().join('');\n };\n\n module.exports = function(s, chars, escapeChar) {\n var regex;\n if (chars == null) {\n chars = '\\'';\n }\n if (escapeChar == null) {\n escapeChar = '\\\\';\n }\n if (typeof s !== 'string') {\n return s;\n }\n regex = new RegExp(\"([\" + (regexEscape(chars)) + \"])(?!\" + (regexEscape(escapeChar)) + \")\", 'g');\n return reverse(reverse(s).replace(regex, \"$1\" + escapeChar));\n };\n\n}).call(this);\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","(function () {\n\n 'use strict';\n\n var root = this;\n\n\n //=========//\n // GLOBALS //\n //=========//\n\n var locales = {};\n\n\n //==========//\n // EXPOSING //\n //==========//\n\n var moduleDefinition = {\n create: factory,\n addLocale: addLocale,\n pluralize: pluralize\n };\n\n if ('undefined' !== typeof module && 'undefined' !== typeof module.exports) {\n module.exports = moduleDefinition;\n } else {\n root.numerous = moduleDefinition;\n }\n\n\n //==================//\n // PUBLIC FUNCTIONS //\n //==================//\n\n /**\n * Creates new instance of numerous.\n *\n * @param {string} locale\n * @returns {object}\n */\n function factory (locale) {\n\n checkLocale(locale);\n\n return {\n pluralize: function (value, variants) {\n return pluralize(locale, value, variants);\n }\n };\n }\n\n /**\n * Adds pluralization function for specified locale.\n * Usually externally called by locale itself.\n *\n * @param {string} locale\n * @param {function} callable\n */\n function addLocale (locale, callable) {\n locales[locale] = callable;\n }\n\n /**\n * Returns variant from the specified list of variants\n * according to the specified value and locale.\n *\n * @param {string} locale\n * @param {int} value\n * @param {object} variants\n */\n function pluralize (locale, value, variants) {\n\n checkLocale(locale);\n\n if ('object' !== typeof variants) {\n throw new Error('List of variants should be specified as an object');\n }\n\n var key = locales[locale](value);\n\n return ('undefined' !== typeof variants[key] ? variants[key] : null);\n }\n\n\n //===================//\n // PRIVATE FUNCTIONS //\n //===================//\n\n /**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} locale\n *\n * @returns {boolean}\n */\n function hasLocale (locale) {\n return ('undefined' !== typeof locales[locale]);\n }\n\n /**\n * Checks if locale is loaded. If not, tries to load it.\n *\n * @param {string} locale\n */\n function checkLocale (locale) {\n if (!hasLocale(locale)) {\n requireLocale(locale);\n }\n }\n\n /**\n * Tries to load the specified locale.\n *\n * @param {string} locale\n */\n function requireLocale (locale) {\n try {\n require(__dirname + '/../locales/' + locale + '.js');\n } catch (error) {\n throw Error('Failed to load the following locale: ' + locale);\n }\n }\n\n}).call(this);\n","module.exports = require('./lib/numerous.js');\n","(function () {\n var root = this;\n var numerous;\n if ('function' === typeof require) {\n numerous = require('../lib/numerous.js');\n } else {\n numerous = root.numerous;\n }\n numerous.addLocale('en', function pluralize_en(n /*``*/ ) {\n var i = Math.floor(Math.abs(n)),\n v = n.toString().replace(/^[^.]*\\.?/, \"\").length;\n if (typeof n === \"string\") n = parseInt(n, 10);\n if (i === 1 && v === 0) return \"one\";\n return \"other\"\n });\n}).call(this);","// Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md\n'use strict';\n\nexports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node);\n","\nmodule.exports = require('./lib/time-delta.js');\n","module.exports = {\n \"id\": \"en\",\n \"data\": {\n \"long\": {\n \"years\": {\n \"one\": \"{0} year\",\n \"other\": \"{0} years\"\n },\n \"months\": {\n \"one\": \"{0} month\",\n \"other\": \"{0} months\"\n },\n \"weeks\": {\n \"one\": \"{0} week\",\n \"other\": \"{0} weeks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hour\",\n \"other\": \"{0} hours\"\n },\n \"minutes\": {\n \"one\": \"{0} minute\",\n \"other\": \"{0} minutes\"\n },\n \"seconds\": {\n \"one\": \"{0} second\",\n \"other\": \"{0} seconds\"\n }\n },\n \"narrow\": {\n \"years\": {\n \"one\": \"{0}y\",\n \"other\": \"{0}y\"\n },\n \"months\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"weeks\": {\n \"one\": \"{0}w\",\n \"other\": \"{0}w\"\n },\n \"days\": {\n \"one\": \"{0}d\",\n \"other\": \"{0}d\"\n },\n \"hours\": {\n \"one\": \"{0}h\",\n \"other\": \"{0}h\"\n },\n \"minutes\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"seconds\": {\n \"one\": \"{0}s\",\n \"other\": \"{0}s\"\n }\n },\n \"short\": {\n \"years\": {\n \"one\": \"{0} yr\",\n \"other\": \"{0} yrs\"\n },\n \"months\": {\n \"one\": \"{0} mth\",\n \"other\": \"{0} mths\"\n },\n \"weeks\": {\n \"one\": \"{0} wk\",\n \"other\": \"{0} wks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hr\",\n \"other\": \"{0} hr\"\n },\n \"minutes\": {\n \"one\": \"{0} min\",\n \"other\": \"{0} min\"\n },\n \"seconds\": {\n \"one\": \"{0} sec\",\n \"other\": \"{0} sec\"\n }\n }\n }\n};\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","class LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.DownloaderHelper=exports.DH_STATES=void 0;var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},_createClass=function(){function a(a,b){for(var c,d=0;dthis.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=b||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:'getOptions',value:function a(){return this.__opts}},{key:'getMetadata',value:function a(){return this.__opts.metadata}},{key:'getStats',value:function a(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:'getTotalSize',value:function b(){var a=this;return new Promise(function(b,c){var d=function(b){a.__initProtocol(b);var c=Object.assign({},a.__headers);c.hasOwnProperty('range')&&delete c.range;var d=a.__getReqOptions('HEAD',b,c);return Object.assign({},a.__reqOptions,d)},e=function(f,g){var h=a.__protocol.request(g,function(g){if(a.__isRequireRedirect(g)){var h=/^https?:\\/\\//.test(g.headers.location)?g.headers.location:new _url.URL(g.headers.location,f).href;return a.emit('redirected',h,f),e(h,d(h))}return 200===g.statusCode?void b({name:a.__getFileNameFromHeaders(g.headers,g),total:parseInt(g.headers['content-length'])||null}):c(new Error('Response status was '+g.statusCode))});h.on('error',function(a){return c(a)}),h.on('timeout',function(){return c(new Error('timeout'))}),h.on('uncaughtException',function(a){return c(a)}),h.end()};e(a.url,d(a.url))})}},{key:'getResumeState',value:function a(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:'resumeFromFile',value:function d(a){var b=this,c=1=g))return this.emit('skip',{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:f}),this.__setState(this.__states.SKIPPED),b(!0)}this.__fileStream=fs.createWriteStream(this.__filePath,{})}else this.__fileStream=fs.createWriteStream(this.__filePath,{flags:'a'});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,e.on('data',function(a){return d.__calculateStats(a.length)}),this.__pipes.forEach(function(a){e.pipe(a.stream,a.options),e=a.stream}),e.pipe(this.__fileStream),e.on('error',this.__onError(b,c)),this.__fileStream.on('finish',this.__onFinished(b,c)),this.__fileStream.on('error',this.__onError(b,c))}},{key:'__hasFinished',value:function a(){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 b(a){return 300a.statusCode&&a.headers.hasOwnProperty('location')&&a.headers.location}},{key:'__onFinished',value:function d(a,b){var c=this;return function(){c.__fileStream.close(function(d){if(d)return b(d);if(c.__hasFinished()){var e=!!c.__total&&c.__downloaded!==c.__total;if(e&&c.__isResumable&&c.__opts.resumeOnIncomplete&&c.__resumeRetryCount<=c.__opts.resumeOnIncompleteMaxRetry)return c.__resumeRetryCount++,c.emit('warning',new Error('uncomplete download, retrying')),c.resume();c.__setState(c.__states.FINISHED),c.__pipes=[],c.emit('end',{fileName:c.__fileName,filePath:c.__filePath,totalSize:c.__total,incomplete:e,onDiskSize:c.__getFilesizeInBytes(c.__filePath),downloadedSize:c.__downloaded})}return a(c.__downloaded===c.__total)})}}},{key:'__closeFileStream',value:function b(){var a=this;return this.__fileStream?new Promise(function(b,c){a.__fileStream.close(function(a){return a?c(a):b(!0)})}):Promise.resolve(!0)}},{key:'__onError',value:function e(a,b){var c=this,d=!!(2=g?Promise.reject(b||new Error('reached the maximum retries')):(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit('retry',this.__retryCount,this.__opts.retry,b),this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(a){return a.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return new Promise(function(b){return a.__retryTimeout=setTimeout(function(){return b(0this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=b,this.emit('progress.throttled',this.getStats())),this.emit('progress',this.getStats()))}},{key:'__setState',value:function b(a){this.state=a,this.emit('stateChanged',this.state)}},{key:'__getReqOptions',value:function f(a,b){var c=2 validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;\nconst semver = __importStar(require(\"semver\"));\nconst core_1 = require(\"@actions/core\");\n// needs to be require for core node modules to be mocked\n/* eslint @typescript-eslint/no-require-imports: 0 */\nconst os = require(\"os\");\nconst cp = require(\"child_process\");\nconst fs = require(\"fs\");\nfunction _findMatch(versionSpec, stable, candidates, archFilter) {\n return __awaiter(this, void 0, void 0, function* () {\n const platFilter = os.platform();\n let result;\n let match;\n let file;\n for (const candidate of candidates) {\n const version = candidate.version;\n core_1.debug(`check ${version} satisfies ${versionSpec}`);\n if (semver.satisfies(version, versionSpec) &&\n (!stable || candidate.stable === stable)) {\n file = candidate.files.find(item => {\n core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);\n let chk = item.arch === archFilter && item.platform === platFilter;\n if (chk && item.platform_version) {\n const osVersion = module.exports._getOsVersion();\n if (osVersion === item.platform_version) {\n chk = true;\n }\n else {\n chk = semver.satisfies(osVersion, item.platform_version);\n }\n }\n return chk;\n });\n if (file) {\n core_1.debug(`matched ${candidate.version}`);\n match = candidate;\n break;\n }\n }\n }\n if (match && file) {\n // clone since we're mutating the file list to be only the file that matches\n result = Object.assign({}, match);\n result.files = [file];\n }\n return result;\n });\n}\nexports._findMatch = _findMatch;\nfunction _getOsVersion() {\n // TODO: add windows and other linux, arm variants\n // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python)\n const plat = os.platform();\n let version = '';\n if (plat === 'darwin') {\n version = cp.execSync('sw_vers -productVersion').toString();\n }\n else if (plat === 'linux') {\n // lsb_release process not in some containers, readfile\n // Run cat /etc/lsb-release\n // DISTRIB_ID=Ubuntu\n // DISTRIB_RELEASE=18.04\n // DISTRIB_CODENAME=bionic\n // DISTRIB_DESCRIPTION=\"Ubuntu 18.04.4 LTS\"\n const lsbContents = module.exports._readLinuxVersionFile();\n if (lsbContents) {\n const lines = lsbContents.split('\\n');\n for (const line of lines) {\n const parts = line.split('=');\n if (parts.length === 2 &&\n (parts[0].trim() === 'VERSION_ID' ||\n parts[0].trim() === 'DISTRIB_RELEASE')) {\n version = parts[1]\n .trim()\n .replace(/^\"/, '')\n .replace(/\"$/, '');\n break;\n }\n }\n }\n }\n return version;\n}\nexports._getOsVersion = _getOsVersion;\nfunction _readLinuxVersionFile() {\n const lsbReleaseFile = '/etc/lsb-release';\n const osReleaseFile = '/etc/os-release';\n let contents = '';\n if (fs.existsSync(lsbReleaseFile)) {\n contents = fs.readFileSync(lsbReleaseFile).toString();\n }\n else if (fs.existsSync(osReleaseFile)) {\n contents = fs.readFileSync(osReleaseFile).toString();\n }\n return contents;\n}\nexports._readLinuxVersionFile = _readLinuxVersionFile;\n//# sourceMappingURL=manifest.js.map","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RetryHelper = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Internal class for retries\n */\nclass RetryHelper {\n constructor(maxAttempts, minSeconds, maxSeconds) {\n if (maxAttempts < 1) {\n throw new Error('max attempts should be greater than or equal to 1');\n }\n this.maxAttempts = maxAttempts;\n this.minSeconds = Math.floor(minSeconds);\n this.maxSeconds = Math.floor(maxSeconds);\n if (this.minSeconds > this.maxSeconds) {\n throw new Error('min seconds should be less than or equal to max seconds');\n }\n }\n execute(action, isRetryable) {\n return __awaiter(this, void 0, void 0, function* () {\n let attempt = 1;\n while (attempt < this.maxAttempts) {\n // Try\n try {\n return yield action();\n }\n catch (err) {\n if (isRetryable && !isRetryable(err)) {\n throw err;\n }\n core.info(err.message);\n }\n // Sleep\n const seconds = this.getSleepAmount();\n core.info(`Waiting ${seconds} seconds before trying again`);\n yield this.sleep(seconds);\n attempt++;\n }\n // Last attempt\n return yield action();\n });\n }\n getSleepAmount() {\n return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) +\n this.minSeconds);\n }\n sleep(seconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, seconds * 1000));\n });\n }\n}\nexports.RetryHelper = RetryHelper;\n//# sourceMappingURL=retry-helper.js.map","import { mkdir, mkdirSync, stat, statSync, } from 'fs';\nexport const optsArg = (opts) => {\n if (!opts) {\n opts = { mode: 0o777 };\n }\n else if (typeof opts === 'object') {\n opts = { mode: 0o777, ...opts };\n }\n else if (typeof opts === 'number') {\n opts = { mode: opts };\n }\n else if (typeof opts === 'string') {\n opts = { mode: parseInt(opts, 8) };\n }\n else {\n throw new TypeError('invalid options argument');\n }\n const resolved = opts;\n const optsFs = opts.fs || {};\n opts.mkdir = opts.mkdir || optsFs.mkdir || mkdir;\n opts.mkdirAsync = opts.mkdirAsync\n ? opts.mkdirAsync\n : async (path, options) => {\n return new Promise((res, rej) => resolved.mkdir(path, options, (er, made) => er ? rej(er) : res(made)));\n };\n opts.stat = opts.stat || optsFs.stat || stat;\n opts.statAsync = opts.statAsync\n ? opts.statAsync\n : async (path) => new Promise((res, rej) => resolved.stat(path, (err, stats) => (err ? rej(err) : res(stats))));\n opts.statSync = opts.statSync || optsFs.statSync || statSync;\n opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || mkdirSync;\n return resolved;\n};\n//# sourceMappingURL=opts-arg.js.map","import { dirname } from 'path';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpManualSync = (path, options, made) => {\n const parent = dirname(path);\n const opts = { ...optsArg(options), recursive: false };\n if (parent === path) {\n try {\n return opts.mkdirSync(path, opts);\n }\n catch (er) {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n return;\n }\n }\n try {\n opts.mkdirSync(path, opts);\n return made || path;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') {\n throw er;\n }\n try {\n if (!opts.statSync(path).isDirectory())\n throw er;\n }\n catch (_) {\n throw er;\n }\n }\n};\nexport const mkdirpManual = Object.assign(async (path, options, made) => {\n const opts = optsArg(options);\n opts.recursive = false;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirAsync(path, opts).catch(er => {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n });\n }\n return opts.mkdirAsync(path, opts).then(() => made || path, async (er) => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(parent, opts).then((made) => mkdirpManual(path, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer.code !== 'EROFS') {\n throw er;\n }\n return opts.statAsync(path).then(st => {\n if (st.isDirectory()) {\n return made;\n }\n else {\n throw er;\n }\n }, () => {\n throw er;\n });\n });\n}, { sync: mkdirpManualSync });\n//# sourceMappingURL=mkdirp-manual.js.map","import { dirname } from 'path';\nexport const findMade = async (opts, parent, path) => {\n // we never want the 'made' return value to be a root directory\n if (path === parent) {\n return;\n }\n return opts.statAsync(parent).then(st => (st.isDirectory() ? path : undefined), // will fail later\n // will fail later\n er => {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMade(opts, dirname(parent), parent)\n : undefined;\n });\n};\nexport const findMadeSync = (opts, parent, path) => {\n if (path === parent) {\n return undefined;\n }\n try {\n return opts.statSync(parent).isDirectory() ? path : undefined;\n }\n catch (er) {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMadeSync(opts, dirname(parent), parent)\n : undefined;\n }\n};\n//# sourceMappingURL=find-made.js.map","import { dirname } from 'path';\nimport { findMade, findMadeSync } from './find-made.js';\nimport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpNativeSync = (path, options) => {\n const opts = optsArg(options);\n opts.recursive = true;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirSync(path, opts);\n }\n const made = findMadeSync(opts, path);\n try {\n opts.mkdirSync(path, opts);\n return made;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts);\n }\n else {\n throw er;\n }\n }\n};\nexport const mkdirpNative = Object.assign(async (path, options) => {\n const opts = { ...optsArg(options), recursive: true };\n const parent = dirname(path);\n if (parent === path) {\n return await opts.mkdirAsync(path, opts);\n }\n return findMade(opts, path).then((made) => opts\n .mkdirAsync(path, opts)\n .then(m => made || m)\n .catch(er => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(path, opts);\n }\n else {\n throw er;\n }\n }));\n}, { sync: mkdirpNativeSync });\n//# sourceMappingURL=mkdirp-native.js.map","const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;\nimport { parse, resolve } from 'path';\nexport const pathArg = (path) => {\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n throw Object.assign(new TypeError('path must be a string without null bytes'), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n });\n }\n path = resolve(path);\n if (platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/;\n const { root } = parse(path);\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n });\n }\n }\n return path;\n};\n//# sourceMappingURL=path-arg.js.map","import { mkdir, mkdirSync } from 'fs';\nimport { optsArg } from './opts-arg.js';\nconst version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version;\nconst versArr = version.replace(/^v/, '').split('.');\nconst hasNative = +versArr[0] > 10 || (+versArr[0] === 10 && +versArr[1] >= 12);\nexport const useNativeSync = !hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdirSync === mkdirSync;\nexport const useNative = Object.assign(!hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdir === mkdir, {\n sync: useNativeSync,\n});\n//# sourceMappingURL=use-native.js.map","import { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nimport { optsArg } from './opts-arg.js';\nimport { pathArg } from './path-arg.js';\nimport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore start */\nexport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nexport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nexport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore stop */\nexport const mkdirpSync = (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNativeSync(resolved)\n ? mkdirpNativeSync(path, resolved)\n : mkdirpManualSync(path, resolved);\n};\nexport const sync = mkdirpSync;\nexport const manual = mkdirpManual;\nexport const manualSync = mkdirpManualSync;\nexport const native = mkdirpNative;\nexport const nativeSync = mkdirpNativeSync;\nexport const mkdirp = Object.assign(async (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNative(resolved)\n ? mkdirpNative(path, resolved)\n : mkdirpManual(path, resolved);\n}, {\n mkdirpSync,\n mkdirpNative,\n mkdirpNativeSync,\n mkdirpManual,\n mkdirpManualSync,\n sync: mkdirpSync,\n native: mkdirpNative,\n nativeSync: mkdirpNativeSync,\n manual: mkdirpManual,\n manualSync: mkdirpManualSync,\n useNative,\n useNativeSync,\n});\n//# sourceMappingURL=index.js.map","import { isArch } from \"../utils/env/isArch.js\"\n\nconst defaultLLVM = process.platform === \"darwin\" && process.arch === \"x64\"\n ? \"15.0.7\"\n : \"18.1.8\"\n\n/**\n * Default versions for the tools\n * DefaultUbuntuVersion overrides the default version for the tools on Ubuntu\n */\nexport const DefaultVersions: Record = {\n // https://github.com/llvm/llvm-project/releases\n llvm: defaultLLVM,\n clang: defaultLLVM,\n \"clang++\": defaultLLVM,\n \"clang-tidy\": defaultLLVM,\n clangtidy: defaultLLVM,\n \"clang-format\": defaultLLVM,\n clangformat: defaultLLVM,\n ninja: \"1.12.1\", // https://github.com/ninja-build/ninja/releases\n cmake: \"3.30.2\", // https://github.com/Kitware/CMake/releases\n gcovr: \"5.2\", // \"6.0\", // https://pypi.org/project/gcovr/\n conan: \"1.64.1\", // 2.0.17 // https://github.com/conan-io/conan/releases\n meson: \"1.5.1\", // https://github.com/mesonbuild/meson/releases\n kcov: \"42\", // https://github.com/SimonKagstrom/kcov/releases\n task: \"3.38.0\", // https://github.com/go-task/task/releases\n doxygen: isArch() ? \"1.11.0-4\" : \"1.11.0\", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/\n gcc: process.platform === \"win32\"\n ? \"14.2.0posix-18.1.8-12.0.0-ucrt-r1\"\n : \"\", // use the default version on Ubuntu, Fedora, Arch, macOS, etc.\n // mingw: isArch() ? \"12.2.0-1\" : \"8\", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/\n powershell: \"7.4.5\",\n}\n\nexport const MinVersions: Record = {\n pip: \"22.2.0\",\n python: \"3.7.9\",\n}\n\n/// If an ubuntu versions is not in this map:\n// - the newer ubuntu versions use the first entry (e.g. v20),\n// - the older ones use \"\"\nexport const DefaultUbuntuVersion: Record | undefined> = {\n // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64\n mingw: {\n 24: \"8.0.0-1\",\n 22: \"8.0.0-1\",\n 20: \"7.0.0-2\",\n },\n gcovr: {\n 24: \"6.0\",\n 22: \"6.0\",\n 20: \"6.0\",\n 18: \"5.0\",\n },\n meson: {\n 24: \"1.0.0\",\n 22: \"1.0.0\",\n 20: \"1.0.0\",\n 18: \"0.61.4\",\n },\n nala: {\n 24: \"\",\n 22: \"\",\n 21: \"legacy\",\n 20: \"legacy\",\n 18: \"legacy\",\n 16: \"legacy\",\n 14: \"legacy\",\n },\n kcov: {\n 24: \"42-binary\",\n 22: \"42-binary\",\n 20: \"40-binary\", // https://github.com/SimonKagstrom/kcov/releases\n 18: \"40\",\n 16: \"40\",\n 14: \"40\",\n },\n doxygen: {\n 24: \"1.11.0\",\n 22: \"1.11.0\",\n 20: \"1.10.0\",\n 18: \"1.10.0\",\n },\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUbuntuVersion = void 0;\nconst child_process_1 = require(\"child_process\");\nfunction isSystemError(e) {\n return 'errno' in e;\n}\nfunction command(exe, args) {\n return new Promise((resolve, reject) => {\n child_process_1.execFile(exe, args, { encoding: 'utf8', shell: false }, (error, stdout, stderr) => {\n if (error) {\n if (isSystemError(error) && error.code === 'ENOENT') {\n resolve(null); // When lsb_release is not found\n return;\n }\n reject(new Error(`Could not execute \\`${exe} ${args.join(' ')}\\`: ${error} (stderr=${stderr})`));\n return;\n }\n resolve(stdout);\n });\n });\n}\nasync function getUbuntuVersion() {\n if (process.platform !== 'linux') {\n return [];\n }\n const stdout = await command('lsb_release', ['-a']);\n if (stdout === null) {\n return [];\n }\n const reDistributor = /^Distributor ID:\\s*(.+)$/;\n const reDescription = /^Description:\\s*Ubuntu\\s+(\\d+)\\.(\\d+)(?:\\.(\\d+))?/;\n const reRelease = /^Release:\\s*(\\d+)\\.(\\d+)(?:\\.(\\d+))?$/;\n let description = null;\n let release = null;\n let distributorFound = false;\n for (const line of stdout.split('\\n')) {\n const m = line.match(reDistributor);\n if (m !== null) {\n const distributor = m[1];\n if (distributor !== 'Ubuntu') {\n return [];\n }\n distributorFound = true;\n }\n const desc = line.match(reDescription);\n if (desc) {\n description = desc;\n }\n const rel = line.match(reRelease);\n if (rel) {\n release = rel;\n }\n if (distributorFound && description && release) {\n break;\n }\n }\n if (!distributorFound) {\n return [];\n }\n for (const m of [description, release]) {\n if (m) {\n const ss = [m[1], m[2]];\n if (m[3]) {\n ss.push(m[3]);\n }\n return ss.map(s => parseInt(s, 10));\n }\n }\n return [];\n}\nexports.getUbuntuVersion = getUbuntuVersion;\n//# sourceMappingURL=index.js.map","import os from 'node:os';\n\nconst nameMap = new Map([\n\t[24, ['Sequoia', '15']],\n\t[23, ['Sonoma', '14']],\n\t[22, ['Ventura', '13']],\n\t[21, ['Monterey', '12']],\n\t[20, ['Big Sur', '11']],\n\t[19, ['Catalina', '10.15']],\n\t[18, ['Mojave', '10.14']],\n\t[17, ['High Sierra', '10.13']],\n\t[16, ['Sierra', '10.12']],\n\t[15, ['El Capitan', '10.11']],\n\t[14, ['Yosemite', '10.10']],\n\t[13, ['Mavericks', '10.9']],\n\t[12, ['Mountain Lion', '10.8']],\n\t[11, ['Lion', '10.7']],\n\t[10, ['Snow Leopard', '10.6']],\n\t[9, ['Leopard', '10.5']],\n\t[8, ['Tiger', '10.4']],\n\t[7, ['Panther', '10.3']],\n\t[6, ['Jaguar', '10.2']],\n\t[5, ['Puma', '10.1']],\n]);\n\nexport default function macosRelease(release) {\n\trelease = Number((release || os.release()).split('.')[0]);\n\n\tconst [name, version] = nameMap.get(release) || ['Unknown', ''];\n\n\treturn {\n\t\tname,\n\t\tversion,\n\t};\n}\n","import macosRelease from \"macos-release\"\nimport memoize from \"memoizee\"\n\n/**\n * Get macOS version\n *\n * @returns {number[]} - The macOS version as an array of numbers\n */\nfunction macosVersion_() {\n if (process.platform !== \"darwin\") {\n return []\n }\n\n const { version } = macosRelease()\n return version.split(\".\").map((v) => Number.parseInt(v, 10))\n}\nexport const macosVersion = memoize(macosVersion_)\n","import { tmpdir } from \"os\"\nimport { dirname, join } from \"path\"\nimport { execRootSync } from \"admina\"\nimport { error, info } from \"ci-log\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { hasNala, installAptPack, qualifiedNeededAptPackage } from \"setup-apt\"\nimport which from \"which\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\n\nlet binDir: string | undefined\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupNala(version: string, _setupDir: string, _arch: string) {\n if (!isUbuntu()) {\n return undefined\n }\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"nala\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n await installAptPack([{ name: \"python3-apt\" }])\n\n binDir = \"/usr/bin\" // eslint-disable-line require-atomic-updates\n\n // If nala is available in the default repositories, install it\n try {\n const nalaPack = await qualifiedNeededAptPackage({ name: \"nala\", version })\n if (nalaPack !== undefined) {\n await installAptPack([{ name: nalaPack }])\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala: ${err}`)\n }\n\n // Nala is not available in the default repositories\n // Check if the legacy version is available\n try {\n const nalaLegacyPack = await qualifiedNeededAptPackage({ name: \"nala-legacy\" })\n if (nalaLegacyPack !== undefined) {\n await installAptPack([{ name: nalaLegacyPack }], true)\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala-legacy: ${err}`)\n }\n\n // Install via the installer script\n await setupNalaViaInstaller()\n\n return { binDir }\n}\n\nasync function setupNalaViaInstaller() {\n const installer = new DownloaderHelper(\n \"https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh\",\n tmpdir(),\n { fileName: \"install-nala.sh\" },\n )\n installer.on(\"error\", (err) => {\n throw new Error(`Failed to download install-nala.sh: ${err}`)\n })\n await installer.start()\n\n const installerPath = join(tmpdir(), \"install-nala.sh\")\n\n // Patch the installer script to not use sudo explicitly\n const script = await readFile(installerPath, \"utf8\")\n await writeFile(installerPath, script.replace(/sudo/g, \"\"))\n\n await installAptPack([{ name: \"wget\" }])\n\n try {\n execRootSync(\"bash\", [installerPath])\n } catch (err) {\n error(`Failed to install nala via installer: ${err}`)\n execRootSync(\"apt\", [\"install\", \"-y\", \"-t\", \"nala\", \"nala\"])\n }\n}\n\nexport function bashWithNala(script: string) {\n if (hasNala()) {\n return `apt-get() { nala $@; }; export -f apt-get; ${script}; unset -f apt-get`\n }\n return script\n}\n","import { dirname, join } from \"path\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport { addShExt, addShRelativePrefix } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\nlet hasVCPKG = false\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupVcpkg(version: string, setupDir: string, _arch: string): Promise {\n if (!hasVCPKG || which.sync(\"vcpkg\", { nothrow: true }) === null) {\n if (process.platform === \"linux\") {\n // vcpkg download and extraction dependencies\n if (isArch()) {\n await Promise.all([\n setupPacmanPack(\"curl\"),\n setupPacmanPack(\"zip\"),\n setupPacmanPack(\"unzip\"),\n setupPacmanPack(\"tar\"),\n setupPacmanPack(\"git\"),\n setupPacmanPack(\"pkg-config\"),\n ])\n } else if (hasDnf()) {\n await setupDnfPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n } else if (isUbuntu()) {\n await installAptPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n }\n }\n\n // clone if not already exists\n if (!(await pathExists(join(setupDir, addShExt(\"bootstrap-vcpkg\", \".bat\"))))) {\n execaSync(\"git\", [\"clone\", \"https://github.com/microsoft/vcpkg\"], { cwd: dirname(setupDir), stdio: \"inherit\" })\n } else {\n notice(`Vcpkg folder already exists at ${setupDir}. Skipping the clone`)\n }\n\n // if version specified, checkout the version\n if (version !== \"\" && version !== \"true\") {\n info(`Checking out vcpkg version ${version}`)\n execaSync(\"git\", [\"checkout\", version], {\n cwd: setupDir,\n stdio: \"inherit\",\n })\n }\n\n // bootstrap vcpkg\n execaSync(addShExt(addShRelativePrefix(\"bootstrap-vcpkg\"), \".bat\"), {\n cwd: setupDir,\n shell: true,\n stdio: \"inherit\",\n })\n\n await grantUserWriteAccess(setupDir)\n\n await addPath(setupDir, rcOptions)\n // eslint-disable-next-line require-atomic-updates\n hasVCPKG = true\n return { binDir: setupDir }\n }\n\n return { binDir: dirname(which.sync(\"vcpkg\")) }\n}\n","import { setupBrew } from \"setup-brew\"\nimport { setupBazel } from \"./bazel/bazel.js\"\nimport { setupCcache } from \"./ccache/ccache.js\"\nimport { setupChocolatey } from \"./chocolatey/chocolatey.js\"\nimport { setupCmake } from \"./cmake/cmake.js\"\nimport { setupConan } from \"./conan/conan.js\"\nimport { setupCppcheck } from \"./cppcheck/cppcheck.js\"\nimport { setupDoxygen } from \"./doxygen/doxygen.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { setupGcovr } from \"./gcovr/gcovr.js\"\nimport { setupGraphviz } from \"./graphviz/graphviz.js\"\nimport { setupKcov } from \"./kcov/kcov.js\"\nimport { setupAppleClang } from \"./llvm/apple-clang.js\"\nimport { setupClangFormat, setupClangTools, setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMake } from \"./make/make.js\"\nimport { setupMeson } from \"./meson/meson.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { setupNala } from \"./nala/nala.js\"\nimport { setupNinja } from \"./ninja/ninja.js\"\nimport { setupOpencppcoverage } from \"./opencppcoverage/opencppcoverage.js\"\nimport { setupPowershell } from \"./powershell/powershell.js\"\nimport { setupPython } from \"./python/python.js\"\nimport { setupSccache } from \"./sccache/sccache.js\"\nimport { setupSevenZip } from \"./sevenzip/sevenzip.js\"\nimport { setupTask } from \"./task/task.js\"\nimport { setupVcpkg } from \"./vcpkg/vcpkg.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\n\nexport const llvmSetups = { llvm: setupLLVM, clang: setupLLVM, \"clang++\": setupLLVM } as const\nexport const gccSetups = { gcc: setupGcc, \"g++\": setupGcc } as const\nexport const mingwSetups = { mingw: setupMingw } as const\nexport const msvcSetups = {\n msvc: setupMSVC,\n cl: setupMSVC,\n msbuild: setupMSVC,\n visualstudio: setupMSVC,\n} as const\nexport const appleClangSetups = {\n appleclang: setupAppleClang,\n applellvm: setupAppleClang,\n \"apple-clang\": setupAppleClang,\n \"apple-llvm\": setupAppleClang,\n} as const\n\nexport const llvmTools = [\"llvm\", \"clang\", \"clang++\", \"clang-tidy\", \"clang-format\", \"clangtidy\", \"clangformat\"]\n\n/** The setup functions */\nexport const setups = {\n ...llvmSetups,\n ...gccSetups,\n ...mingwSetups,\n ...msvcSetups,\n ...appleClangSetups,\n nala: setupNala,\n cmake: setupCmake,\n ninja: setupNinja,\n python: setupPython,\n vcpkg: setupVcpkg,\n bazel: setupBazel,\n conan: setupConan,\n meson: setupMeson,\n gcovr: setupGcovr,\n opencppcoverage: setupOpencppcoverage,\n OpenCppCoverage: setupOpencppcoverage,\n choco: setupChocolatey,\n brew: setupBrew,\n powershell: setupPowershell,\n pwsh: setupPowershell,\n ccache: setupCcache,\n sccache: setupSccache,\n doxygen: setupDoxygen,\n graphviz: setupGraphviz,\n cppcheck: setupCppcheck,\n \"clang-tidy\": setupClangTools,\n clangtidy: setupClangTools,\n \"clang-format\": setupClangFormat,\n clangformat: setupClangFormat,\n vcvarsall: setupVCVarsall,\n kcov: setupKcov,\n make: setupMake,\n task: setupTask,\n sevenzip: setupSevenZip,\n \"7zip\": setupSevenZip,\n \"7z\": setupSevenZip,\n} as const\n\nexport type ToolName = keyof typeof setups\n\n/** The tools that can be installed */\nexport const tools = Object.keys(setups) as Array\n\n/** The possible inputs to the program */\nexport type Inputs = keyof typeof setups | \"compiler\" | \"architecture\" | \"timeout\"\n\n/** An array of possible inputs */\nexport const inputs: Array = [\"compiler\", \"architecture\", \"timeout\", ...tools]\n","import { execRootSync } from \"admina\"\nimport { addAptKeyViaURL, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupBazel(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // install bazelisk because it contains both\n return setupChocoPack(\"bazelisk\", version)\n }\n case \"darwin\": {\n // install bazelisk because it contains both\n return installBrewPack(\"bazelisk\", version)\n }\n case \"linux\": {\n if (isArch()) {\n throw new Error(\"installing bazel on Arch linux is not supported yet\")\n } else if (hasDnf()) {\n // https://bazel.build/install/redhat\n await setupDnfPack([{ name: \"dnf-plugins-core\" }])\n execRootSync(\"dnf\", [\"copr\", \"enable\", \"vbatts/bazel\"])\n return setupDnfPack([{ name: \"bazel4\" }])\n } else if (isUbuntu()) {\n // https://bazel.build/install/ubuntu\n const keyFileName = await addAptKeyViaURL({\n fileName: \"bazel-archive-keyring.gpg\",\n keyUrl: \"https://bazel.build/bazel-release.pub.gpg\",\n })\n execRootSync(\"bash\", [\n \"-c\",\n `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://storage.googleapis.com/bazel-apt stable jdk1.8\" | tee /etc/apt/sources.list.d/bazel.list`,\n ])\n return installAptPack([{ name: \"bazel\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupConan(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"conan\", version)\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupMeson(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"meson\", version)\n}\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupCcache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"ccache\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"ccache\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"ccache\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"ccache\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { installBrewPack } from \"setup-brew\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSccache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"sccache\", version)\n }\n case \"linux\":\n case \"darwin\": {\n return installBrewPack(\"sccache\", version)\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupCppcheck(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"cppcheck\", version)\n const binDir = await activateWinCppcheck()\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"cppcheck\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"cppcheck\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"cppcheck\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinCppcheck() {\n const binDir = \"C:/Program Files/Cppcheck\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { join } from \"path\"\nimport { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { getBrewDir, installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMake(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"make\", version)\n }\n case \"darwin\": {\n await installBrewPack(\"make\", version)\n\n const gnuBinDir = join(getBrewDir(), \"opt/make/libexec/gnubin\")\n await addPath(gnuBinDir, rcOptions)\n return { binDir: gnuBinDir }\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"make\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"make\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"make\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","#!/usr/bin/env node\n/* eslint-disable node/shebang */\n\nimport { GITHUB_ACTIONS, isCI } from \"ci-info\"\nimport { error, info, success, warning } from \"ci-log\"\nimport { finalizeRC } from \"envosman\"\nimport * as numerous from \"numerous\"\nimport numerousLocale from \"numerous/locales/en.js\"\nimport * as timeDelta from \"time-delta\"\nimport timeDeltaLocale from \"time-delta/locales/en.js\"\nimport { untildifyUser } from \"untildify-user\"\nimport { checkUpdates } from \"./check-updates.js\"\nimport { parseArgs, printHelp, rcOptions } from \"./cli-options.js\"\nimport { installCompiler } from \"./compilers.js\"\nimport { installTool } from \"./installTool.js\"\nimport { type Inputs, llvmTools, tools } from \"./tool.js\"\nimport { isArch } from \"./utils/env/isArch.js\"\nimport { ubuntuVersion } from \"./utils/env/ubuntu_version.js\"\nimport { setupPacmanPack } from \"./utils/setup/setupPacmanPack.js\"\nimport { syncVersions } from \"./versions/versions.js\"\n\n/** The main entry function */\nasync function main(args: string[]): Promise {\n let checkUpdatePromise = Promise.resolve()\n if (!GITHUB_ACTIONS) {\n checkUpdatePromise = checkUpdates()\n process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS = \"true\"\n }\n\n // parse options using mri or github actions\n const opts = parseArgs(args)\n\n // print help\n if (opts.help) {\n printHelp()\n }\n\n // cpu architecture\n const arch = opts.architecture ?? process.arch\n\n // the installation dir for the tools that are downloaded directly\n const setupCppDir = process.env.SETUP_CPP_DIR ?? untildifyUser(\"~\")\n\n // report messages\n const successMessages: string[] = []\n const errorMessages: string[] = []\n\n const timeFormatter = timeDelta.create({ autoloadLocales: true })\n timeDelta.addLocale(timeDeltaLocale as timeDelta.Locale)\n numerous.addLocale(numerousLocale as numerous.Locale)\n let time1: number\n let time2: number\n\n // installing the specified tools\n\n const osVersion = await ubuntuVersion()\n\n // sync the version for the llvm tools\n if (!syncVersions(opts, llvmTools as Inputs[])) {\n error(\"The same version must be used for llvm, clang-format and clang-tidy\")\n return 1\n }\n\n if (isArch() && typeof opts.cppcheck === \"string\" && typeof opts.gcovr === \"string\") {\n info(\"installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux\")\n await setupPacmanPack(\"python-pygments\")\n }\n\n // loop over the tools and run their setup function\n\n let failedFast = false\n for (const tool of tools) {\n // fail fast inside CI when any tool fails\n if (isCI) {\n if (errorMessages.length !== 0) {\n failedFast = true\n break\n }\n }\n\n // get the version or \"true\" or undefined for this tool from the options\n const version = opts[tool]\n\n // skip if undefined\n if (version !== undefined) {\n // running the setup function for this tool\n time1 = Date.now()\n // eslint-disable-next-line no-await-in-loop\n await installTool(\n tool,\n version,\n osVersion,\n arch,\n setupCppDir,\n successMessages,\n errorMessages,\n Number.parseFloat(opts.timeout ?? \"20\") * 60 * 1000,\n )\n time2 = Date.now()\n info(`took ${timeFormatter.format(time1, time2) || \"0 seconds\"}`)\n }\n }\n\n if (!failedFast) {\n // installing the specified compiler\n const maybeCompiler = opts.compiler\n if (maybeCompiler !== undefined) {\n const time1Compiler = Date.now()\n await installCompiler(maybeCompiler, osVersion, setupCppDir, arch, successMessages, errorMessages)\n const time2Compiler = Date.now()\n info(`took ${timeFormatter.format(time1Compiler, time2Compiler) || \"0 seconds\"}`)\n }\n }\n\n await finalizeRC(rcOptions)\n\n if (successMessages.length === 0 && errorMessages.length === 0) {\n warning(\"setup-cpp was called without any arguments. Nothing to do.\")\n return 0\n }\n\n // report the messages in the end\n for (const tool of successMessages) {\n success(tool)\n }\n for (const tool of errorMessages) {\n error(tool)\n }\n\n info(\"setup-cpp finished\")\n\n if (!GITHUB_ACTIONS) {\n switch (process.platform) {\n case \"win32\": {\n warning(\"Run `RefreshEnv.cmd` or restart your shell to update the environment.\")\n break\n }\n case \"linux\":\n case \"darwin\": {\n warning(\"Run `source ~/.cpprc` or restart your shell to update the environment.\")\n break\n }\n default: {\n // nothing\n }\n }\n }\n\n await checkUpdatePromise\n\n return errorMessages.length === 0 ? 0 : 1 // exit with non-zero if any error message\n}\n\n// Run main\nmain(process.argv)\n .then((ret) => {\n process.exitCode = ret\n })\n .catch((err) => {\n error(\"main() panicked!\")\n error(err as string | Error)\n process.exitCode = 1\n })\n","import { warning } from \"ci-log\"\nimport updateNotifier from \"simple-update-notifier\"\nimport packageJson from \"../package-version.json\"\n\n// auto self update notifier\nexport async function checkUpdates() {\n try {\n await updateNotifier({ pkg: packageJson })\n } catch (err) {\n warning(`Failed to check for updates: ${err instanceof Error ? err.message + err.stack : err}`)\n }\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error, info } from \"ci-log\"\nimport semverValid from \"semver/functions/valid\"\nimport { getSuccessMessage } from \"./cli-options.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { activateGcovGCC, activateGcovLLVM } from \"./gcovr/gcovr.js\"\nimport { setupAppleClang } from \"./llvm/apple-clang.js\"\nimport { setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { appleClangSetups, gccSetups, llvmSetups, mingwSetups, msvcSetups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\n/**\n * Detecting the compiler version. Divide the given string by `-` and use the second element as the version\n *\n * @param compilerAndVersion - The compiler and version string\n * @returns The compiler and version\n *\n * @nothrow It doesn't throw any error, but it logs the error if it fails to parse the compiler info\n */\nexport function getCompilerInfo(compilerAndVersion: string) {\n try {\n const compilerAndMaybeVersion = compilerAndVersion.split(\"-\")\n const compiler = compilerAndMaybeVersion[0]\n if (1 in compilerAndMaybeVersion) {\n const maybeVersion = compilerAndMaybeVersion[1]\n if (semverValid(maybeVersion) === null) {\n info(`Invalid semver version ${maybeVersion} used for the compiler.`)\n }\n return { compiler, version: maybeVersion }\n }\n return { compiler, version: undefined }\n } catch (err) {\n error(`Failed to parse the compiler info ${compilerAndVersion}: ${err}`)\n return { compiler: compilerAndVersion, version: undefined }\n }\n}\n\n/** Installing the specified compiler */\nexport async function installCompiler(\n compilerAndVersion: string,\n osVersion: number[] | null,\n setupCppDir: string,\n arch: string,\n successMessages: string[],\n errorMessages: string[],\n) {\n const { compiler, version } = getCompilerInfo(compilerAndVersion)\n\n let installationInfo: InstallationInfo | undefined | void | null // null means the compiler is not supported\n try {\n // install the compiler. We allow some aliases for the compiler name\n startGroup(`Installing ${compiler} ${version ?? \"\"}`)\n if (compiler in llvmSetups) {\n installationInfo = await setupLLVM(\n getVersion(\"llvm\", version, osVersion),\n join(setupCppDir, \"llvm\"),\n arch,\n )\n await activateGcovLLVM()\n } else if (compiler in gccSetups) {\n const gccVersion = getVersion(\"gcc\", version, osVersion)\n installationInfo = await setupGcc(gccVersion, join(setupCppDir, \"gcc\"), arch)\n await activateGcovGCC(gccVersion)\n } else if (compiler in mingwSetups) {\n const gccVersion = getVersion(\"mingw\", version, osVersion)\n installationInfo = await setupMingw(gccVersion, join(setupCppDir, \"gcc\"), arch)\n await activateGcovGCC(gccVersion)\n } else if (compiler in msvcSetups) {\n installationInfo = await setupMSVC(\n getVersion(\"msvc\", version, osVersion),\n join(setupCppDir, \"msvc\"),\n arch,\n )\n } else if (compiler in appleClangSetups) {\n await setupAppleClang()\n } else {\n installationInfo = null\n errorMessages.push(`Unsupported compiler ${compiler}`)\n }\n } catch (err) {\n error(err as string | Error)\n errorMessages.push(`Failed to install the ${compilerAndVersion}`)\n }\n\n if (installationInfo !== null) {\n successMessages.push(getSuccessMessage(compiler, installationInfo))\n }\n\n endGroup()\n}\n"],"names":["issueCommand","command","properties","message","cmd","Command","process","stdout","write","os","EOL","rng","poolPtr","rnds8Pool","length","crypto","randomFillSync","slice","validate","uuid","REGEX","test","stringify","arr","offset","byteToHex","toLowerCase","TypeError","parse","v","Uint8Array","parseInt","v35","name","version","hashfunc","generateUUID","value","namespace","buf","str","unescape","encodeURIComponent","bytes","i","push","charCodeAt","stringToBytes","set","err","DNS","URL","getProxyUrl","reqUrl","usingSsl","protocol","checkBypass","hostname","isLoopbackAddress","host","hostLower","startsWith","noProxy","env","reqPort","port","Number","upperReqHosts","toUpperCase","upperNoProxyItem","split","map","x","trim","filter","some","endsWith","undefined","proxyVar","DecodedURL","TunnelingAgent","options","self","this","proxyOptions","proxy","maxSockets","http","Agent","defaultMaxSockets","requests","sockets","on","socket","localAddress","toOptions","len","pending","splice","request","onSocket","destroy","removeSocket","createSecureSocket","cb","prototype","createSocket","call","hostHeader","getHeader","tlsOptions","mergeOptions","servername","replace","secureSocket","tls","connect","indexOf","target","arguments","overrides","j","keys","Object","keyLen","k","os_1","require","fs_1","access","appendFile","writeFile","promises","exports","_summary","constructor","_buffer","filePath","_filePath","pathFromEnv","SUMMARY_ENV_VAR","Error","constants","R_OK","W_OK","_a","wrap","tag","content","attrs","htmlAttrs","entries","key","join","overwrite","writeFunc","encoding","emptyBuffer","clear","isEmptyBuffer","addRaw","text","addEOL","addCodeBlock","code","lang","assign","element","addList","items","ordered","listItems","item","addTable","rows","tableBody","row","cells","cell","header","data","colspan","rowspan","addDetails","label","addImage","src","alt","width","height","addHeading","level","includes","addSeparator","addBreak","addQuote","cite","addLink","href","getInput","val","required","trimWhitespace","error","utils_1","toCommandProperties","startGroup","issue","endGroup","command_1","file_command_1","__importStar","path","oidc_utils_1","http_client_1","auth_1","core_1","OidcClient","createHttpClient","allowRetry","maxRetry","requestOptions","allowRetries","maxRetries","HttpClient","BearerCredentialHandler","getRequestToken","token","getIDTokenUrl","runtimeUrl","getCall","id_token_url","httpclient","res","getJson","catch","statusCode","id_token","result","getIDToken","audience","debug","setSecret","ExitCode","exportVariable","convertedVal","toCommandValue","issueFileCommand","prepareKeyValueMessage","secret","inputPath","delimiter","getMultilineInput","inputs","input","getBooleanInput","setOutput","enabled","exitCode","Failure","group","fn","saveState","aud","summary_1","defineProperty","enumerable","get","summary","summary_2","markdownSummary","path_utils_1","pathUtils","toPosixPath","pth","toWin32Path","sep","toPlatformPath","GITHUB_ACTIONS","core","console","log","warning","msg","notice","info","isexe","Promise","resolve","reject","er","is","ignoreErrors","resolveCommandAttempt","parsed","withoutPathExt","cwd","hasCustomCwd","shouldSwitchCwd","chdir","disabled","resolved","which","sync","getPathKey","pathExt","e","notFoundError","original","syscall","errno","spawnargs","args","verifyENOENT","status","isWin","file","spawn","spawned","cp","hookChildProcess","pathKey","platform","reverse","find","isStream","stream","pipe","isWritableStream","writable","_write","_writableState","async","getStream","inputStream","maxBuffer","Infinity","bufferStream","rejectPromise","getBufferedLength","BufferConstants","MAX_LENGTH","bufferedData","getBufferedValue","streamPipelinePromisified","MaxBufferError","execa","handleArguments","joinCommand","escapedCommand","getEscapedCommand","validateTimeout","timeout","isFinite","childProcess","dummySpawned","ChildProcess","errorPromise","makeError","stderr","all","timedOut","isCanceled","killed","mergePromise","spawnedPromise","signal","stdin","getSpawnedPromise","timedPromise","setupTimeout","killSignal","timeoutId","timeoutPromise","setTimeout","timeoutKill","kill","safeSpawnedPromise","finally","clearTimeout","race","processDone","cleanup","detached","removeExitHandler","onExit","setExitHandler","spawnedKill","bind","cancel","spawnedCancel","handlePromiseOnce","onetime","stdoutResult","stderrResult","allResult","buffer","stdoutPromise","getStreamPromise","stderrPromise","allPromise","getBufferedData","getSpawnedResult","handleOutput","returnedError","aborted","failed","handleInput","inputFile","validateInputOptions","createReadStream","end","makeAllStream","mixed","mergeStream","add","pipeStdout","pipeToTarget","pipeStderr","pipeAll","addPipeMethods","execaSync","getInputSync","readFileSync","handleInputSync","spawnSync","execPowershell","startupFlags","execOptions","stdio","powershell","maybePwsh","nothrow","maybePowerShell","getPowerShell","t","r","o","configurable","m","getuid","CI","n","s","h","parseCommand","b","a","l","c","y","S","f","R","p","SUDO_USER","w","statSync","isDirectory","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","mixin$1","source","sourceObject","forEach","symbol","module","globalThis","Array","naiveFallback","window","__global__","isSymbol","toStringTag","validateSymbol","es6Symbol","global","validTypes","object","Symbol","iterator","toPrimitive","SymbolPolyfill","HiddenSymbol","isNativeSafe","d","NativeSymbol","generateName","objPrototype","created","create","desc","postfix","ie11BugWorkaround","gs","setupStandardSymbols","standardSymbols","defineProperties","hasInstance","isConcatSpreadable","match","search","species","unscopables","setupSymbolRegistry","registry","symbolRegistry","for","String","keyFor","ignore","description","__description__","__name__","toString","valueOf","from","iteratorSymbol","isArguments","objToString","id","isFunction","isFunctionStringTag","RegExp","toPosInt","callable","validValue","isValue","isString","isArray","Function","shim","arrayLike","Context","getIterator","mapFn","thisArg","apply","next","done","numberIsNaN","isNan","isNaN","NaN","objHasOwnProperty","hasOwnProperty","abs","Math","floor","eIndexOf","searchElement","fromIndex","obj","targetObj","index","ensureCallable","byObserver","Observer","queue","currentQueue","node","document","createTextNode","callback","concat","shift","observe","characterData","nextTick","queueMicrotask","MutationObserver","WebKitMutationObserver","setImmediate","isCallable","isPromise","then","isPromiseModule","default","objectMap","primitiveSet","arg","ensureString","ensureValue","stringifiable","validateStringifiable","validateStringifiableValue","toShortString","safeToString","toShortStringRepresentation","string","char","JSON","supportedModes","promise","mode","conf","waiting","cache","isFailed","emit","onSuccess","count","onFailure","delete","resolvedMode","nextTickFailure","context","oldCache","pathExists","fsPromises","untildifyUser","maybeHomeDir","isSudo","homedir","userHomeDir","tildeRegex","addRCHeader","rcHeader","guard","rcPath","readFile","addSourceToTargetRc","sourceRcString","targetRcPath","addEnv","valGiven","givenOptions","escapeSpace","defaultRcPath","shouldEscapeSpace","spaceEscaped","escapeQuote","escapeString","addEnvSystem","sourceRCInRc","addPath","isIgnoredPath","ignoredPaths","checkedPath","PATH","ghAddPath","addPathSystem","addLocale","localeData","locales","pluralize","unit","config","unitTypeData","locale","lookupOrder","unitTypeLookupOrder","unshift","unitType","Set","getLocaleDataForUnitType","unitString","numerous","SPACE_CHARACTERS","Range","range","parseOptions","loose","includePrerelease","raw","Comparator","formatted","parseRange","first","isNullSet","isAny","comps","format","memoKey","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","cached","re","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","comparatorTrimReplace","TILDETRIM","tildeTrimReplace","CARETTRIM","caretTrimReplace","rangeList","parseComparator","comp","replaceGTE0","COMPARATORLOOSE","rangeMap","Map","comparators","size","has","values","intersects","thisComparators","isSatisfiable","rangeComparators","every","thisComparator","rangeComparator","SemVer","testSet","safeRe","remainingComparators","testComparator","pop","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","TILDELOOSE","TILDE","_","M","pr","ret","replaceCaret","z","CARETLOOSE","CARET","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","to","tM","tm","tp","tpr","prerelease","semver","ANY","allowed","major","minor","patch","operator","COMPARATOR","cmp","__awaiter","_arguments","P","generator","fulfilled","rejected","step","__generator","body","verb","op","g","ops","trys","sent","throw","return","toArr","any","toVal","out","opts","old","nxt","boolean","addUpdateAlternativesToRc","rcOptions","priority","execRoot","updateAptAlternatives","sourceRC","getAptEnv","apt","DEBIAN_FRONTEND","LANG","LC_ALL","hasNala","getApt","escapeStringRegexp","isAptPackInstalled","pack","line","filterAndQualifyAptPackages","packages","qualifiedNeededAptPackage","qualified","aptPackageType","AptPackageType","NameDashVersion","NameEqualsVersion","Name","getAptArg","escapeRegex","showStdout","updatedRepos","None","updateAptReposMemoized","installAptPack","update","allRepositories","flatMap","repository","repo","initAptMemoized","aptTimeout","defaultExecOptions","installAddAptRepo","execRootSync","addAptRepository","addRepositories","needToInstall","binDir","addAptKeyViaURL","keyServer","defaultKeyServer","fileName","keyStorePath","assertGpgFileName","addAptKeyViaServer","addAptKeys","isExecaError","retryErrors","keyUrl","defaultKeyStorePath","dlPath","tmpdir","dl","DownloaderHelper","start","s$1","initGpg","setupBrew","maybeBinDir","dirname","getDownloadPath","NONINTERACTIVE","getBrewBinDir","getBrewDir","arch","installBrewPack","cask","hasBrew","brewPath","hasDnf","hasDnfCache","isArch","isArchCache","isUbuntu","isUbuntuCache","setupChocolatey","_version","_setupDir","_arch","SystemRoot","chocoPath","ALLUSERSPROFILE","maybeChoco","ChocolateyInstall","setupChocoPack","hasChoco","TMP","TEMP","Path","extendEnv","setupDnfPack","getDnfArg","setupPacmanPack","aur","pacman","yayBuildDir","isRoot","createdBuilderUser","didUpdate","didInit","runInstall","availableVersions","matchAll","pacmanSiVersionRegex","availablePacmanVersions","u","basename","E","N","extname","relative","rmRF","ioUtil","IS_WINDOWS","rm","force","recursive","retryDelay","mkdirP","fsPath","ok","mkdir","findInPath","tool","extensions","extension","isRooted","tryGetExecutablePath","directories","matches","directory","cpDirRecursive","sourceDir","destDir","currentDepth","files","readdir","srcFile","destFile","lstat","copyFile","chmod","stat","isSymbolicLink","unlink","symlinkFull","readlink","symlink","exists","exec","commandLine","commandArgs","tr","argStringToArray","toolPath","ToolRunner","findAllVersions","toolName","versions","_getCacheDirectory","fs","existsSync","children","readdirSync","child","isExplicitVersion","fullPath","_createExtractFolder","dest","_getTempDirectory","v4_1","io","_createToolPath","folderPath","clean","markerPath","_completeToolPath","writeFileSync","versionSpec","valid","evaluateVersions","sort","gt","potential","satisfies","cacheDirectory","tempDirectory","_getGlobal","defaultValue","retryAsPromised","optionsInput","$current","max","backoffBase","backoffExponent","report","Date","toLocaleTimeString","backoffTimeout","lastError","TimeoutError","current","shouldRetry","pow","setupSevenZip","getArchiveType","ext","extract7Zip","sevenZip","getSevenZip","grantUserWriteAccess","extractExe","extractZip","extractTarByExe","stripComponents","flags","archiveType","installTarDependencies","setupBin","getPackageInfo","setupDir","RUNNER_TEMP","RUNNER_TOOL_CACHE","_b","url","binRelativeDir","binFileName","extractedFolderName","extractFunction","dir","installDir","binFile","givenExtractFunction","downloaded","retry","downloadedFilePath","now","downloadTool","tryDownload","getExtractFunction","downloadExtractInstall","maybeGetInput","CACHE_TOOLS","cacheDir","cacheInstallation","getCmakePackageInfo","semVersion","semverCoerce","isOld","semverLte","osArchStr","x86_64","x86","arm64","folderName","addExeExt","setupCmake","isBinUptoDate","givenFile","targetVersion","versionRegex","defaultVersionRegex","givenVersion","execout","getExecOutput","getExecOutput_1","getBinVersion","semverCompare","quoteIfHasSpace","quoteChar","setupPython","installInfo","foundPython","findPython","bin","setupActionsPython","brewPythonPrefix","brewPythonBin","setupPythonSystem","findOrSetupPython","require$$0$2","foundPip","maybePip","findPip","ensurePipUpgrade","setupPipPackSystem","setupPip","findOrSetupPip","hasPipx","setupPipPackWithPython","upgrade","usePipx","setupPipx","isLibrary","setupWheel","pythonBin","isPythonUpToDate","rootDir","pathParse","root","pythonDirs","pythonDir","candidate","pythonBinPath","MinVersions","pythonBinPaths","pipCandidate","isPipUptoDate","pip","pipPaths","pipPath","err1","err2","getVersion","osVersion","isVersionDefault","DefaultUbuntuVersion","toolLinuxVersions","osVersionMaj","satisfyingVersion","getDefaultLinuxVersion","DefaultVersions","detectUsingOsVersion","versionMatch","setupPipPack","getPython","givenPython","user","isPipx","hasPackage","python","pipHasPackage","nameAndVersion","upgradeFlag","userFlag","PIPX_HOME","getPipxHome","PIPX_BIN_DIR","getPipxBinDir","execPaths","addPythonBaseExecPrefix","dirs","dirIndex","findIndex","exist","whichDir","findBinDir","addPythonPrefix","setupGraphviz","activateGraphviz","setupDmg","ArchiveHdi","dmg","read","entry","extract","getDoxygenPackageInfo","setupMacOSSDK","xcrun","sdkroot","loadAssetList","matchAsset","assets","origTags","versionMap","filterMapTag","origTag","mappedTag","candidateTags","candidateTag","assetNames","filterName","matchAssetName","keywords","optionalKeywords","candidates","keyword","candidateScores","score","maxScore","getGccPackageInfo","asset","x64","ia32","setupGcc","installationInfo","setupChocoMingw","gccExe","exe1","exe2","tag1","tag2","v1","v2","compare","localeCompare","compareVersion","_d","_c","versionStdout","getGccCmdVersion","majorVersion","semverMajor","matcherPath","addGccLoggingMatcher","activateGcc","setupMingw","activateGcovGCC","gccVersion","gccSemver","semverValid","gccMajor","getNinjaPackageInfo","ninjaPlatform","getNinjaPlatformArch","setupNinja","getDownloadKcovPackageInfo","getBuildKcovPackageInfo","buildKcov","cmake","ubuntuVersion","getCmake","buildDir","setupAppleClang","vsversion_to_versionnumber","vsversion","VsYearVersion","vsversion_to_year","year","ver","findVcvarsall","vsversion_number","version_pattern","upper_bound","pattern","child_process","execSync","installationPath","findWithVswhere","years","YEARS","prog_files","PROGRAM_FILES","ed","EDITIONS","PROGRAM_FILES_X86","isPathVariable","setupVCVarsall","VCTargetsPath","toolset","sdk","uwp","spectre","setupMSVCDevCmd","getArch","installTool","setupCppDir","successMessages","errorMessages","milliseconds","fallback","customTimers","timer","cancelablePromise","sign","getAbortedReason","addEventListener","timeoutError","pTimeout","hasLLVM","llvmTools","setupVersion","setupFunction","setups","getSuccessMessage","installToolImpl","stack","getLLVMPackageInfo","ubuntuVer","ubuntuMin","armv7","powerpc64le","sparc64","getAssetKeywords","ghAsset","websiteAsset","getLLVMAssetURL","setupLLVM","setupLLVMWithoutActivation","ld","LD_LIBRARY_PATH","dyld","DYLD_LIBRARY_PATH","llvmMajor","majorLLVMVersion","actPromises","activateLLVM","setupClangFormat","setupLLVMOnly","LLVMPackages","ClangFormat","setupClangTools","All","installationFolder","installerScript","installerPath","neededPackages","givenScript","target_path","script","NODE_DEBUG","debugScript","nonInteractiveScript","choosePackages","installingPack","regexp","isAptPackRegexInstalled","removeConflictingPackages","useNalaScript","patchAptLLVMScript","shell","setupLLVMApt","llvmBinaryDeps","coeredVersion","coercedVersion","semverCoerceIfInvalid","addLLVMLoggingMatcher","setupMSVC","versionGiven","installed","vcvarsall_path","addMSVCLoggingMatcher","setupOpencppcoverage","activateOpencppcoverage","getPowerShellPackageInfo","getPowershellUrl","arm","arm32","aarch64","setupPowershell","ubuntuVerSplitted","setupPowershellSystem","getTaskPackageInfo","taskPlatform","getTaskPlatform","taskArch","getTaskArch","checkEnv","vendors","constant","vendor","envs","isCI","ne","BUILD_ID","BUILD_NUMBER","CI_APP_ID","CI_BUILD_ID","CI_BUILD_NUMBER","CI_NAME","CONTINUOUS_INTEGRATION","RUN_ID","utils","annotationProperties","title","startLine","endLine","col","startColumn","endColumn","cmdStr","escapeData","substr","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v3$1","Buffer","createHash","digest","v5","clockseq","seedBytes","random","msecs","nsecs","dt","tl","tmh","rnds","uuid_1","fileCommand","appendFileSync","v4","convertedValue","_decodedUsername","_decodedPassword","base","super","decodeURIComponent","username","password","https","events","util","tunnel","httpOverHttp","agent","httpsOverHttp","defaultPort","httpOverHttps","httpsOverHttps","inherits","EventEmitter","addRequest","req","onFree","onCloseOrRemove","removeListener","onConnect","head","connectReq","removeAllListeners","debug$2","placeholder","connectOptions","method","headers","proxyAuth","useChunkedEncodingByDefault","once","onUpgrade","cause","pos","HttpCodes","Headers","MediaTypes","HttpRedirectCodes","MovedPermanently","ResourceMoved","SeeOther","TemporaryRedirect","PermanentRedirect","HttpResponseRetryCodes","BadGateway","ServiceUnavailable","GatewayTimeout","RetryableHttpVerbs","HttpClientError","setPrototypeOf","HttpClientResponse","readBody","output","alloc","chunk","readBodyBuffer","chunks","lowercaseKeys","reduce","userAgent","handlers","_ignoreSslError","_socketTimeout","_allowRedirects","_allowRedirectDowngrade","_maxRedirects","_allowRetries","_maxRetries","_agent","_proxyAgent","_proxyAgentDispatcher","_keepAlive","_disposed","ignoreSslError","socketTimeout","allowRedirects","allowRedirectDowngrade","maxRedirects","keepAlive","requestUrl","additionalHeaders","del","post","put","sendStream","Accept","_getExistingOrDefaultHeader","ApplicationJson","_processResponse","postJson","ContentType","putJson","patchJson","parsedUrl","_prepareRequest","maxTries","response","numTries","requestRaw","Unauthorized","authenticationHandler","handler","canHandleAuthentication","handleAuthentication","redirectsRemaining","redirectUrl","parsedRedirectUrl","_performExponentialBackoff","dispose","requestRawWithCallback","callbackForResult","onResult","handleResult","callbackCalled","byteLength","httpModule","sock","getAgent","serverUrl","_getAgent","getAgentDispatcher","proxyUrl","pm","_getProxyAgentDispatcher","pathname","_mergeHeaders","prepareRequest","_default","clientHeader","useProxy","globalAgent","agentOptions","tunnelAgent","overHttps","rejectUnauthorized","proxyAgent","uri","pipelining","requestTls","retryNumber","ms","min","contents","NotFound","deserializeDates","dateTimeDeserializer","auth","BasicCredentialHandler","TESTING_WINDOWS","checkStat","isFile","checkPathExt","pathext","PATHEXT","checkMode","mod","uid","gid","myUid","myGid","getgid","ug","isWindows","OSTYPE","COLON","getNotFoundError","getPathInfo","opt","colon","pathEnv","pathExtExe","found","ppRaw","pathPart","pCmd","subStep","ii","whichSync","cur","ex","environment","metaCharsRegExp","_escape","doubleEscapeMetaChars","shebangRegex","resolveCommand","escape","readShebang","fd","openSync","readSync","closeSync","shebangCommand","argument","binary","isExecutableRegExp","isCmdShimRegExp","commandFile","shebang","detectShebang","needsShell","forceShell","needsDoubleEscapeMetaChars","normalize","shellCommand","comspec","windowsVerbatimArguments","parseNonShell","enoent","originalEmit","arg1","verifyENOENTSync","crossSpawnModule","_parse","npmRunPathEnv","pathName","npmRunPath","pathOption","preferLocal","execPath","addExecPath","cwdString","fileURLToPath","cwdPath","applyPreferLocal","previous","applyExecPath","execPathString","copyProperty","property","ignoreNonConfigurable","toDescriptor","fromDescriptor","canCopyProperty","wrappedToString","withName","fromBody","toStringDescriptor","toStringName","calledFunctions","WeakMap","function_","returnValue","callCount","functionName","displayName","arguments_","Reflect","ownKeys","changePrototype","fromPrototype","getPrototypeOf","changeToString","newToString","mimicFunction","getRealtimeSignal","number","SIGRTMIN","action","standard","SIGNALS","forced","getSignals","realtimeSignals","signals","normalizeSignal","defaultNumber","name2","constantSignal","supported","getSignalByName","signalsByName","getSignalsByName","fromEntries","findSignalByNumber","signalA","getSignalsByNumber","signalsA","SIGRTMAX","getSignalByNumber","signalDescription","prefix","getErrorPrefix","errorCode","execaMessage","isError","shortMessage","Boolean","originalMessage","aliases","processOk","reallyExit","listeners","pid","emitter","assert","EE","__signal_exit_emitter__","emitted","infinite","setMaxListeners","equal","loaded","ev","remove","alwaysLast","unload","sig","sigListeners","originalProcessEmit","originalProcessReallyExit","event","emit$1","load","processEmit","processReallyExit","killResult","setKillTimeout","shouldForceKill","getForceKillAfterTimeout","unref","forceKillAfterTimeout","isSigterm","SIGTERM","DEFAULT_FORCE_KILL_TIMEOUT","streamName","createWriteStream","isExecaChildProcess","PassThrough","PassThroughStream","promisify","array","isBuffer","objectMode","setEncoding","pipeline","getStreamModule","sources","it","readable","isEmpty","streamPromise","nativePromisePrototype","descriptors","descriptor","normalizeArgs","NO_ESCAPE_REGEXP","DOUBLE_QUOTES_REGEXP","escapeArg","SPACES_REGEXP","tokens","previousToken","verboseDefault","debuglog","padField","field","padding","padStart","logCommand","verbose","getTimestamp","date","getHours","getMinutes","getSeconds","getMilliseconds","crossSpawn","stripFinalNewline","localDir","windowsHide","getEnv","envOption","alias","hasAlias","normalizeStdio","CR","chown","lchmod","lchown","link","mkdtemp","open","realpath","rename","rmdir","truncate","utimes","promises_1","posix","myGroups","groups","getgroups","win32","peSplit","substring","__exportStar","impl","_ISEXE_TEST_PLATFORM_","isexeSync","rSlash","rRel","optPath","optPathExt","optDelimiter","getPathPart","envPart","withExt","pathEnvPart","$","A","systemdrive","opts1","toInteger","optsLength","fnLength","isAsync","objPropertyIsEnumerable","propertyIsEnumerable","list","compareFn","defVal","foo","bar","trzy","shim$3","function","isObject","captureStackTrace","generate","mixin","arg2","possibleTypes","isPrototype","classRe","functionToString","contains","searchString","isPlainFunction","normalizeOpts","dscr","off","methods","type","listener","__eeOnceListener__","__ee__","resolveArgs","customError","defineLength","ee","resolveResolve","resolvers","configure","memLength","extDel","extGet","extHas","normalizer","getListeners","setListeners","deleteListeners","memoized","resolveNormalize","userNormalizer","profileName","updateEnv","__memoized__","_get","_has","resolveLength","plain","extFn","__profiler__","primitive","getPrimitiveFixed","currentLength","lastId","argsMap","getFixed","aFrom","tbi","currentCallback","currentContext","currentArgs","last","origCb","resultArray","maxAge","maxTimeout","validTimeout","noop","timeouts","preFetchAge","preFetchTimeouts","preFetch","toPosInteger","lruQueue","limit","hit","oldIndex","nuIndex","refCounter","deleteRef","getRefCount","memoize","is_posix_os","release","windows_version_regex","given_path","should_not_escape","major_release","os_build","regexEscape","matchOperatorsRe","chars","escapeChar","regex","variants","checkLocale","hasLocale","__dirname","requireLocale","isNode","timeUnits","defaultConfig","span","autoloadLocales","firstDate","secondDate","autoload","localeId","ensureLocaleLoadedOrThrow","difference","results","divider","getDifference","parts","long","one","other","months","weeks","days","hours","minutes","seconds","narrow","short","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","LONECARET","looseOption","freeze","emptyOpts","numeric","compareIdentifiers","anum","bnum","rcompareIdentifiers","LOOSE","FULL","num","build","compareMain","comparePre","compareBuild","inc","identifier","identifierBase","throwErrors","versionA","versionB","lt","eq","neq","gte","lte","coerce","rtl","coerceRtlRegex","COERCERTLFULL","COERCERTL","lastIndex","firstKey","outside","hilo","gtfn","ltefn","ltfn","ecomp","high","low","comparator","minimumVersionWithPreRelease","minimumVersion","simpleSubset","sub","dom","eqSet","gtltComp","higher","lower","hasDomLT","hasDomGT","higherGT","lowerLT","needDomLTPre","needDomGTPre","internalRe","identifiers","diff","version1","version2","comparison","v1Higher","highVersion","lowVersion","highHasPre","lowHasPre","rcompare","compareLoose","rsort","toComparators","maxSatisfying","maxSV","rangeObj","minSatisfying","minSV","minVersion","minver","setMin","compver","validRange","gtr","ltr","r1","r2","simplifyRange","prev","ranges","simplified","subset","sawNonNull","OUTER","simpleSub","simpleDom","isSub","packageJson","npm_package_json","npm_config_user_agent","isNpm6","isNpm7","isNpm","isYarn","isNpmOrYarn","homeDirectory","configDir","XDG_CONFIG_HOME","getConfigFile","packageName","getDistVersion","distTag","json","hasNewVersion","pkg","updateCheckInterval","alwaysRun","lastUpdateCheck","latestVersion","mkdirSync","getLastUpdate","configFile","getTime","err_1","isTTY","shouldNotifyInNpmScript","lines","repeat","_i","lines_1","padEnd","borderedText","_interopRequireWildcard","__esModule","_possibleConstructorReturn","ReferenceError","DH_STATES","_typeof","_createClass","_url","_events","IDLE","SKIPPED","STARTED","DOWNLOADING","RETRY","PAUSED","RESUMED","STOPPED","FINISHED","FAILED","_classCallCheck","__proto__","captureRejections","__validate","requestURL","state","__defaultOpts","metadata","override","forceResume","removeOnStop","removeOnFail","progressThrottle","httpRequestOptions","httpsRequestOptions","resumeOnIncomplete","resumeIfFileExists","resumeOnIncompleteMaxRetry","__opts","__pipes","__total","__downloaded","__progress","__retryCount","__retryTimeout","__resumeRetryCount","__states","__promise","__request","__response","__isAborted","__isResumed","__isResumable","__isRedirected","__destFolder","__statsEstimate","time","prevBytes","throttleTime","__fileName","__filePath","updateOptions","_inherits","__start","getTotalSize","total","__getFilePath","__getFilesizeInBytes","resumeFromFile","unpipe","__fileStream","__requestAbort","__closeFileStream","__setState","__reqOptions","__emitStop","__headers","__getReqOptions","__initProtocol","progress","speed","__protocol","__isRequireRedirect","location","__getFileNameFromHeaders","destroyed","__downloadRequest","__onError","__onTimeout","__resetStats","__startDownload","skip","skipSmaller","totalSize","downloadedSize","isResumed","__calculateStats","__onFinished","close","__hasFinished","resume","incomplete","onDiskSize","__retry","__removeFile","delay","__getFileNameFromOpts","__uniqFileNameSync","prevPath","prevFileName","getStats","throwIfNoEntry","accessSync","F_OK","abort","__resolvePending","toInstall","npath","nFileName","first2chars","nFilepath","startsWithSingleDot","O","I","T","W","q","B","isUnixExecutable","stats","O_RDONLY","useStat","normalizeSeparators","upperExt","validExt","originalFilePath","upperName","actualName","assert_1","copySourceDirectory","readCopyOptions","destStat","newDest","sourceStat","mv","destExists","mkdirP_1","check","tok","makeSafeRe","tb","defaultResult","rangeTmp","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","compRe","stable","archFilter","platFilter","chk","platform_version","_getOsVersion","plat","lsbContents","_readLinuxVersionFile","lsbReleaseFile","osReleaseFile","randomBytes","bytesToUuid","timers_1","toolrunner","_debug","_getCommandString","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","_windowsQuoteCmdArg","_processLineBuffer","strBuffer","onLine","argline","_endsWith","upperToolPath","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","quoteHit","_cloneExecOptions","silent","failOnStdErr","ignoreReturnCode","outStream","errStream","_getSpawnOptions","argv0","optionsNonNull","ExecState","stdbuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","processExitCode","argString","append","escaped","inQuotes","charAt","_setResult","HandleTimeout","string_decoder_1","exec_2","exec_1","stdoutDecoder","StringDecoder","stderrDecoder","originalStdoutListener","originalStdErrListener","maxAttempts","minSeconds","maxSeconds","execute","isRetryable","attempt","getSleepAmount","sleep","mm","httpm","__importDefault","retry_helper_1","HTTPError","httpStatusCode","toolCache","IS_MAC","downloadTool_1","retryHelper","RetryHelper","authorization","statusMessage","readStream","responseMessageFactory","succeeded","downloadToolAttempt","extract7z","_7zPath","originalCwd","isDebug","powershellPath","extractTar","versionOutput","isGnuTar","destArg","fileArg","extractXar","xarPath","escapedFile","escapedDest","pwshPath","extractZipWin","unzipPath","extractZipNix","cacheDir_1","destPath","itemName","cacheFile","sourceFile","targetFile","destFolder","find_1","cachePath","getManifestFromRepo","owner","branch","releases","treeUrl","manifestUrl","tree","versionsRaw","findFromManifest","manifest","_findMatch","previousError","dist","optsArg","optsFs","mkdirAsync","rej","made","statAsync","mkdirpManualSync","parent","fer","mkdirpManual","st","findMade","findMadeSync","mkdirpNativeSync","mkdirpNative","__TESTING_MKDIRP_PLATFORM__","pathArg","badWinChars","versArr","__TESTING_MKDIRP_NODE_VERSION__","hasNative","useNativeSync","useNative","mkdirpSync","mkdirp","native","nativeSync","manual","manualSync","defaultLLVM","llvm","clang","clangtidy","clangformat","ninja","gcovr","conan","meson","kcov","task","doxygen","gcc","mingw","nala","base_exec_prefix","unique","getUbuntuVersion_1","getUbuntuVersion","child_process_1","exe","execFile","reDistributor","reDescription","reRelease","distributorFound","rel","ss","versionSplitted","pipxHome","compatHome","pipxBinDir","nameMap","macosVersion","macosRelease","pathToFileURL","__filename","_documentCurrentScript","baseURI","AbortError","getDOMException","DOMException","errorMessage","reason","vsversion_to_versionnumber_1","VSWHERE_PATH","findVcvarsall_1","arch_aliases","win64","vcvars","cmd_output_parts","old_environment","vcvars_output","new_environment","error_messages","old_env_vars","new_value","_1","setupLLVMDeps","hasVCPKG","llvmSetups","gccSetups","mingwSetups","msvcSetups","msvc","cl","msbuild","visualstudio","appleClangSetups","appleclang","applellvm","nalaPack","nalaLegacyPack","installer","setupNalaViaInstaller","vcpkg","addShExt","addShRelativePrefix","bazel","opencppcoverage","OpenCppCoverage","choco","brew","pwsh","ccache","sccache","activateWinDoxygen","graphviz","cppcheck","activateWinCppcheck","vcvarsall","versionSplit","addVPrefix","installMethod","version_number","removeVPrefix","make","gnuBinDir","sevenzip","tools","checkUpdatePromise","updateNotifier","checkUpdates","ACTIONS_ALLOW_UNSECURE_COMMANDS","idx","alibi","strict","unknown","defaults","mri","inp","parseArgs","help","table","documentation","coverage","architecture","SETUP_CPP_DIR","timeFormatter","timeDelta.create","time1","time2","timeDelta.addLocale","timeDeltaLocale","numerous.addLocale","numerousLocale","toolsInUse","toolsNonDefaultVersion","syncVersions","failedFast","parseFloat","maybeCompiler","compiler","time1Compiler","compilerAndVersion","compilerAndMaybeVersion","maybeVersion","getCompilerInfo","coreExports","installCompiler","time2Compiler","uniqueEntries","finalizeRC","main","argv"],"mappings":";gzBAsBA,SAAgBA,EACdC,EACAC,EACAC,GAEA,MAAMC,EAAM,IAAIC,GAAQJ,EAASC,EAAYC,GAC7CG,QAAQC,OAAOC,MAAMJ,KAAiBK,GAAGC,IAC3C,CCzBe,SAASC,IAMtB,OALIC,GAAUC,GAAUC,OAAS,KAC/BC,GAAOC,eAAeH,IACZD,GAAA,GAGLC,GAAUI,MAAML,GAASA,IAAW,GAC7C,CCTA,SAASM,EAASC,GAChB,MAAuB,iBAATA,GAAqBC,GAAMC,KAAKF,EAChD,CCQA,SAASG,EAAUC,EAAKC,EAAS,GAGzBL,MAAAA,GAAQM,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAM,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAM,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAM,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAM,IAAMC,GAAUF,EAAIC,EAAS,KAAOC,GAAUF,EAAIC,EAAS,KAAOC,GAAUF,EAAIC,EAAS,KAAOC,GAAUF,EAAIC,EAAS,KAAOC,GAAUF,EAAIC,EAAS,KAAOC,GAAUF,EAAIC,EAAS,MAAME,cAMvf,IAACR,EAASC,GACZ,MAAMQ,UAAU,+BAGXR,OAAAA,CACT,CCxBA,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AAK,SACLmlD,OAAO,EACPE,OAAO,YACPtnC,YAAY,oDACZunC,SAAS,SAET,CACAtlD,KAAK,SACLmlD,OAAO,EACPE,OAAO,OACPtnC,YAAY,kCACZunC,SAAS,QAET,CACAtlD,KAAK,UACLmlD,OAAO,EACPE,OAAO,YACPtnC,YAAY,qBACZunC,SAAS,QACTE,QAAO,GAEP,CACAxlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,8BACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,OACPtnC,YAAY,qBACZunC,SAAS,QAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,8BACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,wBACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,mBACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,cACZunC,SAAS,QAET,CACAtlD,KAAK,YACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,+BACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,SACPtnC,YAAY,+CACZunC,SAAS,SAET,CACAtlD,KAAK,SACLmlD,OAAO,GACPE,OAAO,SACPtnC,YAAY,+CACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,UACPtnC,YAAY,WACZunC,SAAS,QACTE,QAAO,GAEP,CACAxlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,QACPtnC,YAAY,SACZunC,SAAS,QACTE,QAAO,GAEP,CACAxlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,QACPtnC,YAAY,mCACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,QACPtnC,YAAY,gDACZunC,SAAS,SAET,CACAtlD,KAAK,WACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,oCACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,QACPtnC,YAAY,qDACZunC,SAAS,SAET,CACAtlD,KAAK,SACLmlD,OAAO,GACPE,OAAO,SACPtnC,YAAY,mCACZunC,SAAS,OAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,OACPtnC,YAAY,oBACZunC,SAAS,OAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,OACPtnC,YAAY,eACZunC,SAAS,OAET,CACAtlD,KAAK,YACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,mBACZunC,SAAS,OAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,mBACZunC,SAAS,OAET,CACAtlD,KAAK,WACLmlD,OAAO,GACPE,OAAO,SACPtnC,YAAY,+BACZunC,SAAS,OAET,CACAtlD,KAAK,QACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,mBACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,gBACZunC,SAAS,SAET,CACAtlD,KAAK,UACLmlD,OAAO,GACPE,OAAO,SACPtnC,YAAY,kCACZunC,SAAS,SAET,CACAtlD,KAAK,SACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,8BACZunC,SAAS,WAET,CACAtlD,KAAK,SACLmlD,OAAO,GACPE,OAAO,OACPtnC,YAAY,sBACZunC,SAAS,SAET,CACAtlD,KAAK,YACLmlD,OAAO,GACPE,OAAO,YACPtnC,YAAY,sBACZunC,SAAS,UCxQIG,GAAWA,KACxB,MAAMC,EFLCtqC,MAAMgD,KAAK,CAACvf,OAYG,GAbAumD,GAAS,GACJF,IEOpBS,MADO,IAAIJ,MAAWG,GAAiBpjD,IAAIsjD,GAC3CD,EASDC,GAAgBA,EACtB5lD,KAAAA,EACAmlD,OAAOU,EACP9nC,cACAsn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AA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,65,66,67,68,69,73,88,89,90,91,92,113,116,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,276,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,294,295]} \ No newline at end of file diff --git a/dist/modern/setup-cpp.mjs b/dist/modern/setup-cpp.mjs index 2bae524c..8c8d0d86 100644 --- a/dist/modern/setup-cpp.mjs +++ b/dist/modern/setup-cpp.mjs @@ -1,3 +1,3 @@ #!/usr/bin/env node -function e(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function t(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 r(e,t,r){const n=new Pn(e,t,r);process.stdout.write(""+n+Tn.EOL)}function n(){return $n>Nn.length-16&&(Rr.randomFillSync(Nn),$n=0),Nn.slice($n,$n+=16)}function o(e){return"string"==typeof e&&Cn.test(e)}function i(e,t=0){const r=(Ln[e[t+0]]+Ln[e[t+1]]+Ln[e[t+2]]+Ln[e[t+3]]+"-"+Ln[e[t+4]]+Ln[e[t+5]]+"-"+Ln[e[t+6]]+Ln[e[t+7]]+"-"+Ln[e[t+8]]+Ln[e[t+9]]+"-"+Ln[e[t+10]]+Ln[e[t+11]]+Ln[e[t+12]]+Ln[e[t+13]]+Ln[e[t+14]]+Ln[e[t+15]]).toLowerCase();if(!o(r))throw TypeError("Stringified UUID is invalid");return r}function s(e){if(!o(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function a(e,t,r){function n(e,n,o,a){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;e.length>r;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=s(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(n),c.set(e,n.length),c=r(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,o){a=a||0;for(let e=0;16>e;++e)o[a+e]=c[e];return o}return i(c)}try{n.name=e}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function c(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=+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 o of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===o||n.some((e=>e===o||e.endsWith("."+o)||o.startsWith(".")&&e.endsWith(""+o))))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 Jn(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Jn("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||to.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=p(r,n,o),s=0,a=t.requests.length;a>s;++s){var c=t.requests[s];if(c.host===i.host&&c.port===i.port)return t.requests.splice(s,1),void c.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function l(e,t){var r=this;u.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host"),i=f({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host}),s=eo.connect(0,i);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function p(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function f(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,s=o.length;s>i;++i){var a=o[i];void 0!==n[a]&&(e[a]=n[a])}}return e}function d(){return Oo||(Oo=1,function(e){var t=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=mr,n=gr,{access:o,appendFile:i,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 o(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}${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:i;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(""),o=this.wrap(r,n);return this.addRaw(o).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:o}=e,i=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),o&&{rowspan:o});return this.wrap(i,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:o}=r||{},i=Object.assign(Object.assign({},n&&{width:n}),o&&{height:o}),s=this.wrap("img",null,Object.assign({src:e,alt:t},i));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}(No)),No}function h(){return So||(So=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={}){u.issueCommand("error",p.toCommandProperties(t),e instanceof Error?""+e:e)}function n(e){u.issue("group",e)}function o(){u.issue("endgroup")}var i=gn&&gn.__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=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=gn&&gn.__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)&&i(t,e,r);return s(t,e),t},c=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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.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 u=bn,l=An,p=On,f=a(mr),m=a(Sr),v=function(){if(Eo)return Kn;Eo=1;var e=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Kn,"__esModule",{value:!0}),Kn.OidcClient=void 0;const t=wo,n=_o,o=h();class i{static createHttpClient(e=!0,r=10){const o={allowRetries:e,maxRetries:r};return new t.HttpClient("actions/oidc-client",[new n.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)}`),o.debug("ID token url is "+e);const r=yield i.getCall(e);return o.setSecret(r),r}catch(r){throw Error("Error message: "+r.message)}}))}}return Kn.OidcClient=i,Kn}();var y,g;(g=y=e.ExitCode||(e.ExitCode={}))[g.Success=0]="Success",g[g.Failure=1]="Failure",e.exportVariable=function(e,t){const r=p.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV)return l.issueFileCommand("ENV",l.prepareKeyValueMessage(e,t));u.issueCommand("set-env",{name:e},r)},e.setSecret=function(e){u.issueCommand("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?l.issueFileCommand("PATH",e):u.issueCommand("add-path",{},e),process.env.PATH=`${e}${m.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 l.issueFileCommand("OUTPUT",l.prepareKeyValueMessage(e,t));process.stdout.write(f.EOL),u.issueCommand("set-output",{name:e},p.toCommandValue(t))},e.setCommandEcho=function(e){u.issue("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=y.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){u.issueCommand("debug",{},e)},e.error=r,e.warning=function(e,t={}){u.issueCommand("warning",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){u.issueCommand("notice",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+f.EOL)},e.startGroup=n,e.endGroup=o,e.group=function(e,t){return c(this,void 0,void 0,(function*(){let r;n(e);try{r=yield t()}finally{o()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return l.issueFileCommand("STATE",l.prepareKeyValueMessage(e,t));u.issueCommand("save-state",{name:e},p.toCommandValue(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return c(this,void 0,void 0,(function*(){return yield v.OidcClient.getIDToken(e)}))};var w=d();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return w.summary}});var E=d();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return E.markdownSummary}});var _=function(){if(Ro)return $o;Ro=1;var e=gn&&gn.__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=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=gn&&gn.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty($o,"__esModule",{value:!0}),$o.toPlatformPath=$o.toWin32Path=$o.toPosixPath=void 0;const n=r(Sr);return $o.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},$o.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},$o.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},$o}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return _.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return _.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return _.toPlatformPath}})}(_n)),_n}function m(e){return wn.GITHUB_ACTIONS?Co.error(e):console.log(`${e}`)}function v(e){return wn.GITHUB_ACTIONS?Co.warning(e):console.log(`${e}`)}function y(e){return wn.GITHUB_ACTIONS?Co.notice(e):console.log(`${e}`)}function g(e){return wn.GITHUB_ACTIONS?Co.info(e):console.log(e)}function w(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){w(e,t||{},(function(e,t){e?n(e):r(t)}))}))}Ao(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function E(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(a){}let s;try{s=Xo.sync(e.command,{path:r[Wo({env:r})],pathExt:t?zo.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=zo.resolve(o?e.options.cwd:"",s)),s}function _(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 b(e,t){return si&&1===e&&!t.file?_(t.original,"spawn"):null}function O(e,t,r){const n=ci(e,t,r),o=ai.spawn(n.command,n.args,n.options);return ui.hookChildProcess(o,n),o}function R(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 S(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function I(e){return S(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}async function T(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=cs(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=is.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await us(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new ls)}))})),n.getBufferedValue()}function x(e,t,r){const n=As(e,t,r),o=Os(e,t),i=Rs(e,t);let s;Ps(i,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=rn.spawn(n.file,n.args,n.options)}catch(p){const e=new rn.ChildProcess,t=Promise.reject(Ti({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return ws(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 o;const i=new Promise(((n,i)=>{o=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),s=n.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])})(s,n.options,a),u=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=Yi((()=>{e.kill()}));return n.finally((()=>{o()}))})(s,n.options,c);s.kill=Ki.bind(null,s.kill.bind(s)),s.cancel=ts.bind(null,s,{isCanceled:!1});const l=gi((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,l,p]=await(async({stdout:t,stderr:r,all:n},{encoding:o,buffer:i,maxBuffer:s},a)=>{const c=vs(t,{encoding:o,buffer:i,maxBuffer:s}),u=vs(r,{encoding:o,buffer:i,maxBuffer:s}),l=vs(n,{encoding:o,buffer:i,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},ms(t,c),ms(r,u),ms(n,l)])}})(s,n.options,u),f=Ns(n.options,c),d=Ns(n.options,l),h=Ns(n.options,p);if(e||0!==t||null!==r){const c=Ti({error:e,exitCode:t,signal:r,stdout:f,stderr:d,all:h,command:o,escapedCommand:i,parsed:n,timedOut:a,isCanceled:!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:o,escapedCommand:i,exitCode:0,stdout:f,stderr:d,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(hs(e),ln(t)))(t);void 0!==r&&(S(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=ds();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=rs.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=rs.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=rs.bind(void 0,e,"all"))})(s),ws(s,l),s}function P(e,t,r){const n=As(e,t,r),o=Os(e,t),i=Rs(e,t);Ps(i,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(hs(e),un(t)))(e);if(S(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=rn.spawnSync(n.file,n.args,{...n.options,input:s})}catch(l){throw Ti({error:l,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=Ns(n.options,a.stdout,a.error),u=Ns(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Ti({stdout:c,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:i,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:o,escapedCommand:i,exitCode:0,stdout:c,stderr:u,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function A(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return x(function(){if(void 0===oa){const e=na.sync("pwsh",{nothrow:!0});null!==e&&(oa=e);const t=na.sync("powershell",{nothrow:!0});null!==t&&(oa=t)}if(void 0===oa)throw Error("Could not find powershell");return oa}(),[...t,"-c",e],r)}function N(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function $(){return null!==na.sync("sudo",{nothrow:!0})}function C(){return 0===process.getuid?.()||!!process.env.CI}function L(){return C()&&$()}function D(e){return L()?"sudo "+e:e}function k(e,t=[],r=aa){return L()?function(e,t){const[r,...n]=Is(e);return P(r,n,t)}(j(e,t),r):P(e,F(t),r)}function U(e,t=[],r=aa){return L()?function(e,t){const[r,...n]=Is(e);return x(r,n,t)}(j(e,t),r):x(e,F(t),r)}function j(e,t){return"sudo "+F([e,...t]).join(" ")}function F(e){return e.map((e=>`'${e}'`))}function M(){return"win32"===process.platform?ca():C()}async function G(e){if(("linux"===process.platform||"darwin"===process.platform)&&L()&&void 0!==process.env.SUDO_USER){let t=gr.statSync(e).isDirectory();await U("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],aa)}}function B(){if(Za)return Qa;Za=1;var e=ja,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return Qa=function(i,s){var a,c=Object(e(s));if(i=Object(e(i)),n(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),"function"==typeof o&&o(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return i}}function H(){return Nc?Ac:(Nc=1,Ac=(Tc?Ic:(Tc=1,Ic=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 q(){if(Uc)return kc;Uc=1;var e=Dc?Lc:(Dc=1,Lc=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 V(){return Xc?zc:(Xc=1,zc=function(){if(Cc)return $c;Cc=1;var e=H(),t={object:!0,symbol:!0};return $c=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?H().Symbol:function(){if(Vc)return qc;Vc=1;var e,t,r,n=bc,o=q(),i=H().Symbol,s=function(){if(Fc)return jc;Fc=1;var e=bc,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return jc=function(o){for(var i,s,a=0;n[o+(a||"")];)++a;return n[o+=a||""]=!0,t(r,i="@@"+o,e.gs(null,(function(r){s||(s=!0,t(this,i,e(r)),s=!1)}))),i}}(),a=function(){if(Gc)return Mc;Gc=1;var e=bc,t=H().Symbol;return Mc=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(Hc)return Bc;Hc=1;var e=bc,t=q(),r=Object.create(null);return Bc=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,p=Object.defineProperty;if("function"==typeof i)try{i(),r=!0}catch(f){}else i=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},qc=e=function e(o){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?i(o):(a=u(t.prototype),l(a,{__description__:n("",o=void 0===o?"":o+""),__name__:n("",s(o))}))},a(e),c(e),l(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),l(e.prototype,{toString:n((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:n((function(){return o(this)}))}),p(e.prototype,e.toPrimitive,n("",(function(){var e=o(this);return"symbol"==typeof e?e:""+e}))),p(e.prototype,e.toStringTag,n("c","Symbol")),p(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),p(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),qc}())}function z(){return nu?ru:(nu=1,ru=(Sc?Rc:(Sc=1,Rc=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(tu)return eu;tu=1;var e=V().iterator,t=function(){if(Yc)return Wc;Yc=1;var e={}.toString,t=e.call(function(){return arguments}());return Wc=function(r){return e.call(r)===t}}(),r=function(){if(Jc)return Kc;Jc=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Kc=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=Ca,o=ka,i=ja,s=Ra,a=function(){if(Zc)return Qc;Zc=1;var e={}.toString,t=e.call("");return Qc=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},p=Object.defineProperty;return eu=function(f){var d,h,m,v,y,g,w,E,_,b,O=arguments[1],R=arguments[2];if(f=Object(i(f)),s(O)&&o(O),this&&this!==Array&&r(this))d=this;else{if(!O){if(t(f))return 1!==(y=f.length)?Array.apply(null,f):((v=[,])[0]=f[0],v);if(c(f)){for(v=Array(y=f.length),h=0;y>h;++h)v[h]=f[h];return v}}v=[]}if(!c(f))if(void 0!==(_=f[e])){for(w=o(_).call(f),d&&(v=new d),E=w.next(),h=0;!E.done;)b=O?u.call(O,R,E.value,h):E.value,d?(l.value=b,p(v,h,l)):v[h]=b,E=w.next(),++h;y=h}else if(a(f)){for(y=f.length,d&&(v=new d),h=0,m=0;y>h;++h)b=f[h],y>h+1&&(55296>(g=b.charCodeAt(0))||g>56319||(b+=f[++h])),b=O?u.call(O,R,b,m):b,d?(l.value=b,p(v,m,l)):v[m]=b,++m;y=m}if(void 0===y)for(y=n(f.length),d&&(v=new d(y)),h=0;y>h;++h)b=O?u.call(O,R,f[h],h):f[h],d?(l.value=b,p(v,h,l)):v[h]=b;return d&&(l.value=null,v.length=y),v},eu}())}function X(){if(bu)return _u;bu=1;var e=Eu?wu:(Eu=1,wu=(vu?mu:(vu=1,mu=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:gu?yu:(gu=1,yu=function(e){return e!=e})),t=Ca,r=ja,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return _u=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(i(l)):s(l);u>c;++c)if(o.call(this,c)&&e(this[c]))return c;return-1},_u}function W(){if(Au)return Pu;Au=1;var e=ka,t=Va,r=function(){}.call;return Pu=function(n,o){var i={},s=arguments[2];return e(o),t(n,(function(e,t,n,a){i[t]=r.call(o,s,e,t,n,a)})),i},Pu}function Y(){if($u)return Nu;$u=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,o=document.createTextNode(""),i=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(o.data=i=++i%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(o,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,o.data=i=++i%2)}};return Nu=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 K(){return Uu?ku:(Uu=1,ku=function(e){return"function"==typeof e})}function J(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return zu||(zu=1,Ol.exports=e,Ol.exports.default=e),Ol.exports}function Q(){if(Xu)return bl;Xu=1;var e=W(),t=function(){if(Du)return Lu;Du=1;var e=[].forEach,t=Object.create;return Lu=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Lu}(),r=function(){if(Gu)return Mu;Gu=1;var e=ja,t=function(){if(Fu)return ju;Fu=1;var e=K();return ju=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Mu=function(r){return t(e(r))}}(),n=function(){if(Vu)return qu;Vu=1;var e=function(){if(Hu)return Bu;Hu=1;var e=K();return Bu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return""}}}();return qu=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)}))}}(),o=J(),i=Y(),s=Object.create,a=t("then","then:finally","done","done:finally");return za.promise=function(t,c){var u=s(null),l=s(null),p=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(!o(n))return l[e]=n,void c.emit("setasync",e,1);u[e]=1,p[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))},f=function(){s=!0,u[e]&&(delete u[e],delete p[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){i(f)};"function"==typeof(n=n.then((function(e){i(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,f)}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(f)}})),c.on("get",(function(e,t,r){var n;if(u[e])++u[e];else{var s=function(){c.emit("getasync",e,t,r)};o(n=p[e])?"function"==typeof n.done?n.done(s):n.then((function(){i(s)})):s()}})),c.on("delete",(function(e){if(delete p[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),p=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},bl}async function Z(e){try{return await pn.access(e),!0}catch{return!1}}function ee(e){const t=function(){if(L()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Ir("/Users/",process.env.SUDO_USER):Ir("/home/",process.env.SUDO_USER);{const e=vr();if(""===e)return;return e}}();return void 0===t?e:e.replace(Cl,t)}async function te(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 Z(e.rcPath)&&((await Dl(e.rcPath,"utf8")).includes(t)||(await Ll(e.rcPath,`\n${t}\n`),g(`Added ${t} to ${e.rcPath}`)))}async function re(e,t){await Z(t)&&((await Dl(t,"utf-8")).includes(e)||(await Ll(t,e),g(`${e} was added to ${t}`)))}async function ne(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Ul,...r},o=function(e,t=!1){const r=t?Hl(e):e;return Yl(r,'"',"\\")}(t??"",n.escapeSpace);try{if(wn.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void g(`Environment variable ${e} is already defined. Skipping.`);Co.exportVariable(e,o)}catch(i){m(i),await oe(e,o,n)}else await oe(e,o,n)}catch(i){m(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function oe(e,t,r){const n=t??"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await A(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void g(`${e}='${n}' was set in the environment.`)):void g(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await jl(r),void(r.overwrite?(await Kl(r.rcPath,`\nexport ${e}="${n}"\n`),g(`${e}="${n}" was added to "${r.rcPath}`)):(await Kl(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),g(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function ie(e,t={}){const r={rcPath:Ul,...t};if(!function(e){return!!Ql.some((t=>t.test(e)))&&(process.env.PATH?.split(Tr)??[]).includes(e)}(e)){process.env.PATH=`${e}${Tr}${process.env.PATH}`;try{if(wn.GITHUB_ACTIONS)try{Co.addPath(e)}catch(n){m(n),await se(e,r)}else await se(e,r)}catch(n){m(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function se(e,t){switch(process.platform){case"win32":return await A(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void g(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await jl(t),await Jl(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void g(`"${e}" was added to "${t.rcPath}"`);default:return}}function ae(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 ce(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;cp[e]=r}}function ue(e,t,r){const n=function(e){const t=cp[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}(r);return op.pluralize(r.locale,t,n[e]).replace("{0}",t)}function le(){if(If)return Sf;If=1;const e=/\s+/g;class t{constructor(r,i){if(i=n(i),r instanceof t)return r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease?r:new t(r.raw,i);if(r instanceof o)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.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&&f)|(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],T(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],u),i("comparator trim",e),e=e.replace(a[c.TILDETRIM],l),i("tilde trim",e),e=e.replace(a[c.CARETTRIM],p),i("caret trim",e);let m=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));s&&(m=m.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),i("range list",m);const v=new Map,g=m.map((e=>new o(e,this.options)));for(const r of g){if(h(r))return[r];v.set(r.value,r)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return r.set(t,w),w}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>v(t,r)&&e.set.some((e=>v(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(x(this.set[r],e,this.options))return!0;return!1}}Sf=t;const r=new Pf,n=yp,o=pe(),i=dp,s=xp,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:p}=hp,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=fp,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},y=(e,t)=>(i("comp",e,t),e=_(e,t),i("caret",e),e=w(e,t),i("tildes",e),e=O(e,t),i("xrange",e),e=S(e,t),i("stars",e),e),g=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(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,o,s)=>{let a;return i("tilde",e,t,r,n,o,s),g(r)?a="":g(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:g(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(i("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,i("tilde return",a),a})),_=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{i("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,n,o,s,a)=>{let c;return i("caret",e,t,n,o,s,a),g(n)?c="":g(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:g(s)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(i("replaceCaret pr",a),c="0"===n?"0"===o?`>=${n}.${o}.${s}-${a} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s}-${a} <${+n+1}.0.0-0`):(i("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${s}${r} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s} <${+n+1}.0.0-0`),i("caret return",c),c}))},O=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>(e=e.trim()).replace(t.loose?a[c.XRANGELOOSE]:a[c.XRANGE],((r,n,o,s,a,c)=>{i("xRange",e,r,n,o,s,a,c);const u=g(o),l=u||g(s),p=l||g(a);return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(l&&(s=0),a=0,">"===n?(n=">=",l?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",l?o=+o+1:s=+s+1),"<"===n&&(c="-0"),r=`${n+o}.${s}.${a}${c}`):l?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:p&&(r=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),i("xRange return",r),r})),S=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),I=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),T=e=>(t,r,n,o,i,s,a,c,u,l,p,f)=>`${r=g(n)?"":g(o)?`>=${n}.0.0${e?"-0":""}`:g(i)?`>=${n}.${o}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=g(u)?"":g(l)?`<${+u+1}.0.0-0`:g(p)?`<${u}.${+l+1}.0-0`:f?`<=${u}.${l}.${p}-${f}`:e?`<${u}.${l}.${+p+1}-0`:"<="+c}`.trim(),x=(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(i(e[r].semver),e[r].semver!==o.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 Sf}function pe(){if(xf)return Tf;xf=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,o){if(o=r(o),n instanceof t){if(n.loose===!!o.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,o),this.options=o,this.loose=!!o.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[o.COMPARATORLOOSE]:n[o.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 i(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("="))&&!(i(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}Tf=t;const r=yp,{safeRe:n,t:o}=hp,i=gf,s=dp,a=xp,c=le();return Tf}function fe(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{a(n.next(e))}catch(t){o(t)}}function s(e){try{a(n.throw(e))}catch(t){o(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(i,s)}a((n=n.call(e)).next())}))}function de(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,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&i[3]>r[1])){a.label=r[1];break}if(6===r[0]&&i[1]>a.label){a.label=i[1],i=r;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,o,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function he(e){return null==e?[]:Array.isArray(e)?e:[e]}function me(e,t,r,n){var o,i=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*(o=+r)==0?o:r),!!r)):0*(o=+r)==0?o:r;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s]}async function ve(e,t,r,n=40){wn.GITHUB_ACTIONS?await async function(e,t,r=40){await U("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await jl(r),await Ud(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function ye(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 ge(){return null!==na.sync("nala",{nothrow:!0})}function we(){let e;return e=ge()?"nala":"apt-get",e}function Ee(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function _e(e){try{const{stdout:t}=await x("dpkg",["-s",e],{env:ye("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function be(e,t=we()){return(await Promise.all(e.map((e=>Oe(e,t))))).filter((e=>void 0!==e))}async function Oe(e,t=we()){const r=await async function(e,t,r){switch(await Re(e,t,r)){case Gd.NameDashVersion:return`${t}-${r}`;case Gd.NameEqualsVersion:return`${t}=${r}`;case Gd.Name:return void 0!==r&&""!==r&&v(`Could not find package ${t} with version ${r}. Installing the latest version.`),t;default:throw Error(`Could not find package ${t} ${r??""}`)}}(t,e.name,e.version);return await _e(r)?void 0:r}async function Re(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await x("apt-cache",["search","--names-only",`^${Ee(t)}-${Ee(r)}$`],{env:ye(e),stdio:"pipe"});if(""!==n.trim())return Gd.NameDashVersion;try{const{stdout:n}=await x("apt-cache",["show",`${t}=${r}`],{env:ye(e)});if(""===n.trim())return Gd.NameEqualsVersion}catch{}}try{const{stdout:r}=await x("apt-cache",["show",t],{env:ye(e),stdio:"pipe"});if(""!==r.trim())return Gd.Name}catch{}return Fd?Gd.None:(Md(e),Re(e,t,r))}async function Se(e,t=!1){const r=we();for(const{name:i,version:s}of e)g(`Installing ${i} ${s??""} via ${r}`);t&&Md(r),await async function(e,t){const r=[...new Set(t.flatMap((e=>e.repository??[])))];await Promise.all(r.map((t=>async function(e,t=we()){await Hd(t),await async function(e){await _e("software-properties-common")||k(e,["install","-y","--fix-broken","-o",jd,"software-properties-common"],{...aa,env:ye(e)})}(t),k("add-apt-repository",["-y","--no-update",e],{...aa,env:ye(t)}),Md.clear(),Md(t)}(t,e))))}(r,e);const n=await be(e,r);if(0===n.length)return g("All packages are already installed"),{binDir:"/usr/bin/"};await Hd(r);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?Ie(t):async function({key:e,keyServer:t=zd,fileName:r,keyStorePath:n=zd}){try{xe(r);const o=Ir(n,r);return await Z(o)||(Te(),await U("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await U("chmod",["644",o])),o}catch(o){return void v(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),k(r,["install","--fix-broken","-y",...n],{...aa,env:ye(r)})}catch(o){if(!function(e){return"string"==typeof e.stderr}(o))throw o;qd.some((e=>o.stderr.includes(e)))&&(v(`Failed to install packages ${n}. Retrying...`),k(r,["install","--fix-broken","-y","-o",jd,...n],{...aa,env:ye(r)}))}return{binDir:"/usr/bin/"}}async function Ie({keyUrl:e,fileName:t,keyStorePath:r=Vd}){try{xe(t);const n=Ir(r,t);if(!(await Z(n))){Te(),await Se([{name:"ca-certificates"}]);const r=Ir(yr(),t),o=new kd.DownloaderHelper(e,yr(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),k("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),k("chmod",["644",n])}return n}catch(n){return void v(`Failed to add apt key via download ${e}: ${n}`)}}function Te(){k("gpg",["-k"])}function xe(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function Pe(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof Xd)return{binDir:Xd};const t=await na("brew",{nothrow:!0});if(null!==t)return Xd=xr(t),{binDir:Xd};await Se([{name:"ca-certificates"}]);const r=new kd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",yr(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),P("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),Xd=Ae(),await ie(Xd,e.rcOptions),{binDir:Xd}}function Ae(){return Ir(Ne(),"bin")}function Ne(){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")}async function $e(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};g(`Installing ${e} ${t??""} via brew`),Qd&&null!==na.sync("brew",{nothrow:!0})||(await Pe(),Qd=!0);const o=Ae(),i=Ir(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return n.overwrite&&s.push("--overwrite"),n.cask&&s.push("--cask"),P(i,s,{stdio:"inherit"}),{binDir:o}}function Ce(){return"linux"===process.platform&&(void 0===Wd&&(Wd=null!==na.sync("dnf",{nothrow:!0})),Wd)}function Le(){return"linux"===process.platform&&(void 0===Yd&&(Yd=null!==na.sync("pacman",{nothrow:!0})),Yd)}function De(){return"linux"===process.platform&&(void 0===Kd&&(Kd=null!==na.sync("apt-get",{nothrow:!0})),Kd)}async function ke(e,t,r){if("win32"!==process.platform)return;if("string"==typeof Jd)return{binDir:Jd};const n=na.sync("choco",{nothrow:!0});if(null!==n)return Jd=xr(n),{binDir:Jd};let o="powershell.exe";const i=na.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==i&&(o=i),P(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 s=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await ie(s,ny);const a=na.sync("choco",{nothrow:!0});return Jd=null!==a?xr(a):(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin",await Z(Jd)?{binDir:Jd}:void 0}async function Ue(e,t,r=[]){g(`Installing ${e} ${t??""} via chocolatey`),Zd&&null!==na.sync("choco",{nothrow:!0})||(await ke(0,0,process),Zd=!0);const n=process.env.PATH,o={...process.env};if(o.TMP=void 0,o.TEMP=void 0,o.Path=void 0,o.PATH=n,void 0!==t&&""!==t)P("choco",["install","-y",e,"--version="+t,...r],{env:o,extendEnv:!1,stdio:"inherit"});else try{P("choco",["install","-y",e,...r],{env:o,extendEnv:!1,stdio:"inherit"})}catch(s){if(!s.message.includes("exit code 3010"))throw s;g(e+" might require a reboot for the completion of the installation.")}const i=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin";return await ie(i,ny),{binDir:i}}async function je(e){for(const{name:t,version:r}of e)g(`Installing ${t} ${r??""} via dnf`);return k("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:r}=await x("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;{const{stdout:r}=await x("dnf",["search","-q",`${e}${t}`]);if(""!==r.trim())return`${e}${t}`;v(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function Fe(e,t,r){g(`Installing ${e} ${t??""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===na.sync("yay",{nothrow:!0}))try{k("pacman",["-S","--noconfirm","base-devel","git"]);const e=Ir(yr(),"yay");k("mkdir",["-p",e]),C()?(v("Creating a non-root user to build yay"),k("useradd",["-m","-G","wheel","builder"]),k("passwd",["-d","builder"]),k("chown",["-R","builder:builder",e]),k("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),nh=!0,P("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),P("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(P("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:yr()}),P("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),P("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),eh||"yay"===r||(k(n,["-Sy","--noconfirm"]),eh=!0),th||"yay"===r||(k(n,["-S","--noconfirm","base-devel"]),th=!0);const o=e=>"yay"===r?C()&&nh?k("su",["-","builder","-c","yay -S --noconfirm "+e]):P(r,["-S","--noconfirm",e]):k(r??n,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const r=await async function(e,t){const r=[];try{const{stdout:n}=await x(e,["-Si",t]);for(const e of n.matchAll(rh))r.push(e[1])}catch(n){v(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{o(`${e}=${t}`)}catch{o(`${e}${t}`)}else g(`Failed to install ${e} ${t} via pacman, trying without version`),o(e)}else o(e);return{binDir:"/usr/bin/"}}function Me(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 Ge(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function Be(e,t=!0){return t?Pr(e):Pr(e,Ar(e))}function He(e){return Nr(e).replace(RegExp(Ee($r)+"$"),"")}function qe(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ve(e,t){const r=Ar(e),n=`${t}${Pr(e,r)}${r}`;return Ir(xr(e),n)}function ze(e,t){const r=Ar(e),n=`${Pr(e,r)}${t}${r}`;return Ir(xr(e),n)}function Xe(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function We(e){return"win32"===process.platform?e:"./"+e}function Ye(e){const t=Ar(e).length;return e.slice(0,-t)}function Ke(e,t){return ih(e,t)}function Je(e,t){const r=Cr(t,e);return!(!r||".."===r||r.startsWith(".."+$r)||r===Lr(e))}function Qe(e){return Ph(this,void 0,void 0,(function*(){if($h.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield $h.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function Ze(e){return Ph(this,void 0,void 0,(function*(){Ah.ok(e,"a path argument must be provided"),yield $h.mkdir(e,{recursive:!0})}))}function et(e){return Ph(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if($h.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(Nh.delimiter))e&&t.push(e);if($h.isRooted(e)){const r=yield $h.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(Nh.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(Nh.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield $h.tryGetExecutablePath(Nh.join(o,e),t);r&&n.push(r)}return n}))}function tt(e,t,r,n){return Ph(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield Ze(t);const o=yield $h.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield $h.lstat(o)).isDirectory()?yield tt(o,s,r,n):yield rt(o,s,n)}yield $h.chmod(t,(yield $h.stat(e)).mode)}))}function rt(e,t,r){return Ph(this,void 0,void 0,(function*(){if((yield $h.lstat(e)).isSymbolicLink()){try{yield $h.lstat(t),yield $h.unlink(t)}catch(n){"EPERM"===n.code&&(yield $h.chmod(t,"0666"),yield $h.unlink(t))}const r=yield $h.readlink(e);yield $h.symlink(r,t,$h.IS_WINDOWS?"junction":null)}else(yield $h.exists(t))&&!r||(yield $h.copyFile(e,t))}))}function nt(e,t,r){return cm(this,void 0,void 0,(function*(){const n=pm.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=n[0];return t=n.slice(1).concat(t||[]),new pm.ToolRunner(o,t,r).exec()}))}function ot(e,t){const r=[];t=t||xm.arch();const n=Pm.join(lt(),e);if(Im.existsSync(n)){const e=Im.readdirSync(n);for(const o of e)if(ct(o)){const e=Pm.join(n,o,t||"");Im.existsSync(e)&&Im.existsSync(e+".complete")&&r.push(o)}}return r}function it(e){return bm(this,void 0,void 0,(function*(){return e||(e=Pm.join(pt(),Dm.default())),yield Sm.mkdirP(e),e}))}function st(e,t,r){return bm(this,void 0,void 0,(function*(){const n=Pm.join(lt(),e,Nm.clean(t)||t,r||"");Rm.debug("destination "+n);const o=n+".complete";return yield Sm.rmRF(n),yield Sm.rmRF(o),yield Sm.mkdirP(n),n}))}function at(e,t,r){const n=Pm.join(lt(),e,Nm.clean(t)||t,r||"");Im.writeFileSync(n+".complete",""),Rm.debug("finished caching tool")}function ct(e){const t=Nm.clean(e)||"";Rm.debug("isExplicit: "+t);const r=null!=Nm.valid(t);return Rm.debug("explicit? "+r),r}function ut(e,t){let r="";Rm.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Nm.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Nm.satisfies(o,t)){r=o;break}}return Rm.debug(r?"matched: "+r:"match not found"),r}function lt(){const e=process.env.RUNNER_TOOL_CACHE||"";return Lm.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function pt(){const e=process.env.RUNNER_TEMP||"";return Lm.ok(e,"Expected RUNNER_TEMP to be defined"),e}function ft(e,t){const r=gn[e];return void 0!==r?r:t}function dt(e,t){if(!e||!t)throw Error("retry-as-promised must be passed a callback and a options set");const r={$current:"$current"in(t="number"==typeof t?{max:t}:t)?t.$current:1,max:t.max,timeout:t.timeout||void 0,match:t.match?Array.isArray(t.match)?t.match:[t.match]:[],backoffBase:void 0===t.backoffBase?100:t.backoffBase,backoffExponent:t.backoffExponent||1.1,report:t.report,name:t.name||e.name||"unknown"};return r.match&&!Array.isArray(r.match)&&(r.match=[r.match]),r.report&&r.report("Trying "+r.name+" #"+r.$current+" at "+(new Date).toLocaleTimeString(),r),new Promise((function(t,n){let o,i,s;r.timeout&&(o=setTimeout((function(){i&&clearTimeout(i),n(new Vm(r.name+" timed out",s))}),r.timeout)),Promise.resolve(e({current:r.$current})).then(t).then((function(){o&&clearTimeout(o),i&&clearTimeout(i)})).catch((function(a){o&&clearTimeout(o),i&&clearTimeout(i),s=a,r.report&&r.report(a&&""+a||a,r,a);var c=r.max>r.$current;if(!c)return n(a);if(c=0===r.match.length||r.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,a)})),!c)return n(a);var u=r.backoffBase*Math.pow(r.backoffExponent,r.$current-1);r.$current++,r.report&&r.report(`Retrying ${r.name} (${r.$current})`,r),u?(r.report&&r.report(`Delaying retry of ${r.name} by ${u}`,r),i=setTimeout((function(){dt(e,r).then(t).catch(n)}),u)):dt(e,r).then(t).catch(n)}))}))}function ht(e,t,r){switch(process.platform){case"win32":return Ue("7zip",e);case"darwin":return $e("p7zip",e);case"linux":if(Le())return Fe("p7zip",e);if(Ce())return je([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(De())return Se([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function mt(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||v(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function vt(e,t){return await x(await async function(){return void 0===Xm&&(null===na.sync("7z",{nothrow:!0})&&await ht("",0,process),Xm="7z"),Xm}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await G(t),t}function yt(e,t){return vt(e,t)}async function gt(e,t){return null!==na.sync("7z",{nothrow:!0})?vt(e,t):null!==na.sync("unzip",{nothrow:!0})?(await x("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await G(t),t):vt(e,t)}async function wt(e,t,r=0,n=[]){await async function(e){switch(g("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(Le()?(await Fe("gzip"),await Fe("tar")):Ce()?await je([{name:"gzip"},{name:"tar"}]):De()&&await Se([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(Le()?(await Fe("xz"),await Fe("tar")):Ce()?await je([{name:"xz"},{name:"tar"}]):De()&&await Se([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(mt(e));try{await Ch(t)}catch{}try{await x("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&v(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await G(t),t}async function Et(e,t,r,n,o){g(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=process.env.RUNNER_TEMP??yr(),process.env.RUNNER_TOOL_CACHE=process.env.RUNNER_TOOL_CACHE??Ir(yr(),"setup-cpp","hostedtoolcache");const{url:i,binRelativeDir:s,binFileName:a,extractedFolderName:c,extractFunction:u}=await r(t,process.platform,o);if(wn.GITHUB_ACTIONS)try{const r=Hm(e,t);if(r){const n=Ir(r,c),o=Ir(n,s);if(await Z(Ir(o,a)))return g(`${e} ${t} was found in the cache at ${o}.`),await ie(o,ny),{installDir:n,binDir:o}}}catch{}const l=Ir(n,c),p=Ir(l,s),f=Ir(p,a);return await async function(e,t,r,n,o,i,s,a){if((await Promise.all([Z(e),Z(t)])).includes(!1))try{const e=await async function(e,t,r){g(`Download ${e} ${t}`);return await zm((()=>{const e=Ir(process.env.RUNNER_TEMP??yr(),`${Date.now()}-${Pr(r)}`);return Gm(r,e)}),{name:r,max:4,backoffBase:2e3,report:e=>g(e)})}(r,n,o);g(`Extracting ${e} to ${i}`);const t=s??function(e){switch(e){case 0:case 1:case 2:return wt;case 3:return gt;default:return vt}}(mt(o));await t(e,i)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${o}: ${c}`)}if(g(`Add ${e} to PATH`),await ie(e,ny),!(await Z(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await Kr(t,"755")}catch(c){v(`Failed to make ${t} executable: ${c}`)}}(p,f,e,t,i,n,u,o),await async function(e,t,r){wn.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==dr("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await Bm(e,t,r))}(n,e,t),{installDir:l,binDir:p}}function _t(e,t,r){const n=Rf(e)??e;switch(t){case"win32":{const t=pf(n,"v3.19.6");let o;yh.includes(r)?o=t?"win64-x64":"windows-x86_64":gh.includes(r)?o=t?"win32-x86":"windows-i386":wh.includes(r)?o="windows-arm64":(g(`Trying unsupported arch '${r}' for cmake on Windows`),o="windows-"+r);const i=`cmake-${e}-${o}`;return{binRelativeDir:"bin/",binFileName:qe("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${pf(n,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:qe("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=pf(n,"v3.19.8");let o;wh.includes(r)?o=t?"Linux-aarch64":"linux-aarch64":yh.includes(r)?o=t?"Linux-x86_64":"linux-x86_64":(g(`Trying unsupported arch '${r}' for cmake on Linux`),o="linux-"+r);const i=`cmake-${e}-${o}`;return{binRelativeDir:"bin/",binFileName:qe("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function bt(e,t,r){return Et("cmake",e,_t,t,r)}async function Ot(e,t,r=uv){const n=await async function(e,t=uv){try{const r=await um(e,["--version"]),n=r.stdout||r.stderr||"",o=n.trim().match(t)?.[1];return Rf(o)??void 0}catch(r){return void console.error(r)}}(e,r);return void 0!==n&&""!==t&&-1!==Vp(n,t)}function Rt(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function St(e,t,r){const n=await async function(e,t,r){let n,o=await It(t);if(void 0!==o){const e=xr(o);n={bin:o,installDir:e,binDir:e}}else{if(wn.GITHUB_ACTIONS)try{g("Installing python in GitHub Actions");const{setupActionsPython:i}=await import("./assets/actions_python-mhNRejTS.mjs");if(await i(e,t,r),o=await It(t),void 0===o)throw Error("Python binary could not be found");const s=xr(o);n={bin:o,installDir:s,binDir:s}}catch(i){v(""+i)}void 0===n&&(n=await async function(e,t){let r;switch(process.platform){case"win32":{e?await Ue("python3",t,["--params=/InstallDir:"+e]):await Ue("python3",t);const n=await It(e);if(void 0===n)throw Error("Python binary could not be found");const o=xr(n);await ie(o,ny),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await $e("python3",t);const e=await x("brew",["--prefix","python"],{stdio:"pipe"}),n=Ir(e.stdout,"libexec","bin");await ie(n,ny);break}case"linux":if(Le())r=await Fe("python",t);else if(Ce())r=await je([{name:"python3",version:t}]);else{if(!De())throw Error("Unsupported linux distributions");r=await Se([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return r}(t,e))}if(void 0===o||void 0===n.bin){if(o=await It(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:xr(o),binDir:xr(o)}}return n}(e,t,r);qr(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await xt();return void 0===t?(g("pip was not found. Installing pip"),await async function(e){await At(e)||(await Ut("pip"),await At(e))}(e),xt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await kt(e)))try{await Dt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===Ut("pipx",!1))throw Error("pipx was not installed correctly "+t)}await x(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await Dt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){v(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await Dt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Dt(e,"wheel",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1})}catch(t){v(`Failed to install setuptools or wheel: ${""+t}. Ignoring...`)}}(o),n}async function It(e){for(const t of["python3","python"]){const r=await Tt(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Dr(vr()).root,t=(await Jr(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Tt(t,Ir(e,r));if(void 0!==n)return n}}}async function Tt(e,t){try{if(void 0!==t){const r=Ir(t,qe(e));if(await Z(r)&&await Ot(r,dv))return r}const r=await na(e,{nothrow:!0,all:!0})??[];for(const e of r)if(await Ot(e,dv))return e}catch{}}async function xt(){for(const e of["pip3","pip"]){const t=await Pt(e);if(void 0!==t)return t}}async function Pt(e){try{const t=await na(e,{nothrow:!0,all:!0})??[];for(const e of t)if(await Ot(e,fv))return e}catch{}}async function At(e){try{return await x(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){g(""+t);try{return await x(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){g(""+r)}}return!1}function Nt(e,t,r=null){return $t(t)&&"linux"===process.platform&&null!==r&&e in hv?function(e,t){const r=e[0],n=Object.keys(t).map((e=>Number.parseInt(e,10))).sort(((e,t)=>t-e)).find((e=>r>=e));return void 0===n?"":t[n]}(r,hv[e]):$t(t)&&e in pv?pv[e]??"":"true"===t?"":t??""}function $t(e){return"true"===e||void 0===e}function Ct(){if(!("version"in mr)||"function"!=typeof mr.version)return null;const e=mr.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 Lt(e,t,r={}){return Dt(await bv(),e,t,r)}async function Dt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await kt(e),u=c?"pipx":"pip",l=await async function(e,t){return 0===(await x(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,t);if(l)try{Co.info(`Installing ${t} ${r??""} via ${u}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,o=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&i?["--user"]:[],l=process.env;c&&i&&(l.PIPX_HOME=await Ev(),l.PIPX_BIN_DIR=await _v()),P(e,["-m",u,...o,...a,n],{stdio:"inherit",env:l})}catch(d){if(Co.info(`Failed to install ${t} via ${u}: ${d}.`),null===await Ut(t))throw Error(`Failed to install ${t} via ${u}: ${d}.`)}else if(null===await Ut(t))throw Error(`Failed to install ${t} as it was not found via ${u} or the system package manager`);const p=await mv(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>Z(Ir(e,qe(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=na.sync(qe(t),{nothrow:!0});return null!==n?xr(n):e[e.length-1]}(p,t);return await ie(f,ny),{binDir:f}}async function kt(e){return 0===(await x(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Ut(e,t=!0){if("linux"===process.platform){if(Co.info(`Installing ${e} via the system package manager`),Le())return Fe(t?"python-"+e:e);if(Ce())return je([{name:t?"python3-"+e:e}]);if(De())return Se([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return $e(e);return null}async function jt(e,t,r){switch(process.platform){case"win32":return await Ue("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await ie(e,ny),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return $e("graphviz",e);case"linux":if(Le())return Fe("graphviz",e);if(Ce())return je([{name:"graphviz",version:e}]);if(De())return Se([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Ft(e,t){const{ArchiveHdi:r}=await import("./assets/hdi-DCb6yS8z.mjs"),n=new r(e);await n.read((async e=>{await e.extract(Ir(t,e.path))}))}function Mt(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:qe("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:qe("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:qe("doxygen"),extractedFolderName:t,extractFunction:Ft,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Gt(){if("darwin"===process.platform)try{const e=await um("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ne("SDKROOT",t.trim(),ny):m("SDKROOT not set")}catch(e){m(e)}}async function Bt(e){const t=await Qr(e,"utf-8");return JSON.parse(t)}function Ht(e,t){const r=Object.keys(e),n=new Map;if(void 0===t.filterMapTag)for(const i of r)n.set(i,i);else for(const i of r){const e=t.filterMapTag(i);void 0!==e&&n.set(e,i)}if(0===n.size)return;const o=[];for(const[i,s]of n.entries())i.startsWith(t.version)&&o.push(s);if(0!==o.length)for(const i of o){let r=e[i];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=qt(i,r,t);if(void 0!==n)return n}}function qt(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 o of t)r.keywords.every((e=>o.includes(e)))&&n.push(o);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)e.includes(n)&&t++;return t})),o=Math.max(...t);return{tag:e,name:n[t.indexOf(o)]}}return{tag:e,name:n[0]}}}async function Vt(e,t,r){if("win32"===t){const t=Ht(await Bt(Ir(Sv,"github_brechtsanders_winlibs_mingw.json")),{version:e,keywords:[{x64:"x86_64",ia32:"i386"}[r]??r]});if(void 0===t)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:qe("g++"),extractedFolderName:"mingw64",extractFunction:vt,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${t.tag}/${t.name}`}}throw Error(`Unsupported platform '${t}'`)}async function zt(e,t,r,n=40){let o;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||await Ue("gcc-arm-embedded",e);try{o=await Et("g++",e,Vt,t,r)}catch(i){g(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),o=await async function(e,t){let r;if(await Ue("mingw",e),"x64"===t&&await Z("C:/tools/mingw64/bin")?(r="C:/tools/mingw64/bin",await ie(r,ny)):"ia32"===t&&await Z("C:/tools/mingw32/bin")?(r="C:/tools/mingw32/bin",await ie(r,ny)):await Z((process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(r=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin"),void 0!==r)return{binDir:r}}(e,r)}break;case"darwin":o=await $e("gcc",e);break;case"linux":"x64"===r?Le()?o=await Fe("gcc",e):Ce()?o=await je([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):De()&&(o=""===e?await Se([{name:"gcc"},{name:"g++"}]):await Se([{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"}}])):(g(`Install g++-multilib because gcc for ${r} was requested`),Le()?o=await Fe("gcc-multilib",e):De()&&(o=""===e?await Se([{name:"gcc-multilib"}]):await Se([{name:"gcc-multilib",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!==o)return await async function(e,t,r=40){const n=[];if("win32"===process.platform)n.push(ne("CC",qe(t+"/gcc"),ny),ne("CXX",qe(t+"/g++"),ny));else{let o=e;""===e&&(o=await async function(e,t){try{let r="gcc";if(await Z(e+"/gcc"))r=e+"/gcc";else{const t=(await Jr(e)).sort(((e,t)=>function(e,t){const r=Rf(e),n=Rf(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(e.match(/^gcc-?(.*)(\.exe)?$/)?.[1]??"",t.match(/^gcc-?(.*)(\.exe)?$/)?.[1]??"")));for(const n of t)if(n.startsWith("gcc")){r=`${e}/${n}`;break}}const{stdout:n}=await x(r,["--version"],{stdio:"pipe"}),o=n.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(v("Failed to parse gcc version from: "+n),t)}catch(i){return m("Failed to get gcc version: "+i),t}}(t,o),g("Using gcc version "+o));const s=Fp(Rf(o)??o);5>s?(n.push(ne("CC",`${t}/gcc-${o}`,ny),ne("CXX",`${t}/g++-${o}`,ny)),De()&&n.push(ve("cc",`${t}/gcc-${o}`,ny,r),ve("cxx",`${t}/g++-${o}`,ny,r),ve("gcc",`${t}/gcc-${o}`,ny,r),ve("g++",`${t}/g++-${o}`,ny,r))):(n.push(ne("CC",`${t}/gcc-${s}`,ny),ne("CXX",`${t}/g++-${s}`,ny)),De()&&n.push(ve("cc",`${t}/gcc-${s}`,ny,r),ve("cxx",`${t}/g++-${s}`,ny,r),ve("gcc",`${t}/gcc-${s}`,ny,r),ve("g++",`${t}/g++-${s}`,ny,r)))}n.push(Gt()),wn.GITHUB_ACTIONS&&await async function(){const e=Ir(Sv,"gcc_matcher.json");if(!(await Z(e)))return v("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");g("::add-matcher::"+e)}(),await Promise.all(n)}(e,o.binDir,n),o}function Xt(e,t,r){const n=function(e,t){switch(e){case"win32":return yh.includes(t)||gh.includes(t)?"win":wh.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return yh.includes(t)||gh.includes(t)?"linux":wh.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:qe("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function Wt(e,t,r){return Et("ninja",e,Xt,t,r)}function Yt(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:qe("kcov")}}function Kt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:qe("kcov"),extractFunction:Jt}}async function Jt(e,t){const r=await wt(e,t,1),n=await async function(){let e=na.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await bt(Nt("cmake",void 0,await wv()),Ir(ee("~"),"cmake"),"");e=Ir(t,"cmake")}return null===na.sync("ninja",{nothrow:!0})&&await Wt(Nt("ninja",void 0,await wv()),Ir(ee("~"),"ninja"),""),e}();"linux"===process.platform&&(Le()?await Promise.all([Fe("libdwarf"),Fe("libcurl-openssl")]):Ce()?await je([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):De()&&await Se([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==na.sync("patch",{nothrow:!0})){const e=Ir(Iv,"gcc13.patch");await x("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else g("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const o=Ir(r,"build");return await x(n,["-S",r,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await x(n,["--build",o,"--config","Release"],{cwd:r,stdio:"inherit"}),r}function Qt(e){return Object.values(Mv).includes(e)?e:e in Mv?Mv[e]:e}function Zt(e){if(Object.keys(Mv).includes(e))return e;for(const[t,r]of Object.entries(Mv))if(r===e)return t;return e}function er(e){const t=Qt(e);let r;if(t){const e=t.split(".")[0]+".9";r=`-version "${t},${e}"`}else r="-latest";let n=function(e,t){try{return(""+$v.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Nv.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Cv.existsSync(n))return Nv.info("Found with vswhere: "+n),n;Nv.info("Not found with vswhere");const o=e?[Zt(e)]:Fv;for(const i of Uv)for(const e of o)for(const t of jv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Nv.info("Trying standard location: "+n),Cv.existsSync(n))return Nv.info("Found standard location: "+n),n;if(Nv.info("Not found in standard locations"),n=kv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Cv.existsSync(n))return Nv.info("Found VS 2015: "+n),n;throw Nv.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function tr(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function rr(e,t,r,n,o,i,s){void 0!==t&&await Z(t)&&(g(`Adding ${t} to PATH`),await ne("VCTargetsPath",t,ny)),await qv(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),o,n,i,s,e)}async function nr(e,t,r,n,o,i,s,a=12e5){Co.startGroup(`Installing ${e} ${t}`);try{await function(e,t){const{milliseconds:r,fallback:n,message:o,customTimers:i={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(t.signal){const{signal:e}=t;e.aborted&&c(Av(e)),e.addEventListener("abort",(()=>{c(Av(e))}))}if(r===1/0)return void e.then(a,c);const u=new Tv;s=i.setTimeout.call(void 0,(()=>{if(n)try{a(n())}catch(t){c(t)}else"function"==typeof e.cancel&&e.cancel(),!1===o?a():o instanceof Error?c(o):(u.message=o??`Promise timed out after ${r} milliseconds`,c(u))}),r),(async()=>{try{a(await e)}catch(t){c(t)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{i.clearTimeout.call(void 0,s),s=void 0},a}(async function(e,t,r,n,o,i){const s=["llvm","clangformat","clangtidy"].includes(e);let a;if("vcvarsall"===e)await rr(Nt(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Pe({rcOptions:ny});else{const i=Ir(o,s?"llvm":e),c=Nt(e,t,r),u=ey[e];a=await u(c,i,n)}i.push(hr(e,a))}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(c){m(c),c instanceof Error&&void 0!==c.stack&&m(c.stack),s.push(e+" failed to install")}Co.endGroup()}async function or(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:o}=await async function(e,t){const r=[],n=[];switch(e){case"win32":yh.includes(t)?r.push("win64"):gh.includes(t)?r.push("win32"):wh.includes(t)?r.push("woa64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"linux":if(r.push("linux"),De()){n.push("ubuntu");const e=await wv();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 Ce()&&n.push("rhel");yh.includes(t)?r.push("x86_64"):gh.includes(t)?r.push("x86"):wh.includes(t)?r.push("aarch64"):Eh.includes(t)?r.push("armv7a"):_h.includes(t)?r.push("powerpc64le"):bh.includes(t)?r.push("sparc64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),yh.includes(t)?r.push("x86_64"):wh.includes(t)?n.push("arm64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),yh.includes(t)?r.push("amd64"):gh.includes(t)?r.push("i386"):(g(`Using arch ${t} for LLVM`),r.push(t));break;default:g(`Using ${e} ${t} for LLVM`),n.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),i=Ht(await Bt(Ir(zv,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:o,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==i)return`https://github.com/llvm/llvm-project/releases/download/${i.tag}/${i.name}`;const s=Ht(await Bt(Ir(zv,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:o});if(void 0!==s)return`https://llvm.org/releases/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${o}`)}(t,r,e);return g("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:qe("clang"),extractFunction:"win32"===t?yt:(e,t)=>wt(e,t,1)}}async function ir(e,t,r){const n=await Wv(e,t,r);return await async function(e,t){const r=process.env.LD_LIBRARY_PATH??"",n=process.env.DYLD_LIBRARY_PATH??"",o=ar(t),i=[ne("CC",qe(e+"/bin/clang"),ny),ne("CXX",qe(e+"/bin/clang++"),ny),ne("LLVM_PATH",e,ny),ne("LD_LIBRARY_PATH",`${r}${Tr}${e}/lib`,ny),ne("DYLD_LIBRARY_PATH",`${n}${Tr}${e}/lib`,ny),ne("LLVM_LDFLAGS","-L"+Rt(e+"/lib"),ny),ne("LLVM_CPPFLAGS","-I"+Rt(e+"/include"),ny),await Z(`${e}/lib/clang/${t}/include`)?ne("LLVM_CPATH",`${e}/lib/clang/${t}/include`,ny):await Z(`${e}/lib/clang/${o}/include`)?ne("LLVM_CPATH",`${e}/lib/clang/${o}/include`,ny):Promise.resolve(),ne("LIBRARY_PATH",e+"/lib",ny),Gt()];if(De()){const t=60;i.push(ve("cc",e+"/bin/clang",ny,t),ve("cxx",e+"/bin/clang++",ny,t),ve("clang",e+"/bin/clang",ny),ve("clang++",e+"/bin/clang++",ny),ve("lld",e+"/bin/lld",ny),ve("ld.lld",e+"/bin/ld.lld",ny),ve("llvm-ar",e+"/bin/llvm-ar",ny))}await Promise.all(i)}(n.installDir??t,e),n}async function sr(e,t,r,n=Vv.All){const o=ar(e);try{if(De())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Se([{name:"ca-certificates"}]);const n=new kd.DownloaderHelper("https://apt.llvm.org/llvm.sh",yr(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await Qr(n.getDownloadPath(),"utf-8"),i=Ir(yr(),"llvm-setup-cpp.sh"),s=await async function(e,t,r,n){let o=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);return o=function(e){return e.replace(/add-apt-repository "\${REPO_NAME}"/g,`add-apt-repository -y -n "\${REPO_NAME}"\napt-get update -o ${jd} -y`)}(o),o=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,o,r),o=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${jd} -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 x("dpkg",["-l",e],{env:ye("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(yn("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return ge()?e.replace(/apt-get/g,"nala"):e}(o),await Zr(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Se(s),await Kr(i,"755"),await U("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await ie(r+"/bin",ny),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(o,n)}catch(s){g("Failed to install llvm via system package manager "+s)}const i=await Et("llvm",e,or,t,r);return await Yv(o),i}function ar(e){const t=function(e){if(null===Cp(e))try{const t=Rf(e);if(null!==t)return g(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e);return Number.parseInt(t.split(".")[0],10)}async function cr(){if(wn.GITHUB_ACTIONS){const e=Ir(Xv,"llvm_matcher.json");if(!(await Z(e)))return v("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");g("::add-matcher::"+e)}}async function ur(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Gv(e);g(`Checking if MSVC ${s} is already installed`);let a,c,u=!1;try{const e=Hv(s);u=!0,g("Found the pre-installed version of MSVC at "+e)}catch{}if(!u)try{"14.0"===s?(a="14.0",await Ue("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 Ue("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 Ue("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 Ue("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):m(`The given MSVC versions ${e} is not supported yet.`)}catch(l){m(l)}await rr(s,c,r,a,n,o,i),wn.GITHUB_ACTIONS&&await async function(){const e=Ir(Jv,"msvc_matcher.json");if(!(await Z(e)))return v("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");g("::add-matcher::"+e)}()}function lr(e,t,r){return{url:pr(t,r,e),binRelativeDir:"",binFileName:qe("pwsh"),extractedFolderName:""}}function pr(e,t,r){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}-${{arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t]??"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}function fr(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),o=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),i="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:qe("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${o}.${i}`}}function dr(e){const t=Co.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function hr(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}import mr,{homedir as vr,tmpdir as yr}from"os";import gr,{promises as wr,mkdir as Er,stat as _r,statSync as br,mkdirSync as Or}from"fs";import Rr from"crypto";import Sr,{join as Ir,delimiter as Tr,dirname as xr,basename as Pr,extname as Ar,normalize as Nr,sep as $r,relative as Cr,resolve as Lr,parse as Dr}from"path";import*as kr from"http";import Ur from"http";import*as jr from"https";import Fr from"https";import"net";import Mr from"tls";import Gr from"events";import Br from"util";import Hr from"child_process";import qr from"assert";import Vr from"buffer";import zr from"stream";import{debuglog as Xr}from"node:util";import Wr from"node:process";import Yr,{chmod as Kr,readdir as Jr,readFile as Qr,writeFile as Zr}from"fs/promises";import{Buffer as en}from"node:buffer";import tn from"node:path";import rn,{ChildProcess as nn}from"node:child_process";import{fileURLToPath as on}from"node:url";import sn,{constants as an}from"node:os";import{createWriteStream as cn,readFileSync as un,createReadStream as ln,promises as pn}from"node:fs";import fn from"process";import dn,{fileURLToPath as hn}from"url";import mn from"string_decoder";import vn from"timers";import{info as yn}from"console";var gn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},wn={};const En=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{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:"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"}];!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=En,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,r.forEach((function(r){const o=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));if(e[r.constant]=o,o)switch(e.name=r.name,typeof r.pr){case"string":e.isPR=!!n[r.pr];break;case"object":e.isPR="env"in r.pr?r.pr.env in n&&n[r.pr.env]!==r.pr.ne:"any"in r.pr?r.pr.any.some((function(e){return!!n[e]})):t(r.pr);break;default:e.isPR=null}})),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))}(wn);var _n={},bn={},On={};Object.defineProperty(On,"__esModule",{value:!0}),On.toCommandProperties=On.toCommandValue=void 0,On.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},On.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}:{}};var Rn=gn&&gn.__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]}),Sn=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),In=gn&&gn.__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)&&Rn(t,e,r);return Sn(t,e),t};Object.defineProperty(bn,"__esModule",{value:!0}),bn.issue=bn.issueCommand=void 0;const Tn=In(mr),xn=On;bn.issueCommand=r,bn.issue=function(e,t=""){r(e,{},t)};class Pn{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 o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${t=o,xn.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 xn.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var An={};const Nn=new Uint8Array(256);let $n=Nn.length;const Cn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ln=[];for(let iy=0;256>iy;++iy)Ln.push((iy+256).toString(16).substr(1));let Dn,kn,Un=0,jn=0;const Fn=a("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Rr.createHash("md5").update(e).digest()})),Mn=a("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Rr.createHash("sha1").update(e).digest()})),Gn=Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:s,stringify:i,v1:function(e,t,r){let o=t&&r||0;const s=t||Array(16);let a=(e=e||{}).node||Dn,c=void 0!==e.clockseq?e.clockseq:kn;if(null==a||null==c){const t=e.random||(e.rng||n)();null==a&&(a=Dn=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=kn=16383&(t[6]<<8|t[7]))}let u=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:jn+1;const p=u-Un+(l-jn)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||u>Un)&&void 0===e.nsecs&&(l=0),l>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Un=u,jn=l,kn=c,u+=122192928e5;const f=(1e4*(268435455&u)+l)%4294967296;s[o++]=f>>>24&255,s[o++]=f>>>16&255,s[o++]=f>>>8&255,s[o++]=255&f;const d=u/4294967296*1e4&268435455;s[o++]=d>>>8&255,s[o++]=255&d,s[o++]=d>>>24&15|16,s[o++]=d>>>16&255,s[o++]=c>>>8|128,s[o++]=255&c;for(let n=0;6>n;++n)s[o+n]=a[n];return t||i(s)},v3:Fn,v4:function(e,t,r){const o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;16>e;++e)t[r+e]=o[e];return t}return i(o)},v5:Mn,validate:o,version:function(e){if(!o(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),Bn=t(Gn);var Hn=gn&&gn.__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]}),qn=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Vn=gn&&gn.__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)&&Hn(t,e,r);return qn(t,e),t};Object.defineProperty(An,"__esModule",{value:!0}),An.prepareKeyValueMessage=An.issueFileCommand=void 0;const zn=Vn(gr),Xn=Vn(mr),Wn=Bn,Yn=On;An.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!zn.existsSync(r))throw Error("Missing file at path: "+r);zn.appendFileSync(r,`${Yn.toCommandValue(t)}${Xn.EOL}`,{encoding:"utf8"})},An.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+Wn.v4(),n=Yn.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}${Xn.EOL}${n}${Xn.EOL}${r}`};var Kn={};class Jn 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 Qn,Zn={},eo=Mr,to=Ur,ro=Fr,no=Gr,oo=Br;Zn.httpOverHttp=function(e){var t=new u(e);return t.request=to.request,t},Zn.httpsOverHttp=function(e){var t=new u(e);return t.request=to.request,t.createSocket=l,t.defaultPort=443,t},Zn.httpOverHttps=function(e){var t=new u(e);return t.request=ro.request,t},Zn.httpsOverHttps=function(e){var t=new u(e);return t.request=ro.request,t.createSocket=l,t.defaultPort=443,t},oo.inherits(u,no.EventEmitter),u.prototype.addRequest=function(e,t,r,n){var o=this,i=f({request:e},o.options,p(t,r,n));this.maxSockets>o.sockets.length?o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.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)})):o.requests.push(i)},u.prototype.createSocket=function(e,t){function r(r,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==r.statusCode?(Qn("tunneling socket could not be established, statusCode=%d",r.statusCode),i.destroy(),(c=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):a.length>0?(Qn("got illegal response body from proxy"),i.destroy(),(c=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):(Qn("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=i,t(i))}var n=this,o={};n.sockets.push(o);var i=f({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),Qn("making CONNECT request");var s=n.request(i);s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),s.once("connect",r),s.once("error",(function(t){s.removeAllListeners(),Qn("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),n.removeSocket(o)})),s.end()},u.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)}))}},Qn=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(){},Zn.debug=Qn;var io,so,ao,co,uo,lo=Zn;(so=io||(io={}))[so.OK=200]="OK",so[so.MultipleChoices=300]="MultipleChoices",so[so.MovedPermanently=301]="MovedPermanently",so[so.ResourceMoved=302]="ResourceMoved",so[so.SeeOther=303]="SeeOther",so[so.NotModified=304]="NotModified",so[so.UseProxy=305]="UseProxy",so[so.SwitchProxy=306]="SwitchProxy",so[so.TemporaryRedirect=307]="TemporaryRedirect",so[so.PermanentRedirect=308]="PermanentRedirect",so[so.BadRequest=400]="BadRequest",so[so.Unauthorized=401]="Unauthorized",so[so.PaymentRequired=402]="PaymentRequired",so[so.Forbidden=403]="Forbidden",so[so.NotFound=404]="NotFound",so[so.MethodNotAllowed=405]="MethodNotAllowed",so[so.NotAcceptable=406]="NotAcceptable",so[so.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",so[so.RequestTimeout=408]="RequestTimeout",so[so.Conflict=409]="Conflict",so[so.Gone=410]="Gone",so[so.TooManyRequests=429]="TooManyRequests",so[so.InternalServerError=500]="InternalServerError",so[so.NotImplemented=501]="NotImplemented",so[so.BadGateway=502]="BadGateway",so[so.ServiceUnavailable=503]="ServiceUnavailable",so[so.GatewayTimeout=504]="GatewayTimeout",(co=ao||(ao={})).Accept="accept",co.ContentType="content-type",(uo||(uo={})).ApplicationJson="application/json";const po=[io.MovedPermanently,io.ResourceMoved,io.SeeOther,io.TemporaryRedirect,io.PermanentRedirect],fo=[io.BadGateway,io.ServiceUnavailable,io.GatewayTimeout],ho=["OPTIONS","GET","DELETE","HEAD"];class mo extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,mo.prototype)}statusCode;result}class vo{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))}))}))}}const yo=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),go=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return ao},HttpClient:class{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[ao.Accept]=this._getExistingOrDefaultHeader(t,ao.Accept,uo.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[ao.Accept]=this._getExistingOrDefaultHeader(r,ao.Accept,uo.ApplicationJson),r[ao.ContentType]=this._getExistingOrDefaultHeader(r,ao.ContentType,uo.ApplicationJson);const o=await this.post(e,n,r);return this._processResponse(o,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[ao.Accept]=this._getExistingOrDefaultHeader(r,ao.Accept,uo.ApplicationJson),r[ao.ContentType]=this._getExistingOrDefaultHeader(r,ao.ContentType,uo.ApplicationJson);const o=await this.put(e,n,r);return this._processResponse(o,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[ao.Accept]=this._getExistingOrDefaultHeader(r,ao.Accept,uo.ApplicationJson),r[ao.ContentType]=this._getExistingOrDefaultHeader(r,ao.ContentType,uo.ApplicationJson);const o=await this.patch(e,n,r);return this._processResponse(o,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const o=new URL(t);let i=this._prepareRequest(e,o,n);const s=this._allowRetries&&ho.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===io.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,i,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&po.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===o.protocol&&o.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!==o.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];i=this._prepareRequest(e,c,n),a=await this.requestRaw(i,r),t--}if(!a.message.statusCode||!fo.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){o||(o=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let o=!1;const i=e.httpModule.request(e.options,(e=>{n(void 0,new vo(e))}));let s;i.on("socket",(e=>{s=e})),i.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),i.on("error",(function(e){n(e)})),t&&"string"==typeof t&&i.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){i.end()})),t.pipe(i)):i.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=c(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o="https:"===n.parsedUrl.protocol;n.httpModule=o?jr:kr;const i=o?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i,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({},yo(this.requestOptions.headers),yo(e||{})):yo(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=yo(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=c(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 i=100;if(this.requestOptions&&(i=this.requestOptions.maxSockets||kr.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const s="https:"===r.protocol;n=o?s?lo.httpsOverHttps:lo.httpsOverHttp:s?lo.httpOverHttps:lo.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new jr.Agent(e):new kr.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 import("./assets/proxy-agent-CtreyBpw.mjs").then((e=>e.p)))({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 o=e.message.statusCode||0,i={statusCode:o,result:null,headers:{}};let s,a;o===io.NotFound&&r(i);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),i.result=s),i.headers=e.message.headers}catch(c){}if(o>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${o})`;const t=new mo(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:mo,HttpClientResponse:vo,get HttpCodes(){return io},get MediaTypes(){return uo},getProxyUrl:function(e){const t=c(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})),wo=t(go);var Eo,_o={},bo=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(_o,"__esModule",{value:!0}),_o.PersonalAccessTokenCredentialHandler=_o.BearerCredentialHandler=_o.BasicCredentialHandler=void 0,_o.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 bo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},_o.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 bo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},_o.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 bo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var Oo,Ro,So,Io,To,xo,Po,Ao,No={},$o={},Co=h(),Lo={exports:{}};Ao="win32"===process.platform||gn.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 o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function t(t,n,o){r.stat(t,(function(r,i){o(r,!r&&e(i,t,n))}))}if(To)return Io;To=1,Io=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=gr;return Io}():function(){function e(e,n,o){r.stat(e,(function(e,r){o(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=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&&o===s||r&a&&n===i||r&u&&0===i}(e,t)}if(Po)return xo;Po=1,xo=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=gr;return xo}();var Do=w;w.sync=function(e,t){try{return Ao.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const ko="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,Uo=Sr,jo=ko?";":":",Fo=Do,Mo=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Go=(e,t)=>{const r=t.colon||jo,n=e.match(/\//)||ko&&e.match(/\\/)?[""]:[...ko?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=ko?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=ko?o.split(r):[""];return ko&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},Bo=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=Go(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(Mo(e));const a=n[r],u=/^".*"$/.test(a)?a.slice(1,-1):a,l=Uo.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;o(c(p,r,0))})),c=(e,r,n)=>new Promise(((u,l)=>{if(n===o.length)return u(a(r+1));const p=o[n];Fo(e+p,{pathExt:i},((o,i)=>{if(!o&&i){if(!t.all)return u(e+p);s.push(e+p)}return u(c(e,r,n+1))}))}));return r?a(0).then((e=>r(null,e)),r):a(0)};var Ho=Bo;Bo.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=Go(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,l=Uo.join(u,e),p=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let e=0;n.length>e;e++){const r=p+n[e];try{if(Fo.sync(r,{pathExt:o})){if(!t.all)return r;i.push(r)}}catch(s){}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Mo(e)};var qo={exports:{}};const Vo=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};qo.exports=Vo,qo.exports.default=Vo;const zo=Sr,Xo=Ho,Wo=qo.exports;var Yo={};const Ko=/([()\][%!^"`<>&|;, *?])/g;Yo.command=function(e){return e.replace(Ko,"^$1")},Yo.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Ko,"^$1"),t&&(e=e.replace(Ko,"^$1")),e};const Jo=/^#!(.*)/,Qo=gr,Zo=Sr,ei=function(e){return E(e)||E(e,!0)},ti=Yo,ri=function(e){const t=Buffer.alloc(150);let r;try{r=Qo.openSync(e,"r"),Qo.readSync(r,t,0,150,0),Qo.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(Jo);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},ni="win32"===process.platform,oi=/\.(?:com|exe)$/i,ii=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,si="win32"===process.platform,ai=Hr,ci=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:function(e){if(!ni)return e;const t=function(e){e.file=ei(e);const t=e.file&&ri(e.file);return t?(e.args.unshift(e.file),e.command=t,ei(e)):e.file}(e),r=!oi.test(t);if(e.options.forceShell||r){const r=ii.test(t);e.command=Zo.normalize(e.command),e.command=ti.command(e.command),e.args=e.args.map((e=>ti.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(n)},ui={hookChildProcess:function(e,t){if(!si)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=b(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:b,verifyENOENTSync:function(e,t){return si&&1===e&&!t.file?_(t.original,"spawnSync"):null},notFoundError:_};Lo.exports=O,Lo.exports.spawn=O,Lo.exports.sync=function(e,t,r){const n=ci(e,t,r),o=ai.spawnSync(n.command,n.args,n.options);return o.error=o.error||ui.verifyENOENTSync(o.status,n),o},Lo.exports._parse=ci,Lo.exports._enoent=ui;const li=e(Lo.exports),pi=({env:e=Wr.env,...t}={})=>{const r=R({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Wr.cwd(),path:t=Wr.env[R()],preferLocal:r=!0,execPath:n=Wr.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?on(e):e,s=tn.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(tn.join(t,"node_modules/.bin")),r=t,t=tn.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?on(t):t;e.push(tn.resolve(r,n,".."))})(a,n,s),[...a,t].join(tn.delimiter)})(t),e},fi=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const o=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!di(o,i)&&n||Object.defineProperty(e,r,i)},di=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)},hi=(e,t)=>`/* Wrapped ${e}*/\n${t}`,mi=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),vi=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),yi=new WeakMap,gi=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const o=e.displayName||e.name||"",i=function(...s){if(yi.set(i,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${o}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const o of Reflect.ownKeys(t))fi(e,t,o,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()}() `,o=hi.bind(null,n,""+t);Object.defineProperty(o,"name",vi),Object.defineProperty(e,"toString",{...mi,value:o})})(e,t,n)}(i,e),yi.set(i,n),i};gi.callCount=e=>{if(!yi.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return yi.get(e)};const wi=(e,t)=>({name:"SIGRT"+(t+1),number:Ei+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Ei=34,_i=[{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"}],bi=()=>{const e=Array.from({length:64-Ei+1},wi);return[..._i,...e].map(Oi)},Oi=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=an,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},Ri=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Si=(()=>{const e=bi();return Object.fromEntries(e.map(Ri))})(),Ii=(e,t)=>{const r=t.find((({name:t})=>an.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=bi(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Ii(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const Ti=({stdout:e,stderr:t,all:r,error:n,signal:o,exitCode:i,command:s,escapedCommand:a,timedOut:c,isCanceled:u,killed:l,parsed:{options:{timeout:p,cwd:f=Wr.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:Si[o].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?"failed with exit code "+i:"failed")({timedOut:c,timeout:p,errorCode:n&&n.code,signal:o,signalDescription:d,exitCode:i=null===i?void 0:i,isCanceled:u}),m=`Command ${h}: ${s}`,v="[object Error]"==={}.toString.call(n),y=v?`${m}\n${n.message}`:m,g=[y,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=g):n=Error(g),n.shortMessage=y,n.command=s,n.escapedCommand=a,n.exitCode=i,n.signal=o,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=f,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},xi=["stdin","stdout","stderr"];var Pi,Ai={exports:{}},Ni={exports:{}},$i=gn.process;const Ci=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(Ci($i)){var Li,Di=qr,ki=(Pi||(Pi=1,(Wi=Ni).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&Wi.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&Wi.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Ni.exports),Ui=/^win/i.test($i.platform),ji=Gr;"function"!=typeof ji&&(ji=ji.EventEmitter),$i.__signal_exit_emitter__?Li=$i.__signal_exit_emitter__:((Li=$i.__signal_exit_emitter__=new ji).count=0,Li.emitted={}),Li.infinite||(Li.setMaxListeners(1/0),Li.infinite=!0),Ai.exports=function(e,t){if(!Ci(gn.process))return function(){};Di.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Bi&&Hi();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),Li.on(r,e),function(){Li.removeListener(r,e),0===Li.listeners("exit").length&&0===Li.listeners("afterexit").length&&Fi()}};var Fi=function(){Bi&&Ci(gn.process)&&(Bi=!1,ki.forEach((function(e){try{$i.removeListener(e,Gi[e])}catch(t){}})),$i.emit=zi,$i.reallyExit=qi,Li.count-=1)};Ai.exports.unload=Fi;var Mi=function(e,t,r){Li.emitted[e]||(Li.emitted[e]=!0,Li.emit(e,t,r))},Gi={};ki.forEach((function(e){Gi[e]=function(){Ci(gn.process)&&$i.listeners(e).length===Li.count&&(Fi(),Mi("exit",null,e),Mi("afterexit",null,e),Ui&&"SIGHUP"===e&&(e="SIGINT"),$i.kill($i.pid,e))}})),Ai.exports.signals=function(){return ki};var Bi=!1,Hi=function(){!Bi&&Ci(gn.process)&&(Bi=!0,Li.count+=1,ki=ki.filter((function(e){try{return $i.on(e,Gi[e]),!0}catch(t){return!1}})),$i.emit=Xi,$i.reallyExit=Vi)};Ai.exports.load=Hi;var qi=$i.reallyExit,Vi=function(e){Ci(gn.process)&&($i.exitCode=e||0,Mi("exit",$i.exitCode,null),Mi("afterexit",$i.exitCode,null),qi.call($i,$i.exitCode))},zi=$i.emit,Xi=function(e,t){if("exit"===e&&Ci(gn.process)){void 0!==t&&($i.exitCode=t);var r=zi.apply(this,arguments);return Mi("exit",$i.exitCode,null),Mi("afterexit",$i.exitCode,null),r}return zi.apply(this,arguments)}}else Ai.exports=function(){return function(){}};var Wi;const Yi=e(Ai.exports),Ki=(e,t="SIGTERM",r={})=>{const n=e(t);return Ji(e,t,r,n),n},Ji=(e,t,r,n)=>{if(!Qi(t,r,n))return;const o=es(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},Qi=(e,{forceKillAfterTimeout:t},r)=>Zi(e)&&!1!==t&&r,Zi=e=>e===sn.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),es=({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},ts=(e,t)=>{e.kill()&&(t.isCanceled=!0)},rs=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(cn(r)),e;if(I(r))return e[t].pipe(r),e;if(!(e=>e instanceof nn&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!I(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var ns={exports:{}};const{PassThrough:os}=zr,{constants:is}=Vr,ss=zr,{promisify:as}=Br,cs=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new os({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",(e=>{a.push(e),o?s=a.length:s+=e.length})),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i},us=as(ss.pipeline);class ls extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}ns.exports=T,ns.exports.buffer=(e,t)=>T(e,{...t,encoding:"buffer"}),ns.exports.array=(e,t)=>T(e,{...t,array:!0}),ns.exports.MaxBufferError=ls;const ps=e(ns.exports),{PassThrough:fs}=zr,ds=e((function(){function e(o){return Array.isArray(o)?(o.forEach(e),this):(r.push(o),o.once("end",t.bind(null,o)),o.once("error",n.emit.bind(n,"error")),o.pipe(n,{end:!1}),this)}function t(e){!(r=r.filter((function(t){return t!==e}))).length&&n.readable&&n.end()}var r=[],n=new fs({objectMode:!0});return n.setMaxListeners(0),n.add=e,n.isEmpty=function(){return 0==r.length},n.on("unpipe",t),[].slice.call(arguments).forEach(e),n})),hs=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},ms=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},vs=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?ps(e,{encoding:t,maxBuffer:n}):ps.buffer(e,{maxBuffer:n})},ys=(async()=>{})().constructor.prototype,gs=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(ys,e)])),ws=(e,t)=>{for(const[r,n]of gs){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Es=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],_s=/^[\w.-]+$/,bs=/"/g,Os=(e,t)=>Es(e,t).join(" "),Rs=(e,t)=>Es(e,t).map((e=>(e=>"string"!=typeof e||_s.test(e)?e:`"${e.replace(bs,'\\"')}"`)(e))).join(" "),Ss=/ +/g,Is=e=>{const t=[];for(const r of e.trim().split(Ss)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},Ts=Xr("execa").enabled,xs=(e,t)=>(e+"").padStart(t,"0"),Ps=(e,{verbose:t})=>{t&&Wr.stderr.write(`[${(()=>{const e=new Date;return`${xs(e.getHours(),2)}:${xs(e.getMinutes(),2)}:${xs(e.getSeconds(),2)}.${xs(e.getMilliseconds(),3)}`})()}] ${e}\n`)},As=(e,t,r={})=>{const n=li._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||Wr.cwd(),execPath:Wr.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Ts,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...Wr.env,...e}:e;return r?pi({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return xi.map((t=>e[t]));if((e=>xi.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+xi.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,xi.length)},((e,r)=>t[r]))})(r),"win32"===Wr.platform&&"cmd"===tn.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},Ns=(e,t,r)=>"string"==typeof t||en.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 $s={},Cs={};Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.sync=Cs.isexe=void 0;const Ls=gr,Ds=Yr;Cs.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ks(await(0,Ds.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Cs.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return ks((0,Ls.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const ks=(e,t)=>e.isFile()&&Us(e,t),Us=(e,t)=>{const r=t.uid??process.getuid?.(),n=t.groups??process.getgroups?.()??[],o=t.gid??process.getgid?.()??n[0];if(void 0===r||void 0===o)throw Error("cannot get uid or gid");const i=new Set([o,...n]),s=e.mode,a=e.uid,c=e.gid,u=parseInt("100",8),l=parseInt("010",8),p=u|l;return!!(s&parseInt("001",8)||s&l&&i.has(c)||s&u&&a===r||s&p&&0===r)};var js={};Object.defineProperty(js,"__esModule",{value:!0}),js.sync=js.isexe=void 0;const Fs=gr,Ms=Yr;js.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Gs(await(0,Ms.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},js.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Gs((0,Fs.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Gs=(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 o=0;n.length>o;o++){const t=n[o].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);var Bs={};Object.defineProperty(Bs,"__esModule",{value:!0}),function(e){var t=gn&&gn.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=gn&&gn.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=gn&&gn.__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 i=n(Cs);e.posix=i;const s=n(js);e.win32=s,o(Bs,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}($s);const{isexe:Hs,sync:qs}=$s,{join:Vs,delimiter:zs,sep:Xs,posix:Ws}=Sr,Ys="win32"===process.platform,Ks=RegExp(`[${Ws.sep}${Xs===Ws.sep?"":Xs}]`.replace(/(\\)/g,"\\$1")),Js=RegExp("^\\."+Ks.source),Qs=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Zs=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=zs})=>{const o=e.match(Ks)?[""]:[...Ys?[process.cwd()]:[],...(t||"").split(n)];if(Ys){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),i=t.split(n).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==i[0]&&i.unshift(""),{pathEnv:o,pathExt:i,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},ea=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&Js.test(t)?t.slice(0,2):"")+Vs(r,t)},ta=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=Zs(e,t),i=[];for(const s of r){const r=ea(s,e);for(const e of n){const n=r+e;if(await Hs(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Qs(e)};var ra=ta;ta.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=Zs(e,t),i=[];for(const s of r){const r=ea(s,e);for(const e of n){const n=r+e;if(qs(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Qs(e)};const na=e(ra);let oa;var ia,sa={};N(sa,"hasSudo",(()=>$)),N(sa,"isRoot",(()=>C)),N(sa,"isSudo",(()=>L)),N(sa,"prependSudo",(()=>D)),N(sa,"defaultExecOptions",(()=>aa)),N(sa,"execRootSync",(()=>k)),N(sa,"execRoot",(()=>U));let aa={stdio:"inherit",shell:!0};N(ia={},"isAdminWindows",(()=>ca)),N(ia,"isAdminPosix",(()=>ua)),N(ia,"isAdmin",(()=>M));let ca=async function(){if("win32"!==process.platform)return!1;try{return await x("fsutil",["dirty","query",process.env.systemdrive??""]),!0}catch(e){return"ENOENT"===e.code&&async function(){try{return await x("fltmc"),!0}catch{return!1}}()}},ua=C;N({},"grantUserWriteAccess",(()=>G));var la,pa,fa,da,ha,ma,va,ya,ga,wa,Ea,_a,ba,Oa,Ra=function(e){return null!=e},Sa=Ra,Ia=[].forEach,Ta=Object.create,xa=function(e){var t=Ta(null);return Ia.call(arguments,(function(e){Sa(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},Pa="function"==typeof(fa=Math.sign)&&1===fa(10)&&-1===fa(-20)?Math.sign:pa?la:(pa=1,la=function(e){return isNaN(e=+e)||0===e?e:e>0?1:-1}),Aa=Math.abs,Na=Math.floor,$a=Math.max,Ca=function(e){return $a(0,function(e){return isNaN(e)?0:0!=(e=+e)&&isFinite(e)?Pa(e)*Na(Aa(e)):e}(e))},La=Ca,Da=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&La(e)},ka=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},Ua=Ra,ja=function(e){if(!Ua(e))throw new TypeError("Cannot use null or undefined");return e},Fa=ka,Ma=ja,Ga=function(){}.bind,Ba=function(){}.call,Ha=Object.keys,qa={}.propertyIsEnumerable,Va=(da="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(Ma(e)),Fa(t),r=Ha(e),o&&r.sort("function"==typeof o?Ga.call(o,e):void 0),"function"!=typeof da&&(da=r[da]),Ba.call(da,r,(function(r,o){return qa.call(e,r)?Ba.call(t,n,e[r],r,e,o):undefined}))}),za={},Xa={exports:{}},Wa="function"==typeof(Oa=Object.assign)&&(Oa(ba={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),ba.foo+ba.bar+ba.trzy==="razdwatrzy")?Object.assign:function(){if(_a)return Ea;_a=1;var e=wa?ga:(wa=1,ga=(ma?ha:(ma=1,ha=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(ya)return va;ya=1;var e=Ra,t=Object.keys;return va=function(r){return t(e(r)?Object(r):r)}}()),t=ja,r=Math.max;return Ea=function(n,o){var i,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=o[e]}catch(t){i||(i=t)}},s=1;c>s;++s)e(o=arguments[s]).forEach(a);if(void 0!==i)throw i;return n},Ea}(),Ya=Ra,Ka={function:!0,object:!0},Ja=function(e){return Ya(e)&&Ka[typeof e]||!1};!function(e){var t=Wa,r=Ja,n=Ra,o=Error.captureStackTrace;e.exports=function(i){var s=Error(i),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),o&&o(s,e.exports),s}}(Xa);var Qa,Za,ec,tc,rc=Xa.exports,nc={exports:{}},oc=Ca;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(oy){}tc=B(),ec=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); };")}}(),nc.exports=function(e,t){var r;if(t=oc(t),e.length===t)return e;r=ec(t)(e);try{tc(r,e)}catch(oy){}return r};var ic,sc,ac=nc.exports,cc={exports:{}},uc=function(e){return null!=e},lc=uc,pc={object:!0,function:!0,undefined:!0},fc=function(e){if(!function(e){return!!lc(e)&&hasOwnProperty.call(pc,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},dc=/^\s*class[\s{/}]/,hc=function(){}.toString,mc="razdwatrzy",vc="function"==typeof mc.contains&&!0===mc.contains("dwa")&&!1===mc.contains("foo")?"".contains:function(){if(sc)return ic;sc=1;var e="".indexOf;return ic=function(t){return e.call(this,t,arguments[1])>-1}}(),yc=uc,gc=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!fc(e)}(e)&&!dc.test(hc.call(e))},wc=Wa,Ec=xa,_c=vc;(cc.exports=function(e,t){var r,n,o,i,s;return 2>arguments.length||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],yc(e)?(r=_c.call(e,"c"),n=_c.call(e,"e"),o=_c.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?wc(Ec(i),s):s}).gs=function(e,t,r){var n,o,i,s;return"string"!=typeof e?(i=r,r=t,t=e,e=null):i=arguments[3],yc(t)?gc(t)?yc(r)?gc(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,yc(e)?(n=_c.call(e,"c"),o=_c.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?wc(Ec(i),s):s};var bc=cc.exports,Oc={exports:{}};!function(e,t){var r,n,o,i,s,a,c,u=bc,l=ka,p=function(){}.apply,f=function(){}.call,d=Object.create,h=Object.defineProperty,m=Object.defineProperties,v={}.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n,i;return l(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),p.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(l(t),!v.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:n.splice(i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},i=function(e){var t,r,n,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;n=o[t];++t)p.call(n,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];p.call(o,this,i)}},s={on:r=function(e,t){var r;return l(t),v.call(this,"__ee__")?r=this.__ee__:(r=y.value=d(null),h(this,"__ee__",y),y.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:o,emit:i},a={on:u(r),once:u(n),off:u(o),emit:u(i)},c=m({},a),e.exports=t=function(e){return null==e?d(c):m(Object(e),a)},t.methods=s}(Oc,Oc.exports);var Rc,Sc,Ic,Tc,xc,Pc,Ac,Nc,$c,Cc,Lc,Dc,kc,Uc,jc,Fc,Mc,Gc,Bc,Hc,qc,Vc,zc,Xc,Wc,Yc,Kc,Jc,Qc,Zc,eu,tu,ru,nu,ou,iu=Oc.exports,su=z(),au=Array.isArray,cu=Ra,uu=ka,lu=[].slice;ou=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(lu.call(e,this.length))};var pu,fu,du,hu,mu,vu,yu,gu,wu,Eu,_u,bu,Ou,Ru,Su,Iu,Tu,xu,Pu,Au,Nu,$u,Cu,Lu,Du,ku,Uu,ju,Fu,Mu,Gu,Bu,Hu,qu,Vu,zu,Xu,Wu,Yu,Ku,Ju,Qu,Zu,el,tl,rl,nl,ol=ka,il=rc,sl=ac,al=bc,cl=iu.methods,ul=function(e){return(t=e,e=au(t)?t:su(t)).forEach((function(e){cu(e)&&uu(e)})),ou.bind(e);var t},ll=function(){}.apply,pl=function(){}.call,fl=Object.create,dl=Object.defineProperties,hl=cl.on,ml=cl.emit,vl=ka,yl=Va,gl=za,wl=function(e,t,r){var n,o,i,s,a,c,u,l,p,f,d,h,m,v,y,g=fl(null);return o=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(f=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:ol(e.get)},void 0!==e.set?(t.set=ol(e.set),e.delete&&(t.delete=ol(e.delete)),e.clear&&(t.clear=ol(e.clear)),t):(t.set=t.get,t))}(r.normalizer),i=f.get,s=f.set,a=f.delete,c=f.clear),null!=r.resolvers&&(y=ul(r.resolvers)),v=i?sl((function(t){var r,o,a=arguments;if(y&&(a=y(a)),null!==(r=i(a))&&hasOwnProperty.call(g,r))return d&&n.emit("get",r,a,this),g[r];if(o=1===a.length?pl.call(e,this,a[0]):ll.call(e,this,a),null===r){if(null!==(r=i(a)))throw il("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(g,r))throw il("Circular invocation","CIRCULAR_INVOCATION");return g[r]=o,h&&n.emit("set",r,null,o),o}),o):0===t?function(){var t;if(hasOwnProperty.call(g,"data"))return d&&n.emit("get","data",arguments,this),g.data;if(t=arguments.length?ll.call(e,this,arguments):pl.call(e,this),hasOwnProperty.call(g,"data"))throw il("Circular invocation","CIRCULAR_INVOCATION");return g.data=t,h&&n.emit("set","data",null,t),t}:function(t){var r,o,i=arguments;if(y&&(i=y(arguments)),o=i[0]+"",hasOwnProperty.call(g,o))return d&&n.emit("get",o,i,this),g[o];if(r=1===i.length?pl.call(e,this,i[0]):ll.call(e,this,i),hasOwnProperty.call(g,o))throw il("Circular invocation","CIRCULAR_INVOCATION");return g[o]=r,h&&n.emit("set",o,null,r),r},n={original:e,memoized:v,profileName:r.profileName,get:function(e){return y&&(e=y(e)),i?i(e):e[0]+""},has:function(e){return hasOwnProperty.call(g,e)},delete:function(e){var t;hasOwnProperty.call(g,e)&&(a&&a(e),t=g[e],delete g[e],m&&n.emit("delete",e,t))},clear:function(){var e=g;c&&c(),g=fl(null),n.emit("clear",e)},on:function(e,t){return"get"===e?d=!0:"set"===e?h=!0:"delete"===e&&(m=!0),hl.call(this,e,t)},emit:ml,updateEnv:function(){e=n.original}},u=i?sl((function(e){var t,r=arguments;y&&(r=y(r)),null!==(t=i(r))&&n.delete(t)}),o):0===t?function(){return n.delete("data")}:function(e){return y&&(e=y(arguments)[0]),n.delete(e)},l=sl((function(){var e,r=arguments;return 0===t?g.data:(y&&(r=y(r)),e=i?i(r):r[0]+"",g[e])})),p=sl((function(){var e,r=arguments;return 0===t?n.has("data"):(y&&(r=y(r)),null!==(e=i?i(r):r[0]+"")&&n.has(e))})),dl(v,{__memoized__:al(!0),delete:al(u),clear:al(n.clear),_get:al(l),_has:al(p)}),n},El=Da,_l={},bl={},Ol={exports:{}},Rl={},Sl={},Il={},Tl={},xl=xa,Pl=Da,Al=function e(t){var r,n,o;if(vl(t),(r=Object(arguments[1])).async&&r.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(n=El(r.length,t.length,r.async&&gl.async),o=wl(t,n,r),yl(gl,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},Nl=function(e){var t,r=xl(arguments[1]);return r.normalizer||0!==(t=r.length=Pl(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(fu||(fu=1,pu=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),pu):t>1&&(r.normalizer=(hu||(hu=1,du=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),du)(t)):r.normalizer=!1===t?function(){if(Ru)return Ou;Ru=1;var e=X(),t=Object.create;return Ou=function(){var r=0,n=[],o=t(null);return{get:function(t){var r,o=0,i=n,s=t.length;if(0===s)return i[s]||null;if(i=i[s]){for(;s-1>o;){if(-1===(r=e.call(i[0],t[o])))return null;i=i[1][r],++o}return-1===(r=e.call(i[0],t[o]))?null:i[1][r]||null}return null},set:function(t){var i,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===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][i],++s;-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1),a[1][i]=++r}return o[r]=t,r},delete:function(t){var r,i=0,s=n,a=o[t],c=a.length,u=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>i;){if(-1===(r=e.call(s[0],a[i])))return;u.push(s,r),s=s[1][r],++i}if(-1===(r=e.call(s[0],a[i])))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 o[t]},clear:function(){n=[],o=t(null)}}},Ou}()():1===t?function(){if(Iu)return Su;Iu=1;var e=X();return Su=function(){var t=0,r=[],n=[];return{get:function(t){var o=e.call(r,t[0]);return-1===o?null:n[o]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var o=e.call(n,t);-1!==o&&(r.splice(o,1),n.splice(o,1))},clear:function(){r=[],n=[]}}}}()():function(){if(xu)return Tu;xu=1;var e=X(),t=Object.create;return Tu=function(r){var n=0,o=[[],[]],i=t(null);return{get:function(t){for(var n,i=0,s=o;r-1>i;){if(-1===(n=e.call(s[0],t[i])))return null;s=s[1][n],++i}return-1===(n=e.call(s[0],t[i]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=o;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,i[n]=t,n},delete:function(t){for(var n,s=0,a=o,c=[],u=i[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 i[t]}},clear:function(){o=[[],[]],i=t(null)}}},Tu}()(t)),r.async&&function(){if(Cu)return _l;Cu=1;var e=z(),t=W(),r=B(),n=ac,o=Y(),i=[].slice,s=function(){}.apply,a=Object.create;za.async=function(c,u){var l,p,f,d=a(null),h=a(null),m=u.memoized,v=u.original;u.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(l=r,t=i.call(t,0,-1)),m.apply(p=this,f=t)}),m);try{r(u.memoized,m)}catch(oy){}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=p,n=f,l=p=f=null,o((function(){var o;hasOwnProperty.call(h,e)?(o=h[e],u.emit("getasync",e,n,r),s.call(t,o.context,o.args)):(l=t,p=r,f=n,m.apply(r,n))}))}})),u.original=function(){var t,r,n,i;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?i=s.call(n,this,a):n.forEach((function(e){i=s.call(e,this,a)}),this),i}else o(s.bind(t,this,arguments))},n=l,l=p=f=null,t.push(r),i=s.call(v,this,t),r.cb=n,l=r,i):s.call(v,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,i.call(t.args,1)))})),u.on("clear",(function(){var e=h;h=a(null),u.emit("clearasync",t(e,(function(e){return i.call(e.args,1)})))}))}}(),r.promise&&Q(),r.dispose&&function(){if(Wu)return Rl;Wu=1;var e=ka,t=Va,r=za,n=function(){}.apply;r.dispose=function(o,i,s){var a;if(e(o),s.async&&r.async||s.promise&&r.promise)return i.on("deleteasync",a=function(e,t){n.call(o,null,t)}),void i.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));i.on("delete",a=function(e,t){o(t)}),i.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),r.maxAge&&function(){if(Zu)return Sl;Zu=1;var e=z(),t=Va,r=Y(),n=J(),o=function(){if(Qu)return Ju;Qu=1;var e=Ca,t=Ku?Yu:(Ku=1,Yu=2147483647);return Ju=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),i=za,s=Function.prototype,a=Math.max,c=Math.min,u=Object.create;i.maxAge=function(l,p,f){var d,h,m,v;(l=o(l))&&(d=u(null),p.on("set"+(h=f.async&&i.async||f.promise&&i.promise?"async":""),(function(e){d[e]=setTimeout((function(){p.delete(e)}),l),"function"==typeof d[e].unref&&d[e].unref(),v&&(v[e]&&"nextTick"!==v[e]&&clearTimeout(v[e]),v[e]=setTimeout((function(){delete v[e]}),m),"function"==typeof v[e].unref&&v[e].unref())})),p.on("delete"+h,(function(e){clearTimeout(d[e]),delete d[e],v&&("nextTick"!==v[e]&&clearTimeout(v[e]),delete v[e])})),f.preFetch&&(m=!0===f.preFetch||isNaN(f.preFetch)?.333:a(c(+f.preFetch,1),0))&&(v={},m=(1-m)*l,p.on("get"+h,(function(t,o,i){v[t]||(v[t]="nextTick",r((function(){var r;"nextTick"===v[t]&&(delete v[t],p.delete(t),f.async&&(o=e(o)).push(s),r=p.memoized.apply(i,o),f.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),p.on("clear"+h,(function(){t(d,(function(e){clearTimeout(e)})),d={},v&&(t(v,(function(e){"nextTick"!==e&&clearTimeout(e)})),v={})})))}}(),r.max&&function(){if(rl)return Il;rl=1;var e=Ca,t=function(){if(tl)return el;tl=1;var e=Ca,t=Object.create,r={}.hasOwnProperty;return el=function(n){var o,i=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(++i,n>=i)return;return o(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:o=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--i,s===t)){if(!i)return u=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){i=0,s=1,a=t(null),c=t(null),u=0}}}}(),r=za;r.max=function(n,o,i){var s,a,c;(n=e(n))&&(a=t(n),o.on("set"+(s=i.async&&r.async||i.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&o.delete(e)}),o.on("get"+s,c),o.on("delete"+s,a.delete),o.on("clear"+s,a.clear))}}(),r.refCounter&&function(){if(nl)return Tl;nl=1;var e=bc,t=za,r=Object.create,n=Object.defineProperties;t.refCounter=function(o,i,s){var a,c;a=r(null),i.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),i.on("get"+c,(function(e){++a[e]})),i.on("delete"+c,(function(e){delete a[e]})),i.on("clear"+c,(function(){a={}})),n(i.memoized,{deleteRef:e((function(){var e=i.get(arguments);return null===e?null:a[e]?! --a[e]&&(i.delete(e),!0):null})),getRefCount:e((function(){var e=i.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),Al(e,r)};const $l=e(Nl),Cl=/^~(?=$|\/|\\)/,{appendFile:Ll,readFile:Dl,writeFile:kl}=wr,Ul=ee("~/.bashrc"),jl=$l((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([te(e),re(t,ee("~/.bashrc")),re(t,ee("~/.profile"))])}catch(r){v(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0}),Fl=mr,Ml="win32"!==Fl.platform(),Gl=Fl.release(),Bl=/(\d+\.\d+)\.(\d+)/,Hl=e((function(e){return Ml?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&+t>=17134.1184)(...Bl.exec(Gl).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var ql,Vl,zl,Xl,Wl={exports:{}};zl=function(){if(Vl)return ql;Vl=1;var e=/[|\\{}()[\]^$+*?.]/g;return ql=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),Xl=function(e){return e.split("").reverse().join("")},Wl.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+zl(t)+"])(?!"+zl(r)+")","g"),Xl(Xl(e).replace(n,"$1"+r)))};const Yl=e(Wl.exports),{appendFile:Kl}=wr,{appendFile:Jl}=wr,Ql=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var Zl={exports:{}};!function(e){!function(){function t(e,t,o){if(r(e),"object"!=typeof o)throw Error("List of variants should be specified as an object");var i=n[e](t);return void 0!==o[i]?o[i]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{ae(__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}}()}(Zl);var ep=Zl.exports,tp=ep,rp={};ep.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 np={exports:{}};np.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const op=tp,ip=np.exports,sp=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],ap={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},cp={};var up={create:function(e){return e=Object.assign({},ap,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!cp[e]){if(!ip||!r)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{ce(ae(`../locales/${e}.js`))}catch(t){throw Error(`Failed to load locale: ${e} from ../locales/${e}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${t}`)}}(e)}}(r.locale,{autoload:r.autoloadLocales}),!e)throw Error("Missing first date argument");if(!t)throw Error("Missing second date argument");const n=function(e,t){let r=t-e;const n=[];return sp.some((function(e){const t=e[0],o=e[1],i=Math.floor(r/o);if(r-=i*o,n.push([t,i]),0>=r)return!0})),n}(e,t),o=[];for(const i of n){const[e,t]=i;if(t>0&&o.push(ue(e,t,r)),o.length>=r.span)break}return o.join(r.delimiter)}(t,r,n=Object.assign({},e,n||{}))}}},addLocale:ce,defaultConfig:ap};const lp=e({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"}}}});var pp={exports:{}},fp={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},dp="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=fp,i=dp,s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],u=t.t={};let l=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[p,n]],d=(e,t,r)=>{const n=(e=>{for(const[t,r]of f)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),o=l++;i(e,o,t),u[e]=o,c[o]=t,s[o]=RegExp(t,r?"g":void 0),a[o]=RegExp(n,r?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${c[u.NUMERICIDENTIFIER]}|${c[u.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${c[u.NUMERICIDENTIFIERLOOSE]}|${c[u.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",p+"+"),d("BUILD",`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),d("FULL",`^${c[u.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),d("LOOSE",`^${c[u.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",c[u.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),d("XRANGEIDENTIFIER",c[u.NUMERICIDENTIFIER]+"|x|X|\\*"),d("XRANGEPLAIN",`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),d("XRANGE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",c[u.COERCEPLAIN]+"(?:$|[^\\d])"),d("COERCEFULL",c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",c[u.COERCE],!0),d("COERCERTLFULL",c[u.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${c[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${c[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(pp,pp.exports);var hp=pp.exports;const mp=Object.freeze({loose:!0}),vp=Object.freeze({});var yp=e=>e?"object"!=typeof e?mp:e:vp;const gp=/^[0-9]+$/,wp=(e,t)=>{const r=gp.test(e),n=gp.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var Ep={compareIdentifiers:wp,rcompareIdentifiers:(e,t)=>wp(t,e)};const _p=dp,{MAX_LENGTH:bp,MAX_SAFE_INTEGER:Op}=fp,{safeRe:Rp,t:Sp}=hp,Ip=yp,{compareIdentifiers:Tp}=Ep;var xp=class e{constructor(t,r){if(r=Ip(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>bp)throw new TypeError(`version is longer than ${bp} characters`);_p("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Rp[Sp.LOOSE]:Rp[Sp.FULL]);if(!n)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Op||0>this.major)throw new TypeError("Invalid major version");if(this.minor>Op||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>Op||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=n[4]?n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&Op>t)return t}return e})):[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(t){if(_p("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Tp(this.major,t.major)||Tp(this.minor,t.minor)||Tp(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(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 e=this.prerelease[r],n=t.prerelease[r];if(_p("prerelease compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return Tp(e,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{const e=this.build[r],n=t.build[r];if(_p("build compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return Tp(e,n)}while(++r)}inc(e,t,r){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"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=+r?1:0;if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");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===Tp(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}};const Pp=xp;var Ap=(e,t,r=!1)=>{if(e instanceof Pp)return e;try{return new Pp(e,t)}catch(n){if(!r)return null;throw n}};const Np=Ap;var $p=(e,t)=>{const r=Np(e,t);return r?r.version:null};const Cp=e($p),Lp=Ap;const Dp=xp;const kp=Ap;const Up=xp;var jp=(e,t)=>new Up(e,t).major;const Fp=e(jp),Mp=xp;const Gp=xp;const Bp=Ap;const Hp=xp;var qp=(e,t,r)=>new Hp(e,r).compare(new Hp(t,r));const Vp=e(qp),zp=qp;const Xp=qp;const Wp=xp;var Yp=(e,t,r)=>{const n=new Wp(e,r),o=new Wp(t,r);return n.compare(o)||n.compareBuild(o)};const Kp=Yp;const Jp=Yp;const Qp=qp;var Zp=(e,t,r)=>Qp(e,t,r)>0;const ef=qp;var tf=(e,t,r)=>0>ef(e,t,r);const rf=qp;var nf=(e,t,r)=>0===rf(e,t,r);const of=qp;var sf=(e,t,r)=>0!==of(e,t,r);const af=qp;var cf=(e,t,r)=>af(e,t,r)>=0;const uf=qp;var lf=(e,t,r)=>0>=uf(e,t,r);const pf=e(lf),ff=nf,df=sf,hf=Zp,mf=cf,vf=tf,yf=lf;var gf=(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 ff(e,r,n);case"!=":return df(e,r,n);case">":return hf(e,r,n);case">=":return mf(e,r,n);case"<":return vf(e,r,n);case"<=":return yf(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const wf=xp,Ef=Ap,{safeRe:_f,t:bf}=hp;var Of=(e,t)=>{if(e instanceof wf)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?_f[bf.COERCERTLFULL]:_f[bf.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?_f[bf.COERCEFULL]:_f[bf.COERCE]);return null===r?null:Ef(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const Rf=e(Of);var Sf,If,Tf,xf,Pf=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}};const Af=le();var Nf=(e,t,r)=>{try{t=new Af(t,r)}catch(n){return!1}return t.test(e)};const $f=le();const Cf=xp,Lf=le();const Df=xp,kf=le();const Uf=xp,jf=le(),Ff=Zp;const Mf=le();const Gf=xp,Bf=pe(),{ANY:Hf}=Bf,qf=le(),Vf=Nf,zf=Zp,Xf=tf,Wf=lf,Yf=cf;var Kf=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new Gf(e,n),t=new qf(t,n),r){case">":o=zf,i=Wf,s=Xf,a=">",c=">=";break;case"<":o=Xf,i=Yf,s=zf,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Vf(e,t,n))return!1;for(let u=0;t.set.length>u;++u){let r=null,l=null;if(t.set[u].forEach((e=>{e.semver===Hf&&(e=new Bf(">=0.0.0")),r=r||e,l=l||e,o(e.semver,r.semver,n)?r=e:s(e.semver,l.semver,n)&&(l=e)})),r.operator===a||r.operator===c)return!1;if((!l.operator||l.operator===a)&&i(e,l.semver))return!1;if(l.operator===c&&s(e,l.semver))return!1}return!0};const Jf=Kf;const Qf=Kf;const Zf=le();const ed=Nf,td=qp,rd=le(),nd=pe(),{ANY:od}=nd,id=Nf,sd=qp,ad=[new nd(">=0.0.0-0")],cd=[new nd(">=0.0.0")],ud=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===od){if(1===t.length&&t[0].semver===od)return!0;e=r.includePrerelease?ad:cd}if(1===t.length&&t[0].semver===od){if(r.includePrerelease)return!0;t=cd}const n=new Set;let o,i,s,a,c,u,l;for(const d of e)">"===d.operator||">="===d.operator?o=ld(o,d,r):"<"===d.operator||"<="===d.operator?i=pd(i,d,r):n.add(d.semver);if(n.size>1)return null;if(o&&i){if(s=sd(o.semver,i.semver,r),s>0)return null;if(0===s&&(">="!==o.operator||"<="!==i.operator))return null}for(const d of n){if(o&&!id(d,o+"",r))return null;if(i&&!id(d,i+"",r))return null;for(const e of t)if(!id(d,e+"",r))return!1;return!0}let p=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver,f=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;p&&1===p.prerelease.length&&"<"===i.operator&&0===p.prerelease[0]&&(p=!1);for(const d of t){if(l=l||">"===d.operator||">="===d.operator,u=u||"<"===d.operator||"<="===d.operator,o)if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),">"===d.operator||">="===d.operator){if(a=ld(o,d,r),a===d&&a!==o)return!1}else if(">="===o.operator&&!id(o.semver,d+"",r))return!1;if(i)if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),"<"===d.operator||"<="===d.operator){if(c=pd(i,d,r),c===d&&c!==i)return!1}else if("<="===i.operator&&!id(i.semver,d+"",r))return!1;if(!d.operator&&(i||o)&&0!==s)return!1}return!(o&&u&&!i&&0!==s||i&&l&&!o&&0!==s||f||p)},ld=(e,t,r)=>{if(!e)return t;const n=sd(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},pd=(e,t,r)=>{if(!e)return t;const n=sd(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const fd=hp,dd=fp,hd=xp,md=Ep;var vd={parse:Ap,valid:$p,clean:(e,t)=>{const r=Lp(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},inc:(e,t,r,n,o)=>{"string"==typeof r&&(o=n,n=r,r=void 0);try{return new Dp(e instanceof Dp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=kp(e,null,!0),n=kp(t,null,!0),o=r.compare(n);if(0===o)return null;const i=o>0,s=i?r:n,a=i?n:r,c=!!s.prerelease.length;if(a.prerelease.length&&!c)return a.patch||a.minor?s.patch?"patch":s.minor?"minor":"major":"major";const u=c?"pre":"";return r.major!==n.major?u+"major":r.minor!==n.minor?u+"minor":r.patch!==n.patch?u+"patch":"prerelease"},major:jp,minor:(e,t)=>new Mp(e,t).minor,patch:(e,t)=>new Gp(e,t).patch,prerelease:(e,t)=>{const r=Bp(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:qp,rcompare:(e,t,r)=>zp(t,e,r),compareLoose:(e,t)=>Xp(e,t,!0),compareBuild:Yp,sort:(e,t)=>e.sort(((e,r)=>Kp(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>Jp(r,e,t))),gt:Zp,lt:tf,eq:nf,neq:sf,gte:cf,lte:lf,cmp:gf,coerce:Of,Comparator:pe(),Range:le(),satisfies:Nf,toComparators:(e,t)=>new $f(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),maxSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Lf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Cf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new kf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new Df(n,r)))})),n},minVersion:(e,t)=>{e=new jf(e,t);let r=new Uf("0.0.0");if(e.test(r))return r;if(r=new Uf("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;e.set.length>n;++n){let t=null;e.set[n].forEach((e=>{const r=new Uf(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!Ff(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!Ff(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new Mf(e,t).range||"*"}catch(r){return null}},outside:Kf,gtr:(e,t,r)=>Jf(e,t,">",r),ltr:(e,t,r)=>Qf(e,t,"<",r),intersects:(e,t,r)=>(e=new Zf(e,r),t=new Zf(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>td(e,t,r)));for(const u of s)ed(u,t,r)?(i=u,o||(o=u)):(i&&n.push([o,i]),i=null,o=null);o&&n.push([o,null]);const a=[];for(const[u,l]of n)a.push(u===l?u:l||u!==s[0]?l?u===s[0]?"<="+l:`${u} - ${l}`:">="+u:"*");const c=a.join(" || ");return("string"==typeof t.raw?t.raw:t+"").length>c.length?c:t},subset:(e,t,r={})=>{if(e===t)return!0;e=new rd(e,r),t=new rd(t,r);let n=!1;e:for(const o of e.set){for(const e of t.set){const t=ud(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:hd,re:fd.re,src:fd.src,tokens:fd.t,SEMVER_SPEC_VERSION:dd.SEMVER_SPEC_VERSION,RELEASE_TYPES:dd.RELEASE_TYPES,compareIdentifiers:md.compareIdentifiers,rcompareIdentifiers:md.rcompareIdentifiers},yd=vd,gd=mr,wd=Sr,Ed=gr,_d=Fr,bd=fn.env.npm_package_json,Od=fn.env.npm_config_user_agent,Rd=!(!Od||!Od.startsWith("npm")),Sd=!(!bd||!bd.endsWith("package.json")),Id=Rd||Sd,Td=!(!Od||!Od.startsWith("yarn")),xd=Id||Td,Pd=gd.homedir(),Ad=process.env.XDG_CONFIG_HOME||wd.join(Pd,".config","simple-update-notifier"),Nd=function(e){return wd.join(Ad,"".concat(e.replace("@","").replace("/","__"),".json"))},$d=function(e,t){return fe(void 0,0,void 0,(function(){var r;return de(this,(function(n){return r="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,n){_d.get(r,(function(r){var o="";r.on("data",(function(e){return o+=e})),r.on("end",(function(){try{var r=JSON.parse(o)[t];r||n(Error("Error getting version")),e(r)}catch(i){n(Error("Could not parse version response"))}}))})).on("error",(function(e){return n(e)}))}))]}))}))},Cd=function(e){var t=e.pkg,r=e.updateCheckInterval,n=void 0===r?864e5:r,o=e.distTag,i=void 0===o?"latest":o,s=e.alwaysRun,a=e.debug;return fe(void 0,0,void 0,(function(){var r,o;return de(this,(function(c){switch(c.label){case 0:return Ed.existsSync(Ad)||Ed.mkdirSync(Ad,{recursive:!0}),r=function(t){var r=Nd(t);try{if(!Ed.existsSync(r))return;return JSON.parse(Ed.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,$d(t.name,i)]:[3,2];case 1:return o=c.sent(),u=Nd(t.name),Ed.writeFileSync(u,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),yd.gt(o,t.version)?[2,o]:(a&&console.error("Latest version (".concat(o,") not newer than current version (").concat(t.version,")")),[3,3]);case 2:a&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(n,"ms but only ").concat((new Date).getTime()-r,"ms since last check.")),c.label=3;case 3:return[2,!1]}var u}))}))};const Ld=e((function(e){return fe(void 0,0,void 0,(function(){var t,r;return de(this,(function(n){switch(n.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||xd&&!e.shouldNotifyInNpmScript))return e.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Cd(e)];case 2:return(t=n.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),"┐")],o=0,i=t;i.length>o;o++)n.push("│ ".concat(i[o].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(e.pkg.name," available!\nCurrent Version: ").concat(e.pkg.version,"\nLatest Version: ").concat(t))),[3,4];case 3:return r=n.sent(),e.debug&&r instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",r),[3,4];case 4:return[2]}}))}))})),Dd={name:"setup-cpp",version:"0.41.1"};var kd={};!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},o=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}}(),i=t(gr),s=dn,a=t(Sr),c=t(Ur),u=t(Fr),l=Gr,p=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 o=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 i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return i.__validate(e,n)?(i.url=i.requestURL=e.trim(),i.state=p.IDLE,i.__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},i.__opts=Object.assign({},i.__defaultOpts),i.__pipes=[],i.__total=0,i.__downloaded=0,i.__progress=0,i.__retryCount=0,i.__retryTimeout=null,i.__resumeRetryCount=0,i.__states=p,i.__promise=null,i.__request=null,i.__response=null,i.__isAborted=!1,i.__isResumed=!1,i.__isResumable=!1,i.__isRedirected=!1,i.__destFolder=n,i.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},i.__fileName="",i.__filePath="",i.updateOptions(o),i):r(i)}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),o(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,o=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&i.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===o?t():e.resumeFromFile(e.__filePath,{total:o,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){i.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void i.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)},o=function(i,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,i).href;return e.emit("redirected",c,i),o(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()};o(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 o=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(o),r.emit("redirected",o,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var i=Error("Response status was "+n.statusCode);return i.status=n.statusCode||0,i.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",i),t(i)}(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 o=this,s=e;if(this.__isResumed)this.__fileStream=i.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(),i.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=i.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 o.__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 o=!!r.__total&&r.__downloaded!==r.__total;if(o&&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:o,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,o=r.delay,i=void 0===o?0:o,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())}),i)}))}))):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"),o=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,i=!n||o?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||o||i?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(o||i||c)?(r=(r=e["content-disposition"]).trim(),o?r=o[1]:i?r=i[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 o=this.__opts.fileName,i=o.name,s=!!o.hasOwnProperty("ext")&&o.ext;if("string"==typeof s)return i+"."+s;if("boolean"==typeof s){if(s)return i;var c=e.includes(".")?e.split(".").pop():"";return""===c?i:i+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,o=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===o?0:this.__downloaded/o*100,(this.__downloaded===o||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===o||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),o={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(o.headers=r),o}},{key:"__getFilesizeInBytes",value:function(e){try{return i.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(!i.existsSync(t))throw Error("Destination Folder must exist");if(!i.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{i.accessSync(t,i.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{i.accessSync(e,i.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,o=e.split(".").pop();return o!==e&&o.length>0?r=r.replace(o="."+o,""):o="",this.__uniqFileNameSync(r+" ("+ ++n+")"+o)}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?i.access(e.__filePath,(function(n){return n?t():void i.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)}(kd);const{appendFile:Ud}=wr,jd="Dpkg::Lock::Timeout=300";let Fd=!1;const Md=$l((function(e=we()){k(e,"nala"!==e?["update","-y","-o",jd]:["update","-o",jd],{...aa,env:ye(e)}),Fd=!0}));var Gd,Bd;(Bd=Gd||(Gd={}))[Bd.NameDashVersion=0]="NameDashVersion",Bd[Bd.NameEqualsVersion=1]="NameEqualsVersion",Bd[Bd.Name=2]="Name",Bd[Bd.None=3]="None";const Hd=$l((async function(e){Md(e);const t=await be([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&k(e,["install","-y","--fix-broken","-o",jd,...t],{...aa,env:ye(e)})}),{promise:!0}),qd=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],Vd="/etc/apt/trusted.gpg.d",zd="keyserver.ubuntu.com";let Xd,Wd,Yd,Kd,Jd,Qd=!1,Zd=!1,eh=!1,th=!1;const rh=/Version\s*:\s*(.*)/g;let nh=!1;var oh=Sr;const ih=e((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=oh.basename(e,oh.extname(e))+t,o=oh.join(oh.dirname(e),n);return(r=e.slice(0,2))==="."+oh.sep||"./"===r?"."+oh.sep+o:o}));var sh={},ah={};Ge(ah,"name",(()=>Be));var ch={};Ge(ch,"normalizeTrim",(()=>He));var uh={};Ge(uh,"addExeExt",(()=>qe));var lh={};Ge(lh,"addNamePrefix",(()=>Ve));var ph={};Ge(ph,"addNameSuffix",(()=>ze));var fh={};Ge(fh,"addShExt",(()=>Xe));var dh={};Ge(dh,"addShRelativePrefix",(()=>We));var hh={};Ge(hh,"removeExt",(()=>Ye));var mh={};Ge(mh,"replaceExt",(()=>Ke));var vh={};Ge(vh,"isPathInside",(()=>Je)),Me(sh,ah),Me(sh,ch),Me(sh,uh),Me(sh,lh),Me(sh,ph),Me(sh,fh),Me(sh,dh),Me(sh,hh),Me(sh,mh),Me(sh,vh);const yh=["x64","amd64","x86_64","win64","64"],gh=["x86","i386","ia32","win32","32","x32"],wh=["aarch64","arm64","woa64","arm"],Eh=["armv7","armv7a"],_h=["powerpc64le","ppc64le"],bh=["sparc64"];var Oh={},Rh={},Sh={};!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=gn&&gn.__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]}),o=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=gn&&gn.__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 o(t,e),t},s=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=i(gr),c=i(Sr);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 o;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(o))return r;const i=r;for(const a of n){r=i+a,o=void 0;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const o of yield e.readdir(t))if(n===o.toUpperCase()){r=c.join(t,o);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(o))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(Sh);var Ih=gn&&gn.__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]}),Th=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xh=gn&&gn.__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)&&Ih(t,e,r);return Th(t,e),t},Ph=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Rh,"__esModule",{value:!0}),Rh.findInPath=Rh.which=Ch=Rh.mkdirP=Rh.rmRF=Rh.mv=Rh.cp=void 0;const Ah=qr,Nh=xh(Sr),$h=xh(Sh);Rh.cp=function(e,t,r={}){return Ph(this,void 0,void 0,(function*(){const{force:n,recursive:o,copySourceDirectory:i}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),s=(yield $h.exists(t))?yield $h.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?Nh.join(t,Nh.basename(e)):t;if(!(yield $h.exists(e)))throw Error("no such file or directory: "+e);if((yield $h.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield tt(e,a,0,n)}else{if(""===Nh.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield rt(e,a,n)}}))},Rh.mv=function(e,t,r={}){return Ph(this,void 0,void 0,(function*(){if(yield $h.exists(t)){let n=!0;if((yield $h.isDirectory(t))&&(t=Nh.join(t,Nh.basename(e)),n=yield $h.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield Qe(t)}}yield Ze(Nh.dirname(t)),yield $h.rename(e,t)}))},Rh.rmRF=Qe;var Ch=Rh.mkdirP=Ze;Rh.which=function e(t,r){return Ph(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(r){const r=yield e(t,!1);if(!r)throw Error($h.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 n=yield et(t);return n&&n.length>0?n[0]:""}))},Rh.findInPath=et;var Lh={exports:{}},Dh={exports:{}};!function(e,t){function r(e){A[e]=N++}function n(e){for(var t=0;C.length>t;t++){var r=C[t][0],n=C[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>R)return null;if(!(t.loose?x[A.LOOSE]:x[A.FULL]).test(e))return null;try{return new i(e,t)}catch(r){return null}}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>R)throw new TypeError("version is longer than "+R+" characters");if(!(this instanceof i))return new i(e,t);O("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?x[A.LOOSE]:x[A.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>S||0>this.major)throw new TypeError("Invalid major version");if(this.minor>S||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>S||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&&S>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=D.test(e),n=D.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 i(e,r).compare(new i(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 p(e,t,r){return 0!==a(e,t,r)}function f(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 p(e,r,n);case">":return c(e,r,n);case">=":return f(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(" "),O("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===k?"":this.operator+this.semver.version,O("comp",this)}function v(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof v)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new v(e.raw,t);if(e instanceof m)return new v(e.value,t);if(!(this instanceof v))return new v(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 y(e,t){for(var r=!0,n=e.slice(),o=n.pop();r&&n.length;)r=n.every((function(e){return o.intersects(e,t)})),o=n.pop();return r}function g(e){return!e||"x"===e.toLowerCase()||"*"===e}function w(e,t,r,n,o,i,s,a,c,u,l,p,f){return((t=g(r)?"":g(n)?">="+r+".0.0":g(o)?">="+r+"."+n+".0":">="+t)+" "+(a=g(c)?"":g(u)?"<"+(+c+1)+".0.0":g(l)?"<"+c+"."+(+u+1)+".0":p?"<="+c+"."+u+"."+l+"-"+p:"<="+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(O(e[n].semver),e[n].semver!==k&&e[n].semver.prerelease.length>0){var o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function _(e,t,r){try{t=new v(t,r)}catch(n){return!1}return t.test(e)}function b(e,t,r,n){var o,s,a,l,p;switch(e=new i(e,n),t=new v(t,n),r){case">":o=c,s=d,a=u,l=">",p=">=";break;case"<":o=u,s=f,a=c,l="<",p="<=";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 y=null,g=null;if(t.set[h].forEach((function(e){e.semver===k&&(e=new m(">=0.0.0")),g=g||e,o(e.semver,(y=y||e).semver,n)?y=e:a(e.semver,g.semver,n)&&(g=e)})),y.operator===l||y.operator===p)return!1;if((!g.operator||g.operator===l)&&s(e,g.semver))return!1;if(g.operator===p&&a(e,g.semver))return!1}return!0}var O;t=Dh.exports=i,O="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 R=256,S=Number.MAX_SAFE_INTEGER||9007199254740991,I=R-6,T=t.re=[],x=t.safeRe=[],P=t.src=[],A=t.tokens={},N=0,$="[a-zA-Z0-9-]",C=[["\\s",1],["\\d",R],[$,I]];r("NUMERICIDENTIFIER"),P[A.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),P[A.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),P[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+$+"*",r("MAINVERSION"),P[A.MAINVERSION]="("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),P[A.MAINVERSIONLOOSE]="("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),P[A.PRERELEASEIDENTIFIER]="(?:"+P[A.NUMERICIDENTIFIER]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),P[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+P[A.NUMERICIDENTIFIERLOOSE]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),P[A.PRERELEASE]="(?:-("+P[A.PRERELEASEIDENTIFIER]+"(?:\\."+P[A.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),P[A.PRERELEASELOOSE]="(?:-?("+P[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+P[A.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),P[A.BUILDIDENTIFIER]=$+"+",r("BUILD"),P[A.BUILD]="(?:\\+("+P[A.BUILDIDENTIFIER]+"(?:\\."+P[A.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),P[A.FULLPLAIN]="v?"+P[A.MAINVERSION]+P[A.PRERELEASE]+"?"+P[A.BUILD]+"?",P[A.FULL]="^"+P[A.FULLPLAIN]+"$",r("LOOSEPLAIN"),P[A.LOOSEPLAIN]="[v=\\s]*"+P[A.MAINVERSIONLOOSE]+P[A.PRERELEASELOOSE]+"?"+P[A.BUILD]+"?",r("LOOSE"),P[A.LOOSE]="^"+P[A.LOOSEPLAIN]+"$",r("GTLT"),P[A.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),P[A.XRANGEIDENTIFIERLOOSE]=P[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),P[A.XRANGEIDENTIFIER]=P[A.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),P[A.XRANGEPLAIN]="[v=\\s]*("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:"+P[A.PRERELEASE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),P[A.XRANGEPLAINLOOSE]="[v=\\s]*("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:"+P[A.PRERELEASELOOSE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGE"),P[A.XRANGE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAIN]+"$",r("XRANGELOOSE"),P[A.XRANGELOOSE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAINLOOSE]+"$",r("COERCE"),P[A.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),T[A.COERCERTL]=RegExp(P[A.COERCE],"g"),x[A.COERCERTL]=RegExp(n(P[A.COERCE]),"g"),r("LONETILDE"),P[A.LONETILDE]="(?:~>?)",r("TILDETRIM"),P[A.TILDETRIM]="(\\s*)"+P[A.LONETILDE]+"\\s+",T[A.TILDETRIM]=RegExp(P[A.TILDETRIM],"g"),x[A.TILDETRIM]=RegExp(n(P[A.TILDETRIM]),"g"),r("TILDE"),P[A.TILDE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAIN]+"$",r("TILDELOOSE"),P[A.TILDELOOSE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAINLOOSE]+"$",r("LONECARET"),P[A.LONECARET]="(?:\\^)",r("CARETTRIM"),P[A.CARETTRIM]="(\\s*)"+P[A.LONECARET]+"\\s+",T[A.CARETTRIM]=RegExp(P[A.CARETTRIM],"g"),x[A.CARETTRIM]=RegExp(n(P[A.CARETTRIM]),"g"),r("CARET"),P[A.CARET]="^"+P[A.LONECARET]+P[A.XRANGEPLAIN]+"$",r("CARETLOOSE"),P[A.CARETLOOSE]="^"+P[A.LONECARET]+P[A.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),P[A.COMPARATORLOOSE]="^"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),P[A.COMPARATOR]="^"+P[A.GTLT]+"\\s*("+P[A.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),P[A.COMPARATORTRIM]="(\\s*)"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+"|"+P[A.XRANGEPLAIN]+")",T[A.COMPARATORTRIM]=RegExp(P[A.COMPARATORTRIM],"g"),x[A.COMPARATORTRIM]=RegExp(n(P[A.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),P[A.HYPHENRANGE]="^\\s*("+P[A.XRANGEPLAIN]+")\\s+-\\s+("+P[A.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),P[A.HYPHENRANGELOOSE]="^\\s*("+P[A.XRANGEPLAINLOOSE]+")\\s+-\\s+("+P[A.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),P[A.STAR]="(<|>)?=?\\s*\\*";for(var L=0;N>L;L++)O(L,P[L]),T[L]||(T[L]=RegExp(P[L]),x[L]=RegExp(n(P[L])));t.parse=o,t.valid=function(e,t){var r=o(e,t);return r?r.version:null},t.clean=function(e,t){var r=o(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=i,i.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},i.prototype.toString=function(){return this.version},i.prototype.compare=function(e){return O("SemVer.compare",this.version,this.options,e),e instanceof i||(e=new i(e,this.options)),this.compareMain(e)||this.comparePre(e)},i.prototype.compareMain=function(e){return e instanceof i||(e=new i(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},i.prototype.comparePre=function(e){if(e instanceof i||(e=new i(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(O("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)},i.prototype.compareBuild=function(e){e instanceof i||(e=new i(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(O("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)},i.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 i(e,r).inc(t,n).version}catch(o){return null}},t.diff=function(e,t){if(l(e,t))return null;var r=o(e),n=o(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return s},t.compareIdentifiers=s;var D=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new i(e,t).major},t.minor=function(e,t){return new i(e,t).minor},t.patch=function(e,t){return new i(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 i(e,r),o=new i(t,r);return n.compare(o)||n.compareBuild(o)},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=p,t.gte=f,t.lte=d,t.cmp=h,t.Comparator=m;var k={};m.prototype.parse=function(e){var t=e.match(this.options.loose?x[A.COMPARATORLOOSE]:x[A.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 i(t[2],this.options.loose):k},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(O("Comparator.test",e,this.options.loose),this.semver===k||e===k)return!0;if("string"==typeof e)try{e=new i(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 v(e.value,t),_(this.value,r,t));if(""===e.operator)return""===e.value||(r=new v(this.value,t),_(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=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||o||i&&s||a||c},t.Range=v,v.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},v.prototype.toString=function(){return this.range},v.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?x[A.HYPHENRANGELOOSE]:x[A.HYPHENRANGE],w),O("hyphen replace",e),e=e.replace(x[A.COMPARATORTRIM],"$1$2$3"),O("comparator trim",e,x[A.COMPARATORTRIM]),e=(e=(e=e.replace(x[A.TILDETRIM],"$1~")).replace(x[A.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?x[A.COMPARATORLOOSE]:x[A.COMPARATOR],n=e.split(" ").map((function(e){return function(e,t){return O("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return O("caret",e,t),e.replace(t.loose?x[A.CARETLOOSE]:x[A.CARET],(function(t,r,n,o,i){var s;return O("caret",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":i?(O("replaceCaret pr",i),s="0"===r?"0"===n?">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+"-"+i+" <"+(+r+1)+".0.0"):(O("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+o+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+" <"+(+r+1)+".0.0"),O("caret return",s),s}))}(e,t)})).join(" ")}(e,t),O("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?x[A.TILDELOOSE]:x[A.TILDE],(function(t,r,n,o,i){var s;return O("tilde",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":i?(O("replaceTilde pr",i),s=">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0",O("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),O("tildes",e),e=function(e,t){return O("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?x[A.XRANGELOOSE]:x[A.XRANGE],(function(r,n,o,i,s,a){O("xRange",e,r,n,o,i,s,a);var c=g(o),u=c||g(i),l=u||g(s);return"="===n&&l&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&l?(u&&(i=0),s=0,">"===n?(n=">=",u?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",u?o=+o+1:i=+i+1),r=n+o+"."+i+"."+s+a):u?r=">="+o+".0.0"+a+" <"+(+o+1)+".0.0"+a:l&&(r=">="+o+"."+i+".0"+a+" <"+o+"."+(+i+1)+".0"+a),O("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),O("xrange",e),e=function(e,t){return O("replaceStars",e,t),e.trim().replace(x[A.STAR],"")}(e,t),O("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)},v.prototype.intersects=function(e,t){if(!(e instanceof v))throw new TypeError("a Range is required");return this.set.some((function(r){return y(r,t)&&e.set.some((function(e){return y(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new v(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},v.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new i(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,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minVersion=function(e,t){e=new v(e,t);var r=new i("0.0.0");if(e.test(r))return r;if(r=new i("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 i(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 v(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=o(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new v(e,r),t=new v(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof i)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=x[A.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),x[A.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;x[A.COERCERTL].lastIndex=-1}else r=e.match(x[A.COERCE]);return null===r?null:o(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,Dh.exports);var kh=Dh.exports;!function(e,t){var r=gn&&gn.__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]}),n=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=gn&&gn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t},i=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=o(kh),a=h(),c=mr,u=Hr,l=gr;t._findMatch=function(t,r,n,o){return i(this,void 0,void 0,(function*(){const i=c.platform();let u,l,p;for(const c of n){const n=c.version;if(a.debug(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(p=c.files.find((t=>{a.debug(`${t.arch}===${o} && ${t.platform}===${i}`);let r=t.arch===o&&t.platform===i;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),p)){a.debug("matched "+c.version),l=c;break}}return l&&p&&(u=Object.assign({},l),u.files=[p]),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 l.existsSync(e)?r=""+l.readFileSync(e):l.existsSync(t)&&(r=""+l.readFileSync(t)),r}}(Lh,Lh.exports);for(var Uh=Lh.exports,jh=Rr,Fh=[],Mh=0;256>Mh;++Mh)Fh[Mh]=(Mh+256).toString(16).substr(1);var Gh=function(){return jh.randomBytes(16)},Bh=function(e,t){var r=t||0;return""+Fh[e[r++]]+Fh[e[r++]]+Fh[e[r++]]+Fh[e[r++]]+"-"+Fh[e[r++]]+Fh[e[r++]]+"-"+Fh[e[r++]]+Fh[e[r++]]+"-"+Fh[e[r++]]+Fh[e[r++]]+"-"+Fh[e[r++]]+Fh[e[r++]]+Fh[e[r++]]+Fh[e[r++]]+Fh[e[r++]]+Fh[e[r++]]},Hh=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Gh)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;16>i;++i)t[n+i]=o[i];return t||Bh(o)},qh={},Vh={},zh=gn&&gn.__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]}),Xh=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Wh=gn&&gn.__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)&&zh(t,e,r);return Xh(t,e),t},Yh=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Vh,"__esModule",{value:!0}),Vh.argStringToArray=Vh.ToolRunner=void 0;const Kh=Wh(mr),Jh=Wh(Gr),Qh=Wh(Hr),Zh=Wh(Sr),em=Wh(Rh),tm=Wh(Sh),rm=vn,nm="win32"===process.platform;Vh.ToolRunner=class extends Jh.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 o=t?"":"[command]";if(nm)if(this._isCmdFile()){o+=r;for(const e of n)o+=" "+e}else if(e.windowsVerbatimArguments){o+=`"${r}"`;for(const e of n)o+=" "+e}else{o+=this._windowsQuoteCmdArg(r);for(const e of n)o+=" "+this._windowsQuoteCmdArg(e)}else{o+=r;for(const e of n)o+=" "+e}return o}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(Kh.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+Kh.EOL.length),o=n.indexOf(Kh.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return nm&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(nm&&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 i of e)if(t.some((e=>e===i))){r=!0;break}if(!r)return e;let n='"',o=!0;for(let i=e.length;i>0;i--)n+=e[i-1],o&&"\\"===e[i-1]?n+="\\":'"'===e[i-1]?(o=!0,n+='"'):o=!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 Yh(this,void 0,void 0,(function*(){return!tm.isRooted(this.toolPath)&&(this.toolPath.includes("/")||nm&&this.toolPath.includes("\\"))&&(this.toolPath=Zh.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield em.which(this.toolPath,!0),new Promise(((e,t)=>Yh(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)+Kh.EOL);const n=new om(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield tm.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=Qh.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let s="";i.stdout&&i.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),s=this._processLineBuffer(e,s,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let a="";if(i.stderr&&i.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),a=this._processLineBuffer(e,a,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),i.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),i.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),i.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)=>{s.length>0&&this.emit("stdline",s),a.length>0&&this.emit("errline",a),i.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!i.stdin)throw Error("child process missing stdin");i.stdin.end(this.options.input)}}))))}))}},Vh.argStringToArray=function(e){function t(e){o&&'"'!==e&&(i+="\\"),i+=e,o=!1}const r=[];let n=!1,o=!1,i="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&o?t(a):"\\"===a&&n?o=!0:" "!==a||n?t(a):i.length>0&&(r.push(i),i=""):o?t(a):n=!n}return i.length>0&&r.push(i.trim()),r};class om extends Jh.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=rm.setTimeout(om.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())}}var im=gn&&gn.__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]}),sm=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),am=gn&&gn.__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)&&im(t,e,r);return sm(t,e),t},cm=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(qh,"__esModule",{value:!0});var um=qh.getExecOutput=qh.exec=void 0;const lm=mn,pm=am(Vh);var fm=qh.exec=nt;um=qh.getExecOutput=function(e,t,r){var n,o;return cm(this,void 0,void 0,(function*(){let i="",s="";const a=new lm.StringDecoder("utf8"),c=new lm.StringDecoder("utf8"),u=null===(n=null==r?void 0:r.listeners)||void 0===n?void 0:n.stdout,l=null===(o=null==r?void 0:r.listeners)||void 0===o?void 0:o.stderr,p=Object.assign(Object.assign({},null==r?void 0:r.listeners),{stdout:e=>{i+=a.write(e),u&&u(e)},stderr:e=>{s+=c.write(e),l&&l(e)}}),f=yield nt(e,t,Object.assign(Object.assign({},r),{listeners:p}));return i+=a.end(),s+=c.end(),{exitCode:f,stdout:i,stderr:s}}))};var dm={},hm=gn&&gn.__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]}),mm=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),vm=gn&&gn.__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)&&hm(t,e,r);return mm(t,e),t},ym=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(dm,"__esModule",{value:!0}),dm.RetryHelper=void 0;const gm=vm(h());dm.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 ym(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;gm.info(n.message)}const o=this.getSleepAmount();gm.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 ym(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var wm=gn&&gn.__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]}),Em=gn&&gn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_m=gn&&gn.__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)&&wm(t,e,r);return Em(t,e),t},bm=gn&&gn.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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())}))},Om=gn&&gn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oh,"__esModule",{value:!0}),Oh.evaluateVersions=Oh.isExplicitVersion=Oh.findFromManifest=Oh.getManifestFromRepo=Oh.findAllVersions=Hm=Oh.find=Oh.cacheFile=Bm=Oh.cacheDir=Oh.extractZip=Oh.extractXar=Oh.extractTar=Oh.extract7z=Gm=Oh.downloadTool=Oh.HTTPError=void 0;const Rm=_m(h()),Sm=_m(Rh),Im=_m(gr),Tm=_m(Uh),xm=_m(mr),Pm=_m(Sr),Am=_m(wo),Nm=_m(kh),$m=_m(zr),Cm=_m(Br),Lm=qr,Dm=Om(Hh),km=qh,Um=dm;class jm extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Oh.HTTPError=jm;const Fm="win32"===process.platform,Mm="darwin"===process.platform;var Gm=Oh.downloadTool=function(e,t,r,n){return bm(this,void 0,void 0,(function*(){t=t||Pm.join(pt(),Dm.default()),yield Sm.mkdirP(Pm.dirname(t)),Rm.debug("Downloading "+e),Rm.debug("Destination "+t);const o=ft("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=ft("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new Um.RetryHelper(3,o,i);return yield s.execute((()=>bm(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return bm(this,void 0,void 0,(function*(){if(Im.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new Am.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(Rm.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const i=yield o.get(e,n);if(200!==i.message.statusCode){const t=new jm(i.message.statusCode);throw Rm.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=Cm.promisify($m.pipeline),a=ft("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,Im.createWriteStream(t)),Rm.debug("download complete"),c=!0,t}finally{if(!c){Rm.debug("download failed");try{yield Sm.rmRF(t)}catch(u){Rm.debug(`Failed to delete '${t}'. ${u.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof jm&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))};Oh.extract7z=function(e,t,r){return bm(this,void 0,void 0,(function*(){Lm.ok(Fm,"extract7z() not supported on current OS"),Lm.ok(e,'parameter "file" is required'),t=yield it(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",Rm.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield km.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${Pm.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],o={silent:!0};try{const e=yield Sm.which("powershell",!0);yield km.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},Oh.extractTar=function(e,t,r="xz"){return bm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield it(t),Rm.debug("Checking tar --version");let n="";yield km.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),Rm.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],Rm.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return Fm&&o&&(i.push("--force-local"),s=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),o&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",s,"-f",a),yield km.exec("tar",i),t}))},Oh.extractXar=function(e,t,r=[]){return bm(this,void 0,void 0,(function*(){let n;Lm.ok(Mm,"extractXar() not supported on current OS"),Lm.ok(e,'parameter "file" is required'),t=yield it(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),Rm.isDebug()&&n.push("-v");const o=yield Sm.which("xar",!0);var i;return yield km.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},Oh.extractZip=function(e,t){return bm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield it(t),Fm?yield function(e,t){return bm(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=yield Sm.which("pwsh",!1);if(o){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(" ")];Rm.debug("Using pwsh at path: "+o),yield km.exec(`"${o}"`,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 Sm.which("powershell",!0);Rm.debug("Using powershell at path: "+t),yield km.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return bm(this,void 0,void 0,(function*(){const r=yield Sm.which("unzip",!0),n=[e];Rm.isDebug()||n.unshift("-q"),n.unshift("-o"),yield km.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))};var Bm=Oh.cacheDir=function(e,t,r,n){return bm(this,void 0,void 0,(function*(){if(r=Nm.clean(r)||r,n=n||xm.arch(),Rm.debug(`Caching tool ${t} ${r} ${n}`),Rm.debug("source dir: "+e),!Im.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield st(t,r,n);for(const t of Im.readdirSync(e)){const r=Pm.join(e,t);yield Sm.cp(r,o,{recursive:!0})}return at(t,r,n),o}))};Oh.cacheFile=function(e,t,r,n,o){return bm(this,void 0,void 0,(function*(){if(n=Nm.clean(n)||n,o=o||xm.arch(),Rm.debug(`Caching tool ${r} ${n} ${o}`),Rm.debug("source file: "+e),!Im.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield st(r,n,o),s=Pm.join(i,t);return Rm.debug("destination file "+s),yield Sm.cp(e,s),at(r,n,o),i}))};var Hm=Oh.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||xm.arch(),ct(t)||(t=ut(ot(e,r),t));let n="";if(t){t=Nm.clean(t)||"";const o=Pm.join(lt(),e,t,r);Rm.debug("checking cache: "+o),Im.existsSync(o)&&Im.existsSync(o+".complete")?(Rm.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):Rm.debug("not found")}return n};Oh.findAllVersions=ot,Oh.getManifestFromRepo=function(e,t,r,n="master"){return bm(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new Am.HttpClient("tool-cache"),a={};r&&(Rm.debug("set auth"),a.authorization=r);const c=yield s.getJson(i,a);if(!c.result)return o;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{o=JSON.parse(l)}catch(p){Rm.debug("Invalid json")}}return o}))},Oh.findFromManifest=function(e,t,r,n=xm.arch()){return bm(this,void 0,void 0,(function*(){return yield Tm._findMatch(e,t,r,n)}))},Oh.isExplicitVersion=ct,Oh.evaluateVersions=ut;var qm={};Object.defineProperty(qm,"__esModule",{value:!0}),qm.retryAsPromised=qm.TimeoutError=void 0;let Vm=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};qm.TimeoutError=Vm,qm.retryAsPromised=dt;var zm=qm.default=dt;let Xm;const Wm=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||Er,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,o)=>t.mkdir(e,r,((e,t)=>e?o(e):n(t))))),e.stat=e.stat||r.stat||_r,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||br,e.mkdirSync=e.mkdirSync||r.mkdirSync||Or,t},Ym=(e,t,r)=>{const n=xr(e),o={...Wm(t),recursive:!1};if(n===e)try{return o.mkdirSync(e,o)}catch(i){if(i&&"EISDIR"!==i.code)throw i;return}try{return o.mkdirSync(e,o),r||e}catch(i){const t=i;if(t&&"ENOENT"===t.code)return Ym(e,o,Ym(n,o,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw i;try{if(!o.statSync(e).isDirectory())throw i}catch(s){throw i}}},Km=Object.assign((async(e,t,r)=>{const n=Wm(t);n.recursive=!1;const o=xr(e);return o===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const i=t;if(i&&"ENOENT"===i.code)return Km(o,n).then((t=>Km(e,n,t)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:Ym}),Jm=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?Jm(e,xr(t),t):void 0))},Qm=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?Qm(e,xr(t),t):void 0}},Zm=(e,t)=>{const r=Wm(t);if(r.recursive=!0,xr(e)===e)return r.mkdirSync(e,r);const n=Qm(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return Ym(e,r);throw o}},ev=Object.assign((async(e,t)=>{const r={...Wm(t),recursive:!0};return xr(e)===e?await r.mkdirAsync(e,r):Jm(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return Km(e,r);throw t}))))}),{sync:Zm}),tv=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,rv=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=Lr(e),"win32"===tv){const t=/[*|"<>?:]/,{root:r}=Dr(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},nv=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),ov=+nv[0]>10||10==+nv[0]&&+nv[1]>=12,iv=ov?e=>Wm(e).mkdirSync===Or:()=>!1,sv=Object.assign(ov?e=>Wm(e).mkdir===Er:()=>!1,{sync:iv}),av=(e,t)=>{e=rv(e);const r=Wm(t);return iv(r)?Zm(e,r):Ym(e,r)},cv=Object.assign((async(e,t)=>{e=rv(e);const r=Wm(t);return sv(r)?ev(e,r):Km(e,r)}),{mkdirpSync:av,mkdirpNative:ev,mkdirpNativeSync:Zm,mkdirpManual:Km,mkdirpManualSync:Ym,sync:av,native:ev,nativeSync:Zm,manual:Km,manualSync:Ym,useNative:sv,useNativeSync:iv}),uv=/v?(\d\S*)/,lv="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",pv={llvm:lv,clangtidy:lv,clangformat:lv,ninja:"1.12.1",cmake:"3.30.2",gcovr:"5.2",conan:"1.64.1",meson:"1.5.1",kcov:"42",task:"3.38.0",doxygen:Le()?"1.11.0-4":"1.11.0",gcc:"win32"===process.platform?"14.2.0posix-18.1.8-12.0.0-ucrt-r1":"",powershell:"7.4.5"},fv="22.2.0",dv="3.7.9",hv={mingw:{24:"8.0.0-1",22:"8.0.0-1",20:"7.0.0-2"},gcovr:{24:"6.0",22:"6.0",20:"6.0",18:"5.0"},meson:{24:"1.0.0",22:"1.0.0",20:"1.0.0",18:"0.61.4"},nala:{24:"",22:"",21:"legacy",20:"legacy",18:"legacy",16:"legacy",14:"legacy"},kcov:{24:"42-binary",22:"42-binary",20:"40-binary",18:"40",16:"40",14:"40"},doxygen:{24:"1.11.0",22:"1.11.0",20:"1.10.0",18:"1.10.0"}},mv=$l((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 um(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Ir(r,"Scripts"),Ir(r,"Scripts","bin"),Ir(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var vv={};Object.defineProperty(vv,"__esModule",{value:!0});var yv=vv.getUbuntuVersion=void 0;const gv=Hr;yv=vv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{gv.execFile(t,r,{encoding:"utf8",shell:!1},((o,i,s)=>{if(o)return"errno"in o&&"ENOENT"===o.code?void e(null):void n(Error(`Could not execute \`${t} ${r.join(" ")}\`: ${o} (stderr=${s})`));e(i)}))})));var t,r;if(null===e)return[];const n=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,i=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let s=null,a=null,c=!1;for(const u of e.split("\n")){const e=u.match(n);if(null!==e){if("Ubuntu"!==e[1])return[];c=!0}const t=u.match(o);t&&(s=t);const r=u.match(i);if(r&&(a=r),c&&s&&a)break}if(!c)return[];for(const u of[s,a])if(u){const e=[u[1],u[2]];return u[3]&&e.push(u[3]),e.map((e=>parseInt(e,10)))}return[]};const wv=$l((async function(){try{if(De()){try{null===na.sync("lsb_release",{nothrow:!0})&&await Se([{name:"lsb-release"}])}catch{return Ct()}const e=await yv();return 0===e.length?Ct():e}return null}catch(e){return v(""+e),null}}),{promise:!0}),Ev=$l((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=ee("~/.local/pipx");if(await Z(t))return t;switch(process.platform){case"win32":e=ee("~/AppData/Local/pipx");break;case"darwin":e=ee("~/Library/Application Support/pipx");break;default:e=ee("~/.local/share/pipx")}return await cv(e),await cv(Ir(e,"trash")),await cv(Ir(e,"shared")),await cv(Ir(e,"venv")),e}),{promise:!0}),_v=$l((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=ee("~/.local/bin");return await ie(e,ny),await cv(e),e}),{promise:!0}),bv=$l((async function(){const e=(await St(Nt("python",void 0,await wv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),Ov=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"]]]),Rv=$l((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||sn.release()).split(".")[0];const[t,r]=Ov.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Sv="string"==typeof __dirname?__dirname:Sr.dirname(hn(import.meta.url)),Iv="string"==typeof __dirname?__dirname:Sr.dirname(hn(import.meta.url));class Tv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class xv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Pv=e=>void 0===globalThis.DOMException?new xv(e):new DOMException(e),Av=e=>{const t=void 0===e.reason?Pv("This operation was aborted."):e.reason;return t instanceof Error?t:Pv(t)},Nv=h(),$v=Hr,Cv=gr,Lv=Sr,Dv=fn,kv=Dv.env["ProgramFiles(x86)"],Uv=[Dv.env["ProgramFiles(x86)"],Dv.env.ProgramFiles],jv=["Enterprise","Professional","Community","BuildTools"],Fv=["2022","2019","2017"],Mv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Gv=Qt;const Bv=kv+"\\Microsoft Visual Studio\\Installer";var Hv=er,qv=function(e,t,r,n,o,i){if("win32"!=Dv.platform)return void Nv.info("This is not a Windows virtual environment, bye!");Dv.env.PATH+=Lv.delimiter+Bv;let s={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in s&&(e=s[e.toLowerCase()]);var a=[e];n&&!0===JSON.parse(n)&&a.push("uwp"),t&&a.push(t),r&&a.push("-vcvars_ver="+r),o&&!0===JSON.parse(o)&&a.push("-vcvars_spectre_libs=spectre");const c=`"${er(i)}" ${a.join(" ")}`;Nv.debug("vcvars command-line: "+c);const u=(""+$v.execSync(`set && cls && ${c} && cls && set`,{shell:"cmd"})).split("\f"),l=u[0].split("\r\n"),p=u[1].split("\r\n"),f=u[2].split("\r\n"),d=p.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(d.length>0)throw Error("invalid parameters\r\n"+d.join("\r\n"));let h={};for(let m of l){const[e,t]=m.split("=");h[e]=t}Nv.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Nv.info("Setting "+e),tr(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Nv.exportVariable(e,t))}Nv.endGroup(),Nv.info("Configured Developer Command Prompt")},Vv=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(Vv||{});const zv="string"==typeof __dirname?__dirname:Sr.dirname(hn(import.meta.url)),Xv="string"==typeof __dirname?__dirname:Sr.dirname(hn(import.meta.url)),Wv=$l((async function(e,t,r){const[n,o]=await Promise.all([sr(e,t,r),cr()]);return await Kv(r),n}),{promise:!0}),Yv=$l((async function(e){De()?e>10?await Se([{name:"libtinfo-dev"}]):await Se([{name:"libtinfo5"}]):Le()?await Fe("ncurses5-compat-libs",void 0,"yay"):Ce()&&await je([{name:"ncurses-compat-libs"}])}),{promise:!0}),Kv=$l((async function(e){"linux"===process.platform&&await zt(Nt("gcc",void 0,await wv()),"",e,40)}),{promise:!0}),Jv="string"==typeof __dirname?__dirname:Sr.dirname(hn(import.meta.url));let Qv,Zv=!1;const ey={nala:async function(e,t,r){if(!De())return;if("string"==typeof Qv)return{binDir:Qv};const n=na.sync("nala",{nothrow:!0});if(null!==n)return Qv=xr(n),{binDir:Qv};await Se([{name:"python3-apt"}]),Qv="/usr/bin";try{const t=await Oe({name:"nala",version:e});if(void 0!==t)return await Se([{name:t}]),{binDir:Qv}}catch(o){g("Failed to install nala: "+o)}try{const e=await Oe({name:"nala-legacy"});if(void 0!==e)return await Se([{name:e}],!0),{binDir:Qv}}catch(o){g("Failed to install nala-legacy: "+o)}return await async function(){const e=new kd.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",yr(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Ir(yr(),"install-nala.sh"),r=await Qr(t,"utf8");await Zr(t,r.replace(/sudo/g,"")),await Se([{name:"wget"}]);try{k("bash",[t])}catch(o){m("Failed to install nala via installer: "+o),k("apt",["install","-y","-t","nala","nala"])}}(),{binDir:Qv}},cmake:bt,ninja:Wt,python:St,vcpkg:async function(e,t,r){return Zv&&null!==na.sync("vcpkg",{nothrow:!0})?{binDir:xr(na.sync("vcpkg"))}:("linux"===process.platform&&(Le()?await Promise.all([Fe("curl"),Fe("zip"),Fe("unzip"),Fe("tar"),Fe("git"),Fe("pkg-config")]):Ce()?await je([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):De()&&await Se([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await Z(Ir(t,Xe("bootstrap-vcpkg",".bat")))?y(`Vcpkg folder already exists at ${t}. Skipping the clone`):P("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:xr(t),stdio:"inherit"}),""!==e&&"true"!==e&&(g("Checking out vcpkg version "+e),P("git",["checkout",e],{cwd:t,stdio:"inherit"})),P(Xe(We("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await G(t),await ie(t,ny),Zv=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return Ue("bazelisk",e);case"darwin":return $e("bazelisk",e);case"linux":if(Le())throw Error("installing bazel on Arch linux is not supported yet");if(Ce())return await je([{name:"dnf-plugins-core"}]),k("dnf",["copr","enable","vbatts/bazel"]),je([{name:"bazel4"}]);if(De())return k("bash",["-c",`echo "deb [arch=amd64 signed-by=${await Ie({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`]),Se([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Lt("conan",e)},meson:function(e,t,r){return Lt("meson",e)},gcovr:function(e,t,r){return Lt("gcovr",e)},opencppcoverage:async function(e,t,r){if("win32"===process.platform)return await Ue("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await ie(e,ny),e}()}},llvm:ir,gcc:zt,choco:ke,brew:Pe,powershell:async function(e,t,r){try{return await Et("pwsh",e,lr,t,r)}catch(n){return m(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Ue("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await ie(t,ny),{binDir:t}}case"darwin":return $e("powershell",e,{cask:!0,overwrite:!1});case"linux":if(Le())return Fe("powershell-bin",e,"yay");if(Ce())return await je([{name:"curl"}]),k("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),je([{name:"powershell",version:e}]);if(De()){await Se([{name:"curl"}]);const t=await wv();return k("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),k("dpkg",["-i","packages-microsoft-prod.deb"]),Se([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}},ccache:function(e,t,r){switch(process.platform){case"win32":return Ue("ccache",e);case"darwin":return $e("ccache",e);case"linux":if(Le())return Fe("ccache",e);if(Ce())return je([{name:"ccache",version:e}]);if(De())return Se([{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 Ue("sccache",e);case"linux":case"darwin":return $e("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await zm((()=>Ue("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>g(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 Z(Ir(e,"doxygen.exe")))return await ie(e,ny),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await jt(Nt("graphviz",void 0)),t}case"darwin":{const e=await $e("doxygen",void 0);return Rv()[0]>11&&await jt(Nt("graphviz",void 0)),e}case"linux":{let o;if(""===e||Le()||Ce())if(Le())o=await Fe("doxygen",e);else{if(Ce())return je([{name:"doxygen",version:e}]);if(!De())throw Error("Unsupported linux distributions");o=await Se([{name:"doxygen",version:e}])}else{if(!De())throw Error("Unsupported linux distributions");try{o=await Et("doxygen",e,Mt,t,r);try{await Se([{name:"libclang-cpp9"}])}catch(n){g("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){y(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),o=await Se([{name:"doxygen"}])}}return await jt(Nt("graphviz",void 0,await wv())),o}default:throw Error("Unsupported platform")}},graphviz:jt,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await Ue("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await ie(e,ny),e}()};case"darwin":return $e("cppcheck",e);case"linux":if(Le())return Fe("cppcheck",e);if(Ce())return je([{name:"ccache",version:e}]);if(De())return Se([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},clangtidy:function(e,t,r){return sr(e,t,r)},clangformat:function(e,t,r){return sr(e,t,r,Vv.ClangFormat)},msvc:ur,vcvarsall:rr,kcov:async function(e,t,r){if("linux"!==process.platform)return void g("Kcov is not supported on non-linux");const n=e.split("-");let o=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const i=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(o);let a;return 38===s&&(o="v38"),"binary"!==i||39>s?(a=await Et("kcov",o,Kt,t,r),a):(a=await Et("kcov",o,Yt,t,r),Le()?await Fe("binutils"):Ce()?await je([{name:"binutils"}]):De()&&await Se([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return Ue("make",e);case"darwin":{await $e("make",e);const t=Ir(Ne(),"opt/make/libexec/gnubin");return await ie(t,ny),{binDir:t}}case"linux":if(Le())return Fe("make",e);if(Ce())return je([{name:"make",version:e}]);if(De())return Se([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return Et("task",e,fr,t,r)},sevenzip:ht},ty=Object.keys(ey),ry=["compiler","architecture","timeout",...ty],ny={rcPath:ee("~/.cpprc"),guard:"cpp"};(async function(e){let t=Promise.resolve();wn.GITHUB_ACTIONS||(t=async function(){try{await Ld({pkg:Dd})}catch(e){v("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS="true");const r=function(e){return function(e,t){var r,n,o,i,s,a={_:[]},c=0,u=0,l=0,p=(e=e||[]).length;const f=void 0!==(t=t||{}).alias,d=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=he(t.string),t.boolean=he(t.boolean),f)for(r in t.alias)for(n=t.alias[r]=he(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(i=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],void 0!==t[i])for(t[i].push(r),c=0;n.length>c;c++)t[i].push(n[c]);const m=d?Object.keys(t.alias):[];for(c=0;p>c;c++){if("--"===(o=e[c])){a._=a._.concat(e.slice(++c));break}for(u=0;o.length>u&&45===o.charCodeAt(u);u++);if(0===u)a._.push(o);else if("no-"===o.substring(u,u+3)){if(i=o.substring(u+3),d&&!~m.indexOf(i))return t.unknown(o);a[i]=!1}else{for(l=u+1;o.length>l&&61!==o.charCodeAt(l);l++);for(i=o.substring(u,l),s=o.substring(++l)||c+1===p||45===(""+e[c+1]).charCodeAt(0)||e[++c],n=2===u?[i]:i,l=0;n.length>l;l++){if(i=n[l],d&&!~m.indexOf(i))return t.unknown("-".repeat(u)+i);me(a,i,n.length>l+1||s,t)}}}if(h)for(r in t.default)void 0===a[r]&&(a[r]=t.default[r]);if(f)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}(e,{string:[...ry,"timeout"],default:Object.fromEntries(ry.map((e=>[e,dr(e)]))),alias:{h:"help"},boolean:"help"})}(e);r.help&&(g('\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 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 you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));const n=r.architecture??process.arch,o=process.env.SETUP_CPP_DIR??ee("~"),i=[],s=[],a=up.create({autoloadLocales:!0});let c,u;up.addLocale(lp),tp.addLocale(rp);const l=await wv();if(!function(e){const t=["llvm","clangtidy","clangformat"].filter((t=>void 0!==e[t])),r=t.filter((t=>!$t(e[t]))),n=1>r.length?"true":e[r[0]];if(r.some((t=>e[t]!==n)))return!1;for(const o of t)e[o]=n;return!0}(r))return m("The same version must be used for llvm, clangformat and clangtidy"),1;Le()&&"string"==typeof r.cppcheck&&"string"==typeof r.gcovr&&(g("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await Fe("python-pygments"));let p=!1;for(const f of ty){if(wn.isCI&&0!==s.length){p=!0;break}const e=r[f];void 0!==e&&(c=Date.now(),await nr(f,e,l,n,o,i,s,6e4*Number.parseFloat(r.timeout??"20")),u=Date.now(),g("took "+(a.format(c,u)||"0 seconds")))}if(!p){const e=r.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i){try{const{compiler:s,version:a}=function(e){const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null!==Cp(e)||g(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}(e);switch(Co.startGroup(`Installing ${s} ${a??""}`),s){case"llvm":case"clang":case"clang++":{const e=await ir(Nt("llvm",a,t),Ir(r,"llvm"),n);await ne("GCOV","llvm-cov gcov",ny),o.push(hr("llvm",e));break}case"gcc":case"mingw":case"cygwin":case"msys":{const e=Nt("mingw"===s?"mingw":"gcc",a,t),i="mingw"===s?await async function(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return zt(e,t,r);case"linux":Le()?n=await Fe("mingw-w64-gcc",e):Ce()?n=await je([{name:"mingw64-gcc",version:e}]):De()&&(n=await Se([{name:"mingw-w64",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!==n)return n}(e,Ir(r,"gcc"),n):await zt(e,Ir(r,"gcc"),n);await function(e){const t=Cp(e),r=null!==t?Fp(t):e;return ne("GCOV",""!==r?"gcov-"+r:"gcov",ny)}(e),o.push(hr("gcc",i));break}case"cl":case"msvc":case"msbuild":case"vs":case"visualstudio":case"visualcpp":case"visualc++":{const e=await ur(Nt("msvc",a,t),Ir(r,"msvc"),n);o.push(hr("msvc",e));break}case"appleclang":case"applellvm":Co.notice("Assuming apple-clang is already installed"),await Promise.all([ne("CC","clang",ny),ne("CXX","clang++",ny)]),o.push(hr("apple-clang",void 0));break;default:i.push("Unsupported compiler "+s)}}catch(s){m(s),i.push("Failed to install the "+e)}Co.endGroup()}(e,l,o,n,i,s);const r=Date.now();g("took "+(a.format(t,r)||"0 seconds"))}}if(await async function(e){if(await Z(e.rcPath)){const t=(await Dl(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await kl(e.rcPath,r.join("\n")),await G(e.rcPath)}}(ny),0===i.length&&0===s.length)return v("setup-cpp was called without any arguments. Nothing to do."),0;for(const f of i)console.log(`${f}`);for(const f of s)m(f);if(g("setup-cpp finished"),!wn.GITHUB_ACTIONS)switch(process.platform){case"win32":v("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":v("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await t,0===s.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{m("main() panicked!"),m(e),process.exitCode=1}));export{vd as a,Co as b,gn as c,fm as d,qh as e,g as f,um as g,wn as h,Rh as i,e as j,Z as p,h as r,kh as s,lo as t,Hh as v,v as w}; +function e(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function t(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 r(e,t,r){const n=new Un(e,t,r);process.stdout.write(""+n+Dn.EOL)}function n(){return Mn>Fn.length-16&&(Nr.randomFillSync(Fn),Mn=0),Fn.slice(Mn,Mn+=16)}function o(e){return"string"==typeof e&&Gn.test(e)}function i(e,t=0){const r=(Bn[e[t+0]]+Bn[e[t+1]]+Bn[e[t+2]]+Bn[e[t+3]]+"-"+Bn[e[t+4]]+Bn[e[t+5]]+"-"+Bn[e[t+6]]+Bn[e[t+7]]+"-"+Bn[e[t+8]]+Bn[e[t+9]]+"-"+Bn[e[t+10]]+Bn[e[t+11]]+Bn[e[t+12]]+Bn[e[t+13]]+Bn[e[t+14]]+Bn[e[t+15]]).toLowerCase();if(!o(r))throw TypeError("Stringified UUID is invalid");return r}function s(e){if(!o(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}function a(e,t,r){function n(e,n,o,a){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;e.length>r;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=s(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+e.length);if(c.set(n),c.set(e,n.length),c=r(c),c[6]=15&c[6]|t,c[8]=63&c[8]|128,o){a=a||0;for(let e=0;16>e;++e)o[a+e]=c[e];return o}return i(c)}try{n.name=e}catch(o){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function c(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=+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 o of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e)))if("*"===o||n.some((e=>e===o||e.endsWith("."+o)||o.startsWith(".")&&e.endsWith(""+o))))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 io(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new io("http://"+r)}}function l(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||lo.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",(function(e,r,n,o){for(var i=p(r,n,o),s=0,a=t.requests.length;a>s;++s){var c=t.requests[s];if(c.host===i.host&&c.port===i.port)return t.requests.splice(s,1),void c.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function u(e,t){var r=this;l.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host"),i=f({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host}),s=co.connect(0,i);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function p(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function f(e){for(var t=1,r=arguments.length;r>t;++t){var n=arguments[t];if("object"==typeof n)for(var o=Object.keys(n),i=0,s=o.length;s>i;++i){var a=o[i];void 0!==n[a]&&(e[a]=n[a])}}return e}function d(){return No||(No=1,function(e){var t=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=br,n=Sr,{access:o,appendFile:i,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 o(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}${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:i;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(""),o=this.wrap(r,n);return this.addRaw(o).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:o}=e,i=t?"th":"td",s=Object.assign(Object.assign({},n&&{colspan:n}),o&&{rowspan:o});return this.wrap(i,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:o}=r||{},i=Object.assign(Object.assign({},n&&{width:n}),o&&{height:o}),s=this.wrap("img",null,Object.assign({src:e,alt:t},i));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}(Fo)),Fo}function h(){return Co||(Co=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={}){l.issueCommand("error",p.toCommandProperties(t),e instanceof Error?""+e:e)}function n(e){l.issue("group",e)}function o(){l.issue("endgroup")}var i=In&&In.__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=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=In&&In.__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)&&i(t,e,r);return s(t,e),t},c=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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.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 l=An,u=jn,p=Nn,f=a(br),m=a($r),v=function(){if(xo)return oo;xo=1;var e=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(oo,"__esModule",{value:!0}),oo.OidcClient=void 0;const t=To,n=Po,o=h();class i{static createHttpClient(e=!0,r=10){const o={allowRetries:e,maxRetries:r};return new t.HttpClient("actions/oidc-client",[new n.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)}`),o.debug("ID token url is "+e);const r=yield i.getCall(e);return o.setSecret(r),r}catch(r){throw Error("Error message: "+r.message)}}))}}return oo.OidcClient=i,oo}();var y,g;(g=y=e.ExitCode||(e.ExitCode={}))[g.Success=0]="Success",g[g.Failure=1]="Failure",e.exportVariable=function(e,t){const r=p.toCommandValue(t);if(process.env[e]=r,process.env.GITHUB_ENV)return u.issueFileCommand("ENV",u.prepareKeyValueMessage(e,t));l.issueCommand("set-env",{name:e},r)},e.setSecret=function(e){l.issueCommand("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?u.issueFileCommand("PATH",e):l.issueCommand("add-path",{},e),process.env.PATH=`${e}${m.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 u.issueFileCommand("OUTPUT",u.prepareKeyValueMessage(e,t));process.stdout.write(f.EOL),l.issueCommand("set-output",{name:e},p.toCommandValue(t))},e.setCommandEcho=function(e){l.issue("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=y.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){l.issueCommand("debug",{},e)},e.error=r,e.warning=function(e,t={}){l.issueCommand("warning",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){l.issueCommand("notice",p.toCommandProperties(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+f.EOL)},e.startGroup=n,e.endGroup=o,e.group=function(e,t){return c(this,void 0,void 0,(function*(){let r;n(e);try{r=yield t()}finally{o()}return r}))},e.saveState=function(e,t){if(process.env.GITHUB_STATE)return u.issueFileCommand("STATE",u.prepareKeyValueMessage(e,t));l.issueCommand("save-state",{name:e},p.toCommandValue(t))},e.getState=function(e){return process.env["STATE_"+e]||""},e.getIDToken=function(e){return c(this,void 0,void 0,(function*(){return yield v.OidcClient.getIDToken(e)}))};var w=d();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return w.summary}});var E=d();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return E.markdownSummary}});var _=function(){if($o)return Mo;$o=1;var e=In&&In.__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=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=In&&In.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&Object.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.toPlatformPath=Mo.toWin32Path=Mo.toPosixPath=void 0;const n=r($r);return Mo.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Mo.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Mo.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Mo}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return _.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return _.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return _.toPlatformPath}})}(Pn)),Pn}function m(e){return Tn.GITHUB_ACTIONS?Go.error(e):console.log(`${e}`)}function v(e){return Tn.GITHUB_ACTIONS?Go.warning(e):console.log(`${e}`)}function y(e){return Tn.GITHUB_ACTIONS?Go.notice(e):console.log(`${e}`)}function g(e){return Tn.GITHUB_ACTIONS?Go.info(e):console.log(e)}function w(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){w(e,t||{},(function(e,t){e?n(e):r(t)}))}))}jo(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function E(e,t){const r=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void 0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(a){}let s;try{s=ti.sync(e.command,{path:r[ri({env:r})],pathExt:t?ei.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=ei.resolve(o?e.options.cwd:"",s)),s}function _(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 b(e,t){return hi&&1===e&&!t.file?_(t.original,"spawn"):null}function O(e,t,r){const n=vi(e,t,r),o=mi.spawn(n.command,n.args,n.options);return yi.hookChildProcess(o,n),o}function R(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 S(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function I(e){return S(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}async function T(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=vs(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=ds.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await ys(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new gs)}))})),n.getBufferedValue()}function x(e,t,r){const n=js(e,t,r),o=Ns(e,t),i=$s(e,t);let s;Us(i,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=un.spawn(n.file,n.args,n.options)}catch(p){const e=new un.ChildProcess,t=Promise.reject(Di({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Ts(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 o;const i=new Promise(((n,i)=>{o=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),s=n.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])})(s,n.options,a),l=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=ns((()=>{e.kill()}));return n.finally((()=>{o()}))})(s,n.options,c);s.kill=os.bind(null,s.kill.bind(s)),s.cancel=ls.bind(null,s,{isCanceled:!1});const u=Ii((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,u,p]=await(async({stdout:t,stderr:r,all:n},{encoding:o,buffer:i,maxBuffer:s},a)=>{const c=Rs(t,{encoding:o,buffer:i,maxBuffer:s}),l=Rs(r,{encoding:o,buffer:i,maxBuffer:s}),u=Rs(n,{encoding:o,buffer:i,maxBuffer:2*s});try{return await Promise.all([a,c,l,u])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},Os(t,c),Os(r,l),Os(n,u)])}})(s,n.options,l),f=Fs(n.options,c),d=Fs(n.options,u),h=Fs(n.options,p);if(e||0!==t||null!==r){const c=Di({error:e,exitCode:t,signal:r,stdout:f,stderr:d,all:h,command:o,escapedCommand:i,parsed:n,timedOut:a,isCanceled:!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:o,escapedCommand:i,exitCode:0,stdout:f,stderr:d,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(bs(e),yn(t)))(t);void 0!==r&&(S(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=_s();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=us.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=us.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=us.bind(void 0,e,"all"))})(s),Ts(s,u),s}function P(e,t,r){const n=js(e,t,r),o=Ns(e,t),i=$s(e,t);Us(i,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(bs(e),vn(t)))(e);if(S(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=un.spawnSync(n.file,n.args,{...n.options,input:s})}catch(u){throw Di({error:u,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=Fs(n.options,a.stdout,a.error),l=Fs(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Di({stdout:c,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:i,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:o,escapedCommand:i,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function A(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return x(function(){if(void 0===fa){const e=pa.sync("pwsh",{nothrow:!0});null!==e&&(fa=e);const t=pa.sync("powershell",{nothrow:!0});null!==t&&(fa=t)}if(void 0===fa)throw Error("Could not find powershell");return fa}(),[...t,"-c",e],r)}function N(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function $(){return null!==pa.sync("sudo",{nothrow:!0})}function C(){return 0===process.getuid?.()||!!process.env.CI}function L(){return C()&&$()}function D(e){return L()?"sudo "+e:e}function k(e,t=[],r=ma){return L()?function(e,t){const[r,...n]=Ls(e);return P(r,n,t)}(j(e,t),r):P(e,F(t),r)}function U(e,t=[],r=ma){return L()?function(e,t){const[r,...n]=Ls(e);return x(r,n,t)}(j(e,t),r):x(e,F(t),r)}function j(e,t){return"sudo "+F([e,...t]).join(" ")}function F(e){return e.map((e=>`'${e}'`))}function M(){return"win32"===process.platform?va():C()}async function G(e){if(("linux"===process.platform||"darwin"===process.platform)&&L()&&void 0!==process.env.SUDO_USER){let t=Sr.statSync(e).isDirectory();await U("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],ma)}}function B(){if(ac)return sc;ac=1;var e=za,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return sc=function(i,s){var a,c=Object(e(s));if(i=Object(e(i)),n(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),"function"==typeof o&&o(c).forEach((function(e){try{t(i,e,r(s,e))}catch(n){a=n}})),void 0!==a)throw a;return i}}function H(){return Fc?jc:(Fc=1,jc=(Dc?Lc:(Dc=1,Lc=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Uc)return kc;Uc=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 kc=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 q(){if(Vc)return qc;Vc=1;var e=Hc?Bc:(Hc=1,Bc=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return qc=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function V(){return tl?el:(tl=1,el=function(){if(Gc)return Mc;Gc=1;var e=H(),t={object:!0,symbol:!0};return Mc=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?H().Symbol:function(){if(Zc)return Qc;Zc=1;var e,t,r,n=Ac,o=q(),i=H().Symbol,s=function(){if(Xc)return zc;Xc=1;var e=Ac,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return zc=function(o){for(var i,s,a=0;n[o+(a||"")];)++a;return n[o+=a||""]=!0,t(r,i="@@"+o,e.gs(null,(function(r){s||(s=!0,t(this,i,e(r)),s=!1)}))),i}}(),a=function(){if(Yc)return Wc;Yc=1;var e=Ac,t=H().Symbol;return Wc=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(Jc)return Kc;Jc=1;var e=Ac,t=q(),r=Object.create(null);return Kc=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}))})}}(),l=Object.create,u=Object.defineProperties,p=Object.defineProperty;if("function"==typeof i)try{i(),r=!0}catch(f){}else i=null;return t=function(r){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return e(r)},Qc=e=function e(o){var a;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return r?i(o):(a=l(t.prototype),u(a,{__description__:n("",o=void 0===o?"":o+""),__name__:n("",s(o))}))},a(e),c(e),u(t.prototype,{constructor:n(e),toString:n("",(function(){return this.__name__}))}),u(e.prototype,{toString:n((function(){return"Symbol ("+o(this).__description__+")"})),valueOf:n((function(){return o(this)}))}),p(e.prototype,e.toPrimitive,n("",(function(){var e=o(this);return"symbol"==typeof e?e:""+e}))),p(e.prototype,e.toStringTag,n("c","Symbol")),p(t.prototype,e.toStringTag,n("c",e.prototype[e.toStringTag])),p(t.prototype,e.toPrimitive,n("c",e.prototype[e.toPrimitive])),Qc}())}function z(){return pl?ul:(pl=1,ul=(Cc?$c:(Cc=1,$c=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(ll)return cl;ll=1;var e=V().iterator,t=function(){if(nl)return rl;nl=1;var e={}.toString,t=e.call(function(){return arguments}());return rl=function(r){return e.call(r)===t}}(),r=function(){if(il)return ol;il=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return ol=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=Ga,o=qa,i=za,s=$a,a=function(){if(al)return sl;al=1;var e={}.toString,t=e.call("");return sl=function(r){return"string"==typeof r||r&&"object"==typeof r&&(r instanceof String||e.call(r)===t)||!1}}(),c=Array.isArray,l=function(){}.call,u={configurable:!0,enumerable:!0,writable:!0,value:null},p=Object.defineProperty;return cl=function(f){var d,h,m,v,y,g,w,E,_,b,O=arguments[1],R=arguments[2];if(f=Object(i(f)),s(O)&&o(O),this&&this!==Array&&r(this))d=this;else{if(!O){if(t(f))return 1!==(y=f.length)?Array.apply(null,f):((v=[,])[0]=f[0],v);if(c(f)){for(v=Array(y=f.length),h=0;y>h;++h)v[h]=f[h];return v}}v=[]}if(!c(f))if(void 0!==(_=f[e])){for(w=o(_).call(f),d&&(v=new d),E=w.next(),h=0;!E.done;)b=O?l.call(O,R,E.value,h):E.value,d?(u.value=b,p(v,h,u)):v[h]=b,E=w.next(),++h;y=h}else if(a(f)){for(y=f.length,d&&(v=new d),h=0,m=0;y>h;++h)b=f[h],y>h+1&&(55296>(g=b.charCodeAt(0))||g>56319||(b+=f[++h])),b=O?l.call(O,R,b,m):b,d?(u.value=b,p(v,m,u)):v[m]=b,++m;y=m}if(void 0===y)for(y=n(f.length),d&&(v=new d(y)),h=0;y>h;++h)b=O?l.call(O,R,f[h],h):f[h],d?(u.value=b,p(v,h,u)):v[h]=b;return d&&(u.value=null,v.length=y),v},cl}())}function X(){if(Al)return Pl;Al=1;var e=xl?Tl:(xl=1,Tl=(Rl?Ol:(Rl=1,Ol=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:Il?Sl:(Il=1,Sl=function(e){return e!=e})),t=Ga,r=za,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return Pl=function(a){var c,l,u;if(!e(a))return n.apply(this,arguments);for(l=t(r(this).length),c=u=isNaN(u=arguments[1])?0:0>u?t(this.length)-s(i(u)):s(u);l>c;++c)if(o.call(this,c)&&e(this[c]))return c;return-1},Pl}function W(){if(jl)return Ul;jl=1;var e=qa,t=Za,r=function(){}.call;return Ul=function(n,o){var i={},s=arguments[2];return e(o),t(n,(function(e,t,n,a){i[t]=r.call(o,s,e,t,n,a)})),i},Ul}function Y(){if(Ml)return Fl;Ml=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,o=document.createTextNode(""),i=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(o.data=i=++i%2;n;)e=n.shift(),n.length||(n=null),e()})).observe(o,{characterData:!0}),function(t){e(t),r?"function"==typeof r?r=[r,t]:r.push(t):(r=t,o.data=i=++i%2)}};return Fl=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 K(){return Vl?ql:(Vl=1,ql=function(e){return"function"==typeof e})}function J(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return eu||(eu=1,Nu.exports=e,Nu.exports.default=e),Nu.exports}function Q(){if(tu)return Au;tu=1;var e=W(),t=function(){if(Hl)return Bl;Hl=1;var e=[].forEach,t=Object.create;return Bl=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Bl}(),r=function(){if(Yl)return Wl;Yl=1;var e=za,t=function(){if(Xl)return zl;Xl=1;var e=K();return zl=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Wl=function(r){return t(e(r))}}(),n=function(){if(Zl)return Ql;Zl=1;var e=function(){if(Jl)return Kl;Jl=1;var e=K();return Kl=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return""}}}();return Ql=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)}))}}(),o=J(),i=Y(),s=Object.create,a=t("then","then:finally","done","done:finally");return ec.promise=function(t,c){var l=s(null),u=s(null),p=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(!o(n))return u[e]=n,void c.emit("setasync",e,1);l[e]=1,p[e]=n;var a=function(t){var r=l[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 l[e],u[e]=t,c.emit("setasync",e,r))},f=function(){s=!0,l[e]&&(delete l[e],delete p[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){i(f)};"function"==typeof(n=n.then((function(e){i(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,f)}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(f)}})),c.on("get",(function(e,t,r){var n;if(l[e])++l[e];else{var s=function(){c.emit("getasync",e,t,r)};o(n=p[e])?"function"==typeof n.done?n.done(s):n.then((function(){i(s)})):s()}})),c.on("delete",(function(e){if(delete p[e],l[e])delete l[e];else if(hasOwnProperty.call(u,e)){var t=u[e];delete u[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=u;u=s(null),l=s(null),p=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},Au}async function Z(e){try{return await gn.access(e),!0}catch{return!1}}function ee(e){const t=function(){if(L()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Cr("/Users/",process.env.SUDO_USER):Cr("/home/",process.env.SUDO_USER);{const e=Or();if(""===e)return;return e}}();return void 0===t?e:e.replace(Gu,t)}async function te(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 Z(e.rcPath)&&((await Hu(e.rcPath,"utf8")).includes(t)||(await Bu(e.rcPath,`\n${t}\n`),g(`Added ${t} to ${e.rcPath}`)))}async function re(e,t){await Z(t)&&((await Hu(t,"utf-8")).includes(e)||(await Bu(t,e),g(`${e} was added to ${t}`)))}async function ne(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Vu,...r},o=function(e,t=!1){const r=t?Ju(e):e;return np(r,'"',"\\")}(t??"",n.escapeSpace);try{if(Tn.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void g(`Environment variable ${e} is already defined. Skipping.`);Go.exportVariable(e,o)}catch(i){m(i),await oe(e,o,n)}else await oe(e,o,n)}catch(i){m(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function oe(e,t,r){const n=t??"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await A(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void g(`${e}='${n}' was set in the environment.`)):void g(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await zu(r),void(r.overwrite?(await op(r.rcPath,`\nexport ${e}="${n}"\n`),g(`${e}="${n}" was added to "${r.rcPath}`)):(await op(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),g(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function ie(e,t={}){const r={rcPath:Vu,...t};if(!function(e){return!!sp.some((t=>t.test(e)))&&(process.env.PATH?.split(Lr)??[]).includes(e)}(e)){process.env.PATH=`${e}${Lr}${process.env.PATH}`;try{if(Tn.GITHUB_ACTIONS)try{Go.addPath(e)}catch(n){m(n),await se(e,r)}else await se(e,r)}catch(n){m(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function se(e,t){switch(process.platform){case"win32":return await A(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void g(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await zu(t),await ip(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void g(`"${e}" was added to "${t.rcPath}"`);default:return}}function ae(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 ce(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;vp[e]=r}}function le(e,t,r){const n=function(e){const t=vp[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}(r);return fp.pluralize(r.locale,t,n[e]).replace("{0}",t)}function ue(){if(Lf)return Cf;Lf=1;const e=/\s+/g;class t{constructor(r,i){if(i=n(i),r instanceof t)return r.loose===!!i.loose&&r.includePrerelease===!!i.includePrerelease?r:new t(r.raw,i);if(r instanceof o)return this.raw=r.value,this.set=[[r]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.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&&f)|(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],T(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],l),i("comparator trim",e),e=e.replace(a[c.TILDETRIM],u),i("tilde trim",e),e=e.replace(a[c.CARETTRIM],p),i("caret trim",e);let m=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>I(e,this.options)));s&&(m=m.filter((e=>(i("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),i("range list",m);const v=new Map,g=m.map((e=>new o(e,this.options)));for(const r of g){if(h(r))return[r];v.set(r.value,r)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return r.set(t,w),w}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>v(t,r)&&e.set.some((e=>v(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(x(this.set[r],e,this.options))return!0;return!1}}Cf=t;const r=new Uf,n=Sp,o=pe(),i=_p,s=kp,{safeRe:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:p}=bp,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=Ep,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},y=(e,t)=>(i("comp",e,t),e=_(e,t),i("caret",e),e=w(e,t),i("tildes",e),e=O(e,t),i("xrange",e),e=S(e,t),i("stars",e),e),g=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(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,o,s)=>{let a;return i("tilde",e,t,r,n,o,s),g(r)?a="":g(n)?a=`>=${r}.0.0 <${+r+1}.0.0-0`:g(o)?a=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:s?(i("replaceTilde pr",s),a=`>=${r}.${n}.${o}-${s} <${r}.${+n+1}.0-0`):a=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,i("tilde return",a),a})),_=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{i("caret",e,t);const r=t.includePrerelease?"-0":"";return e.replace(t.loose?a[c.CARETLOOSE]:a[c.CARET],((t,n,o,s,a)=>{let c;return i("caret",e,t,n,o,s,a),g(n)?c="":g(o)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:g(s)?c="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:a?(i("replaceCaret pr",a),c="0"===n?"0"===o?`>=${n}.${o}.${s}-${a} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}-${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s}-${a} <${+n+1}.0.0-0`):(i("no pr"),c="0"===n?"0"===o?`>=${n}.${o}.${s}${r} <${n}.${o}.${+s+1}-0`:`>=${n}.${o}.${s}${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${s} <${+n+1}.0.0-0`),i("caret return",c),c}))},O=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map((e=>R(e,t))).join(" ")),R=(e,t)=>(e=e.trim()).replace(t.loose?a[c.XRANGELOOSE]:a[c.XRANGE],((r,n,o,s,a,c)=>{i("xRange",e,r,n,o,s,a,c);const l=g(o),u=l||g(s),p=u||g(a);return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(u&&(s=0),a=0,">"===n?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):"<="===n&&(n="<",u?o=+o+1:s=+s+1),"<"===n&&(c="-0"),r=`${n+o}.${s}.${a}${c}`):u?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:p&&(r=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),i("xRange return",r),r})),S=(e,t)=>(i("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),I=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),T=e=>(t,r,n,o,i,s,a,c,l,u,p,f)=>`${r=g(n)?"":g(o)?`>=${n}.0.0${e?"-0":""}`:g(i)?`>=${n}.${o}.0${e?"-0":""}`:s?">="+r:`>=${r}${e?"-0":""}`} ${c=g(l)?"":g(u)?`<${+l+1}.0.0-0`:g(p)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${p}-${f}`:e?`<${l}.${u}.${+p+1}-0`:"<="+c}`.trim(),x=(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(i(e[r].semver),e[r].semver!==o.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 Cf}function pe(){if(kf)return Df;kf=1;const e=Symbol();class t{static get ANY(){return e}constructor(n,o){if(o=r(o),n instanceof t){if(n.loose===!!o.loose)return n;n=n.value}n=n.trim().split(/\s+/).join(" "),s("comparator",n,o),this.options=o,this.loose=!!o.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[o.COMPARATORLOOSE]:n[o.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 i(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("="))&&!(i(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}Df=t;const r=Sp,{safeRe:n,t:o}=bp,i=If,s=_p,a=kp,c=ue();return Df}function fe(e,t,r,n){return new(r||(r=Promise))((function(t,o){function i(e){try{a(n.next(e))}catch(t){o(t)}}function s(e){try{a(n.throw(e))}catch(t){o(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(i,s)}a((n=n.call(e)).next())}))}function de(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,o&&(i=2&r[0]?o.return:r[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,r[1])).done)return i;switch(o=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,o=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){a=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&i[3]>r[1])){a.label=r[1];break}if(6===r[0]&&i[1]>a.label){a.label=i[1],i=r;break}if(i&&i[2]>a.label){a.label=i[2],a.ops.push(r);break}i[2]&&a.ops.pop(),a.trys.pop();continue}r=t.call(e,a)}catch(c){r=[6,c],o=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,c])}}var n,o,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:r(0),throw:r(1),return:r(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s}function he(e){return null==e?[]:Array.isArray(e)?e:[e]}function me(e,t,r,n){var o,i=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*(o=+r)==0?o:r),!!r)):0*(o=+r)==0?o:r;e[t]=null==i?s:Array.isArray(i)?i.concat(s):[i,s]}async function ve(e,t,r,n=40){Tn.GITHUB_ACTIONS?await async function(e,t,r=40){await U("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await zu(r),await Vd(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function ye(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 ge(){return null!==pa.sync("nala",{nothrow:!0})}function we(){let e;return e=ge()?"nala":"apt-get",e}function Ee(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function _e(e){try{const{stdout:t}=await x("dpkg",["-s",e],{env:ye("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function be(e,t=we()){return(await Promise.all(e.map((e=>Oe(e,t))))).filter((e=>void 0!==e))}async function Oe(e,t=we()){const r=await async function(e,t,r){switch(await Re(e,t,r)){case Yd.NameDashVersion:return`${t}-${r}`;case Yd.NameEqualsVersion:return`${t}=${r}`;case Yd.Name:return void 0!==r&&""!==r&&v(`Could not find package ${t} with version ${r}. Installing the latest version.`),t;default:throw Error(`Could not find package ${t} ${r??""}`)}}(t,e.name,e.version);return await _e(r)?void 0:r}async function Re(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await x("apt-cache",["search","--names-only",`^${Ee(t)}-${Ee(r)}$`],{env:ye(e),stdio:"pipe"});if(""!==n.trim())return Yd.NameDashVersion;try{const{stdout:n}=await x("apt-cache",["show",`${t}=${r}`],{env:ye(e)});if(""===n.trim())return Yd.NameEqualsVersion}catch{}}try{const{stdout:r}=await x("apt-cache",["show",t],{env:ye(e),stdio:"pipe"});if(""!==r.trim())return Yd.Name}catch{}return Xd?Yd.None:(Wd(e),Re(e,t,r))}async function Se(e,t=!1){const r=we();for(const{name:i,version:s}of e)g(`Installing ${i} ${s??""} via ${r}`);t&&Wd(r),await async function(e,t){const r=[...new Set(t.flatMap((e=>e.repository??[])))];await Promise.all(r.map((t=>async function(e,t=we()){await Jd(t),await async function(e){await _e("software-properties-common")||k(e,["install","-y","--fix-broken","-o",zd,"software-properties-common"],{...ma,env:ye(e)})}(t),k("add-apt-repository",["-y","--no-update",e],{...ma,env:ye(t)}),Wd.clear(),Wd(t)}(t,e))))}(r,e);const n=await be(e,r);if(0===n.length)return g("All packages are already installed"),{binDir:"/usr/bin/"};await Jd(r);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?Ie(t):async function({key:e,keyServer:t=eh,fileName:r,keyStorePath:n=eh}){try{xe(r);const o=Cr(n,r);return await Z(o)||(Te(),await U("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await U("chmod",["644",o])),o}catch(o){return void v(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),k(r,["install","--fix-broken","-y",...n],{...ma,env:ye(r)})}catch(o){if(!function(e){return"string"==typeof e.stderr}(o))throw o;Qd.some((e=>o.stderr.includes(e)))&&(v(`Failed to install packages ${n}. Retrying...`),k(r,["install","--fix-broken","-y","-o",zd,...n],{...ma,env:ye(r)}))}return{binDir:"/usr/bin/"}}async function Ie({keyUrl:e,fileName:t,keyStorePath:r=Zd}){try{xe(t);const n=Cr(r,t);if(!(await Z(n))){Te(),await Se([{name:"ca-certificates"}]);const r=Cr(Rr(),t),o=new qd.DownloaderHelper(e,Rr(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),k("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),k("chmod",["644",n])}return n}catch(n){return void v(`Failed to add apt key via download ${e}: ${n}`)}}function Te(){k("gpg",["-k"])}function xe(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function Pe(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof th)return{binDir:th};const t=await pa("brew",{nothrow:!0});if(null!==t)return th=Dr(t),{binDir:th};await Se([{name:"ca-certificates"}]);const r=new qd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",Rr(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),P("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),th=Ae(),await ie(th,e.rcOptions),{binDir:th}}function Ae(){return Cr(Ne(),"bin")}function Ne(){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")}async function $e(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};g(`Installing ${e} ${t??""} via brew`),sh&&null!==pa.sync("brew",{nothrow:!0})||(await Pe(),sh=!0);const o=Ae(),i=Cr(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return n.overwrite&&s.push("--overwrite"),n.cask&&s.push("--cask"),P(i,s,{stdio:"inherit"}),{binDir:o}}function Ce(){return"linux"===process.platform&&(void 0===rh&&(rh=null!==pa.sync("dnf",{nothrow:!0})),rh)}function Le(){return"linux"===process.platform&&(void 0===nh&&(nh=null!==pa.sync("pacman",{nothrow:!0})),nh)}function De(){return"linux"===process.platform&&(void 0===oh&&(oh=null!==pa.sync("apt-get",{nothrow:!0})),oh)}async function ke(e,t,r){if("win32"!==process.platform)return;if("string"==typeof ih)return{binDir:ih};const n=pa.sync("choco",{nothrow:!0});if(null!==n)return ih=Dr(n),{binDir:ih};let o="powershell.exe";const i=pa.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==i&&(o=i),P(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 s=process.env.ALLUSERSPROFILE+"\\chocolatey\\bin";await ie(s,yy);const a=pa.sync("choco",{nothrow:!0});return ih=null!==a?Dr(a):(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin",await Z(ih)?{binDir:ih}:void 0}async function Ue(e,t,r=[]){g(`Installing ${e} ${t??""} via chocolatey`),ah&&null!==pa.sync("choco",{nothrow:!0})||(await ke(0,0,process),ah=!0);const n=process.env.PATH,o={...process.env};if(o.TMP=void 0,o.TEMP=void 0,o.Path=void 0,o.PATH=n,void 0!==t&&""!==t)P("choco",["install","-y",e,"--version="+t,...r],{env:o,extendEnv:!1,stdio:"inherit"});else try{P("choco",["install","-y",e,...r],{env:o,extendEnv:!1,stdio:"inherit"})}catch(s){if(!s.message.includes("exit code 3010"))throw s;g(e+" might require a reboot for the completion of the installation.")}const i=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin";return await ie(i,yy),{binDir:i}}async function je(e){for(const{name:t,version:r}of e)g(`Installing ${t} ${r??""} via dnf`);return k("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:r}=await x("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;{const{stdout:r}=await x("dnf",["search","-q",`${e}${t}`]);if(""!==r.trim())return`${e}${t}`;v(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function Fe(e,t,r){g(`Installing ${e} ${t??""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===pa.sync("yay",{nothrow:!0}))try{k("pacman",["-S","--noconfirm","base-devel","git"]);const e=Cr(Rr(),"yay");k("mkdir",["-p",e]),C()?(v("Creating a non-root user to build yay"),k("useradd",["-m","-G","wheel","builder"]),k("passwd",["-d","builder"]),k("chown",["-R","builder:builder",e]),k("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),ph=!0,P("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),P("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):(P("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:Rr()}),P("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),P("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),ch||"yay"===r||(k(n,["-Sy","--noconfirm"]),ch=!0),lh||"yay"===r||(k(n,["-S","--noconfirm","base-devel"]),lh=!0);const o=e=>"yay"===r?C()&&ph?k("su",["-","builder","-c","yay -S --noconfirm "+e]):P(r,["-S","--noconfirm",e]):k(r??n,["-S","--noconfirm",e]);if(void 0!==t&&""!==t){const r=await async function(e,t){const r=[];try{const{stdout:n}=await x(e,["-Si",t]);for(const e of n.matchAll(uh))r.push(e[1])}catch(n){v(`Failed to get available versions for ${t}: ${n}`)}return r}(n,e);if(r.includes(t))try{o(`${e}=${t}`)}catch{o(`${e}${t}`)}else g(`Failed to install ${e} ${t} via pacman, trying without version`),o(e)}else o(e);return{binDir:"/usr/bin/"}}function Me(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 Ge(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function Be(e,t=!0){return t?kr(e):kr(e,Ur(e))}function He(e){return jr(e).replace(RegExp(Ee(Fr)+"$"),"")}function qe(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ve(e,t){const r=Ur(e),n=`${t}${kr(e,r)}${r}`;return Cr(Dr(e),n)}function ze(e,t){const r=Ur(e),n=`${kr(e,r)}${t}${r}`;return Cr(Dr(e),n)}function Xe(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function We(e){return"win32"===process.platform?e:"./"+e}function Ye(e){const t=Ur(e).length;return e.slice(0,-t)}function Ke(e,t){return dh(e,t)}function Je(e,t){const r=Mr(t,e);return!(!r||".."===r||r.startsWith(".."+Fr)||r===Gr(e))}function Qe(e){return Uh(this,void 0,void 0,(function*(){if(Mh.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Mh.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function Ze(e){return Uh(this,void 0,void 0,(function*(){jh.ok(e,"a path argument must be provided"),yield Mh.mkdir(e,{recursive:!0})}))}function et(e){return Uh(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(Mh.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(Fh.delimiter))e&&t.push(e);if(Mh.isRooted(e)){const r=yield Mh.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(Fh.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(Fh.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield Mh.tryGetExecutablePath(Fh.join(o,e),t);r&&n.push(r)}return n}))}function tt(e,t,r,n){return Uh(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield Ze(t);const o=yield Mh.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield Mh.lstat(o)).isDirectory()?yield tt(o,s,r,n):yield rt(o,s,n)}yield Mh.chmod(t,(yield Mh.stat(e)).mode)}))}function rt(e,t,r){return Uh(this,void 0,void 0,(function*(){if((yield Mh.lstat(e)).isSymbolicLink()){try{yield Mh.lstat(t),yield Mh.unlink(t)}catch(n){"EPERM"===n.code&&(yield Mh.chmod(t,"0666"),yield Mh.unlink(t))}const r=yield Mh.readlink(e);yield Mh.symlink(r,t,Mh.IS_WINDOWS?"junction":null)}else(yield Mh.exists(t))&&!r||(yield Mh.copyFile(e,t))}))}function nt(e,t,r){return vm(this,void 0,void 0,(function*(){const n=wm.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=n[0];return t=n.slice(1).concat(t||[]),new wm.ToolRunner(o,t,r).exec()}))}function ot(e,t){const r=[];t=t||km.arch();const n=Um.join(ut(),e);if(Lm.existsSync(n)){const e=Lm.readdirSync(n);for(const o of e)if(ct(o)){const e=Um.join(n,o,t||"");Lm.existsSync(e)&&Lm.existsSync(e+".complete")&&r.push(o)}}return r}function it(e){return Am(this,void 0,void 0,(function*(){return e||(e=Um.join(pt(),Hm.default())),yield Cm.mkdirP(e),e}))}function st(e,t,r){return Am(this,void 0,void 0,(function*(){const n=Um.join(ut(),e,Fm.clean(t)||t,r||"");$m.debug("destination "+n);const o=n+".complete";return yield Cm.rmRF(n),yield Cm.rmRF(o),yield Cm.mkdirP(n),n}))}function at(e,t,r){const n=Um.join(ut(),e,Fm.clean(t)||t,r||"");Lm.writeFileSync(n+".complete",""),$m.debug("finished caching tool")}function ct(e){const t=Fm.clean(e)||"";$m.debug("isExplicit: "+t);const r=null!=Fm.valid(t);return $m.debug("explicit? "+r),r}function lt(e,t){let r="";$m.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Fm.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Fm.satisfies(o,t)){r=o;break}}return $m.debug(r?"matched: "+r:"match not found"),r}function ut(){const e=process.env.RUNNER_TOOL_CACHE||"";return Bm.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function pt(){const e=process.env.RUNNER_TEMP||"";return Bm.ok(e,"Expected RUNNER_TEMP to be defined"),e}function ft(e,t){const r=In[e];return void 0!==r?r:t}function dt(e,t){if(!e||!t)throw Error("retry-as-promised must be passed a callback and a options set");const r={$current:"$current"in(t="number"==typeof t?{max:t}:t)?t.$current:1,max:t.max,timeout:t.timeout||void 0,match:t.match?Array.isArray(t.match)?t.match:[t.match]:[],backoffBase:void 0===t.backoffBase?100:t.backoffBase,backoffExponent:t.backoffExponent||1.1,report:t.report,name:t.name||e.name||"unknown"};return r.match&&!Array.isArray(r.match)&&(r.match=[r.match]),r.report&&r.report("Trying "+r.name+" #"+r.$current+" at "+(new Date).toLocaleTimeString(),r),new Promise((function(t,n){let o,i,s;r.timeout&&(o=setTimeout((function(){i&&clearTimeout(i),n(new Zm(r.name+" timed out",s))}),r.timeout)),Promise.resolve(e({current:r.$current})).then(t).then((function(){o&&clearTimeout(o),i&&clearTimeout(i)})).catch((function(a){o&&clearTimeout(o),i&&clearTimeout(i),s=a,r.report&&r.report(a&&""+a||a,r,a);var c=r.max>r.$current;if(!c)return n(a);if(c=0===r.match.length||r.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,a)})),!c)return n(a);var l=r.backoffBase*Math.pow(r.backoffExponent,r.$current-1);r.$current++,r.report&&r.report(`Retrying ${r.name} (${r.$current})`,r),l?(r.report&&r.report(`Delaying retry of ${r.name} by ${l}`,r),i=setTimeout((function(){dt(e,r).then(t).catch(n)}),l)):dt(e,r).then(t).catch(n)}))}))}function ht(e,t,r){switch(process.platform){case"win32":return Ue("7zip",e);case"darwin":return $e("p7zip",e);case"linux":if(Le())return Fe("p7zip",e);if(Ce())return je([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(De())return Se([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function mt(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||v(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function vt(e,t){return await x(await async function(){return void 0===tv&&(null===pa.sync("7z",{nothrow:!0})&&await ht("",0,process),tv="7z"),tv}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await G(t),t}function yt(e,t){return vt(e,t)}async function gt(e,t){return null!==pa.sync("7z",{nothrow:!0})?vt(e,t):null!==pa.sync("unzip",{nothrow:!0})?(await x("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await G(t),t):vt(e,t)}async function wt(e,t,r=0,n=[]){await async function(e){switch(g("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(Le()?(await Fe("gzip"),await Fe("tar")):Ce()?await je([{name:"gzip"},{name:"tar"}]):De()&&await Se([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(Le()?(await Fe("xz"),await Fe("tar")):Ce()?await je([{name:"xz"},{name:"tar"}]):De()&&await Se([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(mt(e));try{await Gh(t)}catch{}try{await x("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&v(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await G(t),t}async function Et(e,t,r,n,o){g(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=process.env.RUNNER_TEMP??Rr(),process.env.RUNNER_TOOL_CACHE=process.env.RUNNER_TOOL_CACHE??Cr(Rr(),"setup-cpp","hostedtoolcache");const{url:i,binRelativeDir:s,binFileName:a,extractedFolderName:c,extractFunction:l}=await r(t,process.platform,o);if(Tn.GITHUB_ACTIONS)try{const r=Jm(e,t);if(r){const n=Cr(r,c),o=Cr(n,s);if(await Z(Cr(o,a)))return g(`${e} ${t} was found in the cache at ${o}.`),await ie(o,yy),{installDir:n,binDir:o}}}catch{}const u=Cr(n,c),p=Cr(u,s),f=Cr(p,a);return await async function(e,t,r,n,o,i,s,a){if((await Promise.all([Z(e),Z(t)])).includes(!1))try{const e=await async function(e,t,r){g(`Download ${e} ${t}`);return await ev((()=>{const e=Cr(process.env.RUNNER_TEMP??Rr(),`${Date.now()}-${kr(r)}`);return Ym(r,e)}),{name:r,max:4,backoffBase:2e3,report:e=>g(e)})}(r,n,o);g(`Extracting ${e} to ${i}`);const t=s??function(e){switch(e){case 0:case 1:case 2:return wt;case 3:return gt;default:return vt}}(mt(o));await t(e,i)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${o}: ${c}`)}if(g(`Add ${e} to PATH`),await ie(e,yy),!(await Z(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await nn(t,"755")}catch(c){v(`Failed to make ${t} executable: ${c}`)}}(p,f,e,t,i,n,l,o),await async function(e,t,r){Tn.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==Er("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await Km(e,t,r))}(n,e,t),{installDir:u,binDir:p}}function _t(e,t,r){const n=$f(e)??e;switch(t){case"win32":{const t=wf(n,"v3.19.6");let o;Sh.includes(r)?o=t?"win64-x64":"windows-x86_64":Ih.includes(r)?o=t?"win32-x86":"windows-i386":Th.includes(r)?o="windows-arm64":(g(`Trying unsupported arch '${r}' for cmake on Windows`),o="windows-"+r);const i=`cmake-${e}-${o}`;return{binRelativeDir:"bin/",binFileName:qe("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${wf(n,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:qe("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=wf(n,"v3.19.8");let o;Th.includes(r)?o=t?"Linux-aarch64":"linux-aarch64":Sh.includes(r)?o=t?"Linux-x86_64":"linux-x86_64":(g(`Trying unsupported arch '${r}' for cmake on Linux`),o="linux-"+r);const i=`cmake-${e}-${o}`;return{binRelativeDir:"bin/",binFileName:qe("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function bt(e,t,r){return Et("cmake",e,_t,t,r)}async function Ot(e,t,r=yv){const n=await async function(e,t=yv){try{const r=await ym(e,["--version"]),n=r.stdout||r.stderr||"",o=n.trim().match(t)?.[1];return $f(o)??void 0}catch(r){return void console.error(r)}}(e,r);return void 0!==n&&""!==t&&-1!==Zp(n,t)}function Rt(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function St(e,t,r){const n=await async function(e,t,r){let n,o=await It(t);if(void 0!==o){const e=Dr(o);n={bin:o,installDir:e,binDir:e}}else{if(Tn.GITHUB_ACTIONS)try{g("Installing python in GitHub Actions");const{setupActionsPython:i}=await import("./assets/actions_python-mhNRejTS.mjs");if(await i(e,t,r),o=await It(t),void 0===o)throw Error("Python binary could not be found");const s=Dr(o);n={bin:o,installDir:s,binDir:s}}catch(i){v(""+i)}void 0===n&&(n=await async function(e,t){let r;switch(process.platform){case"win32":{e?await Ue("python3",t,["--params=/InstallDir:"+e]):await Ue("python3",t);const n=await It(e);if(void 0===n)throw Error("Python binary could not be found");const o=Dr(n);await ie(o,yy),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await $e("python3",t);const e=await x("brew",["--prefix","python"],{stdio:"pipe"}),n=Cr(e.stdout,"libexec","bin");await ie(n,yy);break}case"linux":if(Le())r=await Fe("python",t);else if(Ce())r=await je([{name:"python3",version:t}]);else{if(!De())throw Error("Unsupported linux distributions");r=await Se([{name:"python3",version:t},{name:"python-is-python3"}])}break;default:throw Error("Unsupported platform")}return r}(t,e))}if(void 0===o||void 0===n.bin){if(o=await It(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:Dr(o),binDir:Dr(o)}}return n}(e,t,r);Jr(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await xt();return void 0===t?(g("pip was not found. Installing pip"),await async function(e){await At(e)||(await Ut("pip"),await At(e))}(e),xt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await kt(e)))try{await Dt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===Ut("pipx",!1))throw Error("pipx was not installed correctly "+t)}await x(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await Dt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){v(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await Dt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Dt(e,"wheel",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1})}catch(t){v(`Failed to install setuptools or wheel: ${""+t}. Ignoring...`)}}(o),n}async function It(e){for(const t of["python3","python"]){const r=await Tt(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Br(Or()).root,t=(await on(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Tt(t,Cr(e,r));if(void 0!==n)return n}}}async function Tt(e,t){try{if(void 0!==t){const r=Cr(t,qe(e));if(await Z(r)&&await Ot(r,_v))return r}const r=await pa(e,{nothrow:!0,all:!0})??[];for(const e of r)if(await Ot(e,_v))return e}catch{}}async function xt(){for(const e of["pip3","pip"]){const t=await Pt(e);if(void 0!==t)return t}}async function Pt(e){try{const t=await pa(e,{nothrow:!0,all:!0})??[];for(const e of t)if(await Ot(e,Ev))return e}catch{}}async function At(e){try{return await x(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){g(""+t);try{return await x(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){g(""+r)}}return!1}function Nt(e,t,r=null){return $t(t)&&"linux"===process.platform&&null!==r&&e in bv?function(e,t){const r=e[0],n=Object.keys(t).map((e=>Number.parseInt(e,10))).sort(((e,t)=>t-e)).find((e=>r>=e));return void 0===n?"":t[n]}(r,bv[e]):$t(t)&&e in wv?wv[e]??"":"true"===t?"":t??""}function $t(e){return"true"===e||void 0===e}function Ct(){if(!("version"in br)||"function"!=typeof br.version)return null;const e=br.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 Lt(e,t,r={}){return Dt(await Av(),e,t,r)}async function Dt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await kt(e),l=c?"pipx":"pip",u=await async function(e,t){return 0===(await x(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,t);if(u)try{Go.info(`Installing ${t} ${r??""} via ${l}`);const n=void 0!==r&&""!==r?`${t}==${r}`:t,o=s?c?["upgrade"]:["install","--upgrade"]:["install"],a=!c&&i?["--user"]:[],u=process.env;c&&i&&(u.PIPX_HOME=await xv(),u.PIPX_BIN_DIR=await Pv()),P(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(d){if(Go.info(`Failed to install ${t} via ${l}: ${d}.`),null===await Ut(t))throw Error(`Failed to install ${t} via ${l}: ${d}.`)}else if(null===await Ut(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);const p=await Ov(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>Z(Cr(e,qe(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=pa.sync(qe(t),{nothrow:!0});return null!==n?Dr(n):e[e.length-1]}(p,t);return await ie(f,yy),{binDir:f}}async function kt(e){return 0===(await x(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Ut(e,t=!0){if("linux"===process.platform){if(Go.info(`Installing ${e} via the system package manager`),Le())return Fe(t?"python-"+e:e);if(Ce())return je([{name:t?"python3-"+e:e}]);if(De())return Se([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return $e(e);return null}async function jt(e,t,r){switch(process.platform){case"win32":return await Ue("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await ie(e,yy),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return $e("graphviz",e);case"linux":if(Le())return Fe("graphviz",e);if(Ce())return je([{name:"graphviz",version:e}]);if(De())return Se([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Ft(e,t){const{ArchiveHdi:r}=await import("./assets/hdi-DCb6yS8z.mjs"),n=new r(e);await n.read((async e=>{await e.extract(Cr(t,e.path))}))}function Mt(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:qe("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:qe("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:qe("doxygen"),extractedFolderName:t,extractFunction:Ft,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Gt(){if("darwin"===process.platform)try{const e=await ym("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ne("SDKROOT",t.trim(),yy):m("SDKROOT not set")}catch(e){m(e)}}async function Bt(e){const t=await sn(e,"utf-8");return JSON.parse(t)}function Ht(e,t){const r=Object.keys(e),n=new Map;if(void 0===t.filterMapTag)for(const i of r)n.set(i,i);else for(const i of r){const e=t.filterMapTag(i);void 0!==e&&n.set(e,i)}if(0===n.size)return;const o=[];for(const[i,s]of n.entries())i.startsWith(t.version)&&o.push(s);if(0!==o.length)for(const i of o){let r=e[i];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=qt(i,r,t);if(void 0!==n)return n}}function qt(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 o of t)r.keywords.every((e=>o.includes(e)))&&n.push(o);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)e.includes(n)&&t++;return t})),o=Math.max(...t);return{tag:e,name:n[t.indexOf(o)]}}return{tag:e,name:n[0]}}}async function Vt(e,t,r){if("win32"===t){const t=Ht(await Bt(Cr(Cv,"github_brechtsanders_winlibs_mingw.json")),{version:e,keywords:[{x64:"x86_64",ia32:"i386"}[r]??r]});if(void 0===t)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:qe("g++"),extractedFolderName:"mingw64",extractFunction:vt,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${t.tag}/${t.name}`}}throw Error(`Unsupported platform '${t}'`)}async function zt(e,t,r,n=40){let o;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||await Ue("gcc-arm-embedded",e);try{o=await Et("g++",e,Vt,t,r)}catch(i){g(`Failed to download g++ binary. ${i}. Falling back to chocolatey.`),o=await async function(e,t){let r;if(await Ue("mingw",e),"x64"===t&&await Z("C:/tools/mingw64/bin")?(r="C:/tools/mingw64/bin",await ie(r,yy)):"ia32"===t&&await Z("C:/tools/mingw32/bin")?(r="C:/tools/mingw32/bin",await ie(r,yy)):await Z((process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin/g++.exe")&&(r=(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin"),void 0!==r)return{binDir:r}}(e,r)}break;case"darwin":o=await $e("gcc",e);break;case"linux":"x64"===r?Le()?o=await Fe("gcc",e):Ce()?o=await je([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):De()&&(o=""===e?await Se([{name:"gcc"},{name:"g++"}]):await Se([{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"}}])):(g(`Install g++-multilib because gcc for ${r} was requested`),Le()?o=await Fe("gcc-multilib",e):De()&&(o=""===e?await Se([{name:"gcc-multilib"}]):await Se([{name:"gcc-multilib",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!==o)return await async function(e,t,r=40){const n=[];if("win32"===process.platform)n.push(ne("CC",qe(t+"/gcc"),yy),ne("CXX",qe(t+"/g++"),yy));else{let o=e;""===e&&(o=await async function(e,t){try{let r="gcc";if(await Z(e+"/gcc"))r=e+"/gcc";else{const t=(await on(e)).sort(((e,t)=>function(e,t){const r=$f(e),n=$f(t);return null!==r&&null!==n?n.compare(r):t.localeCompare(e)}(e.match(/^gcc-?(.*)(\.exe)?$/)?.[1]??"",t.match(/^gcc-?(.*)(\.exe)?$/)?.[1]??"")));for(const n of t)if(n.startsWith("gcc")){r=`${e}/${n}`;break}}const{stdout:n}=await x(r,["--version"],{stdio:"pipe"}),o=n.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(v("Failed to parse gcc version from: "+n),t)}catch(i){return m("Failed to get gcc version: "+i),t}}(t,o),g("Using gcc version "+o));const s=Xp($f(o)??o);5>s?(n.push(ne("CC",`${t}/gcc-${o}`,yy),ne("CXX",`${t}/g++-${o}`,yy)),De()&&n.push(ve("cc",`${t}/gcc-${o}`,yy,r),ve("cxx",`${t}/g++-${o}`,yy,r),ve("gcc",`${t}/gcc-${o}`,yy,r),ve("g++",`${t}/g++-${o}`,yy,r))):(n.push(ne("CC",`${t}/gcc-${s}`,yy),ne("CXX",`${t}/g++-${s}`,yy)),De()&&n.push(ve("cc",`${t}/gcc-${s}`,yy,r),ve("cxx",`${t}/g++-${s}`,yy,r),ve("gcc",`${t}/gcc-${s}`,yy,r),ve("g++",`${t}/g++-${s}`,yy,r)))}n.push(Gt()),Tn.GITHUB_ACTIONS&&await async function(){const e=Cr(Cv,"gcc_matcher.json");if(!(await Z(e)))return v("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");g("::add-matcher::"+e)}(),await Promise.all(n)}(e,o.binDir,n),o}async function Xt(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return zt(e,t,r);case"linux":Le()?n=await Fe("mingw-w64-gcc",e):Ce()?n=await je([{name:"mingw64-gcc",version:e}]):De()&&(n=await Se([{name:"mingw-w64",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!==n)return n}function Wt(e){const t=Gp(e),r=null!==t?Xp(t):e;return ne("GCOV",""!==r?"gcov-"+r:"gcov",yy)}function Yt(e,t,r){const n=function(e,t){switch(e){case"win32":return Sh.includes(t)||Ih.includes(t)?"win":Th.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return Sh.includes(t)||Ih.includes(t)?"linux":Th.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:qe("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function Kt(e,t,r){return Et("ninja",e,Yt,t,r)}function Jt(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:qe("kcov")}}function Qt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:qe("kcov"),extractFunction:Zt}}async function Zt(e,t){const r=await wt(e,t,1),n=await async function(){let e=pa.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await bt(Nt("cmake",void 0,await Tv()),Cr(ee("~"),"cmake"),"");e=Cr(t,"cmake")}return null===pa.sync("ninja",{nothrow:!0})&&await Kt(Nt("ninja",void 0,await Tv()),Cr(ee("~"),"ninja"),""),e}();"linux"===process.platform&&(Le()?await Promise.all([Fe("libdwarf"),Fe("libcurl-openssl")]):Ce()?await je([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):De()&&await Se([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==pa.sync("patch",{nothrow:!0})){const e=Cr(Lv,"gcc13.patch");await x("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else g("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const o=Cr(r,"build");return await x(n,["-S",r,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await x(n,["--build",o,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function er(){"darwin"===process.platform&&(null!==await pa("clang",{nothrow:!0})&&null!==await pa("clang++",{nothrow:!0})&&(y("Assuming clang is an Apple Clang compiler"),await Promise.all([ne("CC","clang",yy),ne("CXX","clang++",yy)])),Rn("Apple Clang automatic installation is not supported yet"))}function tr(e){return Object.values(Wv).includes(e)?e:e in Wv?Wv[e]:e}function rr(e){if(Object.keys(Wv).includes(e))return e;for(const[t,r]of Object.entries(Wv))if(r===e)return t;return e}function nr(e){const t=tr(e);let r;if(t){const e=t.split(".")[0]+".9";r=`-version "${t},${e}"`}else r="-latest";let n=function(e,t){try{return(""+Mv.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Fv.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Gv.existsSync(n))return Fv.info("Found with vswhere: "+n),n;Fv.info("Not found with vswhere");const o=e?[rr(e)]:Xv;for(const i of Vv)for(const e of o)for(const t of zv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Fv.info("Trying standard location: "+n),Gv.existsSync(n))return Fv.info("Found standard location: "+n),n;if(Fv.info("Not found in standard locations"),n=qv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Gv.existsSync(n))return Fv.info("Found VS 2015: "+n),n;throw Fv.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function or(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function ir(e,t,r,n,o,i,s){void 0!==t&&await Z(t)&&(g(`Adding ${t} to PATH`),await ne("VCTargetsPath",t,yy)),await Qv(function(e){switch(e){case"x32":case"32":case"ia32":return"x86";case"64":return"x64";default:return e}}(r),o,n,i,s,e)}async function sr(e,t,r,n,o,i,s,a=12e5){Go.startGroup(`Installing ${e} ${t}`);try{await function(e,t){const{milliseconds:r,fallback:n,message:o,customTimers:i={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(t.signal){const{signal:e}=t;e.aborted&&c(jv(e)),e.addEventListener("abort",(()=>{c(jv(e))}))}if(r===1/0)return void e.then(a,c);const l=new Dv;s=i.setTimeout.call(void 0,(()=>{if(n)try{a(n())}catch(t){c(t)}else"function"==typeof e.cancel&&e.cancel(),!1===o?a():o instanceof Error?c(o):(l.message=o??`Promise timed out after ${r} milliseconds`,c(l))}),r),(async()=>{try{a(await e)}catch(t){c(t)}})()})).finally((()=>{a.clear()}));return a.clear=()=>{i.clearTimeout.call(void 0,s),s=void 0},a}(async function(e,t,r,n,o,i){const s=dy.includes(e);let a;if("vcvarsall"===e)await ir(Nt(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Pe({rcOptions:yy});else{const i=Cr(o,s?"llvm":e),c=Nt(e,t,r),l=hy[e];a=await l(c,i,n)}i.push(_r(e,a))}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(c){m(c),c instanceof Error&&void 0!==c.stack&&m(c.stack),s.push(e+" failed to install")}Go.endGroup()}async function ar(e,t,r){const n=await async function(e,t,r){const{keywords:n,optionalKeywords:o}=await async function(e,t){const r=[],n=[];switch(e){case"win32":Sh.includes(t)?r.push("win64"):Ih.includes(t)?r.push("win32"):Th.includes(t)?r.push("woa64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"linux":if(r.push("linux"),De()){n.push("ubuntu");const e=await Tv();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 Ce()&&n.push("rhel");Sh.includes(t)?r.push("x86_64"):Ih.includes(t)?r.push("x86"):Th.includes(t)?r.push("aarch64"):xh.includes(t)?r.push("armv7a"):Ph.includes(t)?r.push("powerpc64le"):Ah.includes(t)?r.push("sparc64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),Sh.includes(t)?r.push("x86_64"):Th.includes(t)?n.push("arm64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),Sh.includes(t)?r.push("amd64"):Ih.includes(t)?r.push("i386"):(g(`Using arch ${t} for LLVM`),r.push(t));break;default:g(`Using ${e} ${t} for LLVM`),n.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),i=Ht(await Bt(Cr(ey,"github_llvm_llvm-project.json")),{version:r,keywords:n,optionalKeywords:o,filterMapTag:e=>e.replace(/^llvmorg-/,"")});if(void 0!==i)return`https://github.com/llvm/llvm-project/releases/download/${i.tag}/${i.name}`;const s=Ht(await Bt(Cr(ey,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:o});if(void 0!==s)return`https://llvm.org/releases/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${o}`)}(t,r,e);return g("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:qe("clang"),extractFunction:"win32"===t?yt:(e,t)=>wt(e,t,1)}}async function cr(e,t,r){const n=await ry(e,t,r);return await async function(e,t){const r=process.env.LD_LIBRARY_PATH??"",n=process.env.DYLD_LIBRARY_PATH??"",o=fr(t),i=[ne("CC",qe(e+"/bin/clang"),yy),ne("CXX",qe(e+"/bin/clang++"),yy),ne("LLVM_PATH",e,yy),ne("LD_LIBRARY_PATH",`${r}${Lr}${e}/lib`,yy),ne("DYLD_LIBRARY_PATH",`${n}${Lr}${e}/lib`,yy),ne("LLVM_LDFLAGS","-L"+Rt(e+"/lib"),yy),ne("LLVM_CPPFLAGS","-I"+Rt(e+"/include"),yy),await Z(`${e}/lib/clang/${t}/include`)?ne("LLVM_CPATH",`${e}/lib/clang/${t}/include`,yy):await Z(`${e}/lib/clang/${o}/include`)?ne("LLVM_CPATH",`${e}/lib/clang/${o}/include`,yy):Promise.resolve(),ne("LIBRARY_PATH",e+"/lib",yy),Gt()];if(De()){const t=60;i.push(ve("cc",e+"/bin/clang",yy,t),ve("cxx",e+"/bin/clang++",yy,t),ve("clang",e+"/bin/clang",yy),ve("clang++",e+"/bin/clang++",yy),ve("lld",e+"/bin/lld",yy),ve("ld.lld",e+"/bin/ld.lld",yy),ve("llvm-ar",e+"/bin/llvm-ar",yy))}await Promise.all(i)}(n.installDir??t,e),n}function lr(e,t,r){return pr(e,t,r,Zv.ClangFormat)}function ur(e,t,r){return pr(e,t,r)}async function pr(e,t,r,n=Zv.All){const o=fr(e);try{if(De())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Se([{name:"ca-certificates"}]);const n=new qd.DownloaderHelper("https://apt.llvm.org/llvm.sh",Rr(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await sn(n.getDownloadPath(),"utf-8"),i=Cr(Rr(),"llvm-setup-cpp.sh"),s=await async function(e,t,r,n){let o=function(e){return"1"!==process.env.NODE_DEBUG&&"true"!==process.env.NODE_DEBUG?e.replace(/set -eux/g,"set -eu"):e}(e);return o=function(e){return e.replace(/add-apt-repository "\${REPO_NAME}"/g,`add-apt-repository -y -n "\${REPO_NAME}"\napt-get update -o ${zd} -y`)}(o),o=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,o,r),o=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${zd} -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 x("dpkg",["-l",e],{env:ye("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(Sn("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return ge()?e.replace(/apt-get/g,"nala"):e}(o),await an(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Se(s),await nn(i,"755"),await U("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await ie(r+"/bin",yy),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(o,n)}catch(s){g("Failed to install llvm via system package manager "+s)}const i=await Et("llvm",e,ar,t,r);return await ny(o),i}function fr(e){const t=function(e){if(null===Gp(e))try{const t=$f(e);if(null!==t)return g(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e);return Number.parseInt(t.split(".")[0],10)}async function dr(){if(Tn.GITHUB_ACTIONS){const e=Cr(ty,"llvm_matcher.json");if(!(await Z(e)))return v("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");g("::add-matcher::"+e)}}async function hr(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Yv(e);g(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=Jv(s);l=!0,g("Found the pre-installed version of MSVC at "+e)}catch{}if(!l)try{"14.0"===s?(a="14.0",await Ue("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 Ue("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 Ue("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 Ue("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):m(`The given MSVC versions ${e} is not supported yet.`)}catch(u){m(u)}await ir(s,c,r,a,n,o,i),Tn.GITHUB_ACTIONS&&await async function(){const e=Cr(iy,"msvc_matcher.json");if(!(await Z(e)))return v("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");g("::add-matcher::"+e)}()}async function mr(e,t,r){if("win32"===process.platform)return await Ue("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await ie(e,yy),e}()}}function vr(e,t,r){return{url:yr(t,r,e),binRelativeDir:"",binFileName:qe("pwsh"),extractedFolderName:""}}function yr(e,t,r){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}-${{arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t]??"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function gr(e,t,r){try{return await Et("pwsh",e,vr,t,r)}catch(n){return m(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Ue("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await ie(t,yy),{binDir:t}}case"darwin":return $e("powershell",e,{cask:!0,overwrite:!1});case"linux":if(Le())return Fe("powershell-bin",e,"yay");if(Ce())return await je([{name:"curl"}]),k("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),je([{name:"powershell",version:e}]);if(De()){await Se([{name:"curl"}]);const t=await Tv();return k("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),k("dpkg",["-i","packages-microsoft-prod.deb"]),Se([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function wr(e,t,r){const n=function(e){return"win32"===e?"windows":e}(t),o=function(e){switch(e){case"x64":return"amd64";case"ia32":case"x86":case"i386":case"x32":return"386";default:return e}}(r),i="win32"===t?"zip":"tar.gz";return{binRelativeDir:"",binFileName:qe("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${o}.${i}`}}function Er(e){const t=Go.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function _r(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}import br,{homedir as Or,tmpdir as Rr}from"os";import Sr,{promises as Ir,mkdir as Tr,stat as xr,statSync as Pr,mkdirSync as Ar}from"fs";import Nr from"crypto";import $r,{join as Cr,delimiter as Lr,dirname as Dr,basename as kr,extname as Ur,normalize as jr,sep as Fr,relative as Mr,resolve as Gr,parse as Br}from"path";import*as Hr from"http";import qr from"http";import*as Vr from"https";import zr from"https";import"net";import Xr from"tls";import Wr from"events";import Yr from"util";import Kr from"child_process";import Jr from"assert";import Qr from"buffer";import Zr from"stream";import{debuglog as en}from"node:util";import tn from"node:process";import rn,{chmod as nn,readdir as on,readFile as sn,writeFile as an}from"fs/promises";import{Buffer as cn}from"node:buffer";import ln from"node:path";import un,{ChildProcess as pn}from"node:child_process";import{fileURLToPath as fn}from"node:url";import dn,{constants as hn}from"node:os";import{createWriteStream as mn,readFileSync as vn,createReadStream as yn,promises as gn}from"node:fs";import wn from"process";import En,{fileURLToPath as _n}from"url";import bn from"string_decoder";import On from"timers";import{error as Rn,info as Sn}from"console";var In="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Tn={};const xn=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{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:"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"}];!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=xn,n=process.env;Object.defineProperty(e,"_vendors",{value:r.map((function(e){return e.constant}))}),e.name=null,e.isPR=null,r.forEach((function(r){const o=(Array.isArray(r.env)?r.env:[r.env]).every((function(e){return t(e)}));if(e[r.constant]=o,o)switch(e.name=r.name,typeof r.pr){case"string":e.isPR=!!n[r.pr];break;case"object":e.isPR="env"in r.pr?r.pr.env in n&&n[r.pr.env]!==r.pr.ne:"any"in r.pr?r.pr.any.some((function(e){return!!n[e]})):t(r.pr);break;default:e.isPR=null}})),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))}(Tn);var Pn={},An={},Nn={};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.toCommandProperties=Nn.toCommandValue=void 0,Nn.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Nn.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}:{}};var $n=In&&In.__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]}),Cn=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ln=In&&In.__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 Cn(t,e),t};Object.defineProperty(An,"__esModule",{value:!0}),An.issue=An.issueCommand=void 0;const Dn=Ln(br),kn=Nn;An.issueCommand=r,An.issue=function(e,t=""){r(e,{},t)};class Un{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 o=this.properties[n];o&&(r?r=!1:e+=",",e+=`${n}=${t=o,kn.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 kn.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var jn={};const Fn=new Uint8Array(256);let Mn=Fn.length;const Gn=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Bn=[];for(let wy=0;256>wy;++wy)Bn.push((wy+256).toString(16).substr(1));let Hn,qn,Vn=0,zn=0;const Xn=a("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Nr.createHash("md5").update(e).digest()})),Wn=a("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),Nr.createHash("sha1").update(e).digest()})),Yn=Object.freeze(Object.defineProperty({__proto__:null,NIL:"00000000-0000-0000-0000-000000000000",parse:s,stringify:i,v1:function(e,t,r){let o=t&&r||0;const s=t||Array(16);let a=(e=e||{}).node||Hn,c=void 0!==e.clockseq?e.clockseq:qn;if(null==a||null==c){const t=e.random||(e.rng||n)();null==a&&(a=Hn=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=qn=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:zn+1;const p=l-Vn+(u-zn)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||l>Vn)&&void 0===e.nsecs&&(u=0),u>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Vn=l,zn=u,qn=c,l+=122192928e5;const f=(1e4*(268435455&l)+u)%4294967296;s[o++]=f>>>24&255,s[o++]=f>>>16&255,s[o++]=f>>>8&255,s[o++]=255&f;const d=l/4294967296*1e4&268435455;s[o++]=d>>>8&255,s[o++]=255&d,s[o++]=d>>>24&15|16,s[o++]=d>>>16&255,s[o++]=c>>>8|128,s[o++]=255&c;for(let n=0;6>n;++n)s[o+n]=a[n];return t||i(s)},v3:Xn,v4:function(e,t,r){const o=(e=e||{}).random||(e.rng||n)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;16>e;++e)t[r+e]=o[e];return t}return i(o)},v5:Wn,validate:o,version:function(e){if(!o(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),Kn=t(Yn);var Jn=In&&In.__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]}),Qn=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zn=In&&In.__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)&&Jn(t,e,r);return Qn(t,e),t};Object.defineProperty(jn,"__esModule",{value:!0}),jn.prepareKeyValueMessage=jn.issueFileCommand=void 0;const eo=Zn(Sr),to=Zn(br),ro=Kn,no=Nn;jn.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!eo.existsSync(r))throw Error("Missing file at path: "+r);eo.appendFileSync(r,`${no.toCommandValue(t)}${to.EOL}`,{encoding:"utf8"})},jn.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+ro.v4(),n=no.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}${to.EOL}${n}${to.EOL}${r}`};var oo={};class io 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 so,ao={},co=Xr,lo=qr,uo=zr,po=Wr,fo=Yr;ao.httpOverHttp=function(e){var t=new l(e);return t.request=lo.request,t},ao.httpsOverHttp=function(e){var t=new l(e);return t.request=lo.request,t.createSocket=u,t.defaultPort=443,t},ao.httpOverHttps=function(e){var t=new l(e);return t.request=uo.request,t},ao.httpsOverHttps=function(e){var t=new l(e);return t.request=uo.request,t.createSocket=u,t.defaultPort=443,t},fo.inherits(l,po.EventEmitter),l.prototype.addRequest=function(e,t,r,n){var o=this,i=f({request:e},o.options,p(t,r,n));this.maxSockets>o.sockets.length?o.createSocket(i,(function(t){function r(){o.emit("free",t,i)}function n(e){o.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)})):o.requests.push(i)},l.prototype.createSocket=function(e,t){function r(r,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==r.statusCode?(so("tunneling socket could not be established, statusCode=%d",r.statusCode),i.destroy(),(c=Error("tunneling socket could not be established, statusCode="+r.statusCode)).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):a.length>0?(so("got illegal response body from proxy"),i.destroy(),(c=Error("got illegal response body from proxy")).code="ECONNRESET",e.request.emit("error",c),void n.removeSocket(o)):(so("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=i,t(i))}var n=this,o={};n.sockets.push(o);var i=f({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),so("making CONNECT request");var s=n.request(i);s.useChunkedEncodingByDefault=!1,s.once("response",(function(e){e.upgrade=!0})),s.once("upgrade",(function(e,t,n){process.nextTick((function(){r(e,t,n)}))})),s.once("connect",r),s.once("error",(function(t){s.removeAllListeners(),so("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),n.removeSocket(o)})),s.end()},l.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)}))}},so=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(){},ao.debug=so;var ho,mo,vo,yo,go,wo=ao;(mo=ho||(ho={}))[mo.OK=200]="OK",mo[mo.MultipleChoices=300]="MultipleChoices",mo[mo.MovedPermanently=301]="MovedPermanently",mo[mo.ResourceMoved=302]="ResourceMoved",mo[mo.SeeOther=303]="SeeOther",mo[mo.NotModified=304]="NotModified",mo[mo.UseProxy=305]="UseProxy",mo[mo.SwitchProxy=306]="SwitchProxy",mo[mo.TemporaryRedirect=307]="TemporaryRedirect",mo[mo.PermanentRedirect=308]="PermanentRedirect",mo[mo.BadRequest=400]="BadRequest",mo[mo.Unauthorized=401]="Unauthorized",mo[mo.PaymentRequired=402]="PaymentRequired",mo[mo.Forbidden=403]="Forbidden",mo[mo.NotFound=404]="NotFound",mo[mo.MethodNotAllowed=405]="MethodNotAllowed",mo[mo.NotAcceptable=406]="NotAcceptable",mo[mo.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",mo[mo.RequestTimeout=408]="RequestTimeout",mo[mo.Conflict=409]="Conflict",mo[mo.Gone=410]="Gone",mo[mo.TooManyRequests=429]="TooManyRequests",mo[mo.InternalServerError=500]="InternalServerError",mo[mo.NotImplemented=501]="NotImplemented",mo[mo.BadGateway=502]="BadGateway",mo[mo.ServiceUnavailable=503]="ServiceUnavailable",mo[mo.GatewayTimeout=504]="GatewayTimeout",(yo=vo||(vo={})).Accept="accept",yo.ContentType="content-type",(go||(go={})).ApplicationJson="application/json";const Eo=[ho.MovedPermanently,ho.ResourceMoved,ho.SeeOther,ho.TemporaryRedirect,ho.PermanentRedirect],_o=[ho.BadGateway,ho.ServiceUnavailable,ho.GatewayTimeout],bo=["OPTIONS","GET","DELETE","HEAD"];class Oo extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,Oo.prototype)}statusCode;result}class Ro{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))}))}))}}const So=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),Io=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return vo},HttpClient:class{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[vo.Accept]=this._getExistingOrDefaultHeader(t,vo.Accept,go.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[vo.Accept]=this._getExistingOrDefaultHeader(r,vo.Accept,go.ApplicationJson),r[vo.ContentType]=this._getExistingOrDefaultHeader(r,vo.ContentType,go.ApplicationJson);const o=await this.post(e,n,r);return this._processResponse(o,this.requestOptions)}async putJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[vo.Accept]=this._getExistingOrDefaultHeader(r,vo.Accept,go.ApplicationJson),r[vo.ContentType]=this._getExistingOrDefaultHeader(r,vo.ContentType,go.ApplicationJson);const o=await this.put(e,n,r);return this._processResponse(o,this.requestOptions)}async patchJson(e,t,r={}){const n=JSON.stringify(t,null,2);r[vo.Accept]=this._getExistingOrDefaultHeader(r,vo.Accept,go.ApplicationJson),r[vo.ContentType]=this._getExistingOrDefaultHeader(r,vo.ContentType,go.ApplicationJson);const o=await this.patch(e,n,r);return this._processResponse(o,this.requestOptions)}async request(e,t,r,n){if(this._disposed)throw Error("Client has already been disposed.");const o=new URL(t);let i=this._prepareRequest(e,o,n);const s=this._allowRetries&&bo.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===ho.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,i,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&Eo.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===o.protocol&&o.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!==o.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];i=this._prepareRequest(e,c,n),a=await this.requestRaw(i,r),t--}if(!a.message.statusCode||!_o.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){o||(o=!0,r(e,t))}"string"==typeof t&&(e.options.headers||(e.options.headers={}),e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8"));let o=!1;const i=e.httpModule.request(e.options,(e=>{n(void 0,new Ro(e))}));let s;i.on("socket",(e=>{s=e})),i.setTimeout(this._socketTimeout||18e4,(()=>{s&&s.end(),n(Error("Request timeout: "+e.options.path))})),i.on("error",(function(e){n(e)})),t&&"string"==typeof t&&i.write(t,"utf8"),t&&"string"!=typeof t?(t.on("close",(function(){i.end()})),t.pipe(i)):i.end()}getAgent(e){const t=new URL(e);return this._getAgent(t)}async getAgentDispatcher(e){const t=new URL(e),r=c(t);if(r&&r.hostname)return await this._getProxyAgentDispatcher(t,r)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const o="https:"===n.parsedUrl.protocol;n.httpModule=o?Vr:Hr;const i=o?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i,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({},So(this.requestOptions.headers),So(e||{})):So(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=So(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=c(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 i=100;if(this.requestOptions&&(i=this.requestOptions.maxSockets||Hr.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:i,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const s="https:"===r.protocol;n=o?s?wo.httpsOverHttps:wo.httpsOverHttp:s?wo.httpOverHttps:wo.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new Vr.Agent(e):new Hr.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 import("./assets/proxy-agent-CtreyBpw.mjs").then((e=>e.p)))({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 o=e.message.statusCode||0,i={statusCode:o,result:null,headers:{}};let s,a;o===ho.NotFound&&r(i);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),i.result=s),i.headers=e.message.headers}catch(c){}if(o>299){let e;e=s&&s.message?s.message:a&&a.length>0?a:`Failed request: (${o})`;const t=new Oo(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:Oo,HttpClientResponse:Ro,get HttpCodes(){return ho},get MediaTypes(){return go},getProxyUrl:function(e){const t=c(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})),To=t(Io);var xo,Po={},Ao=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Po,"__esModule",{value:!0}),Po.PersonalAccessTokenCredentialHandler=Po.BearerCredentialHandler=Po.BasicCredentialHandler=void 0,Po.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 Ao(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Po.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 Ao(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Po.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 Ao(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var No,$o,Co,Lo,Do,ko,Uo,jo,Fo={},Mo={},Go=h(),Bo={exports:{}};jo="win32"===process.platform||In.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 o=r[n].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}(t,r)}function t(t,n,o){r.stat(t,(function(r,i){o(r,!r&&e(i,t,n))}))}if(Do)return Lo;Do=1,Lo=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=Sr;return Lo}():function(){function e(e,n,o){r.stat(e,(function(e,r){o(e,!e&&t(r,n))}))}function t(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,o=e.gid,i=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),l=a|c;return r&parseInt("001",8)||r&c&&o===s||r&a&&n===i||r&l&&0===i}(e,t)}if(Uo)return ko;Uo=1,ko=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=Sr;return ko}();var Ho=w;w.sync=function(e,t){try{return jo.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const qo="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,Vo=$r,zo=qo?";":":",Xo=Ho,Wo=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Yo=(e,t)=>{const r=t.colon||zo,n=e.match(/\//)||qo&&e.match(/\\/)?[""]:[...qo?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=qo?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=qo?o.split(r):[""];return qo&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},Ko=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=Yo(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(Wo(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=Vo.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;o(c(p,r,0))})),c=(e,r,n)=>new Promise(((l,u)=>{if(n===o.length)return l(a(r+1));const p=o[n];Xo(e+p,{pathExt:i},((o,i)=>{if(!o&&i){if(!t.all)return l(e+p);s.push(e+p)}return l(c(e,r,n+1))}))}));return r?a(0).then((e=>r(null,e)),r):a(0)};var Jo=Ko;Ko.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=Yo(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=Vo.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;for(let e=0;n.length>e;e++){const r=p+n[e];try{if(Xo.sync(r,{pathExt:o})){if(!t.all)return r;i.push(r)}}catch(s){}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw Wo(e)};var Qo={exports:{}};const Zo=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};Qo.exports=Zo,Qo.exports.default=Zo;const ei=$r,ti=Jo,ri=Qo.exports;var ni={};const oi=/([()\][%!^"`<>&|;, *?])/g;ni.command=function(e){return e.replace(oi,"^$1")},ni.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(oi,"^$1"),t&&(e=e.replace(oi,"^$1")),e};const ii=/^#!(.*)/,si=Sr,ai=$r,ci=function(e){return E(e)||E(e,!0)},li=ni,ui=function(e){const t=Buffer.alloc(150);let r;try{r=si.openSync(e,"r"),si.readSync(r,t,0,150,0),si.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(ii);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},pi="win32"===process.platform,fi=/\.(?:com|exe)$/i,di=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,hi="win32"===process.platform,mi=Kr,vi=function(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null);const n={command:e,args:t=t?t.slice(0):[],options:r=Object.assign({},r),file:void 0,original:{command:e,args:t}};return r.shell?n:function(e){if(!pi)return e;const t=function(e){e.file=ci(e);const t=e.file&&ui(e.file);return t?(e.args.unshift(e.file),e.command=t,ci(e)):e.file}(e),r=!fi.test(t);if(e.options.forceShell||r){const r=di.test(t);e.command=ai.normalize(e.command),e.command=li.command(e.command),e.args=e.args.map((e=>li.argument(e,r)));const n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}(n)},yi={hookChildProcess:function(e,t){if(!hi)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=b(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:b,verifyENOENTSync:function(e,t){return hi&&1===e&&!t.file?_(t.original,"spawnSync"):null},notFoundError:_};Bo.exports=O,Bo.exports.spawn=O,Bo.exports.sync=function(e,t,r){const n=vi(e,t,r),o=mi.spawnSync(n.command,n.args,n.options);return o.error=o.error||yi.verifyENOENTSync(o.status,n),o},Bo.exports._parse=vi,Bo.exports._enoent=yi;const gi=e(Bo.exports),wi=({env:e=tn.env,...t}={})=>{const r=R({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=tn.cwd(),path:t=tn.env[R()],preferLocal:r=!0,execPath:n=tn.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?fn(e):e,s=ln.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(ln.join(t,"node_modules/.bin")),r=t,t=ln.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?fn(t):t;e.push(ln.resolve(r,n,".."))})(a,n,s),[...a,t].join(ln.delimiter)})(t),e},Ei=(e,t,r,n)=>{if("length"===r||"prototype"===r)return;if("arguments"===r||"caller"===r)return;const o=Object.getOwnPropertyDescriptor(e,r),i=Object.getOwnPropertyDescriptor(t,r);!_i(o,i)&&n||Object.defineProperty(e,r,i)},_i=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)},bi=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Oi=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Ri=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),Si=new WeakMap,Ii=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const o=e.displayName||e.name||"",i=function(...s){if(Si.set(i,++n),1===n)r=e.apply(this,s),e=null;else if(!0===t.throw)throw Error(`Function \`${o}\` can only be called once`);return r};return function(e,t,{ignoreNonConfigurable:r=!1}={}){const{name:n}=e;for(const o of Reflect.ownKeys(t))Ei(e,t,o,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()}() `,o=bi.bind(null,n,""+t);Object.defineProperty(o,"name",Ri),Object.defineProperty(e,"toString",{...Oi,value:o})})(e,t,n)}(i,e),Si.set(i,n),i};Ii.callCount=e=>{if(!Si.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return Si.get(e)};const Ti=(e,t)=>({name:"SIGRT"+(t+1),number:xi+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),xi=34,Pi=[{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"}],Ai=()=>{const e=Array.from({length:64-xi+1},Ti);return[...Pi,...e].map(Ni)},Ni=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=hn,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},$i=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],Ci=(()=>{const e=Ai();return Object.fromEntries(e.map($i))})(),Li=(e,t)=>{const r=t.find((({name:t})=>hn.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Ai(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Li(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const Di=({stdout:e,stderr:t,all:r,error:n,signal:o,exitCode:i,command:s,escapedCommand:a,timedOut:c,isCanceled:l,killed:u,parsed:{options:{timeout:p,cwd:f=tn.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:Ci[o].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?"failed with exit code "+i:"failed")({timedOut:c,timeout:p,errorCode:n&&n.code,signal:o,signalDescription:d,exitCode:i=null===i?void 0:i,isCanceled:l}),m=`Command ${h}: ${s}`,v="[object Error]"==={}.toString.call(n),y=v?`${m}\n${n.message}`:m,g=[y,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=g):n=Error(g),n.shortMessage=y,n.command=s,n.escapedCommand=a,n.exitCode=i,n.signal=o,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=f,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=u&&!c,n},ki=["stdin","stdout","stderr"];var Ui,ji={exports:{}},Fi={exports:{}},Mi=In.process;const Gi=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(Gi(Mi)){var Bi,Hi=Jr,qi=(Ui||(Ui=1,(rs=Fi).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&rs.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&rs.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Fi.exports),Vi=/^win/i.test(Mi.platform),zi=Wr;"function"!=typeof zi&&(zi=zi.EventEmitter),Mi.__signal_exit_emitter__?Bi=Mi.__signal_exit_emitter__:((Bi=Mi.__signal_exit_emitter__=new zi).count=0,Bi.emitted={}),Bi.infinite||(Bi.setMaxListeners(1/0),Bi.infinite=!0),ji.exports=function(e,t){if(!Gi(In.process))return function(){};Hi.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Ki&&Ji();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),Bi.on(r,e),function(){Bi.removeListener(r,e),0===Bi.listeners("exit").length&&0===Bi.listeners("afterexit").length&&Xi()}};var Xi=function(){Ki&&Gi(In.process)&&(Ki=!1,qi.forEach((function(e){try{Mi.removeListener(e,Yi[e])}catch(t){}})),Mi.emit=es,Mi.reallyExit=Qi,Bi.count-=1)};ji.exports.unload=Xi;var Wi=function(e,t,r){Bi.emitted[e]||(Bi.emitted[e]=!0,Bi.emit(e,t,r))},Yi={};qi.forEach((function(e){Yi[e]=function(){Gi(In.process)&&Mi.listeners(e).length===Bi.count&&(Xi(),Wi("exit",null,e),Wi("afterexit",null,e),Vi&&"SIGHUP"===e&&(e="SIGINT"),Mi.kill(Mi.pid,e))}})),ji.exports.signals=function(){return qi};var Ki=!1,Ji=function(){!Ki&&Gi(In.process)&&(Ki=!0,Bi.count+=1,qi=qi.filter((function(e){try{return Mi.on(e,Yi[e]),!0}catch(t){return!1}})),Mi.emit=ts,Mi.reallyExit=Zi)};ji.exports.load=Ji;var Qi=Mi.reallyExit,Zi=function(e){Gi(In.process)&&(Mi.exitCode=e||0,Wi("exit",Mi.exitCode,null),Wi("afterexit",Mi.exitCode,null),Qi.call(Mi,Mi.exitCode))},es=Mi.emit,ts=function(e,t){if("exit"===e&&Gi(In.process)){void 0!==t&&(Mi.exitCode=t);var r=es.apply(this,arguments);return Wi("exit",Mi.exitCode,null),Wi("afterexit",Mi.exitCode,null),r}return es.apply(this,arguments)}}else ji.exports=function(){return function(){}};var rs;const ns=e(ji.exports),os=(e,t="SIGTERM",r={})=>{const n=e(t);return is(e,t,r,n),n},is=(e,t,r,n)=>{if(!ss(t,r,n))return;const o=cs(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},ss=(e,{forceKillAfterTimeout:t},r)=>as(e)&&!1!==t&&r,as=e=>e===dn.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),cs=({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},ls=(e,t)=>{e.kill()&&(t.isCanceled=!0)},us=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(mn(r)),e;if(I(r))return e[t].pipe(r),e;if(!(e=>e instanceof pn&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!I(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var ps={exports:{}};const{PassThrough:fs}=Zr,{constants:ds}=Qr,hs=Zr,{promisify:ms}=Yr,vs=e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const n="buffer"===r;let o=!1;t?o=!(r||n):r=r||"utf8",n&&(r=null);const i=new fs({objectMode:o});r&&i.setEncoding(r);let s=0;const a=[];return i.on("data",(e=>{a.push(e),o?s=a.length:s+=e.length})),i.getBufferedValue=()=>t?a:n?Buffer.concat(a,s):a.join(""),i.getBufferedLength=()=>s,i},ys=ms(hs.pipeline);class gs extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}ps.exports=T,ps.exports.buffer=(e,t)=>T(e,{...t,encoding:"buffer"}),ps.exports.array=(e,t)=>T(e,{...t,array:!0}),ps.exports.MaxBufferError=gs;const ws=e(ps.exports),{PassThrough:Es}=Zr,_s=e((function(){function e(o){return Array.isArray(o)?(o.forEach(e),this):(r.push(o),o.once("end",t.bind(null,o)),o.once("error",n.emit.bind(n,"error")),o.pipe(n,{end:!1}),this)}function t(e){!(r=r.filter((function(t){return t!==e}))).length&&n.readable&&n.end()}var r=[],n=new Es({objectMode:!0});return n.setMaxListeners(0),n.add=e,n.isEmpty=function(){return 0==r.length},n.on("unpipe",t),[].slice.call(arguments).forEach(e),n})),bs=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Os=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},Rs=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?ws(e,{encoding:t,maxBuffer:n}):ws.buffer(e,{maxBuffer:n})},Ss=(async()=>{})().constructor.prototype,Is=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Ss,e)])),Ts=(e,t)=>{for(const[r,n]of Is){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},xs=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],Ps=/^[\w.-]+$/,As=/"/g,Ns=(e,t)=>xs(e,t).join(" "),$s=(e,t)=>xs(e,t).map((e=>(e=>"string"!=typeof e||Ps.test(e)?e:`"${e.replace(As,'\\"')}"`)(e))).join(" "),Cs=/ +/g,Ls=e=>{const t=[];for(const r of e.trim().split(Cs)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},Ds=en("execa").enabled,ks=(e,t)=>(e+"").padStart(t,"0"),Us=(e,{verbose:t})=>{t&&tn.stderr.write(`[${(()=>{const e=new Date;return`${ks(e.getHours(),2)}:${ks(e.getMinutes(),2)}:${ks(e.getSeconds(),2)}.${ks(e.getMilliseconds(),3)}`})()}] ${e}\n`)},js=(e,t,r={})=>{const n=gi._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||tn.cwd(),execPath:tn.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Ds,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...tn.env,...e}:e;return r?wi({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return ki.map((t=>e[t]));if((e=>ki.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+ki.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,ki.length)},((e,r)=>t[r]))})(r),"win32"===tn.platform&&"cmd"===ln.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},Fs=(e,t,r)=>"string"==typeof t||cn.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 Ms={},Gs={};Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.sync=Gs.isexe=void 0;const Bs=Sr,Hs=rn;Gs.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return qs(await(0,Hs.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Gs.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return qs((0,Bs.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const qs=(e,t)=>e.isFile()&&Vs(e,t),Vs=(e,t)=>{const r=t.uid??process.getuid?.(),n=t.groups??process.getgroups?.()??[],o=t.gid??process.getgid?.()??n[0];if(void 0===r||void 0===o)throw Error("cannot get uid or gid");const i=new Set([o,...n]),s=e.mode,a=e.uid,c=e.gid,l=parseInt("100",8),u=parseInt("010",8),p=l|u;return!!(s&parseInt("001",8)||s&u&&i.has(c)||s&l&&a===r||s&p&&0===r)};var zs={};Object.defineProperty(zs,"__esModule",{value:!0}),zs.sync=zs.isexe=void 0;const Xs=Sr,Ws=rn;zs.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ys(await(0,Ws.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},zs.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ys((0,Xs.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Ys=(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 o=0;n.length>o;o++){const t=n[o].toLowerCase(),r=e.substring(e.length-t.length).toLowerCase();if(t&&r===t)return!0}return!1})(t,r);var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0}),function(e){var t=In&&In.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=In&&In.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&{}.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=In&&In.__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 i=n(Gs);e.posix=i;const s=n(zs);e.win32=s,o(Ks,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(Ms);const{isexe:Js,sync:Qs}=Ms,{join:Zs,delimiter:ea,sep:ta,posix:ra}=$r,na="win32"===process.platform,oa=RegExp(`[${ra.sep}${ta===ra.sep?"":ta}]`.replace(/(\\)/g,"\\$1")),ia=RegExp("^\\."+oa.source),sa=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),aa=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=ea})=>{const o=e.match(oa)?[""]:[...na?[process.cwd()]:[],...(t||"").split(n)];if(na){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),i=t.split(n).flatMap((e=>[e,e.toLowerCase()]));return e.includes(".")&&""!==i[0]&&i.unshift(""),{pathEnv:o,pathExt:i,pathExtExe:t}}return{pathEnv:o,pathExt:[""]}},ca=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&ia.test(t)?t.slice(0,2):"")+Zs(r,t)},la=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=aa(e,t),i=[];for(const s of r){const r=ca(s,e);for(const e of n){const n=r+e;if(await Js(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw sa(e)};var ua=la;la.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=aa(e,t),i=[];for(const s of r){const r=ca(s,e);for(const e of n){const n=r+e;if(Qs(n,{pathExt:o,ignoreErrors:!0})){if(!t.all)return n;i.push(n)}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw sa(e)};const pa=e(ua);let fa;var da,ha={};N(ha,"hasSudo",(()=>$)),N(ha,"isRoot",(()=>C)),N(ha,"isSudo",(()=>L)),N(ha,"prependSudo",(()=>D)),N(ha,"defaultExecOptions",(()=>ma)),N(ha,"execRootSync",(()=>k)),N(ha,"execRoot",(()=>U));let ma={stdio:"inherit",shell:!0};N(da={},"isAdminWindows",(()=>va)),N(da,"isAdminPosix",(()=>ya)),N(da,"isAdmin",(()=>M));let va=async function(){if("win32"!==process.platform)return!1;try{return await x("fsutil",["dirty","query",process.env.systemdrive??""]),!0}catch(e){return"ENOENT"===e.code&&async function(){try{return await x("fltmc"),!0}catch{return!1}}()}},ya=C;N({},"grantUserWriteAccess",(()=>G));var ga,wa,Ea,_a,ba,Oa,Ra,Sa,Ia,Ta,xa,Pa,Aa,Na,$a=function(e){return null!=e},Ca=$a,La=[].forEach,Da=Object.create,ka=function(e){var t=Da(null);return La.call(arguments,(function(e){Ca(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},Ua="function"==typeof(Ea=Math.sign)&&1===Ea(10)&&-1===Ea(-20)?Math.sign:wa?ga:(wa=1,ga=function(e){return isNaN(e=+e)||0===e?e:e>0?1:-1}),ja=Math.abs,Fa=Math.floor,Ma=Math.max,Ga=function(e){return Ma(0,function(e){return isNaN(e)?0:0!=(e=+e)&&isFinite(e)?Ua(e)*Fa(ja(e)):e}(e))},Ba=Ga,Ha=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&Ba(e)},qa=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},Va=$a,za=function(e){if(!Va(e))throw new TypeError("Cannot use null or undefined");return e},Xa=qa,Wa=za,Ya=function(){}.bind,Ka=function(){}.call,Ja=Object.keys,Qa={}.propertyIsEnumerable,Za=(_a="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(Wa(e)),Xa(t),r=Ja(e),o&&r.sort("function"==typeof o?Ya.call(o,e):void 0),"function"!=typeof _a&&(_a=r[_a]),Ka.call(_a,r,(function(r,o){return Qa.call(e,r)?Ka.call(t,n,e[r],r,e,o):undefined}))}),ec={},tc={exports:{}},rc="function"==typeof(Na=Object.assign)&&(Na(Aa={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Aa.foo+Aa.bar+Aa.trzy==="razdwatrzy")?Object.assign:function(){if(Pa)return xa;Pa=1;var e=Ta?Ia:(Ta=1,Ia=(Oa?ba:(Oa=1,ba=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(Sa)return Ra;Sa=1;var e=$a,t=Object.keys;return Ra=function(r){return t(e(r)?Object(r):r)}}()),t=za,r=Math.max;return xa=function(n,o){var i,s,a,c=r(arguments.length,2);for(n=Object(t(n)),a=function(e){try{n[e]=o[e]}catch(t){i||(i=t)}},s=1;c>s;++s)e(o=arguments[s]).forEach(a);if(void 0!==i)throw i;return n},xa}(),nc=$a,oc={function:!0,object:!0},ic=function(e){return nc(e)&&oc[typeof e]||!1};!function(e){var t=rc,r=ic,n=$a,o=Error.captureStackTrace;e.exports=function(i){var s=Error(i),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),o&&o(s,e.exports),s}}(tc);var sc,ac,cc,lc,uc=tc.exports,pc={exports:{}},fc=Ga;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(gy){}lc=B(),cc=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); };")}}(),pc.exports=function(e,t){var r;if(t=fc(t),e.length===t)return e;r=cc(t)(e);try{lc(r,e)}catch(gy){}return r};var dc,hc,mc=pc.exports,vc={exports:{}},yc=function(e){return null!=e},gc=yc,wc={object:!0,function:!0,undefined:!0},Ec=function(e){if(!function(e){return!!gc(e)&&hasOwnProperty.call(wc,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},_c=/^\s*class[\s{/}]/,bc=function(){}.toString,Oc="razdwatrzy",Rc="function"==typeof Oc.contains&&!0===Oc.contains("dwa")&&!1===Oc.contains("foo")?"".contains:function(){if(hc)return dc;hc=1;var e="".indexOf;return dc=function(t){return e.call(this,t,arguments[1])>-1}}(),Sc=yc,Ic=function(e){return!!function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!Ec(e)}(e)&&!_c.test(bc.call(e))},Tc=rc,xc=ka,Pc=Rc;(vc.exports=function(e,t){var r,n,o,i,s;return 2>arguments.length||"string"!=typeof e?(i=t,t=e,e=null):i=arguments[2],Sc(e)?(r=Pc.call(e,"c"),n=Pc.call(e,"e"),o=Pc.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?Tc(xc(i),s):s}).gs=function(e,t,r){var n,o,i,s;return"string"!=typeof e?(i=r,r=t,t=e,e=null):i=arguments[3],Sc(t)?Ic(t)?Sc(r)?Ic(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,Sc(e)?(n=Pc.call(e,"c"),o=Pc.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?Tc(xc(i),s):s};var Ac=vc.exports,Nc={exports:{}};!function(e,t){var r,n,o,i,s,a,c,l=Ac,u=qa,p=function(){}.apply,f=function(){}.call,d=Object.create,h=Object.defineProperty,m=Object.defineProperties,v={}.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n,i;return u(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),p.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(u(t),!v.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:n.splice(i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},i=function(e){var t,r,n,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;n=o[t];++t)p.call(n,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(i=Array((r=arguments.length)-1),t=1;r>t;++t)i[t-1]=arguments[t];p.call(o,this,i)}},s={on:r=function(e,t){var r;return u(t),v.call(this,"__ee__")?r=this.__ee__:(r=y.value=d(null),h(this,"__ee__",y),y.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},once:n,off:o,emit:i},a={on:l(r),once:l(n),off:l(o),emit:l(i)},c=m({},a),e.exports=t=function(e){return null==e?d(c):m(Object(e),a)},t.methods=s}(Nc,Nc.exports);var $c,Cc,Lc,Dc,kc,Uc,jc,Fc,Mc,Gc,Bc,Hc,qc,Vc,zc,Xc,Wc,Yc,Kc,Jc,Qc,Zc,el,tl,rl,nl,ol,il,sl,al,cl,ll,ul,pl,fl,dl=Nc.exports,hl=z(),ml=Array.isArray,vl=$a,yl=qa,gl=[].slice;fl=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(gl.call(e,this.length))};var wl,El,_l,bl,Ol,Rl,Sl,Il,Tl,xl,Pl,Al,Nl,$l,Cl,Ll,Dl,kl,Ul,jl,Fl,Ml,Gl,Bl,Hl,ql,Vl,zl,Xl,Wl,Yl,Kl,Jl,Ql,Zl,eu,tu,ru,nu,ou,iu,su,au,cu,lu,uu,pu,fu=qa,du=uc,hu=mc,mu=Ac,vu=dl.methods,yu=function(e){return(t=e,e=ml(t)?t:hl(t)).forEach((function(e){vl(e)&&yl(e)})),fl.bind(e);var t},gu=function(){}.apply,wu=function(){}.call,Eu=Object.create,_u=Object.defineProperties,bu=vu.on,Ou=vu.emit,Ru=qa,Su=Za,Iu=ec,Tu=function(e,t,r){var n,o,i,s,a,c,l,u,p,f,d,h,m,v,y,g=Eu(null);return o=!1!==t?t:isNaN(e.length)?1:e.length,r.normalizer&&(f=function(e){var t;return"function"==typeof e?{set:e,get:e}:(t={get:fu(e.get)},void 0!==e.set?(t.set=fu(e.set),e.delete&&(t.delete=fu(e.delete)),e.clear&&(t.clear=fu(e.clear)),t):(t.set=t.get,t))}(r.normalizer),i=f.get,s=f.set,a=f.delete,c=f.clear),null!=r.resolvers&&(y=yu(r.resolvers)),v=i?hu((function(t){var r,o,a=arguments;if(y&&(a=y(a)),null!==(r=i(a))&&hasOwnProperty.call(g,r))return d&&n.emit("get",r,a,this),g[r];if(o=1===a.length?wu.call(e,this,a[0]):gu.call(e,this,a),null===r){if(null!==(r=i(a)))throw du("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(g,r))throw du("Circular invocation","CIRCULAR_INVOCATION");return g[r]=o,h&&n.emit("set",r,null,o),o}),o):0===t?function(){var t;if(hasOwnProperty.call(g,"data"))return d&&n.emit("get","data",arguments,this),g.data;if(t=arguments.length?gu.call(e,this,arguments):wu.call(e,this),hasOwnProperty.call(g,"data"))throw du("Circular invocation","CIRCULAR_INVOCATION");return g.data=t,h&&n.emit("set","data",null,t),t}:function(t){var r,o,i=arguments;if(y&&(i=y(arguments)),o=i[0]+"",hasOwnProperty.call(g,o))return d&&n.emit("get",o,i,this),g[o];if(r=1===i.length?wu.call(e,this,i[0]):gu.call(e,this,i),hasOwnProperty.call(g,o))throw du("Circular invocation","CIRCULAR_INVOCATION");return g[o]=r,h&&n.emit("set",o,null,r),r},n={original:e,memoized:v,profileName:r.profileName,get:function(e){return y&&(e=y(e)),i?i(e):e[0]+""},has:function(e){return hasOwnProperty.call(g,e)},delete:function(e){var t;hasOwnProperty.call(g,e)&&(a&&a(e),t=g[e],delete g[e],m&&n.emit("delete",e,t))},clear:function(){var e=g;c&&c(),g=Eu(null),n.emit("clear",e)},on:function(e,t){return"get"===e?d=!0:"set"===e?h=!0:"delete"===e&&(m=!0),bu.call(this,e,t)},emit:Ou,updateEnv:function(){e=n.original}},l=i?hu((function(e){var t,r=arguments;y&&(r=y(r)),null!==(t=i(r))&&n.delete(t)}),o):0===t?function(){return n.delete("data")}:function(e){return y&&(e=y(arguments)[0]),n.delete(e)},u=hu((function(){var e,r=arguments;return 0===t?g.data:(y&&(r=y(r)),e=i?i(r):r[0]+"",g[e])})),p=hu((function(){var e,r=arguments;return 0===t?n.has("data"):(y&&(r=y(r)),null!==(e=i?i(r):r[0]+"")&&n.has(e))})),_u(v,{__memoized__:mu(!0),delete:mu(l),clear:mu(n.clear),_get:mu(u),_has:mu(p)}),n},xu=Ha,Pu={},Au={},Nu={exports:{}},$u={},Cu={},Lu={},Du={},ku=ka,Uu=Ha,ju=function e(t){var r,n,o;if(Ru(t),(r=Object(arguments[1])).async&&r.promise)throw Error("Options 'async' and 'promise' cannot be used together");return hasOwnProperty.call(t,"__memoized__")&&!r.force?t:(n=xu(r.length,t.length,r.async&&Iu.async),o=Tu(t,n,r),Su(Iu,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},Fu=function(e){var t,r=ku(arguments[1]);return r.normalizer||0!==(t=r.length=Uu(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(El||(El=1,wl=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),wl):t>1&&(r.normalizer=(bl||(bl=1,_l=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),_l)(t)):r.normalizer=!1===t?function(){if($l)return Nl;$l=1;var e=X(),t=Object.create;return Nl=function(){var r=0,n=[],o=t(null);return{get:function(t){var r,o=0,i=n,s=t.length;if(0===s)return i[s]||null;if(i=i[s]){for(;s-1>o;){if(-1===(r=e.call(i[0],t[o])))return null;i=i[1][r],++o}return-1===(r=e.call(i[0],t[o]))?null:i[1][r]||null}return null},set:function(t){var i,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===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1,a[1].push([[],[]])),a=a[1][i],++s;-1===(i=e.call(a[0],t[s]))&&(i=a[0].push(t[s])-1),a[1][i]=++r}return o[r]=t,r},delete:function(t){var r,i=0,s=n,a=o[t],c=a.length,l=[];if(0===c)delete s[c];else if(s=s[c]){for(;c-1>i;){if(-1===(r=e.call(s[0],a[i])))return;l.push(s,r),s=s[1][r],++i}if(-1===(r=e.call(s[0],a[i])))return;for(t=s[1][r],s[0].splice(r,1),s[1].splice(r,1);!s[0].length&&l.length;)r=l.pop(),(s=l.pop())[0].splice(r,1),s[1].splice(r,1)}delete o[t]},clear:function(){n=[],o=t(null)}}},Nl}()():1===t?function(){if(Ll)return Cl;Ll=1;var e=X();return Cl=function(){var t=0,r=[],n=[];return{get:function(t){var o=e.call(r,t[0]);return-1===o?null:n[o]},set:function(e){return r.push(e[0]),n.push(++t),t},delete:function(t){var o=e.call(n,t);-1!==o&&(r.splice(o,1),n.splice(o,1))},clear:function(){r=[],n=[]}}}}()():function(){if(kl)return Dl;kl=1;var e=X(),t=Object.create;return Dl=function(r){var n=0,o=[[],[]],i=t(null);return{get:function(t){for(var n,i=0,s=o;r-1>i;){if(-1===(n=e.call(s[0],t[i])))return null;s=s[1][n],++i}return-1===(n=e.call(s[0],t[i]))?null:s[1][n]||null},set:function(t){for(var s,a=0,c=o;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,i[n]=t,n},delete:function(t){for(var n,s=0,a=o,c=[],l=i[t];r-1>s;){if(-1===(n=e.call(a[0],l[s])))return;c.push(a,n),a=a[1][n],++s}if(-1!==(n=e.call(a[0],l[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 i[t]}},clear:function(){o=[[],[]],i=t(null)}}},Dl}()(t)),r.async&&function(){if(Gl)return Pu;Gl=1;var e=z(),t=W(),r=B(),n=mc,o=Y(),i=[].slice,s=function(){}.apply,a=Object.create;ec.async=function(c,l){var u,p,f,d=a(null),h=a(null),m=l.memoized,v=l.original;l.memoized=n((function(e){var t=arguments,r=t[t.length-1];return"function"==typeof r&&(u=r,t=i.call(t,0,-1)),m.apply(p=this,f=t)}),m);try{r(l.memoized,m)}catch(gy){}l.on("get",(function(e){var t,r,n;if(u){if(d[e])return"function"==typeof d[e]?d[e]=[d[e],u]:d[e].push(u),void(u=null);t=u,r=p,n=f,u=p=f=null,o((function(){var o;hasOwnProperty.call(h,e)?(o=h[e],l.emit("getasync",e,n,r),s.call(t,o.context,o.args)):(u=t,p=r,f=n,m.apply(r,n))}))}})),l.original=function(){var t,r,n,i;return u?(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),l.has(c)&&(r?l.delete(c):(h[c]={context:this,args:a},l.emit("setasync",c,"function"==typeof n?1:n.length))),"function"==typeof n?i=s.call(n,this,a):n.forEach((function(e){i=s.call(e,this,a)}),this),i}else o(s.bind(t,this,arguments))},n=u,u=p=f=null,t.push(r),i=s.call(v,this,t),r.cb=n,u=r,i):s.call(v,this,arguments)},l.on("set",(function(e){u?(d[e]?"function"==typeof d[e]?d[e]=[d[e],u.cb]:d[e].push(u.cb):d[e]=u.cb,delete u.cb,u.id=e,u=null):l.delete(e)})),l.on("delete",(function(e){var t;hasOwnProperty.call(d,e)||h[e]&&(t=h[e],delete h[e],l.emit("deleteasync",e,i.call(t.args,1)))})),l.on("clear",(function(){var e=h;h=a(null),l.emit("clearasync",t(e,(function(e){return i.call(e.args,1)})))}))}}(),r.promise&&Q(),r.dispose&&function(){if(ru)return $u;ru=1;var e=qa,t=Za,r=ec,n=function(){}.apply;r.dispose=function(o,i,s){var a;if(e(o),s.async&&r.async||s.promise&&r.promise)return i.on("deleteasync",a=function(e,t){n.call(o,null,t)}),void i.on("clearasync",(function(e){t(e,(function(e,t){a(t,e)}))}));i.on("delete",a=function(e,t){o(t)}),i.on("clear",(function(e){t(e,(function(e,t){a(t,e)}))}))}}(),r.maxAge&&function(){if(au)return Cu;au=1;var e=z(),t=Za,r=Y(),n=J(),o=function(){if(su)return iu;su=1;var e=Ga,t=ou?nu:(ou=1,nu=2147483647);return iu=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),i=ec,s=Function.prototype,a=Math.max,c=Math.min,l=Object.create;i.maxAge=function(u,p,f){var d,h,m,v;(u=o(u))&&(d=l(null),p.on("set"+(h=f.async&&i.async||f.promise&&i.promise?"async":""),(function(e){d[e]=setTimeout((function(){p.delete(e)}),u),"function"==typeof d[e].unref&&d[e].unref(),v&&(v[e]&&"nextTick"!==v[e]&&clearTimeout(v[e]),v[e]=setTimeout((function(){delete v[e]}),m),"function"==typeof v[e].unref&&v[e].unref())})),p.on("delete"+h,(function(e){clearTimeout(d[e]),delete d[e],v&&("nextTick"!==v[e]&&clearTimeout(v[e]),delete v[e])})),f.preFetch&&(m=!0===f.preFetch||isNaN(f.preFetch)?.333:a(c(+f.preFetch,1),0))&&(v={},m=(1-m)*u,p.on("get"+h,(function(t,o,i){v[t]||(v[t]="nextTick",r((function(){var r;"nextTick"===v[t]&&(delete v[t],p.delete(t),f.async&&(o=e(o)).push(s),r=p.memoized.apply(i,o),f.promise&&n(r)&&("function"==typeof r.done?r.done(s,s):r.then(s,s)))})))}))),p.on("clear"+h,(function(){t(d,(function(e){clearTimeout(e)})),d={},v&&(t(v,(function(e){"nextTick"!==e&&clearTimeout(e)})),v={})})))}}(),r.max&&function(){if(uu)return Lu;uu=1;var e=Ga,t=function(){if(lu)return cu;lu=1;var e=Ga,t=Object.create,r={}.hasOwnProperty;return cu=function(n){var o,i=0,s=1,a=t(null),c=t(null),l=0;return n=e(n),{hit:function(e){var t=c[e],u=++l;if(a[u]=e,c[e]=u,!t){if(++i,n>=i)return;return o(e=a[s]),e}if(delete a[t],s===t)for(;!r.call(a,++s);)continue},delete:o=function(e){var t=c[e];if(t&&(delete a[t],delete c[e],--i,s===t)){if(!i)return l=0,void(s=1);for(;!r.call(a,++s);)continue}},clear:function(){i=0,s=1,a=t(null),c=t(null),l=0}}}}(),r=ec;r.max=function(n,o,i){var s,a,c;(n=e(n))&&(a=t(n),o.on("set"+(s=i.async&&r.async||i.promise&&r.promise?"async":""),c=function(e){void 0!==(e=a.hit(e))&&o.delete(e)}),o.on("get"+s,c),o.on("delete"+s,a.delete),o.on("clear"+s,a.clear))}}(),r.refCounter&&function(){if(pu)return Du;pu=1;var e=Ac,t=ec,r=Object.create,n=Object.defineProperties;t.refCounter=function(o,i,s){var a,c;a=r(null),i.on("set"+(c=s.async&&t.async||s.promise&&t.promise?"async":""),(function(e,t){a[e]=t||1})),i.on("get"+c,(function(e){++a[e]})),i.on("delete"+c,(function(e){delete a[e]})),i.on("clear"+c,(function(){a={}})),n(i.memoized,{deleteRef:e((function(){var e=i.get(arguments);return null===e?null:a[e]?! --a[e]&&(i.delete(e),!0):null})),getRefCount:e((function(){var e=i.get(arguments);return null===e?0:a[e]?a[e]:0}))})}}(),ju(e,r)};const Mu=e(Fu),Gu=/^~(?=$|\/|\\)/,{appendFile:Bu,readFile:Hu,writeFile:qu}=Ir,Vu=ee("~/.bashrc"),zu=Mu((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([te(e),re(t,ee("~/.bashrc")),re(t,ee("~/.profile"))])}catch(r){v(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0}),Xu=br,Wu="win32"!==Xu.platform(),Yu=Xu.release(),Ku=/(\d+\.\d+)\.(\d+)/,Ju=e((function(e){return Wu?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&+t>=17134.1184)(...Ku.exec(Yu).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var Qu,Zu,ep,tp,rp={exports:{}};ep=function(){if(Zu)return Qu;Zu=1;var e=/[|\\{}()[\]^$+*?.]/g;return Qu=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),tp=function(e){return e.split("").reverse().join("")},rp.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+ep(t)+"])(?!"+ep(r)+")","g"),tp(tp(e).replace(n,"$1"+r)))};const np=e(rp.exports),{appendFile:op}=Ir,{appendFile:ip}=Ir,sp=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var ap={exports:{}};!function(e){!function(){function t(e,t,o){if(r(e),"object"!=typeof o)throw Error("List of variants should be specified as an object");var i=n[e](t);return void 0!==o[i]?o[i]:null}function r(e){(function(e){return void 0!==n[e]})(e)||function(e){try{ae(__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}}()}(ap);var cp=ap.exports,lp=cp,up={};cp.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 pp={exports:{}};pp.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const fp=lp,dp=pp.exports,hp=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],mp={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},vp={};var yp={create:function(e){return e=Object.assign({},mp,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!vp[e]){if(!dp||!r)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{ce(ae(`../locales/${e}.js`))}catch(t){throw Error(`Failed to load locale: ${e} from ../locales/${e}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${t}`)}}(e)}}(r.locale,{autoload:r.autoloadLocales}),!e)throw Error("Missing first date argument");if(!t)throw Error("Missing second date argument");const n=function(e,t){let r=t-e;const n=[];return hp.some((function(e){const t=e[0],o=e[1],i=Math.floor(r/o);if(r-=i*o,n.push([t,i]),0>=r)return!0})),n}(e,t),o=[];for(const i of n){const[e,t]=i;if(t>0&&o.push(le(e,t,r)),o.length>=r.span)break}return o.join(r.delimiter)}(t,r,n=Object.assign({},e,n||{}))}}},addLocale:ce,defaultConfig:mp};const gp=e({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"}}}});var wp={exports:{}},Ep={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},_p="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=Ep,i=_p,s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],l=t.t={};let u=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",o],[p,n]],d=(e,t,r)=>{const n=(e=>{for(const[t,r]of f)e=e.split(t+"*").join(`${t}{0,${r}}`).split(t+"+").join(`${t}{1,${r}}`);return e})(t),o=u++;i(e,o,t),l[e]=o,c[o]=t,s[o]=RegExp(t,r?"g":void 0),a[o]=RegExp(n,r?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",p+"+"),d("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),d("FULL",`^${c[l.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),d("LOOSE",`^${c[l.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",c[l.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),d("XRANGEIDENTIFIER",c[l.NUMERICIDENTIFIER]+"|x|X|\\*"),d("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),d("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",c[l.COERCEPLAIN]+"(?:$|[^\\d])"),d("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",c[l.COERCE],!0),d("COERCERTLFULL",c[l.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(wp,wp.exports);var bp=wp.exports;const Op=Object.freeze({loose:!0}),Rp=Object.freeze({});var Sp=e=>e?"object"!=typeof e?Op:e:Rp;const Ip=/^[0-9]+$/,Tp=(e,t)=>{const r=Ip.test(e),n=Ip.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var xp={compareIdentifiers:Tp,rcompareIdentifiers:(e,t)=>Tp(t,e)};const Pp=_p,{MAX_LENGTH:Ap,MAX_SAFE_INTEGER:Np}=Ep,{safeRe:$p,t:Cp}=bp,Lp=Sp,{compareIdentifiers:Dp}=xp;var kp=class e{constructor(t,r){if(r=Lp(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>Ap)throw new TypeError(`version is longer than ${Ap} characters`);Pp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?$p[Cp.LOOSE]:$p[Cp.FULL]);if(!n)throw new TypeError("Invalid Version: "+t);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Np||0>this.major)throw new TypeError("Invalid major version");if(this.minor>Np||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>Np||0>this.patch)throw new TypeError("Invalid patch version");this.prerelease=n[4]?n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&Np>t)return t}return e})):[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(t){if(Pp("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Dp(this.major,t.major)||Dp(this.minor,t.minor)||Dp(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(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 e=this.prerelease[r],n=t.prerelease[r];if(Pp("prerelease compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return Dp(e,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{const e=this.build[r],n=t.build[r];if(Pp("build compare",r,e,n),void 0===e&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===e)return-1;if(e!==n)return Dp(e,n)}while(++r)}inc(e,t,r){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"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=+r?1:0;if(!t&&!1===r)throw Error("invalid increment argument: identifier is empty");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===Dp(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}};const Up=kp;var jp=(e,t,r=!1)=>{if(e instanceof Up)return e;try{return new Up(e,t)}catch(n){if(!r)return null;throw n}};const Fp=jp;var Mp=(e,t)=>{const r=Fp(e,t);return r?r.version:null};const Gp=e(Mp),Bp=jp;const Hp=kp;const qp=jp;const Vp=kp;var zp=(e,t)=>new Vp(e,t).major;const Xp=e(zp),Wp=kp;const Yp=kp;const Kp=jp;const Jp=kp;var Qp=(e,t,r)=>new Jp(e,r).compare(new Jp(t,r));const Zp=e(Qp),ef=Qp;const tf=Qp;const rf=kp;var nf=(e,t,r)=>{const n=new rf(e,r),o=new rf(t,r);return n.compare(o)||n.compareBuild(o)};const of=nf;const sf=nf;const af=Qp;var cf=(e,t,r)=>af(e,t,r)>0;const lf=Qp;var uf=(e,t,r)=>0>lf(e,t,r);const pf=Qp;var ff=(e,t,r)=>0===pf(e,t,r);const df=Qp;var hf=(e,t,r)=>0!==df(e,t,r);const mf=Qp;var vf=(e,t,r)=>mf(e,t,r)>=0;const yf=Qp;var gf=(e,t,r)=>0>=yf(e,t,r);const wf=e(gf),Ef=ff,_f=hf,bf=cf,Of=vf,Rf=uf,Sf=gf;var If=(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 Ef(e,r,n);case"!=":return _f(e,r,n);case">":return bf(e,r,n);case">=":return Of(e,r,n);case"<":return Rf(e,r,n);case"<=":return Sf(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const Tf=kp,xf=jp,{safeRe:Pf,t:Af}=bp;var Nf=(e,t)=>{if(e instanceof Tf)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?Pf[Af.COERCERTLFULL]:Pf[Af.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?Pf[Af.COERCEFULL]:Pf[Af.COERCE]);return null===r?null:xf(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const $f=e(Nf);var Cf,Lf,Df,kf,Uf=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}};const jf=ue();var Ff=(e,t,r)=>{try{t=new jf(t,r)}catch(n){return!1}return t.test(e)};const Mf=ue();const Gf=kp,Bf=ue();const Hf=kp,qf=ue();const Vf=kp,zf=ue(),Xf=cf;const Wf=ue();const Yf=kp,Kf=pe(),{ANY:Jf}=Kf,Qf=ue(),Zf=Ff,ed=cf,td=uf,rd=gf,nd=vf;var od=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new Yf(e,n),t=new Qf(t,n),r){case">":o=ed,i=rd,s=td,a=">",c=">=";break;case"<":o=td,i=nd,s=ed,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Zf(e,t,n))return!1;for(let l=0;t.set.length>l;++l){let r=null,u=null;if(t.set[l].forEach((e=>{e.semver===Jf&&(e=new Kf(">=0.0.0")),r=r||e,u=u||e,o(e.semver,r.semver,n)?r=e:s(e.semver,u.semver,n)&&(u=e)})),r.operator===a||r.operator===c)return!1;if((!u.operator||u.operator===a)&&i(e,u.semver))return!1;if(u.operator===c&&s(e,u.semver))return!1}return!0};const id=od;const sd=od;const ad=ue();const cd=Ff,ld=Qp,ud=ue(),pd=pe(),{ANY:fd}=pd,dd=Ff,hd=Qp,md=[new pd(">=0.0.0-0")],vd=[new pd(">=0.0.0")],yd=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===fd){if(1===t.length&&t[0].semver===fd)return!0;e=r.includePrerelease?md:vd}if(1===t.length&&t[0].semver===fd){if(r.includePrerelease)return!0;t=vd}const n=new Set;let o,i,s,a,c,l,u;for(const d of e)">"===d.operator||">="===d.operator?o=gd(o,d,r):"<"===d.operator||"<="===d.operator?i=wd(i,d,r):n.add(d.semver);if(n.size>1)return null;if(o&&i){if(s=hd(o.semver,i.semver,r),s>0)return null;if(0===s&&(">="!==o.operator||"<="!==i.operator))return null}for(const d of n){if(o&&!dd(d,o+"",r))return null;if(i&&!dd(d,i+"",r))return null;for(const e of t)if(!dd(d,e+"",r))return!1;return!0}let p=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver,f=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;p&&1===p.prerelease.length&&"<"===i.operator&&0===p.prerelease[0]&&(p=!1);for(const d of t){if(u=u||">"===d.operator||">="===d.operator,l=l||"<"===d.operator||"<="===d.operator,o)if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),">"===d.operator||">="===d.operator){if(a=gd(o,d,r),a===d&&a!==o)return!1}else if(">="===o.operator&&!dd(o.semver,d+"",r))return!1;if(i)if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),"<"===d.operator||"<="===d.operator){if(c=wd(i,d,r),c===d&&c!==i)return!1}else if("<="===i.operator&&!dd(i.semver,d+"",r))return!1;if(!d.operator&&(i||o)&&0!==s)return!1}return!(o&&l&&!i&&0!==s||i&&u&&!o&&0!==s||f||p)},gd=(e,t,r)=>{if(!e)return t;const n=hd(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},wd=(e,t,r)=>{if(!e)return t;const n=hd(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const Ed=bp,_d=Ep,bd=kp,Od=xp;var Rd={parse:jp,valid:Mp,clean:(e,t)=>{const r=Bp(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},inc:(e,t,r,n,o)=>{"string"==typeof r&&(o=n,n=r,r=void 0);try{return new Hp(e instanceof Hp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=qp(e,null,!0),n=qp(t,null,!0),o=r.compare(n);if(0===o)return null;const i=o>0,s=i?r:n,a=i?n:r,c=!!s.prerelease.length;if(a.prerelease.length&&!c)return a.patch||a.minor?s.patch?"patch":s.minor?"minor":"major":"major";const l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"},major:zp,minor:(e,t)=>new Wp(e,t).minor,patch:(e,t)=>new Yp(e,t).patch,prerelease:(e,t)=>{const r=Kp(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:Qp,rcompare:(e,t,r)=>ef(t,e,r),compareLoose:(e,t)=>tf(e,t,!0),compareBuild:nf,sort:(e,t)=>e.sort(((e,r)=>of(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>sf(r,e,t))),gt:cf,lt:uf,eq:ff,neq:hf,gte:vf,lte:gf,cmp:If,coerce:Nf,Comparator:pe(),Range:ue(),satisfies:Ff,toComparators:(e,t)=>new Mf(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),maxSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Bf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Gf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new qf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new Hf(n,r)))})),n},minVersion:(e,t)=>{e=new zf(e,t);let r=new Vf("0.0.0");if(e.test(r))return r;if(r=new Vf("0.0.0-0"),e.test(r))return r;r=null;for(let n=0;e.set.length>n;++n){let t=null;e.set[n].forEach((e=>{const r=new Vf(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!Xf(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!Xf(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new Wf(e,t).range||"*"}catch(r){return null}},outside:od,gtr:(e,t,r)=>id(e,t,">",r),ltr:(e,t,r)=>sd(e,t,"<",r),intersects:(e,t,r)=>(e=new ad(e,r),t=new ad(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>ld(e,t,r)));for(const l of s)cd(l,t,r)?(i=l,o||(o=l)):(i&&n.push([o,i]),i=null,o=null);o&&n.push([o,null]);const a=[];for(const[l,u]of n)a.push(l===u?l:u||l!==s[0]?u?l===s[0]?"<="+u:`${l} - ${u}`:">="+l:"*");const c=a.join(" || ");return("string"==typeof t.raw?t.raw:t+"").length>c.length?c:t},subset:(e,t,r={})=>{if(e===t)return!0;e=new ud(e,r),t=new ud(t,r);let n=!1;e:for(const o of e.set){for(const e of t.set){const t=yd(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:bd,re:Ed.re,src:Ed.src,tokens:Ed.t,SEMVER_SPEC_VERSION:_d.SEMVER_SPEC_VERSION,RELEASE_TYPES:_d.RELEASE_TYPES,compareIdentifiers:Od.compareIdentifiers,rcompareIdentifiers:Od.rcompareIdentifiers},Sd=Rd,Id=br,Td=$r,xd=Sr,Pd=zr,Ad=wn.env.npm_package_json,Nd=wn.env.npm_config_user_agent,$d=!(!Nd||!Nd.startsWith("npm")),Cd=!(!Ad||!Ad.endsWith("package.json")),Ld=$d||Cd,Dd=!(!Nd||!Nd.startsWith("yarn")),kd=Ld||Dd,Ud=Id.homedir(),jd=process.env.XDG_CONFIG_HOME||Td.join(Ud,".config","simple-update-notifier"),Fd=function(e){return Td.join(jd,"".concat(e.replace("@","").replace("/","__"),".json"))},Md=function(e,t){return fe(void 0,0,void 0,(function(){var r;return de(this,(function(n){return r="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,n){Pd.get(r,(function(r){var o="";r.on("data",(function(e){return o+=e})),r.on("end",(function(){try{var r=JSON.parse(o)[t];r||n(Error("Error getting version")),e(r)}catch(i){n(Error("Could not parse version response"))}}))})).on("error",(function(e){return n(e)}))}))]}))}))},Gd=function(e){var t=e.pkg,r=e.updateCheckInterval,n=void 0===r?864e5:r,o=e.distTag,i=void 0===o?"latest":o,s=e.alwaysRun,a=e.debug;return fe(void 0,0,void 0,(function(){var r,o;return de(this,(function(c){switch(c.label){case 0:return xd.existsSync(jd)||xd.mkdirSync(jd,{recursive:!0}),r=function(t){var r=Fd(t);try{if(!xd.existsSync(r))return;return JSON.parse(xd.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,Md(t.name,i)]:[3,2];case 1:return o=c.sent(),l=Fd(t.name),xd.writeFileSync(l,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),Sd.gt(o,t.version)?[2,o]:(a&&console.error("Latest version (".concat(o,") not newer than current version (").concat(t.version,")")),[3,3]);case 2:a&&console.error("Too recent to check for a new update. simpleUpdateNotifier() interval set to ".concat(n,"ms but only ").concat((new Date).getTime()-r,"ms since last check.")),c.label=3;case 3:return[2,!1]}var l}))}))};const Bd=e((function(e){return fe(void 0,0,void 0,(function(){var t,r;return de(this,(function(n){switch(n.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||kd&&!e.shouldNotifyInNpmScript))return e.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Gd(e)];case 2:return(t=n.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),"┐")],o=0,i=t;i.length>o;o++)n.push("│ ".concat(i[o].padEnd(r)," │"));return n.push("└".concat("─".repeat(r+2),"┘")),n.join("\n")}("New version of ".concat(e.pkg.name," available!\nCurrent Version: ").concat(e.pkg.version,"\nLatest Version: ").concat(t))),[3,4];case 3:return r=n.sent(),e.debug&&r instanceof Error&&console.error("Unexpected error in simpleUpdateNotifier():",r),[3,4];case 4:return[2]}}))}))})),Hd={name:"setup-cpp",version:"0.41.1"};var qd={};!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},o=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}}(),i=t(Sr),s=En,a=t($r),c=t(qr),l=t(zr),u=Wr,p=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 o=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 i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,{captureRejections:!0}));return i.__validate(e,n)?(i.url=i.requestURL=e.trim(),i.state=p.IDLE,i.__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},i.__opts=Object.assign({},i.__defaultOpts),i.__pipes=[],i.__total=0,i.__downloaded=0,i.__progress=0,i.__retryCount=0,i.__retryTimeout=null,i.__resumeRetryCount=0,i.__states=p,i.__promise=null,i.__request=null,i.__response=null,i.__isAborted=!1,i.__isResumed=!1,i.__isResumable=!1,i.__isRedirected=!1,i.__destFolder=n,i.__statsEstimate={time:0,bytes:0,prevBytes:0,throttleTime:0},i.__fileName="",i.__filePath="",i.updateOptions(o),i):r(i)}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),o(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,o=r.total,s=e.__opts.override;return e.__opts.override=!0,e.__filePath=e.__getFilePath(n),e.__opts.override=s,e.__filePath&&i.existsSync(e.__filePath)?e.__getFilesizeInBytes(e.__filePath)===o?t():e.resumeFromFile(e.__filePath,{total:o,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){i.access(e.__filePath,(function(n){return n?(e.__emitStop(),t(!0)):void i.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)},o=function(i,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,i).href;return e.emit("redirected",c,i),o(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()};o(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 o=/^https?:\/\//.test(n.headers.location)?n.headers.location:new s.URL(n.headers.location,r.url).href;return r.__isRedirected=!0,r.__initProtocol(o),r.emit("redirected",o,r.url),r.__start()}if(200!==n.statusCode&&206!==n.statusCode){var i=Error("Response status was "+n.statusCode);return i.status=n.statusCode||0,i.body=n.body||"",r.__setState(r.__states.FAILED),r.emit("error",i),t(i)}(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 o=this,s=e;if(this.__isResumed)this.__fileStream=i.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(),i.existsSync(this.__filePath)){var l=this.__getFilesizeInBytes(this.__filePath),u=this.__total?this.__total:0;if("object"===n(this.__opts.override)&&this.__opts.override.skip&&(this.__opts.override.skipSmaller||l>=u))return this.emit("skip",{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:l}),this.__setState(this.__states.SKIPPED),t(!0)}this.__fileStream=i.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 o.__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 o=!!r.__total&&r.__downloaded!==r.__total;if(o&&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:o,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,o=r.delay,i=void 0===o?0:o,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())}),i)}))}))):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"),o=n?e["content-disposition"].match(/.*filename\*=.*?'.*?'([^"].+?[^"])(?:(?:;)|$)/i):null,i=!n||o?null:e["content-disposition"].match(/.*filename="(.*?)";?/i),c=!n||o||i?null:e["content-disposition"].match(/.*filename=([^"].+?[^"])(?:(?:;)|$)/i);return n&&(o||i||c)?(r=(r=e["content-disposition"]).trim(),o?r=o[1]:i?r=i[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 o=this.__opts.fileName,i=o.name,s=!!o.hasOwnProperty("ext")&&o.ext;if("string"==typeof s)return i+"."+s;if("boolean"==typeof s){if(s)return i;var c=e.includes(".")?e.split(".").pop():"";return""===c?i:i+"."+c}}return e}},{key:"__calculateStats",value:function(e){var t=new Date,r=t-this.__statsEstimate.time,n=t-this.__statsEstimate.throttleTime,o=this.__total||0;e&&(this.__downloaded+=e,this.__progress=0===o?0:this.__downloaded/o*100,(this.__downloaded===o||r>1e3)&&(this.__statsEstimate.time=t,this.__statsEstimate.bytes=this.__downloaded-this.__statsEstimate.prevBytes,this.__statsEstimate.prevBytes=this.__downloaded),(this.__downloaded===o||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),o={protocol:n.protocol,host:n.hostname,port:n.port,path:n.pathname+n.search,method:e};return r&&(o.headers=r),o}},{key:"__getFilesizeInBytes",value:function(e){try{return i.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(!i.existsSync(t))throw Error("Destination Folder must exist");if(!i.statSync(t).isDirectory())throw Error("Destination Folder must be a directory");try{i.accessSync(t,i.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=l,t.agent=new l.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{i.accessSync(e,i.F_OK);var t=e.match(/(.*)(\([0-9]+\))(\..*)$/),r=t?t[1].trim():e,n=t?parseInt(t[2].replace(/\(|\)/,"")):0,o=e.split(".").pop();return o!==e&&o.length>0?r=r.replace(o="."+o,""):o="",this.__uniqFileNameSync(r+" ("+ ++n+")"+o)}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?i.access(e.__filePath,(function(n){return n?t():void i.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}(u.EventEmitter)}(qd);const{appendFile:Vd}=Ir,zd="Dpkg::Lock::Timeout=300";let Xd=!1;const Wd=Mu((function(e=we()){k(e,"nala"!==e?["update","-y","-o",zd]:["update","-o",zd],{...ma,env:ye(e)}),Xd=!0}));var Yd,Kd;(Kd=Yd||(Yd={}))[Kd.NameDashVersion=0]="NameDashVersion",Kd[Kd.NameEqualsVersion=1]="NameEqualsVersion",Kd[Kd.Name=2]="Name",Kd[Kd.None=3]="None";const Jd=Mu((async function(e){Wd(e);const t=await be([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&k(e,["install","-y","--fix-broken","-o",zd,...t],{...ma,env:ye(e)})}),{promise:!0}),Qd=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],Zd="/etc/apt/trusted.gpg.d",eh="keyserver.ubuntu.com";let th,rh,nh,oh,ih,sh=!1,ah=!1,ch=!1,lh=!1;const uh=/Version\s*:\s*(.*)/g;let ph=!1;var fh=$r;const dh=e((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=fh.basename(e,fh.extname(e))+t,o=fh.join(fh.dirname(e),n);return(r=e.slice(0,2))==="."+fh.sep||"./"===r?"."+fh.sep+o:o}));var hh={},mh={};Ge(mh,"name",(()=>Be));var vh={};Ge(vh,"normalizeTrim",(()=>He));var yh={};Ge(yh,"addExeExt",(()=>qe));var gh={};Ge(gh,"addNamePrefix",(()=>Ve));var wh={};Ge(wh,"addNameSuffix",(()=>ze));var Eh={};Ge(Eh,"addShExt",(()=>Xe));var _h={};Ge(_h,"addShRelativePrefix",(()=>We));var bh={};Ge(bh,"removeExt",(()=>Ye));var Oh={};Ge(Oh,"replaceExt",(()=>Ke));var Rh={};Ge(Rh,"isPathInside",(()=>Je)),Me(hh,mh),Me(hh,vh),Me(hh,yh),Me(hh,gh),Me(hh,wh),Me(hh,Eh),Me(hh,_h),Me(hh,bh),Me(hh,Oh),Me(hh,Rh);const Sh=["x64","amd64","x86_64","win64","64"],Ih=["x86","i386","ia32","win32","32","x32"],Th=["aarch64","arm64","woa64","arm"],xh=["armv7","armv7a"],Ph=["powerpc64le","ppc64le"],Ah=["sparc64"];var Nh={},$h={},Ch={};!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=In&&In.__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]}),o=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=In&&In.__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 o(t,e),t},s=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=i(Sr),c=i($r);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 o;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile())if(e.IS_WINDOWS){const e=c.extname(r).toUpperCase();if(n.some((t=>t.toUpperCase()===e)))return r}else if(t(o))return r;const i=r;for(const a of n){r=i+a,o=void 0;try{o=yield e.stat(r)}catch(s){"ENOENT"!==s.code&&console.log(`Unexpected error attempting to determine if executable file exists '${r}': ${s}`)}if(o&&o.isFile()){if(e.IS_WINDOWS){try{const t=c.dirname(r),n=c.basename(r).toUpperCase();for(const o of yield e.readdir(t))if(n===o.toUpperCase()){r=c.join(t,o);break}}catch(s){console.log(`Unexpected error attempting to determine the actual case of the file '${r}': ${s}`)}return r}if(t(o))return r}}return""}))},e.getCmdPath=function(){var e;return null!==(e=process.env.COMSPEC)&&void 0!==e?e:"cmd.exe"}}(Ch);var Lh=In&&In.__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]}),Dh=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),kh=In&&In.__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)&&Lh(t,e,r);return Dh(t,e),t},Uh=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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($h,"__esModule",{value:!0}),$h.findInPath=$h.which=Gh=$h.mkdirP=$h.rmRF=$h.mv=$h.cp=void 0;const jh=Jr,Fh=kh($r),Mh=kh(Ch);$h.cp=function(e,t,r={}){return Uh(this,void 0,void 0,(function*(){const{force:n,recursive:o,copySourceDirectory:i}=function(e){return{force:null==e.force||e.force,recursive:!!e.recursive,copySourceDirectory:null==e.copySourceDirectory||!!e.copySourceDirectory}}(r),s=(yield Mh.exists(t))?yield Mh.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?Fh.join(t,Fh.basename(e)):t;if(!(yield Mh.exists(e)))throw Error("no such file or directory: "+e);if((yield Mh.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield tt(e,a,0,n)}else{if(""===Fh.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield rt(e,a,n)}}))},$h.mv=function(e,t,r={}){return Uh(this,void 0,void 0,(function*(){if(yield Mh.exists(t)){let n=!0;if((yield Mh.isDirectory(t))&&(t=Fh.join(t,Fh.basename(e)),n=yield Mh.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield Qe(t)}}yield Ze(Fh.dirname(t)),yield Mh.rename(e,t)}))},$h.rmRF=Qe;var Gh=$h.mkdirP=Ze;$h.which=function e(t,r){return Uh(this,void 0,void 0,(function*(){if(!t)throw Error("parameter 'tool' is required");if(r){const r=yield e(t,!1);if(!r)throw Error(Mh.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 n=yield et(t);return n&&n.length>0?n[0]:""}))},$h.findInPath=et;var Bh={exports:{}},Hh={exports:{}};!function(e,t){function r(e){A[e]=N++}function n(e){for(var t=0;C.length>t;t++){var r=C[t][0],n=C[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>R)return null;if(!(t.loose?x[A.LOOSE]:x[A.FULL]).test(e))return null;try{return new i(e,t)}catch(r){return null}}function i(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>R)throw new TypeError("version is longer than "+R+" characters");if(!(this instanceof i))return new i(e,t);O("SemVer",e,t),this.options=t,this.loose=!!t.loose;var r=e.trim().match(t.loose?x[A.LOOSE]:x[A.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>S||0>this.major)throw new TypeError("Invalid major version");if(this.minor>S||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>S||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&&S>t)return t}return e})):[],this.build=r[5]?r[5].split("."):[],this.format()}function s(e,t){var r=D.test(e),n=D.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 i(e,r).compare(new i(t,r))}function c(e,t,r){return a(e,t,r)>0}function l(e,t,r){return 0>a(e,t,r)}function u(e,t,r){return 0===a(e,t,r)}function p(e,t,r){return 0!==a(e,t,r)}function f(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 u(e,r,n);case"!=":return p(e,r,n);case">":return c(e,r,n);case">=":return f(e,r,n);case"<":return l(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(" "),O("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.value=this.semver===k?"":this.operator+this.semver.version,O("comp",this)}function v(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof v)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new v(e.raw,t);if(e instanceof m)return new v(e.value,t);if(!(this instanceof v))return new v(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 y(e,t){for(var r=!0,n=e.slice(),o=n.pop();r&&n.length;)r=n.every((function(e){return o.intersects(e,t)})),o=n.pop();return r}function g(e){return!e||"x"===e.toLowerCase()||"*"===e}function w(e,t,r,n,o,i,s,a,c,l,u,p,f){return((t=g(r)?"":g(n)?">="+r+".0.0":g(o)?">="+r+"."+n+".0":">="+t)+" "+(a=g(c)?"":g(l)?"<"+(+c+1)+".0.0":g(u)?"<"+c+"."+(+l+1)+".0":p?"<="+c+"."+l+"."+u+"-"+p:"<="+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(O(e[n].semver),e[n].semver!==k&&e[n].semver.prerelease.length>0){var o=e[n].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function _(e,t,r){try{t=new v(t,r)}catch(n){return!1}return t.test(e)}function b(e,t,r,n){var o,s,a,u,p;switch(e=new i(e,n),t=new v(t,n),r){case">":o=c,s=d,a=l,u=">",p=">=";break;case"<":o=l,s=f,a=c,u="<",p="<=";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 y=null,g=null;if(t.set[h].forEach((function(e){e.semver===k&&(e=new m(">=0.0.0")),g=g||e,o(e.semver,(y=y||e).semver,n)?y=e:a(e.semver,g.semver,n)&&(g=e)})),y.operator===u||y.operator===p)return!1;if((!g.operator||g.operator===u)&&s(e,g.semver))return!1;if(g.operator===p&&a(e,g.semver))return!1}return!0}var O;t=Hh.exports=i,O="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 R=256,S=Number.MAX_SAFE_INTEGER||9007199254740991,I=R-6,T=t.re=[],x=t.safeRe=[],P=t.src=[],A=t.tokens={},N=0,$="[a-zA-Z0-9-]",C=[["\\s",1],["\\d",R],[$,I]];r("NUMERICIDENTIFIER"),P[A.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),P[A.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),P[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+$+"*",r("MAINVERSION"),P[A.MAINVERSION]="("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")\\.("+P[A.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),P[A.MAINVERSIONLOOSE]="("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")\\.("+P[A.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),P[A.PRERELEASEIDENTIFIER]="(?:"+P[A.NUMERICIDENTIFIER]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),P[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+P[A.NUMERICIDENTIFIERLOOSE]+"|"+P[A.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),P[A.PRERELEASE]="(?:-("+P[A.PRERELEASEIDENTIFIER]+"(?:\\."+P[A.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),P[A.PRERELEASELOOSE]="(?:-?("+P[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+P[A.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),P[A.BUILDIDENTIFIER]=$+"+",r("BUILD"),P[A.BUILD]="(?:\\+("+P[A.BUILDIDENTIFIER]+"(?:\\."+P[A.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),P[A.FULLPLAIN]="v?"+P[A.MAINVERSION]+P[A.PRERELEASE]+"?"+P[A.BUILD]+"?",P[A.FULL]="^"+P[A.FULLPLAIN]+"$",r("LOOSEPLAIN"),P[A.LOOSEPLAIN]="[v=\\s]*"+P[A.MAINVERSIONLOOSE]+P[A.PRERELEASELOOSE]+"?"+P[A.BUILD]+"?",r("LOOSE"),P[A.LOOSE]="^"+P[A.LOOSEPLAIN]+"$",r("GTLT"),P[A.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),P[A.XRANGEIDENTIFIERLOOSE]=P[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),P[A.XRANGEIDENTIFIER]=P[A.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),P[A.XRANGEPLAIN]="[v=\\s]*("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:\\.("+P[A.XRANGEIDENTIFIER]+")(?:"+P[A.PRERELEASE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),P[A.XRANGEPLAINLOOSE]="[v=\\s]*("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[A.XRANGEIDENTIFIERLOOSE]+")(?:"+P[A.PRERELEASELOOSE]+")?"+P[A.BUILD]+"?)?)?",r("XRANGE"),P[A.XRANGE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAIN]+"$",r("XRANGELOOSE"),P[A.XRANGELOOSE]="^"+P[A.GTLT]+"\\s*"+P[A.XRANGEPLAINLOOSE]+"$",r("COERCE"),P[A.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),T[A.COERCERTL]=RegExp(P[A.COERCE],"g"),x[A.COERCERTL]=RegExp(n(P[A.COERCE]),"g"),r("LONETILDE"),P[A.LONETILDE]="(?:~>?)",r("TILDETRIM"),P[A.TILDETRIM]="(\\s*)"+P[A.LONETILDE]+"\\s+",T[A.TILDETRIM]=RegExp(P[A.TILDETRIM],"g"),x[A.TILDETRIM]=RegExp(n(P[A.TILDETRIM]),"g"),r("TILDE"),P[A.TILDE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAIN]+"$",r("TILDELOOSE"),P[A.TILDELOOSE]="^"+P[A.LONETILDE]+P[A.XRANGEPLAINLOOSE]+"$",r("LONECARET"),P[A.LONECARET]="(?:\\^)",r("CARETTRIM"),P[A.CARETTRIM]="(\\s*)"+P[A.LONECARET]+"\\s+",T[A.CARETTRIM]=RegExp(P[A.CARETTRIM],"g"),x[A.CARETTRIM]=RegExp(n(P[A.CARETTRIM]),"g"),r("CARET"),P[A.CARET]="^"+P[A.LONECARET]+P[A.XRANGEPLAIN]+"$",r("CARETLOOSE"),P[A.CARETLOOSE]="^"+P[A.LONECARET]+P[A.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),P[A.COMPARATORLOOSE]="^"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),P[A.COMPARATOR]="^"+P[A.GTLT]+"\\s*("+P[A.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),P[A.COMPARATORTRIM]="(\\s*)"+P[A.GTLT]+"\\s*("+P[A.LOOSEPLAIN]+"|"+P[A.XRANGEPLAIN]+")",T[A.COMPARATORTRIM]=RegExp(P[A.COMPARATORTRIM],"g"),x[A.COMPARATORTRIM]=RegExp(n(P[A.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),P[A.HYPHENRANGE]="^\\s*("+P[A.XRANGEPLAIN]+")\\s+-\\s+("+P[A.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),P[A.HYPHENRANGELOOSE]="^\\s*("+P[A.XRANGEPLAINLOOSE]+")\\s+-\\s+("+P[A.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),P[A.STAR]="(<|>)?=?\\s*\\*";for(var L=0;N>L;L++)O(L,P[L]),T[L]||(T[L]=RegExp(P[L]),x[L]=RegExp(n(P[L])));t.parse=o,t.valid=function(e,t){var r=o(e,t);return r?r.version:null},t.clean=function(e,t){var r=o(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},t.SemVer=i,i.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},i.prototype.toString=function(){return this.version},i.prototype.compare=function(e){return O("SemVer.compare",this.version,this.options,e),e instanceof i||(e=new i(e,this.options)),this.compareMain(e)||this.comparePre(e)},i.prototype.compareMain=function(e){return e instanceof i||(e=new i(e,this.options)),s(this.major,e.major)||s(this.minor,e.minor)||s(this.patch,e.patch)},i.prototype.comparePre=function(e){if(e instanceof i||(e=new i(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(O("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)},i.prototype.compareBuild=function(e){e instanceof i||(e=new i(e,this.options));var t=0;do{var r=this.build[t],n=e.build[t];if(O("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)},i.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 i(e,r).inc(t,n).version}catch(o){return null}},t.diff=function(e,t){if(u(e,t))return null;var r=o(e),n=o(t),i="";if(r.prerelease.length||n.prerelease.length){i="pre";var s="prerelease"}for(var a in r)if(("major"===a||"minor"===a||"patch"===a)&&r[a]!==n[a])return i+a;return s},t.compareIdentifiers=s;var D=/^[0-9]+$/;t.rcompareIdentifiers=function(e,t){return s(t,e)},t.major=function(e,t){return new i(e,t).major},t.minor=function(e,t){return new i(e,t).minor},t.patch=function(e,t){return new i(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 i(e,r),o=new i(t,r);return n.compare(o)||n.compareBuild(o)},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=l,t.eq=u,t.neq=p,t.gte=f,t.lte=d,t.cmp=h,t.Comparator=m;var k={};m.prototype.parse=function(e){var t=e.match(this.options.loose?x[A.COMPARATORLOOSE]:x[A.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 i(t[2],this.options.loose):k},m.prototype.toString=function(){return this.value},m.prototype.test=function(e){if(O("Comparator.test",e,this.options.loose),this.semver===k||e===k)return!0;if("string"==typeof e)try{e=new i(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 v(e.value,t),_(this.value,r,t));if(""===e.operator)return""===e.value||(r=new v(this.value,t),_(e.semver,r,t));var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=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||o||i&&s||a||c},t.Range=v,v.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},v.prototype.toString=function(){return this.range},v.prototype.parseRange=function(e){var t=this.options.loose;e=e.replace(t?x[A.HYPHENRANGELOOSE]:x[A.HYPHENRANGE],w),O("hyphen replace",e),e=e.replace(x[A.COMPARATORTRIM],"$1$2$3"),O("comparator trim",e,x[A.COMPARATORTRIM]),e=(e=(e=e.replace(x[A.TILDETRIM],"$1~")).replace(x[A.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?x[A.COMPARATORLOOSE]:x[A.COMPARATOR],n=e.split(" ").map((function(e){return function(e,t){return O("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return O("caret",e,t),e.replace(t.loose?x[A.CARETLOOSE]:x[A.CARET],(function(t,r,n,o,i){var s;return O("caret",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s="0"===r?">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":">="+r+"."+n+".0 <"+(+r+1)+".0.0":i?(O("replaceCaret pr",i),s="0"===r?"0"===n?">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+"-"+i+" <"+(+r+1)+".0.0"):(O("no pr"),s="0"===r?"0"===n?">="+r+"."+n+"."+o+" <"+r+"."+n+"."+(+o+1):">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0":">="+r+"."+n+"."+o+" <"+(+r+1)+".0.0"),O("caret return",s),s}))}(e,t)})).join(" ")}(e,t),O("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){return e.replace(t.loose?x[A.TILDELOOSE]:x[A.TILDE],(function(t,r,n,o,i){var s;return O("tilde",e,t,r,n,o,i),g(r)?s="":g(n)?s=">="+r+".0.0 <"+(+r+1)+".0.0":g(o)?s=">="+r+"."+n+".0 <"+r+"."+(+n+1)+".0":i?(O("replaceTilde pr",i),s=">="+r+"."+n+"."+o+"-"+i+" <"+r+"."+(+n+1)+".0"):s=">="+r+"."+n+"."+o+" <"+r+"."+(+n+1)+".0",O("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),O("tildes",e),e=function(e,t){return O("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){return(e=e.trim()).replace(t.loose?x[A.XRANGELOOSE]:x[A.XRANGE],(function(r,n,o,i,s,a){O("xRange",e,r,n,o,i,s,a);var c=g(o),l=c||g(i),u=l||g(s);return"="===n&&u&&(n=""),a=t.includePrerelease?"-0":"",c?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&u?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),r=n+o+"."+i+"."+s+a):l?r=">="+o+".0.0"+a+" <"+(+o+1)+".0.0"+a:u&&(r=">="+o+"."+i+".0"+a+" <"+o+"."+(+i+1)+".0"+a),O("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),O("xrange",e),e=function(e,t){return O("replaceStars",e,t),e.trim().replace(x[A.STAR],"")}(e,t),O("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)},v.prototype.intersects=function(e,t){if(!(e instanceof v))throw new TypeError("a Range is required");return this.set.some((function(r){return y(r,t)&&e.set.some((function(e){return y(e,t)&&r.every((function(r){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new v(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},v.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new i(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,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&-1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minSatisfying=function(e,t,r){var n=null,o=null;try{var s=new v(t,r)}catch(a){return null}return e.forEach((function(e){s.test(e)&&(n&&1!==o.compare(e)||(o=new i(n=e,r)))})),n},t.minVersion=function(e,t){e=new v(e,t);var r=new i("0.0.0");if(e.test(r))return r;if(r=new i("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 i(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 v(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=o(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new v(e,r),t=new v(t,r),e.intersects(t)},t.coerce=function(e,t){if(e instanceof i)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;var r=null;if((t=t||{}).rtl){for(var n;(n=x[A.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),x[A.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;x[A.COERCERTL].lastIndex=-1}else r=e.match(x[A.COERCE]);return null===r?null:o(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,Hh.exports);var qh=Hh.exports;!function(e,t){var r=In&&In.__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]}),n=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=In&&In.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t},i=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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=o(qh),a=h(),c=br,l=Kr,u=Sr;t._findMatch=function(t,r,n,o){return i(this,void 0,void 0,(function*(){const i=c.platform();let l,u,p;for(const c of n){const n=c.version;if(a.debug(`check ${n} satisfies ${t}`),s.satisfies(n,t)&&(!r||c.stable===r)&&(p=c.files.find((t=>{a.debug(`${t.arch}===${o} && ${t.platform}===${i}`);let r=t.arch===o&&t.platform===i;if(r&&t.platform_version){const n=e.exports._getOsVersion();r=n===t.platform_version||s.satisfies(n,t.platform_version)}return r})),p)){a.debug("matched "+c.version),u=c;break}}return u&&p&&(l=Object.assign({},u),l.files=[p]),l}))},t._getOsVersion=function(){const t=c.platform();let r="";if("darwin"===t)r=""+l.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 u.existsSync(e)?r=""+u.readFileSync(e):u.existsSync(t)&&(r=""+u.readFileSync(t)),r}}(Bh,Bh.exports);for(var Vh=Bh.exports,zh=Nr,Xh=[],Wh=0;256>Wh;++Wh)Xh[Wh]=(Wh+256).toString(16).substr(1);var Yh=function(){return zh.randomBytes(16)},Kh=function(e,t){var r=t||0;return""+Xh[e[r++]]+Xh[e[r++]]+Xh[e[r++]]+Xh[e[r++]]+"-"+Xh[e[r++]]+Xh[e[r++]]+"-"+Xh[e[r++]]+Xh[e[r++]]+"-"+Xh[e[r++]]+Xh[e[r++]]+"-"+Xh[e[r++]]+Xh[e[r++]]+Xh[e[r++]]+Xh[e[r++]]+Xh[e[r++]]+Xh[e[r++]]},Jh=function(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||Yh)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;16>i;++i)t[n+i]=o[i];return t||Kh(o)},Qh={},Zh={},em=In&&In.__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]}),tm=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),rm=In&&In.__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)&&em(t,e,r);return tm(t,e),t},nm=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Zh,"__esModule",{value:!0}),Zh.argStringToArray=Zh.ToolRunner=void 0;const om=rm(br),im=rm(Wr),sm=rm(Kr),am=rm($r),cm=rm($h),lm=rm(Ch),um=On,pm="win32"===process.platform;Zh.ToolRunner=class extends im.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 o=t?"":"[command]";if(pm)if(this._isCmdFile()){o+=r;for(const e of n)o+=" "+e}else if(e.windowsVerbatimArguments){o+=`"${r}"`;for(const e of n)o+=" "+e}else{o+=this._windowsQuoteCmdArg(r);for(const e of n)o+=" "+this._windowsQuoteCmdArg(e)}else{o+=r;for(const e of n)o+=" "+e}return o}_processLineBuffer(e,t,r){try{let n=t+""+e,o=n.indexOf(om.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+om.EOL.length),o=n.indexOf(om.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return pm&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(pm&&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 i of e)if(t.some((e=>e===i))){r=!0;break}if(!r)return e;let n='"',o=!0;for(let i=e.length;i>0;i--)n+=e[i-1],o&&"\\"===e[i-1]?n+="\\":'"'===e[i-1]?(o=!0,n+='"'):o=!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 nm(this,void 0,void 0,(function*(){return!lm.isRooted(this.toolPath)&&(this.toolPath.includes("/")||pm&&this.toolPath.includes("\\"))&&(this.toolPath=am.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield cm.which(this.toolPath,!0),new Promise(((e,t)=>nm(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)+om.EOL);const n=new fm(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield lm.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=sm.spawn(o,this._getSpawnArgs(r),this._getSpawnOptions(this.options,o));let s="";i.stdout&&i.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),s=this._processLineBuffer(e,s,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let a="";if(i.stderr&&i.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),a=this._processLineBuffer(e,a,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),i.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),i.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),i.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)=>{s.length>0&&this.emit("stdline",s),a.length>0&&this.emit("errline",a),i.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!i.stdin)throw Error("child process missing stdin");i.stdin.end(this.options.input)}}))))}))}},Zh.argStringToArray=function(e){function t(e){o&&'"'!==e&&(i+="\\"),i+=e,o=!1}const r=[];let n=!1,o=!1,i="";for(let s=0;e.length>s;s++){const a=e.charAt(s);'"'!==a?"\\"===a&&o?t(a):"\\"===a&&n?o=!0:" "!==a||n?t(a):i.length>0&&(r.push(i),i=""):o?t(a):n=!n}return i.length>0&&r.push(i.trim()),r};class fm extends im.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=um.setTimeout(fm.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())}}var dm=In&&In.__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]}),hm=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mm=In&&In.__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)&&dm(t,e,r);return hm(t,e),t},vm=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(Qh,"__esModule",{value:!0});var ym=Qh.getExecOutput=Qh.exec=void 0;const gm=bn,wm=mm(Zh);var Em=Qh.exec=nt;ym=Qh.getExecOutput=function(e,t,r){var n,o;return vm(this,void 0,void 0,(function*(){let i="",s="";const a=new gm.StringDecoder("utf8"),c=new gm.StringDecoder("utf8"),l=null===(n=null==r?void 0:r.listeners)||void 0===n?void 0:n.stdout,u=null===(o=null==r?void 0:r.listeners)||void 0===o?void 0:o.stderr,p=Object.assign(Object.assign({},null==r?void 0:r.listeners),{stdout:e=>{i+=a.write(e),l&&l(e)},stderr:e=>{s+=c.write(e),u&&u(e)}}),f=yield nt(e,t,Object.assign(Object.assign({},r),{listeners:p}));return i+=a.end(),s+=c.end(),{exitCode:f,stdout:i,stderr:s}}))};var _m={},bm=In&&In.__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]}),Om=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Rm=In&&In.__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)&&bm(t,e,r);return Om(t,e),t},Sm=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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(_m,"__esModule",{value:!0}),_m.RetryHelper=void 0;const Im=Rm(h());_m.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 Sm(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;Im.info(n.message)}const o=this.getSleepAmount();Im.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 Sm(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var Tm=In&&In.__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]}),xm=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Pm=In&&In.__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)&&Tm(t,e,r);return xm(t,e),t},Am=In&&In.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(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())}))},Nm=In&&In.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.evaluateVersions=Nh.isExplicitVersion=Nh.findFromManifest=Nh.getManifestFromRepo=Nh.findAllVersions=Jm=Nh.find=Nh.cacheFile=Km=Nh.cacheDir=Nh.extractZip=Nh.extractXar=Nh.extractTar=Nh.extract7z=Ym=Nh.downloadTool=Nh.HTTPError=void 0;const $m=Pm(h()),Cm=Pm($h),Lm=Pm(Sr),Dm=Pm(Vh),km=Pm(br),Um=Pm($r),jm=Pm(To),Fm=Pm(qh),Mm=Pm(Zr),Gm=Pm(Yr),Bm=Jr,Hm=Nm(Jh),qm=Qh,Vm=_m;class zm extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Nh.HTTPError=zm;const Xm="win32"===process.platform,Wm="darwin"===process.platform;var Ym=Nh.downloadTool=function(e,t,r,n){return Am(this,void 0,void 0,(function*(){t=t||Um.join(pt(),Hm.default()),yield Cm.mkdirP(Um.dirname(t)),$m.debug("Downloading "+e),$m.debug("Destination "+t);const o=ft("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=ft("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new Vm.RetryHelper(3,o,i);return yield s.execute((()=>Am(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return Am(this,void 0,void 0,(function*(){if(Lm.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new jm.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&($m.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const i=yield o.get(e,n);if(200!==i.message.statusCode){const t=new zm(i.message.statusCode);throw $m.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=Gm.promisify(Mm.pipeline),a=ft("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,Lm.createWriteStream(t)),$m.debug("download complete"),c=!0,t}finally{if(!c){$m.debug("download failed");try{yield Cm.rmRF(t)}catch(l){$m.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof zm&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))};Nh.extract7z=function(e,t,r){return Am(this,void 0,void 0,(function*(){Bm.ok(Xm,"extract7z() not supported on current OS"),Bm.ok(e,'parameter "file" is required'),t=yield it(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",$m.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield qm.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${Um.join(__dirname,"..","scripts","Invoke-7zdec.ps1").replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Source '${e.replace(/'/g,"''").replace(/"|\n|\r/g,"")}' -Target '${t.replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`],o={silent:!0};try{const e=yield Cm.which("powershell",!0);yield qm.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},Nh.extractTar=function(e,t,r="xz"){return Am(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield it(t),$m.debug("Checking tar --version");let n="";yield qm.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),$m.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],$m.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return Xm&&o&&(i.push("--force-local"),s=t.replace(/\\/g,"/"),a=e.replace(/\\/g,"/")),o&&(i.push("--warning=no-unknown-keyword"),i.push("--overwrite")),i.push("-C",s,"-f",a),yield qm.exec("tar",i),t}))},Nh.extractXar=function(e,t,r=[]){return Am(this,void 0,void 0,(function*(){let n;Bm.ok(Wm,"extractXar() not supported on current OS"),Bm.ok(e,'parameter "file" is required'),t=yield it(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),$m.isDebug()&&n.push("-v");const o=yield Cm.which("xar",!0);var i;return yield qm.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},Nh.extractZip=function(e,t){return Am(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield it(t),Xm?yield function(e,t){return Am(this,void 0,void 0,(function*(){const r=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),n=t.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=yield Cm.which("pwsh",!1);if(o){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(" ")];$m.debug("Using pwsh at path: "+o),yield qm.exec(`"${o}"`,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 Cm.which("powershell",!0);$m.debug("Using powershell at path: "+t),yield qm.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return Am(this,void 0,void 0,(function*(){const r=yield Cm.which("unzip",!0),n=[e];$m.isDebug()||n.unshift("-q"),n.unshift("-o"),yield qm.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))};var Km=Nh.cacheDir=function(e,t,r,n){return Am(this,void 0,void 0,(function*(){if(r=Fm.clean(r)||r,n=n||km.arch(),$m.debug(`Caching tool ${t} ${r} ${n}`),$m.debug("source dir: "+e),!Lm.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield st(t,r,n);for(const t of Lm.readdirSync(e)){const r=Um.join(e,t);yield Cm.cp(r,o,{recursive:!0})}return at(t,r,n),o}))};Nh.cacheFile=function(e,t,r,n,o){return Am(this,void 0,void 0,(function*(){if(n=Fm.clean(n)||n,o=o||km.arch(),$m.debug(`Caching tool ${r} ${n} ${o}`),$m.debug("source file: "+e),!Lm.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield st(r,n,o),s=Um.join(i,t);return $m.debug("destination file "+s),yield Cm.cp(e,s),at(r,n,o),i}))};var Jm=Nh.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||km.arch(),ct(t)||(t=lt(ot(e,r),t));let n="";if(t){t=Fm.clean(t)||"";const o=Um.join(ut(),e,t,r);$m.debug("checking cache: "+o),Lm.existsSync(o)&&Lm.existsSync(o+".complete")?($m.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):$m.debug("not found")}return n};Nh.findAllVersions=ot,Nh.getManifestFromRepo=function(e,t,r,n="master"){return Am(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new jm.HttpClient("tool-cache"),a={};r&&($m.debug("set auth"),a.authorization=r);const c=yield s.getJson(i,a);if(!c.result)return o;let l="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){l=e.url;break}a.accept="application/vnd.github.VERSION.raw";let u=yield(yield s.get(l,a)).readBody();if(u){u=u.replace(/^\uFEFF/,"");try{o=JSON.parse(u)}catch(p){$m.debug("Invalid json")}}return o}))},Nh.findFromManifest=function(e,t,r,n=km.arch()){return Am(this,void 0,void 0,(function*(){return yield Dm._findMatch(e,t,r,n)}))},Nh.isExplicitVersion=ct,Nh.evaluateVersions=lt;var Qm={};Object.defineProperty(Qm,"__esModule",{value:!0}),Qm.retryAsPromised=Qm.TimeoutError=void 0;let Zm=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};Qm.TimeoutError=Zm,Qm.retryAsPromised=dt;var ev=Qm.default=dt;let tv;const rv=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||Tr,e.mkdirAsync=e.mkdirAsync?e.mkdirAsync:async(e,r)=>new Promise(((n,o)=>t.mkdir(e,r,((e,t)=>e?o(e):n(t))))),e.stat=e.stat||r.stat||xr,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||Pr,e.mkdirSync=e.mkdirSync||r.mkdirSync||Ar,t},nv=(e,t,r)=>{const n=Dr(e),o={...rv(t),recursive:!1};if(n===e)try{return o.mkdirSync(e,o)}catch(i){if(i&&"EISDIR"!==i.code)throw i;return}try{return o.mkdirSync(e,o),r||e}catch(i){const t=i;if(t&&"ENOENT"===t.code)return nv(e,o,nv(n,o,r));if(t&&"EEXIST"!==t.code&&t&&"EROFS"!==t.code)throw i;try{if(!o.statSync(e).isDirectory())throw i}catch(s){throw i}}},ov=Object.assign((async(e,t,r)=>{const n=rv(t);n.recursive=!1;const o=Dr(e);return o===e?n.mkdirAsync(e,n).catch((e=>{if(e&&"EISDIR"!==e.code)throw e})):n.mkdirAsync(e,n).then((()=>r||e),(async t=>{const i=t;if(i&&"ENOENT"===i.code)return ov(o,n).then((t=>ov(e,n,t)));if(i&&"EEXIST"!==i.code&&"EROFS"!==i.code)throw t;return n.statAsync(e).then((e=>{if(e.isDirectory())return r;throw t}),(()=>{throw t}))}))}),{sync:nv}),iv=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?iv(e,Dr(t),t):void 0))},sv=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?sv(e,Dr(t),t):void 0}},av=(e,t)=>{const r=rv(t);if(r.recursive=!0,Dr(e)===e)return r.mkdirSync(e,r);const n=sv(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return nv(e,r);throw o}},cv=Object.assign((async(e,t)=>{const r={...rv(t),recursive:!0};return Dr(e)===e?await r.mkdirAsync(e,r):iv(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return ov(e,r);throw t}))))}),{sync:av}),lv=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,uv=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=Gr(e),"win32"===lv){const t=/[*|"<>?:]/,{root:r}=Br(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},pv=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),fv=+pv[0]>10||10==+pv[0]&&+pv[1]>=12,dv=fv?e=>rv(e).mkdirSync===Ar:()=>!1,hv=Object.assign(fv?e=>rv(e).mkdir===Tr:()=>!1,{sync:dv}),mv=(e,t)=>{e=uv(e);const r=rv(t);return dv(r)?av(e,r):nv(e,r)},vv=Object.assign((async(e,t)=>{e=uv(e);const r=rv(t);return hv(r)?cv(e,r):ov(e,r)}),{mkdirpSync:mv,mkdirpNative:cv,mkdirpNativeSync:av,mkdirpManual:ov,mkdirpManualSync:nv,sync:mv,native:cv,nativeSync:av,manual:ov,manualSync:nv,useNative:hv,useNativeSync:dv}),yv=/v?(\d\S*)/,gv="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",wv={llvm:gv,clang:gv,"clang++":gv,"clang-tidy":gv,clangtidy:gv,"clang-format":gv,clangformat:gv,ninja:"1.12.1",cmake:"3.30.2",gcovr:"5.2",conan:"1.64.1",meson:"1.5.1",kcov:"42",task:"3.38.0",doxygen:Le()?"1.11.0-4":"1.11.0",gcc:"win32"===process.platform?"14.2.0posix-18.1.8-12.0.0-ucrt-r1":"",powershell:"7.4.5"},Ev="22.2.0",_v="3.7.9",bv={mingw:{24:"8.0.0-1",22:"8.0.0-1",20:"7.0.0-2"},gcovr:{24:"6.0",22:"6.0",20:"6.0",18:"5.0"},meson:{24:"1.0.0",22:"1.0.0",20:"1.0.0",18:"0.61.4"},nala:{24:"",22:"",21:"legacy",20:"legacy",18:"legacy",16:"legacy",14:"legacy"},kcov:{24:"42-binary",22:"42-binary",20:"40-binary",18:"40",16:"40",14:"40"},doxygen:{24:"1.11.0",22:"1.11.0",20:"1.10.0",18:"1.10.0"}},Ov=Mu((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 ym(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Cr(r,"Scripts"),Cr(r,"Scripts","bin"),Cr(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var Rv={};Object.defineProperty(Rv,"__esModule",{value:!0});var Sv=Rv.getUbuntuVersion=void 0;const Iv=Kr;Sv=Rv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{Iv.execFile(t,r,{encoding:"utf8",shell:!1},((o,i,s)=>{if(o)return"errno"in o&&"ENOENT"===o.code?void e(null):void n(Error(`Could not execute \`${t} ${r.join(" ")}\`: ${o} (stderr=${s})`));e(i)}))})));var t,r;if(null===e)return[];const n=/^Distributor ID:\s*(.+)$/,o=/^Description:\s*Ubuntu\s+(\d+)\.(\d+)(?:\.(\d+))?/,i=/^Release:\s*(\d+)\.(\d+)(?:\.(\d+))?$/;let s=null,a=null,c=!1;for(const l of e.split("\n")){const e=l.match(n);if(null!==e){if("Ubuntu"!==e[1])return[];c=!0}const t=l.match(o);t&&(s=t);const r=l.match(i);if(r&&(a=r),c&&s&&a)break}if(!c)return[];for(const l of[s,a])if(l){const e=[l[1],l[2]];return l[3]&&e.push(l[3]),e.map((e=>parseInt(e,10)))}return[]};const Tv=Mu((async function(){try{if(De()){try{null===pa.sync("lsb_release",{nothrow:!0})&&await Se([{name:"lsb-release"}])}catch{return Ct()}const e=await Sv();return 0===e.length?Ct():e}return null}catch(e){return v(""+e),null}}),{promise:!0}),xv=Mu((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=ee("~/.local/pipx");if(await Z(t))return t;switch(process.platform){case"win32":e=ee("~/AppData/Local/pipx");break;case"darwin":e=ee("~/Library/Application Support/pipx");break;default:e=ee("~/.local/share/pipx")}return await vv(e),await vv(Cr(e,"trash")),await vv(Cr(e,"shared")),await vv(Cr(e,"venv")),e}),{promise:!0}),Pv=Mu((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=ee("~/.local/bin");return await ie(e,yy),await vv(e),e}),{promise:!0}),Av=Mu((async function(){const e=(await St(Nt("python",void 0,await Tv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),Nv=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"]]]),$v=Mu((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||dn.release()).split(".")[0];const[t,r]=Nv.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Cv="string"==typeof __dirname?__dirname:$r.dirname(_n(import.meta.url)),Lv="string"==typeof __dirname?__dirname:$r.dirname(_n(import.meta.url));class Dv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class kv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Uv=e=>void 0===globalThis.DOMException?new kv(e):new DOMException(e),jv=e=>{const t=void 0===e.reason?Uv("This operation was aborted."):e.reason;return t instanceof Error?t:Uv(t)},Fv=h(),Mv=Kr,Gv=Sr,Bv=$r,Hv=wn,qv=Hv.env["ProgramFiles(x86)"],Vv=[Hv.env["ProgramFiles(x86)"],Hv.env.ProgramFiles],zv=["Enterprise","Professional","Community","BuildTools"],Xv=["2022","2019","2017"],Wv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Yv=tr;const Kv=qv+"\\Microsoft Visual Studio\\Installer";var Jv=nr,Qv=function(e,t,r,n,o,i){if("win32"!=Hv.platform)return void Fv.info("This is not a Windows virtual environment, bye!");Hv.env.PATH+=Bv.delimiter+Kv;let s={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in s&&(e=s[e.toLowerCase()]);var a=[e];n&&!0===JSON.parse(n)&&a.push("uwp"),t&&a.push(t),r&&a.push("-vcvars_ver="+r),o&&!0===JSON.parse(o)&&a.push("-vcvars_spectre_libs=spectre");const c=`"${nr(i)}" ${a.join(" ")}`;Fv.debug("vcvars command-line: "+c);const l=(""+Mv.execSync(`set && cls && ${c} && cls && set`,{shell:"cmd"})).split("\f"),u=l[0].split("\r\n"),p=l[1].split("\r\n"),f=l[2].split("\r\n"),d=p.filter((e=>!(!e.match(/^\[ERROR.*\]/)||e.match(/Error in script usage. The correct usage is:$/))));if(d.length>0)throw Error("invalid parameters\r\n"+d.join("\r\n"));let h={};for(let m of u){const[e,t]=m.split("=");h[e]=t}Fv.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Fv.info("Setting "+e),or(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Fv.exportVariable(e,t))}Fv.endGroup(),Fv.info("Configured Developer Command Prompt")},Zv=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(Zv||{});const ey="string"==typeof __dirname?__dirname:$r.dirname(_n(import.meta.url)),ty="string"==typeof __dirname?__dirname:$r.dirname(_n(import.meta.url)),ry=Mu((async function(e,t,r){const[n,o]=await Promise.all([pr(e,t,r),dr()]);return await oy(r),n}),{promise:!0}),ny=Mu((async function(e){De()?e>10?await Se([{name:"libtinfo-dev"}]):await Se([{name:"libtinfo5"}]):Le()?await Fe("ncurses5-compat-libs",void 0,"yay"):Ce()&&await je([{name:"ncurses-compat-libs"}])}),{promise:!0}),oy=Mu((async function(e){"linux"===process.platform&&await zt(Nt("gcc",void 0,await Tv()),"",e,40)}),{promise:!0}),iy="string"==typeof __dirname?__dirname:$r.dirname(_n(import.meta.url));let sy,ay=!1;const cy={llvm:cr,clang:cr,"clang++":cr},ly={gcc:zt,"g++":zt},uy={mingw:Xt},py={msvc:hr,cl:hr,msbuild:hr,visualstudio:hr},fy={appleclang:er,applellvm:er,"apple-clang":er,"apple-llvm":er},dy=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],hy={...cy,...ly,...uy,...py,...fy,nala:async function(e,t,r){if(!De())return;if("string"==typeof sy)return{binDir:sy};const n=pa.sync("nala",{nothrow:!0});if(null!==n)return sy=Dr(n),{binDir:sy};await Se([{name:"python3-apt"}]),sy="/usr/bin";try{const t=await Oe({name:"nala",version:e});if(void 0!==t)return await Se([{name:t}]),{binDir:sy}}catch(o){g("Failed to install nala: "+o)}try{const e=await Oe({name:"nala-legacy"});if(void 0!==e)return await Se([{name:e}],!0),{binDir:sy}}catch(o){g("Failed to install nala-legacy: "+o)}return await async function(){const e=new qd.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",Rr(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Cr(Rr(),"install-nala.sh"),r=await sn(t,"utf8");await an(t,r.replace(/sudo/g,"")),await Se([{name:"wget"}]);try{k("bash",[t])}catch(o){m("Failed to install nala via installer: "+o),k("apt",["install","-y","-t","nala","nala"])}}(),{binDir:sy}},cmake:bt,ninja:Kt,python:St,vcpkg:async function(e,t,r){return ay&&null!==pa.sync("vcpkg",{nothrow:!0})?{binDir:Dr(pa.sync("vcpkg"))}:("linux"===process.platform&&(Le()?await Promise.all([Fe("curl"),Fe("zip"),Fe("unzip"),Fe("tar"),Fe("git"),Fe("pkg-config")]):Ce()?await je([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):De()&&await Se([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await Z(Cr(t,Xe("bootstrap-vcpkg",".bat")))?y(`Vcpkg folder already exists at ${t}. Skipping the clone`):P("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Dr(t),stdio:"inherit"}),""!==e&&"true"!==e&&(g("Checking out vcpkg version "+e),P("git",["checkout",e],{cwd:t,stdio:"inherit"})),P(Xe(We("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await G(t),await ie(t,yy),ay=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return Ue("bazelisk",e);case"darwin":return $e("bazelisk",e);case"linux":if(Le())throw Error("installing bazel on Arch linux is not supported yet");if(Ce())return await je([{name:"dnf-plugins-core"}]),k("dnf",["copr","enable","vbatts/bazel"]),je([{name:"bazel4"}]);if(De())return k("bash",["-c",`echo "deb [arch=amd64 signed-by=${await Ie({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`]),Se([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Lt("conan",e)},meson:function(e,t,r){return Lt("meson",e)},gcovr:function(e,t,r){return Lt("gcovr",e)},opencppcoverage:mr,OpenCppCoverage:mr,choco:ke,brew:Pe,powershell:gr,pwsh:gr,ccache:function(e,t,r){switch(process.platform){case"win32":return Ue("ccache",e);case"darwin":return $e("ccache",e);case"linux":if(Le())return Fe("ccache",e);if(Ce())return je([{name:"ccache",version:e}]);if(De())return Se([{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 Ue("sccache",e);case"linux":case"darwin":return $e("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await ev((()=>Ue("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>g(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 Z(Cr(e,"doxygen.exe")))return await ie(e,yy),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await jt(Nt("graphviz",void 0)),t}case"darwin":{const e=await $e("doxygen",void 0);return $v()[0]>11&&await jt(Nt("graphviz",void 0)),e}case"linux":{let o;if(""===e||Le()||Ce())if(Le())o=await Fe("doxygen",e);else{if(Ce())return je([{name:"doxygen",version:e}]);if(!De())throw Error("Unsupported linux distributions");o=await Se([{name:"doxygen",version:e}])}else{if(!De())throw Error("Unsupported linux distributions");try{o=await Et("doxygen",e,Mt,t,r);try{await Se([{name:"libclang-cpp9"}])}catch(n){g("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){y(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),o=await Se([{name:"doxygen"}])}}return await jt(Nt("graphviz",void 0,await Tv())),o}default:throw Error("Unsupported platform")}},graphviz:jt,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await Ue("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await ie(e,yy),e}()};case"darwin":return $e("cppcheck",e);case"linux":if(Le())return Fe("cppcheck",e);if(Ce())return je([{name:"ccache",version:e}]);if(De())return Se([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},"clang-tidy":ur,clangtidy:ur,"clang-format":lr,clangformat:lr,vcvarsall:ir,kcov:async function(e,t,r){if("linux"!==process.platform)return void g("Kcov is not supported on non-linux");const n=e.split("-");let o=function(e){return e.match(/^v/)?e:"v"+e}(n[0]);const i=n[1],s=function(e){return Number.parseInt(e.replace(/^v/,""),10)}(o);let a;return 38===s&&(o="v38"),"binary"!==i||39>s?(a=await Et("kcov",o,Qt,t,r),a):(a=await Et("kcov",o,Jt,t,r),Le()?await Fe("binutils"):Ce()?await je([{name:"binutils"}]):De()&&await Se([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return Ue("make",e);case"darwin":{await $e("make",e);const t=Cr(Ne(),"opt/make/libexec/gnubin");return await ie(t,yy),{binDir:t}}case"linux":if(Le())return Fe("make",e);if(Ce())return je([{name:"make",version:e}]);if(De())return Se([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return Et("task",e,wr,t,r)},sevenzip:ht,"7zip":ht,"7z":ht},my=Object.keys(hy),vy=["compiler","architecture","timeout",...my],yy={rcPath:ee("~/.cpprc"),guard:"cpp"};(async function(e){let t=Promise.resolve();Tn.GITHUB_ACTIONS||(t=async function(){try{await Bd({pkg:Hd})}catch(e){v("Failed to check for updates: "+(e instanceof Error?e.message+e.stack:e))}}(),process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS="true");const r=function(e){return function(e,t){var r,n,o,i,s,a={_:[]},c=0,l=0,u=0,p=(e=e||[]).length;const f=void 0!==(t=t||{}).alias,d=void 0!==t.unknown,h=void 0!==t.default;if(t.alias=t.alias||{},t.string=he(t.string),t.boolean=he(t.boolean),f)for(r in t.alias)for(n=t.alias[r]=he(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(l=(n=t.alias[t.boolean[c]]||[]).length;l-- >0;)t.boolean.push(n[l]);for(c=t.string.length;c-- >0;)for(l=(n=t.alias[t.string[c]]||[]).length;l-- >0;)t.string.push(n[l]);if(h)for(r in t.default)if(i=typeof t.default[r],n=t.alias[r]=t.alias[r]||[],void 0!==t[i])for(t[i].push(r),c=0;n.length>c;c++)t[i].push(n[c]);const m=d?Object.keys(t.alias):[];for(c=0;p>c;c++){if("--"===(o=e[c])){a._=a._.concat(e.slice(++c));break}for(l=0;o.length>l&&45===o.charCodeAt(l);l++);if(0===l)a._.push(o);else if("no-"===o.substring(l,l+3)){if(i=o.substring(l+3),d&&!~m.indexOf(i))return t.unknown(o);a[i]=!1}else{for(u=l+1;o.length>u&&61!==o.charCodeAt(u);u++);for(i=o.substring(l,u),s=o.substring(++u)||c+1===p||45===(""+e[c+1]).charCodeAt(0)||e[++c],n=2===l?[i]:i,u=0;n.length>u;u++){if(i=n[u],d&&!~m.indexOf(i))return t.unknown("-".repeat(l)+i);me(a,i,n.length>u+1||s,t)}}}if(h)for(r in t.default)void 0===a[r]&&(a[r]=t.default[r]);if(f)for(r in a)for(n=t.alias[r]||[];n.length>0;)a[n.shift()]=a[r];return a}(e,{string:[...vy,"timeout"],default:Object.fromEntries(vy.map((e=>[e,Er(e)]))),alias:{h:"help"},boolean:"help"})}(e);r.help&&(g('\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 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 you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));const n=r.architecture??process.arch,o=process.env.SETUP_CPP_DIR??ee("~"),i=[],s=[],a=yp.create({autoloadLocales:!0});let c,l;yp.addLocale(gp),lp.addLocale(up);const u=await Tv();if(!function(e){const t=dy.filter((t=>void 0!==e[t])),r=t.filter((t=>!$t(e[t]))),n=1>r.length?"true":e[r[0]];if(r.some((t=>e[t]!==n)))return!1;for(const o of t)e[o]=n;return!0}(r))return m("The same version must be used for llvm, clang-format and clang-tidy"),1;Le()&&"string"==typeof r.cppcheck&&"string"==typeof r.gcovr&&(g("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await Fe("python-pygments"));let p=!1;for(const f of my){if(Tn.isCI&&0!==s.length){p=!0;break}const e=r[f];void 0!==e&&(c=Date.now(),await sr(f,e,u,n,o,i,s,6e4*Number.parseFloat(r.timeout??"20")),l=Date.now(),g("took "+(a.format(c,l)||"0 seconds")))}if(!p){const e=r.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i){const{compiler:s,version:a}=function(e){try{const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null===Gp(e)&&g(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}catch(t){return m(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(e);let c;try{if(Go.startGroup(`Installing ${s} ${a??""}`),s in cy)c=await cr(Nt("llvm",a,t),Cr(r,"llvm"),n),await ne("GCOV","llvm-cov gcov",yy);else if(s in ly){const e=Nt("gcc",a,t);c=await zt(e,Cr(r,"gcc"),n),await Wt(e)}else if(s in uy){const e=Nt("mingw",a,t);c=await Xt(e,Cr(r,"gcc"),n),await Wt(e)}else s in py?c=await hr(Nt("msvc",a,t),Cr(r,"msvc"),n):s in fy?await er():(c=null,i.push("Unsupported compiler "+s))}catch(l){m(l),i.push("Failed to install the "+e)}null!==c&&o.push(_r(s,c)),Go.endGroup()}(e,u,o,n,i,s);const r=Date.now();g("took "+(a.format(t,r)||"0 seconds"))}}if(await async function(e){if(await Z(e.rcPath)){const t=(await Hu(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await qu(e.rcPath,r.join("\n")),await G(e.rcPath)}}(yy),0===i.length&&0===s.length)return v("setup-cpp was called without any arguments. Nothing to do."),0;for(const f of i)console.log(`${f}`);for(const f of s)m(f);if(g("setup-cpp finished"),!Tn.GITHUB_ACTIONS)switch(process.platform){case"win32":v("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":v("Run `source ~/.cpprc` or restart your shell to update the environment.")}return await t,0===s.length?0:1})(process.argv).then((e=>{process.exitCode=e})).catch((e=>{m("main() panicked!"),m(e),process.exitCode=1}));export{Rd as a,Go as b,In as c,Em as d,Qh as e,g as f,ym as g,Tn as h,$h as i,e as j,Z as p,h as r,qh as s,wo as t,Jh as v,v as w}; //# sourceMappingURL=setup-cpp.mjs.map diff --git a/dist/modern/setup-cpp.mjs.map b/dist/modern/setup-cpp.mjs.map index 8bbb445c..2bf54655 100644 --- a/dist/modern/setup-cpp.mjs.map +++ b/dist/modern/setup-cpp.mjs.map @@ -1 +1 @@ -{"version":3,"file":"setup-cpp.mjs","sources":["../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/proxy.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js","../../packages/ci-log/dist/index.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js","../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js","../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js","../../packages/exec-powershell/dist/index.js","../../node_modules/.pnpm/admina@1.0.1/node_modules/admina/dist/index.node.mjs","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/mixin.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/index.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/is-implemented.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/implementation.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/validate-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/index.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-implemented.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/polyfill.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/generate-name.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/standard-symbols.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/symbol-registry.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-arguments.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-function.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/is-string.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/e-index-of.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/map.js","../../node_modules/.pnpm/next-tick@1.1.0/node_modules/next-tick/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-callable.js","../../node_modules/.pnpm/is-promise@2.2.2/node_modules/is-promise/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/promise.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/primitive-set.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/to-short-string-representation.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/safe-to-string.js","../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js","../../packages/untildify-user/dist/index.js","../../packages/envosman/dist/rc-file.js","../../packages/envosman/dist/add-env.js","../../packages/envosman/dist/utils.js","../../packages/envosman/dist/add-path.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/lib/time-delta.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js","../../node_modules/.pnpm/simple-update-notifier@2.0.0/node_modules/simple-update-notifier/build/index.js","../../node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs","../../packages/setup-apt/dist/alternatives.js","../../packages/setup-apt/dist/apt-env.js","../../packages/setup-apt/dist/get-apt.js","../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js","../../packages/setup-apt/dist/is-installed.js","../../packages/setup-apt/dist/qualify-install.js","../../packages/setup-apt/dist/install.js","../../packages/setup-apt/dist/apt-repository.js","../../packages/setup-apt/dist/apt-key.js","../../packages/setup-brew/dist/install.js","../../packages/setup-brew/dist/install-pack.js","../../src/utils/env/hasDnf.ts","../../src/utils/env/isArch.ts","../../src/utils/env/isUbuntu.ts","../../src/chocolatey/chocolatey.ts","../../src/utils/setup/setupChocoPack.ts","../../src/utils/setup/setupDnfPack.ts","../../src/utils/setup/setupPacmanPack.ts","../../node_modules/.pnpm/patha@0.4.1/node_modules/patha/dist/index.node.mjs","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/tool-cache.js","../../node_modules/.pnpm/retry-as-promised@7.0.4/node_modules/retry-as-promised/dist/index.js","../../src/sevenzip/sevenzip.ts","../../src/utils/setup/extract.ts","../../src/utils/setup/setupBin.ts","../../src/cmake/cmake.ts","../../src/utils/setup/version.ts","../../src/utils/std/index.ts","../../src/python/python.ts","../../src/versions/versions.ts","../../src/utils/env/ubuntu_version.ts","../../src/utils/setup/setupPipPack.ts","../../src/graphviz/graphviz.ts","../../src/utils/setup/setupDmg.ts","../../src/doxygen/doxygen.ts","../../src/macos-sdk/macos-sdk.ts","../../src/utils/asset/load-assets.ts","../../src/gcc/gcc.ts","../../src/ninja/ninja.ts","../../src/kcov/kcov.ts","../../node_modules/.pnpm/msvc-dev-cmd@https+++codeload.github.com+aminya+msvc-dev-cmd+tar.gz+c01f519bd995460228ed3dec4df51df92dc290fd/node_modules/msvc-dev-cmd/lib.js","../../src/vcvarsall/vcvarsall.ts","../../src/installTool.ts","../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js","../../src/llvm/llvm_url.ts","../../src/llvm/llvm.ts","../../src/llvm/llvm_installer.ts","../../src/msvc/msvc.ts","../../src/powershell/powershell.ts","../../src/task/task.ts","../../src/cli-options.ts","../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/auth.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js","../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js","../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js","../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js","../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js","../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js","../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/options.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js","../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/_iterate.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/normalize-options.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-integer.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-pos-integer.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-length.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-callable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/for-each.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-object.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/error/custom.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/_define-length.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/value/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/object/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/function/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/prototype/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/is.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/shim.js","../../node_modules/.pnpm/d@1.0.2/node_modules/d/index.js","../../node_modules/.pnpm/event-emitter@0.3.5/node_modules/event-emitter/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-resolve.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/to-array.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-normalize.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/configure-map.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/plain.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/primitive.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-primitive-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-1.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/async.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/dispose.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max-age.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/valid-timeout.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/max-timeout.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max.js","../../node_modules/.pnpm/lru-queue@0.1.0/node_modules/lru-queue/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/ref-counter.js","../../node_modules/.pnpm/escape-path-with-spaces@1.0.2/node_modules/escape-path-with-spaces/index.js","../../node_modules/.pnpm/escape-quotes@1.0.2/node_modules/escape-quotes/lib/escape-quotes.js","../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/lib/numerous.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/locales/en.js","../../node_modules/.pnpm/is-node@1.0.2/node_modules/is-node/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/locales/en.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js","../../node_modules/.pnpm/node-downloader-helper@2.1.9/node_modules/node-downloader-helper/dist/index.js","../../packages/setup-apt/dist/apt-timeout.js","../../packages/setup-apt/dist/update.js","../../packages/setup-apt/dist/init-apt.js","../../node_modules/.pnpm/replace-ext@2.0.0/node_modules/replace-ext/index.js","../../src/utils/env/arch.ts","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","../../node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/manifest.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/retry-helper.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/opts-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-manual.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/find-made.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/path-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/use-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/index.js","../../src/versions/default_versions.ts","../../node_modules/.pnpm/ubuntu-version@2.0.0/node_modules/ubuntu-version/index.js","../../node_modules/.pnpm/macos-release@3.3.0/node_modules/macos-release/index.js","../../src/utils/env/macos_version.ts","../../src/nala/nala.ts","../../src/vcpkg/vcpkg.ts","../../src/tool.ts","../../src/bazel/bazel.ts","../../src/conan/conan.ts","../../src/meson/meson.ts","../../src/gcovr/gcovr.ts","../../src/opencppcoverage/opencppcoverage.ts","../../src/ccache/ccache.ts","../../src/sccache/sccache.ts","../../src/cppcheck/cppcheck.ts","../../src/make/make.ts","../../src/setup-cpp.ts","../../src/check-updates.ts","../../src/compilers.ts"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","export function getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new DecodedURL(proxyVar);\n }\n catch {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new DecodedURL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexport function checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\nclass DecodedURL extends URL {\n _decodedUsername;\n _decodedPassword;\n constructor(url, base) {\n super(url, base);\n this._decodedUsername = decodeURIComponent(super.username);\n this._decodedPassword = decodeURIComponent(super.password);\n }\n get username() {\n return this._decodedUsername;\n }\n get password() {\n return this._decodedPassword;\n }\n}\n//# sourceMappingURL=proxy.js.map","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","import * as core from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nexport function error(err) {\n return GITHUB_ACTIONS ? core.error(err) : console.log(`\\x1b[31m${err}\\x1b[0m`);\n}\nexport function success(msg) {\n return console.log(`\\x1b[32m${msg}\\x1b[0m`);\n}\nexport function warning(msg) {\n return GITHUB_ACTIONS ? core.warning(msg) : console.log(`\\x1b[33m${msg}\\x1b[0m`);\n}\nexport function notice(msg) {\n return GITHUB_ACTIONS ? core.notice(msg) : console.log(`\\x1b[94m${msg}\\x1b[0m`);\n}\nexport function info(msg) {\n return GITHUB_ACTIONS ? core.info(msg) : console.log(msg);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxlQUFlLENBQUE7QUFDckMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUV4QyxNQUFNLFVBQVUsS0FBSyxDQUFDLEdBQW1CO0lBQ3ZDLE9BQU8sY0FBYyxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLFdBQVcsR0FBRyxTQUFTLENBQUMsQ0FBQTtBQUNoRixDQUFDO0FBRUQsTUFBTSxVQUFVLE9BQU8sQ0FBQyxHQUFXO0lBQ2pDLE9BQU8sT0FBTyxDQUFDLEdBQUcsQ0FBQyxXQUFXLEdBQUcsU0FBUyxDQUFDLENBQUE7QUFDN0MsQ0FBQztBQUVELE1BQU0sVUFBVSxPQUFPLENBQUMsR0FBVztJQUNqQyxPQUFPLGNBQWMsQ0FBQyxDQUFDLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENB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29sZS5sb2coYFxceDFiWzMzbSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vdGljZShtc2c6IHN0cmluZykge1xuICByZXR1cm4gR0lUSFVCX0FDVElPTlMgPyBjb3JlLm5vdGljZShtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzk0bSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGluZm8obXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5pbmZvKG1zZykgOiBjb25zb2xlLmxvZyhtc2cpXG59XG4iXX0=","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n","export function isStream(stream) {\n\treturn stream !== null\n\t\t&& typeof stream === 'object'\n\t\t&& typeof stream.pipe === 'function';\n}\n\nexport function isWritableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.writable !== false\n\t\t&& typeof stream._write === 'function'\n\t\t&& typeof stream._writableState === 'object';\n}\n\nexport function isReadableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.readable !== false\n\t\t&& typeof stream._read === 'function'\n\t\t&& typeof stream._readableState === 'object';\n}\n\nexport function isDuplexStream(stream) {\n\treturn isWritableStream(stream)\n\t\t&& isReadableStream(stream);\n}\n\nexport function isTransformStream(stream) {\n\treturn isDuplexStream(stream)\n\t\t&& typeof stream._transform === 'function';\n}\n","'use strict';\nconst {constants: BufferConstants} = require('buffer');\nconst stream = require('stream');\nconst {promisify} = require('util');\nconst bufferStream = require('./buffer-stream');\n\nconst streamPipelinePromisified = promisify(stream.pipeline);\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nasync function getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\tthrow new Error('Expected a stream');\n\t}\n\n\toptions = {\n\t\tmaxBuffer: Infinity,\n\t\t...options\n\t};\n\n\tconst {maxBuffer} = options;\n\tconst stream = bufferStream(options);\n\n\tawait new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\t// Don't retrieve an oversized buffer.\n\t\t\tif (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\n\t\t\treject(error);\n\t\t};\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tawait streamPipelinePromisified(inputStream, stream);\n\t\t\t\tresolve();\n\t\t\t} catch (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t}\n\t\t})();\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t});\n\n\treturn stream.getBufferedValue();\n}\n\nmodule.exports = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});\nmodule.exports.array = (stream, options) => getStream(stream, {...options, array: true});\nmodule.exports.MaxBufferError = MaxBufferError;\n","import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n","import os from 'node:os';\nimport onExit from 'signal-exit';\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior\nexport const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {\n\tconst killResult = kill(signal);\n\tsetKillTimeout(kill, signal, options, killResult);\n\treturn killResult;\n};\n\nconst setKillTimeout = (kill, signal, options, killResult) => {\n\tif (!shouldForceKill(signal, options, killResult)) {\n\t\treturn;\n\t}\n\n\tconst timeout = getForceKillAfterTimeout(options);\n\tconst t = setTimeout(() => {\n\t\tkill('SIGKILL');\n\t}, timeout);\n\n\t// Guarded because there's no `.unref()` when `execa` is used in the renderer\n\t// process in Electron. This cannot be tested since we don't run tests in\n\t// Electron.\n\t// istanbul ignore else\n\tif (t.unref) {\n\t\tt.unref();\n\t}\n};\n\nconst shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;\n\nconst isSigterm = signal => signal === os.constants.signals.SIGTERM\n\t\t|| (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');\n\nconst getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {\n\tif (forceKillAfterTimeout === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterTimeout\\` option to be a non-negative integer, got \\`${forceKillAfterTimeout}\\` (${typeof forceKillAfterTimeout})`);\n\t}\n\n\treturn forceKillAfterTimeout;\n};\n\n// `childProcess.cancel()`\nexport const spawnedCancel = (spawned, context) => {\n\tconst killResult = spawned.kill();\n\n\tif (killResult) {\n\t\tcontext.isCanceled = true;\n\t}\n};\n\nconst timeoutKill = (spawned, signal, reject) => {\n\tspawned.kill(signal);\n\treject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));\n};\n\n// `timeout` option handling\nexport const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {\n\tif (timeout === 0 || timeout === undefined) {\n\t\treturn spawnedPromise;\n\t}\n\n\tlet timeoutId;\n\tconst timeoutPromise = new Promise((resolve, reject) => {\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutKill(spawned, killSignal, reject);\n\t\t}, timeout);\n\t});\n\n\tconst safeSpawnedPromise = spawnedPromise.finally(() => {\n\t\tclearTimeout(timeoutId);\n\t});\n\n\treturn Promise.race([timeoutPromise, safeSpawnedPromise]);\n};\n\nexport const validateTimeout = ({timeout}) => {\n\tif (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) {\n\t\tthrow new TypeError(`Expected the \\`timeout\\` option to be a non-negative integer, got \\`${timeout}\\` (${typeof timeout})`);\n\t}\n};\n\n// `cleanup` option handling\nexport const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {\n\tif (!cleanup || detached) {\n\t\treturn timedPromise;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tspawned.kill();\n\t});\n\n\treturn timedPromise.finally(() => {\n\t\tremoveExitHandler();\n\t});\n};\n","// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n","import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n","import {createWriteStream} from 'node:fs';\nimport {ChildProcess} from 'node:child_process';\nimport {isWritableStream} from 'is-stream';\n\nconst isExecaChildProcess = target => target instanceof ChildProcess && typeof target.then === 'function';\n\nconst pipeToTarget = (spawned, streamName, target) => {\n\tif (typeof target === 'string') {\n\t\tspawned[streamName].pipe(createWriteStream(target));\n\t\treturn spawned;\n\t}\n\n\tif (isWritableStream(target)) {\n\t\tspawned[streamName].pipe(target);\n\t\treturn spawned;\n\t}\n\n\tif (!isExecaChildProcess(target)) {\n\t\tthrow new TypeError('The second argument must be a string, a stream or an Execa child process.');\n\t}\n\n\tif (!isWritableStream(target.stdin)) {\n\t\tthrow new TypeError('The target child process\\'s stdin must be available.');\n\t}\n\n\tspawned[streamName].pipe(target.stdin);\n\treturn target;\n};\n\nexport const addPipeMethods = spawned => {\n\tif (spawned.stdout !== null) {\n\t\tspawned.pipeStdout = pipeToTarget.bind(undefined, spawned, 'stdout');\n\t}\n\n\tif (spawned.stderr !== null) {\n\t\tspawned.pipeStderr = pipeToTarget.bind(undefined, spawned, 'stderr');\n\t}\n\n\tif (spawned.all !== undefined) {\n\t\tspawned.pipeAll = pipeToTarget.bind(undefined, spawned, 'all');\n\t}\n};\n","import * as execa from \"execa\";\nimport which from \"which\";\n/** The cached powershell path */\nlet powershell;\n/**\n * Asynchronously execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns A promise to the execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershell(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execa(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns The execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershellSync(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execaSync(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Get the path to the powershell executable.\n *\n * @note It prefers `pwsh` over `powershell`\n * @note It caches the path for the subsequent calls to this function\n */\nexport function getPowerShell() {\n if (powershell === undefined) {\n const maybePwsh = which.sync(\"pwsh\", { nothrow: true });\n if (maybePwsh !== null) {\n powershell = maybePwsh;\n }\n const maybePowerShell = which.sync(\"powershell\", { nothrow: true });\n if (maybePowerShell !== null) {\n powershell = maybePowerShell;\n }\n }\n if (powershell === undefined) {\n throw new Error(\"Could not find powershell\");\n }\n return powershell;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLGlDQUFpQztBQUNqQyxJQUFJLFVBQThCLENBQUE7QUFFbEM7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLGNBQWMsQ0FDNUIsT0FBZSxFQUNmLGVBQXlCLENBQUMsWUFBWSxFQUFFLFNBQVMsRUFBRSxpQkFBaUIsQ0FBQyxFQUNyRSxjQUE2QixFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUU7SUFFakQsT0FBTyxLQUFLLENBQUMsS0FBSyxDQUFDLGFBQWEsRUFBRSxFQUFFLENBQUMsR0FBRy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d2VyU2hlbGxcbiAgICB9XG4gIH1cbiAgaWYgKHBvd2Vyc2hlbGwgPT09IHVuZGVmaW5lZCkge1xuICAgIHRocm93IG5ldyBFcnJvcihcIkNvdWxkIG5vdCBmaW5kIHBvd2Vyc2hlbGxcIilcbiAgfVxuICByZXR1cm4gcG93ZXJzaGVsbFxufVxuIl19","function e(e,t,r,o){Object.defineProperty(e,t,{get:r,set:o,enumerable:!0,configurable:!0})}function t(){return null!==m.sync(\"sudo\",{nothrow:!0})}function r(){return process.getuid?.()===0||!!process.env.CI}function o(){return r()&&t()}function n(e){return o()?`sudo ${e}`:e}function s(e,t=[],r=h){return o()?b(a(e,t),r):l(e,i(t),r)}function c(e,t=[],r=h){return o()?y(a(e,t),r):S(e,i(t),r)}function a(e,t){return`sudo ${i([e,...t]).join(\" \")}`}function i(e){return e.map(e=>`'${e}'`)}async function d(){try{return await S(\"fltmc\"),!0}catch{return!1}}async function u(){if(\"win32\"!==process.platform)return!1;try{return await S(\"fsutil\",[\"dirty\",\"query\",process.env.systemdrive??\"\"]),!0}catch(e){if(\"ENOENT\"===e.code)return d();return!1}}function f(){return\"win32\"===process.platform?R():r()}async function p(e){if((\"linux\"===process.platform||\"darwin\"===process.platform)&&o()&&void 0!==process.env.SUDO_USER){let t=w.statSync(e).isDirectory();await c(\"chown\",[...t?[\"-R\"]:[],process.env.SUDO_USER,e],h)}}var $,x={};import m from\"which\";import{execaCommandSync as b,execaSync as l,execaCommand as y,execa as S}from\"execa\";import w from\"fs\";e(x,\"hasSudo\",()=>t),e(x,\"isRoot\",()=>r),e(x,\"isSudo\",()=>o),e(x,\"prependSudo\",()=>n),e(x,\"defaultExecOptions\",()=>h),e(x,\"execRootSync\",()=>s),e(x,\"execRoot\",()=>c);let h={stdio:\"inherit\",shell:!0};e($={},\"isAdminWindows\",()=>R),e($,\"isAdminPosix\",()=>A),e($,\"isAdmin\",()=>f);let R=u,A=r;e({},\"grantUserWriteAccess\",()=>p);export{t as hasSudo,r as isRoot,o as isSudo,n as prependSudo,h as defaultExecOptions,s as execRootSync,c as execRoot,R as isAdminWindows,A as isAdminPosix,f as isAdmin,p as grantUserWriteAccess};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\n\nvar value = require(\"./valid-value\")\n , defineProperty = Object.defineProperty\n , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor\n , getOwnPropertyNames = Object.getOwnPropertyNames\n , getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\nmodule.exports = function (target, source) {\n\tvar error, sourceObject = Object(value(source));\n\ttarget = Object(value(target));\n\tgetOwnPropertyNames(sourceObject).forEach(function (name) {\n\t\ttry {\n\t\t\tdefineProperty(target, name, getOwnPropertyDescriptor(source, name));\n\t\t} catch (e) { error = e; }\n\t});\n\tif (typeof getOwnPropertySymbols === \"function\") {\n\t\tgetOwnPropertySymbols(sourceObject).forEach(function (symbol) {\n\t\t\ttry {\n\t\t\t\tdefineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));\n\t\t\t} catch (e) { error = e; }\n\t\t});\n\t}\n\tif (error !== undefined) throw error;\n\treturn target;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? globalThis : require(\"./implementation\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tif (typeof globalThis !== \"object\") return false;\n\tif (!globalThis) return false;\n\treturn globalThis.Array === Array;\n};\n","var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ is resolved with global context, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n","\"use strict\";\n\nvar isSymbol = require(\"./is-symbol\");\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tif (!value) return false;\n\tif (typeof value === \"symbol\") return true;\n\tif (!value.constructor) return false;\n\tif (value.constructor.name !== \"Symbol\") return false;\n\treturn value[value.constructor.toStringTag] === \"Symbol\";\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")()\n\t? require(\"ext/global-this\").Symbol\n\t: require(\"./polyfill\");\n","\"use strict\";\n\nvar global = require(\"ext/global-this\")\n , validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar Symbol = global.Symbol;\n\tvar symbol;\n\tif (typeof Symbol !== \"function\") return false;\n\tsymbol = Symbol(\"test symbol\");\n\ttry { String(symbol); }\n\tcatch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n","// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"./validate-symbol\")\n , NativeSymbol = require(\"ext/global-this\").Symbol\n , generateName = require(\"./lib/private/generate-name\")\n , setupStandardSymbols = require(\"./lib/private/setup/standard-symbols\")\n , setupSymbolRegistry = require(\"./lib/private/setup/symbol-registry\");\n\nvar create = Object.create\n , defineProperties = Object.defineProperties\n , defineProperty = Object.defineProperty;\n\nvar SymbolPolyfill, HiddenSymbol, isNativeSafe;\n\nif (typeof NativeSymbol === \"function\") {\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n} else {\n\tNativeSymbol = null;\n}\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError(\"Symbol is not a constructor\");\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError(\"Symbol is not a constructor\");\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = description === undefined ? \"\" : String(description);\n\treturn defineProperties(symbol, {\n\t\t__description__: d(\"\", description),\n\t\t__name__: d(\"\", generateName(description))\n\t});\n};\n\nsetupStandardSymbols(SymbolPolyfill);\nsetupSymbolRegistry(SymbolPolyfill);\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d(\"\", function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return \"Symbol (\" + validateSymbol(this).__description__ + \")\"; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(\n\tSymbolPolyfill.prototype, SymbolPolyfill.toPrimitive,\n\td(\"\", function () {\n\t\tvar symbol = validateSymbol(this);\n\t\tif (typeof symbol === \"symbol\") return symbol;\n\t\treturn symbol.toString();\n\t})\n);\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(\"c\", \"Symbol\"));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])\n);\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])\n);\n","\"use strict\";\n\nvar d = require(\"d\");\n\nvar create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;\n\nvar created = create(null);\nmodule.exports = function (desc) {\n\tvar postfix = 0, name, ie11BugWorkaround;\n\twhile (created[desc + (postfix || \"\")]) ++postfix;\n\tdesc += postfix || \"\";\n\tcreated[desc] = true;\n\tname = \"@@\" + desc;\n\tdefineProperty(\n\t\tobjPrototype, name,\n\t\td.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t// ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t})\n\t);\n\treturn name;\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , NativeSymbol = require(\"ext/global-this\").Symbol;\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t\t// fallback to eventual native implementation of given symbol\n\t\thasInstance: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill(\"hasInstance\")\n\t\t),\n\t\tisConcatSpreadable: d(\n\t\t\t\"\",\n\t\t\t(NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\t\t\tSymbolPolyfill(\"isConcatSpreadable\")\n\t\t),\n\t\titerator: d(\"\", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill(\"iterator\")),\n\t\tmatch: d(\"\", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill(\"match\")),\n\t\treplace: d(\"\", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill(\"replace\")),\n\t\tsearch: d(\"\", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill(\"search\")),\n\t\tspecies: d(\"\", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill(\"species\")),\n\t\tsplit: d(\"\", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill(\"split\")),\n\t\ttoPrimitive: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill(\"toPrimitive\")\n\t\t),\n\t\ttoStringTag: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill(\"toStringTag\")\n\t\t),\n\t\tunscopables: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill(\"unscopables\")\n\t\t)\n\t});\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"../../../validate-symbol\");\n\nvar registry = Object.create(null);\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\tfor: d(function (key) {\n\t\t\tif (registry[key]) return registry[key];\n\t\t\treturn (registry[key] = SymbolPolyfill(String(key)));\n\t\t}),\n\t\tkeyFor: d(function (symbol) {\n\t\t\tvar key;\n\t\t\tvalidateSymbol(symbol);\n\t\t\tfor (key in registry) {\n\t\t\t\tif (registry[key] === symbol) return key;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t});\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Array.from : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && result !== arr && result[1] === \"dwa\");\n};\n","\"use strict\";\n\nvar iteratorSymbol = require(\"es6-symbol\").iterator\n , isArguments = require(\"../../function/is-arguments\")\n , isFunction = require(\"../../function/is-function\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , callable = require(\"../../object/valid-callable\")\n , validValue = require(\"../../object/valid-value\")\n , isValue = require(\"../../object/is-value\")\n , isString = require(\"../../string/is-string\")\n , isArray = Array.isArray\n , call = Function.prototype.call\n , desc = { configurable: true, enumerable: true, writable: true, value: null }\n , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity, max-lines-per-function\nmodule.exports = function (arrayLike /*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t , thisArg = arguments[2]\n\t , Context\n\t , i\n\t , j\n\t , arr\n\t , length\n\t , code\n\t , iterator\n\t , result\n\t , getIterator\n\t , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array((length = arrayLike.length));\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , id = objToString.call((function () { return arguments; })());\n\nmodule.exports = function (value) { return objToString.call(value) === id; };\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && isFunctionStringTag(objToString.call(value));\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n","\"use strict\";\n\nvar numberIsNaN = require(\"../../number/is-nan\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , value = require(\"../../object/valid-value\")\n , indexOf = Array.prototype.indexOf\n , objHasOwnProperty = Object.prototype.hasOwnProperty\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (searchElement /*, fromIndex*/) {\n\tvar i, length, fromIndex, val;\n\tif (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);\n\n\tlength = toPosInt(value(this).length);\n\tfromIndex = arguments[1];\n\tif (isNaN(fromIndex)) fromIndex = 0;\n\telse if (fromIndex >= 0) fromIndex = floor(fromIndex);\n\telse fromIndex = toPosInt(this.length) - floor(abs(fromIndex));\n\n\tfor (i = fromIndex; i < length; ++i) {\n\t\tif (objHasOwnProperty.call(this, i)) {\n\t\t\tval = this[i];\n\t\t\tif (numberIsNaN(val)) return i; // Jslint: ignore\n\t\t}\n\t}\n\treturn -1;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Number.isNaN : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar numberIsNaN = Number.isNaN;\n\tif (typeof numberIsNaN !== \"function\") return false;\n\treturn !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\t// eslint-disable-next-line no-self-compare\n\treturn value !== value;\n};\n","\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , forEach = require(\"./for-each\")\n , call = Function.prototype.call;\n\nmodule.exports = function (obj, cb /*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n","'use strict';\n\nvar ensureCallable = function (fn) {\n\tif (typeof fn !== 'function') throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\nvar byObserver = function (Observer) {\n\tvar node = document.createTextNode(''), queue, currentQueue, i = 0;\n\tnew Observer(function () {\n\t\tvar callback;\n\t\tif (!queue) {\n\t\t\tif (!currentQueue) return;\n\t\t\tqueue = currentQueue;\n\t\t} else if (currentQueue) {\n\t\t\tqueue = currentQueue.concat(queue);\n\t\t}\n\t\tcurrentQueue = queue;\n\t\tqueue = null;\n\t\tif (typeof currentQueue === 'function') {\n\t\t\tcallback = currentQueue;\n\t\t\tcurrentQueue = null;\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\tnode.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash\n\t\twhile (currentQueue) {\n\t\t\tcallback = currentQueue.shift();\n\t\t\tif (!currentQueue.length) currentQueue = null;\n\t\t\tcallback();\n\t\t}\n\t}).observe(node, { characterData: true });\n\treturn function (fn) {\n\t\tensureCallable(fn);\n\t\tif (queue) {\n\t\t\tif (typeof queue === 'function') queue = [queue, fn];\n\t\t\telse queue.push(fn);\n\t\t\treturn;\n\t\t}\n\t\tqueue = fn;\n\t\tnode.data = (i = ++i % 2);\n\t};\n};\n\nmodule.exports = (function () {\n\t// Node.js\n\tif ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) {\n\t\treturn process.nextTick;\n\t}\n\n\t// queueMicrotask\n\tif (typeof queueMicrotask === \"function\") {\n\t\treturn function (cb) { queueMicrotask(ensureCallable(cb)); };\n\t}\n\n\t// MutationObserver\n\tif ((typeof document === 'object') && document) {\n\t\tif (typeof MutationObserver === 'function') return byObserver(MutationObserver);\n\t\tif (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver);\n\t}\n\n\t// W3C Draft\n\t// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html\n\tif (typeof setImmediate === 'function') {\n\t\treturn function (cb) { setImmediate(ensureCallable(cb)); };\n\t}\n\n\t// Wide available standard\n\tif ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) {\n\t\treturn function (cb) { setTimeout(ensureCallable(cb), 0); };\n\t}\n\n\treturn null;\n}());\n","// Deprecated\n\n\"use strict\";\n\nmodule.exports = function (obj) { return typeof obj === \"function\"; };\n","module.exports = isPromise;\nmodule.exports.default = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","/* eslint max-statements: 0 */\n\n// Support for functions returning promise\n\n\"use strict\";\n\nvar objectMap = require(\"es5-ext/object/map\")\n , primitiveSet = require(\"es5-ext/object/primitive-set\")\n , ensureString = require(\"es5-ext/object/validate-stringifiable-value\")\n , toShortString = require(\"es5-ext/to-short-string-representation\")\n , isPromise = require(\"is-promise\")\n , nextTick = require(\"next-tick\");\n\nvar create = Object.create\n , supportedModes = primitiveSet(\"then\", \"then:finally\", \"done\", \"done:finally\");\n\nrequire(\"../lib/registered-extensions\").promise = function (mode, conf) {\n\tvar waiting = create(null), cache = create(null), promises = create(null);\n\n\tif (mode === true) {\n\t\tmode = null;\n\t} else {\n\t\tmode = ensureString(mode);\n\t\tif (!supportedModes[mode]) {\n\t\t\tthrow new TypeError(\"'\" + toShortString(mode) + \"' is not valid promise mode\");\n\t\t}\n\t}\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id, ignore, promise) {\n\t\tvar isFailed = false;\n\n\t\tif (!isPromise(promise)) {\n\t\t\t// Non promise result\n\t\t\tcache[id] = promise;\n\t\t\tconf.emit(\"setasync\", id, 1);\n\t\t\treturn;\n\t\t}\n\t\twaiting[id] = 1;\n\t\tpromises[id] = promise;\n\t\tvar onSuccess = function (result) {\n\t\t\tvar count = waiting[id];\n\t\t\tif (isFailed) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Detected unordered then|done & finally resolution, which \" +\n\t\t\t\t\t\t\"in turn makes proper detection of success/failure impossible (when in \" +\n\t\t\t\t\t\t\"'done:finally' mode)\\n\" +\n\t\t\t\t\t\t\"Consider to rely on 'then' or 'done' mode instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!count) return; // Deleted from cache before resolved\n\t\t\tdelete waiting[id];\n\t\t\tcache[id] = result;\n\t\t\tconf.emit(\"setasync\", id, count);\n\t\t};\n\t\tvar onFailure = function () {\n\t\t\tisFailed = true;\n\t\t\tif (!waiting[id]) return; // Deleted from cache (or succeed in case of finally)\n\t\t\tdelete waiting[id];\n\t\t\tdelete promises[id];\n\t\t\tconf.delete(id);\n\t\t};\n\n\t\tvar resolvedMode = mode;\n\t\tif (!resolvedMode) resolvedMode = \"then\";\n\n\t\tif (resolvedMode === \"then\") {\n\t\t\tvar nextTickFailure = function () { nextTick(onFailure); };\n\t\t\t// Eventual finally needs to be attached to non rejected promise\n\t\t\t// (so we not force propagation of unhandled rejection)\n\t\t\tpromise = promise.then(function (result) {\n\t\t\t\tnextTick(onSuccess.bind(this, result));\n\t\t\t}, nextTickFailure);\n\t\t\t// If `finally` is a function we attach to it to remove cancelled promises.\n\t\t\tif (typeof promise.finally === \"function\") {\n\t\t\t\tpromise.finally(nextTickFailure);\n\t\t\t}\n\t\t} else if (resolvedMode === \"done\") {\n\t\t\t// Not recommended, as it may mute any eventual \"Unhandled error\" events\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess, onFailure);\n\t\t} else if (resolvedMode === \"done:finally\") {\n\t\t\t// The only mode with no side effects assuming library does not throw unconditionally\n\t\t\t// for rejected promises.\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof promise.finally !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'finally' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess);\n\t\t\tpromise.finally(onFailure);\n\t\t}\n\t});\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id, args, context) {\n\t\tvar promise;\n\t\tif (waiting[id]) {\n\t\t\t++waiting[id]; // Still waiting\n\t\t\treturn;\n\t\t}\n\t\tpromise = promises[id];\n\t\tvar emit = function () { conf.emit(\"getasync\", id, args, context); };\n\t\tif (isPromise(promise)) {\n\t\t\tif (typeof promise.done === \"function\") promise.done(emit);\n\t\t\telse {\n\t\t\t\tpromise.then(function () { nextTick(emit); });\n\t\t\t}\n\t\t} else {\n\t\t\temit();\n\t\t}\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tdelete promises[id];\n\t\tif (waiting[id]) {\n\t\t\tdelete waiting[id];\n\t\t\treturn; // Not yet resolved\n\t\t}\n\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\tvar result = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, [result]);\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\twaiting = create(null);\n\t\tpromises = create(null);\n\t\tconf.emit(\"clearasync\", objectMap(oldCache, function (data) { return [data]; }));\n\t});\n};\n","\"use strict\";\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (arg /*, …args*/) {\n\tvar set = create(null);\n\tforEach.call(arguments, function (name) { set[name] = true; });\n\treturn set;\n};\n","\"use strict\";\n\nvar ensureValue = require(\"./valid-value\")\n , stringifiable = require(\"./validate-stringifiable\");\n\nmodule.exports = function (value) { return stringifiable(ensureValue(value)); };\n","\"use strict\";\n\nvar isCallable = require(\"./is-callable\");\n\nmodule.exports = function (stringifiable) {\n\ttry {\n\t\tif (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString();\n\t\treturn String(stringifiable);\n\t} catch (e) {\n\t\tthrow new TypeError(\"Passed argument cannot be stringifed\");\n\t}\n};\n","\"use strict\";\n\nvar safeToString = require(\"./safe-to-string\");\n\nvar reNewLine = /[\\n\\r\\u2028\\u2029]/g;\n\nmodule.exports = function (value) {\n\tvar string = safeToString(value);\n\t// Trim if too long\n\tif (string.length > 100) string = string.slice(0, 99) + \"…\";\n\t// Replace eventual new lines\n\tstring = string.replace(reNewLine, function (char) {\n\t\treturn JSON.stringify(char).slice(1, -1);\n\t});\n\treturn string;\n};\n","\"use strict\";\n\nvar isCallable = require(\"./object/is-callable\");\n\nmodule.exports = function (value) {\n\ttry {\n\t\tif (value && isCallable(value.toString)) return value.toString();\n\t\treturn String(value);\n\t} catch (e) {\n\t\treturn \"\";\n\t}\n};\n","import fs, {promises as fsPromises} from 'node:fs';\n\nexport async function pathExists(path) {\n\ttry {\n\t\tawait fsPromises.access(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function pathExistsSync(path) {\n\ttry {\n\t\tfs.accessSync(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { homedir } from \"os\";\nimport { join } from \"path\";\nimport { isSudo } from \"admina\";\nexport function userHomeDir() {\n if (isSudo() && typeof process.env.SUDO_USER === \"string\" && process.env.SUDO_USER !== \"\") {\n // use the user profile even if root\n if (process.platform === \"darwin\") {\n return join(\"/Users/\", process.env.SUDO_USER);\n }\n else {\n return join(\"/home/\", process.env.SUDO_USER);\n }\n }\n else {\n const maybeHomeDir = homedir();\n if (maybeHomeDir === \"\") {\n return undefined;\n }\n return maybeHomeDir;\n }\n}\nconst tildeRegex = /^~(?=$|\\/|\\\\)/;\n/**\n * Replaces a tilde with the user's home directory\n *\n * @example UntildifyUser(\"~/foo\") // /home/user/foo\n *\n * @param path The path to untildify\n * @returns The untildified path\n */\nexport function untildifyUser(path) {\n const maybeHomeDir = userHomeDir();\n if (maybeHomeDir === undefined) {\n return path;\n }\n return path.replace(tildeRegex, maybeHomeDir);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM1QixPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFL0IsTUFBTSxVQUFVLFdBQVc7SUFDekIsSUFBSSxNQUFNLEVBQUUsSUFBSSxPQUFPLE9BQU8sQ0FBQyxHQUFHLENBQUMsU0FBUyxLQUFLLFFBQVEsSUFBSSxPQUFPLENBQUMsR0FBRyxDQUFDLFNBQVMsS0FBSyxFQUFFLEVBQUUsQ0FBQztRQUMxRixvQ0FBb0M7UUFDcEMsSUFBSSxPQUFPLENBQUMsUUFBUSxLQUFLLFFBQVEsRUFBRSxDQUFDO1lB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XIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { grantUserWriteAccess } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport memoize from \"memoizee\";\nimport { pathExists } from \"path-exists\";\nimport { untildifyUser } from \"untildify-user\";\nconst { appendFile, readFile, writeFile } = promises;\nexport const defaultRcPath = untildifyUser(\"~/.bashrc\");\nasync function sourceRCInRc_(options) {\n const sourceRcString = options.guard === undefined\n ? `\\nsource \"${options.rcPath}\"\\n`\n : `\\n# ${options.guard}\\nif [[ \"$SOURCE_${options.guard.toUpperCase()}RC\" != 0 && -f \"${options.rcPath}\" ]]; then source \"${options.rcPath}\"; fi\\n`;\n try {\n await Promise.all([\n addRCHeader(options),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.bashrc\")),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.profile\")),\n ]);\n }\n catch (err) {\n warning(`Failed to add ${sourceRcString} to .profile or .bashrc. You should add it manually: ${err}`);\n }\n}\n/**\n * handles adding conditions to source rc file from .bashrc and .profile\n */\nexport const sourceRCInRc = memoize(sourceRCInRc_, { promise: true });\nasync function addRCHeader(options) {\n // a variable that prevents source rc from being called from .bashrc and .profile\n const rcHeader = options.guard === undefined\n ? \"\\n# Automatically Generated by envosman\\n\"\n : `\\n# Automatically Generated by envosman ${options.guard}\\nexport SOURCE_${options.guard.toUpperCase()}RC=0\\n`;\n if (await pathExists(options.rcPath)) {\n const rcContent = await readFile(options.rcPath, \"utf8\");\n if (!rcContent.includes(rcHeader)) {\n // already executed setupCppInProfile\n await appendFile(options.rcPath, `\\n${rcHeader}\\n`);\n info(`Added ${rcHeader} to ${options.rcPath}`);\n }\n }\n}\nasync function addSourceToTargetRc(sourceRcString, targetRcPath) {\n if (await pathExists(targetRcPath)) {\n const bashrcContent = await readFile(targetRcPath, \"utf-8\");\n if (!bashrcContent.includes(sourceRcString)) {\n await appendFile(targetRcPath, sourceRcString);\n info(`${sourceRcString} was added to ${targetRcPath}`);\n }\n }\n}\nexport async function finalizeRC(rcOptions) {\n if (await pathExists(rcOptions.rcPath)) {\n const entries = (await readFile(rcOptions.rcPath, \"utf-8\")).split(\"\\n\");\n const uniqueEntries = [...new Set(entries.reverse())].reverse(); // remove duplicates, keeping the latest entry\n await writeFile(rcOptions.rcPath, uniqueEntries.join(\"\\n\"));\n await grantUserWriteAccess(rcOptions.rcPath);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmMtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yYy1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQzdDLE9BQU8sRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3RDLE9BQU8sT0FBTyxNQUFNLFVBQVUsQ0FBQTtBQUM5QixPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sYUFBYSxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUM5QyxNQUFNLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxTQUFTLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFFcEQsTUFBTSxDQUFDLE1BQU0sYUFBYSxHQUFHLGFBQWEsQ0FBQyxXQUFXLENBQUMsQ0FBQTtBQWF2RCxLQUFLLFVBQVUsYUFBYSxDQUFDLE9BQWtCO0lBQzdDLE1BQU0sY0FBYyxHQUFHLE9BQU8sQ0FBQyxLQUFLLEtBQUssU0FBUztRQUNoRCxDQUFDLENBQUMsYUFBYSxPQUFPLENBQUMsTUFBTSxLQUFLO1FBQ2xDLENBQUMsQ0FBQyxPQ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uam9pbihcIlxcblwiKSlcblxuICAgIGF3YWl0IGdyYW50VXNlcldyaXRlQWNjZXNzKHJjT3B0aW9ucy5yY1BhdGgpXG4gIH1cbn1cbiJdfQ==","import { promises } from \"fs\";\nimport { exportVariable as ghExportVariable } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nimport { escapeString } from \"./utils.js\";\nconst { appendFile } = promises;\n/**\n * Add an environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addEnv(name, valGiven, givenOptions = {}) {\n const options = {\n escapeSpace: false,\n overwrite: true,\n rcPath: defaultRcPath,\n ...givenOptions,\n };\n const val = escapeString(valGiven ?? \"\", options.escapeSpace);\n try {\n if (GITHUB_ACTIONS) {\n try {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n ghExportVariable(name, val);\n }\n catch (err) {\n error(err);\n await addEnvSystem(name, val, options);\n }\n }\n else {\n await addEnvSystem(name, val, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to export environment variable ${name}=${val}. You should add it manually.`);\n }\n}\nasync function addEnvSystem(name, valGiven, options) {\n const val = valGiven ?? \"\";\n switch (process.platform) {\n case \"win32\": {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit\n await execPowershell(`[Environment]::SetEnvironmentVariable('${name}', '${val}', \"User\")`);\n info(`${name}='${val}' was set in the environment.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n if (!options.overwrite) {\n await appendFile(options.rcPath, `\\nif [ -z \"\\${${name}}\" ]; then export ${name}=\"${val}\"; fi\\n`);\n info(`if not defined ${name} then ${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n else {\n await appendFile(options.rcPath, `\\nexport ${name}=\"${val}\"\\n`);\n info(`${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n return;\n }\n default: {\n // fall through shell path modification\n }\n }\n process.env[name] = val;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hZGQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLGNBQWMsSUFBSSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUNsRSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sU0FBUyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxLQUFLLEVBQUUsSUFBSSxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ3BDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQTtBQUNoRCxPQUFPLEVBQUUsYUFBYSxFQUFFLFlBQVksRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUMxRCxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ3pDLE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFpQi9COzs7O0dBSUc7QUFFSCxNQUFNLENBQUMsS0FBSyxVQUFVLE1BQU0sQ0FDMUIsSUFBWSxFQUNaLFFBQTRCLEVBQzVCLGVBQXVDLEVBQUU7SUFFekMsTUFBTSxPQUFPLEdBQUc7UUFDZCxXQUFXLEVBQUUsS0FBSztRQUNsQixTQUFTLEVBQUUsSUFBSTtRQUNmLE1BQU0sRUFBRSxhQUFhO1FBQ3JCLEdBQUcsWU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ICAgfSBlbHNlIHtcbiAgICAgICAgYXdhaXQgYXBwZW5kRmlsZShvcHRpb25zLnJjUGF0aCwgYFxcbmV4cG9ydCAke25hbWV9PVwiJHt2YWx9XCJcXG5gKVxuICAgICAgICBpbmZvKGAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGRlZmF1bHQ6IHtcbiAgICAgIC8vIGZhbGwgdGhyb3VnaCBzaGVsbCBwYXRoIG1vZGlmaWNhdGlvblxuICAgIH1cbiAgfVxuICBwcm9jZXNzLmVudltuYW1lXSA9IHZhbFxufVxuIl19","import escapeSpace from \"escape-path-with-spaces\";\nimport escapeQuote from \"escape-quotes\";\n/**\n * Escape a string for use in a shell command\n * @param valGiven The string to escape\n * @param shouldEscapeSpace Whether to escape spaces in the string\n *\n * @private\n */\nexport function escapeString(valGiven, shouldEscapeSpace = false) {\n const spaceEscaped = shouldEscapeSpace ? escapeSpace(valGiven) : valGiven;\n return escapeQuote(spaceEscaped, \"\\\"\", \"\\\\\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxXQUFXLE1BQU0seUJBQXlCLENBQUE7QUFDakQsT0FBTyxXQUFXLE1BQU0sZUFBZSxDQUFBO0FBRXZDOzs7Ozs7R0FNRztBQUNILE1BQU0sVUFBVSxZQUFZLENBQUMsUUFBZ0IsRUFBRSxvQkFBNkIsS0FBSztJQUMvRSxNQUFNLFlBQVksR0FBRyxpQkFBaUIsQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUE7SUFDekUsT0FBTyxXQUFXLENBQUMsWUFBWSxFQUFFLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQTtBQUM5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGVzY2FwZVNwYWNlIGZyb20gXCJlc2NhcGUtcGF0aC13aXRoLXNwYWNlc1wiXG5pbXBvcnQgZXNjYXBlUXVvdGUgZnJvbSBcImVzY2FwZS1xdW90ZXNcIlxuXG4vKipcbiAqIEVzY2FwZSBhIHN0cmluZyBmb3IgdXNlIGluIGEgc2hlbGwgY29tbWFuZFxuICogQHBhcmFtIHZhbEdpdmVuIFRoZSBzdHJpbmcgdG8gZXNjYXBlXG4gKiBAcGFyYW0gc2hvdWxkRXNjYXBlU3BhY2UgV2hldGhlciB0byBlc2NhcGUgc3BhY2VzIGluIHRoZSBzdHJpbmdcbiAqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgZnVuY3Rpb24gZXNjYXBlU3RyaW5nKHZhbEdpdmVuOiBzdHJpbmcsIHNob3VsZEVzY2FwZVNwYWNlOiBib29sZWFuID0gZmFsc2UpIHtcbiAgY29uc3Qgc3BhY2VFc2NhcGVkID0gc2hvdWxkRXNjYXBlU3BhY2UgPyBlc2NhcGVTcGFjZSh2YWxHaXZlbikgOiB2YWxHaXZlblxuICByZXR1cm4gZXNjYXBlUXVvdGUoc3BhY2VFc2NhcGVkLCBcIlxcXCJcIiwgXCJcXFxcXCIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { delimiter } from \"path\";\nimport { addPath as ghAddPath } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nconst { appendFile } = promises;\n/**\n * Add a path to the PATH environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addPath(path, givenOptions = {}) {\n const options = { rcPath: defaultRcPath, ...givenOptions };\n if (isIgnoredPath(path)) {\n return;\n }\n process.env.PATH = `${path}${delimiter}${process.env.PATH}`;\n try {\n if (GITHUB_ACTIONS) {\n try {\n ghAddPath(path);\n }\n catch (err) {\n error(err);\n await addPathSystem(path, options);\n }\n }\n else {\n await addPathSystem(path, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to add ${path} to the percistent PATH. You should add it manually.`);\n }\n}\nasync function addPathSystem(path, options) {\n switch (process.platform) {\n case \"win32\": {\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit and also because %PATH% is different for user and system\n await execPowershell(`$USER_PATH=([Environment]::GetEnvironmentVariable(\"PATH\", \"User\")); [Environment]::SetEnvironmentVariable(\"PATH\", \"${path};$USER_PATH\", \"User\")`);\n info(`\"${path}\" was added to the PATH.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n await appendFile(options.rcPath, `\\nexport PATH=\"${path}:$PATH\"\\n`);\n info(`\"${path}\" was added to \"${options.rcPath}\"`);\n return;\n }\n default: {\n return;\n }\n }\n}\nconst ignoredPaths = [/\\/usr\\/bin\\/?/, /\\/usr\\/local\\/bin\\/?/];\n/** Skip adding /usr/bin to PATH if it is already there */\nfunction isIgnoredPath(path) {\n if (ignoredPaths.some((checkedPath) => checkedPath.test(path))) {\n const paths = process.env.PATH?.split(delimiter) ?? [];\n return paths.includes(path);\n }\n return false;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLXBhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWRkLXBhdGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM3QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxPQUFPLElBQUksU0F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0IFBBVEg9XCIke3BhdGh9OiRQQVRIXCJcXG5gKVxuICAgICAgaW5mbyhgXCIke3BhdGh9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1cImApXG4gICAgICByZXR1cm5cbiAgICB9XG4gICAgZGVmYXVsdDoge1xuICAgICAgcmV0dXJuXG4gICAgfVxuICB9XG59XG5cbmNvbnN0IGlnbm9yZWRQYXRocyA9IFsvXFwvdXNyXFwvYmluXFwvPy8sIC9cXC91c3JcXC9sb2NhbFxcL2JpblxcLz8vXVxuXG4vKiogU2tpcCBhZGRpbmcgL3Vzci9iaW4gdG8gUEFUSCBpZiBpdCBpcyBhbHJlYWR5IHRoZXJlICovXG5mdW5jdGlvbiBpc0lnbm9yZWRQYXRoKHBhdGg6IHN0cmluZykge1xuICBpZiAoaWdub3JlZFBhdGhzLnNvbWUoKGNoZWNrZWRQYXRoKSA9PiBjaGVja2VkUGF0aC50ZXN0KHBhdGgpKSkge1xuICAgIGNvbnN0IHBhdGhzID0gcHJvY2Vzcy5lbnYuUEFUSD8uc3BsaXQoZGVsaW1pdGVyKSA/PyBbXVxuICAgIHJldHVybiBwYXRocy5pbmNsdWRlcyhwYXRoKVxuICB9XG4gIHJldHVybiBmYWxzZVxufVxuIl19","\n//==============//\n// DEPENDENCIES //\n//==============//\n\nconst numerous = require('numerous');\nconst isNode = require('is-node');\n\n\n//================//\n// MODULE GLOBALS //\n//================//\n\n/**\n * Pre-calculating millisecond values for each time unit.\n */\nconst timeUnits = [\n ['years', 12 * 4 * 7 * 24 * 60 * 60 * 1000],\n ['months', 4 * 7 * 24 * 60 * 60 * 1000],\n ['weeks', 7 * 24 * 60 * 60 * 1000],\n ['days', 24 * 60 * 60 * 1000],\n ['hours', 60 * 60 * 1000],\n ['minutes', 60 * 1000],\n ['seconds', 1000],\n];\n\nconst defaultConfig = {\n locale: 'en',\n span: 2,\n delimiter: ', ',\n unitType: 'long',\n unitTypeLookupOrder: ['long', 'short', 'narrow'],\n autoloadLocales: true,\n};\n\n/**\n * Contains data of loaded locales.\n * @type {Object}\n */\nconst locales = {};\n\n\n//=========//\n// EXPORTS //\n//=========//\n\nmodule.exports = {\n create: timeDeltaFactory,\n addLocale,\n defaultConfig,\n};\n\n\n//===========//\n// FUNCTIONS //\n//===========//\n\n/**\n * Adds pluralization data for the specified locale.\n * Should be called in browser.\n *\n * @param {Object|Object[]} localeData\n */\nfunction addLocale(localeData) {\n\n // Normalizing input\n if (!Array.isArray(localeData)) {\n localeData = [localeData];\n }\n\n for (const item of localeData) {\n const { id, data } = item;\n locales[id] = data;\n }\n\n}\n\n\n/**\n * Creates new instance.\n *\n * @param {object?} config\n *\n * @returns {object}\n */\nfunction timeDeltaFactory(config) {\n\n // Initializing config by extending the default one\n config = Object.assign({}, defaultConfig, config || {});\n\n return {\n\n /**\n * Public proxy for internal format function.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object?} options\n *\n * @returns {string}\n */\n format: function (firstDate, secondDate, options) {\n\n // Allowing to override config with each individual call\n options = Object.assign({}, config, options || {});\n\n return format(firstDate, secondDate, options);\n\n }\n\n };\n\n}\n\n\n/**\n * Returns difference between two dates as a text string.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object} config\n *\n * @returns {string}\n */\nfunction format(firstDate, secondDate, config) {\n\n ensureLocaleLoadedOrThrow(config.locale, {\n autoload: config.autoloadLocales,\n });\n\n // Handling input arguments\n // -----\n\n if (!firstDate) {\n throw new Error('Missing first date argument');\n }\n\n if (!secondDate) {\n throw new Error('Missing second date argument');\n }\n\n // Calculating\n // -----\n\n const difference = getDifference(firstDate, secondDate);\n const parts = [];\n\n for (const unit of difference) {\n const [name, value] = unit;\n if (value > 0) {\n parts.push(pluralize(name, value, config));\n }\n if (parts.length >= config.span) {\n break;\n }\n }\n\n // Returning the string value\n return parts.join(config.delimiter);\n\n}\n\n\n/**\n * Checks if locale is loaded. If not, tries to load it in Node.js,\n * or throws and error in Browser.\n *\n * @param {string} locale\n * @param {Object?} options\n */\nfunction ensureLocaleLoadedOrThrow(locale, options) {\n\n const { autoload } = options;\n\n if (hasLocale(locale)) {\n return;\n }\n\n if (isNode && autoload) {\n requireLocale(locale);\n\n } else {\n throw new Error(\n `Missing locale: ${locale}, you must load it manually before using it`\n );\n }\n\n}\n\n\n/**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} localeId\n *\n * @returns {boolean}\n */\nfunction hasLocale(localeId) {\n return Boolean(locales[localeId]);\n}\n\n/**\n * Tries to load the specified locale.\n *\n * @param {string} localeId\n */\nfunction requireLocale(localeId) {\n try {\n addLocale(\n require(`../locales/${localeId}.js`)\n );\n\n } catch (error) {\n throw Error(\n `Failed to load locale: ${localeId} from ../locales/${localeId}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${error}`\n );\n\n }\n}\n\n\n/**\n * Returns difference as separate time units.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n *\n * @returns {Array}\n */\nfunction getDifference(firstDate, secondDate) {\n let difference = (secondDate - firstDate);\n const results = [];\n timeUnits.some(function (unit) {\n const name = unit[0];\n const divider = unit[1];\n const value = Math.floor(difference / divider);\n difference -= value * divider;\n results.push([name, value]);\n if (difference <= 0) {\n // Breaking the loop.\n return true;\n }\n });\n return results;\n}\n\n/**\n * Returns localized and pluralized time unit.\n *\n * @param {string} unit\n * @param {int} value\n * @param {object} config\n *\n * @returns {string}\n */\nfunction pluralize(unit, value, config) {\n const unitTypeData = getLocaleDataForUnitType(config);\n const unitString = numerous.pluralize(\n config.locale,\n value,\n unitTypeData[unit]\n );\n return unitString.replace('{0}', value);\n}\n\n\n/**\n * Returns locale data for preferred unit type.\n *\n * @param {object} config\n *\n * @returns {Array}\n */\nfunction getLocaleDataForUnitType(config) {\n\n const localeData = locales[config.locale];\n\n // Making a copy of array from config.\n let lookupOrder = config.unitTypeLookupOrder.slice();\n\n // Adding interested type to the top.\n lookupOrder.unshift(config.unitType);\n\n // Making sure only unique items are present.\n lookupOrder = arrayUnique(lookupOrder);\n\n let unitTypeData = null;\n lookupOrder.some(function (unitType) {\n if ('undefined' !== typeof localeData[unitType]) {\n unitTypeData = localeData[unitType];\n // Breaking the loop.\n return true;\n }\n });\n\n if (null === unitTypeData) {\n throw new Error('Can not find any unit type data for locale: ' + config.locale);\n }\n\n return unitTypeData;\n}\n\n/**\n * Returns array with only unique items.\n *\n * @param {Array} array\n *\n * @returns {Array}\n */\nfunction arrayUnique(array) {\n return Array.from(\n new Set(array)\n );\n}\n","const SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict';\n\nvar process$1 = require('process');\nvar semver = require('semver');\nvar os = require('os');\nvar path = require('path');\nvar fs = require('fs');\nvar https = require('https');\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar packageJson = process$1.env.npm_package_json;\nvar userAgent = process$1.env.npm_config_user_agent;\nvar isNpm6 = Boolean(userAgent && userAgent.startsWith('npm'));\nvar isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));\nvar isNpm = isNpm6 || isNpm7;\nvar isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));\nvar isNpmOrYarn = isNpm || isYarn;\n\nvar homeDirectory = os.homedir();\nvar configDir = process.env.XDG_CONFIG_HOME ||\n path.join(homeDirectory, '.config', 'simple-update-notifier');\nvar getConfigFile = function (packageName) {\n return path.join(configDir, \"\".concat(packageName.replace('@', '').replace('/', '__'), \".json\"));\n};\nvar createConfigDir = function () {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n};\nvar getLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n try {\n if (!fs.existsSync(configFile)) {\n return undefined;\n }\n var file = JSON.parse(fs.readFileSync(configFile, 'utf8'));\n return file.lastUpdateCheck;\n }\n catch (_a) {\n return undefined;\n }\n};\nvar saveLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n fs.writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: new Date().getTime() }));\n};\n\nvar getDistVersion = function (packageName, distTag) { return __awaiter(void 0, void 0, void 0, function () {\n var url;\n return __generator(this, function (_a) {\n url = \"https://registry.npmjs.org/-/package/\".concat(packageName, \"/dist-tags\");\n return [2 /*return*/, new Promise(function (resolve, reject) {\n https\n .get(url, function (res) {\n var body = '';\n res.on('data', function (chunk) { return (body += chunk); });\n res.on('end', function () {\n try {\n var json = JSON.parse(body);\n var version = json[distTag];\n if (!version) {\n reject(new Error('Error getting version'));\n }\n resolve(version);\n }\n catch (_a) {\n reject(new Error('Could not parse version response'));\n }\n });\n })\n .on('error', function (err) { return reject(err); });\n })];\n });\n}); };\n\nvar hasNewVersion = function (_a) {\n var pkg = _a.pkg, _b = _a.updateCheckInterval, updateCheckInterval = _b === void 0 ? 1000 * 60 * 60 * 24 : _b, _c = _a.distTag, distTag = _c === void 0 ? 'latest' : _c, alwaysRun = _a.alwaysRun, debug = _a.debug;\n return __awaiter(void 0, void 0, void 0, function () {\n var lastUpdateCheck, latestVersion;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n createConfigDir();\n lastUpdateCheck = getLastUpdate(pkg.name);\n if (!(alwaysRun ||\n !lastUpdateCheck ||\n lastUpdateCheck < new Date().getTime() - updateCheckInterval)) return [3 /*break*/, 2];\n return [4 /*yield*/, getDistVersion(pkg.name, distTag)];\n case 1:\n latestVersion = _d.sent();\n saveLastUpdate(pkg.name);\n if (semver.gt(latestVersion, pkg.version)) {\n return [2 /*return*/, latestVersion];\n }\n else if (debug) {\n console.error(\"Latest version (\".concat(latestVersion, \") not newer than current version (\").concat(pkg.version, \")\"));\n }\n return [3 /*break*/, 3];\n case 2:\n if (debug) {\n console.error(\"Too recent to check for a new update. simpleUpdateNotifier() interval set to \".concat(updateCheckInterval, \"ms but only \").concat(new Date().getTime() - lastUpdateCheck, \"ms since last check.\"));\n }\n _d.label = 3;\n case 3: return [2 /*return*/, false];\n }\n });\n });\n};\n\nvar borderedText = function (text) {\n var lines = text.split('\\n');\n var width = Math.max.apply(Math, lines.map(function (l) { return l.length; }));\n var res = [\"\\u250C\".concat('─'.repeat(width + 2), \"\\u2510\")];\n for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {\n var line = lines_1[_i];\n res.push(\"\\u2502 \".concat(line.padEnd(width), \" \\u2502\"));\n }\n res.push(\"\\u2514\".concat('─'.repeat(width + 2), \"\\u2518\"));\n return res.join('\\n');\n};\n\nvar simpleUpdateNotifier = function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var latestVersion, err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!args.alwaysRun &&\n (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))) {\n if (args.debug) {\n console.error('Opting out of running simpleUpdateNotifier()');\n }\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, hasNewVersion(args)];\n case 2:\n latestVersion = _a.sent();\n if (latestVersion) {\n console.error(borderedText(\"New version of \".concat(args.pkg.name, \" available!\\nCurrent Version: \").concat(args.pkg.version, \"\\nLatest Version: \").concat(latestVersion)));\n }\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n // Catch any network errors or cache writing errors so module doesn't cause a crash\n if (args.debug && err_1 instanceof Error) {\n console.error('Unexpected error in simpleUpdateNotifier():', err_1);\n }\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n}); };\n\nmodule.exports = simpleUpdateNotifier;\n","function toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\n\nfunction toVal(out, key, val, opts) {\n\tvar x, old=out[key], nxt=(\n\t\t!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))\n\t\t: typeof val === 'boolean' ? val\n\t\t: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))\n\t\t: (x = +val,x * 0 === 0) ? x : val\n\t);\n\tout[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);\n}\n\nexport default function (args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\n\tvar k, arr, arg, name, val, out={ _:[] };\n\tvar i=0, j=0, idx=0, len=args.length;\n\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\n\tif (alibi) {\n\t\tfor (k in opts.alias) {\n\t\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i=opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\n\tfor (i=opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tname = typeof opts.default[k];\n\t\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\t\tif (opts[name] !== void 0) {\n\t\t\t\topts[name].push(k);\n\t\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t\topts[name].push(arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\n\tfor (i=0; i < len; i++) {\n\t\targ = args[i];\n\n\t\tif (arg === '--') {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (j=0; j < arg.length; j++) {\n\t\t\tif (arg.charCodeAt(j) !== 45) break; // \"-\"\n\t\t}\n\n\t\tif (j === 0) {\n\t\t\tout._.push(arg);\n\t\t} else if (arg.substring(j, j + 3) === 'no-') {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) {\n\t\t\t\treturn opts.unknown(arg);\n\t\t\t}\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx=j+1; idx < arg.length; idx++) {\n\t\t\t\tif (arg.charCodeAt(idx) === 61) break; // \"=\"\n\t\t\t}\n\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);\n\t\t\tarr = (j === 2 ? [name] : name);\n\n\t\t\tfor (idx=0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);\n\t\t\t\ttoVal(out, name, (idx + 1 < arr.length) || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tif (out[k] === void 0) {\n\t\t\t\tout[k] = opts.default[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (alibi) {\n\t\tfor (k in out) {\n\t\t\tarr = opts.alias[k] || [];\n\t\t\twhile (arr.length > 0) {\n\t\t\t\tout[arr.shift()] = out[k];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n","import { promises } from \"fs\";\nimport { execRoot } from \"admina\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { sourceRC } from \"envosman\";\nconst { appendFile } = promises;\n/**\n * Update the alternatives for a package\n * @param name The name of the package\n * @param path The path to the binary\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function updateAptAlternatives(name, path, priority = 40) {\n await execRoot(\"update-alternatives\", [\"--install\", `/usr/bin/${name}`, name, path, priority.toString()]);\n}\n/**\n * Add the update-alternatives command to the rc file\n * @param name The name of the package\n * @param path The path to the binary\n * @param rcOptions The options for the rc file to add the update-alternatives command to\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function addUpdateAlternativesToRc(name, path, rcOptions, priority = 40) {\n if (GITHUB_ACTIONS) {\n await updateAptAlternatives(name, path, priority);\n }\n else {\n await sourceRC(rcOptions);\n await appendFile(rcOptions.rcPath, `\\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} ${priority}; fi\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@param apt The apt command to use\n * @private Used internally\n */\nexport function getAptEnv(apt) {\n const env = { ...process.env, DEBIAN_FRONTEND: \"noninteractive\" };\n if (apt === \"nala\") {\n // if LANG/LC_ALL is not set, enable utf8 otherwise nala fails because of ASCII encoding\n if (env.LANG === undefined) {\n env.LANG = \"C.UTF-8\";\n }\n if (env.LC_ALL === undefined) {\n env.LC_ALL = \"C.UTF-8\";\n }\n }\n return env;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFFSCxNQUFNLFVBQVUsU0FBUyxDQUFDLEdBQVc7SUFDbkMsTUFBTSxHQUFHLEdBQXNCLEVBQUUsR0FBRyxPQUFPLENBQUMsR0FBRyxFQUFFLGVBQWUsRUFBRSxnQkFBZ0IsRUFBRSxDQUFBO0lBRXBGLElBQUksR0FBRyxLQUFLLE1BQU0sRUFBRSxDQUFDO1FBQ25CLHdGQUF3RjtRQUN4RixJQUFJLEdBQUcsQ0FBQyxJQUFJLEtBQUssU0FBUyxFQUFFLENBQUM7WUFDM0IsR0FBRyxDQUFDLElBQUksR0FBRyxTQUFTLENBQUE7UUFDdEIsQ0FBQztRQUNELElBQUksR0FBRyxDQUFDLE1BQU0sS0FBSyxTQUFTLEVBQUUsQ0FBQztZQUM3QixHQUFHLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQTtRQUN4QixDQUFDO0lBQ0gsQ0FBQztJQUVELE9BQU8sR0FBRyxDQUFBO0FBQ1osQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2V0IHRoZSBlbnZpcm9ubWVudCB2YXJpYWJsZXMgdG8gdXNlIGZvciB0aGUgYXB0IGNvbW1hbmRcbiAqIEBwYXJhbSBhcHQgVGhlIGFwdCBjb21tYW5kIHRvIHVzZVxuICogQHByaXZhdGUgVXNlZCBpbnRlcm5hbGx5XG4gKi9cblxuZXhwb3J0IGZ1bmN0aW9uIGdldEFwdEVudihhcHQ6IHN0cmluZykge1xuICBjb25zdCBlbnY6IE5vZGVKUy5Qcm9jZXNzRW52ID0geyAuLi5wcm9jZXNzLmVudiwgREVCSUFOX0ZST05URU5EOiBcIm5vbmludGVyYWN0aXZlXCIgfVxuXG4gIGlmIChhcHQgPT09IFwibmFsYVwiKSB7XG4gICAgLy8gaWYgTEFORy9MQ19BTEwgaXMgbm90IHNldCwgZW5hYmxlIHV0Zjggb3RoZXJ3aXNlIG5hbGEgZmFpbHMgYmVjYXVzZSBvZiBBU0NJSSBlbmNvZGluZ1xuICAgIGlmIChlbnYuTEFORyA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICBlbnYuTEFORyA9IFwiQy5VVEYtOFwiXG4gICAgfVxuICAgIGlmIChlbnYuTENfQUxMID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGVudi5MQ19BTEwgPSBcIkMuVVRGLThcIlxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBlbnZcbn1cbiJdfQ==","import which from \"which\";\n/**\n * Check if nala is installed\n */\nexport function hasNala() {\n return which.sync(\"nala\", { nothrow: true }) !== null;\n}\n/**\n * Get the apt command to use\n * If nala is installed, use that, otherwise use apt-get\n */\nexport function getApt() {\n let apt;\n if (hasNala()) {\n apt = \"nala\";\n }\n else {\n apt = \"apt-get\";\n }\n return apt;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9nZXQtYXB0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUV6Qjs7R0FFRztBQUNILE1BQU0sVUFBVSxPQUFPO0lBQ3JCLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLENBQUMsS0FBSyxJQUFJLENBQUE7QUFDdkQsQ0FBQztBQUVEOzs7R0FHRztBQUNILE1BQU0sVUFBVSxNQUFNO0lBQ3BCLElBQUksR0FBVyxDQUFBO0lBQ2YsSUFBSSxPQUFPLEVBQUUsRUFBRSxDQUFDO1FBQ2QsR0FBRyxHQUFHLE1BQU0sQ0FBQTtJQUNkLENBQUM7U0FBTSxDQUFDO1FBQ04sR0FBRyxHQUFHLFNBQVMsQ0FBQTtJQUNqQixDQUFDO0lBQ0QsT0FBTyxHQUFHLENBQUE7QUFDWixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHdoaWNoIGZyb20gXCJ3aGljaFwiXG5cbi8qKlxuICogQ2hlY2sgaWYgbmFsYSBpcyBpbnN0YWxsZWRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGhhc05hbGEoKSB7XG4gIHJldHVybiB3aGljaC5zeW5jKFwibmFsYVwiLCB7IG5vdGhyb3c6IHRydWUgfSkgIT09IG51bGxcbn1cblxuLyoqXG4gKiBHZXQgdGhlIGFwdCBjb21tYW5kIHRvIHVzZVxuICogSWYgbmFsYSBpcyBpbnN0YWxsZWQsIHVzZSB0aGF0LCBvdGhlcndpc2UgdXNlIGFwdC1nZXRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEFwdCgpIHtcbiAgbGV0IGFwdDogc3RyaW5nXG4gIGlmIChoYXNOYWxhKCkpIHtcbiAgICBhcHQgPSBcIm5hbGFcIlxuICB9IGVsc2Uge1xuICAgIGFwdCA9IFwiYXB0LWdldFwiXG4gIH1cbiAgcmV0dXJuIGFwdFxufVxuIl19","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","import { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\n/**\n * Check if a package is installed\n * @param pack The package to check\n * @returns `true` if the package is installed, `false` otherwise\n */\nexport async function isAptPackInstalled(pack) {\n try {\n // check if a package is installed\n const { stdout } = await execa(\"dpkg\", [\"-s\", pack], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains a line that starts with \"Status: install ok installed\"\n return lines.some((line) => line.startsWith(\"Status: install ok installed\"));\n }\n catch {\n return false;\n }\n}\n/**\n * Check if a package matching a regexp is installed\n * @param regexp The regexp to check\n * @returns `true` if a package is installed, `false` otherwise\n */\nexport async function isAptPackRegexInstalled(regexp) {\n try {\n // check if a package matching the regexp is installed\n const { stdout } = await execa(\"dpkg\", [\"-l\", regexp], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains any lines that start with \"ii\"\n return lines.some((line) => line.startsWith(\"ii\"));\n }\n catch {\n return false;\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtaW5zdGFsbGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2lzLWluc3RhbGxlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQzdCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFeEM7Ozs7R0FJRzt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wiXFxuXCIpXG4gICAgLy8gY2hlY2sgaWYgdGhlIG91dHB1dCBjb250YWlucyBhbnkgbGluZXMgdGhhdCBzdGFydCB3aXRoIFwiaWlcIlxuICAgIHJldHVybiBsaW5lcy5zb21lKChsaW5lKSA9PiBsaW5lLnN0YXJ0c1dpdGgoXCJpaVwiKSlcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlXG4gIH1cbn1cbiJdfQ==","import { warning } from \"ci-log\";\nimport escapeRegex from \"escape-string-regexp\";\nimport { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized, updatedRepos } from \"./update.js\";\n/**\n * The type of apt package to install\n */\nexport var AptPackageType;\n(function (AptPackageType) {\n AptPackageType[AptPackageType[\"NameDashVersion\"] = 0] = \"NameDashVersion\";\n AptPackageType[AptPackageType[\"NameEqualsVersion\"] = 1] = \"NameEqualsVersion\";\n AptPackageType[AptPackageType[\"Name\"] = 2] = \"Name\";\n AptPackageType[AptPackageType[\"None\"] = 3] = \"None\";\n})(AptPackageType || (AptPackageType = {}));\n/**\n * Filter out the packages that are already installed and qualify the packages into a full package name/version\n */\nexport async function filterAndQualifyAptPackages(packages, apt = getApt()) {\n return (await Promise.all(packages.map((pack) => qualifiedNeededAptPackage(pack, apt))))\n .filter((pack) => pack !== undefined);\n}\n/**\n * Qualify the package into full package name/version.\n * If the package is not installed, return the full package name/version.\n * If the package is already installed, return undefined\n */\nexport async function qualifiedNeededAptPackage(pack, apt = getApt()) {\n // Qualify the package into full package name/version\n const qualified = await getAptArg(apt, pack.name, pack.version);\n // filter out the package that are already installed\n return (await isAptPackInstalled(qualified)) ? undefined : qualified;\n}\nasync function aptPackageType(apt, name, version) {\n if (version !== undefined && version !== \"\") {\n const { stdout } = await execa(\"apt-cache\", [\n \"search\",\n \"--names-only\",\n `^${escapeRegex(name)}-${escapeRegex(version)}$`,\n ], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (stdout.trim() !== \"\") {\n return AptPackageType.NameDashVersion;\n }\n try {\n // check if apt-get show can find the version\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"apt-cache\", [\"show\", `${name}=${version}`], { env: getAptEnv(apt) });\n if (stdout.trim() === \"\") {\n return AptPackageType.NameEqualsVersion;\n }\n }\n catch {\n // ignore\n }\n }\n try {\n const { stdout: showStdout } = await execa(\"apt-cache\", [\"show\", name], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (showStdout.trim() !== \"\") {\n return AptPackageType.Name;\n }\n }\n catch {\n // ignore\n }\n // If apt-cache fails, update the repos and try again\n if (!updatedRepos) {\n updateAptReposMemoized(apt);\n return aptPackageType(apt, name, version);\n }\n return AptPackageType.None;\n}\nasync function getAptArg(apt, name, version) {\n const package_type = await aptPackageType(apt, name, version);\n switch (package_type) {\n case AptPackageType.NameDashVersion:\n return `${name}-${version}`;\n case AptPackageType.NameEqualsVersion:\n return `${name}=${version}`;\n case AptPackageType.Name:\n if (version !== undefined && version !== \"\") {\n warning(`Could not find package ${name} with version ${version}. Installing the latest version.`);\n }\n return name;\n default:\n throw new Error(`Could not find package ${name} ${version ?? \"\"}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVhbGlmeS1pbnN0YWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3F1YWxpZnktaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sV0FBVyxNQUFNLHNCQUFzQixDQUFBO0FBQzlDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNB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ZlcnNpb246IHN0cmluZyB8IHVuZGVmaW5lZCkge1xuICBjb25zdCBwYWNrYWdlX3R5cGUgPSBhd2FpdCBhcHRQYWNrYWdlVHlwZShhcHQsIG5hbWUsIHZlcnNpb24pXG4gIHN3aXRjaCAocGFja2FnZV90eXBlKSB7XG4gICAgY2FzZSBBcHRQYWNrYWdlVHlwZS5OYW1lRGFzaFZlcnNpb246XG4gICAgICByZXR1cm4gYCR7bmFtZX0tJHt2ZXJzaW9ufWBcbiAgICBjYXNlIEFwdFBhY2thZ2VUeXBlLk5hbWVFcXVhbHNWZXJzaW9uOlxuICAgICAgcmV0dXJuIGAke25hbWV9PSR7dmVyc2lvbn1gXG4gICAgY2FzZSBBcHRQYWNrYWdlVHlwZS5OYW1lOlxuICAgICAgaWYgKHZlcnNpb24gIT09IHVuZGVmaW5lZCAmJiB2ZXJzaW9uICE9PSBcIlwiKSB7XG4gICAgICAgIHdhcm5pbmcoYENvdWxkIG5vdCBmaW5kIHBhY2thZ2UgJHtuYW1lfSB3aXRoIHZlcnNpb24gJHt2ZXJzaW9ufS4gSW5zdGFsbGluZyB0aGUgbGF0ZXN0IHZlcnNpb24uYClcbiAgICAgIH1cbiAgICAgIHJldHVybiBuYW1lXG4gICAgZGVmYXVsdDpcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ291bGQgbm90IGZpbmQgcGFja2FnZSAke25hbWV9ICR7dmVyc2lvbiA/PyBcIlwifWApXG4gIH1cbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { addAptKey } from \"./apt-key.js\";\nimport { addAptRepository } from \"./apt-repository.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { filterAndQualifyAptPackages } from \"./qualify-install.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nconst retryErrors = [\n \"E: Could not get lock\",\n \"dpkg: error processing archive\",\n \"dpkg: error: dpkg status database is locked by another process\",\n];\n/**\n * Install a package using apt\n *\n * @param packages The packages to install (name, and optional info like version and repositories)\n * @param update Whether to update the package list before installing (Defaults to `false`)\n *\n * @returns The installation information\n *\n * @example\n * ```ts\n * await installAptPack([{ name: \"ca-certificates\" }, { name: \"gnupg\" }])\n * ```\n *\n * @example\n * ```ts\n await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n * ```\n */\nexport async function installAptPack(packages, update = false) {\n const apt = getApt();\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via ${apt}`);\n }\n // Update the repos if needed\n if (update) {\n updateAptReposMemoized(apt);\n }\n // Add the repos if needed\n await addRepositories(apt, packages);\n const needToInstall = await filterAndQualifyAptPackages(packages, apt);\n if (needToInstall.length === 0) {\n info(\"All packages are already installed\");\n return { binDir: \"/usr/bin/\" };\n }\n // Initialize apt if needed\n await initAptMemoized(apt);\n try {\n // Add the keys if needed\n await addAptKeys(packages);\n // Install\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", ...needToInstall], {\n ...defaultExecOptions,\n env: getAptEnv(apt),\n });\n }\n catch (err) {\n if (isExecaError(err)) {\n if (retryErrors.some((error) => err.stderr.includes(error))) {\n warning(`Failed to install packages ${needToInstall}. Retrying...`);\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", \"-o\", aptTimeout, ...needToInstall], { ...defaultExecOptions, env: getAptEnv(apt) });\n }\n }\n else {\n throw err;\n }\n }\n return { binDir: \"/usr/bin/\" };\n}\nasync function addRepositories(apt, packages) {\n const allRepositories = [...new Set(packages.flatMap((pack) => pack.repository ?? []))];\n await Promise.all(allRepositories.map((repo) => addAptRepository(repo, apt)));\n}\nasync function addAptKeys(packages) {\n await Promise.all(packages.map(async (pack) => {\n if (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XB0OiBzdHJpbmcsIHBhY2thZ2VzOiBBcHRQYWNrYWdlW10pIHtcbiAgY29uc3QgYWxsUmVwb3NpdG9yaWVzID0gWy4uLm5ldyBTZXQocGFja2FnZXMuZmxhdE1hcCgocGFjaykgPT4gcGFjay5yZXBvc2l0b3J5ID8/IFtdKSldXG4gIGF3YWl0IFByb21pc2UuYWxsKGFsbFJlcG9zaXRvcmllcy5tYXAoKHJlcG8pID0+IGFkZEFwdFJlcG9zaXRvcnkocmVwbywgYXB0KSkpXG59XG5cbmFzeW5jIGZ1bmN0aW9uIGFkZEFwdEtleXMocGFja2FnZXM6IEFwdFBhY2thZ2VbXSkge1xuICBhd2FpdCBQcm9taXNlLmFsbChwYWNrYWdlcy5tYXAoYXN5bmMgKHBhY2spID0+IHtcbiAgICBpZiAocGFjay5rZXkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgYXdhaXQgYWRkQXB0S2V5KHBhY2sua2V5KVxuICAgIH1cbiAgfSkpXG59XG5cbmZ1bmN0aW9uIGlzRXhlY2FFcnJvcihlcnI6IHVua25vd24pOiBlcnIgaXMgRXhlY2FFcnJvciB7XG4gIHJldHVybiB0eXBlb2YgKGVyciBhcyBFeGVjYUVycm9yKS5zdGRlcnIgPT09IFwic3RyaW5nXCJcbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nexport async function addAptRepository(repo, apt = getApt()) {\n await initAptMemoized(apt);\n await installAddAptRepo(apt);\n execRootSync(\"add-apt-repository\", [\"-y\", \"--no-update\", repo], { ...defaultExecOptions, env: getAptEnv(apt) });\n // Update the repos\n updateAptReposMemoized.clear(); // ensure update is called\n updateAptReposMemoized(apt);\n}\nexport async function installAddAptRepo(apt) {\n if (await isAptPackInstalled(\"software-properties-common\")) {\n return;\n }\n execRootSync(apt, [\"install\", \"-y\", \"--fix-broken\", \"-o\", aptTimeout, \"software-properties-common\"], { ...defaultExecOptions, env: getAptEnv(apt) });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LXJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXB0LXJlcG9zaXRvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUM3QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3JDLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxlQUFlLENBQUE7QUFDL0MsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFDdEQsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sYUFBYSxDQUFBO0FBRXBELE1BQU0sQ0FBQyxLQUFLLFVBQVUsZ0JBQWdCLENBQUMsSUFBWSxFQUFFLEdBQUcsR0FBRyxNQUFNLEVBQUU7SUFDakUsTUFBTSxlQUFlLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDMUIsTUFBTSxpQkFBaUIsQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUM1QixZQUFZLENBQUMsb0JBQW9CLEVBQUUsQ0FBQyxJQUFJLEVBQUUsYUFBYSxFQUFFLElBQUksQ0FBQyxFQUFFLEVBQUUsR0FBRyxrQkFBa0IsRUFBRSxHQUFHLEVBQUUsU0FBUyx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3VwZGF0ZS5qc1wiXG5cbmV4cG9ydCBhc3luYyBmdW5jdGlvbiBhZGRBcHRSZXBvc2l0b3J5KHJlcG86IHN0cmluZywgYXB0ID0gZ2V0QXB0KCkpIHtcbiAgYXdhaXQgaW5pdEFwdE1lbW9pemVkKGFwdClcbiAgYXdhaXQgaW5zdGFsbEFkZEFwdFJlcG8oYXB0KVxuICBleGVjUm9vdFN5bmMoXCJhZGQtYXB0LXJlcG9zaXRvcnlcIiwgW1wiLXlcIiwgXCItLW5vLXVwZGF0ZVwiLCByZXBvXSwgeyAuLi5kZWZhdWx0RXhlY09wdGlvbnMsIGVudjogZ2V0QXB0RW52KGFwdCkgfSlcblxuICAvLyBVcGRhdGUgdGhlIHJlcG9zXG4gIHVwZGF0ZUFwdFJlcG9zTWVtb2l6ZWQuY2xlYXIoKSAvLyBlbnN1cmUgdXBkYXRlIGlzIGNhbGxlZFxuICB1cGRhdGVBcHRSZXBvc01lbW9pemVkKGFwdClcbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGluc3RhbGxBZGRBcHRSZXBvKGFwdDogc3RyaW5nKSB7XG4gIGlmIChhd2FpdCBpc0FwdFBhY2tJbnN0YWxsZWQoXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiKSkge1xuICAgIHJldHVyblxuICB9XG4gIGV4ZWNSb290U3luYyhcbiAgICBhcHQsXG4gICAgW1wiaW5zdGFsbFwiLCBcIi15XCIsIFwiLS1maXgtYnJva2VuXCIsIFwiLW9cIiwgYXB0VGltZW91dCwgXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiXSxcbiAgICB7IC4uLmRlZmF1bHRFeGVjT3B0aW9ucywgZW52OiBnZXRBcHRFbnYoYXB0KSB9LFxuICApXG59XG4iXX0=","import { tmpdir } from \"os\";\nimport { join } from \"path\";\nimport { execRoot, execRootSync } from \"admina\";\nimport { warning } from \"ci-log\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { pathExists } from \"path-exists\";\nimport { installAptPack } from \"./install.js\";\n/**\n * Add an apt key\n * @param options The options for adding the key\n * @returns The file name of the key that was added or `undefined` if it failed\n *\n * @example\n * ```ts\n * await addAptKey({ key: \"3B4FE6ACC0B21F32\" fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n *\n * @example\n * ```ts\n * await addAptKey({ keyUrl: \"https://bazel.build/bazel-release.pub.gpg\", fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n */\nexport function addAptKey(options) {\n if (\"keyUrl\" in options) {\n return addAptKeyViaURL(options);\n }\n else {\n return addAptKeyViaServer(options);\n }\n}\nexport const defaultKeyStorePath = \"/etc/apt/trusted.gpg.d\";\nexport const defaultKeyServer = \"keyserver.ubuntu.com\";\n/**\n * Add an apt key via a keyserver\n * @returns The file name of the key that was added or `undefined` if it failed\n */\nexport async function addAptKeyViaServer({ key, keyServer = defaultKeyServer, fileName, keyStorePath = defaultKeyServer }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await execRoot(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--keyserver\",\n keyServer,\n \"--recv-keys\",\n key,\n ]);\n await execRoot(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via server ${keyServer}: ${err}`);\n return undefined;\n }\n}\n/**\n * Add an apt key via a download\n * @param options The options for adding the key\n * @returns The file name of the key that was added\n */\nexport async function addAptKeyViaURL({ keyUrl, fileName, keyStorePath = defaultKeyStorePath }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dlPath = join(tmpdir(), fileName);\n const dl = new DownloaderHelper(keyUrl, tmpdir(), { fileName });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download ${keyUrl}: ${err}`);\n });\n await dl.start();\n execRootSync(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--import\",\n dlPath,\n ]);\n execRootSync(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via download ${keyUrl}: ${err}`);\n return undefined;\n }\n}\nfunction initGpg() {\n execRootSync(\"gpg\", [\"-k\"]);\n}\nfunction assertGpgFileName(fileName) {\n if (!fileName.endsWith(\".gpg\")) {\n throw new Error(`Key file name must end with .gpg: ${fileName}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWtleS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQta2V5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLElBQUksRUFBRSxNQUFNLE1BQU0sQ0FBQTtBQUMzQixPQUFPLEVBQUUsUUFBUSxFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUMvQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3pELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxhQUFhLENBQUE7QUFDeEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUk3Qzs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUNILE1BQU0sVUFBVSxTQUFTLENBQUMsT0FBeUI7SUFDakQsSUFBSSxRQUFRLElBQUksT0FBTyxFQUFFLENBQUM7UUFDeEIsT0FBTyxlQUFlLENBQUMsT0FBTyxDQUFDLENBQUE7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1wiNjQ0XCIsIGZpbGVQYXRoXSlcbiAgICB9XG4gICAgcmV0dXJuIGZpbGVQYXRoXG4gIH0gY2F0Y2ggKGVycikge1xuICAgIHdhcm5pbmcoYEZhaWxlZCB0byBhZGQgYXB0IGtleSB2aWEgZG93bmxvYWQgJHtrZXlVcmx9OiAke2Vycn1gKVxuICAgIHJldHVybiB1bmRlZmluZWRcbiAgfVxufVxuXG5mdW5jdGlvbiBpbml0R3BnKCkge1xuICBleGVjUm9vdFN5bmMoXCJncGdcIiwgW1wiLWtcIl0pXG59XG5cbmZ1bmN0aW9uIGFzc2VydEdwZ0ZpbGVOYW1lKGZpbGVOYW1lOiBzdHJpbmcpIHtcbiAgaWYgKCFmaWxlTmFtZS5lbmRzV2l0aChcIi5ncGdcIikpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoYEtleSBmaWxlIG5hbWUgbXVzdCBlbmQgd2l0aCAuZ3BnOiAke2ZpbGVOYW1lfWApXG4gIH1cbn1cbiJdfQ==","import { tmpdir } from \"os\";\nimport { dirname, join } from \"path\";\nimport { addPath } from \"envosman\";\nimport { execaSync } from \"execa\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { installAptPack } from \"setup-apt\";\nimport which from \"which\";\n/* eslint-disable require-atomic-updates */\nlet binDir;\nexport async function setupBrew(options = {}) {\n // brew is only available on darwin and linux\n if (![\"darwin\", \"linux\"].includes(process.platform)) {\n return undefined;\n }\n // check if the function has already been called\n if (typeof binDir === \"string\") {\n return { binDir };\n }\n // check if brew is already installed\n const maybeBinDir = await which(\"brew\", { nothrow: true });\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir);\n return { binDir };\n }\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dl = new DownloaderHelper(\"https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh\", tmpdir(), {\n fileName: \"install-brew.sh\",\n });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the brew installer script: ${err}`);\n });\n await dl.start();\n // brew installation is not thread-safe\n execaSync(\"/bin/bash\", [dl.getDownloadPath()], {\n stdio: \"inherit\",\n env: {\n NONINTERACTIVE: \"1\",\n },\n });\n // add the bin directory to the PATH\n binDir = getBrewBinDir();\n await addPath(binDir, options.rcOptions);\n return { binDir };\n}\n/**\n * Get the path to the bin directory of brew\n * @returns {string} The path where brew binary is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewBinDir() {\n return join(getBrewDir(), \"bin\");\n}\n/**\n * Get the path where brew is installed\n * @returns {string} The path where brew is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewDir() {\n if (process.platform === \"darwin\") {\n if (process.arch === \"arm64\") {\n return \"/opt/homebrew\";\n }\n else {\n return \"/usr/local\";\n }\n }\n if (process.platform === \"linux\") {\n return \"/home/linuxbrew/.linuxbrew\";\n }\n throw new Error(\"Unsupported platform for brew\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDM0IsT0FBTyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxNQUFNLENBQUE7QUFDcEMsT0FBTyxFQUF1QixPQUFPLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDdkQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUNqQyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sV0FBVyxDQUFBO0FBQzFDLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUd6QiwyQ0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4gKiBHZXQgdGhlIHBhdGggd2hlcmUgYnJldyBpcyBpbnN0YWxsZWRcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBwYXRoIHdoZXJlIGJyZXcgaXMgaW5zdGFsbGVkXG4gKlxuICogQmFzZWQgb24gdGhlIGluc3RhbGxhdGlvbiBzY3JpcHQgZnJvbSBodHRwczovL2JyZXcuc2hcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEJyZXdEaXIoKSB7XG4gIGlmIChwcm9jZXNzLnBsYXRmb3JtID09PSBcImRhcndpblwiKSB7XG4gICAgaWYgKHByb2Nlc3MuYXJjaCA9PT0gXCJhcm02NFwiKSB7XG4gICAgICByZXR1cm4gXCIvb3B0L2hvbWVicmV3XCJcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIFwiL3Vzci9sb2NhbFwiXG4gICAgfVxuICB9XG5cbiAgaWYgKHByb2Nlc3MucGxhdGZvcm0gPT09IFwibGludXhcIikge1xuICAgIHJldHVybiBcIi9ob21lL2xpbnV4YnJldy8ubGludXhicmV3XCJcbiAgfVxuXG4gIHRocm93IG5ldyBFcnJvcihcIlVuc3VwcG9ydGVkIHBsYXRmb3JtIGZvciBicmV3XCIpXG59XG4iXX0=","import { join } from \"path\";\nimport { info } from \"ci-log\";\nimport { execaSync } from \"execa\";\nimport which from \"which\";\nimport { getBrewBinDir, setupBrew } from \"./install.js\";\n/* eslint-disable require-atomic-updates */\nlet hasBrew = false;\n/** A function that installs a package using brew\n *\n * @param name The name of the package\n * @param version The version of the package (optional)\n * @param options The options for installing the package\n *\n * @returns The installation information\n */\nexport async function installBrewPack(name, version, givenOptions = {}) {\n const options = {\n overwrite: true,\n cask: false,\n args: [],\n ...givenOptions,\n };\n info(`Installing ${name} ${version ?? \"\"} via brew`);\n if (!hasBrew || which.sync(\"brew\", { nothrow: true }) === null) {\n await setupBrew();\n hasBrew = true;\n }\n const binDir = getBrewBinDir();\n const brewPath = join(binDir, \"brew\");\n // Args\n const args = [\n \"install\",\n (version !== undefined && version !== \"\") ? `${name}@${version}` : name,\n ];\n if (options.overwrite) {\n args.push(\"--overwrite\");\n }\n if (options.cask) {\n args.push(\"--cask\");\n }\n // brew is not thread-safe\n execaSync(brewPath, args, { stdio: \"inherit\" });\n return { binDir };\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC1wYWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2luc3RhbGwtcGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE9BQU8sQ0FBQTtBQUNqQyxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsT0FBTyxFQUFFLGFBQWEsRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFdkQsMkNBQTJDO0FBQzNDLElBQUksT0FBTyxHQUFHLEtBQUssQ0FBQTtBQVduQjs7Ozs7OztHQU9HO0FBQ0gsTUFBTSxDQUFDLEtBQUssVUFBVSxlQUFlLENBQ25DLElBQVksRUFDWixPQUFnQixFQUNoQixlQUFnQyxFQUFFO0lBRWxDLE1BQU0sT0FBTyxHQUFHO1FBQ2QsU0FBUyxFQUFFLElBQUk7UUFDZixJQUFJLEVBQUUsS0FBSztRQUNYLElBQUksRUFBRSxFQUFFO1FBQ1IsR0FBRyxZQUFZO0tBQ2hCLENBQUE7SUFFRCxJQUFJLENBQUMsY0FBYyxJQUFJLElBQUksT0FBTyxJQUFJLEVBQUUsV0FBVyxDQUFDLENBQUE7SUFFcEQsSUFBSSxDQUFDLE9BQU8sSUFBSSxLQUFLLENBQUMsSUFBSSxDQ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hasDnfCache: undefined | boolean = undefined\n\nexport function hasDnf(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (hasDnfCache === undefined) {\n hasDnfCache = which.sync(\"dnf\", { nothrow: true }) !== null\n }\n\n return hasDnfCache\n}\n","import which from \"which\"\n\nlet isArchCache: undefined | boolean = undefined\n\nexport function isArch(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isArchCache === undefined) {\n // detect arch by checking if pacman exists\n isArchCache = which.sync(\"pacman\", { nothrow: true }) !== null\n }\n\n return isArchCache\n}\n","import which from \"which\"\n\nlet isUbuntuCache: undefined | boolean = undefined\n\nexport function isUbuntu(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isUbuntuCache === undefined) {\n const apt = \"apt-get\"\n isUbuntuCache = which.sync(apt, { nothrow: true }) !== null\n }\n\n return isUbuntuCache\n}\n","import { dirname } from \"path\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet binDir: string | undefined\n\nexport async function setupChocolatey(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _version: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setupDir: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _arch: string,\n): Promise {\n if (process.platform !== \"win32\") {\n return undefined\n }\n\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"choco\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n let powershell = \"powershell.exe\"\n const maybePowerShell = which.sync(`${process.env.SystemRoot}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, {\n nothrow: true,\n })\n if (maybePowerShell !== null) {\n powershell = maybePowerShell\n }\n\n // https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe\n execaSync(\n powershell,\n [\n \"-NoProfile\",\n \"-InputFormat\",\n \"None\",\n \"-ExecutionPolicy\",\n \"Bypass\",\n \"-Command\",\n \"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\",\n ],\n { stdio: \"inherit\" },\n )\n\n const chocoPath = `${process.env.ALLUSERSPROFILE}\\\\chocolatey\\\\bin`\n await addPath(chocoPath, rcOptions)\n\n const maybeChoco = which.sync(\"choco\", { nothrow: true })\n if (maybeChoco !== null) {\n binDir = dirname(maybeChoco)\n } else {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n\n if (await pathExists(binDir)) {\n return { binDir }\n }\n return undefined\n}\n","/* eslint-disable require-atomic-updates */\nimport { info } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport which from \"which\"\nimport { setupChocolatey } from \"../../chocolatey/chocolatey.js\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\nlet hasChoco = false\n\n/** A function that installs a package using choco */\nexport async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise {\n info(`Installing ${name} ${version ?? \"\"} via chocolatey`)\n\n if (!hasChoco || which.sync(\"choco\", { nothrow: true }) === null) {\n await setupChocolatey(\"\", \"\", process.arch)\n hasChoco = true\n }\n\n // https://github.com/jberezanski/ChocolateyPackages/issues/97#issuecomment-986825694\n const PATH = process.env.PATH\n const env = { ...process.env }\n env.TMP = undefined\n env.TEMP = undefined\n env.Path = undefined\n env.PATH = PATH\n\n if (version !== undefined && version !== \"\") {\n execaSync(\"choco\", [\"install\", \"-y\", name, `--version=${version}`, ...args], {\n env,\n extendEnv: false,\n stdio: \"inherit\",\n })\n } else {\n try {\n execaSync(\"choco\", [\"install\", \"-y\", name, ...args], { env, extendEnv: false, stdio: \"inherit\" })\n } catch (err) {\n // if the package requires a reboot, downgrade the error to a notice\n if ((err as Error).message.includes(\"exit code 3010\")) {\n info(`${name} might require a reboot for the completion of the installation.`)\n } else {\n throw err\n }\n }\n }\n\n const binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n","import { execRootSync } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\ntype DnfPackage = {\n name: string\n version?: string\n}\n\n/** A function that installs a package using dnf */\nexport async function setupDnfPack(packages: DnfPackage[]): Promise {\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via dnf`)\n }\n\n const dnfArgs = await Promise.all(packages.map((pack) => getDnfArg(pack.name, pack.version)))\n execRootSync(\"dnf\", [\"-y\", \"install\", ...dnfArgs])\n\n return { binDir: \"/usr/bin/\" }\n}\n\nasync function getDnfArg(name: string, version: string | undefined) {\n if (version !== undefined && version !== \"\") {\n // check if name-version is available\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}-${version}`])\n\n if (stdout.trim() !== \"\") {\n return `${name}-${version}`\n } else {\n // try with ${name}${version}\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}${version}`])\n if (stdout.trim() !== \"\") {\n return `${name}${version}`\n }\n\n warning(`Failed to install ${name} ${version} via dnf, trying without version`)\n }\n }\n return name\n}\n","import { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRootSync, isRoot } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa, execaSync } from \"execa\"\nimport which from \"which\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet didUpdate: boolean = false\nlet didInit: boolean = false\n\n/** A function that installs a package using pacman */\nexport async function setupPacmanPack(name: string, version?: string, aur?: string): Promise {\n info(`Installing ${name} ${version ?? \"\"} via pacman`)\n\n const pacman = \"pacman\"\n\n if (aur === \"yay\") {\n setupYay()\n }\n\n // yay can't run as root, so skip update\n if (!didUpdate && aur !== \"yay\") {\n execRootSync(pacman, [\"-Sy\", \"--noconfirm\"])\n didUpdate = true\n }\n\n // install base-devel\n if (!didInit && aur !== \"yay\") {\n execRootSync(pacman, [\"-S\", \"--noconfirm\", \"base-devel\"])\n didInit = true\n }\n\n const runInstall = (arg: string) => {\n if (aur === \"yay\") {\n // run yay as non-root to fix ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.\n if (isRoot() && createdBuilderUser) {\n // Run yay as builder user\n return execRootSync(\"su\", [\"-\", \"builder\", \"-c\", `yay -S --noconfirm ${arg}`])\n } else {\n return execaSync(aur, [\"-S\", \"--noconfirm\", arg])\n }\n }\n return execRootSync(aur ?? pacman, [\"-S\", \"--noconfirm\", arg])\n }\n\n if (version !== undefined && version !== \"\") {\n // check if version is available\n const availableVersions = await availablePacmanVersions(pacman, name)\n if (availableVersions.includes(version)) {\n // try different version formats\n try {\n runInstall(`${name}=${version}`)\n } catch {\n runInstall(`${name}${version}`)\n }\n } else {\n // try without version\n info(`Failed to install ${name} ${version} via pacman, trying without version`)\n runInstall(name)\n }\n } else {\n // version not specified, install latest\n runInstall(name)\n }\n\n return { binDir: \"/usr/bin/\" }\n}\n\nconst pacmanSiVersionRegex = /Version\\s*:\\s*(.*)/g\n\n/** Query pacman for available versions */\nasync function availablePacmanVersions(pacman: string, name: string) {\n const availableVersions = []\n try {\n const { stdout } = await execa(pacman, [\"-Si\", name])\n\n for (const match of stdout.matchAll(pacmanSiVersionRegex)) {\n availableVersions.push(match[1])\n }\n } catch (err) {\n warning(`Failed to get available versions for ${name}: ${err}`)\n }\n return availableVersions\n}\n\nlet createdBuilderUser = false\n\nfunction setupYay() {\n if (which.sync(\"yay\", { nothrow: true }) === null) {\n try {\n // Install prerequisites\n execRootSync(\"pacman\", [\"-S\", \"--noconfirm\", \"base-devel\", \"git\"])\n\n const yayBuildDir = join(tmpdir(), \"yay\")\n\n execRootSync(\"mkdir\", [\"-p\", yayBuildDir])\n\n if (isRoot()) {\n // Create a non-root user to build yay\n warning(\"Creating a non-root user to build yay\")\n execRootSync(\"useradd\", [\"-m\", \"-G\", \"wheel\", \"builder\"])\n execRootSync(\"passwd\", [\"-d\", \"builder\"])\n execRootSync(\"chown\", [\"-R\", \"builder:builder\", yayBuildDir])\n execRootSync(\"bash\", [\"-c\", `echo \"builder ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers`])\n createdBuilderUser = true\n\n // Clone the yay repository into a temporary directory\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `git clone https://aur.archlinux.org/yay.git ${yayBuildDir}`], {\n stdio: \"inherit\",\n })\n\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `cd ${yayBuildDir} && makepkg -si --noconfirm`], {\n stdio: \"inherit\",\n })\n } else {\n // Clone the yay repository into a temporary directory\n execaSync(\"git\", [\"clone\", \"https://aur.archlinux.org/yay.git\", yayBuildDir], {\n stdio: \"inherit\",\n cwd: tmpdir(),\n })\n\n // Build and install yay\n execaSync(\"makepkg\", [\"-si\", \"--noconfirm\"], {\n stdio: \"inherit\",\n cwd: yayBuildDir,\n })\n }\n\n // clean-up\n execaSync(\"rm\", [\"-rf\", yayBuildDir], { stdio: \"inherit\" })\n } catch (error) {\n throw new Error(`Failed to install yay: ${error}. Install yay manually and re-run the script.`)\n }\n }\n}\n","function e(e,a){return Object.keys(a).forEach((r=>{\"default\"===r||\"__esModule\"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get(){return a[r]}})})),e}function a(e,a,r,s){Object.defineProperty(e,a,{get:r,set:s,enumerable:!0,configurable:!0})}function r(e,a=!0){return a?u(e):u(e,x(e))}function s(e){return E(e).replace(RegExp(y(N)+\"$\"),\"\")}function t(e,a=\".exe\",r=\"\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function n(e,a){const r=x(e),s=`${a}${u(e,r)}${r}`;return h(l(e),s)}function i(e,a){const r=x(e),s=`${u(e,r)}${a}${r}`;return h(l(e),s)}function o(e,a=\".cmd\",r=\".sh\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function m(e){return\"win32\"===process.platform?e:\"./\"+e}function c(e){const a=x(e).length;return e.slice(0,-a)}function d(e,a){return z(e,a)}function f(e,a){const r=g(a,e);return!(!r||\"..\"===r||r.startsWith(\"..\"+N)||r===w(e))}import{basename as u,delimiter as p,dirname as l,extname as x,format as v,isAbsolute as $,join as h,normalize as E,parse as P,posix as b,relative as g,resolve as w,sep as N,toNamespacedPath as S,win32 as j}from\"path\";import y from\"escape-string-regexp\";import z from\"replace-ext\";var O={},R={};a(R,\"name\",(()=>r));var A={};a(A,\"normalizeTrim\",(()=>s));var I={};a(I,\"addExeExt\",(()=>t));var T={};a(T,\"addNamePrefix\",(()=>n));var _={};a(_,\"addNameSuffix\",(()=>i));var k={};a(k,\"addShExt\",(()=>o));var M={};a(M,\"addShRelativePrefix\",(()=>m));var W={};a(W,\"removeExt\",(()=>c));var q={};a(q,\"replaceExt\",(()=>d));var B={};a(B,\"isPathInside\",(()=>f)),e(O,R),e(O,A),e(O,I),e(O,T),e(O,_),e(O,k),e(O,M),e(O,W),e(O,q),e(O,B);export{u as basename,p as delimiter,l as dirname,x as extname,v as format,$ as isAbsolute,h as join,E as normalize,P as parse,b as posix,g as relative,w as resolve,N as sep,S as toNamespacedPath,j as win32,r as name,s as normalizeTrim,t as addExeExt,n as addNamePrefix,i as addNameSuffix,o as addShExt,m as addShRelativePrefix,c as removeExt,d as replaceExt,f as isPathInside};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst mm = __importStar(require(\"./manifest\"));\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst httpm = __importStar(require(\"@actions/http-client\"));\nconst semver = __importStar(require(\"semver\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst assert_1 = require(\"assert\");\nconst v4_1 = __importDefault(require(\"uuid/v4\"));\nconst exec_1 = require(\"@actions/exec/lib/exec\");\nconst retry_helper_1 = require(\"./retry-helper\");\nclass HTTPError extends Error {\n constructor(httpStatusCode) {\n super(`Unexpected HTTP response: ${httpStatusCode}`);\n this.httpStatusCode = httpStatusCode;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nexports.HTTPError = HTTPError;\nconst IS_WINDOWS = process.platform === 'win32';\nconst IS_MAC = process.platform === 'darwin';\nconst userAgent = 'actions/tool-cache';\n/**\n * Download a tool from an url and stream it into a file\n *\n * @param url url of tool to download\n * @param dest path to download tool\n * @param auth authorization header\n * @param headers other headers\n * @returns path to downloaded tool\n */\nfunction downloadTool(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n dest = dest || path.join(_getTempDirectory(), v4_1.default());\n yield io.mkdirP(path.dirname(dest));\n core.debug(`Downloading ${url}`);\n core.debug(`Destination ${dest}`);\n const maxAttempts = 3;\n const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10);\n const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);\n const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);\n return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {\n return yield downloadToolAttempt(url, dest || '', auth, headers);\n }), (err) => {\n if (err instanceof HTTPError && err.httpStatusCode) {\n // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests\n if (err.httpStatusCode < 500 &&\n err.httpStatusCode !== 408 &&\n err.httpStatusCode !== 429) {\n return false;\n }\n }\n // Otherwise retry\n return true;\n });\n });\n}\nexports.downloadTool = downloadTool;\nfunction downloadToolAttempt(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(dest)) {\n throw new Error(`Destination file path ${dest} already exists`);\n }\n // Get the response headers\n const http = new httpm.HttpClient(userAgent, [], {\n allowRetries: false\n });\n if (auth) {\n core.debug('set auth');\n if (headers === undefined) {\n headers = {};\n }\n headers.authorization = auth;\n }\n const response = yield http.get(url, headers);\n if (response.message.statusCode !== 200) {\n const err = new HTTPError(response.message.statusCode);\n core.debug(`Failed to download from \"${url}\". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);\n throw err;\n }\n // Download the response body\n const pipeline = util.promisify(stream.pipeline);\n const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message);\n const readStream = responseMessageFactory();\n let succeeded = false;\n try {\n yield pipeline(readStream, fs.createWriteStream(dest));\n core.debug('download complete');\n succeeded = true;\n return dest;\n }\n finally {\n // Error, delete dest before retry\n if (!succeeded) {\n core.debug('download failed');\n try {\n yield io.rmRF(dest);\n }\n catch (err) {\n core.debug(`Failed to delete '${dest}'. ${err.message}`);\n }\n }\n }\n });\n}\n/**\n * Extract a .7z file\n *\n * @param file path to the .7z file\n * @param dest destination directory. Optional.\n * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this\n * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will\n * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is\n * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line\n * interface, it is smaller than the full command line interface, and it does support long paths. At the\n * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website.\n * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path\n * to 7zr.exe can be pass to this function.\n * @returns path to the destination directory\n */\nfunction extract7z(file, dest, _7zPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n const originalCwd = process.cwd();\n process.chdir(dest);\n if (_7zPath) {\n try {\n const logLevel = core.isDebug() ? '-bb1' : '-bb0';\n const args = [\n 'x',\n logLevel,\n '-bd',\n '-sccUTF-8',\n file\n ];\n const options = {\n silent: true\n };\n yield exec_1.exec(`\"${_7zPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n else {\n const escapedScript = path\n .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1')\n .replace(/'/g, \"''\")\n .replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const escapedTarget = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`;\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n command\n ];\n const options = {\n silent: true\n };\n try {\n const powershellPath = yield io.which('powershell', true);\n yield exec_1.exec(`\"${powershellPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n return dest;\n });\n}\nexports.extract7z = extract7z;\n/**\n * Extract a compressed tar archive\n *\n * @param file path to the tar\n * @param dest destination directory. Optional.\n * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.\n * @returns path to the destination directory\n */\nfunction extractTar(file, dest, flags = 'xz') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n // Create dest\n dest = yield _createExtractFolder(dest);\n // Determine whether GNU tar\n core.debug('Checking tar --version');\n let versionOutput = '';\n yield exec_1.exec('tar --version', [], {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n core.debug(versionOutput.trim());\n const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');\n // Initialize args\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n if (core.isDebug() && !flags.includes('v')) {\n args.push('-v');\n }\n let destArg = dest;\n let fileArg = file;\n if (IS_WINDOWS && isGnuTar) {\n args.push('--force-local');\n destArg = dest.replace(/\\\\/g, '/');\n // Technically only the dest needs to have `/` but for aesthetic consistency\n // convert slashes in the file arg too.\n fileArg = file.replace(/\\\\/g, '/');\n }\n if (isGnuTar) {\n // Suppress warnings when using GNU tar to extract archives created by BSD tar\n args.push('--warning=no-unknown-keyword');\n args.push('--overwrite');\n }\n args.push('-C', destArg, '-f', fileArg);\n yield exec_1.exec(`tar`, args);\n return dest;\n });\n}\nexports.extractTar = extractTar;\n/**\n * Extract a xar compatible archive\n *\n * @param file path to the archive\n * @param dest destination directory. Optional.\n * @param flags flags for the xar. Optional.\n * @returns path to the destination directory\n */\nfunction extractXar(file, dest, flags = []) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n args.push('-x', '-C', dest, '-f', file);\n if (core.isDebug()) {\n args.push('-v');\n }\n const xarPath = yield io.which('xar', true);\n yield exec_1.exec(`\"${xarPath}\"`, _unique(args));\n return dest;\n });\n}\nexports.extractXar = extractXar;\n/**\n * Extract a zip\n *\n * @param file path to the zip\n * @param dest destination directory. Optional.\n * @returns path to the destination directory\n */\nfunction extractZip(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n dest = yield _createExtractFolder(dest);\n if (IS_WINDOWS) {\n yield extractZipWin(file, dest);\n }\n else {\n yield extractZipNix(file, dest);\n }\n return dest;\n });\n}\nexports.extractZip = extractZip;\nfunction extractZipWin(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n // build the powershell command\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedDest = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const pwshPath = yield io.which('pwsh', false);\n //To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory\n //and the -Force flag for Expand-Archive as a fallback\n if (pwshPath) {\n //attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive\n const pwshCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,\n `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`,\n `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n pwshCommand\n ];\n core.debug(`Using pwsh at path: ${pwshPath}`);\n yield exec_1.exec(`\"${pwshPath}\"`, args);\n }\n else {\n const powershellCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,\n `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`,\n `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n powershellCommand\n ];\n const powershellPath = yield io.which('powershell', true);\n core.debug(`Using powershell at path: ${powershellPath}`);\n yield exec_1.exec(`\"${powershellPath}\"`, args);\n }\n });\n}\nfunction extractZipNix(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n const unzipPath = yield io.which('unzip', true);\n const args = [file];\n if (!core.isDebug()) {\n args.unshift('-q');\n }\n args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run\n yield exec_1.exec(`\"${unzipPath}\"`, args, { cwd: dest });\n });\n}\n/**\n * Caches a directory and installs it into the tool cacheDir\n *\n * @param sourceDir the directory to cache into tools\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheDir(sourceDir, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source dir: ${sourceDir}`);\n if (!fs.statSync(sourceDir).isDirectory()) {\n throw new Error('sourceDir is not a directory');\n }\n // Create the tool dir\n const destPath = yield _createToolPath(tool, version, arch);\n // copy each child item. do not move. move can fail on Windows\n // due to anti-virus software having an open handle on a file.\n for (const itemName of fs.readdirSync(sourceDir)) {\n const s = path.join(sourceDir, itemName);\n yield io.cp(s, destPath, { recursive: true });\n }\n // write .complete\n _completeToolPath(tool, version, arch);\n return destPath;\n });\n}\nexports.cacheDir = cacheDir;\n/**\n * Caches a downloaded file (GUID) and installs it\n * into the tool cache with a given targetName\n *\n * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid.\n * @param targetFile the name of the file name in the tools directory\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheFile(sourceFile, targetFile, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source file: ${sourceFile}`);\n if (!fs.statSync(sourceFile).isFile()) {\n throw new Error('sourceFile is not a file');\n }\n // create the tool dir\n const destFolder = yield _createToolPath(tool, version, arch);\n // copy instead of move. move can fail on Windows due to\n // anti-virus software having an open handle on a file.\n const destPath = path.join(destFolder, targetFile);\n core.debug(`destination file ${destPath}`);\n yield io.cp(sourceFile, destPath);\n // write .complete\n _completeToolPath(tool, version, arch);\n return destFolder;\n });\n}\nexports.cacheFile = cacheFile;\n/**\n * Finds the path to a tool version in the local installed tool cache\n *\n * @param toolName name of the tool\n * @param versionSpec version of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction find(toolName, versionSpec, arch) {\n if (!toolName) {\n throw new Error('toolName parameter is required');\n }\n if (!versionSpec) {\n throw new Error('versionSpec parameter is required');\n }\n arch = arch || os.arch();\n // attempt to resolve an explicit version\n if (!isExplicitVersion(versionSpec)) {\n const localVersions = findAllVersions(toolName, arch);\n const match = evaluateVersions(localVersions, versionSpec);\n versionSpec = match;\n }\n // check for the explicit version in the cache\n let toolPath = '';\n if (versionSpec) {\n versionSpec = semver.clean(versionSpec) || '';\n const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch);\n core.debug(`checking cache: ${cachePath}`);\n if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) {\n core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`);\n toolPath = cachePath;\n }\n else {\n core.debug('not found');\n }\n }\n return toolPath;\n}\nexports.find = find;\n/**\n * Finds the paths to all versions of a tool that are installed in the local tool cache\n *\n * @param toolName name of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction findAllVersions(toolName, arch) {\n const versions = [];\n arch = arch || os.arch();\n const toolPath = path.join(_getCacheDirectory(), toolName);\n if (fs.existsSync(toolPath)) {\n const children = fs.readdirSync(toolPath);\n for (const child of children) {\n if (isExplicitVersion(child)) {\n const fullPath = path.join(toolPath, child, arch || '');\n if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {\n versions.push(child);\n }\n }\n }\n }\n return versions;\n}\nexports.findAllVersions = findAllVersions;\nfunction getManifestFromRepo(owner, repo, auth, branch = 'master') {\n return __awaiter(this, void 0, void 0, function* () {\n let releases = [];\n const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;\n const http = new httpm.HttpClient('tool-cache');\n const headers = {};\n if (auth) {\n core.debug('set auth');\n headers.authorization = auth;\n }\n const response = yield http.getJson(treeUrl, headers);\n if (!response.result) {\n return releases;\n }\n let manifestUrl = '';\n for (const item of response.result.tree) {\n if (item.path === 'versions-manifest.json') {\n manifestUrl = item.url;\n break;\n }\n }\n headers['accept'] = 'application/vnd.github.VERSION.raw';\n let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();\n if (versionsRaw) {\n // shouldn't be needed but protects against invalid json saved with BOM\n versionsRaw = versionsRaw.replace(/^\\uFEFF/, '');\n try {\n releases = JSON.parse(versionsRaw);\n }\n catch (_a) {\n core.debug('Invalid json');\n }\n }\n return releases;\n });\n}\nexports.getManifestFromRepo = getManifestFromRepo;\nfunction findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) {\n return __awaiter(this, void 0, void 0, function* () {\n // wrap the internal impl\n const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter);\n return match;\n });\n}\nexports.findFromManifest = findFromManifest;\nfunction _createExtractFolder(dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!dest) {\n // create a temp dir\n dest = path.join(_getTempDirectory(), v4_1.default());\n }\n yield io.mkdirP(dest);\n return dest;\n });\n}\nfunction _createToolPath(tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n core.debug(`destination ${folderPath}`);\n const markerPath = `${folderPath}.complete`;\n yield io.rmRF(folderPath);\n yield io.rmRF(markerPath);\n yield io.mkdirP(folderPath);\n return folderPath;\n });\n}\nfunction _completeToolPath(tool, version, arch) {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n const markerPath = `${folderPath}.complete`;\n fs.writeFileSync(markerPath, '');\n core.debug('finished caching tool');\n}\n/**\n * Check if version string is explicit\n *\n * @param versionSpec version string to check\n */\nfunction isExplicitVersion(versionSpec) {\n const c = semver.clean(versionSpec) || '';\n core.debug(`isExplicit: ${c}`);\n const valid = semver.valid(c) != null;\n core.debug(`explicit? ${valid}`);\n return valid;\n}\nexports.isExplicitVersion = isExplicitVersion;\n/**\n * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec`\n *\n * @param versions array of versions to evaluate\n * @param versionSpec semantic version spec to satisfy\n */\nfunction evaluateVersions(versions, versionSpec) {\n let version = '';\n core.debug(`evaluating ${versions.length} versions`);\n versions = versions.sort((a, b) => {\n if (semver.gt(a, b)) {\n return 1;\n }\n return -1;\n });\n for (let i = versions.length - 1; i >= 0; i--) {\n const potential = versions[i];\n const satisfied = semver.satisfies(potential, versionSpec);\n if (satisfied) {\n version = potential;\n break;\n }\n }\n if (version) {\n core.debug(`matched: ${version}`);\n }\n else {\n core.debug('match not found');\n }\n return version;\n}\nexports.evaluateVersions = evaluateVersions;\n/**\n * Gets RUNNER_TOOL_CACHE\n */\nfunction _getCacheDirectory() {\n const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';\n assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');\n return cacheDirectory;\n}\n/**\n * Gets RUNNER_TEMP\n */\nfunction _getTempDirectory() {\n const tempDirectory = process.env['RUNNER_TEMP'] || '';\n assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');\n return tempDirectory;\n}\n/**\n * Gets a global variable\n */\nfunction _getGlobal(key, defaultValue) {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const value = global[key];\n /* eslint-enable @typescript-eslint/no-explicit-any */\n return value !== undefined ? value : defaultValue;\n}\n/**\n * Returns an array of unique values.\n * @param values Values to make unique.\n */\nfunction _unique(values) {\n return Array.from(new Set(values));\n}\n//# sourceMappingURL=tool-cache.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryAsPromised = exports.TimeoutError = void 0;\nclass TimeoutError extends Error {\n constructor(message, previousError) {\n super(message);\n this.name = \"TimeoutError\";\n this.previous = previousError;\n }\n}\nexports.TimeoutError = TimeoutError;\nfunction matches(match, err) {\n if (typeof match === 'function') {\n try {\n if (err instanceof match)\n return true;\n }\n catch (_) {\n return !!match(err);\n }\n }\n if (match === err.toString())\n return true;\n if (match === err.message)\n return true;\n return match instanceof RegExp\n && (match.test(err.message) || match.test(err.toString()));\n}\nfunction retryAsPromised(callback, optionsInput) {\n if (!callback || !optionsInput) {\n throw new Error('retry-as-promised must be passed a callback and a options set');\n }\n optionsInput = (typeof optionsInput === \"number\" ? { max: optionsInput } : optionsInput);\n const options = {\n $current: \"$current\" in optionsInput ? optionsInput.$current : 1,\n max: optionsInput.max,\n timeout: optionsInput.timeout || undefined,\n match: optionsInput.match ? Array.isArray(optionsInput.match) ? optionsInput.match : [optionsInput.match] : [],\n backoffBase: optionsInput.backoffBase === undefined ? 100 : optionsInput.backoffBase,\n backoffExponent: optionsInput.backoffExponent || 1.1,\n report: optionsInput.report,\n name: optionsInput.name || callback.name || 'unknown'\n };\n if (options.match && !Array.isArray(options.match))\n options.match = [options.match];\n if (options.report)\n options.report('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString(), options);\n return new Promise(function (resolve, reject) {\n let timeout;\n let backoffTimeout;\n let lastError;\n if (options.timeout) {\n timeout = setTimeout(function () {\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n reject(new TimeoutError(options.name + ' timed out', lastError));\n }, options.timeout);\n }\n Promise.resolve(callback({ current: options.$current }))\n .then(resolve)\n .then(function () {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n })\n .catch(function (err) {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n lastError = err;\n if (options.report)\n options.report((err && err.toString()) || err, options, err);\n // Should not retry if max has been reached\n var shouldRetry = options.$current < options.max;\n if (!shouldRetry)\n return reject(err);\n shouldRetry = options.match.length === 0 || options.match.some(function (match) {\n return matches(match, err);\n });\n if (!shouldRetry)\n return reject(err);\n var retryDelay = options.backoffBase * Math.pow(options.backoffExponent, options.$current - 1);\n // Do some accounting\n options.$current++;\n if (options.report)\n options.report(`Retrying ${options.name} (${options.$current})`, options);\n if (retryDelay) {\n // Use backoff function to ease retry rate\n if (options.report)\n options.report(`Delaying retry of ${options.name} by ${retryDelay}`, options);\n backoffTimeout = setTimeout(function () {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }, retryDelay);\n }\n else {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }\n });\n });\n}\nexports.retryAsPromised = retryAsPromised;\n;\nexports.default = retryAsPromised;\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSevenZip(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"7zip\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"p7zip\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"p7zip\", version)\n } else if (hasDnf()) {\n return setupDnfPack([\n { name: \"p7zip\", version },\n { name: \"p7zip-plugins\", version },\n ])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"p7zip-full\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { mkdirP } from \"@actions/io\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { setupSevenZip } from \"../../sevenzip/sevenzip.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\nexport { extractTar, extractXar } from \"@actions/tool-cache\"\n\nexport enum ArchiveType {\n Tar = 0,\n TarGz = 1,\n TarXz = 2,\n Zip = 3,\n SevenZip = 4,\n}\n\nexport function getArchiveType(file: string): ArchiveType {\n const ext = file.split(\".\").pop()\n\n if (ext === \"tar\") {\n return ArchiveType.Tar\n }\n\n if (ext === \"gz\" || ext === \"tgz\") {\n return ArchiveType.TarGz\n }\n\n if (ext === \"xz\" || ext === \"txz\") {\n return ArchiveType.TarXz\n }\n\n if (ext === \"zip\") {\n return ArchiveType.Zip\n }\n\n if (ext === \"7z\" || ext === \"exe\") {\n return ArchiveType.SevenZip\n }\n\n // default to 7z\n warning(`Unknown archive type: ${ext}. Defaulting to 7z`)\n return ArchiveType.SevenZip\n}\n\nexport function getExtractFunction(archiveType: ArchiveType) {\n switch (archiveType) {\n case ArchiveType.Tar:\n case ArchiveType.TarGz:\n return extractTarByExe\n case ArchiveType.TarXz:\n return extractTarByExe\n case ArchiveType.Zip:\n return extractZip\n default:\n return extract7Zip\n }\n}\n\nlet sevenZip: string | undefined\n\n/// Extract 7z using 7z\nexport async function extract7Zip(file: string, dest: string) {\n await execa(await getSevenZip(), [\"x\", file, `-o${dest}`, \"-y\"], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n}\n\n/// install 7z if needed\nasync function getSevenZip() {\n if (sevenZip === undefined) {\n if (which.sync(\"7z\", { nothrow: true }) === null) {\n await setupSevenZip(\"\", \"\", process.arch)\n }\n // eslint-disable-next-line require-atomic-updates\n sevenZip = \"7z\"\n }\n return sevenZip\n}\n\n/// Extract Exe using 7z\nexport function extractExe(file: string, dest: string) {\n return extract7Zip(file, dest)\n}\n\n/// Extract Zip using unzip or 7z\nexport async function extractZip(file: string, dest: string) {\n // prefer 7z if available (faster especially on Windows)\n if (which.sync(\"7z\", { nothrow: true }) !== null) {\n return extract7Zip(file, dest)\n }\n\n // if unzip is available use it (usually available on posix systems)\n if (which.sync(\"unzip\", { nothrow: true }) !== null) {\n await execa(\"unzip\", [\"-q\", file, \"-d\", dest], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n }\n\n // fallback to 7z (will install 7z if needed)\n return extract7Zip(file, dest)\n}\n\nexport async function extractTarByExe(file: string, dest: string, stripComponents: number = 0, flags: string[] = []) {\n await installTarDependencies(getArchiveType(file))\n\n try {\n await mkdirP(dest)\n } catch {\n // ignore\n }\n\n // TODO windows fails to create symlinks\n // https://github.com/heroku/heroku-slugs/issues/3\n\n try {\n await execa(\"tar\", [\"xf\", file, \"-C\", dest, `--strip-components=${stripComponents}`, ...flags], {\n stdio: \"inherit\",\n })\n } catch (e) {\n if (process.platform === \"win32\" && (e as Error).message.includes(\"Can't create '\\\\\\\\?\\\\C:\")) {\n warning(`Failed to extract symlink ${file} to ${dest}. Ignoring this symlink.`)\n }\n }\n\n await grantUserWriteAccess(dest)\n return dest\n}\n\nasync function installTarDependencies(archiveType: ArchiveType) {\n info(\"Installing tar extraction dependencies\")\n\n switch (archiveType) {\n case ArchiveType.TarGz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"gzip\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"gzip\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"gzip\" }, { name: \"tar\" }])\n }\n }\n break\n }\n case ArchiveType.TarXz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"xz\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"xz\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"xz-utils\" }, { name: \"tar\" }])\n }\n }\n break\n }\n default:\n throw new Error(`Unsupported archive type: ${archiveType} for tar extraction`)\n }\n}\n","import { tmpdir } from \"os\"\nimport { basename, join } from \"path\"\nimport { cacheDir, downloadTool, find } from \"@actions/tool-cache\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { chmod } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { maybeGetInput, rcOptions } from \"../../cli-options.js\"\nimport { getArchiveType, getExtractFunction } from \"./extract.js\"\n\n/** A type that describes a package */\nexport type PackageInfo = {\n /** Url to download the package */\n url: string\n /** The top folder name once it is extracted. It can be `\"\"` if there is no top folder */\n extractedFolderName: string\n /** The relative directory in which the binary is located. It can be `\"\"` if the exe is in the top folder */\n binRelativeDir: string\n /** The main binary file. */\n binFileName: string\n /** The function to extract the downloaded archive. It can be `undefined`, if the binary itself is downloaded directly. */\n extractFunction?: (file: string, dest: string) => Promise\n}\n\nexport type InstallationInfo = {\n /** The top install dir */\n installDir?: string\n binDir: string\n bin?: string\n}\n\n/**\n * A function that:\n *\n * - Downloads and extracts a package\n * - Adds the bin path of the package to PATH\n * - Caches the downloaded directory into tool cache for usage from other sessions\n *\n * @returns The installation directory\n */\nexport async function setupBin(\n name: string,\n version: string,\n getPackageInfo: (version: string, platform: NodeJS.Platform, arch: string) => PackageInfo | Promise,\n setupDir: string,\n arch: string,\n): Promise {\n info(`Installing ${name} ${version} ${arch} via direct downloading`)\n\n process.env.RUNNER_TEMP = process.env.RUNNER_TEMP ?? tmpdir()\n process.env.RUNNER_TOOL_CACHE = process.env.RUNNER_TOOL_CACHE ?? join(tmpdir(), \"setup-cpp\", \"hostedtoolcache\")\n\n const { url, binRelativeDir, binFileName, extractedFolderName, extractFunction } = await getPackageInfo(\n version,\n process.platform,\n arch,\n )\n\n // Restore from cache (if found).\n if (GITHUB_ACTIONS) {\n try {\n const dir = find(name, version)\n if (dir) {\n const installDir = join(dir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n if (await pathExists(join(binDir, binFileName))) {\n info(`${name} ${version} was found in the cache at ${binDir}.`)\n await addPath(binDir, rcOptions)\n\n return { installDir, binDir }\n }\n }\n } catch {\n // fails on a local machine?\n }\n }\n\n const installDir = join(setupDir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n const binFile = join(binDir, binFileName)\n\n await downloadExtractInstall(binDir, binFile, name, version, url, setupDir, extractFunction, arch)\n\n await cacheInstallation(setupDir, name, version)\n\n return { installDir, binDir }\n}\n\nasync function downloadExtractInstall(\n binDir: string,\n binFile: string,\n name: string,\n version: string,\n url: string,\n setupDir: string,\n givenExtractFunction: PackageInfo[\"extractFunction\"],\n arch: string,\n) {\n // download ane extract the package into the installation directory.\n if ((await Promise.all([pathExists(binDir), pathExists(binFile)])).includes(false)) {\n try {\n const downloaded = await tryDownload(name, version, url)\n\n info(`Extracting ${downloaded} to ${setupDir}`)\n\n const extractFunction = givenExtractFunction ?? getExtractFunction(getArchiveType(url))\n await extractFunction(downloaded, setupDir)\n } catch (err) {\n throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)\n }\n }\n\n // Adding the bin dir to the path\n /** The directory which the tool is installed to */\n info(`Add ${binDir} to PATH`)\n await addPath(binDir, rcOptions)\n\n // Check if the binary exists after extraction\n if (!(await pathExists(binFile))) {\n throw new Error(`Failed to find the binary ${binFile} after extracting ${name} ${version} ${arch}`)\n }\n\n // make the binary executable on non-windows platforms\n if (process.platform !== \"win32\") {\n try {\n await chmod(binFile, \"755\")\n } catch (err) {\n warning(`Failed to make ${binFile} executable: ${err}`)\n }\n }\n}\n\nasync function tryDownload(name: string, version: string, url: string) {\n info(`Download ${name} ${version}`)\n // try to download the package 4 times with 2 seconds delay\n const downloaded = await retry(\n () => {\n const downloadedFilePath = join(process.env.RUNNER_TEMP ?? tmpdir(), `${Date.now()}-${basename(url)}`)\n\n return downloadTool(url, downloadedFilePath)\n },\n { name: url, max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n return downloaded\n}\n\nasync function cacheInstallation(setupDir: string, name: string, version: string) {\n // check if inside Github Actions. If so, cache the installation\n if (GITHUB_ACTIONS && typeof process.env.RUNNER_TOOL_CACHE === \"string\") {\n if (maybeGetInput(\"cache-tools\") === \"true\" || process.env.CACHE_TOOLS === \"true\") {\n await cacheDir(setupDir, name, version)\n }\n }\n}\n","import { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverLte from \"semver/functions/lte\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform data for cmake */\nfunction getCmakePackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const semVersion = semverCoerce(version) ?? version\n switch (platform) {\n case \"win32\": {\n const isOld = semverLte(semVersion, \"v3.19.6\")\n let osArchStr: string\n if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"win64-x64\" : \"windows-x86_64\"\n } else if (x86.includes(arch)) {\n osArchStr = isOld ? \"win32-x86\" : \"windows-i386\"\n } else if (arm64.includes(arch)) {\n osArchStr = \"windows-arm64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Windows`)\n osArchStr = `windows-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.zip`,\n }\n }\n case \"darwin\": {\n const isOld = semverLte(semVersion, \"v3.19.1\")\n const osArchStr = isOld ? \"Darwin-x86_64\" : \"macos-universal\"\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"CMake.app/Contents/bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n case \"linux\": {\n const isOld = semverLte(semVersion, \"v3.19.8\")\n let osArchStr: string\n if (arm64.includes(arch)) {\n osArchStr = isOld ? \"Linux-aarch64\" : \"linux-aarch64\"\n } else if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"Linux-x86_64\" : \"linux-x86_64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Linux`)\n osArchStr = `linux-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Setup cmake */\nexport function setupCmake(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"cmake\", version, getCmakePackageInfo, setupDir, arch)\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { info } from \"ci-log\"\nimport { isUrlOnline } from \"is-url-online\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverCompare from \"semver/functions/compare\"\nimport semverValid from \"semver/functions/valid\"\n\n/**\n * Gets the specific versions supported by this action compatible with the supplied (specific or minimum) version in\n * descending order of release (e.g., `5.0.2`, `5.0.1`, and `5.0.0` for `5`).\n */\nexport function getSpecificVersions(versions: Set, semversion: string): string[] {\n return Array.from(versions)\n .filter((v) => /^\\d+\\.\\d+\\.\\d+$/.test(v) && v.startsWith(semversion))\n .sort((a, b) => {\n try {\n return semverCompare(a, b)\n } catch (err) {\n return a.localeCompare(b)\n }\n })\n .reverse()\n}\n\n/**\n * Gets the specific and minimum versions that can be used to refer to the supplied specific versions (e.g., `3`, `3.5`,\n * `3.5.2` for `3.5.2`).\n */\nexport function getVersions(specific: string[]): Set {\n const versions = new Set(specific)\n\n for (const version of specific) {\n versions.add(/^\\d+/.exec(version)![0])\n versions.add(/^\\d+\\.\\d+/.exec(version)![0])\n }\n\n return versions\n}\n\n/** Gets the most recent specific version for which there is a valid download URL. */\nexport async function getSpecificVersionAndUrl(\n versions: Set,\n platform: string,\n version: string,\n getUrl: (platform: string, version: string) => string | null | Promise,\n): Promise<[string, string]> {\n // specific ubuntu version\n if (platform === \"linux\" && version.includes(\"ubuntu\")) {\n const url = await getUrl(platform, version)\n // eslint-disable-next-line no-await-in-loop\n if (url !== null && (await isUrlOnline(url))) {\n return [version, url]\n }\n }\n\n // if the given set doesn't include the version, throw an error\n if (!versions.has(version)) {\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n }\n\n const offlineUrls: string[] = []\n\n // TODO use Promise.any\n for (const specificVersion of getSpecificVersions(versions, version)) {\n // eslint-disable-next-line no-await-in-loop\n const url = await getUrl(platform, specificVersion)\n if (url !== null) {\n // eslint-disable-next-line no-await-in-loop\n if (await isUrlOnline(url)) {\n return [specificVersion, url]\n } else {\n offlineUrls.push(url)\n }\n }\n }\n\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n}\n\nexport const defaultVersionRegex = /v?(\\d\\S*)/\n\n/** Get the version of a binary */\nexport async function getBinVersion(file: string, versionRegex: RegExp = defaultVersionRegex) {\n try {\n const execout = await getExecOutput(file, [\"--version\"])\n const version_output = execout.stdout || execout.stderr || \"\"\n const version = version_output.trim().match(versionRegex)?.[1]\n return semverCoerce(version) ?? undefined\n } catch (e) {\n console.error(e)\n return undefined\n }\n}\n\n/** Check if the given bin is up to date against the target version */\nexport async function isBinUptoDate(\n givenFile: string,\n targetVersion: string,\n versionRegex: RegExp = defaultVersionRegex,\n) {\n const givenVersion = await getBinVersion(givenFile, versionRegex)\n if (givenVersion !== undefined && targetVersion !== \"\") {\n return semverCompare(givenVersion, targetVersion) !== -1\n } else {\n // assume given version is old\n return false\n }\n}\n\n/** Coerce the given version if it is invalid */\nexport function semverCoerceIfInvalid(version: string) {\n if (semverValid(version) === null) {\n // version coercion\n try {\n // find the semver version of an integer\n const coercedVersion = semverCoerce(version)\n if (coercedVersion !== null) {\n info(`Coerced version '${version}' to '${coercedVersion}'`)\n return coercedVersion.version\n }\n } catch (err) {\n // handled below\n }\n }\n return version\n}\n\nexport function removeVPrefix(version: string) {\n return Number.parseInt(version.replace(/^v/, \"\"), 10)\n}\n\nexport function addVPrefix(version: string) {\n if (!version.match(/^v/)) {\n return `v${version}`\n }\n return version\n}\n\nexport function compareVersion(tag1: string, tag2: string) {\n const v1 = semverCoerce(tag1)\n const v2 = semverCoerce(tag2)\n if (v1 !== null && v2 !== null) {\n // put the latest version first\n return v2.compare(v1)\n }\n\n // if the tags are not semver, compare them as strings, putting the latest tag first\n return tag2.localeCompare(tag1)\n}\n","export function unique(dirs: string[]) {\n return [...new Set(dirs)]\n}\n\nexport function quoteIfHasSpace(str: string, quoteChar = \"\\\"\") {\n return str.includes(\" \") ? `${quoteChar}${str}${quoteChar}` : str\n}\n","import assert from \"assert\"\nimport { homedir } from \"os\"\nimport { dirname, join, parse as pathParse } from \"path\"\nimport { getExecOutput } from \"@actions/exec\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { hasPipx, setupPipPackSystem, setupPipPackWithPython } from \"../utils/setup/setupPipPack.js\"\nimport { isBinUptoDate } from \"../utils/setup/version.js\"\nimport { unique } from \"../utils/std/index.js\"\nimport { MinVersions } from \"../versions/default_versions.js\"\n\nexport async function setupPython(version: string, setupDir: string, arch: string): Promise {\n const installInfo = await findOrSetupPython(version, setupDir, arch)\n assert(installInfo.bin !== undefined)\n const foundPython = installInfo.bin\n\n // setup pip\n const foundPip = await findOrSetupPip(foundPython)\n if (foundPip === undefined) {\n throw new Error(\"pip was not installed correctly\")\n }\n\n await setupPipx(foundPython)\n\n await setupWheel(foundPython)\n\n return installInfo\n}\n\nasync function setupPipx(foundPython: string) {\n try {\n if (!(await hasPipx(foundPython))) {\n try {\n await setupPipPackWithPython(foundPython, \"pipx\", undefined, { upgrade: true, usePipx: false })\n } catch (err) {\n if (setupPipPackSystem(\"pipx\", false) === null) {\n throw new Error(`pipx was not installed correctly ${err}`)\n }\n }\n }\n await execa(foundPython, [\"-m\", \"pipx\", \"ensurepath\"], { stdio: \"inherit\" })\n await setupPipPackWithPython(foundPython, \"venv\", undefined, { upgrade: false, usePipx: false })\n } catch (err) {\n warning(`Failed to install pipx: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\n/** Setup wheel and setuptools */\nasync function setupWheel(foundPython: string) {\n try {\n await setupPipPackWithPython(foundPython, \"setuptools\", undefined, {\n upgrade: true,\n isLibrary: true,\n usePipx: false,\n })\n await setupPipPackWithPython(foundPython, \"wheel\", undefined, { upgrade: true, isLibrary: true, usePipx: false })\n } catch (err) {\n warning(`Failed to install setuptools or wheel: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\nasync function findOrSetupPython(version: string, setupDir: string, arch: string): Promise {\n let installInfo: InstallationInfo | undefined\n let foundPython = await findPython(setupDir)\n\n if (foundPython !== undefined) {\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } else {\n // if python is not found, try to install it\n if (GITHUB_ACTIONS) {\n // install python in GitHub Actions\n try {\n info(\"Installing python in GitHub Actions\")\n const { setupActionsPython } = await import(\"./actions_python.js\")\n await setupActionsPython(version, setupDir, arch)\n\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } catch (err) {\n warning((err as Error).toString())\n }\n }\n if (installInfo === undefined) {\n // install python via system package manager\n installInfo = await setupPythonSystem(setupDir, version)\n }\n }\n\n if (foundPython === undefined || installInfo.bin === undefined) {\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n installInfo = { bin: foundPython, installDir: dirname(foundPython), binDir: dirname(foundPython) }\n }\n\n return installInfo\n}\n\nasync function setupPythonSystem(setupDir: string, version: string) {\n let installInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (setupDir) {\n await setupChocoPack(\"python3\", version, [`--params=/InstallDir:${setupDir}`])\n } else {\n await setupChocoPack(\"python3\", version)\n }\n // Adding the bin dir to the path\n const bin = await findPython(setupDir)\n if (bin === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(bin)\n /** The directory which the tool is installed to */\n await addPath(binDir, rcOptions)\n installInfo = { installDir: binDir, binDir, bin }\n break\n }\n case \"darwin\": {\n installInfo = await installBrewPack(\"python3\", version)\n // add the python and pip binaries to the path\n const brewPythonPrefix: {\n stdout: string\n stderr: string\n } = await execa(\"brew\", [\"--prefix\", \"python\"], { stdio: \"pipe\" })\n const brewPythonBin = join(brewPythonPrefix.stdout, \"libexec\", \"bin\")\n await addPath(brewPythonBin, rcOptions)\n\n break\n }\n case \"linux\": {\n if (isArch()) {\n installInfo = await setupPacmanPack(\"python\", version)\n } else if (hasDnf()) {\n installInfo = await setupDnfPack([{ name: \"python3\", version }])\n } else if (isUbuntu()) {\n installInfo = await installAptPack([{ name: \"python3\", version }, { name: \"python-is-python3\" }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n break\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n return installInfo\n}\n\nasync function findPython(binDir?: string) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, binDir)\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n\n // On Windows, search in C:\\PythonXX\n if (process.platform === \"win32\") {\n const rootDir = pathParse(homedir()).root\n // find all directories in rootDir using readdir\n const pythonDirs = (await readdir(rootDir)).filter((dir) => dir.startsWith(\"Python\"))\n\n for (const pythonDir of pythonDirs) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, join(rootDir, pythonDir))\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n }\n }\n\n return undefined\n}\n\nasync function isPythonUpToDate(candidate: string, binDir?: string) {\n try {\n if (binDir !== undefined) {\n const pythonBinPath = join(binDir, addExeExt(candidate))\n if (await pathExists(pythonBinPath)) {\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pythonBinPaths = (await which(candidate, { nothrow: true, all: true })) ?? []\n for (const pythonBinPath of pythonBinPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function findOrSetupPip(foundPython: string) {\n const maybePip = await findPip()\n\n if (maybePip === undefined) {\n // install pip if not installed\n info(\"pip was not found. Installing pip\")\n await setupPip(foundPython)\n return findPip() // recurse to check if pip is on PATH and up-to-date\n }\n\n return maybePip\n}\n\nasync function findPip() {\n for (const pipCandidate of [\"pip3\", \"pip\"]) {\n // eslint-disable-next-line no-await-in-loop\n const maybePip = await isPipUptoDate(pipCandidate)\n if (maybePip !== undefined) {\n return maybePip\n }\n }\n return undefined\n}\n\nasync function isPipUptoDate(pip: string) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pipPaths = (await which(pip, { nothrow: true, all: true })) ?? []\n for (const pipPath of pipPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pipPath, MinVersions.pip!)) {\n return pipPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function setupPip(foundPython: string) {\n const upgraded = await ensurePipUpgrade(foundPython)\n if (!upgraded) {\n // ensure that pip is installed on Linux (happens when python is found but pip not installed)\n await setupPipPackSystem(\"pip\")\n\n // upgrade pip\n await ensurePipUpgrade(foundPython)\n }\n}\n\nasync function ensurePipUpgrade(foundPython: string) {\n try {\n await execa(foundPython, [\"-m\", \"ensurepip\", \"-U\", \"--upgrade\"], { stdio: \"inherit\" })\n return true\n } catch (err1) {\n info((err1 as Error).toString())\n try {\n // ensure pip is disabled on Ubuntu\n await execa(foundPython, [\"-m\", \"pip\", \"install\", \"--upgrade\", \"pip\"], { stdio: \"inherit\" })\n return true\n } catch (err2) {\n info((err2 as Error).toString())\n // pip module not found\n }\n }\n // all methods failed\n return false\n}\n\nasync function addPythonBaseExecPrefix_(python: string) {\n const dirs: string[] = []\n\n // detection based on the platform\n if (process.platform === \"linux\") {\n dirs.push(\"/home/runner/.local/bin/\")\n } else if (process.platform === \"darwin\") {\n dirs.push(\"/usr/local/bin/\")\n }\n\n // detection using python.sys\n const base_exec_prefix = (await getExecOutput(`${python} -c \"import sys;print(sys.base_exec_prefix);\"`)).stdout.trim()\n // any of these are possible depending on the operating system!\n dirs.push(join(base_exec_prefix, \"Scripts\"), join(base_exec_prefix, \"Scripts\", \"bin\"), join(base_exec_prefix, \"bin\"))\n\n // remove duplicates\n return unique(dirs)\n}\n\n/**\n * Add the base exec prefix to the PATH. This is required for Conan, Meson, etc. to work properly.\n *\n * The answer is cached for subsequent calls\n */\nexport const addPythonBaseExecPrefix = memoize(addPythonBaseExecPrefix_, { promise: true })\n","import type { Opts } from \"../cli-options.js\"\nimport type { Inputs } from \"../tool.js\"\nimport { DefaultUbuntuVersion, DefaultVersions } from \"./default_versions.js\"\n\n/** Get the default version if passed true or undefined, otherwise return the version itself */\nexport function getVersion(name: string, version: string | undefined, osVersion: number[] | null = null) {\n if (isVersionDefault(version) && process.platform === \"linux\" && osVersion !== null && name in DefaultUbuntuVersion) {\n return getDefaultLinuxVersion(osVersion, DefaultUbuntuVersion[name]!)\n } else if (isVersionDefault(version) && name in DefaultVersions) {\n return DefaultVersions[name] ?? \"\"\n } else if (version === \"true\") {\n return \"\"\n }\n return version ?? \"\"\n}\n\nfunction isVersionDefault(version: string | undefined) {\n return version === \"true\" || version === undefined\n}\n\n/// choose the default linux version based on ubuntu version\nfunction getDefaultLinuxVersion(osVersion: number[], toolLinuxVersions: Record) {\n const osVersionMaj = osVersion[0]\n\n // find which version block the os version is in\n const satisfyingVersion = Object.keys(toolLinuxVersions)\n .map((v) => Number.parseInt(v, 10))\n .sort((a, b) => b - a) // sort in descending order\n .find((v) => osVersionMaj >= v)\n\n return satisfyingVersion === undefined ? \"\" : toolLinuxVersions[satisfyingVersion]\n}\n\n/**\n * Sync the versions for the given inputs\n *\n * If the return is false, it means that versions don't match the target version\n */\nexport function syncVersions(opts: Opts, tools: Inputs[]): boolean {\n const toolsInUse = tools.filter((tool) => opts[tool] !== undefined)\n const toolsNonDefaultVersion = toolsInUse.filter((tool) => !isVersionDefault(opts[tool]))\n\n const targetVersion = toolsNonDefaultVersion.length >= 1 ? opts[toolsNonDefaultVersion[0]] : \"true\"\n\n if (toolsNonDefaultVersion.some((tool) => opts[tool] !== targetVersion)) {\n // error if any explicit versions don't match the target version\n return false\n }\n\n for (const tool of toolsInUse) {\n opts[tool] = targetVersion\n }\n\n return true\n}\n","import os from \"os\"\nimport { warning } from \"ci-log\"\nimport memoize from \"memoizee\"\nimport { installAptPack } from \"setup-apt\"\nimport { getUbuntuVersion } from \"ubuntu-version\"\nimport which from \"which\"\nimport { isUbuntu } from \"./isUbuntu.js\"\n\nasync function ubuntuVersion_(): Promise {\n try {\n if (isUbuntu()) {\n try {\n if (which.sync(\"lsb_release\", { nothrow: true }) === null) {\n await installAptPack([{ name: \"lsb-release\" }])\n }\n } catch {\n return detectUsingOsVersion()\n }\n\n const versionSplitted = await getUbuntuVersion()\n\n if (versionSplitted.length === 0) {\n return detectUsingOsVersion()\n }\n\n return versionSplitted\n } else {\n return null\n }\n } catch (err) {\n warning((err as Error).toString())\n return null\n }\n}\n\n/** Detect Ubuntu version */\nexport const ubuntuVersion = memoize(ubuntuVersion_, { promise: true })\n\n/** Detect Ubuntu version using os.version() for Ubuntu based distros */\nfunction detectUsingOsVersion() {\n if (!(\"version\" in os && typeof os.version === \"function\")) {\n return null\n }\n\n // #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2\n const osVersion: string = os.version()\n // parse the version\n const versionMatch = osVersion.match(/(\\d+)\\.(\\d+)\\.(\\d+)/)\n if (versionMatch === null) {\n return null\n }\n\n const majorVersion = Number.parseInt(versionMatch[1], 10)\n const minorVersion = Number.parseInt(versionMatch[2], 10)\n const patchVersion = Number.parseInt(versionMatch[3], 10)\n\n return [majorVersion, minorVersion, patchVersion]\n}\n","import { dirname, join } from \"path\"\nimport { info } from \"@actions/core\"\nimport { addPath } from \"envosman\"\nimport { execa, execaSync } from \"execa\"\nimport memoize from \"memoizee\"\nimport { mkdirp } from \"mkdirp\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport { addPythonBaseExecPrefix, setupPython } from \"../../python/python.js\"\nimport { getVersion } from \"../../versions/versions.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../env/ubuntu_version.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\n\nexport type SetupPipPackOptions = {\n /** Whether to use pipx instead of pip */\n usePipx?: boolean\n /** Whether to install the package as a user */\n user?: boolean\n /** Whether to upgrade the package */\n upgrade?: boolean\n /** Whether the package is a library */\n isLibrary?: boolean\n}\n\n/** A function that installs a package using pip */\nexport async function setupPipPack(\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n return setupPipPackWithPython(await getPython(), name, version, options)\n}\n\nexport async function setupPipPackWithPython(\n givenPython: string,\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n const { usePipx = true, user = true, upgrade = false, isLibrary = false } = options\n\n const isPipx = usePipx && !isLibrary && (await hasPipx(givenPython))\n const pip = isPipx ? \"pipx\" : \"pip\"\n\n const hasPackage = await pipHasPackage(givenPython, name)\n if (hasPackage) {\n try {\n info(`Installing ${name} ${version ?? \"\"} via ${pip}`)\n\n const nameAndVersion = version !== undefined && version !== \"\" ? `${name}==${version}` : name\n const upgradeFlag = upgrade ? (isPipx ? [\"upgrade\"] : [\"install\", \"--upgrade\"]) : [\"install\"]\n const userFlag = !isPipx && user ? [\"--user\"] : []\n\n const env = process.env\n\n if (isPipx && user) {\n // install to user home\n env.PIPX_HOME = await getPipxHome()\n env.PIPX_BIN_DIR = await getPipxBinDir()\n }\n\n execaSync(givenPython, [\"-m\", pip, ...upgradeFlag, ...userFlag, nameAndVersion], {\n stdio: \"inherit\",\n env,\n })\n } catch (err) {\n info(`Failed to install ${name} via ${pip}: ${err}.`)\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} via ${pip}: ${err}.`)\n }\n }\n } else {\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} as it was not found via ${pip} or the system package manager`)\n }\n }\n\n const execPaths = await addPythonBaseExecPrefix(givenPython)\n const binDir = await findBinDir(execPaths, name)\n\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n\nexport async function hasPipx(givenPython: string) {\n return (await execa(givenPython, [\"-m\", \"pipx\", \"--help\"], { stdio: \"ignore\", reject: false })).exitCode === 0\n}\n\nasync function getPipxHome_() {\n let pipxHome = process.env.PIPX_HOME\n if (pipxHome !== undefined) {\n return pipxHome\n }\n\n // Based on https://pipx.pypa.io/stable/installation/\n const compatHome = untildifyUser(\"~/.local/pipx\")\n if (await pathExists(compatHome)) {\n return compatHome\n }\n\n switch (process.platform) {\n case \"win32\": {\n pipxHome = untildifyUser(\"~/AppData/Local/pipx\")\n break\n }\n case \"darwin\": {\n pipxHome = untildifyUser(\"~/Library/Application Support/pipx\")\n break\n }\n default: {\n pipxHome = untildifyUser(\"~/.local/share/pipx\")\n break\n }\n }\n\n await mkdirp(pipxHome)\n await mkdirp(join(pipxHome, \"trash\"))\n await mkdirp(join(pipxHome, \"shared\"))\n await mkdirp(join(pipxHome, \"venv\"))\n return pipxHome\n}\nconst getPipxHome = memoize(getPipxHome_, { promise: true })\n\nasync function getPipxBinDir_() {\n if (process.env.PIPX_BIN_DIR !== undefined) {\n return process.env.PIPX_BIN_DIR\n }\n\n const pipxBinDir = untildifyUser(\"~/.local/bin\")\n await addPath(pipxBinDir, rcOptions)\n await mkdirp(pipxBinDir)\n return pipxBinDir\n}\nconst getPipxBinDir = memoize(getPipxBinDir_, { promise: true })\n\nasync function getPython_(): Promise {\n const pythonBin = (await setupPython(getVersion(\"python\", undefined, await ubuntuVersion()), \"\", process.arch)).bin\n if (pythonBin === undefined) {\n throw new Error(\"Python binary was not found\")\n }\n return pythonBin\n}\nconst getPython = memoize(getPython_, { promise: true })\n\nasync function pipHasPackage(python: string, name: string) {\n const result = await execa(python, [\"-m\", \"pip\", \"-qq\", \"index\", \"versions\", name], {\n stdio: \"ignore\",\n reject: false,\n })\n return result.exitCode === 0\n}\n\nasync function findBinDir(dirs: string[], name: string) {\n const exists = await Promise.all(dirs.map((dir) => pathExists(join(dir, addExeExt(name)))))\n const dirIndex = exists.findIndex((exist) => exist)\n if (dirIndex !== -1) {\n const foundDir = dirs[dirIndex]\n return foundDir\n }\n\n const whichDir = which.sync(addExeExt(name), { nothrow: true })\n if (whichDir !== null) {\n return dirname(whichDir)\n }\n\n return dirs[dirs.length - 1]\n}\n\nexport function setupPipPackSystem(name: string, addPythonPrefix = true) {\n if (process.platform === \"linux\") {\n info(`Installing ${name} via the system package manager`)\n if (isArch()) {\n return setupPacmanPack(addPythonPrefix ? `python-${name}` : name)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n }\n } else if (process.platform === \"darwin\") {\n return installBrewPack(name)\n }\n return null\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupGraphviz(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"graphviz\", version)\n return activateGraphviz()\n }\n case \"darwin\": {\n return installBrewPack(\"graphviz\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"graphviz\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"graphviz\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"graphviz\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateGraphviz(): Promise {\n switch (process.platform) {\n case \"win32\": {\n const binDir = \"C:/Program Files/Graphviz/bin\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { join } from \"path\"\n\nexport async function setupDmg(path: string, destDir: string) {\n const { ArchiveHdi } = await import(\"@shockpkg/archive-files/esm/archive/hdi.mjs\")\n\n const dmg = new ArchiveHdi(path)\n await dmg.read(async (entry) => {\n await entry.extract(join(destDir, entry.path))\n })\n}\n","import { join } from \"path\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { setupGraphviz } from \"../graphviz/graphviz.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { macosVersion } from \"../utils/env/macos_version.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { setupDmg } from \"../utils/setup/setupDmg.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n/** Get the platform data for cmake */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch: string): PackageInfo {\n switch (platform) {\n case \"linux\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.linux.bin.tar.gz`,\n }\n }\n case \"win32\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.windows.x64.bin.zip`,\n }\n }\n case \"darwin\": {\n const folderName = `Doxygen-${version}`\n return {\n binRelativeDir: \"Doxygen/Doxygen.app/Contents/Resources/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n extractFunction: setupDmg,\n url: `https://doxygen.nl/files/${folderName}.dmg`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupDoxygen(version: string, setupDir: string, arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // try to download the package 4 times with 2 seconds delay\n await retry(\n () => {\n return setupChocoPack(\"doxygen.install\", version)\n },\n { name: \"doxygen.install\", max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n const binDir = await activateWinDoxygen()\n const installationInfo = { binDir }\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n return installationInfo\n }\n case \"darwin\": {\n // let installationInfo: InstallationInfo\n // try {\n // installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n // } catch {\n const installationInfo = await installBrewPack(\"doxygen\", undefined)\n // }\n\n // only install graphviz if the macOS version is greater than 11\n if (macosVersion()[0] > 11) {\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n }\n return installationInfo\n }\n case \"linux\": {\n let installationInfo: InstallationInfo\n if (version === \"\" || isArch() || hasDnf()) {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"doxygen\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"doxygen\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([{ name: \"doxygen\", version }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n } else if (isUbuntu()) {\n try {\n // doxygen on stable Ubuntu repositories is very old. So, we use get the binary from the website itself\n installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n try {\n await installAptPack([{ name: \"libclang-cpp9\" }])\n } catch (err) {\n info(`Failed to download libclang-cpp9 that might be needed for running doxygen. ${err}`)\n }\n } catch (err) {\n notice(`Failed to download doxygen binary. ${err}. Falling back to apt-get.`)\n installationInfo = await installAptPack([{ name: \"doxygen\" }])\n }\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n await setupGraphviz(getVersion(\"graphviz\", undefined, await ubuntuVersion()), \"\", arch)\n return installationInfo\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinDoxygen() {\n switch (process.platform) {\n case \"win32\": {\n for (\n const binDir of [\n \"C:/ProgramData/chocolatey/bin\",\n \"C:/Program Files/doxygen/bin\",\n \"C:/Program Files (x86)/doxygen\",\n ]\n ) {\n // eslint-disable-next-line no-await-in-loop\n if (await pathExists(join(binDir, \"doxygen.exe\"))) {\n // eslint-disable-next-line no-await-in-loop\n await addPath(binDir, rcOptions)\n return binDir\n }\n }\n throw new Error(\"Failed to find doxygen binary\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { error } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupMacOSSDK() {\n if (process.platform === \"darwin\") {\n try {\n const xcrun = await getExecOutput(\"xcrun --sdk macosx --show-sdk-path\")\n const sdkroot = xcrun.stdout || xcrun.stderr\n if (sdkroot) {\n await addEnv(\"SDKROOT\", sdkroot.trim(), rcOptions)\n } else {\n error(\"SDKROOT not set\")\n }\n } catch (e) {\n error(e as Error | string)\n }\n }\n}\n","import { readFile } from \"fs/promises\"\n\n/**\n * The list of assets\n * @key tag The tag of the release\n * @value assets The names of the assets of the release\n */\nexport type Assets = Record\n\n/**\n * Load the list of assets from a json file\n */\nexport async function loadAssetList(path: string): Promise {\n const data = await readFile(path, \"utf-8\")\n return JSON.parse(data)\n}\n\ntype MatchAssetOpts = {\n version: string\n keywords?: string[]\n optionalKeywords?: string[]\n filterMapTag?: (tag: string) => string | undefined\n filterName?: (asset: string) => boolean\n}\n\n/**\n * Match the asset that matches the version and given keywords\n */\nexport function matchAsset(\n assets: Assets,\n opts: MatchAssetOpts,\n): { tag: string; name: string } | undefined {\n // get the list of versions\n const origTags = Object.keys(assets)\n\n // filter/map the tags\n const versionMap: Map = new Map()\n if (opts.filterMapTag === undefined) {\n for (const origTag of origTags) {\n versionMap.set(origTag, origTag)\n }\n } else {\n for (const origTag of origTags) {\n const mappedTag = opts.filterMapTag(origTag)\n if (mappedTag !== undefined) {\n versionMap.set(mappedTag, origTag)\n }\n }\n }\n\n if (versionMap.size === 0) {\n return undefined\n }\n\n // find the first tag that starts with the version\n // loop over the versions starting with the latest\n const candidateTags: string[] = []\n for (const [version, origTag] of versionMap.entries()) {\n if (version.startsWith(opts.version)) {\n candidateTags.push(origTag)\n }\n }\n\n if (candidateTags.length === 0) {\n return undefined\n }\n\n // Loop over the candidate tags and return the first one that has assets\n for (const candidateTag of candidateTags) {\n // get the list of assets\n let assetNames = assets[candidateTag]\n if (assetNames === undefined) {\n continue\n }\n\n // filter the assets\n if (opts.filterName !== undefined) {\n assetNames = assetNames.filter(opts.filterName)\n }\n\n if (assetNames.length === 0) {\n continue\n }\n\n // check if this version contains the keywords and optional keywords in the asset name\n const match = matchAssetName(candidateTag, assetNames, opts)\n if (match !== undefined) {\n return match\n }\n }\n\n return undefined\n}\n\nfunction matchAssetName(tag: string, assetNames: string[], opts: MatchAssetOpts) {\n // if no keywords are given, return the first asset\n if (\n (opts.keywords === undefined\n || opts.keywords.length === 0)\n && (opts.optionalKeywords === undefined\n || opts.optionalKeywords.length === 0)\n ) {\n return { tag, name: assetNames[0] }\n }\n\n // check if the asset contains all the keywords\n let candidates: string[] = []\n if (\n opts.keywords !== undefined\n && opts.keywords.length !== 0\n ) {\n for (const name of assetNames) {\n if (opts.keywords!.every((keyword) => name.includes(keyword))) {\n candidates.push(name)\n }\n }\n } else {\n candidates = assetNames\n }\n\n if (candidates.length === 0) {\n return undefined\n }\n\n // prefer the candidates that contain more optional keywords\n if (\n opts.optionalKeywords !== undefined\n && opts.optionalKeywords.length !== 0\n ) {\n // rate the candidates based on the number of optional keywords they contain\n const candidateScores = candidates.map((name) => {\n let score = 0\n for (const keyword of opts.optionalKeywords!) {\n if (name.includes(keyword)) {\n score++\n }\n }\n return score\n })\n\n // find the candidate with the highest score\n const maxScore = Math.max(...candidateScores)\n const maxIndex = candidateScores.indexOf(maxScore)\n return { tag, name: candidates[maxIndex] }\n }\n\n // return the first candidate if no optional keywords are given\n return { tag, name: candidates[0] }\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { addEnv, addPath } from \"envosman\"\nimport { type ExecaReturnValue, execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverMajor from \"semver/functions/major\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { extract7Zip } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { compareVersion } from \"../utils/setup/version.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nasync function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: string): Promise {\n switch (platform) {\n case \"win32\": {\n const mingwAssets = await loadAssetList(\n join(dirname, \"github_brechtsanders_winlibs_mingw.json\"),\n )\n\n const mingwArchMap = {\n x64: \"x86_64\",\n ia32: \"i386\",\n } as Record\n\n const asset = matchAsset(\n mingwAssets,\n {\n version,\n keywords: [\n mingwArchMap[arch] ?? arch,\n ],\n },\n )\n\n if (asset === undefined) {\n throw new Error(`No asset found for version ${version} and arch ${arch}`)\n }\n\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"g++\"),\n extractedFolderName: \"mingw64\",\n extractFunction: extract7Zip,\n url: `https://github.com/brechtsanders/winlibs_mingw/releases/download/${asset.tag}/${asset.name}`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupGcc(version: string, setupDir: string, arch: string, priority: number = 40) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (arch === \"arm\" || arch === \"arm64\") {\n await setupChocoPack(\"gcc-arm-embedded\", version)\n }\n try {\n installationInfo = await setupBin(\"g++\", version, getGccPackageInfo, setupDir, arch)\n } catch (err) {\n info(`Failed to download g++ binary. ${err}. Falling back to chocolatey.`)\n installationInfo = await setupChocoMingw(version, arch)\n }\n break\n }\n case \"darwin\": {\n installationInfo = await installBrewPack(\"gcc\", version)\n break\n }\n case \"linux\": {\n if (arch === \"x64\") {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([\n { name: \"gcc\", version },\n { name: \"gcc-c++\", version },\n { name: \"libstdc++-devel\" },\n ])\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc\" }, { name: \"g++\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n {\n name: \"g++\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n }\n } else {\n info(`Install g++-multilib because gcc for ${arch} was requested`)\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc-multilib\", version)\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc-multilib\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([{\n name: \"gcc-multilib\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n }])\n }\n }\n }\n break\n }\n // TODO support bare-metal (need to support passing it as the input)\n // TODO support abi\n // case \"none\": {\n // if (arch === \"arm\" || arch === \"arm64\") {\n // return installAptPack(\"gcc-arm-none-eabi\", version, [\n // \"ppa:ubuntu-toolchain-r/test\",\n // ])\n // } else {\n // throw new Error(`Unsupported platform for ${arch}`)\n // }\n // }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n await activateGcc(version, installationInfo.binDir, priority)\n return installationInfo\n }\n return undefined\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMingw(version: string, setupDir: string, arch: string) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\":\n case \"darwin\": {\n return setupGcc(version, setupDir, arch)\n }\n case \"linux\": {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"mingw-w64-gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([{ name: \"mingw64-gcc\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([\n {\n name: \"mingw-w64\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n break\n }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n // TODO: setup alternatives and update CC/CXX env. ?\n // Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode\n // Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode\n // await activateGcc(version, installationInfo.binDir)\n return installationInfo\n }\n return undefined\n}\n\nasync function setupChocoMingw(version: string, arch: string): Promise {\n await setupChocoPack(\"mingw\", version)\n let binDir: string | undefined\n if (arch === \"x64\" && (await pathExists(\"C:/tools/mingw64/bin\"))) {\n binDir = \"C:/tools/mingw64/bin\"\n await addPath(binDir, rcOptions)\n } else if (arch === \"ia32\" && (await pathExists(\"C:/tools/mingw32/bin\"))) {\n binDir = \"C:/tools/mingw32/bin\"\n await addPath(binDir, rcOptions)\n } else if (await pathExists(`${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin/g++.exe`)) {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n if (binDir !== undefined) {\n return { binDir }\n }\n return undefined\n}\n\nasync function activateGcc(givenVersion: string, binDir: string, priority: number = 40) {\n const promises: Promise>[] = []\n // Setup gcc as the compiler\n\n // TODO\n // const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n // const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n // promises.push(\n // addEnv(\"LD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${ld}`, rcOptions),\n // addEnv(\"DYLD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${dyld}`, rcOptions),\n // addEnv(\"CPATH\", `${installDir}/lib/gcc/${majorVersion}/include`, rcOptions),\n // addEnv(\"LDFLAGS\", `-L${installDir}/lib`, rcOptions),\n // addEnv(\"CPPFLAGS\", `-I${installDir}/include`, rcOptions),\n // )\n\n if (process.platform === \"win32\") {\n promises.push(\n addEnv(\"CC\", addExeExt(`${binDir}/gcc`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${binDir}/g++`), rcOptions),\n )\n } else {\n // if version is empty, get the version from the gcc command\n let version = givenVersion\n if (givenVersion === \"\") {\n version = await getGccCmdVersion(binDir, version)\n info(`Using gcc version ${version}`)\n }\n\n const majorVersion = semverMajor(semverCoerce(version) ?? version)\n if (majorVersion >= 5) {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${majorVersion}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${majorVersion}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n )\n }\n } else {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${version}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${version}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${version}`, rcOptions, priority),\n )\n }\n }\n }\n\n promises.push(setupMacOSSDK())\n\n if (GITHUB_ACTIONS) {\n await addGccLoggingMatcher()\n }\n\n await Promise.all(promises)\n}\n\nasync function getGccCmdVersion(binDir: string, givenVersion: string) {\n // TODO get the version from the package manager\n try {\n let gccExe = \"gcc\"\n if (await pathExists(`${binDir}/gcc`)) {\n gccExe = `${binDir}/gcc`\n } else {\n // try to find the gcc exe in the bin dir\n const files = (await readdir(binDir)).sort(\n (exe1, exe2) => {\n const version1 = exe1.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n const version2 = exe2.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n return compareVersion(version1, version2)\n },\n )\n for (const file of files) {\n if (file.startsWith(\"gcc\")) {\n gccExe = `${binDir}/${file}`\n break\n }\n }\n }\n\n const { stdout: versionStdout } = await execa(gccExe, [\"--version\"], { stdio: \"pipe\" })\n\n // gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\n // gcc-12 (Homebrew GCC 12.4.0) 12.4.0\n // gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0\n\n const versionMatch = (versionStdout as string).match(/gcc.* \\(.*\\) ([\\d.]+)/)\n\n if (versionMatch !== null) {\n return versionMatch[1]\n }\n\n warning(`Failed to parse gcc version from: ${versionStdout}`)\n return givenVersion\n } catch (err) {\n error(`Failed to get gcc version: ${err}`)\n return givenVersion\n }\n}\n\nasync function addGccLoggingMatcher() {\n const matcherPath = join(dirname, \"gcc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the gcc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addExeExt } from \"patha\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name Ninja uses in their download links */\nfunction getNinjaPlatformArch(platform: NodeJS.Platform, arch: string) {\n switch (platform) {\n case \"win32\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"win\"\n : arm64.includes(arch)\n ? \"winarm64\"\n : \"win\"\n case \"darwin\":\n return \"mac\"\n case \"linux\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"linux\"\n : arm64.includes(arch)\n ? \"linux-aarch64\"\n : \"linux\"\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Get the platform data for ninja */\nfunction getNinjaPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const ninjaPlatform = getNinjaPlatformArch(platform, arch)\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"ninja\"),\n extractedFolderName: \"\",\n url: `https://github.com/ninja-build/ninja/releases/download/v${version}/ninja-${ninjaPlatform}.zip`,\n }\n}\n\nexport function setupNinja(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"ninja\", version, getNinjaPackageInfo, setupDir, arch)\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { setupCmake } from \"../cmake/cmake.js\"\nimport { setupNinja } from \"../ninja/ninja.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractTarByExe } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { addVPrefix, removeVPrefix } from \"../utils/setup/version.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nfunction getDownloadKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/releases/download/${version}/kcov-amd64.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"usr/local/bin\",\n binFileName: addExeExt(\"kcov\"),\n }\n}\n\nfunction getBuildKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/archive/refs/tags/${version}.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"build/src\",\n binFileName: addExeExt(\"kcov\"),\n extractFunction: buildKcov,\n }\n}\n\nasync function buildKcov(file: string, dest: string) {\n const out = await extractTarByExe(file, dest, 1)\n\n // build after extraction using CMake\n const cmake = await getCmake()\n\n if (process.platform === \"linux\") {\n if (isArch()) {\n await Promise.all([setupPacmanPack(\"libdwarf\"), setupPacmanPack(\"libcurl-openssl\")])\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"libdwarf-devel\" }, { name: \"libcurl-devel\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libdw-dev\" }, { name: \"libcurl4-openssl-dev\" }])\n }\n }\n\n // apply gcc13.patch\n try {\n if (which.sync(\"patch\", { nothrow: true }) !== null) {\n const patch = join(dirname, \"gcc13.patch\")\n await execa(\"patch\", [\"-N\", \"-p1\", \"-i\", patch], { cwd: out, stdio: \"inherit\" })\n } else {\n info(\"`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13\")\n }\n } catch {\n // ignore\n }\n\n const buildDir = join(out, \"build\")\n await execa(cmake, [\"-S\", out, \"-B\", buildDir, \"-DCMAKE_BUILD_TYPE=Release\", \"-G\", \"Ninja\"], {\n cwd: out,\n stdio: \"inherit\",\n })\n await execa(cmake, [\"--build\", buildDir, \"--config\", \"Release\"], { cwd: out, stdio: \"inherit\" })\n // execRootSync(cmake, [\"--install\", buildDir], out)\n // return \"user/local/bin\" // the cmake install prefix\n return out\n}\n\nasync function getCmake() {\n let cmake = which.sync(\"cmake\", { nothrow: true })\n if (cmake === null) {\n const { binDir } = await setupCmake(\n getVersion(\"cmake\", undefined, await ubuntuVersion()),\n join(untildifyUser(\"~\"), \"cmake\"),\n \"\",\n )\n cmake = join(binDir, \"cmake\")\n }\n const ninja = which.sync(\"ninja\", { nothrow: true })\n if (ninja === null) {\n await setupNinja(getVersion(\"ninja\", undefined, await ubuntuVersion()), join(untildifyUser(\"~\"), \"ninja\"), \"\")\n }\n return cmake\n}\n\nexport async function setupKcov(versionGiven: string, setupDir: string, arch: string) {\n if (process.platform !== \"linux\") {\n info(\"Kcov is not supported on non-linux\")\n return\n }\n\n // parse version\n const versionSplit = versionGiven.split(\"-\")\n let version = addVPrefix(versionSplit[0])\n const installMethod = versionSplit[1] as \"binary\" | undefined\n const version_number = removeVPrefix(version)\n // fix inconsistency in tagging\n if (version_number === 38) {\n version = \"v38\"\n }\n\n let installationInfo: InstallationInfo\n if (installMethod === \"binary\" && version_number >= 39) {\n installationInfo = await setupBin(\"kcov\", version, getDownloadKcovPackageInfo, setupDir, arch)\n if (isArch()) {\n await setupPacmanPack(\"binutils\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"binutils\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libbinutils\" }])\n }\n return installationInfo\n } else {\n installationInfo = await setupBin(\"kcov\", version, getBuildKcovPackageInfo, setupDir, arch)\n }\n return installationInfo\n}\n","const core = require('@actions/core')\nconst child_process = require('child_process')\nconst fs = require('fs')\nconst path = require('path')\nconst process = require('process')\n\nconst PROGRAM_FILES_X86 = process.env['ProgramFiles(x86)']\nconst PROGRAM_FILES = [process.env['ProgramFiles(x86)'], process.env['ProgramFiles']]\n\n\nconst EDITIONS = ['Enterprise', 'Professional', 'Community', 'BuildTools']\nconst YEARS = ['2022', '2019', '2017']\n\nconst VsYearVersion = {\n '2022': '17.0',\n '2019': '16.0',\n '2017': '15.0',\n '2015': '14.0',\n '2013': '12.0',\n}\n\n/**\n * Convert the vs version (e.g. 2022) or year (e.g. 17.0) to the version number (e.g. 17.0)\n * @param {string | undefined} vsversion the year (e.g. 2022) or version number (e.g. 17.0)\n * @returns {string | undefined} the version number (e.g. 17.0)\n */\nfunction vsversion_to_versionnumber(vsversion) {\n if (Object.values(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n if (vsversion in VsYearVersion) {\n return VsYearVersion[vsversion]\n }\n }\n return vsversion\n}\nexports.vsversion_to_versionnumber = vsversion_to_versionnumber\n\n/**\n * Convert the vs version (e.g. 17.0) or year (e.g. 2022) to the year (e.g. 2022)\n * @param {string} vsversion the version number (e.g. 17.0) or year (e.g. 2022)\n * @returns {string} the year (e.g. 2022)\n */\nfunction vsversion_to_year(vsversion) {\n if (Object.keys(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n for (const [year, ver] of Object.entries(VsYearVersion)) {\n if (ver === vsversion) {\n return year\n }\n }\n }\n return vsversion\n}\nexports.vsversion_to_year = vsversion_to_year\n\nconst VSWHERE_PATH = `${PROGRAM_FILES_X86}\\\\Microsoft Visual Studio\\\\Installer`\n\n/**\n * Find MSVC tools with vswhere\n * @param {string} pattern the pattern to search for\n * @param {string} version_pattern the version pattern to search for\n * @returns {string | null} the path to the found MSVC tools\n */\nfunction findWithVswhere(pattern, version_pattern) {\n try {\n let installationPath = child_process.execSync(`vswhere -products * ${version_pattern} -prerelease -property installationPath`).toString().trim()\n return installationPath + '\\\\' + pattern\n } catch (e) {\n core.warning(`vswhere failed: ${e}`)\n }\n return null\n}\nexports.findWithVswhere = findWithVswhere\n\n/**\n * Find the vcvarsall.bat file for the given Visual Studio version\n * @param {string | undefined} vsversion the version of Visual Studio to find (year or version number)\n * @returns {string} the path to the vcvarsall.bat file\n */\nfunction findVcvarsall(vsversion) {\n const vsversion_number = vsversion_to_versionnumber(vsversion)\n let version_pattern\n if (vsversion_number) {\n const upper_bound = vsversion_number.split('.')[0] + '.9'\n version_pattern = `-version \"${vsversion_number},${upper_bound}\"`\n } else {\n version_pattern = \"-latest\"\n }\n\n // If vswhere is available, ask it about the location of the latest Visual Studio.\n let path = findWithVswhere('VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat', version_pattern)\n if (path && fs.existsSync(path)) {\n core.info(`Found with vswhere: ${path}`)\n return path\n }\n core.info(\"Not found with vswhere\")\n\n // If that does not work, try the standard installation locations,\n // starting with the latest and moving to the oldest.\n const years = vsversion ? [vsversion_to_year(vsversion)] : YEARS\n for (const prog_files of PROGRAM_FILES) {\n for (const ver of years) {\n for (const ed of EDITIONS) {\n path = `${prog_files}\\\\Microsoft Visual Studio\\\\${ver}\\\\${ed}\\\\VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat`\n core.info(`Trying standard location: ${path}`)\n if (fs.existsSync(path)) {\n core.info(`Found standard location: ${path}`)\n return path\n }\n }\n }\n }\n core.info(\"Not found in standard locations\")\n\n // Special case for Visual Studio 2015 (and maybe earlier), try it out too.\n path = `${PROGRAM_FILES_X86}\\\\Microsoft Visual C++ Build Tools\\\\vcbuildtools.bat`\n if (fs.existsSync(path)) {\n core.info(`Found VS 2015: ${path}`)\n return path\n }\n core.info(`Not found in VS 2015 location: ${path}`)\n\n throw new Error('Microsoft Visual Studio not found')\n}\nexports.findVcvarsall = findVcvarsall\n\nfunction isPathVariable(name) {\n const pathLikeVariables = ['PATH', 'INCLUDE', 'LIB', 'LIBPATH']\n return pathLikeVariables.indexOf(name.toUpperCase()) != -1\n}\n\nfunction filterPathValue(path) {\n let paths = path.split(';')\n // Remove duplicates by keeping the first occurance and preserving order.\n // This keeps path shadowing working as intended.\n function unique(value, index, self) {\n return self.indexOf(value) === index\n }\n return paths.filter(unique).join(';')\n}\n\n/**\n * Setup MSVC Developer Command Prompt\n * @param {string} arch - Target architecture\n * @param {string | undefined} sdk - Windows SDK number to build for\n * @param {string | undefined} toolset - VC++ compiler toolset version\n * @param {boolean | 'true' | 'false' | undefined} uwp - Build for Universal Windows Platform\n * @param {boolean | 'true' | 'false' | undefined} spectre - Enable Spectre mitigations\n * @param {string | undefined} vsversion - The Visual Studio version to use. This can be the version number (e.g. 16.0 for 2019) or the year (e.g. \"2019\").\n */\nfunction setupMSVCDevCmd(arch, sdk, toolset, uwp, spectre, vsversion) {\n if (process.platform != 'win32') {\n core.info('This is not a Windows virtual environment, bye!')\n return\n }\n\n // Add standard location of \"vswhere\" to PATH, in case it's not there.\n process.env.PATH += path.delimiter + VSWHERE_PATH\n\n // There are all sorts of way the architectures are called. In addition to\n // values supported by Microsoft Visual C++, recognize some common aliases.\n let arch_aliases = {\n \"win32\": \"x86\",\n \"win64\": \"x64\",\n \"x86_64\": \"x64\",\n \"x86-64\": \"x64\",\n }\n // Ignore case when matching as that's what humans expect.\n if (arch.toLowerCase() in arch_aliases) {\n arch = arch_aliases[arch.toLowerCase()]\n }\n\n // Due to the way Microsoft Visual C++ is configured, we have to resort to the following hack:\n // Call the configuration batch file and then output *all* the environment variables.\n\n var args = [arch]\n\n if (uwp && JSON.parse(uwp) === true) {\n args.push('uwp')\n }\n if (sdk) {\n args.push(sdk)\n }\n if (toolset) {\n args.push(`-vcvars_ver=${toolset}`)\n }\n if (spectre && JSON.parse(spectre) === true) {\n args.push('-vcvars_spectre_libs=spectre')\n }\n\n const vcvars = `\"${findVcvarsall(vsversion)}\" ${args.join(' ')}`\n core.debug(`vcvars command-line: ${vcvars}`)\n\n const cmd_output_string = child_process.execSync(`set && cls && ${vcvars} && cls && set`, {shell: \"cmd\"}).toString()\n const cmd_output_parts = cmd_output_string.split('\\f')\n\n const old_environment = cmd_output_parts[0].split('\\r\\n')\n const vcvars_output = cmd_output_parts[1].split('\\r\\n')\n const new_environment = cmd_output_parts[2].split('\\r\\n')\n\n // If vsvars.bat is given an incorrect command line, it will print out\n // an error and *still* exit successfully. Parse out errors from output\n // which don't look like environment variables, and fail if appropriate.\n const error_messages = vcvars_output.filter((line) => {\n if (line.match(/^\\[ERROR.*\\]/)) {\n // Don't print this particular line which will be confusing in output.\n if (!line.match(/Error in script usage. The correct usage is:$/)) {\n return true\n }\n }\n return false\n })\n if (error_messages.length > 0) {\n throw new Error('invalid parameters' + '\\r\\n' + error_messages.join('\\r\\n'))\n }\n\n // Convert old environment lines into a dictionary for easier lookup.\n let old_env_vars = {}\n for (let string of old_environment) {\n const [name, value] = string.split('=')\n old_env_vars[name] = value\n }\n\n // Now look at the new environment and export everything that changed.\n // These are the variables set by vsvars.bat. Also export everything\n // that was not there during the first sweep: those are new variables.\n core.startGroup('Environment variables')\n for (let string of new_environment) {\n // vsvars.bat likes to print some fluff at the beginning.\n // Skip lines that don't look like environment variables.\n if (!string.includes('=')) {\n continue;\n }\n let [name, new_value] = string.split('=')\n let old_value = old_env_vars[name]\n // For new variables \"old_value === undefined\".\n if (new_value !== old_value) {\n core.info(`Setting ${name}`)\n // Special case for a bunch of PATH-like variables: vcvarsall.bat\n // just prepends its stuff without checking if its already there.\n // This makes repeated invocations of this action fail after some\n // point, when the environment variable overflows. Avoid that.\n if (isPathVariable(name)) {\n new_value = filterPathValue(new_value)\n }\n core.exportVariable(name, new_value)\n }\n }\n core.endGroup()\n\n core.info(`Configured Developer Command Prompt`)\n}\nexports.setupMSVCDevCmd = setupMSVCDevCmd\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { setupMSVCDevCmd } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { rcOptions } from \"../cli-options.js\"\n\nfunction getArch(arch: string): string {\n switch (arch) {\n case \"x32\":\n case \"32\":\n case \"ia32\": {\n return \"x86\"\n }\n case \"64\": {\n return \"x64\"\n }\n default: {\n return arch\n }\n }\n}\n\nexport async function setupVCVarsall(\n vsversion: string,\n VCTargetsPath: string | undefined,\n arch: string,\n toolset: string | undefined,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (VCTargetsPath !== undefined && (await pathExists(VCTargetsPath))) {\n info(`Adding ${VCTargetsPath} to PATH`)\n await addEnv(\"VCTargetsPath\", VCTargetsPath, rcOptions)\n }\n\n await setupMSVCDevCmd(getArch(arch), sdk, toolset, uwp, spectre, vsversion)\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error } from \"ci-log\"\nimport pTimeout from \"p-timeout\"\nimport { setupBrew } from \"setup-brew\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { type ToolName, setups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\nexport const DEFAULT_TIMEOUT = 20 * 60 * 1000 // 20 minutes\n\nexport async function installTool(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n errorMessages: string[],\n timeout: number = DEFAULT_TIMEOUT,\n) {\n startGroup(`Installing ${tool} ${version}`)\n try {\n await pTimeout(installToolImpl(tool, version, osVersion, arch, setupCppDir, successMessages), {\n milliseconds: timeout,\n message: `Timeout while installing ${tool} ${version}. You can increase the timeout from options`,\n })\n } catch (e) {\n // push error message to the logger\n error(e as string | Error)\n if (e instanceof Error && e.stack !== undefined) {\n error(e.stack)\n }\n errorMessages.push(`${tool} failed to install`)\n }\n endGroup()\n}\n\nasync function installToolImpl(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n) {\n const hasLLVM = [\"llvm\", \"clangformat\", \"clangtidy\"].includes(tool)\n\n let installationInfo: InstallationInfo | undefined | void\n if (tool === \"vcvarsall\") {\n // eslint-disable-next-line no-await-in-loop\n await setupVCVarsall(getVersion(tool, version, osVersion), undefined, arch, undefined, undefined, false, false)\n } else if (tool === \"brew\") {\n // eslint-disable no-await-in-loop\n installationInfo = await setupBrew({ rcOptions })\n } else {\n // the tool installation directory (for the functions that ue it)\n const setupDir = join(setupCppDir, hasLLVM ? \"llvm\" : tool)\n\n const setupVersion = getVersion(tool, version, osVersion)\n\n // get the setup function\n const setupFunction = setups[tool]\n\n // eslint-disable no-await-in-loop\n installationInfo = await setupFunction(setupVersion, setupDir, arch)\n }\n // preparing a report string\n successMessages.push(getSuccessMessage(tool, installationInfo))\n}\n","export class TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new AbortError(errorMessage)\n\t: new DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined\n\t\t? getDOMException('This operation was aborted.')\n\t\t: signal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nexport default function pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t} = options;\n\n\tlet timer;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tpromise.then(resolve, reject);\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t})();\n\t});\n\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { arm64, armv7, powerpc64le, sparc64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractExe, extractTarByExe } from \"../utils/setup/extract.js\"\nimport type { PackageInfo } from \"../utils/setup/setupBin.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function getLLVMPackageInfo(\n version: string,\n platform: NodeJS.Platform,\n arch: string,\n): Promise {\n const url = await getLLVMAssetURL(platform, arch, version)\n info(`Downloading LLVM from ${url}`)\n\n return {\n url,\n extractedFolderName: \"\",\n binRelativeDir: \"bin\",\n binFileName: addExeExt(\"clang\"),\n extractFunction: platform === \"win32\"\n ? extractExe\n : (file: string, dest: string) => {\n return extractTarByExe(file, dest, 1)\n },\n }\n}\n\nexport async function getLLVMAssetURL(platform: string, arch: string, version: string) {\n const { keywords, optionalKeywords } = await getAssetKeywords(platform, arch)\n\n // first check the github releases\n const llvmGitHubAssets = await loadAssetList(\n join(dirname, \"github_llvm_llvm-project.json\"),\n )\n const ghAsset = matchAsset(\n llvmGitHubAssets,\n {\n version,\n keywords,\n optionalKeywords,\n filterMapTag(tag) {\n return tag.replace(/^llvmorg-/, \"\")\n },\n },\n )\n\n if (ghAsset !== undefined) {\n return `https://github.com/llvm/llvm-project/releases/download/${ghAsset.tag}/${ghAsset.name}`\n }\n\n // check the llvm website\n const llvmWebsiteAssets = await loadAssetList(\n join(dirname, \"llvm_org_releases.json\"),\n )\n\n const websiteAsset = matchAsset(\n llvmWebsiteAssets,\n {\n version,\n keywords,\n optionalKeywords,\n },\n )\n\n if (websiteAsset !== undefined) {\n return `https://llvm.org/releases/${websiteAsset.tag}/${websiteAsset.name}`\n }\n\n throw new Error(`No asset found for version ${version} matching ${keywords} and ${optionalKeywords}`)\n}\n\nasync function getAssetKeywords(platform: string, arch: string) {\n const keywords: string[] = []\n const optionalKeywords: string[] = []\n\n switch (platform) {\n case \"win32\": {\n if (x86_64.includes(arch)) {\n keywords.push(\"win64\")\n // TODO fallback to win32 if win64 is not available (e.g. for LLVM 3.6.2 and older)\n } else if (x86.includes(arch)) {\n keywords.push(\"win32\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"woa64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"linux\": {\n keywords.push(\"linux\")\n\n if (isUbuntu()) {\n optionalKeywords.push(\"ubuntu\")\n\n const ubuntuVer = await ubuntuVersion()\n if (ubuntuVer !== null) {\n optionalKeywords.push(`${ubuntuVer[0]}`)\n const ubuntuMin = ubuntuVer[1] < 10 ? `0${ubuntuVer[1]}` : `${ubuntuVer[1]}`\n\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}`)\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}.${ubuntuVer[2]}`)\n }\n } else if (hasDnf()) {\n optionalKeywords.push(\"rhel\")\n }\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"x86\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"aarch64\")\n } else if (armv7.includes(arch)) {\n keywords.push(\"armv7a\")\n } else if (powerpc64le.includes(arch)) {\n keywords.push(\"powerpc64le\")\n } else if (sparc64.includes(arch)) {\n keywords.push(\"sparc64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n case \"darwin\": {\n keywords.push(\"apple\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (arm64.includes(arch)) {\n // allow falling back to x86_64 if arm64 is not available\n optionalKeywords.push(\"arm64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"freebsd\": {\n keywords.push(\"freebsd\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"amd64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"i386\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n default:\n info(`Using ${platform} ${arch} for LLVM`)\n optionalKeywords.push(platform, arch)\n break\n }\n return { keywords, optionalKeywords }\n}\n","import path, { delimiter, join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupGcc } from \"../gcc/gcc.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type InstallationInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { semverCoerceIfInvalid } from \"../utils/setup/version.js\"\nimport { quoteIfHasSpace } from \"../utils/std/index.js\"\nimport { getVersion } from \"../versions/versions.js\"\nimport { LLVMPackages, setupLLVMApt } from \"./llvm_installer.js\"\nimport { getLLVMPackageInfo } from \"./llvm_url.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function setupLLVM(version: string, setupDir: string, arch: string): Promise {\n const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)\n await activateLLVM(installationInfo.installDir ?? setupDir, version)\n return installationInfo\n}\n\nasync function setupLLVMWithoutActivation_(version: string, setupDir: string, arch: string) {\n // install LLVM\n const [installationInfo, _1] = await Promise.all([\n setupLLVMOnly(version, setupDir, arch),\n addLLVMLoggingMatcher(),\n ])\n\n // install LLVM dependencies\n await setupLLVMDeps(arch)\n\n return installationInfo\n}\nconst setupLLVMWithoutActivation = memoize(setupLLVMWithoutActivation_, { promise: true })\n\n/**\n * Setup clang-format\n *\n * This uses the LLVM installer on Ubuntu, and the LLVM binaries on other platforms\n */\nexport function setupClangFormat(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch, LLVMPackages.ClangFormat)\n}\n\n/** Setup llvm tools (clang tidy, etc.) without activating llvm and using it as the compiler */\nexport function setupClangTools(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch)\n}\n\nasync function setupLLVMOnly(\n version: string,\n setupDir: string,\n arch: string,\n packages: LLVMPackages = LLVMPackages.All,\n) {\n const majorVersion = majorLLVMVersion(version)\n try {\n if (isUbuntu()) {\n return await setupLLVMApt(majorVersion, packages)\n }\n } catch (err) {\n info(`Failed to install llvm via system package manager ${err}`)\n }\n\n const installationInfo = await setupBin(\"llvm\", version, getLLVMPackageInfo, setupDir, arch)\n await llvmBinaryDeps(majorVersion)\n return installationInfo\n}\n\nfunction majorLLVMVersion(version: string) {\n const coeredVersion = semverCoerceIfInvalid(version)\n return Number.parseInt(coeredVersion.split(\".\")[0], 10)\n}\n\nasync function llvmBinaryDeps_(majorVersion: number) {\n if (isUbuntu()) {\n if (majorVersion <= 10) {\n await installAptPack([{ name: \"libtinfo5\" }])\n } else {\n await installAptPack([{ name: \"libtinfo-dev\" }])\n }\n } else if (isArch()) {\n // https://aur.archlinux.org/packages/ncurses5-compat-libs\n await setupPacmanPack(\"ncurses5-compat-libs\", undefined, \"yay\")\n } else if (hasDnf()) {\n // https://packages.fedoraproject.org/pkgs/ncurses/ncurses-compat-libs/index.html\n await setupDnfPack([\n { name: \"ncurses-compat-libs\" },\n ])\n }\n}\nconst llvmBinaryDeps = memoize(llvmBinaryDeps_, { promise: true })\n\nasync function setupLLVMDeps_(arch: string) {\n if (process.platform === \"linux\") {\n // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first,\n // but with a lower priority than the one used by activateLLVM()\n await setupGcc(getVersion(\"gcc\", undefined, await ubuntuVersion()), \"\", arch, 40)\n }\n}\nconst setupLLVMDeps = memoize(setupLLVMDeps_, { promise: true })\n\nexport async function activateLLVM(directory: string, version: string) {\n const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n\n const llvmMajor = majorLLVMVersion(version)\n\n const actPromises: Promise[] = [\n // compiler paths\n addEnv(\"CC\", addExeExt(`${directory}/bin/clang`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${directory}/bin/clang++`), rcOptions),\n\n // the output of this action\n addEnv(\"LLVM_PATH\", directory, rcOptions),\n\n // Setup LLVM as the compiler\n addEnv(\"LD_LIBRARY_PATH\", `${ld}${delimiter}${directory}/lib`, rcOptions),\n addEnv(\"DYLD_LIBRARY_PATH\", `${dyld}${delimiter}${directory}/lib`, rcOptions),\n\n // compiler flags\n addEnv(\"LLVM_LDFLAGS\", `-L${quoteIfHasSpace(`${directory}/lib`)}`, rcOptions),\n addEnv(\"LLVM_CPPFLAGS\", `-I${quoteIfHasSpace(`${directory}/include`)}`, rcOptions),\n\n // CPATH\n await pathExists(`${directory}/lib/clang/${version}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${version}/include`, rcOptions)\n : await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${llvmMajor}/include`, rcOptions)\n : Promise.resolve(),\n\n addEnv(\"LIBRARY_PATH\", `${directory}/lib`, rcOptions),\n\n // os sdks\n setupMacOSSDK(),\n ]\n\n if (isUbuntu()) {\n const priority = 60\n actPromises.push(\n addUpdateAlternativesToRc(\"cc\", `${directory}/bin/clang`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${directory}/bin/clang++`, rcOptions, priority),\n addUpdateAlternativesToRc(\"clang\", `${directory}/bin/clang`, rcOptions),\n addUpdateAlternativesToRc(\"clang++\", `${directory}/bin/clang++`, rcOptions),\n addUpdateAlternativesToRc(\"lld\", `${directory}/bin/lld`, rcOptions),\n addUpdateAlternativesToRc(\"ld.lld\", `${directory}/bin/ld.lld`, rcOptions),\n addUpdateAlternativesToRc(\"llvm-ar\", `${directory}/bin/llvm-ar`, rcOptions),\n )\n }\n\n await Promise.all(actPromises)\n}\n\nasync function addLLVMLoggingMatcher() {\n if (GITHUB_ACTIONS) {\n const matcherPath = join(dirname, \"llvm_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the llvm_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n }\n}\n","import { info } from \"console\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRoot } from \"admina\"\nimport { addPath } from \"envosman\"\nimport { chmod, readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { aptTimeout, hasNala, installAptPack, isAptPackRegexInstalled } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { DEFAULT_TIMEOUT } from \"../installTool.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\nexport enum LLVMPackages {\n All = 0,\n ClangFormat = 1,\n Core = 2,\n}\n\nexport async function setupLLVMApt(\n majorVersion: number,\n packages: LLVMPackages = LLVMPackages.All,\n): Promise {\n // TODO for older versions, this also includes the minor version\n const installationFolder = `/usr/lib/llvm-${majorVersion}`\n\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }])\n const dl = new DownloaderHelper(\"https://apt.llvm.org/llvm.sh\", tmpdir(), { fileName: \"llvm.sh\" })\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the LLVM installer script: ${err}`)\n })\n await dl.start()\n const installerScript = await readFile(dl.getDownloadPath(), \"utf-8\")\n\n const installerPath = join(tmpdir(), \"llvm-setup-cpp.sh\")\n const neededPackages = await patchAptLLVMScript(\n installerScript,\n installerPath,\n majorVersion,\n packages,\n )\n await installAptPack(neededPackages)\n await chmod(installerPath, \"755\")\n await execRoot(\n \"bash\",\n [installerPath, `${majorVersion}`, ...(packages === LLVMPackages.All ? [\"all\"] : [])],\n {\n stdio: \"inherit\",\n shell: true,\n timeout: DEFAULT_TIMEOUT,\n },\n )\n\n await addPath(`${installationFolder}/bin`, rcOptions)\n\n return {\n installDir: `${installationFolder}`,\n binDir: `${installationFolder}/bin`,\n bin: `${installationFolder}/bin/clang++`,\n }\n}\n\nasync function patchAptLLVMScript(\n givenScript: string,\n target_path: string,\n majorVersion: number,\n packages: LLVMPackages,\n) {\n let script = debugScript(givenScript)\n script = nonInteractiveScript(script)\n script = choosePackages(packages, script, majorVersion)\n script = await removeConflictingPackages(script)\n script = useNalaScript(script)\n\n await writeFile(target_path, script)\n\n // the packages needed by the script\n return [{ name: \"lsb-release\" }, { name: \"wget\" }, { name: \"software-properties-common\" }, { name: \"gnupg\" }]\n}\n\nfunction debugScript(script: string) {\n if (process.env.NODE_DEBUG !== \"1\" && process.env.NODE_DEBUG !== \"true\") {\n return script.replace(/set -eux/g, \"set -eu\")\n }\n return script\n}\n\nfunction nonInteractiveScript(script: string) {\n // make the scirpt non-interactive and fix broken packages\n return script.replace(\n /add-apt-repository \"\\${REPO_NAME}\"/g,\n `add-apt-repository -y -n \"\\${REPO_NAME}\"\napt-get update -o ${aptTimeout} -y`,\n )\n}\n\nasync function removeConflictingPackages(givenScript: string) {\n // fix conflicts between libclang-rt and libclang\n let script = givenScript.replace(\n /apt-get install -y/g,\n `apt-get install -o Dpkg::Options::=\"--force-overwrite\" -o ${aptTimeout} -y --fix-broken`,\n )\n\n // check if these are installed and if so, remove them from the script as they conflict\n const conflictingPackages = [\"libc++-$LLVM_VERSION-dev\", \"libc++abi-$LLVM_VERSION-dev\", \"libunwind-$LLVM_VERSION-dev\"]\n await Promise.all(\n conflictingPackages.map(async (pack) => {\n const installingPack = pack.replace(\"$LLVM_VERSION\", \"*\")\n if (await isAptPackRegexInstalled(installingPack)) {\n info(`Removing conflicting package ${installingPack}`)\n script = script.replace(pack, \"\")\n }\n }),\n )\n return script\n}\n\nfunction useNalaScript(script: string) {\n // use nala if it is available\n if (hasNala()) {\n return script.replace(/apt-get/g, \"nala\")\n }\n return script\n}\n\nfunction choosePackages(packages: LLVMPackages, script: string, majorVersion: number) {\n if (packages === LLVMPackages.ClangFormat) {\n return script.replace(/ -y \\$PKG/g, ` -y clang-format-${majorVersion}`)\n }\n return script\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { findVcvarsall, vsversion_to_versionnumber } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupVCVarsall } from \"../vcvarsall/vcvarsall.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\ntype MSVCVersion = \"2022\" | \"17.0\" | \"2019\" | \"16.0\" | \"2017\" | \"15.0\" | \"2015\" | \"14.0\" | \"2013\" | \"12.0\" | string\n\nexport async function setupMSVC(\n versionGiven: MSVCVersion,\n _setupDir: string,\n arch: string,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (process.platform !== \"win32\") {\n return\n }\n const version = vsversion_to_versionnumber(versionGiven) as string\n\n // check if the given version is already installed\n info(`Checking if MSVC ${version} is already installed`)\n let installed = false\n try {\n const vcvarsall_path = findVcvarsall(version) as string\n installed = true\n info(`Found the pre-installed version of MSVC at ${vcvarsall_path}`)\n } catch {\n // not installed, try installing\n }\n\n let toolset: string | undefined\n let VCTargetsPath: string | undefined\n // https://github.com/aminya/setup-cpp/issues/1\n if (!installed) {\n try {\n if (version === \"14.0\") {\n toolset = \"14.0\"\n await setupChocoPack(\"visualcpp-build-tools\", \"14.0.25420.1\", [\"--ignore-dependencies\"])\n VCTargetsPath = \"C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140\"\n } else if (version === \"15.0\") {\n toolset = \"14.16\"\n await setupChocoPack(\"visualstudio2017buildtools\", \"15.9.41.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16\" // TODO verify path\n } else if (version === \"16.0\") {\n toolset = \"14.29\"\n await setupChocoPack(\"visualstudio2019buildtools\", \"16.11.7.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133\"\n } else if (version === \"17.0\") {\n toolset = undefined\n await setupChocoPack(\"visualstudio2022buildtools\", \"117.0.5.0\", [])\n VCTargetsPath = undefined\n } else {\n error(`The given MSVC versions ${versionGiven} is not supported yet.`)\n }\n } catch (e) {\n error(e as string | Error)\n }\n }\n // run vcvarsall.bat environment variables\n await setupVCVarsall(version, VCTargetsPath, arch, toolset, sdk, uwp, spectre)\n\n if (GITHUB_ACTIONS) {\n await addMSVCLoggingMatcher()\n }\n}\n\nasync function addMSVCLoggingMatcher() {\n const matcherPath = join(dirname, \"msvc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the msvc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { execRootSync } from \"admina\"\nimport { error } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n/** Get the platform data for cmake */\nfunction getPowerShellPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n return {\n url: getPowershellUrl(platform, arch, version),\n binRelativeDir: \"\",\n binFileName: addExeExt(\"pwsh\"),\n extractedFolderName: \"\",\n }\n}\n\nfunction getPowershellUrl(\n platform: string,\n arch: string,\n version: string,\n) {\n switch (platform) {\n case \"win32\": {\n const osArchStr = ([\"ia32\", \"x86\", \"i386\", \"x32\"].includes(arch))\n ? \"win-x86\"\n : \"win-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/PowerShell-${version}-${osArchStr}.zip`\n }\n case \"darwin\": {\n const osArchStr = [\"arm\", \"arm64\"].includes(arch) ? \"osx-arm64\" : \"osx-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n case \"linux\": {\n const archMap = {\n arm64: \"linux-arm64\",\n arm: \"linux-arm64\",\n arm32: \"linux-arm32\",\n aarch64: \"linux-arm64\",\n x64: \"linux-x64\",\n } as Record\n const osArchStr = archMap[arch] ?? \"linux-x64\"\n // TODO support musl\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershell(version: string, setupDir: string, arch: string) {\n try {\n return await setupBin(\"pwsh\", version, getPowerShellPackageInfo, setupDir, arch)\n } catch (err) {\n error(`Failed to setup pwsh via download: ${err}. Trying package managers...`)\n return setupPowershellSystem(version, setupDir, arch)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershellSystem(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"powershell-core\", version)\n const binDir = \"C:/Program Files/PowerShell/7\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"powershell\", version, { cask: true, overwrite: false })\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"powershell-bin\", version, \"yay\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"curl\" }])\n execRootSync(\"/bin/bash\", [\n \"-c\",\n \"curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo\",\n ])\n return setupDnfPack([{ name: \"powershell\", version }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"curl\" }])\n const ubuntuVerSplitted = (await ubuntuVersion())!\n const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`\n\n execRootSync(\"curl\", [\n \"-LJO\",\n `https://packages.microsoft.com/config/ubuntu/${ubuntuVersionString}/packages-microsoft-prod.deb`,\n ])\n execRootSync(\"dpkg\", [\"-i\", \"packages-microsoft-prod.deb\"])\n\n // TODO Debian\n // const keyFileName = await addAptKeyViaURL(\n // \"microsoft.asc\",\n // \"https://packages.microsoft.com/keys/microsoft.asc\"\n // )\n // execRootSync(\"/bin/bash\", [\n // \"-c\",\n // `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main\" > /etc/apt/sources.list.d/microsoft.list`,\n // ])\n\n return installAptPack([{ name: \"powershell\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addExeExt } from \"patha\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name task uses in their download links */\nfunction getTaskPlatform(platform: NodeJS.Platform) {\n switch (platform) {\n case \"win32\":\n return \"windows\"\n default:\n return platform\n }\n}\n\n/** Get the arch name task uses in their download links */\nfunction getTaskArch(arch: string) {\n switch (arch) {\n case \"x64\":\n return \"amd64\"\n case \"ia32\":\n case \"x86\":\n case \"i386\":\n case \"x32\":\n return \"386\"\n default:\n return arch\n }\n}\n\n/** Get the platform data for task */\nfunction getTaskPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const taskPlatform = getTaskPlatform(platform)\n const taskArch = getTaskArch(arch)\n const extension = platform === \"win32\" ? \"zip\" : \"tar.gz\"\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"task\"),\n extractedFolderName: \"\",\n url: `https://github.com/go-task/task/releases/download/v${version}/task_${taskPlatform}_${taskArch}.${extension}`,\n }\n}\n\nexport function setupTask(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"task\", version, getTaskPackageInfo, setupDir, arch)\n}\n","import { getInput } from \"@actions/core\"\nimport { info } from \"ci-log\"\nimport mri from \"mri\"\nimport { untildifyUser } from \"untildify-user\"\nimport { type Inputs, inputs } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\n\nexport function parseArgs(args: string[]): Opts {\n return mri & { help: boolean }>(args, {\n string: [...inputs, \"timeout\"],\n default: Object.fromEntries(inputs.map((inp) => [inp, maybeGetInput(inp)])),\n alias: { h: \"help\" },\n boolean: \"help\",\n })\n}\n\nexport function printHelp() {\n info(`\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 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 you would like to install for this tool. e.g. --conan true or --conan \"1.42.1\"\n\nAll the available tools:\n`)\n\n console.table(\n {\n \"compiler and analyzer\": { tools: \"--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat\" },\n \"build system\": { tools: \"--cmake, --ninja, --meson, --make, --task, --bazel\" },\n \"package manager\": { tools: \"--vcpkg, --conan, --choco, --brew, --nala\" },\n cache: { tools: \"--ccache, --sccache\" },\n documentation: { tools: \"--doxygen, --graphviz\" },\n coverage: { tools: \"--gcovr, --opencppcoverage, --kcov\" },\n other: { tools: \"--python, --powershell, --sevenzip\" },\n },\n [\"tools\"],\n )\n}\n/** Get an object from github actions */\n\nexport function maybeGetInput(key: string) {\n const value = getInput(key.toLowerCase())\n if (value !== \"false\" && value !== \"\") {\n return value\n }\n return undefined // skip installation\n}\nexport type Opts = mri.Argv<\n Record & {\n help: boolean\n timeout?: string\n }\n>\n\nexport function getSuccessMessage(tool: string, installationInfo: InstallationInfo | undefined | void) {\n let msg = `✅ ${tool} was installed successfully:`\n if (installationInfo === undefined) {\n return msg\n }\n if (\"installDir\" in installationInfo) {\n msg += `\\n- The installation directory is ${installationInfo.installDir}`\n }\n if (installationInfo.binDir !== \"\") {\n msg += `\\n- The binary directory is ${installationInfo.binDir}`\n }\n return msg\n}\n\nexport const rcOptions = {\n rcPath: untildifyUser(\"~/.cpprc\"),\n guard: \"cpp\",\n}\n","'use strict'\n\nconst vendors = require('./vendors.json')\n\nconst env = process.env\n\n// Used for testing only\nObject.defineProperty(exports, '_vendors', {\n value: vendors.map(function (v) {\n return v.constant\n })\n})\n\nexports.name = null\nexports.isPR = null\n\nvendors.forEach(function (vendor) {\n const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]\n const isCI = envs.every(function (obj) {\n return checkEnv(obj)\n })\n\n exports[vendor.constant] = isCI\n\n if (!isCI) {\n return\n }\n\n exports.name = vendor.name\n\n switch (typeof vendor.pr) {\n case 'string':\n // \"pr\": \"CIRRUS_PR\"\n exports.isPR = !!env[vendor.pr]\n break\n case 'object':\n if ('env' in vendor.pr) {\n // \"pr\": { \"env\": \"BUILDKITE_PULL_REQUEST\", \"ne\": \"false\" }\n exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne\n } else if ('any' in vendor.pr) {\n // \"pr\": { \"any\": [\"ghprbPullId\", \"CHANGE_ID\"] }\n exports.isPR = vendor.pr.any.some(function (key) {\n return !!env[key]\n })\n } else {\n // \"pr\": { \"DRONE_BUILD_EVENT\": \"pull_request\" }\n exports.isPR = checkEnv(vendor.pr)\n }\n break\n default:\n // PR detection not supported for this vendor\n exports.isPR = null\n }\n})\n\nexports.isCI = !!(\n env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'\n (env.BUILD_ID || // Jenkins, Cloudbees\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari\n env.CI_APP_ID || // Appflow\n env.CI_BUILD_ID || // Appflow\n env.CI_BUILD_NUMBER || // Appflow\n env.CI_NAME || // Codeship and others\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.RUN_ID || // TaskCluster, dsari\n exports.name ||\n false)\n)\n\nfunction checkEnv (obj) {\n // \"env\": \"CIRRUS\"\n if (typeof obj === 'string') return !!env[obj]\n\n // \"env\": { \"env\": \"NODE\", \"includes\": \"/app/.heroku/node/bin/node\" }\n if ('env' in obj) {\n // Currently there are no other types, uncomment when there are\n // if ('includes' in obj) {\n return env[obj.env] && env[obj.env].includes(obj.includes)\n // }\n }\n if ('any' in obj) {\n return obj.any.some(function (k) {\n return !!env[k]\n })\n }\n return Object.keys(obj).every(function (k) {\n return env[k] === obj[k]\n })\n}\n","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;","import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;","import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;","export default '00000000-0000-0000-0000-000000000000';","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","module.exports = require('./lib/tunnel');\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as pm from './proxy';\nimport * as tunnel from 'tunnel';\nexport var HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (HttpCodes = {}));\nexport var Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (Headers = {}));\nexport var MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nexport function getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nexport class HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n statusCode;\n result;\n}\nexport class HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n message;\n async readBody() {\n return new Promise(async (resolve) => {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n });\n }\n async readBodyBuffer() {\n return new Promise(async (resolve) => {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n });\n }\n}\nexport function isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexport class HttpClient {\n userAgent;\n handlers;\n requestOptions;\n _ignoreSslError = false;\n _socketTimeout;\n _allowRedirects = true;\n _allowRedirectDowngrade = false;\n _maxRedirects = 50;\n _allowRetries = false;\n _maxRetries = 1;\n _agent;\n _proxyAgent;\n _proxyAgentDispatcher;\n _keepAlive = false;\n _disposed = false;\n constructor(userAgent, handlers, requestOptions) {\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n async options(requestUrl, additionalHeaders) {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n }\n async get(requestUrl, additionalHeaders) {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n }\n async del(requestUrl, additionalHeaders) {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n }\n async post(requestUrl, data, additionalHeaders) {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n }\n async patch(requestUrl, data, additionalHeaders) {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n }\n async put(requestUrl, data, additionalHeaders) {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n }\n async head(requestUrl, additionalHeaders) {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n }\n async sendStream(verb, requestUrl, stream, additionalHeaders) {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n async getJson(requestUrl, additionalHeaders = {}) {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = await this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async postJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async putJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async patchJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n async request(verb, requestUrl, data, headers) {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = await this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n await response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = await this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n await response.readBody();\n await this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n async requestRaw(info, data) {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n async getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return undefined;\n }\n return await this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (!useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: {\n ...((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n }),\n host: proxyUrl.hostname,\n port: proxyUrl.port\n }\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if tunneling agent isn't assigned create a new agent\n if (!agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n async _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n // Lazy load ProxyAgent to avoid bundling all the undici\n const ProxyAgent = (await import('undici/lib/proxy-agent'));\n proxyAgent = new ProxyAgent({\n uri: proxyUrl.href,\n pipelining: !this._keepAlive ? 0 : 1,\n ...((proxyUrl.username || proxyUrl.password) && {\n token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`\n })\n });\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n async _performExponentialBackoff(retryNumber) {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n }\n async _processResponse(res, options) {\n return new Promise(async (resolve, reject) => {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = await res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n }\n}\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport pathKey from 'path-key';\n\nexport const npmRunPath = ({\n\tcwd = process.cwd(),\n\tpath: pathOption = process.env[pathKey()],\n\tpreferLocal = true,\n\texecPath = process.execPath,\n\taddExecPath = true,\n} = {}) => {\n\tconst cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;\n\tconst cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\tif (preferLocal) {\n\t\tapplyPreferLocal(result, cwdPath);\n\t}\n\n\tif (addExecPath) {\n\t\tapplyExecPath(result, execPath, cwdPath);\n\t}\n\n\treturn [...result, pathOption].join(path.delimiter);\n};\n\nconst applyPreferLocal = (result, cwdPath) => {\n\tlet previous;\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n};\n\n// Ensure the running `node` binary is used\nconst applyExecPath = (result, execPath, cwdPath) => {\n\tconst execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;\n\tresult.push(path.resolve(cwdPath, execPathString, '..'));\n};\n\nexport const npmRunPathEnv = ({env = process.env, ...options} = {}) => {\n\tenv = {...env};\n\n\tconst pathName = pathKey({env});\n\toptions.path = env[pathName];\n\tenv[pathName] = npmRunPath(options);\n\n\treturn env;\n};\n","const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n","\nexport const getRealtimeSignals=()=>{\nconst length=SIGRTMAX-SIGRTMIN+1;\nreturn Array.from({length},getRealtimeSignal);\n};\n\nconst getRealtimeSignal=(value,index)=>({\nname:`SIGRT${index+1}`,\nnumber:SIGRTMIN+index,\naction:\"terminate\",\ndescription:\"Application-specific signal (realtime)\",\nstandard:\"posix\"\n});\n\nconst SIGRTMIN=34;\nexport const SIGRTMAX=64;","\n\nexport const SIGNALS=[\n{\nname:\"SIGHUP\",\nnumber:1,\naction:\"terminate\",\ndescription:\"Terminal closed\",\nstandard:\"posix\"\n},\n{\nname:\"SIGINT\",\nnumber:2,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-C\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGQUIT\",\nnumber:3,\naction:\"core\",\ndescription:\"User interruption with CTRL-\\\\\",\nstandard:\"posix\"\n},\n{\nname:\"SIGILL\",\nnumber:4,\naction:\"core\",\ndescription:\"Invalid machine instruction\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGTRAP\",\nnumber:5,\naction:\"core\",\ndescription:\"Debugger breakpoint\",\nstandard:\"posix\"\n},\n{\nname:\"SIGABRT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGIOT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGBUS\",\nnumber:7,\naction:\"core\",\ndescription:\n\"Bus error due to misaligned, non-existing address or paging error\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGEMT\",\nnumber:7,\naction:\"terminate\",\ndescription:\"Command should be emulated but is not implemented\",\nstandard:\"other\"\n},\n{\nname:\"SIGFPE\",\nnumber:8,\naction:\"core\",\ndescription:\"Floating point arithmetic error\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGKILL\",\nnumber:9,\naction:\"terminate\",\ndescription:\"Forced termination\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGUSR1\",\nnumber:10,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGSEGV\",\nnumber:11,\naction:\"core\",\ndescription:\"Segmentation fault\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGUSR2\",\nnumber:12,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGPIPE\",\nnumber:13,\naction:\"terminate\",\ndescription:\"Broken pipe or socket\",\nstandard:\"posix\"\n},\n{\nname:\"SIGALRM\",\nnumber:14,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTERM\",\nnumber:15,\naction:\"terminate\",\ndescription:\"Termination\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGSTKFLT\",\nnumber:16,\naction:\"terminate\",\ndescription:\"Stack is empty or overflowed\",\nstandard:\"other\"\n},\n{\nname:\"SIGCHLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"posix\"\n},\n{\nname:\"SIGCLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"other\"\n},\n{\nname:\"SIGCONT\",\nnumber:18,\naction:\"unpause\",\ndescription:\"Unpaused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGSTOP\",\nnumber:19,\naction:\"pause\",\ndescription:\"Paused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGTSTP\",\nnumber:20,\naction:\"pause\",\ndescription:\"Paused using CTRL-Z or \\\"suspend\\\"\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTTIN\",\nnumber:21,\naction:\"pause\",\ndescription:\"Background process cannot read terminal input\",\nstandard:\"posix\"\n},\n{\nname:\"SIGBREAK\",\nnumber:21,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-BREAK\",\nstandard:\"other\"\n},\n{\nname:\"SIGTTOU\",\nnumber:22,\naction:\"pause\",\ndescription:\"Background process cannot write to terminal output\",\nstandard:\"posix\"\n},\n{\nname:\"SIGURG\",\nnumber:23,\naction:\"ignore\",\ndescription:\"Socket received out-of-band data\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXCPU\",\nnumber:24,\naction:\"core\",\ndescription:\"Process timed out\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXFSZ\",\nnumber:25,\naction:\"core\",\ndescription:\"File too big\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGVTALRM\",\nnumber:26,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGPROF\",\nnumber:27,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGWINCH\",\nnumber:28,\naction:\"ignore\",\ndescription:\"Terminal window size changed\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGIO\",\nnumber:29,\naction:\"terminate\",\ndescription:\"I/O is available\",\nstandard:\"other\"\n},\n{\nname:\"SIGPOLL\",\nnumber:29,\naction:\"terminate\",\ndescription:\"Watched event\",\nstandard:\"other\"\n},\n{\nname:\"SIGINFO\",\nnumber:29,\naction:\"ignore\",\ndescription:\"Request for process information\",\nstandard:\"other\"\n},\n{\nname:\"SIGPWR\",\nnumber:30,\naction:\"terminate\",\ndescription:\"Device running out of power\",\nstandard:\"systemv\"\n},\n{\nname:\"SIGSYS\",\nnumber:31,\naction:\"core\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n},\n{\nname:\"SIGUNUSED\",\nnumber:31,\naction:\"terminate\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n}];","import{constants}from\"node:os\";\n\nimport{SIGNALS}from\"./core.js\";\nimport{getRealtimeSignals}from\"./realtime.js\";\n\n\n\nexport const getSignals=()=>{\nconst realtimeSignals=getRealtimeSignals();\nconst signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);\nreturn signals;\n};\n\n\n\n\n\n\n\nconst normalizeSignal=({\nname,\nnumber:defaultNumber,\ndescription,\naction,\nforced=false,\nstandard\n})=>{\nconst{\nsignals:{[name]:constantSignal}\n}=constants;\nconst supported=constantSignal!==undefined;\nconst number=supported?constantSignal:defaultNumber;\nreturn{name,number,description,supported,action,forced,standard};\n};","import{constants}from\"node:os\";\n\nimport{SIGRTMAX}from\"./realtime.js\";\nimport{getSignals}from\"./signals.js\";\n\n\n\nconst getSignalsByName=()=>{\nconst signals=getSignals();\nreturn Object.fromEntries(signals.map(getSignalByName));\n};\n\nconst getSignalByName=({\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n})=>[name,{name,number,description,supported,action,forced,standard}];\n\nexport const signalsByName=getSignalsByName();\n\n\n\n\nconst getSignalsByNumber=()=>{\nconst signals=getSignals();\nconst length=SIGRTMAX+1;\nconst signalsA=Array.from({length},(value,number)=>\ngetSignalByNumber(number,signals));\n\nreturn Object.assign({},...signalsA);\n};\n\nconst getSignalByNumber=(number,signals)=>{\nconst signal=findSignalByNumber(number,signals);\n\nif(signal===undefined){\nreturn{};\n}\n\nconst{name,description,supported,action,forced,standard}=signal;\nreturn{\n[number]:{\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n}\n};\n};\n\n\n\nconst findSignalByNumber=(number,signals)=>{\nconst signal=signals.find(({name})=>constants.signals[name]===number);\n\nif(signal!==undefined){\nreturn signal;\n}\n\nreturn signals.find((signalA)=>signalA.number===number);\n};\n\nexport const signalsByNumber=getSignalsByNumber();","import process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n","const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nvar process = global.process\n\nconst processOk = function (process) {\n return process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n}\n\n// some kind of non-node environment, just no-op\n/* istanbul ignore if */\nif (!processOk(process)) {\n module.exports = function () {\n return function () {}\n }\n} else {\n var assert = require('assert')\n var signals = require('./signals.js')\n var isWin = /^win/i.test(process.platform)\n\n var EE = require('events')\n /* istanbul ignore if */\n if (typeof EE !== 'function') {\n EE = EE.EventEmitter\n }\n\n var emitter\n if (process.__signal_exit_emitter__) {\n emitter = process.__signal_exit_emitter__\n } else {\n emitter = process.__signal_exit_emitter__ = new EE()\n emitter.count = 0\n emitter.emitted = {}\n }\n\n // Because this emitter is a global, we have to check to see if a\n // previous version of this library failed to enable infinite listeners.\n // I know what you're about to say. But literally everything about\n // signal-exit is a compromise with evil. Get used to it.\n if (!emitter.infinite) {\n emitter.setMaxListeners(Infinity)\n emitter.infinite = true\n }\n\n module.exports = function (cb, opts) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return function () {}\n }\n assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')\n\n if (loaded === false) {\n load()\n }\n\n var ev = 'exit'\n if (opts && opts.alwaysLast) {\n ev = 'afterexit'\n }\n\n var remove = function () {\n emitter.removeListener(ev, cb)\n if (emitter.listeners('exit').length === 0 &&\n emitter.listeners('afterexit').length === 0) {\n unload()\n }\n }\n emitter.on(ev, cb)\n\n return remove\n }\n\n var unload = function unload () {\n if (!loaded || !processOk(global.process)) {\n return\n }\n loaded = false\n\n signals.forEach(function (sig) {\n try {\n process.removeListener(sig, sigListeners[sig])\n } catch (er) {}\n })\n process.emit = originalProcessEmit\n process.reallyExit = originalProcessReallyExit\n emitter.count -= 1\n }\n module.exports.unload = unload\n\n var emit = function emit (event, code, signal) {\n /* istanbul ignore if */\n if (emitter.emitted[event]) {\n return\n }\n emitter.emitted[event] = true\n emitter.emit(event, code, signal)\n }\n\n // { : , ... }\n var sigListeners = {}\n signals.forEach(function (sig) {\n sigListeners[sig] = function listener () {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n var listeners = process.listeners(sig)\n if (listeners.length === emitter.count) {\n unload()\n emit('exit', null, sig)\n /* istanbul ignore next */\n emit('afterexit', null, sig)\n /* istanbul ignore next */\n if (isWin && sig === 'SIGHUP') {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n sig = 'SIGINT'\n }\n /* istanbul ignore next */\n process.kill(process.pid, sig)\n }\n }\n })\n\n module.exports.signals = function () {\n return signals\n }\n\n var loaded = false\n\n var load = function load () {\n if (loaded || !processOk(global.process)) {\n return\n }\n loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n emitter.count += 1\n\n signals = signals.filter(function (sig) {\n try {\n process.on(sig, sigListeners[sig])\n return true\n } catch (er) {\n return false\n }\n })\n\n process.emit = processEmit\n process.reallyExit = processReallyExit\n }\n module.exports.load = load\n\n var originalProcessReallyExit = process.reallyExit\n var processReallyExit = function processReallyExit (code) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n process.exitCode = code || /* istanbul ignore next */ 0\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n originalProcessReallyExit.call(process, process.exitCode)\n }\n\n var originalProcessEmit = process.emit\n var processEmit = function processEmit (ev, arg) {\n if (ev === 'exit' && processOk(global.process)) {\n /* istanbul ignore else */\n if (arg !== undefined) {\n process.exitCode = arg\n }\n var ret = originalProcessEmit.apply(this, arguments)\n /* istanbul ignore next */\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n return ret\n } else {\n return originalProcessEmit.apply(this, arguments)\n }\n }\n}\n","// This is not the set of all possible signals.\n//\n// It IS, however, the set of all signals that trigger\n// an exit on either Linux or BSD systems. Linux is a\n// superset of the signal names supported on BSD, and\n// the unknown signals just fail to register, so we can\n// catch that easily enough.\n//\n// Don't bother with SIGKILL. It's uncatchable, which\n// means that we can't fire any callbacks anyway.\n//\n// If a user does happen to register a handler on a non-\n// fatal signal like SIGWINCH or something, and then\n// exit, it'll end up firing `process.emit('exit')`, so\n// the handler will be fired anyway.\n//\n// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n// artificially, inherently leave the process in a\n// state from which it is not safe to try and enter JS\n// listeners.\nmodule.exports = [\n 'SIGABRT',\n 'SIGALRM',\n 'SIGHUP',\n 'SIGINT',\n 'SIGTERM'\n]\n\nif (process.platform !== 'win32') {\n module.exports.push(\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n module.exports.push(\n 'SIGIO',\n 'SIGPOLL',\n 'SIGPWR',\n 'SIGSTKFLT',\n 'SIGUNUSED'\n )\n}\n","'use strict';\nconst {PassThrough: PassThroughStream} = require('stream');\n\nmodule.exports = options => {\n\toptions = {...options};\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst isBuffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || isBuffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (isBuffer) {\n\t\tencoding = null;\n\t}\n\n\tconst stream = new PassThroughStream({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tlet length = 0;\n\tconst chunks = [];\n\n\tstream.on('data', chunk => {\n\t\tchunks.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlength = chunks.length;\n\t\t} else {\n\t\t\tlength += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn chunks;\n\t\t}\n\n\t\treturn isBuffer ? Buffer.concat(chunks, length) : chunks.join('');\n\t};\n\n\tstream.getBufferedLength = () => length;\n\n\treturn stream;\n};\n","'use strict';\n\nconst { PassThrough } = require('stream');\n\nmodule.exports = function (/*streams...*/) {\n var sources = []\n var output = new PassThrough({objectMode: true})\n\n output.setMaxListeners(0)\n\n output.add = add\n output.isEmpty = isEmpty\n\n output.on('unpipe', remove)\n\n Array.prototype.slice.call(arguments).forEach(add)\n\n return output\n\n function add (source) {\n if (Array.isArray(source)) {\n source.forEach(add)\n return this\n }\n\n sources.push(source);\n source.once('end', remove.bind(null, source))\n source.once('error', output.emit.bind(output, 'error'))\n source.pipe(output, {end: false})\n return this\n }\n\n function isEmpty () {\n return sources.length == 0;\n }\n\n function remove (source) {\n sources = sources.filter(function (it) { return it !== source })\n if (!sources.length && output.readable) { output.end() }\n }\n}\n","import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\nconst DOUBLE_QUOTES_REGEXP = /\"/g;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens[tokens.length - 1];\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens[tokens.length - 1]}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n","import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n","export default function stripFinalNewline(input) {\n\tconst LF = typeof input === 'string' ? '\\n' : '\\n'.charCodeAt();\n\tconst CR = typeof input === 'string' ? '\\r' : '\\r'.charCodeAt();\n\n\tif (input[input.length - 1] === LF) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\tif (input[input.length - 1] === CR) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\treturn input;\n}\n","\"use strict\";\n/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkStat = (stat, options) => stat.isFile() && checkMode(stat, options);\nconst checkMode = (stat, options) => {\n const myUid = options.uid ?? process.getuid?.();\n const myGroups = options.groups ?? process.getgroups?.() ?? [];\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid');\n }\n const groups = new Set([myGid, ...myGroups]);\n const mod = stat.mode;\n const uid = stat.uid;\n const gid = stat.gid;\n const u = parseInt('100', 8);\n const g = parseInt('010', 8);\n const o = parseInt('001', 8);\n const ug = u | g;\n return !!(mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0));\n};\n//# sourceMappingURL=posix.js.map","\"use strict\";\n/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkPathExt = (path, options) => {\n const { pathExt = process.env.PATHEXT || '' } = options;\n const peSplit = pathExt.split(';');\n if (peSplit.indexOf('') !== -1) {\n return true;\n }\n for (let i = 0; i < peSplit.length; i++) {\n const p = peSplit[i].toLowerCase();\n const ext = path.substring(path.length - p.length).toLowerCase();\n if (p && ext === p) {\n return true;\n }\n }\n return false;\n};\nconst checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options);\n//# sourceMappingURL=win32.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=options.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = exports.posix = exports.win32 = void 0;\nconst posix = __importStar(require(\"./posix.js\"));\nexports.posix = posix;\nconst win32 = __importStar(require(\"./win32.js\"));\nexports.win32 = win32;\n__exportStar(require(\"./options.js\"), exports);\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;\nconst impl = platform === 'win32' ? win32 : posix;\n/**\n * Determine whether a path is executable on the current platform.\n */\nexports.isexe = impl.isexe;\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexports.sync = impl.sync;\n//# sourceMappingURL=index.js.map","const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn sign(10) === 1 && sign(-20) === -1;\n};\n","// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , value = require(\"./valid-value\")\n , bind = Function.prototype.bind\n , call = Function.prototype.call\n , keys = Object.keys\n , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb /*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n","\"use strict\";\n\nvar _undefined = require(\"../function/noop\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1 /*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n","\"use strict\";\n\nvar sign = require(\"../math/sign\")\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif (value === 0 || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Math.sign : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || value === 0) return value;\n\treturn value > 0 ? 1 : -1;\n};\n","\"use strict\";\n\nvar toInteger = require(\"./to-integer\")\n , max = Math.max;\n\nmodule.exports = function (value) { return max(0, toInteger(value)); };\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\");\n\nmodule.exports = function (optsLength, fnLength, isAsync) {\n\tvar length;\n\tif (isNaN(optsLength)) {\n\t\tlength = fnLength;\n\t\tif (!(length >= 0)) return 1;\n\t\tif (isAsync && length) return length - 1;\n\t\treturn length;\n\t}\n\tif (optsLength === false) return false;\n\treturn toPosInt(optsLength);\n};\n","\"use strict\";\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./_iterate\")(\"forEach\");\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.assign : require(\"./shim\");\n","\"use strict\";\n\nvar keys = require(\"../keys\")\n , value = require(\"../valid-value\")\n , max = Math.max;\n\nmodule.exports = function (dest, src /*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.keys : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isValue = require(\"../is-value\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };\n","\"use strict\";\n\nvar assign = require(\"../object/assign\")\n , isObject = require(\"../object/is-object\")\n , isValue = require(\"../object/is-value\")\n , captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (message /*, code, ext*/) {\n\tvar err = new Error(message), code = arguments[1], ext = arguments[2];\n\tif (!isValue(ext)) {\n\t\tif (isObject(code)) {\n\t\t\text = code;\n\t\t\tcode = null;\n\t\t}\n\t}\n\tif (isValue(ext)) assign(err, ext);\n\tif (isValue(code)) err.code = code;\n\tif (captureStackTrace) captureStackTrace(err, module.exports);\n\treturn err;\n};\n","\"use strict\";\n\nvar toPosInt = require(\"../number/to-pos-integer\");\n\nvar test = function (arg1, arg2) { return arg2; };\n\nvar desc, defineProperty, generate, mixin;\n\ntry {\n\tObject.defineProperty(test, \"length\", {\n\t\tconfigurable: true,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tvalue: 1\n\t});\n}\ncatch (ignore) {}\n\nif (test.length === 1) {\n\t// ES6\n\tdesc = { configurable: true, writable: false, enumerable: false };\n\tdefineProperty = Object.defineProperty;\n\tmodule.exports = function (fn, length) {\n\t\tlength = toPosInt(length);\n\t\tif (fn.length === length) return fn;\n\t\tdesc.value = length;\n\t\treturn defineProperty(fn, \"length\", desc);\n\t};\n} else {\n\tmixin = require(\"../object/mixin\");\n\tgenerate = (function () {\n\t\tvar cache = [];\n\t\treturn function (length) {\n\t\t\tvar args, i = 0;\n\t\t\tif (cache[length]) return cache[length];\n\t\t\targs = [];\n\t\t\twhile (length--) args.push(\"a\" + (++i).toString(36));\n\t\t\t// eslint-disable-next-line no-new-func\n\t\t\treturn new Function(\n\t\t\t\t\"fn\",\n\t\t\t\t\"return function (\" + args.join(\", \") + \") { return fn.apply(this, arguments); };\"\n\t\t\t);\n\t\t};\n\t})();\n\tmodule.exports = function (src, length) {\n\t\tvar target;\n\t\tlength = toPosInt(length);\n\t\tif (src.length === length) return src;\n\t\ttarget = generate(length)(src);\n\t\ttry { mixin(target, src); }\n\t\tcatch (ignore) {}\n\t\treturn target;\n\t};\n}\n","\"use strict\";\n\n// ES3 safe\nvar _undefined = void 0;\n\nmodule.exports = function (value) { return value !== _undefined && value !== null; };\n","\"use strict\";\n\nvar isValue = require(\"../value/is\");\n\n// prettier-ignore\nvar possibleTypes = { \"object\": true, \"function\": true, \"undefined\": true /* document.all */ };\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\treturn hasOwnProperty.call(possibleTypes, typeof value);\n};\n","\"use strict\";\n\nvar isPrototype = require(\"../prototype/is\");\n\nmodule.exports = function (value) {\n\tif (typeof value !== \"function\") return false;\n\n\tif (!hasOwnProperty.call(value, \"length\")) return false;\n\n\ttry {\n\t\tif (typeof value.length !== \"number\") return false;\n\t\tif (typeof value.call !== \"function\") return false;\n\t\tif (typeof value.apply !== \"function\") return false;\n\t} catch (error) {\n\t\treturn false;\n\t}\n\n\treturn !isPrototype(value);\n};\n","\"use strict\";\n\nvar isObject = require(\"../object/is\");\n\nmodule.exports = function (value) {\n\tif (!isObject(value)) return false;\n\ttry {\n\t\tif (!value.constructor) return false;\n\t\treturn value.constructor.prototype === value;\n\t} catch (error) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isFunction = require(\"../function/is\");\n\nvar classRe = /^\\s*class[\\s{/}]/, functionToString = Function.prototype.toString;\n\nmodule.exports = function (value) {\n\tif (!isFunction(value)) return false;\n\tif (classRe.test(functionToString.call(value))) return false;\n\treturn true;\n};\n","\"use strict\";\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? String.prototype.contains : require(\"./shim\");\n","\"use strict\";\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString /*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n","\"use strict\";\n\nvar isValue = require(\"type/value/is\")\n , isPlainFunction = require(\"type/plain-function/is\")\n , assign = require(\"es5-ext/object/assign\")\n , normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , contains = require(\"es5-ext/string/#/contains\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n","'use strict';\n\nvar d = require('d')\n , callable = require('es5-ext/object/valid-callable')\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n","\"use strict\";\n\nvar toArray = require(\"es5-ext/array/to-array\")\n , isValue = require(\"es5-ext/object/is-value\")\n , callable = require(\"es5-ext/object/valid-callable\");\n\nvar slice = Array.prototype.slice, resolveArgs;\n\nresolveArgs = function (args) {\n\treturn this.map(function (resolve, i) { return resolve ? resolve(args[i]) : args[i]; }).concat(\n\t\tslice.call(args, this.length)\n\t);\n};\n\nmodule.exports = function (resolvers) {\n\tresolvers = toArray(resolvers);\n\tresolvers.forEach(function (resolve) { if (isValue(resolve)) callable(resolve); });\n\treturn resolveArgs.bind(resolvers);\n};\n","\"use strict\";\n\nvar from = require(\"./from\")\n , isArray = Array.isArray;\n\nmodule.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); };\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\");\n\nmodule.exports = function (userNormalizer) {\n\tvar normalizer;\n\tif (typeof userNormalizer === \"function\") return { set: userNormalizer, get: userNormalizer };\n\tnormalizer = { get: callable(userNormalizer.get) };\n\tif (userNormalizer.set !== undefined) {\n\t\tnormalizer.set = callable(userNormalizer.set);\n\t\tif (userNormalizer.delete) normalizer.delete = callable(userNormalizer.delete);\n\t\tif (userNormalizer.clear) normalizer.clear = callable(userNormalizer.clear);\n\t\treturn normalizer;\n\t}\n\tnormalizer.set = normalizer.get;\n\treturn normalizer;\n};\n","/* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n\"use strict\";\n\nvar customError = require(\"es5-ext/error/custom\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , d = require(\"d\")\n , ee = require(\"event-emitter\").methods\n , resolveResolve = require(\"./resolve-resolve\")\n , resolveNormalize = require(\"./resolve-normalize\");\n\nvar apply = Function.prototype.apply\n , call = Function.prototype.call\n , create = Object.create\n , defineProperties = Object.defineProperties\n , on = ee.on\n , emit = ee.emit;\n\nmodule.exports = function (original, length, options) {\n\tvar cache = create(null)\n\t , conf\n\t , memLength\n\t , get\n\t , set\n\t , del\n\t , clear\n\t , extDel\n\t , extGet\n\t , extHas\n\t , normalizer\n\t , getListeners\n\t , setListeners\n\t , deleteListeners\n\t , memoized\n\t , resolve;\n\tif (length !== false) memLength = length;\n\telse if (isNaN(original.length)) memLength = 1;\n\telse memLength = original.length;\n\n\tif (options.normalizer) {\n\t\tnormalizer = resolveNormalize(options.normalizer);\n\t\tget = normalizer.get;\n\t\tset = normalizer.set;\n\t\tdel = normalizer.delete;\n\t\tclear = normalizer.clear;\n\t}\n\tif (options.resolvers != null) resolve = resolveResolve(options.resolvers);\n\n\tif (get) {\n\t\tmemoized = defineLength(function (arg) {\n\t\t\tvar id, result, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id !== null) {\n\t\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\t\treturn cache[id];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (id === null) {\n\t\t\t\tid = get(args);\n\t\t\t\tif (id !== null) throw customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t\tid = set(args);\n\t\t\t} else if (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\tmemoized = function () {\n\t\t\tvar result;\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", \"data\", arguments, this);\n\t\t\t\treturn cache.data;\n\t\t\t}\n\t\t\tif (arguments.length) result = apply.call(original, this, arguments);\n\t\t\telse result = call.call(original, this);\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache.data = result;\n\t\t\tif (setListeners) conf.emit(\"set\", \"data\", null, result);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\tmemoized = function (arg) {\n\t\t\tvar result, args = arguments, id;\n\t\t\tif (resolve) args = resolve(arguments);\n\t\t\tid = String(args[0]);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\treturn cache[id];\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t};\n\t}\n\tconf = {\n\t\toriginal: original,\n\t\tmemoized: memoized,\n\t\tprofileName: options.profileName,\n\t\tget: function (args) {\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tif (get) return get(args);\n\t\t\treturn String(args[0]);\n\t\t},\n\t\thas: function (id) { return hasOwnProperty.call(cache, id); },\n\t\tdelete: function (id) {\n\t\t\tvar result;\n\t\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\t\tif (del) del(id);\n\t\t\tresult = cache[id];\n\t\t\tdelete cache[id];\n\t\t\tif (deleteListeners) conf.emit(\"delete\", id, result);\n\t\t},\n\t\tclear: function () {\n\t\t\tvar oldCache = cache;\n\t\t\tif (clear) clear();\n\t\t\tcache = create(null);\n\t\t\tconf.emit(\"clear\", oldCache);\n\t\t},\n\t\ton: function (type, listener) {\n\t\t\tif (type === \"get\") getListeners = true;\n\t\t\telse if (type === \"set\") setListeners = true;\n\t\t\telse if (type === \"delete\") deleteListeners = true;\n\t\t\treturn on.call(this, type, listener);\n\t\t},\n\t\temit: emit,\n\t\tupdateEnv: function () { original = conf.original; },\n\t};\n\tif (get) {\n\t\textDel = defineLength(function (arg) {\n\t\t\tvar id, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id === null) return;\n\t\t\tconf.delete(id);\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\textDel = function () { return conf.delete(\"data\"); };\n\t} else {\n\t\textDel = function (arg) {\n\t\t\tif (resolve) arg = resolve(arguments)[0];\n\t\t\treturn conf.delete(arg);\n\t\t};\n\t}\n\textGet = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return cache.data;\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\treturn cache[id];\n\t});\n\textHas = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return conf.has(\"data\");\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\tif (id === null) return false;\n\t\treturn conf.has(id);\n\t});\n\tdefineProperties(memoized, {\n\t\t__memoized__: d(true),\n\t\tdelete: d(extDel),\n\t\tclear: d(conf.clear),\n\t\t_get: d(extGet),\n\t\t_has: d(extHas),\n\t});\n\treturn conf;\n};\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"./lib/registered-extensions\")\n , configure = require(\"./lib/configure-map\")\n , resolveLength = require(\"./lib/resolve-length\");\n\nmodule.exports = function self(fn/*, options */) {\n\tvar options, length, conf;\n\n\tcallable(fn);\n\toptions = Object(arguments[1]);\n\n\tif (options.async && options.promise) {\n\t\tthrow new Error(\"Options 'async' and 'promise' cannot be used together\");\n\t}\n\n\t// Do not memoize already memoized function\n\tif (hasOwnProperty.call(fn, \"__memoized__\") && !options.force) return fn;\n\n\t// Resolve length;\n\tlength = resolveLength(options.length, fn.length, options.async && extensions.async);\n\n\t// Configure cache map\n\tconf = configure(fn, length, options);\n\n\t// Bind eventual extensions\n\tforEach(extensions, function (extFn, name) {\n\t\tif (options[name]) extFn(options[name], conf, options);\n\t});\n\n\tif (self.__profiler__) self.__profiler__(conf);\n\n\tconf.updateEnv();\n\treturn conf.memoized;\n};\n","\"use strict\";\n\nvar normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , resolveLength = require(\"./lib/resolve-length\")\n , plain = require(\"./plain\");\n\nmodule.exports = function (fn/*, options*/) {\n\tvar options = normalizeOpts(arguments[1]), length;\n\n\tif (!options.normalizer) {\n\t\tlength = options.length = resolveLength(options.length, fn.length, options.async);\n\t\tif (length !== 0) {\n\t\t\tif (options.primitive) {\n\t\t\t\tif (length === false) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/primitive\");\n\t\t\t\t} else if (length > 1) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/get-primitive-fixed\")(length);\n\t\t\t\t}\n\t\t\t} else if (length === false) options.normalizer = require(\"./normalizers/get\")();\n\t\t\telse if (length === 1) options.normalizer = require(\"./normalizers/get-1\")();\n\t\t\telse options.normalizer = require(\"./normalizers/get-fixed\")(length);\n\t\t}\n\t}\n\n\t// Assure extensions\n\tif (options.async) require(\"./ext/async\");\n\tif (options.promise) require(\"./ext/promise\");\n\tif (options.dispose) require(\"./ext/dispose\");\n\tif (options.maxAge) require(\"./ext/max-age\");\n\tif (options.max) require(\"./ext/max\");\n\tif (options.refCounter) require(\"./ext/ref-counter\");\n\n\treturn plain(fn, options);\n};\n","\"use strict\";\n\nmodule.exports = function (args) {\n\tvar id, i, length = args.length;\n\tif (!length) return \"\\u0002\";\n\tid = String(args[(i = 0)]);\n\twhile (--length) id += \"\\u0001\" + args[++i];\n\treturn id;\n};\n","\"use strict\";\n\nmodule.exports = function (length) {\n\tif (!length) {\n\t\treturn function () { return \"\"; };\n\t}\n\treturn function (args) {\n\t\tvar id = String(args[0]), i = 0, currentLength = length;\n\t\twhile (--currentLength) {\n\t\t\tid += \"\\u0001\" + args[++i];\n\t\t}\n\t\treturn id;\n\t};\n};\n","/* eslint max-statements: 0 */\n\n\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nvar create = Object.create;\n\nmodule.exports = function () {\n\tvar lastId = 0, map = [], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) return set[length] || null;\n\t\t\tif ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) return null;\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\treturn set[1][i] || null;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) {\n\t\t\t\tset[length] = ++lastId;\n\t\t\t} else {\n\t\t\t\tif (!set[length]) {\n\t\t\t\t\tset[length] = [[], []];\n\t\t\t\t}\n\t\t\t\tset = set[length];\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t\t}\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t}\n\t\t\t\tset[1][i] = ++lastId;\n\t\t\t}\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, args = cache[id], length = args.length, path = [];\n\t\t\tif (length === 0) {\n\t\t\t\tdelete set[length];\n\t\t\t} else if ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tpath.push(set, i);\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tid = set[1][i];\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\t\ti = path.pop();\n\t\t\t\t\tset = path.pop();\n\t\t\t\t\tset[0].splice(i, 1);\n\t\t\t\t\tset[1].splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nmodule.exports = function () {\n\tvar lastId = 0, argsMap = [], cache = [];\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = indexOf.call(argsMap, args[0]);\n\t\t\treturn index === -1 ? null : cache[index];\n\t\t},\n\t\tset: function (args) {\n\t\t\targsMap.push(args[0]);\n\t\t\tcache.push(++lastId);\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = indexOf.call(cache, id);\n\t\t\tif (index !== -1) {\n\t\t\t\targsMap.splice(index, 1);\n\t\t\t\tcache.splice(index, 1);\n\t\t\t}\n\t\t},\n\t\tclear: function () {\n\t\t\targsMap = [];\n\t\t\tcache = [];\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\")\n , create = Object.create;\n\nmodule.exports = function (length) {\n\tvar lastId = 0, map = [[], []], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) return null;\n\t\t\treturn set[1][i] || null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t}\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t}\n\t\t\tset[1][i] = ++lastId;\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, path = [], args = cache[id];\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpath.push(set, i);\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tid = set[1][i];\n\t\t\tset[0].splice(i, 1);\n\t\t\tset[1].splice(i, 1);\n\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\ti = path.pop();\n\t\t\t\tset = path.pop();\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [[], []];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","/* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n// Support for asynchronous functions\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , objectMap = require(\"es5-ext/object/map\")\n , mixin = require(\"es5-ext/object/mixin\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , nextTick = require(\"next-tick\");\n\nvar slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create;\n\nrequire(\"../lib/registered-extensions\").async = function (tbi, conf) {\n\tvar waiting = create(null)\n\t , cache = create(null)\n\t , base = conf.memoized\n\t , original = conf.original\n\t , currentCallback\n\t , currentContext\n\t , currentArgs;\n\n\t// Initial\n\tconf.memoized = defineLength(function (arg) {\n\t\tvar args = arguments, last = args[args.length - 1];\n\t\tif (typeof last === \"function\") {\n\t\t\tcurrentCallback = last;\n\t\t\targs = slice.call(args, 0, -1);\n\t\t}\n\t\treturn base.apply((currentContext = this), (currentArgs = args));\n\t}, base);\n\ttry { mixin(conf.memoized, base); }\n\tcatch (ignore) {}\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id) {\n\t\tvar cb, context, args;\n\t\tif (!currentCallback) return;\n\n\t\t// Unresolved\n\t\tif (waiting[id]) {\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback];\n\t\t\telse waiting[id].push(currentCallback);\n\t\t\tcurrentCallback = null;\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolved, assure next tick invocation\n\t\tcb = currentCallback;\n\t\tcontext = currentContext;\n\t\targs = currentArgs;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\tnextTick(function () {\n\t\t\tvar data;\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tdata = cache[id];\n\t\t\t\tconf.emit(\"getasync\", id, args, context);\n\t\t\t\tapply.call(cb, data.context, data.args);\n\t\t\t} else {\n\t\t\t\t// Purged in a meantime, we shouldn't rely on cached value, recall\n\t\t\t\tcurrentCallback = cb;\n\t\t\t\tcurrentContext = context;\n\t\t\t\tcurrentArgs = args;\n\t\t\t\tbase.apply(context, args);\n\t\t\t}\n\t\t});\n\t});\n\n\t// Not from cache\n\tconf.original = function () {\n\t\tvar args, cb, origCb, result;\n\t\tif (!currentCallback) return apply.call(original, this, arguments);\n\t\targs = aFrom(arguments);\n\t\tcb = function self(err) {\n\t\t\tvar cb, args, id = self.id;\n\t\t\tif (id == null) {\n\t\t\t\t// Shouldn't happen, means async callback was called sync way\n\t\t\t\tnextTick(apply.bind(self, this, arguments));\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tdelete self.id;\n\t\t\tcb = waiting[id];\n\t\t\tdelete waiting[id];\n\t\t\tif (!cb) {\n\t\t\t\t// Already processed,\n\t\t\t\t// outcome of race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\targs = aFrom(arguments);\n\t\t\tif (conf.has(id)) {\n\t\t\t\tif (err) {\n\t\t\t\t\tconf.delete(id);\n\t\t\t\t} else {\n\t\t\t\t\tcache[id] = { context: this, args: args };\n\t\t\t\t\tconf.emit(\"setasync\", id, typeof cb === \"function\" ? 1 : cb.length);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof cb === \"function\") {\n\t\t\t\tresult = apply.call(cb, this, args);\n\t\t\t} else {\n\t\t\t\tcb.forEach(function (cb) { result = apply.call(cb, this, args); }, this);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\torigCb = currentCallback;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\targs.push(cb);\n\t\tresult = apply.call(original, this, args);\n\t\tcb.cb = origCb;\n\t\tcurrentCallback = cb;\n\t\treturn result;\n\t};\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id) {\n\t\tif (!currentCallback) {\n\t\t\tconf.delete(id);\n\t\t\treturn;\n\t\t}\n\t\tif (waiting[id]) {\n\t\t\t// Race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback.cb];\n\t\t\telse waiting[id].push(currentCallback.cb);\n\t\t} else {\n\t\t\twaiting[id] = currentCallback.cb;\n\t\t}\n\t\tdelete currentCallback.cb;\n\t\tcurrentCallback.id = id;\n\t\tcurrentCallback = null;\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tvar result;\n\t\t// If false, we don't have value yet, so we assume that intention is not\n\t\t// to memoize this call. After value is obtained we don't cache it but\n\t\t// gracefully pass to callback\n\t\tif (hasOwnProperty.call(waiting, id)) return;\n\t\tif (!cache[id]) return;\n\t\tresult = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, slice.call(result.args, 1));\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\tconf.emit(\n\t\t\t\"clearasync\", objectMap(oldCache, function (data) { return slice.call(data.args, 1); })\n\t\t);\n\t});\n};\n","// Call dispose callback on each cache purge\n\n\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"../lib/registered-extensions\")\n , apply = Function.prototype.apply;\n\nextensions.dispose = function (dispose, conf, options) {\n\tvar del;\n\tcallable(dispose);\n\tif ((options.async && extensions.async) || (options.promise && extensions.promise)) {\n\t\tconf.on(\n\t\t\t\"deleteasync\",\n\t\t\t(del = function (id, resultArray) { apply.call(dispose, null, resultArray); })\n\t\t);\n\t\tconf.on(\"clearasync\", function (cache) {\n\t\t\tforEach(cache, function (result, id) { del(id, result); });\n\t\t});\n\t\treturn;\n\t}\n\tconf.on(\"delete\", (del = function (id, result) { dispose(result); }));\n\tconf.on(\"clear\", function (cache) {\n\t\tforEach(cache, function (result, id) { del(id, result); });\n\t});\n};\n","/* eslint consistent-this: 0 */\n\n// Timeout cached values\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , forEach = require(\"es5-ext/object/for-each\")\n , nextTick = require(\"next-tick\")\n , isPromise = require(\"is-promise\")\n , timeout = require(\"timers-ext/valid-timeout\")\n , extensions = require(\"../lib/registered-extensions\");\n\nvar noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create;\n\nextensions.maxAge = function (maxAge, conf, options) {\n\tvar timeouts, postfix, preFetchAge, preFetchTimeouts;\n\n\tmaxAge = timeout(maxAge);\n\tif (!maxAge) return;\n\n\ttimeouts = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\tconf.on(\"set\" + postfix, function (id) {\n\t\ttimeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge);\n\t\tif (typeof timeouts[id].unref === \"function\") timeouts[id].unref();\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id]) {\n\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\t}\n\t\tpreFetchTimeouts[id] = setTimeout(function () {\n\t\t\tdelete preFetchTimeouts[id];\n\t\t}, preFetchAge);\n\t\tif (typeof preFetchTimeouts[id].unref === \"function\") preFetchTimeouts[id].unref();\n\t});\n\tconf.on(\"delete\" + postfix, function (id) {\n\t\tclearTimeout(timeouts[id]);\n\t\tdelete timeouts[id];\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\tdelete preFetchTimeouts[id];\n\t});\n\n\tif (options.preFetch) {\n\t\tif (options.preFetch === true || isNaN(options.preFetch)) {\n\t\t\tpreFetchAge = 0.333;\n\t\t} else {\n\t\t\tpreFetchAge = max(min(Number(options.preFetch), 1), 0);\n\t\t}\n\t\tif (preFetchAge) {\n\t\t\tpreFetchTimeouts = {};\n\t\t\tpreFetchAge = (1 - preFetchAge) * maxAge;\n\t\t\tconf.on(\"get\" + postfix, function (id, args, context) {\n\t\t\t\tif (!preFetchTimeouts[id]) {\n\t\t\t\t\tpreFetchTimeouts[id] = \"nextTick\";\n\t\t\t\t\tnextTick(function () {\n\t\t\t\t\t\tvar result;\n\t\t\t\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") return;\n\t\t\t\t\t\tdelete preFetchTimeouts[id];\n\t\t\t\t\t\tconf.delete(id);\n\t\t\t\t\t\tif (options.async) {\n\t\t\t\t\t\t\targs = aFrom(args);\n\t\t\t\t\t\t\targs.push(noop);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult = conf.memoized.apply(context, args);\n\t\t\t\t\t\tif (options.promise) {\n\t\t\t\t\t\t\t// Supress eventual error warnings\n\t\t\t\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\t\t\t\tif (typeof result.done === \"function\") result.done(noop, noop);\n\t\t\t\t\t\t\t\telse result.then(noop, noop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tconf.on(\"clear\" + postfix, function () {\n\t\tforEach(timeouts, function (id) { clearTimeout(id); });\n\t\ttimeouts = {};\n\t\tif (preFetchTimeouts) {\n\t\t\tforEach(preFetchTimeouts, function (id) { if (id !== \"nextTick\") clearTimeout(id); });\n\t\t\tpreFetchTimeouts = {};\n\t\t}\n\t});\n};\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\")\n , maxTimeout = require(\"./max-timeout\");\n\nmodule.exports = function (value) {\n\tvalue = toPosInt(value);\n\tif (value > maxTimeout) throw new TypeError(value + \" exceeds maximum possible timeout\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = 2147483647;\n","// Limit cache size, LRU (least recently used) algorithm.\n\n\"use strict\";\n\nvar toPosInteger = require(\"es5-ext/number/to-pos-integer\")\n , lruQueue = require(\"lru-queue\")\n , extensions = require(\"../lib/registered-extensions\");\n\nextensions.max = function (max, conf, options) {\n\tvar postfix, queue, hit;\n\n\tmax = toPosInteger(max);\n\tif (!max) return;\n\n\tqueue = lruQueue(max);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\n\t\t\"set\" + postfix,\n\t\t(hit = function (id) {\n\t\t\tid = queue.hit(id);\n\t\t\tif (id === undefined) return;\n\t\t\tconf.delete(id);\n\t\t})\n\t);\n\tconf.on(\"get\" + postfix, hit);\n\tconf.on(\"delete\" + postfix, queue.delete);\n\tconf.on(\"clear\" + postfix, queue.clear);\n};\n","'use strict';\n\nvar toPosInt = require('es5-ext/number/to-pos-integer')\n\n , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;\n\nmodule.exports = function (limit) {\n\tvar size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;\n\tlimit = toPosInt(limit);\n\treturn {\n\t\thit: function (id) {\n\t\t\tvar oldIndex = map[id], nuIndex = ++index;\n\t\t\tqueue[nuIndex] = id;\n\t\t\tmap[id] = nuIndex;\n\t\t\tif (!oldIndex) {\n\t\t\t\t++size;\n\t\t\t\tif (size <= limit) return;\n\t\t\t\tid = queue[base];\n\t\t\t\tdel(id);\n\t\t\t\treturn id;\n\t\t\t}\n\t\t\tdelete queue[oldIndex];\n\t\t\tif (base !== oldIndex) return;\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tdelete: del = function (id) {\n\t\t\tvar oldIndex = map[id];\n\t\t\tif (!oldIndex) return;\n\t\t\tdelete queue[oldIndex];\n\t\t\tdelete map[id];\n\t\t\t--size;\n\t\t\tif (base !== oldIndex) return;\n\t\t\tif (!size) {\n\t\t\t\tindex = 0;\n\t\t\t\tbase = 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tclear: function () {\n\t\t\tsize = 0;\n\t\t\tbase = 1;\n\t\t\tqueue = create(null);\n\t\t\tmap = create(null);\n\t\t\tindex = 0;\n\t\t}\n\t};\n};\n","// Reference counter, useful for garbage collector like functionality\n\n\"use strict\";\n\nvar d = require(\"d\")\n , extensions = require(\"../lib/registered-extensions\")\n , create = Object.create\n , defineProperties = Object.defineProperties;\n\nextensions.refCounter = function (ignore, conf, options) {\n\tvar cache, postfix;\n\n\tcache = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\"set\" + postfix, function (id, length) { cache[id] = length || 1; });\n\tconf.on(\"get\" + postfix, function (id) { ++cache[id]; });\n\tconf.on(\"delete\" + postfix, function (id) { delete cache[id]; });\n\tconf.on(\"clear\" + postfix, function () { cache = {}; });\n\n\tdefineProperties(conf.memoized, {\n\t\tdeleteRef: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return null;\n\t\t\tif (!cache[id]) return null;\n\t\t\tif (!--cache[id]) {\n\t\t\t\tconf.delete(id);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}),\n\t\tgetRefCount: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return 0;\n\t\t\tif (!cache[id]) return 0;\n\t\t\treturn cache[id];\n\t\t}),\n\t});\n};\n","const os = require(\"os\");\r\n\r\n// to detect on with os user had used path.resolve(...)\r\nconst is_posix_os = (os.platform() !== \"win32\");\r\nconst version = os.release();\r\n\r\n// For some windows version (Windows 10 v1803), it is not useful to escape spaces in path\r\n// https://docs.microsoft.com/en-us/windows/release-information/\r\nconst windows_version_regex = /(\\d+\\.\\d+)\\.(\\d+)/;\r\nconst should_not_escape = (major_release = \"\", os_build = \"\") =>\r\n /1\\d+\\.\\d+/.test(major_release) && Number(os_build) >= 17134.1184;\r\n\r\nmodule.exports = function (given_path) {\r\n return (is_posix_os)\r\n // for posix path, escape is simple\r\n ? given_path.replace(/(\\s+)/g, '\\\\$1')\r\n // for windows, it depend of the build\r\n : (should_not_escape(...windows_version_regex.exec(version).splice(1)))\r\n // on major version, no need to escape anymore\r\n // https://support.microsoft.com/en-us/help/4467268/url-encoded-unc-paths-not-url-decoded-in-windows-10-version-1803-later\r\n ? given_path\r\n // on older version, replace space with symbol %20\r\n : given_path.replace(/(\\s+)/g, '%20');\r\n};","// Generated by CoffeeScript 1.10.0\n(function() {\n var regexEscape, reverse;\n\n regexEscape = require('escape-string-regexp');\n\n reverse = function(s) {\n return s.split('').reverse().join('');\n };\n\n module.exports = function(s, chars, escapeChar) {\n var regex;\n if (chars == null) {\n chars = '\\'';\n }\n if (escapeChar == null) {\n escapeChar = '\\\\';\n }\n if (typeof s !== 'string') {\n return s;\n }\n regex = new RegExp(\"([\" + (regexEscape(chars)) + \"])(?!\" + (regexEscape(escapeChar)) + \")\", 'g');\n return reverse(reverse(s).replace(regex, \"$1\" + escapeChar));\n };\n\n}).call(this);\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","(function () {\n\n 'use strict';\n\n var root = this;\n\n\n //=========//\n // GLOBALS //\n //=========//\n\n var locales = {};\n\n\n //==========//\n // EXPOSING //\n //==========//\n\n var moduleDefinition = {\n create: factory,\n addLocale: addLocale,\n pluralize: pluralize\n };\n\n if ('undefined' !== typeof module && 'undefined' !== typeof module.exports) {\n module.exports = moduleDefinition;\n } else {\n root.numerous = moduleDefinition;\n }\n\n\n //==================//\n // PUBLIC FUNCTIONS //\n //==================//\n\n /**\n * Creates new instance of numerous.\n *\n * @param {string} locale\n * @returns {object}\n */\n function factory (locale) {\n\n checkLocale(locale);\n\n return {\n pluralize: function (value, variants) {\n return pluralize(locale, value, variants);\n }\n };\n }\n\n /**\n * Adds pluralization function for specified locale.\n * Usually externally called by locale itself.\n *\n * @param {string} locale\n * @param {function} callable\n */\n function addLocale (locale, callable) {\n locales[locale] = callable;\n }\n\n /**\n * Returns variant from the specified list of variants\n * according to the specified value and locale.\n *\n * @param {string} locale\n * @param {int} value\n * @param {object} variants\n */\n function pluralize (locale, value, variants) {\n\n checkLocale(locale);\n\n if ('object' !== typeof variants) {\n throw new Error('List of variants should be specified as an object');\n }\n\n var key = locales[locale](value);\n\n return ('undefined' !== typeof variants[key] ? variants[key] : null);\n }\n\n\n //===================//\n // PRIVATE FUNCTIONS //\n //===================//\n\n /**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} locale\n *\n * @returns {boolean}\n */\n function hasLocale (locale) {\n return ('undefined' !== typeof locales[locale]);\n }\n\n /**\n * Checks if locale is loaded. If not, tries to load it.\n *\n * @param {string} locale\n */\n function checkLocale (locale) {\n if (!hasLocale(locale)) {\n requireLocale(locale);\n }\n }\n\n /**\n * Tries to load the specified locale.\n *\n * @param {string} locale\n */\n function requireLocale (locale) {\n try {\n require(__dirname + '/../locales/' + locale + '.js');\n } catch (error) {\n throw Error('Failed to load the following locale: ' + locale);\n }\n }\n\n}).call(this);\n","module.exports = require('./lib/numerous.js');\n","(function () {\n var root = this;\n var numerous;\n if ('function' === typeof require) {\n numerous = require('../lib/numerous.js');\n } else {\n numerous = root.numerous;\n }\n numerous.addLocale('en', function pluralize_en(n /*``*/ ) {\n var i = Math.floor(Math.abs(n)),\n v = n.toString().replace(/^[^.]*\\.?/, \"\").length;\n if (typeof n === \"string\") n = parseInt(n, 10);\n if (i === 1 && v === 0) return \"one\";\n return \"other\"\n });\n}).call(this);","// Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md\n'use strict';\n\nexports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node);\n","\nmodule.exports = require('./lib/time-delta.js');\n","module.exports = {\n \"id\": \"en\",\n \"data\": {\n \"long\": {\n \"years\": {\n \"one\": \"{0} year\",\n \"other\": \"{0} years\"\n },\n \"months\": {\n \"one\": \"{0} month\",\n \"other\": \"{0} months\"\n },\n \"weeks\": {\n \"one\": \"{0} week\",\n \"other\": \"{0} weeks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hour\",\n \"other\": \"{0} hours\"\n },\n \"minutes\": {\n \"one\": \"{0} minute\",\n \"other\": \"{0} minutes\"\n },\n \"seconds\": {\n \"one\": \"{0} second\",\n \"other\": \"{0} seconds\"\n }\n },\n \"narrow\": {\n \"years\": {\n \"one\": \"{0}y\",\n \"other\": \"{0}y\"\n },\n \"months\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"weeks\": {\n \"one\": \"{0}w\",\n \"other\": \"{0}w\"\n },\n \"days\": {\n \"one\": \"{0}d\",\n \"other\": \"{0}d\"\n },\n \"hours\": {\n \"one\": \"{0}h\",\n \"other\": \"{0}h\"\n },\n \"minutes\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"seconds\": {\n \"one\": \"{0}s\",\n \"other\": \"{0}s\"\n }\n },\n \"short\": {\n \"years\": {\n \"one\": \"{0} yr\",\n \"other\": \"{0} yrs\"\n },\n \"months\": {\n \"one\": \"{0} mth\",\n \"other\": \"{0} mths\"\n },\n \"weeks\": {\n \"one\": \"{0} wk\",\n \"other\": \"{0} wks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hr\",\n \"other\": \"{0} hr\"\n },\n \"minutes\": {\n \"one\": \"{0} min\",\n \"other\": \"{0} min\"\n },\n \"seconds\": {\n \"one\": \"{0} sec\",\n \"other\": \"{0} sec\"\n }\n }\n }\n};\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","class LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.DownloaderHelper=exports.DH_STATES=void 0;var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},_createClass=function(){function a(a,b){for(var c,d=0;dthis.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=b||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:'getOptions',value:function a(){return this.__opts}},{key:'getMetadata',value:function a(){return this.__opts.metadata}},{key:'getStats',value:function a(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:'getTotalSize',value:function b(){var a=this;return new Promise(function(b,c){var d=function(b){a.__initProtocol(b);var c=Object.assign({},a.__headers);c.hasOwnProperty('range')&&delete c.range;var d=a.__getReqOptions('HEAD',b,c);return Object.assign({},a.__reqOptions,d)},e=function(f,g){var h=a.__protocol.request(g,function(g){if(a.__isRequireRedirect(g)){var h=/^https?:\\/\\//.test(g.headers.location)?g.headers.location:new _url.URL(g.headers.location,f).href;return a.emit('redirected',h,f),e(h,d(h))}return 200===g.statusCode?void b({name:a.__getFileNameFromHeaders(g.headers,g),total:parseInt(g.headers['content-length'])||null}):c(new Error('Response status was '+g.statusCode))});h.on('error',function(a){return c(a)}),h.on('timeout',function(){return c(new Error('timeout'))}),h.on('uncaughtException',function(a){return c(a)}),h.end()};e(a.url,d(a.url))})}},{key:'getResumeState',value:function a(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:'resumeFromFile',value:function d(a){var b=this,c=1=g))return this.emit('skip',{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:f}),this.__setState(this.__states.SKIPPED),b(!0)}this.__fileStream=fs.createWriteStream(this.__filePath,{})}else this.__fileStream=fs.createWriteStream(this.__filePath,{flags:'a'});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,e.on('data',function(a){return d.__calculateStats(a.length)}),this.__pipes.forEach(function(a){e.pipe(a.stream,a.options),e=a.stream}),e.pipe(this.__fileStream),e.on('error',this.__onError(b,c)),this.__fileStream.on('finish',this.__onFinished(b,c)),this.__fileStream.on('error',this.__onError(b,c))}},{key:'__hasFinished',value:function a(){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 b(a){return 300a.statusCode&&a.headers.hasOwnProperty('location')&&a.headers.location}},{key:'__onFinished',value:function d(a,b){var c=this;return function(){c.__fileStream.close(function(d){if(d)return b(d);if(c.__hasFinished()){var e=!!c.__total&&c.__downloaded!==c.__total;if(e&&c.__isResumable&&c.__opts.resumeOnIncomplete&&c.__resumeRetryCount<=c.__opts.resumeOnIncompleteMaxRetry)return c.__resumeRetryCount++,c.emit('warning',new Error('uncomplete download, retrying')),c.resume();c.__setState(c.__states.FINISHED),c.__pipes=[],c.emit('end',{fileName:c.__fileName,filePath:c.__filePath,totalSize:c.__total,incomplete:e,onDiskSize:c.__getFilesizeInBytes(c.__filePath),downloadedSize:c.__downloaded})}return a(c.__downloaded===c.__total)})}}},{key:'__closeFileStream',value:function b(){var a=this;return this.__fileStream?new Promise(function(b,c){a.__fileStream.close(function(a){return a?c(a):b(!0)})}):Promise.resolve(!0)}},{key:'__onError',value:function e(a,b){var c=this,d=!!(2=g?Promise.reject(b||new Error('reached the maximum retries')):(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit('retry',this.__retryCount,this.__opts.retry,b),this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(a){return a.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return new Promise(function(b){return a.__retryTimeout=setTimeout(function(){return b(0this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=b,this.emit('progress.throttled',this.getStats())),this.emit('progress',this.getStats()))}},{key:'__setState',value:function b(a){this.state=a,this.emit('stateChanged',this.state)}},{key:'__getReqOptions',value:function f(a,b){var c=2 validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;\nconst semver = __importStar(require(\"semver\"));\nconst core_1 = require(\"@actions/core\");\n// needs to be require for core node modules to be mocked\n/* eslint @typescript-eslint/no-require-imports: 0 */\nconst os = require(\"os\");\nconst cp = require(\"child_process\");\nconst fs = require(\"fs\");\nfunction _findMatch(versionSpec, stable, candidates, archFilter) {\n return __awaiter(this, void 0, void 0, function* () {\n const platFilter = os.platform();\n let result;\n let match;\n let file;\n for (const candidate of candidates) {\n const version = candidate.version;\n core_1.debug(`check ${version} satisfies ${versionSpec}`);\n if (semver.satisfies(version, versionSpec) &&\n (!stable || candidate.stable === stable)) {\n file = candidate.files.find(item => {\n core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);\n let chk = item.arch === archFilter && item.platform === platFilter;\n if (chk && item.platform_version) {\n const osVersion = module.exports._getOsVersion();\n if (osVersion === item.platform_version) {\n chk = true;\n }\n else {\n chk = semver.satisfies(osVersion, item.platform_version);\n }\n }\n return chk;\n });\n if (file) {\n core_1.debug(`matched ${candidate.version}`);\n match = candidate;\n break;\n }\n }\n }\n if (match && file) {\n // clone since we're mutating the file list to be only the file that matches\n result = Object.assign({}, match);\n result.files = [file];\n }\n return result;\n });\n}\nexports._findMatch = _findMatch;\nfunction _getOsVersion() {\n // TODO: add windows and other linux, arm variants\n // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python)\n const plat = os.platform();\n let version = '';\n if (plat === 'darwin') {\n version = cp.execSync('sw_vers -productVersion').toString();\n }\n else if (plat === 'linux') {\n // lsb_release process not in some containers, readfile\n // Run cat /etc/lsb-release\n // DISTRIB_ID=Ubuntu\n // DISTRIB_RELEASE=18.04\n // DISTRIB_CODENAME=bionic\n // DISTRIB_DESCRIPTION=\"Ubuntu 18.04.4 LTS\"\n const lsbContents = module.exports._readLinuxVersionFile();\n if (lsbContents) {\n const lines = lsbContents.split('\\n');\n for (const line of lines) {\n const parts = line.split('=');\n if (parts.length === 2 &&\n (parts[0].trim() === 'VERSION_ID' ||\n parts[0].trim() === 'DISTRIB_RELEASE')) {\n version = parts[1]\n .trim()\n .replace(/^\"/, '')\n .replace(/\"$/, '');\n break;\n }\n }\n }\n }\n return version;\n}\nexports._getOsVersion = _getOsVersion;\nfunction _readLinuxVersionFile() {\n const lsbReleaseFile = '/etc/lsb-release';\n const osReleaseFile = '/etc/os-release';\n let contents = '';\n if (fs.existsSync(lsbReleaseFile)) {\n contents = fs.readFileSync(lsbReleaseFile).toString();\n }\n else if (fs.existsSync(osReleaseFile)) {\n contents = fs.readFileSync(osReleaseFile).toString();\n }\n return contents;\n}\nexports._readLinuxVersionFile = _readLinuxVersionFile;\n//# sourceMappingURL=manifest.js.map","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RetryHelper = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Internal class for retries\n */\nclass RetryHelper {\n constructor(maxAttempts, minSeconds, maxSeconds) {\n if (maxAttempts < 1) {\n throw new Error('max attempts should be greater than or equal to 1');\n }\n this.maxAttempts = maxAttempts;\n this.minSeconds = Math.floor(minSeconds);\n this.maxSeconds = Math.floor(maxSeconds);\n if (this.minSeconds > this.maxSeconds) {\n throw new Error('min seconds should be less than or equal to max seconds');\n }\n }\n execute(action, isRetryable) {\n return __awaiter(this, void 0, void 0, function* () {\n let attempt = 1;\n while (attempt < this.maxAttempts) {\n // Try\n try {\n return yield action();\n }\n catch (err) {\n if (isRetryable && !isRetryable(err)) {\n throw err;\n }\n core.info(err.message);\n }\n // Sleep\n const seconds = this.getSleepAmount();\n core.info(`Waiting ${seconds} seconds before trying again`);\n yield this.sleep(seconds);\n attempt++;\n }\n // Last attempt\n return yield action();\n });\n }\n getSleepAmount() {\n return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) +\n this.minSeconds);\n }\n sleep(seconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, seconds * 1000));\n });\n }\n}\nexports.RetryHelper = RetryHelper;\n//# sourceMappingURL=retry-helper.js.map","import { mkdir, mkdirSync, stat, statSync, } from 'fs';\nexport const optsArg = (opts) => {\n if (!opts) {\n opts = { mode: 0o777 };\n }\n else if (typeof opts === 'object') {\n opts = { mode: 0o777, ...opts };\n }\n else if (typeof opts === 'number') {\n opts = { mode: opts };\n }\n else if (typeof opts === 'string') {\n opts = { mode: parseInt(opts, 8) };\n }\n else {\n throw new TypeError('invalid options argument');\n }\n const resolved = opts;\n const optsFs = opts.fs || {};\n opts.mkdir = opts.mkdir || optsFs.mkdir || mkdir;\n opts.mkdirAsync = opts.mkdirAsync\n ? opts.mkdirAsync\n : async (path, options) => {\n return new Promise((res, rej) => resolved.mkdir(path, options, (er, made) => er ? rej(er) : res(made)));\n };\n opts.stat = opts.stat || optsFs.stat || stat;\n opts.statAsync = opts.statAsync\n ? opts.statAsync\n : async (path) => new Promise((res, rej) => resolved.stat(path, (err, stats) => (err ? rej(err) : res(stats))));\n opts.statSync = opts.statSync || optsFs.statSync || statSync;\n opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || mkdirSync;\n return resolved;\n};\n//# sourceMappingURL=opts-arg.js.map","import { dirname } from 'path';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpManualSync = (path, options, made) => {\n const parent = dirname(path);\n const opts = { ...optsArg(options), recursive: false };\n if (parent === path) {\n try {\n return opts.mkdirSync(path, opts);\n }\n catch (er) {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n return;\n }\n }\n try {\n opts.mkdirSync(path, opts);\n return made || path;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') {\n throw er;\n }\n try {\n if (!opts.statSync(path).isDirectory())\n throw er;\n }\n catch (_) {\n throw er;\n }\n }\n};\nexport const mkdirpManual = Object.assign(async (path, options, made) => {\n const opts = optsArg(options);\n opts.recursive = false;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirAsync(path, opts).catch(er => {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n });\n }\n return opts.mkdirAsync(path, opts).then(() => made || path, async (er) => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(parent, opts).then((made) => mkdirpManual(path, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer.code !== 'EROFS') {\n throw er;\n }\n return opts.statAsync(path).then(st => {\n if (st.isDirectory()) {\n return made;\n }\n else {\n throw er;\n }\n }, () => {\n throw er;\n });\n });\n}, { sync: mkdirpManualSync });\n//# sourceMappingURL=mkdirp-manual.js.map","import { dirname } from 'path';\nexport const findMade = async (opts, parent, path) => {\n // we never want the 'made' return value to be a root directory\n if (path === parent) {\n return;\n }\n return opts.statAsync(parent).then(st => (st.isDirectory() ? path : undefined), // will fail later\n // will fail later\n er => {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMade(opts, dirname(parent), parent)\n : undefined;\n });\n};\nexport const findMadeSync = (opts, parent, path) => {\n if (path === parent) {\n return undefined;\n }\n try {\n return opts.statSync(parent).isDirectory() ? path : undefined;\n }\n catch (er) {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMadeSync(opts, dirname(parent), parent)\n : undefined;\n }\n};\n//# sourceMappingURL=find-made.js.map","import { dirname } from 'path';\nimport { findMade, findMadeSync } from './find-made.js';\nimport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpNativeSync = (path, options) => {\n const opts = optsArg(options);\n opts.recursive = true;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirSync(path, opts);\n }\n const made = findMadeSync(opts, path);\n try {\n opts.mkdirSync(path, opts);\n return made;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts);\n }\n else {\n throw er;\n }\n }\n};\nexport const mkdirpNative = Object.assign(async (path, options) => {\n const opts = { ...optsArg(options), recursive: true };\n const parent = dirname(path);\n if (parent === path) {\n return await opts.mkdirAsync(path, opts);\n }\n return findMade(opts, path).then((made) => opts\n .mkdirAsync(path, opts)\n .then(m => made || m)\n .catch(er => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(path, opts);\n }\n else {\n throw er;\n }\n }));\n}, { sync: mkdirpNativeSync });\n//# sourceMappingURL=mkdirp-native.js.map","const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;\nimport { parse, resolve } from 'path';\nexport const pathArg = (path) => {\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n throw Object.assign(new TypeError('path must be a string without null bytes'), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n });\n }\n path = resolve(path);\n if (platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/;\n const { root } = parse(path);\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n });\n }\n }\n return path;\n};\n//# sourceMappingURL=path-arg.js.map","import { mkdir, mkdirSync } from 'fs';\nimport { optsArg } from './opts-arg.js';\nconst version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version;\nconst versArr = version.replace(/^v/, '').split('.');\nconst hasNative = +versArr[0] > 10 || (+versArr[0] === 10 && +versArr[1] >= 12);\nexport const useNativeSync = !hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdirSync === mkdirSync;\nexport const useNative = Object.assign(!hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdir === mkdir, {\n sync: useNativeSync,\n});\n//# sourceMappingURL=use-native.js.map","import { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nimport { optsArg } from './opts-arg.js';\nimport { pathArg } from './path-arg.js';\nimport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore start */\nexport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nexport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nexport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore stop */\nexport const mkdirpSync = (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNativeSync(resolved)\n ? mkdirpNativeSync(path, resolved)\n : mkdirpManualSync(path, resolved);\n};\nexport const sync = mkdirpSync;\nexport const manual = mkdirpManual;\nexport const manualSync = mkdirpManualSync;\nexport const native = mkdirpNative;\nexport const nativeSync = mkdirpNativeSync;\nexport const mkdirp = Object.assign(async (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNative(resolved)\n ? mkdirpNative(path, resolved)\n : mkdirpManual(path, resolved);\n}, {\n mkdirpSync,\n mkdirpNative,\n mkdirpNativeSync,\n mkdirpManual,\n mkdirpManualSync,\n sync: mkdirpSync,\n native: mkdirpNative,\n nativeSync: mkdirpNativeSync,\n manual: mkdirpManual,\n manualSync: mkdirpManualSync,\n useNative,\n useNativeSync,\n});\n//# sourceMappingURL=index.js.map","import { isArch } from \"../utils/env/isArch.js\"\n\nconst defaultLLVM = process.platform === \"darwin\" && process.arch === \"x64\"\n ? \"15.0.7\"\n : \"18.1.8\"\n\n/**\n * Default versions for the tools\n * DefaultUbuntuVersion overrides the default version for the tools on Ubuntu\n */\nexport const DefaultVersions: Record = {\n // https://github.com/llvm/llvm-project/releases\n llvm: defaultLLVM,\n clangtidy: defaultLLVM,\n clangformat: defaultLLVM,\n ninja: \"1.12.1\", // https://github.com/ninja-build/ninja/releases\n cmake: \"3.30.2\", // https://github.com/Kitware/CMake/releases\n gcovr: \"5.2\", // \"6.0\", // https://pypi.org/project/gcovr/\n conan: \"1.64.1\", // 2.0.17 // https://github.com/conan-io/conan/releases\n meson: \"1.5.1\", // https://github.com/mesonbuild/meson/releases\n kcov: \"42\", // https://github.com/SimonKagstrom/kcov/releases\n task: \"3.38.0\", // https://github.com/go-task/task/releases\n doxygen: isArch() ? \"1.11.0-4\" : \"1.11.0\", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/\n gcc: process.platform === \"win32\"\n ? \"14.2.0posix-18.1.8-12.0.0-ucrt-r1\"\n : \"\", // use the default version on Ubuntu, Fedora, Arch, macOS, etc.\n // mingw: isArch() ? \"12.2.0-1\" : \"8\", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/\n powershell: \"7.4.5\",\n}\n\nexport const MinVersions: Record = {\n pip: \"22.2.0\",\n python: \"3.7.9\",\n}\n\n/// If an ubuntu versions is not in this map:\n// - the newer ubuntu versions use the first entry (e.g. v20),\n// - the older ones use \"\"\nexport const DefaultUbuntuVersion: Record | undefined> = {\n // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64\n mingw: {\n 24: \"8.0.0-1\",\n 22: \"8.0.0-1\",\n 20: \"7.0.0-2\",\n },\n gcovr: {\n 24: \"6.0\",\n 22: \"6.0\",\n 20: \"6.0\",\n 18: \"5.0\",\n },\n meson: {\n 24: \"1.0.0\",\n 22: \"1.0.0\",\n 20: \"1.0.0\",\n 18: \"0.61.4\",\n },\n nala: {\n 24: \"\",\n 22: \"\",\n 21: \"legacy\",\n 20: \"legacy\",\n 18: \"legacy\",\n 16: \"legacy\",\n 14: \"legacy\",\n },\n kcov: {\n 24: \"42-binary\",\n 22: \"42-binary\",\n 20: \"40-binary\", // https://github.com/SimonKagstrom/kcov/releases\n 18: \"40\",\n 16: \"40\",\n 14: \"40\",\n },\n doxygen: {\n 24: \"1.11.0\",\n 22: \"1.11.0\",\n 20: \"1.10.0\",\n 18: \"1.10.0\",\n },\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUbuntuVersion = void 0;\nconst child_process_1 = require(\"child_process\");\nfunction isSystemError(e) {\n return 'errno' in e;\n}\nfunction command(exe, args) {\n return new Promise((resolve, reject) => {\n child_process_1.execFile(exe, args, { encoding: 'utf8', shell: false }, (error, stdout, stderr) => {\n if (error) {\n if (isSystemError(error) && error.code === 'ENOENT') {\n resolve(null); // When lsb_release is not found\n return;\n }\n reject(new Error(`Could not execute \\`${exe} ${args.join(' ')}\\`: ${error} (stderr=${stderr})`));\n return;\n }\n resolve(stdout);\n });\n });\n}\nasync function getUbuntuVersion() {\n if (process.platform !== 'linux') {\n return [];\n }\n const stdout = await command('lsb_release', ['-a']);\n if (stdout === null) {\n return [];\n }\n const reDistributor = /^Distributor ID:\\s*(.+)$/;\n const reDescription = /^Description:\\s*Ubuntu\\s+(\\d+)\\.(\\d+)(?:\\.(\\d+))?/;\n const reRelease = /^Release:\\s*(\\d+)\\.(\\d+)(?:\\.(\\d+))?$/;\n let description = null;\n let release = null;\n let distributorFound = false;\n for (const line of stdout.split('\\n')) {\n const m = line.match(reDistributor);\n if (m !== null) {\n const distributor = m[1];\n if (distributor !== 'Ubuntu') {\n return [];\n }\n distributorFound = true;\n }\n const desc = line.match(reDescription);\n if (desc) {\n description = desc;\n }\n const rel = line.match(reRelease);\n if (rel) {\n release = rel;\n }\n if (distributorFound && description && release) {\n break;\n }\n }\n if (!distributorFound) {\n return [];\n }\n for (const m of [description, release]) {\n if (m) {\n const ss = [m[1], m[2]];\n if (m[3]) {\n ss.push(m[3]);\n }\n return ss.map(s => parseInt(s, 10));\n }\n }\n return [];\n}\nexports.getUbuntuVersion = getUbuntuVersion;\n//# sourceMappingURL=index.js.map","import os from 'node:os';\n\nconst nameMap = new Map([\n\t[24, ['Sequoia', '15']],\n\t[23, ['Sonoma', '14']],\n\t[22, ['Ventura', '13']],\n\t[21, ['Monterey', '12']],\n\t[20, ['Big Sur', '11']],\n\t[19, ['Catalina', '10.15']],\n\t[18, ['Mojave', '10.14']],\n\t[17, ['High Sierra', '10.13']],\n\t[16, ['Sierra', '10.12']],\n\t[15, ['El Capitan', '10.11']],\n\t[14, ['Yosemite', '10.10']],\n\t[13, ['Mavericks', '10.9']],\n\t[12, ['Mountain Lion', '10.8']],\n\t[11, ['Lion', '10.7']],\n\t[10, ['Snow Leopard', '10.6']],\n\t[9, ['Leopard', '10.5']],\n\t[8, ['Tiger', '10.4']],\n\t[7, ['Panther', '10.3']],\n\t[6, ['Jaguar', '10.2']],\n\t[5, ['Puma', '10.1']],\n]);\n\nexport default function macosRelease(release) {\n\trelease = Number((release || os.release()).split('.')[0]);\n\n\tconst [name, version] = nameMap.get(release) || ['Unknown', ''];\n\n\treturn {\n\t\tname,\n\t\tversion,\n\t};\n}\n","import macosRelease from \"macos-release\"\nimport memoize from \"memoizee\"\n\n/**\n * Get macOS version\n *\n * @returns {number[]} - The macOS version as an array of numbers\n */\nfunction macosVersion_() {\n if (process.platform !== \"darwin\") {\n return []\n }\n\n const { version } = macosRelease()\n return version.split(\".\").map((v) => Number.parseInt(v, 10))\n}\nexport const macosVersion = memoize(macosVersion_)\n","import { tmpdir } from \"os\"\nimport { dirname, join } from \"path\"\nimport { execRootSync } from \"admina\"\nimport { error, info } from \"ci-log\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { hasNala, installAptPack, qualifiedNeededAptPackage } from \"setup-apt\"\nimport which from \"which\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\n\nlet binDir: string | undefined\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupNala(version: string, _setupDir: string, _arch: string) {\n if (!isUbuntu()) {\n return undefined\n }\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"nala\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n await installAptPack([{ name: \"python3-apt\" }])\n\n binDir = \"/usr/bin\" // eslint-disable-line require-atomic-updates\n\n // If nala is available in the default repositories, install it\n try {\n const nalaPack = await qualifiedNeededAptPackage({ name: \"nala\", version })\n if (nalaPack !== undefined) {\n await installAptPack([{ name: nalaPack }])\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala: ${err}`)\n }\n\n // Nala is not available in the default repositories\n // Check if the legacy version is available\n try {\n const nalaLegacyPack = await qualifiedNeededAptPackage({ name: \"nala-legacy\" })\n if (nalaLegacyPack !== undefined) {\n await installAptPack([{ name: nalaLegacyPack }], true)\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala-legacy: ${err}`)\n }\n\n // Install via the installer script\n await setupNalaViaInstaller()\n\n return { binDir }\n}\n\nasync function setupNalaViaInstaller() {\n const installer = new DownloaderHelper(\n \"https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh\",\n tmpdir(),\n { fileName: \"install-nala.sh\" },\n )\n installer.on(\"error\", (err) => {\n throw new Error(`Failed to download install-nala.sh: ${err}`)\n })\n await installer.start()\n\n const installerPath = join(tmpdir(), \"install-nala.sh\")\n\n // Patch the installer script to not use sudo explicitly\n const script = await readFile(installerPath, \"utf8\")\n await writeFile(installerPath, script.replace(/sudo/g, \"\"))\n\n await installAptPack([{ name: \"wget\" }])\n\n try {\n execRootSync(\"bash\", [installerPath])\n } catch (err) {\n error(`Failed to install nala via installer: ${err}`)\n execRootSync(\"apt\", [\"install\", \"-y\", \"-t\", \"nala\", \"nala\"])\n }\n}\n\nexport function bashWithNala(script: string) {\n if (hasNala()) {\n return `apt-get() { nala $@; }; export -f apt-get; ${script}; unset -f apt-get`\n }\n return script\n}\n","import { dirname, join } from \"path\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport { addShExt, addShRelativePrefix } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\nlet hasVCPKG = false\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupVcpkg(version: string, setupDir: string, _arch: string): Promise {\n if (!hasVCPKG || which.sync(\"vcpkg\", { nothrow: true }) === null) {\n if (process.platform === \"linux\") {\n // vcpkg download and extraction dependencies\n if (isArch()) {\n await Promise.all([\n setupPacmanPack(\"curl\"),\n setupPacmanPack(\"zip\"),\n setupPacmanPack(\"unzip\"),\n setupPacmanPack(\"tar\"),\n setupPacmanPack(\"git\"),\n setupPacmanPack(\"pkg-config\"),\n ])\n } else if (hasDnf()) {\n await setupDnfPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n } else if (isUbuntu()) {\n await installAptPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n }\n }\n\n // clone if not already exists\n if (!(await pathExists(join(setupDir, addShExt(\"bootstrap-vcpkg\", \".bat\"))))) {\n execaSync(\"git\", [\"clone\", \"https://github.com/microsoft/vcpkg\"], { cwd: dirname(setupDir), stdio: \"inherit\" })\n } else {\n notice(`Vcpkg folder already exists at ${setupDir}. Skipping the clone`)\n }\n\n // if version specified, checkout the version\n if (version !== \"\" && version !== \"true\") {\n info(`Checking out vcpkg version ${version}`)\n execaSync(\"git\", [\"checkout\", version], {\n cwd: setupDir,\n stdio: \"inherit\",\n })\n }\n\n // bootstrap vcpkg\n execaSync(addShExt(addShRelativePrefix(\"bootstrap-vcpkg\"), \".bat\"), {\n cwd: setupDir,\n shell: true,\n stdio: \"inherit\",\n })\n\n await grantUserWriteAccess(setupDir)\n\n await addPath(setupDir, rcOptions)\n // eslint-disable-next-line require-atomic-updates\n hasVCPKG = true\n return { binDir: setupDir }\n }\n\n return { binDir: dirname(which.sync(\"vcpkg\")) }\n}\n","import { setupBrew } from \"setup-brew\"\nimport { setupBazel } from \"./bazel/bazel.js\"\nimport { setupCcache } from \"./ccache/ccache.js\"\nimport { setupChocolatey } from \"./chocolatey/chocolatey.js\"\nimport { setupCmake } from \"./cmake/cmake.js\"\nimport { setupConan } from \"./conan/conan.js\"\nimport { setupCppcheck } from \"./cppcheck/cppcheck.js\"\nimport { setupDoxygen } from \"./doxygen/doxygen.js\"\nimport { setupGcc } from \"./gcc/gcc.js\"\nimport { setupGcovr } from \"./gcovr/gcovr.js\"\nimport { setupGraphviz } from \"./graphviz/graphviz.js\"\nimport { setupKcov } from \"./kcov/kcov.js\"\nimport { setupClangFormat, setupClangTools, setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMake } from \"./make/make.js\"\nimport { setupMeson } from \"./meson/meson.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { setupNala } from \"./nala/nala.js\"\nimport { setupNinja } from \"./ninja/ninja.js\"\nimport { setupOpencppcoverage } from \"./opencppcoverage/opencppcoverage.js\"\nimport { setupPowershell } from \"./powershell/powershell.js\"\nimport { setupPython } from \"./python/python.js\"\nimport { setupSccache } from \"./sccache/sccache.js\"\nimport { setupSevenZip } from \"./sevenzip/sevenzip.js\"\nimport { setupTask } from \"./task/task.js\"\nimport { setupVcpkg } from \"./vcpkg/vcpkg.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\n\n/** The setup functions */\nexport const setups = {\n nala: setupNala,\n cmake: setupCmake,\n ninja: setupNinja,\n python: setupPython,\n vcpkg: setupVcpkg,\n bazel: setupBazel,\n conan: setupConan,\n meson: setupMeson,\n gcovr: setupGcovr,\n opencppcoverage: setupOpencppcoverage,\n llvm: setupLLVM,\n gcc: setupGcc,\n choco: setupChocolatey,\n brew: setupBrew,\n powershell: setupPowershell,\n ccache: setupCcache,\n sccache: setupSccache,\n doxygen: setupDoxygen,\n graphviz: setupGraphviz,\n cppcheck: setupCppcheck,\n clangtidy: setupClangTools,\n clangformat: setupClangFormat,\n msvc: setupMSVC,\n vcvarsall: setupVCVarsall,\n kcov: setupKcov,\n make: setupMake,\n task: setupTask,\n sevenzip: setupSevenZip,\n}\n\nexport type ToolName = keyof typeof setups\n\n/** The tools that can be installed */\nexport const tools = Object.keys(setups) as Array\n\n/** The possible inputs to the program */\nexport type Inputs = keyof typeof setups | \"compiler\" | \"architecture\" | \"timeout\"\n\n/** An array of possible inputs */\nexport const inputs: Array = [\"compiler\", \"architecture\", \"timeout\", ...tools]\n","import { execRootSync } from \"admina\"\nimport { addAptKeyViaURL, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupBazel(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // install bazelisk because it contains both\n return setupChocoPack(\"bazelisk\", version)\n }\n case \"darwin\": {\n // install bazelisk because it contains both\n return installBrewPack(\"bazelisk\", version)\n }\n case \"linux\": {\n if (isArch()) {\n throw new Error(\"installing bazel on Arch linux is not supported yet\")\n } else if (hasDnf()) {\n // https://bazel.build/install/redhat\n await setupDnfPack([{ name: \"dnf-plugins-core\" }])\n execRootSync(\"dnf\", [\"copr\", \"enable\", \"vbatts/bazel\"])\n return setupDnfPack([{ name: \"bazel4\" }])\n } else if (isUbuntu()) {\n // https://bazel.build/install/ubuntu\n const keyFileName = await addAptKeyViaURL({\n fileName: \"bazel-archive-keyring.gpg\",\n keyUrl: \"https://bazel.build/bazel-release.pub.gpg\",\n })\n execRootSync(\"bash\", [\n \"-c\",\n `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://storage.googleapis.com/bazel-apt stable jdk1.8\" | tee /etc/apt/sources.list.d/bazel.list`,\n ])\n return installAptPack([{ name: \"bazel\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupConan(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"conan\", version)\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupMeson(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"meson\", version)\n}\n","import { addEnv } from \"envosman\"\nimport semverMajor from \"semver/functions/major\"\nimport semverValid from \"semver/functions/valid\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupGcovr(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"gcovr\", version)\n}\n\nexport function activateGcovLLVM() {\n return addEnv(\"GCOV\", \"llvm-cov gcov\", rcOptions)\n}\n\nexport function activateGcovGCC(gccVersion: string) {\n const gccSemver = semverValid(gccVersion)\n const gccMajor = gccSemver !== null ? semverMajor(gccSemver) : gccVersion\n const gcov = gccMajor !== \"\" ? `gcov-${gccMajor}` : \"gcov\"\n\n return addEnv(\"GCOV\", gcov, rcOptions)\n}\n","import { addPath } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupOpencppcoverage(version: string | undefined, _setupDir: string, _arch: string) {\n if (process.platform !== \"win32\") {\n return\n }\n await setupChocoPack(\"opencppcoverage\", version)\n const binDir = await activateOpencppcoverage()\n return { binDir }\n}\n\nasync function activateOpencppcoverage() {\n const binDir = \"C:/Program Files/OpenCppCoverage\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupCcache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"ccache\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"ccache\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"ccache\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"ccache\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { installBrewPack } from \"setup-brew\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSccache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"sccache\", version)\n }\n case \"linux\":\n case \"darwin\": {\n return installBrewPack(\"sccache\", version)\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupCppcheck(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"cppcheck\", version)\n const binDir = await activateWinCppcheck()\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"cppcheck\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"cppcheck\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"cppcheck\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinCppcheck() {\n const binDir = \"C:/Program Files/Cppcheck\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { join } from \"path\"\nimport { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { getBrewDir, installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMake(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"make\", version)\n }\n case \"darwin\": {\n await installBrewPack(\"make\", version)\n\n const gnuBinDir = join(getBrewDir(), \"opt/make/libexec/gnubin\")\n await addPath(gnuBinDir, rcOptions)\n return { binDir: gnuBinDir }\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"make\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"make\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"make\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","#!/usr/bin/env node\n/* eslint-disable node/shebang */\n\nimport { GITHUB_ACTIONS, isCI } from \"ci-info\"\nimport { error, info, success, warning } from \"ci-log\"\nimport { finalizeRC } from \"envosman\"\nimport * as numerous from \"numerous\"\nimport numerousLocale from \"numerous/locales/en.js\"\nimport * as timeDelta from \"time-delta\"\nimport timeDeltaLocale from \"time-delta/locales/en.js\"\nimport { untildifyUser } from \"untildify-user\"\nimport { checkUpdates } from \"./check-updates.js\"\nimport { parseArgs, printHelp, rcOptions } from \"./cli-options.js\"\nimport { installCompiler } from \"./compilers.js\"\nimport { installTool } from \"./installTool.js\"\nimport { tools } from \"./tool.js\"\nimport { isArch } from \"./utils/env/isArch.js\"\nimport { ubuntuVersion } from \"./utils/env/ubuntu_version.js\"\nimport { setupPacmanPack } from \"./utils/setup/setupPacmanPack.js\"\nimport { syncVersions } from \"./versions/versions.js\"\n\n/** The main entry function */\nasync function main(args: string[]): Promise {\n let checkUpdatePromise = Promise.resolve()\n if (!GITHUB_ACTIONS) {\n checkUpdatePromise = checkUpdates()\n process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS = \"true\"\n }\n\n // parse options using mri or github actions\n const opts = parseArgs(args)\n\n // print help\n if (opts.help) {\n printHelp()\n }\n\n // cpu architecture\n const arch = opts.architecture ?? process.arch\n\n // the installation dir for the tools that are downloaded directly\n const setupCppDir = process.env.SETUP_CPP_DIR ?? untildifyUser(\"~\")\n\n // report messages\n const successMessages: string[] = []\n const errorMessages: string[] = []\n\n const timeFormatter = timeDelta.create({ autoloadLocales: true })\n timeDelta.addLocale(timeDeltaLocale as timeDelta.Locale)\n numerous.addLocale(numerousLocale as numerous.Locale)\n let time1: number\n let time2: number\n\n // installing the specified tools\n\n const osVersion = await ubuntuVersion()\n\n // sync the version for the llvm tools\n if (!syncVersions(opts, [\"llvm\", \"clangtidy\", \"clangformat\"])) {\n error(\"The same version must be used for llvm, clangformat and clangtidy\")\n return 1\n }\n\n if (isArch() && typeof opts.cppcheck === \"string\" && typeof opts.gcovr === \"string\") {\n info(\"installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux\")\n await setupPacmanPack(\"python-pygments\")\n }\n\n // loop over the tools and run their setup function\n\n let failedFast = false\n for (const tool of tools) {\n // fail fast inside CI when any tool fails\n if (isCI) {\n if (errorMessages.length !== 0) {\n failedFast = true\n break\n }\n }\n\n // get the version or \"true\" or undefined for this tool from the options\n const version = opts[tool]\n\n // skip if undefined\n if (version !== undefined) {\n // running the setup function for this tool\n time1 = Date.now()\n // eslint-disable-next-line no-await-in-loop\n await installTool(\n tool,\n version,\n osVersion,\n arch,\n setupCppDir,\n successMessages,\n errorMessages,\n Number.parseFloat(opts.timeout ?? \"20\") * 60 * 1000,\n )\n time2 = Date.now()\n info(`took ${timeFormatter.format(time1, time2) || \"0 seconds\"}`)\n }\n }\n\n if (!failedFast) {\n // installing the specified compiler\n const maybeCompiler = opts.compiler\n if (maybeCompiler !== undefined) {\n const time1Compiler = Date.now()\n await installCompiler(maybeCompiler, osVersion, setupCppDir, arch, successMessages, errorMessages)\n const time2Compiler = Date.now()\n info(`took ${timeFormatter.format(time1Compiler, time2Compiler) || \"0 seconds\"}`)\n }\n }\n\n await finalizeRC(rcOptions)\n\n if (successMessages.length === 0 && errorMessages.length === 0) {\n warning(\"setup-cpp was called without any arguments. Nothing to do.\")\n return 0\n }\n\n // report the messages in the end\n for (const tool of successMessages) {\n success(tool)\n }\n for (const tool of errorMessages) {\n error(tool)\n }\n\n info(\"setup-cpp finished\")\n\n if (!GITHUB_ACTIONS) {\n switch (process.platform) {\n case \"win32\": {\n warning(\"Run `RefreshEnv.cmd` or restart your shell to update the environment.\")\n break\n }\n case \"linux\":\n case \"darwin\": {\n warning(\"Run `source ~/.cpprc` or restart your shell to update the environment.\")\n break\n }\n default: {\n // nothing\n }\n }\n }\n\n await checkUpdatePromise\n\n return errorMessages.length === 0 ? 0 : 1 // exit with non-zero if any error message\n}\n\n// Run main\nmain(process.argv)\n .then((ret) => {\n process.exitCode = ret\n })\n .catch((err) => {\n error(\"main() panicked!\")\n error(err as string | Error)\n process.exitCode = 1\n })\n","import { warning } from \"ci-log\"\nimport updateNotifier from \"simple-update-notifier\"\nimport packageJson from \"../package-version.json\"\n\n// auto self update notifier\nexport async function checkUpdates() {\n try {\n await updateNotifier({ pkg: packageJson })\n } catch (err) {\n warning(`Failed to check for updates: ${err instanceof Error ? err.message + err.stack : err}`)\n }\n}\n","import { join } from \"path\"\nimport { endGroup, notice, startGroup } from \"@actions/core\"\nimport { error, info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport semverValid from \"semver/functions/valid\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { activateGcovGCC, activateGcovLLVM } from \"./gcovr/gcovr.js\"\nimport { setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\n/** Detecting the compiler version. Divide the given string by `-` and use the second element as the version */\nexport function getCompilerInfo(compilerAndVersion: string) {\n const compilerAndMaybeVersion = compilerAndVersion.split(\"-\")\n const compiler = compilerAndMaybeVersion[0]\n if (1 in compilerAndMaybeVersion) {\n const maybeVersion = compilerAndMaybeVersion[1]\n if (semverValid(maybeVersion) !== null) {\n return { compiler, version: maybeVersion }\n } else {\n info(`Invalid semver version ${maybeVersion} used for the compiler.`)\n return { compiler, version: maybeVersion }\n }\n }\n return { compiler, version: undefined }\n}\n\n/** Installing the specified compiler */\nexport async function installCompiler(\n compilerAndVersion: string,\n osVersion: number[] | null,\n setupCppDir: string,\n arch: string,\n successMessages: string[],\n errorMessages: string[],\n) {\n try {\n const { compiler, version } = getCompilerInfo(compilerAndVersion)\n\n // install the compiler. We allow some aliases for the compiler name\n startGroup(`Installing ${compiler} ${version ?? \"\"}`)\n switch (compiler) {\n case \"llvm\":\n case \"clang\":\n case \"clang++\": {\n const installationInfo = await setupLLVM(\n getVersion(\"llvm\", version, osVersion),\n join(setupCppDir, \"llvm\"),\n arch,\n )\n\n await activateGcovLLVM()\n\n successMessages.push(getSuccessMessage(\"llvm\", installationInfo))\n break\n }\n case \"gcc\":\n case \"mingw\":\n case \"cygwin\":\n case \"msys\": {\n const gccVersion = compiler === \"mingw\"\n ? getVersion(\"mingw\", version, osVersion)\n : getVersion(\"gcc\", version, osVersion)\n const installationInfo = compiler === \"mingw\"\n ? await setupMingw(gccVersion, join(setupCppDir, \"gcc\"), arch)\n : await setupGcc(gccVersion, join(setupCppDir, \"gcc\"), arch)\n\n await activateGcovGCC(gccVersion)\n\n successMessages.push(getSuccessMessage(\"gcc\", installationInfo))\n break\n }\n case \"cl\":\n case \"msvc\":\n case \"msbuild\":\n case \"vs\":\n case \"visualstudio\":\n case \"visualcpp\":\n case \"visualc++\": {\n const installationInfo = await setupMSVC(\n getVersion(\"msvc\", version, osVersion),\n join(setupCppDir, \"msvc\"),\n arch,\n )\n\n successMessages.push(getSuccessMessage(\"msvc\", installationInfo))\n break\n }\n case \"appleclang\":\n case \"applellvm\": {\n notice(\"Assuming apple-clang is already installed\")\n await Promise.all([addEnv(\"CC\", \"clang\", rcOptions), addEnv(\"CXX\", \"clang++\", rcOptions)])\n successMessages.push(getSuccessMessage(\"apple-clang\", undefined))\n break\n }\n default: {\n errorMessages.push(`Unsupported compiler ${compiler}`)\n }\n }\n } catch (err) {\n error(err as string | Error)\n errorMessages.push(`Failed to install the ${compilerAndVersion}`)\n }\n\n endGroup()\n}\n"],"names":["issueCommand","command","properties","message","cmd","Command","process","stdout","write","os","EOL","rng","poolPtr","rnds8Pool","length","crypto","randomFillSync","slice","validate","uuid","REGEX","test","stringify","arr","offset","byteToHex","toLowerCase","TypeError","parse","v","Uint8Array","parseInt","v35","name","version","hashfunc","generateUUID","value","namespace","buf","str","unescape","encodeURIComponent","bytes","i","push","charCodeAt","stringToBytes","set","err","DNS","URL","getProxyUrl","reqUrl","usingSsl","protocol","hostname","host","hostLower","startsWith","isLoopbackAddress","noProxy","env","reqPort","port","upperReqHosts","toUpperCase","upperNoProxyItem","split","map","x","trim","filter","some","endsWith","checkBypass","proxyVar","DecodedURL","TunnelingAgent","options","self","this","proxyOptions","proxy","maxSockets","http","Agent","defaultMaxSockets","requests","sockets","on","socket","localAddress","toOptions","len","pending","splice","request","onSocket","destroy","removeSocket","createSecureSocket","cb","prototype","createSocket","call","hostHeader","getHeader","tlsOptions","mergeOptions","servername","replace","secureSocket","tls","connect","indexOf","target","arguments","overrides","keys","Object","j","keyLen","k","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","defineProperty","exports","summary","markdownSummary","SUMMARY_DOCS_URL","SUMMARY_ENV_VAR","os_1","require$$0","fs_1","require$$1","access","appendFile","writeFile","promises","_summary","constructor","_buffer","filePath","_filePath","pathFromEnv","Error","constants","R_OK","W_OK","_a","wrap","tag","content","attrs","htmlAttrs","entries","key","join","overwrite","writeFunc","encoding","emptyBuffer","clear","isEmptyBuffer","addRaw","text","addEOL","addCodeBlock","code","lang","assign","element","addList","items","ordered","listItems","item","addTable","rows","tableBody","row","cells","cell","header","data","colspan","rowspan","addDetails","label","addImage","src","alt","width","height","addHeading","level","includes","addSeparator","addBreak","addQuote","cite","addLink","href","getInput","val","required","trimWhitespace","error","command_1","utils_1","toCommandProperties","startGroup","issue","endGroup","__createBinding","create","o","m","k2","enumerable","get","__setModuleDefault","__importStar","mod","__esModule","hasOwnProperty","getIDToken","getState","group","info","notice","warning","debug","isDebug","setCommandEcho","setOutput","getBooleanInput","getMultilineInput","addPath","exportVariable","ExitCode","file_command_1","require$$2","require$$3","path","require$$4","oidc_utils_1","oidcUtils","OidcClient","http_client_1","auth_1","core_1","createHttpClient","allowRetry","maxRetry","requestOptions","allowRetries","maxRetries","HttpClient","BearerCredentialHandler","getRequestToken","token","getIDTokenUrl","runtimeUrl","getCall","id_token_url","httpclient","res","getJson","catch","statusCode","id_token","audience","setSecret","require$$5","convertedVal","toCommandValue","issueFileCommand","prepareKeyValueMessage","secret","inputPath","delimiter","inputs","input","enabled","setFailed","exitCode","Failure","fn","saveState","aud","summary_1","require$$6","summary_2","path_utils_1","pathUtils","toPlatformPath","toWin32Path","toPosixPath","pth","sep","require$$7","GITHUB_ACTIONS","core.error","console","log","msg","core.warning","core.notice","core.info","isexe","er","is","core","ignoreErrors","resolveCommandAttempt","parsed","withoutPathExt","cwd","hasCustomCwd","shouldSwitchCwd","chdir","disabled","resolved","which","sync","getPathKey","pathExt","notFoundError","original","syscall","errno","spawnargs","args","verifyENOENT","status","isWin","file","spawn","spawned","cp","enoent","hookChildProcess","pathKey","platform","reverse","find","isStream","stream","pipe","isWritableStream","writable","_write","_writableState","async","getStream","inputStream","maxBuffer","Infinity","bufferStream","rejectPromise","getBufferedLength","BufferConstants","MAX_LENGTH","bufferedData","getBufferedValue","streamPipelinePromisified","MaxBufferError","execa","handleArguments","joinCommand","escapedCommand","getEscapedCommand","logCommand","timeout","Number","isFinite","validateTimeout","childProcess","dummySpawned","ChildProcess","errorPromise","makeError","stderr","all","timedOut","isCanceled","killed","mergePromise","spawnedPromise","signal","stdin","getSpawnedPromise","timedPromise","killSignal","timeoutId","timeoutPromise","setTimeout","kill","timeoutKill","safeSpawnedPromise","finally","clearTimeout","race","setupTimeout","processDone","cleanup","detached","removeExitHandler","onExit","setExitHandler","spawnedKill","bind","cancel","spawnedCancel","handlePromiseOnce","onetime","stdoutResult","stderrResult","allResult","buffer","stdoutPromise","getStreamPromise","stderrPromise","allPromise","getBufferedData","getSpawnedResult","handleOutput","returnedError","aborted","failed","inputFile","validateInputOptions","createReadStream","end","handleInput","mixed","mergeStream","add","makeAllStream","pipeStdout","pipeToTarget","pipeStderr","pipeAll","addPipeMethods","execaSync","readFileSync","getInputSync","handleInputSync","spawnSync","execPowershell","startupFlags","execOptions","stdio","execa.execa","powershell","maybePwsh","nothrow","maybePowerShell","getPowerShell","t","r","configurable","getuid","CI","n","s","h","parseCommand","b","a","l","c","y","S","f","R","p","SUDO_USER","w","statSync","isDirectory","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","mixin$1","source","sourceObject","forEach","symbol","globalThis_1","isImplemented","globalThis","Array","naiveFallback","window","implementation","__global__","isSymbol","toStringTag","validateSymbol","es6Symbol","global","validTypes","object","Symbol","iterator","toPrimitive","SymbolPolyfill","HiddenSymbol","isNativeSafe","d","NativeSymbol","generateName","objPrototype","created","desc","ie11BugWorkaround","postfix","gs","setupStandardSymbols","standardSymbols","defineProperties","hasInstance","isConcatSpreadable","match","search","species","unscopables","setupSymbolRegistry","registry","symbolRegistry","for","String","keyFor","ignore","description","polyfill","__description__","__name__","toString","valueOf","from","iteratorSymbol","isArguments","objToString","id","isFunction","isFunctionStringTag","RegExp","toPosInt","callable","validValue","isValue","isString","isArray","Function","shim","arrayLike","Context","getIterator","mapFn","numberIsNaN","isNan","isNaN","NaN","objHasOwnProperty","abs","Math","floor","eIndexOf","searchElement","fromIndex","obj","targetObj","index","ensureCallable","byObserver","Observer","queue","currentQueue","node","document","createTextNode","callback","concat","shift","observe","characterData","nextTick","queueMicrotask","MutationObserver","WebKitMutationObserver","setImmediate","isCallable","isPromise","isPromiseModule","default","objectMap","primitiveSet","arg","ensureString","ensureValue","stringifiable","validateStringifiable","validateStringifiableValue","toShortString","safeToString","toShortStringRepresentation","string","char","JSON","supportedModes","registeredExtensions","promise","mode","conf","waiting","cache","isFailed","emit","onSuccess","count","onFailure","delete","resolvedMode","nextTickFailure","context","oldCache","pathExists","fsPromises","untildifyUser","maybeHomeDir","isSudo","homedir","userHomeDir","tildeRegex","addRCHeader","rcHeader","guard","rcPath","readFile","addSourceToTargetRc","sourceRcString","targetRcPath","addEnv","valGiven","givenOptions","escapeSpace","defaultRcPath","shouldEscapeSpace","spaceEscaped","escapeQuote","escapeString","addEnvSystem","sourceRCInRc","ignoredPaths","checkedPath","PATH","isIgnoredPath","ghAddPath","addPathSystem","addLocale","localeData","locales","pluralize","unit","config","unitTypeData","locale","lookupOrder","unitTypeLookupOrder","unshift","unitType","Set","getLocaleDataForUnitType","numerous","SPACE_CHARACTERS","Range","range","parseOptions","loose","includePrerelease","raw","Comparator","formatted","parseRange","first","isNullSet","isAny","comps","format","memoKey","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","cached","re","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","comparatorTrimReplace","TILDETRIM","tildeTrimReplace","CARETTRIM","caretTrimReplace","rangeList","comp","parseComparator","replaceGTE0","COMPARATORLOOSE","rangeMap","Map","comparators","size","has","values","intersects","thisComparators","isSatisfiable","rangeComparators","every","thisComparator","rangeComparator","SemVer","testSet","safeRe","remainingComparators","testComparator","pop","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","TILDELOOSE","TILDE","_","M","pr","ret","replaceCaret","z","CARETLOOSE","CARET","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","to","tM","tm","tp","tpr","prerelease","semver","ANY","allowed","major","minor","patch","operator","COMPARATOR","cmp","__generator","body","verb","op","g","ops","trys","sent","throw","return","toArr","any","toVal","out","opts","old","nxt","boolean","addUpdateAlternativesToRc","rcOptions","priority","execRoot","updateAptAlternatives","sourceRC","getAptEnv","apt","DEBIAN_FRONTEND","LANG","LC_ALL","hasNala","getApt","escapeStringRegexp","isAptPackInstalled","pack","line","filterAndQualifyAptPackages","packages","qualifiedNeededAptPackage","qualified","aptPackageType","AptPackageType","NameDashVersion","NameEqualsVersion","Name","getAptArg","escapeRegex","showStdout","updatedRepos","None","updateAptReposMemoized","installAptPack","update","allRepositories","flatMap","repository","repo","initAptMemoized","execRootSync","aptTimeout","defaultExecOptions","installAddAptRepo","addAptRepository","addRepositories","needToInstall","binDir","addAptKeyViaURL","keyServer","defaultKeyServer","fileName","keyStorePath","assertGpgFileName","addAptKeyViaServer","addAptKeys","isExecaError","retryErrors","keyUrl","defaultKeyStorePath","dlPath","tmpdir","dl","DownloaderHelper","start","initGpg","s$1","setupBrew","maybeBinDir","dirname","getDownloadPath","NONINTERACTIVE","getBrewBinDir","getBrewDir","arch","installBrewPack","cask","hasBrew","brewPath","hasDnf","hasDnfCache","isArch","isArchCache","isUbuntu","isUbuntuCache","setupChocolatey","_version","_setupDir","_arch","SystemRoot","chocoPath","ALLUSERSPROFILE","maybeChoco","ChocolateyInstall","setupChocoPack","hasChoco","TMP","TEMP","Path","extendEnv","setupDnfPack","getDnfArg","setupPacmanPack","aur","pacman","yayBuildDir","isRoot","createdBuilderUser","didUpdate","didInit","runInstall","availableVersions","matchAll","pacmanSiVersionRegex","availablePacmanVersions","u","E","N","rmRF","ioUtil","IS_WINDOWS","rm","force","recursive","retryDelay","mkdirP","fsPath","assert_1$1","ok","mkdir","findInPath","tool","extensions","extension","isRooted","tryGetExecutablePath","directories","matches","directory","cpDirRecursive","sourceDir","destDir","currentDepth","files","readdir","srcFile","destFile","lstat","copyFile","chmod","stat","isSymbolicLink","unlink","symlinkFull","readlink","symlink","exists","exec","commandLine","commandArgs","tr","argStringToArray","toolPath","ToolRunner","findAllVersions","toolName","versions","_getCacheDirectory","fs","existsSync","children","readdirSync","child","isExplicitVersion","fullPath","_createExtractFolder","dest","_getTempDirectory","v4_1","io","_createToolPath","folderPath","clean","core$1","markerPath","_completeToolPath","fs$1","writeFileSync","versionSpec","valid","evaluateVersions","sort","gt","potential","satisfies","cacheDirectory","assert_1","tempDirectory","_getGlobal","defaultValue","retryAsPromised","optionsInput","$current","max","backoffBase","backoffExponent","report","Date","toLocaleTimeString","backoffTimeout","lastError","TimeoutError","current","shouldRetry","pow","setupSevenZip","getArchiveType","ext","extract7Zip","sevenZip","getSevenZip","grantUserWriteAccess","extractExe","extractZip","extractTarByExe","stripComponents","flags","archiveType","installTarDependencies","setupBin","getPackageInfo","setupDir","RUNNER_TEMP","RUNNER_TOOL_CACHE","url","binRelativeDir","binFileName","extractedFolderName","extractFunction","dir","installDir","binFile","givenExtractFunction","downloaded","retry","downloadedFilePath","now","basename","downloadTool","tryDownload","getExtractFunction","downloadExtractInstall","maybeGetInput","CACHE_TOOLS","cacheDir","cacheInstallation","getCmakePackageInfo","semVersion","semverCoerce","isOld","semverLte","osArchStr","x86_64","x86","arm64","folderName","addExeExt","setupCmake","isBinUptoDate","givenFile","targetVersion","versionRegex","defaultVersionRegex","givenVersion","execout","getExecOutput","version_output","getBinVersion","semverCompare","quoteIfHasSpace","quoteChar","setupPython","installInfo","foundPython","findPython","bin","setupActionsPython","import","brewPythonPrefix","brewPythonBin","setupPythonSystem","findOrSetupPython","require$$0$3","foundPip","maybePip","findPip","ensurePipUpgrade","setupPipPackSystem","setupPip","findOrSetupPip","hasPipx","setupPipPackWithPython","upgrade","usePipx","setupPipx","isLibrary","setupWheel","pythonBin","isPythonUpToDate","rootDir","pathParse","root","pythonDirs","pythonDir","candidate","pythonBinPath","MinVersions","pythonBinPaths","pipCandidate","isPipUptoDate","pip","pipPaths","pipPath","err1","err2","getVersion","osVersion","isVersionDefault","DefaultUbuntuVersion","toolLinuxVersions","osVersionMaj","satisfyingVersion","getDefaultLinuxVersion","DefaultVersions","detectUsingOsVersion","versionMatch","setupPipPack","getPython","givenPython","user","isPipx","hasPackage","python","pipHasPackage","nameAndVersion","upgradeFlag","userFlag","PIPX_HOME","getPipxHome","PIPX_BIN_DIR","getPipxBinDir","execPaths","addPythonBaseExecPrefix","dirs","dirIndex","findIndex","exist","whichDir","findBinDir","addPythonPrefix","setupGraphviz","activateGraphviz","setupDmg","ArchiveHdi","dmg","read","entry","extract","getDoxygenPackageInfo","setupMacOSSDK","xcrun","sdkroot","loadAssetList","matchAsset","assets","origTags","versionMap","filterMapTag","origTag","mappedTag","candidateTags","candidateTag","assetNames","filterName","matchAssetName","keywords","optionalKeywords","candidates","keyword","candidateScores","score","maxScore","getGccPackageInfo","asset","x64","ia32","setupGcc","installationInfo","setupChocoMingw","gccExe","exe1","exe2","tag1","tag2","v1","v2","compare","localeCompare","compareVersion","versionStdout","getGccCmdVersion","majorVersion","semverMajor","matcherPath","addGccLoggingMatcher","activateGcc","getNinjaPackageInfo","ninjaPlatform","getNinjaPlatformArch","setupNinja","getDownloadKcovPackageInfo","getBuildKcovPackageInfo","buildKcov","cmake","ubuntuVersion","getCmake","buildDir","vsversion_to_versionnumber","vsversion","VsYearVersion","vsversion_to_year","year","ver","findVcvarsall","vsversion_number","version_pattern","upper_bound","pattern","child_process","execSync","installationPath","findWithVswhere","years","YEARS","prog_files","PROGRAM_FILES","ed","EDITIONS","PROGRAM_FILES_X86","isPathVariable","setupVCVarsall","VCTargetsPath","toolset","sdk","uwp","spectre","setupMSVCDevCmd","getArch","installTool","setupCppDir","successMessages","errorMessages","milliseconds","fallback","customTimers","timer","cancelablePromise","sign","getAbortedReason","addEventListener","timeoutError","pTimeout","hasLLVM","setupVersion","setupFunction","setups","getSuccessMessage","installToolImpl","stack","getLLVMPackageInfo","ubuntuVer","ubuntuMin","armv7","powerpc64le","sparc64","getAssetKeywords","ghAsset","websiteAsset","getLLVMAssetURL","setupLLVM","setupLLVMWithoutActivation","ld","LD_LIBRARY_PATH","dyld","DYLD_LIBRARY_PATH","llvmMajor","majorLLVMVersion","actPromises","activateLLVM","setupLLVMOnly","LLVMPackages","All","installationFolder","installerScript","installerPath","neededPackages","givenScript","target_path","script","NODE_DEBUG","debugScript","nonInteractiveScript","choosePackages","installingPack","regexp","isAptPackRegexInstalled","info$1","removeConflictingPackages","useNalaScript","patchAptLLVMScript","shell","setupLLVMApt","llvmBinaryDeps","coeredVersion","semverValid","coercedVersion","semverCoerceIfInvalid","addLLVMLoggingMatcher","setupMSVC","versionGiven","installed","vcvarsall_path","addMSVCLoggingMatcher","getPowerShellPackageInfo","getPowershellUrl","arm","arm32","aarch64","getTaskPackageInfo","taskPlatform","getTaskPlatform","taskArch","getTaskArch","checkEnv","vendors","constant","isPR","vendor","isCI","ne","BUILD_ID","BUILD_NUMBER","CI_APP_ID","CI_BUILD_ID","CI_BUILD_NUMBER","CI_NAME","CONTINUOUS_INTEGRATION","RUN_ID","utils","annotationProperties","title","startLine","endLine","col","startColumn","endColumn","__createBinding$6","cmdStr","escapeData","byteToHex$1","substr","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v3$1","Buffer","createHash","digest","v5","clockseq","seedBytes","random","msecs","nsecs","dt","tl","tmh","rnds","__createBinding$5","fileCommand","uuid_1","fs$4","appendFileSync","v4","convertedValue","_decodedUsername","_decodedPassword","base","super","decodeURIComponent","username","password","https","events","util","tunnel","httpOverHttp","agent","httpsOverHttp","defaultPort","httpOverHttps","httpsOverHttps","inherits","EventEmitter","addRequest","req","onFree","onCloseOrRemove","removeListener","onConnect","head","connectReq","removeAllListeners","placeholder","connectOptions","method","headers","proxyAuth","useChunkedEncodingByDefault","once","cause","pos","HttpCodes","Headers","MediaTypes","HttpRedirectCodes","MovedPermanently","ResourceMoved","SeeOther","TemporaryRedirect","PermanentRedirect","HttpResponseRetryCodes","BadGateway","ServiceUnavailable","GatewayTimeout","RetryableHttpVerbs","HttpClientError","setPrototypeOf","HttpClientResponse","readBody","output","alloc","chunk","readBodyBuffer","chunks","lowercaseKeys","reduce","userAgent","handlers","_ignoreSslError","_socketTimeout","_allowRedirects","_allowRedirectDowngrade","_maxRedirects","_allowRetries","_maxRetries","_agent","_proxyAgent","_proxyAgentDispatcher","_keepAlive","_disposed","ignoreSslError","socketTimeout","allowRedirects","allowRedirectDowngrade","maxRedirects","keepAlive","requestUrl","additionalHeaders","del","post","put","sendStream","Accept","_getExistingOrDefaultHeader","ApplicationJson","_processResponse","postJson","ContentType","putJson","patchJson","parsedUrl","_prepareRequest","maxTries","response","numTries","requestRaw","Unauthorized","authenticationHandler","handler","canHandleAuthentication","handleAuthentication","redirectsRemaining","redirectUrl","parsedRedirectUrl","_performExponentialBackoff","dispose","requestRawWithCallback","onResult","handleResult","callbackCalled","byteLength","httpModule","sock","getAgent","serverUrl","_getAgent","getAgentDispatcher","proxyUrl","pm.getProxyUrl","_getProxyAgentDispatcher","pathname","_mergeHeaders","prepareRequest","_default","clientHeader","useProxy","globalAgent","agentOptions","tunnelAgent","overHttps","tunnel.httpsOverHttps","tunnel.httpsOverHttp","tunnel.httpOverHttps","tunnel.httpOverHttp","rejectUnauthorized","proxyAgent","uri","pipelining","requestTls","retryNumber","ms","min","contents","NotFound","deserializeDates","auth","PersonalAccessTokenCredentialHandler","BasicCredentialHandler","TESTING_WINDOWS","checkStat","isFile","checkPathExt","pathext","PATHEXT","checkMode","uid","gid","myUid","myGid","getgid","ug","isexe_1","isWindows","OSTYPE","COLON","getNotFoundError","getPathInfo","opt","colon","pathEnv","pathExtExe","found","ppRaw","pathPart","pCmd","subStep","ii","which_1","cur","ex","environment","pathKeyModule","metaCharsRegExp","_escape","argument","doubleEscapeMetaChars","shebangRegex","resolveCommand","escape","readShebang","fd","openSync","readSync","closeSync","binary","shebangCommand","isExecutableRegExp","isCmdShimRegExp","commandFile","shebang","detectShebang","needsShell","forceShell","needsDoubleEscapeMetaChars","normalize","shellCommand","comspec","windowsVerbatimArguments","parseNonShell","originalEmit","arg1","verifyENOENTSync","crossSpawnModule","_parse","_enoent","npmRunPathEnv","pathName","pathOption","preferLocal","execPath","addExecPath","cwdString","fileURLToPath","cwdPath","previous","applyPreferLocal","execPathString","applyExecPath","npmRunPath","copyProperty","property","ignoreNonConfigurable","toDescriptor","fromDescriptor","canCopyProperty","wrappedToString","withName","fromBody","toStringDescriptor","toStringName","calledFunctions","WeakMap","function_","returnValue","callCount","functionName","displayName","arguments_","Reflect","ownKeys","fromPrototype","getPrototypeOf","changePrototype","newToString","changeToString","mimicFunction","getRealtimeSignal","number","SIGRTMIN","action","standard","SIGNALS","forced","getSignals","realtimeSignals","normalizeSignal","defaultNumber","signals","name2","constantSignal","supported","getSignalByName","signalsByName","fromEntries","getSignalsByName","findSignalByNumber","signalA","signalsA","SIGRTMAX","getSignalByNumber","getSignalsByNumber","signalDescription","prefix","errorCode","getErrorPrefix","execaMessage","isError","shortMessage","Boolean","originalMessage","aliases","processOk","reallyExit","listeners","pid","emitter","assert","module","EE","__signal_exit_emitter__","emitted","infinite","setMaxListeners","equal","loaded","load","ev","alwaysLast","unload","sig","sigListeners","originalProcessEmit","originalProcessReallyExit","signalExitModule","event","emit$1","process$3","signalExit","processEmit","processReallyExit","killResult","setKillTimeout","shouldForceKill","getForceKillAfterTimeout","unref","forceKillAfterTimeout","isSigterm","SIGTERM","streamName","createWriteStream","isExecaChildProcess","PassThrough","PassThroughStream","promisify","array","isBuffer","objectMode","setEncoding","pipeline","getStreamModule","sources","remove","it","readable","isEmpty","streamPromise","nativePromisePrototype","descriptors","descriptor","normalizeArgs","NO_ESCAPE_REGEXP","DOUBLE_QUOTES_REGEXP","escapeArg","SPACES_REGEXP","tokens","previousToken","verboseDefault","debuglog","padField","field","padding","padStart","verbose","date","getHours","getMinutes","getSeconds","getMilliseconds","getTimestamp","crossSpawn","stripFinalNewline","localDir","windowsHide","envOption","getEnv","alias","hasAlias","normalizeStdio","CR","posix","promises_1","myGroups","groups","getgroups","win32","peSplit","substring","__exportStar","impl","_ISEXE_TEST_PLATFORM_","isexeSync","rSlash","rRel","optPath","optPathExt","optDelimiter","getPathPart","envPart","withExt","lib","pathEnvPart","$","A","systemdrive","normalizeOptions","opts1","forEach$2","process$2","toPosInteger","toInteger","resolveLength","optsLength","fnLength","isAsync","validCallable","objPropertyIsEnumerable","propertyIsEnumerable","list","compareFn","defVal","foo","bar","trzy","shim$3","function","isObject","captureStackTrace","generate","mixin","arg2","possibleTypes","undefined","isPrototype","classRe","functionToString","contains","searchString","isPlainFunction","normalizeOpts","dModule","dscr","off","methods","type","listener","__eeOnceListener__","__ee__","resolveArgs","customError","defineLength","ee","resolveResolve","resolvers","configure","memLength","extDel","extGet","extHas","normalizer","getListeners","setListeners","deleteListeners","memoized","userNormalizer","resolveNormalize","profileName","updateEnv","__memoized__","_get","_has","plain","extFn","__profiler__","memoizee","primitive","getPrimitiveFixed","currentLength","lastId","get1","argsMap","getFixed","aFrom","tbi","currentCallback","currentContext","currentArgs","last","origCb","resultArray","maxAge","maxTimeout","validTimeout","noop","timeouts","preFetchAge","preFetchTimeouts","preFetch","lruQueue","limit","hit","oldIndex","nuIndex","refCounter","deleteRef","getRefCount","memoize","is_posix_os","release","windows_version_regex","given_path","major_release","os_build","should_not_escape","regexEscape","matchOperatorsRe","escapeQuotesModule","chars","escapeChar","regex","variants","checkLocale","hasLocale","commonjsRequire","__dirname","requireLocale","isNode","timeUnits","defaultConfig","span","autoloadLocales","timeDelta","firstDate","secondDate","autoload","localeId","require","ensureLocaleLoadedOrThrow","difference","results","divider","getDifference","parts","long","one","other","months","weeks","days","hours","minutes","seconds","narrow","short","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","debug_1","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","LONECARET","looseOption","freeze","emptyOpts","parseOptions_1","numeric","compareIdentifiers","anum","bnum","identifiers","rcompareIdentifiers","LOOSE","FULL","num","build","compareMain","comparePre","compareBuild","inc","identifier","identifierBase","parse_1","throwErrors","valid_1","major_1","compare_1","compareBuild_1","versionA","versionB","gt_1","lt_1","eq_1","neq_1","gte_1","lte_1","eq","neq","gte","lt","lte","cmp_1","coerce_1","rtl","coerceRtlRegex","COERCERTLFULL","COERCERTL","lastIndex","lrucache","firstKey","satisfies_1","outside_1","hilo","gtfn","ltefn","ltfn","ecomp","high","low","comparator","outside","minimumVersionWithPreRelease","minimumVersion","simpleSubset","sub","dom","eqSet","gtltComp","higher","lower","hasDomLT","hasDomGT","higherGT","lowerLT","needDomLTPre","needDomGTPre","internalRe","diff","version1","version2","comparison","v1Higher","highVersion","lowVersion","highHasPre","require$$9","require$$13","rcompare","compareLoose","require$$16","rsort","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","coerce","require$$26","require$$27","require$$28","require$$29","toComparators","maxSatisfying","maxSV","rangeObj","minSatisfying","minSV","minVersion","minver","setMin","compver","validRange","require$$35","gtr","ltr","r1","r2","simplifyRange","prev","ranges","simplified","subset","sawNonNull","OUTER","simpleSub","simpleDom","isSub","packageJson","npm_package_json","npm_config_user_agent","isNpm6","isNpm7","isNpm","isYarn","isNpmOrYarn","homeDirectory","configDir","XDG_CONFIG_HOME","getConfigFile","packageName","getDistVersion","distTag","hasNewVersion","pkg","_b","updateCheckInterval","_c","alwaysRun","lastUpdateCheck","latestVersion","_d","mkdirSync","configFile","getLastUpdate","getTime","err_1","isTTY","shouldNotifyInNpmScript","lines","repeat","_i","lines_1","padEnd","borderedText","_interopRequireWildcard","_possibleConstructorReturn","ReferenceError","DH_STATES","_typeof","_createClass","_url","_events","IDLE","SKIPPED","STARTED","DOWNLOADING","RETRY","PAUSED","RESUMED","STOPPED","FINISHED","FAILED","_classCallCheck","__proto__","captureRejections","__validate","requestURL","state","__defaultOpts","metadata","override","forceResume","removeOnStop","removeOnFail","progressThrottle","httpRequestOptions","httpsRequestOptions","resumeOnIncomplete","resumeIfFileExists","resumeOnIncompleteMaxRetry","__opts","__pipes","__total","__downloaded","__progress","__retryCount","__retryTimeout","__resumeRetryCount","__states","__promise","__request","__response","__isAborted","__isResumed","__isResumable","__isRedirected","__destFolder","__statsEstimate","time","prevBytes","throttleTime","__fileName","__filePath","updateOptions","_inherits","__start","getTotalSize","total","__getFilePath","__getFilesizeInBytes","resumeFromFile","unpipe","__fileStream","__requestAbort","__closeFileStream","__setState","__reqOptions","__emitStop","__headers","__getReqOptions","__initProtocol","progress","speed","__protocol","__isRequireRedirect","location","__getFileNameFromHeaders","destroyed","__downloadRequest","__onError","__onTimeout","__resetStats","__startDownload","skip","skipSmaller","totalSize","downloadedSize","isResumed","__calculateStats","__onFinished","close","__hasFinished","resume","incomplete","onDiskSize","__retry","__removeFile","delay","__getFileNameFromOpts","__uniqFileNameSync","prevPath","prevFileName","getStats","throwIfNoEntry","accessSync","F_OK","abort","__resolvePending","toInstall","npath","first2chars","nFileName","extname","nFilepath","O","I","T","W","q","B","isUnixExecutable","stats","getCmdPath","UV_FS_O_EXLOCK","rmdir","rename","open","READONLY","O_RDONLY","useStat","normalizeSeparators","upperExt","validExt","originalFilePath","upperName","actualName","__createBinding$4","mkdirP_1","mv","copySourceDirectory","readCopyOptions","destStat","newDest","relative","destExists","check","tok","makeSafeRe","tb","defaultResult","rangeTmp","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","compRe","_readLinuxVersionFile","_getOsVersion","_findMatch","stable","archFilter","platFilter","chk","platform_version","plat","lsbContents","lsbReleaseFile","osReleaseFile","randomBytes","bytesToUuid","__createBinding$3","toolrunner","timers_1","_debug","_getCommandString","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","_windowsQuoteCmdArg","_processLineBuffer","strBuffer","onLine","argline","_endsWith","upperToolPath","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","quoteHit","_cloneExecOptions","silent","failOnStdErr","ignoreReturnCode","outStream","errStream","_getSpawnOptions","argv0","optionsNonNull","ExecState","stdbuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","processExitCode","argString","append","escaped","inQuotes","charAt","_setResult","HandleTimeout","__createBinding$2","exec_1","getExecOutput_1","string_decoder_1","exec_2","stdoutDecoder","StringDecoder","stderrDecoder","originalStdoutListener","originalStdErrListener","__createBinding$1","retryHelper","RetryHelper","maxAttempts","minSeconds","maxSeconds","execute","isRetryable","attempt","core$2","getSleepAmount","sleep","__importDefault","toolCache","findFromManifest","getManifestFromRepo","find_1","cacheFile","cacheDir_1","extractXar","extractTar","extract7z","downloadTool_1","HTTPError","mm","httpm","require$$8","require$$10","require$$11","require$$12","retry_helper_1","httpStatusCode","IS_MAC","authorization","statusMessage","readStream","responseMessageFactory","succeeded","downloadToolAttempt","_7zPath","originalCwd","powershellPath","versionOutput","isGnuTar","destArg","fileArg","xarPath","escapedFile","escapedDest","pwshPath","extractZipWin","unzipPath","extractZipNix","destPath","itemName","sourceFile","targetFile","destFolder","cachePath","owner","branch","releases","treeUrl","manifestUrl","tree","versionsRaw","manifest","dist","previousError","optsArg","optsFs","mkdirAsync","rej","made","statAsync","mkdirpManualSync","parent","fer","mkdirpManual","st","findMade","findMadeSync","mkdirpNativeSync","mkdirpNative","__TESTING_MKDIRP_PLATFORM__","pathArg","badWinChars","versArr","__TESTING_MKDIRP_NODE_VERSION__","hasNative","useNativeSync","useNative","mkdirpSync","mkdirp","native","nativeSync","manual","manualSync","defaultLLVM","llvm","clangtidy","clangformat","ninja","gcovr","conan","meson","kcov","task","doxygen","gcc","mingw","nala","base_exec_prefix","unique","getUbuntuVersion_1","getUbuntuVersion","child_process_1","exe","execFile","reDistributor","reDescription","reRelease","distributorFound","rel","ss","versionSplitted","pipxHome","compatHome","pipxBinDir","nameMap","macosVersion","macosRelease","AbortError","getDOMException","errorMessage","DOMException","reason","vsversion_to_versionnumber_1","VSWHERE_PATH","findVcvarsall_1","setupMSVCDevCmd_1","process$1","arch_aliases","win64","vcvars","cmd_output_parts","old_environment","vcvars_output","new_environment","error_messages","old_env_vars","new_value","_1","setupLLVMDeps","hasVCPKG","nalaPack","nalaLegacyPack","installer","setupNalaViaInstaller","vcpkg","addShExt","addShRelativePrefix","bazel","opencppcoverage","activateOpencppcoverage","choco","brew","ubuntuVerSplitted","setupPowershellSystem","ccache","sccache","activateWinDoxygen","graphviz","cppcheck","activateWinCppcheck","ClangFormat","msvc","vcvarsall","versionSplit","addVPrefix","installMethod","version_number","removeVPrefix","make","gnuBinDir","sevenzip","tools","checkUpdatePromise","updateNotifier","checkUpdates","ACTIONS_ALLOW_UNSECURE_COMMANDS","idx","alibi","strict","unknown","defaults","mri","inp","parseArgs","help","table","documentation","coverage","architecture","SETUP_CPP_DIR","timeFormatter","timeDelta.create","time1","time2","timeDelta.addLocale","timeDeltaLocale","numerous.addLocale","numerousLocale","toolsInUse","toolsNonDefaultVersion","syncVersions","failedFast","parseFloat","maybeCompiler","compiler","time1Compiler","compilerAndVersion","compilerAndMaybeVersion","maybeVersion","getCompilerInfo","gccVersion","setupMingw","gccSemver","gccMajor","activateGcovGCC","installCompiler","time2Compiler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C,EAGA6jF,CAAKrkF,QAAQskF,MACVj8E,MAAM2mB,IACLhvB,QAAQwS,SAAWwc,CAAA,IAEpBzd,OAAO5O,IACN8K,EAAM,oBACNA,EAAM9K,GACN3C,QAAQwS,SAAW,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,65,66,67,68,69,73,88,89,90,91,92,111,114,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,273,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,291,292]} \ No newline at end of file +{"version":3,"file":"setup-cpp.mjs","sources":["../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/command.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/proxy.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/lib/tunnel.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/summary.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/core.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/oidc-utils.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/path-utils.js","../../packages/ci-log/dist/index.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/resolveCommand.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/enoent.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/index.js","../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js","../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js","../../packages/exec-powershell/dist/index.js","../../node_modules/.pnpm/admina@1.0.1/node_modules/admina/dist/index.node.mjs","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/mixin.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/index.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/is-implemented.js","../../node_modules/.pnpm/ext@1.7.0/node_modules/ext/global-this/implementation.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/validate-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-symbol.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/index.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/is-implemented.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/polyfill.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/generate-name.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/standard-symbols.js","../../node_modules/.pnpm/es6-symbol@3.1.4/node_modules/es6-symbol/lib/private/setup/symbol-registry.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/from/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-arguments.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/is-function.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/is-string.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/#/e-index-of.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/is-nan/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/map.js","../../node_modules/.pnpm/next-tick@1.1.0/node_modules/next-tick/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-callable.js","../../node_modules/.pnpm/is-promise@2.2.2/node_modules/is-promise/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/promise.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/primitive-set.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/validate-stringifiable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/to-short-string-representation.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/safe-to-string.js","../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js","../../packages/untildify-user/dist/index.js","../../packages/envosman/dist/rc-file.js","../../packages/envosman/dist/add-env.js","../../packages/envosman/dist/utils.js","../../packages/envosman/dist/add-path.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/lib/time-delta.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/range.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/comparator.js","../../node_modules/.pnpm/simple-update-notifier@2.0.0/node_modules/simple-update-notifier/build/index.js","../../node_modules/.pnpm/mri@1.2.0/node_modules/mri/lib/index.mjs","../../packages/setup-apt/dist/alternatives.js","../../packages/setup-apt/dist/apt-env.js","../../packages/setup-apt/dist/get-apt.js","../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js","../../packages/setup-apt/dist/is-installed.js","../../packages/setup-apt/dist/qualify-install.js","../../packages/setup-apt/dist/install.js","../../packages/setup-apt/dist/apt-repository.js","../../packages/setup-apt/dist/apt-key.js","../../packages/setup-brew/dist/install.js","../../packages/setup-brew/dist/install-pack.js","../../src/utils/env/hasDnf.ts","../../src/utils/env/isArch.ts","../../src/utils/env/isUbuntu.ts","../../src/chocolatey/chocolatey.ts","../../src/utils/setup/setupChocoPack.ts","../../src/utils/setup/setupDnfPack.ts","../../src/utils/setup/setupPacmanPack.ts","../../node_modules/.pnpm/patha@0.4.1/node_modules/patha/dist/index.node.mjs","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/exec.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/tool-cache.js","../../node_modules/.pnpm/retry-as-promised@7.0.4/node_modules/retry-as-promised/dist/index.js","../../src/sevenzip/sevenzip.ts","../../src/utils/setup/extract.ts","../../src/utils/setup/setupBin.ts","../../src/cmake/cmake.ts","../../src/utils/setup/version.ts","../../src/utils/std/index.ts","../../src/python/python.ts","../../src/versions/versions.ts","../../src/utils/env/ubuntu_version.ts","../../src/utils/setup/setupPipPack.ts","../../src/graphviz/graphviz.ts","../../src/utils/setup/setupDmg.ts","../../src/doxygen/doxygen.ts","../../src/macos-sdk/macos-sdk.ts","../../src/utils/asset/load-assets.ts","../../src/gcc/gcc.ts","../../src/gcovr/gcovr.ts","../../src/ninja/ninja.ts","../../src/kcov/kcov.ts","../../src/llvm/apple-clang.ts","../../node_modules/.pnpm/msvc-dev-cmd@https+++codeload.github.com+aminya+msvc-dev-cmd+tar.gz+c01f519bd995460228ed3dec4df51df92dc290fd/node_modules/msvc-dev-cmd/lib.js","../../src/vcvarsall/vcvarsall.ts","../../src/installTool.ts","../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js","../../src/llvm/llvm_url.ts","../../src/llvm/llvm.ts","../../src/llvm/llvm_installer.ts","../../src/msvc/msvc.ts","../../src/opencppcoverage/opencppcoverage.ts","../../src/powershell/powershell.ts","../../src/task/task.ts","../../src/cli-options.ts","../../node_modules/.pnpm/ci-info@4.0.0/node_modules/ci-info/index.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/utils.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js","../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js","../../node_modules/.pnpm/@actions+core@1.10.1/node_modules/@actions/core/lib/file-command.js","../../node_modules/.pnpm/tunnel@0.0.6/node_modules/tunnel/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/esnext/index.js","../../node_modules/.pnpm/@actions+http-client@2.2.3_patch_hash=gqcf2jay7nqqezf3jni6mxu74u/node_modules/@actions/http-client/lib/auth.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js","../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js","../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js","../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/escape.js","../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js","../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/util/readShebang.js","../../node_modules/.pnpm/cross-spawn@7.0.3/node_modules/cross-spawn/lib/parse.js","../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js","../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js","../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js","../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js","../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js","../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js","../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js","../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js","../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/posix.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/win32.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/options.js","../../node_modules/.pnpm/isexe@3.1.1/node_modules/isexe/dist/cjs/index.js","../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/_iterate.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/normalize-options.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-integer.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/math/sign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/number/to-pos-integer.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-length.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-callable.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/valid-value.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/for-each.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/assign/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/keys/shim.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/object/is-object.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/error/custom.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/function/_define-length.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/value/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/object/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/function/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/prototype/is.js","../../node_modules/.pnpm/type@2.7.3/node_modules/type/plain-function/is.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/is-implemented.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/index.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/string/#/contains/shim.js","../../node_modules/.pnpm/d@1.0.2/node_modules/d/index.js","../../node_modules/.pnpm/event-emitter@0.3.5/node_modules/event-emitter/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-resolve.js","../../node_modules/.pnpm/es5-ext@0.10.64/node_modules/es5-ext/array/to-array.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/resolve-normalize.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/lib/configure-map.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/plain.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/primitive.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-primitive-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-1.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/normalizers/get-fixed.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/async.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/dispose.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max-age.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/valid-timeout.js","../../node_modules/.pnpm/timers-ext@0.1.8/node_modules/timers-ext/max-timeout.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/max.js","../../node_modules/.pnpm/lru-queue@0.1.0/node_modules/lru-queue/index.js","../../node_modules/.pnpm/memoizee@0.4.17/node_modules/memoizee/ext/ref-counter.js","../../node_modules/.pnpm/escape-path-with-spaces@1.0.2/node_modules/escape-path-with-spaces/index.js","../../node_modules/.pnpm/escape-quotes@1.0.2/node_modules/escape-quotes/lib/escape-quotes.js","../../node_modules/.pnpm/escape-string-regexp@1.0.5/node_modules/escape-string-regexp/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/lib/numerous.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/index.js","../../node_modules/.pnpm/numerous@1.0.3/node_modules/numerous/locales/en.js","../../node_modules/.pnpm/is-node@1.0.2/node_modules/is-node/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/index.js","../../node_modules/.pnpm/time-delta@https+++codeload.github.com+aminya+time-delta+tar.gz+69d91a41cef28e569be9a2991129f5f7d1f0d00e/node_modules/time-delta/locales/en.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/constants.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/re.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/parse-options.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/identifiers.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/classes/semver.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/parse.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/clean.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/inc.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/diff.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/major.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/minor.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/patch.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/prerelease.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rcompare.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-loose.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/compare-build.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/sort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/rsort.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lt.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/eq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/neq.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/gte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/lte.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/cmp.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/coerce.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/lrucache.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/functions/satisfies.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/to-comparators.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/max-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-satisfying.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/min-version.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/valid.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/outside.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/gtr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/ltr.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/intersects.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/simplify.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/ranges/subset.js","../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/index.js","../../node_modules/.pnpm/node-downloader-helper@2.1.9/node_modules/node-downloader-helper/dist/index.js","../../packages/setup-apt/dist/apt-timeout.js","../../packages/setup-apt/dist/update.js","../../packages/setup-apt/dist/init-apt.js","../../node_modules/.pnpm/replace-ext@2.0.0/node_modules/replace-ext/index.js","../../src/utils/env/arch.ts","../../node_modules/.pnpm/@actions+io@1.1.3/node_modules/@actions/io/lib/io-util.js","../../node_modules/.pnpm/semver@6.3.1/node_modules/semver/semver.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/manifest.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/bytesToUuid.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/lib/rng.js","../../node_modules/.pnpm/uuid@3.4.0/node_modules/uuid/v4.js","../../node_modules/.pnpm/@actions+exec@1.1.1/node_modules/@actions/exec/lib/toolrunner.js","../../node_modules/.pnpm/@actions+tool-cache@2.0.1/node_modules/@actions/tool-cache/lib/retry-helper.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/opts-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-manual.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/find-made.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/mkdirp-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/path-arg.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/use-native.js","../../node_modules/.pnpm/mkdirp@3.0.1/node_modules/mkdirp/dist/mjs/index.js","../../src/versions/default_versions.ts","../../node_modules/.pnpm/ubuntu-version@2.0.0/node_modules/ubuntu-version/index.js","../../node_modules/.pnpm/macos-release@3.3.0/node_modules/macos-release/index.js","../../src/utils/env/macos_version.ts","../../src/nala/nala.ts","../../src/vcpkg/vcpkg.ts","../../src/tool.ts","../../src/bazel/bazel.ts","../../src/conan/conan.ts","../../src/meson/meson.ts","../../src/ccache/ccache.ts","../../src/sccache/sccache.ts","../../src/cppcheck/cppcheck.ts","../../src/make/make.ts","../../src/setup-cpp.ts","../../src/check-updates.ts","../../src/compilers.ts"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","import crypto from 'crypto';\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\nexport default function rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n crypto.randomFillSync(rnds8Pool);\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","export function getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new DecodedURL(proxyVar);\n }\n catch {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new DecodedURL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexport function checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\nclass DecodedURL extends URL {\n _decodedUsername;\n _decodedPassword;\n constructor(url, base) {\n super(url, base);\n this._decodedUsername = decodeURIComponent(super.username);\n this._decodedPassword = decodeURIComponent(super.password);\n }\n get username() {\n return this._decodedUsername;\n }\n get password() {\n return this._decodedPassword;\n }\n}\n//# sourceMappingURL=proxy.js.map","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","import * as core from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nexport function error(err) {\n return GITHUB_ACTIONS ? core.error(err) : console.log(`\\x1b[31m${err}\\x1b[0m`);\n}\nexport function success(msg) {\n return console.log(`\\x1b[32m${msg}\\x1b[0m`);\n}\nexport function warning(msg) {\n return GITHUB_ACTIONS ? core.warning(msg) : console.log(`\\x1b[33m${msg}\\x1b[0m`);\n}\nexport function notice(msg) {\n return GITHUB_ACTIONS ? core.notice(msg) : console.log(`\\x1b[94m${msg}\\x1b[0m`);\n}\nexport function info(msg) {\n return GITHUB_ACTIONS ? core.info(msg) : console.log(msg);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ik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QUcsQ0FBQyxHQUFHLENBQUMsQ0FBQTtBQUMzRCxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgY29yZSBmcm9tIFwiQGFjdGlvbnMvY29yZVwiXG5pbXBvcnQgeyBHSVRIVUJfQUNUSU9OUyB9IGZyb20gXCJjaS1pbmZvXCJcblxuZXhwb3J0IGZ1bmN0aW9uIGVycm9yKGVycjogc3RyaW5nIHwgRXJyb3IpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5lcnJvcihlcnIpIDogY29uc29sZS5sb2coYFxceDFiWzMxbSR7ZXJyfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHN1Y2Nlc3MobXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIGNvbnNvbGUubG9nKGBcXHgxYlszMm0ke21zZ31cXHgxYlswbWApXG59XG5cbmV4cG9ydCBmdW5jdGlvbiB3YXJuaW5nKG1zZzogc3RyaW5nKSB7XG4gIHJldHVybiBHSVRIVUJfQUNUSU9OUyA/IGNvcmUud2FybmluZyhtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzMzbSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG5vdGljZShtc2c6IHN0cmluZykge1xuICByZXR1cm4gR0lUSFVCX0FDVElPTlMgPyBjb3JlLm5vdGljZShtc2cpIDogY29uc29sZS5sb2coYFxceDFiWzk0bSR7bXNnfVxceDFiWzBtYClcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGluZm8obXNnOiBzdHJpbmcpIHtcbiAgcmV0dXJuIEdJVEhVQl9BQ1RJT05TID8gY29yZS5pbmZvKG1zZykgOiBjb25zb2xlLmxvZyhtc2cpXG59XG4iXX0=","var fs = require('fs')\nvar core\nif (process.platform === 'win32' || global.TESTING_WINDOWS) {\n core = require('./windows.js')\n} else {\n core = require('./mode.js')\n}\n\nmodule.exports = isexe\nisexe.sync = sync\n\nfunction isexe (path, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n if (!cb) {\n if (typeof Promise !== 'function') {\n throw new TypeError('callback not provided')\n }\n\n return new Promise(function (resolve, reject) {\n isexe(path, options || {}, function (er, is) {\n if (er) {\n reject(er)\n } else {\n resolve(is)\n }\n })\n })\n }\n\n core(path, options || {}, function (er, is) {\n // ignore EACCES because that just means we aren't allowed to run it\n if (er) {\n if (er.code === 'EACCES' || options && options.ignoreErrors) {\n er = null\n is = false\n }\n }\n cb(er, is)\n })\n}\n\nfunction sync (path, options) {\n // my kingdom for a filtered catch\n try {\n return core.sync(path, options || {})\n } catch (er) {\n if (options && options.ignoreErrors || er.code === 'EACCES') {\n return false\n } else {\n throw er\n }\n }\n}\n","'use strict';\n\nconst path = require('path');\nconst which = require('which');\nconst getPathKey = require('path-key');\n\nfunction resolveCommandAttempt(parsed, withoutPathExt) {\n const env = parsed.options.env || process.env;\n const cwd = process.cwd();\n const hasCustomCwd = parsed.options.cwd != null;\n // Worker threads do not have process.chdir()\n const shouldSwitchCwd = hasCustomCwd && process.chdir !== undefined && !process.chdir.disabled;\n\n // If a custom `cwd` was specified, we need to change the process cwd\n // because `which` will do stat calls but does not support a custom cwd\n if (shouldSwitchCwd) {\n try {\n process.chdir(parsed.options.cwd);\n } catch (err) {\n /* Empty */\n }\n }\n\n let resolved;\n\n try {\n resolved = which.sync(parsed.command, {\n path: env[getPathKey({ env })],\n pathExt: withoutPathExt ? path.delimiter : undefined,\n });\n } catch (e) {\n /* Empty */\n } finally {\n if (shouldSwitchCwd) {\n process.chdir(cwd);\n }\n }\n\n // If we successfully resolved, ensure that an absolute path is returned\n // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it\n if (resolved) {\n resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);\n }\n\n return resolved;\n}\n\nfunction resolveCommand(parsed) {\n return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);\n}\n\nmodule.exports = resolveCommand;\n","'use strict';\n\nconst isWin = process.platform === 'win32';\n\nfunction notFoundError(original, syscall) {\n return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {\n code: 'ENOENT',\n errno: 'ENOENT',\n syscall: `${syscall} ${original.command}`,\n path: original.command,\n spawnargs: original.args,\n });\n}\n\nfunction hookChildProcess(cp, parsed) {\n if (!isWin) {\n return;\n }\n\n const originalEmit = cp.emit;\n\n cp.emit = function (name, arg1) {\n // If emitting \"exit\" event and exit code is 1, we need to check if\n // the command exists and emit an \"error\" instead\n // See https://github.com/IndigoUnited/node-cross-spawn/issues/16\n if (name === 'exit') {\n const err = verifyENOENT(arg1, parsed, 'spawn');\n\n if (err) {\n return originalEmit.call(cp, 'error', err);\n }\n }\n\n return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params\n };\n}\n\nfunction verifyENOENT(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawn');\n }\n\n return null;\n}\n\nfunction verifyENOENTSync(status, parsed) {\n if (isWin && status === 1 && !parsed.file) {\n return notFoundError(parsed.original, 'spawnSync');\n }\n\n return null;\n}\n\nmodule.exports = {\n hookChildProcess,\n verifyENOENT,\n verifyENOENTSync,\n notFoundError,\n};\n","'use strict';\n\nconst cp = require('child_process');\nconst parse = require('./lib/parse');\nconst enoent = require('./lib/enoent');\n\nfunction spawn(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);\n\n // Hook into child process \"exit\" event to emit an error if the command\n // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n enoent.hookChildProcess(spawned, parsed);\n\n return spawned;\n}\n\nfunction spawnSync(command, args, options) {\n // Parse the arguments\n const parsed = parse(command, args, options);\n\n // Spawn the child process\n const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);\n\n // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16\n result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);\n\n return result;\n}\n\nmodule.exports = spawn;\nmodule.exports.spawn = spawn;\nmodule.exports.sync = spawnSync;\n\nmodule.exports._parse = parse;\nmodule.exports._enoent = enoent;\n","export default function pathKey(options = {}) {\n\tconst {\n\t\tenv = process.env,\n\t\tplatform = process.platform\n\t} = options;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(env).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n}\n","export function isStream(stream) {\n\treturn stream !== null\n\t\t&& typeof stream === 'object'\n\t\t&& typeof stream.pipe === 'function';\n}\n\nexport function isWritableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.writable !== false\n\t\t&& typeof stream._write === 'function'\n\t\t&& typeof stream._writableState === 'object';\n}\n\nexport function isReadableStream(stream) {\n\treturn isStream(stream)\n\t\t&& stream.readable !== false\n\t\t&& typeof stream._read === 'function'\n\t\t&& typeof stream._readableState === 'object';\n}\n\nexport function isDuplexStream(stream) {\n\treturn isWritableStream(stream)\n\t\t&& isReadableStream(stream);\n}\n\nexport function isTransformStream(stream) {\n\treturn isDuplexStream(stream)\n\t\t&& typeof stream._transform === 'function';\n}\n","'use strict';\nconst {constants: BufferConstants} = require('buffer');\nconst stream = require('stream');\nconst {promisify} = require('util');\nconst bufferStream = require('./buffer-stream');\n\nconst streamPipelinePromisified = promisify(stream.pipeline);\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nasync function getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\tthrow new Error('Expected a stream');\n\t}\n\n\toptions = {\n\t\tmaxBuffer: Infinity,\n\t\t...options\n\t};\n\n\tconst {maxBuffer} = options;\n\tconst stream = bufferStream(options);\n\n\tawait new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\t// Don't retrieve an oversized buffer.\n\t\t\tif (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\n\t\t\treject(error);\n\t\t};\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tawait streamPipelinePromisified(inputStream, stream);\n\t\t\t\tresolve();\n\t\t\t} catch (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t}\n\t\t})();\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t});\n\n\treturn stream.getBufferedValue();\n}\n\nmodule.exports = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});\nmodule.exports.array = (stream, options) => getStream(stream, {...options, array: true});\nmodule.exports.MaxBufferError = MaxBufferError;\n","import {Buffer} from 'node:buffer';\nimport path from 'node:path';\nimport childProcess from 'node:child_process';\nimport process from 'node:process';\nimport crossSpawn from 'cross-spawn';\nimport stripFinalNewline from 'strip-final-newline';\nimport {npmRunPathEnv} from 'npm-run-path';\nimport onetime from 'onetime';\nimport {makeError} from './lib/error.js';\nimport {normalizeStdio, normalizeStdioNode} from './lib/stdio.js';\nimport {spawnedKill, spawnedCancel, setupTimeout, validateTimeout, setExitHandler} from './lib/kill.js';\nimport {addPipeMethods} from './lib/pipe.js';\nimport {handleInput, getSpawnedResult, makeAllStream, handleInputSync} from './lib/stream.js';\nimport {mergePromise, getSpawnedPromise} from './lib/promise.js';\nimport {joinCommand, parseCommand, parseTemplates, getEscapedCommand} from './lib/command.js';\nimport {logCommand, verboseDefault} from './lib/verbose.js';\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPathEnv({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\tverbose: verboseDefault,\n\t\t...options,\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execaSync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nexport function execa(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tvalidateTimeout(parsed.options);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t}));\n\t\tmergePromise(dummySpawned, errorPromise);\n\t\treturn dummySpawned;\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tescapedCommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),\n\t\t\t\tkilled: spawned.killed,\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\taddPipeMethods(spawned);\n\tmergePromise(spawned, handlePromiseOnce);\n\treturn spawned;\n}\n\nexport function execaSync(file, args, options) {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\tconst escapedCommand = getEscapedCommand(file, args);\n\tlogCommand(escapedCommand, parsed.options);\n\n\tconst input = handleInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, {...parsed.options, input});\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false,\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tescapedCommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null,\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\tescapedCommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false,\n\t};\n}\n\nconst normalizeScriptStdin = ({input, inputFile, stdio}) => input === undefined && inputFile === undefined && stdio === undefined\n\t? {stdin: 'inherit'}\n\t: {};\n\nconst normalizeScriptOptions = (options = {}) => ({\n\tpreferLocal: true,\n\t...normalizeScriptStdin(options),\n\t...options,\n});\n\nfunction create$(options) {\n\tfunction $(templatesOrOptions, ...expressions) {\n\t\tif (!Array.isArray(templatesOrOptions)) {\n\t\t\treturn create$({...options, ...templatesOrOptions});\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templatesOrOptions, expressions);\n\t\treturn execa(file, args, normalizeScriptOptions(options));\n\t}\n\n\t$.sync = (templates, ...expressions) => {\n\t\tif (!Array.isArray(templates)) {\n\t\t\tthrow new TypeError('Please use $(options).sync`command` instead of $.sync(options)`command`.');\n\t\t}\n\n\t\tconst [file, ...args] = parseTemplates(templates, expressions);\n\t\treturn execaSync(file, args, normalizeScriptOptions(options));\n\t};\n\n\treturn $;\n}\n\nexport const $ = create$();\n\nexport function execaCommand(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n}\n\nexport function execaCommandSync(command, options) {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execaSync(file, args, options);\n}\n\nexport function execaNode(scriptPath, args, options = {}) {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdioNode(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv,\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : []),\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false,\n\t\t},\n\t);\n}\n","import os from 'node:os';\nimport onExit from 'signal-exit';\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior\nexport const spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {\n\tconst killResult = kill(signal);\n\tsetKillTimeout(kill, signal, options, killResult);\n\treturn killResult;\n};\n\nconst setKillTimeout = (kill, signal, options, killResult) => {\n\tif (!shouldForceKill(signal, options, killResult)) {\n\t\treturn;\n\t}\n\n\tconst timeout = getForceKillAfterTimeout(options);\n\tconst t = setTimeout(() => {\n\t\tkill('SIGKILL');\n\t}, timeout);\n\n\t// Guarded because there's no `.unref()` when `execa` is used in the renderer\n\t// process in Electron. This cannot be tested since we don't run tests in\n\t// Electron.\n\t// istanbul ignore else\n\tif (t.unref) {\n\t\tt.unref();\n\t}\n};\n\nconst shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;\n\nconst isSigterm = signal => signal === os.constants.signals.SIGTERM\n\t\t|| (typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');\n\nconst getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {\n\tif (forceKillAfterTimeout === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterTimeout\\` option to be a non-negative integer, got \\`${forceKillAfterTimeout}\\` (${typeof forceKillAfterTimeout})`);\n\t}\n\n\treturn forceKillAfterTimeout;\n};\n\n// `childProcess.cancel()`\nexport const spawnedCancel = (spawned, context) => {\n\tconst killResult = spawned.kill();\n\n\tif (killResult) {\n\t\tcontext.isCanceled = true;\n\t}\n};\n\nconst timeoutKill = (spawned, signal, reject) => {\n\tspawned.kill(signal);\n\treject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));\n};\n\n// `timeout` option handling\nexport const setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {\n\tif (timeout === 0 || timeout === undefined) {\n\t\treturn spawnedPromise;\n\t}\n\n\tlet timeoutId;\n\tconst timeoutPromise = new Promise((resolve, reject) => {\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutKill(spawned, killSignal, reject);\n\t\t}, timeout);\n\t});\n\n\tconst safeSpawnedPromise = spawnedPromise.finally(() => {\n\t\tclearTimeout(timeoutId);\n\t});\n\n\treturn Promise.race([timeoutPromise, safeSpawnedPromise]);\n};\n\nexport const validateTimeout = ({timeout}) => {\n\tif (timeout !== undefined && (!Number.isFinite(timeout) || timeout < 0)) {\n\t\tthrow new TypeError(`Expected the \\`timeout\\` option to be a non-negative integer, got \\`${timeout}\\` (${typeof timeout})`);\n\t}\n};\n\n// `cleanup` option handling\nexport const setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {\n\tif (!cleanup || detached) {\n\t\treturn timedPromise;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tspawned.kill();\n\t});\n\n\treturn timedPromise.finally(() => {\n\t\tremoveExitHandler();\n\t});\n};\n","// eslint-disable-next-line unicorn/prefer-top-level-await\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\n\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property),\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nexport const mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function'\n\t\t\t? (...args) => Reflect.apply(descriptor.value, promise(), args)\n\t\t\t: descriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n};\n\n// Use promises instead of `child_process` events\nexport const getSpawnedPromise = spawned => new Promise((resolve, reject) => {\n\tspawned.on('exit', (exitCode, signal) => {\n\t\tresolve({exitCode, signal});\n\t});\n\n\tspawned.on('error', error => {\n\t\treject(error);\n\t});\n\n\tif (spawned.stdin) {\n\t\tspawned.stdin.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\t}\n});\n","import {createReadStream, readFileSync} from 'node:fs';\nimport {isStream} from 'is-stream';\nimport getStream from 'get-stream';\nimport mergeStream from 'merge-stream';\n\nconst validateInputOptions = input => {\n\tif (input !== undefined) {\n\t\tthrow new TypeError('The `input` and `inputFile` options cannot be both set.');\n\t}\n};\n\nconst getInputSync = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn readFileSync(inputFile);\n};\n\n// `input` and `inputFile` option in sync mode\nexport const handleInputSync = options => {\n\tconst input = getInputSync(options);\n\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n\n\treturn input;\n};\n\nconst getInput = ({input, inputFile}) => {\n\tif (typeof inputFile !== 'string') {\n\t\treturn input;\n\t}\n\n\tvalidateInputOptions(input);\n\treturn createReadStream(inputFile);\n};\n\n// `input` and `inputFile` option in async mode\nexport const handleInput = (spawned, options) => {\n\tconst input = getInput(options);\n\n\tif (input === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nexport const makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\t// When `buffer` is `false`, `streamPromise` is `undefined` and there is no buffered data to retrieve\n\tif (!stream || streamPromise === undefined) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nexport const getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise),\n\t\t]);\n\t}\n};\n","import {createWriteStream} from 'node:fs';\nimport {ChildProcess} from 'node:child_process';\nimport {isWritableStream} from 'is-stream';\n\nconst isExecaChildProcess = target => target instanceof ChildProcess && typeof target.then === 'function';\n\nconst pipeToTarget = (spawned, streamName, target) => {\n\tif (typeof target === 'string') {\n\t\tspawned[streamName].pipe(createWriteStream(target));\n\t\treturn spawned;\n\t}\n\n\tif (isWritableStream(target)) {\n\t\tspawned[streamName].pipe(target);\n\t\treturn spawned;\n\t}\n\n\tif (!isExecaChildProcess(target)) {\n\t\tthrow new TypeError('The second argument must be a string, a stream or an Execa child process.');\n\t}\n\n\tif (!isWritableStream(target.stdin)) {\n\t\tthrow new TypeError('The target child process\\'s stdin must be available.');\n\t}\n\n\tspawned[streamName].pipe(target.stdin);\n\treturn target;\n};\n\nexport const addPipeMethods = spawned => {\n\tif (spawned.stdout !== null) {\n\t\tspawned.pipeStdout = pipeToTarget.bind(undefined, spawned, 'stdout');\n\t}\n\n\tif (spawned.stderr !== null) {\n\t\tspawned.pipeStderr = pipeToTarget.bind(undefined, spawned, 'stderr');\n\t}\n\n\tif (spawned.all !== undefined) {\n\t\tspawned.pipeAll = pipeToTarget.bind(undefined, spawned, 'all');\n\t}\n};\n","import * as execa from \"execa\";\nimport which from \"which\";\n/** The cached powershell path */\nlet powershell;\n/**\n * Asynchronously execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns A promise to the execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershell(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execa(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Execute a powershell command.\n *\n * @param command The powershell command to execute\n * @param startupFlags The optional startup flags to be passed to powershell. Defaults to `[\"-NoProfile\", \"-NoLogo\",\n * \"-NonInteractive\"]`. This means that the Powershell profile is not sourced first.\n * @param execOptions The options passed to `execa`. Defaults to `{ stdio: \"inherit\" }`\n * @returns The execution result\n * @note It prefers `pwsh` over `powershell`\n */\nexport function execPowershellSync(command, startupFlags = [\"-NoProfile\", \"-NoLogo\", \"-NonInteractive\"], execOptions = { stdio: \"inherit\" }) {\n return execa.execaSync(getPowerShell(), [...startupFlags, \"-c\", command], execOptions);\n}\n/**\n * Get the path to the powershell executable.\n *\n * @note It prefers `pwsh` over `powershell`\n * @note It caches the path for the subsequent calls to this function\n */\nexport function getPowerShell() {\n if (powershell === undefined) {\n const maybePwsh = which.sync(\"pwsh\", { nothrow: true });\n if (maybePwsh !== null) {\n powershell = maybePwsh;\n }\n const maybePowerShell = which.sync(\"powershell\", { nothrow: true });\n if (maybePowerShell !== null) {\n powershell = maybePowerShell;\n }\n }\n if (powershell === undefined) {\n throw new Error(\"Could not find powershell\");\n }\n return powershell;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEtBQUssTUFBTSxPQUFPLENBQUE7QUFDOUIsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLGlDQUFpQztBQUNqQyxJQUFJLFVBQThCLENBQUE7QUFFbEM7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLGNBQWMsQ0FDNUIsT0FBZSxFQUNmLGVBQXlCLENBQUMsWUFBWSxFQUFFLFNBQVMsRUFBRSxpQkFBaUIsQ0FBQyxFQUNyRSxjQUE2QixFQUFFLEtBQUssRUFBRSxTQUFTLEVBQUU7SUFFakQsT0FBTyxLQUFLLENBQUMsS0FBSyxDQUFDLGFBQWEsRUFBRSxFQUFFLENBQUMsR0FBRyxZQUFZLEVBQUUsSUFBSSxFQUFFLE9BQU8sQ0FBQyxFQUFFLFdBQVcsQ0FBQyxDQUFBO0FBQ3BGLENBQUM7QUFFRDs7Ozs7Ozs7O0dBU0c7QUFDSCxNQUFNLFVBQVUsa0JBQWtCLENBQ2hDLE9BQWUsRUFDZixlQUF5QixDQUFDLFlBQVksRUFBRSxTQUFTLEVBQUUsaUJBQWlCLENBQUMsRUFDckUsY0FBaUMsRUFBRSxLQUFLLEVBQUUsU0FBUyxFQUFFO0lBRXJELE9BQU8sS0FBSyxDQUFDLFNBQVMsQ0FBQyxhQUFhLEVBQUUsRUFBRSxDQUFDLEdBQUcsWUFBWSxFQUFFLElBQUksRUFBRSxPQUFPLENBQUMsRUFBRSxXQUFXLENBQUMsQ0FBQTtBQUN4RixDQUFDO0FBRUQ7Ozs7O0dBS0c7QUFDSCx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Bub3RlIEl0IHByZWZlcnMgYHB3c2hgIG92ZXIgYHBvd2Vyc2hlbGxgXG4gKiBAbm90ZSBJdCBjYWNoZXMgdGhlIHBhdGggZm9yIHRoZSBzdWJzZXF1ZW50IGNhbGxzIHRvIHRoaXMgZnVuY3Rpb25cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldFBvd2VyU2hlbGwoKSB7XG4gIGlmIChwb3dlcnNoZWxsID09PSB1bmRlZmluZWQpIHtcbiAgICBjb25zdCBtYXliZVB3c2ggPSB3aGljaC5zeW5jKFwicHdzaFwiLCB7IG5vdGhyb3c6IHRydWUgfSlcbiAgICBpZiAobWF5YmVQd3NoICE9PSBudWxsKSB7XG4gICAgICBwb3dlcnNoZWxsID0gbWF5YmVQd3NoXG4gICAgfVxuICAgIGNvbnN0IG1heWJlUG93ZXJTaGVsbCA9IHdoaWNoLnN5bmMoXCJwb3dlcnNoZWxsXCIsIHsgbm90aHJvdzogdHJ1ZSB9KVxuICAgIGlmIChtYXliZVBvd2VyU2hlbGwgIT09IG51bGwpIHtcbiAgICAgIHBvd2Vyc2hlbGwgPSBtYXliZVBvd2VyU2hlbGxcbiAgICB9XG4gIH1cbiAgaWYgKHBvd2Vyc2hlbGwgPT09IHVuZGVmaW5lZCkge1xuICAgIHRocm93IG5ldyBFcnJvcihcIkNvdWxkIG5vdCBmaW5kIHBvd2Vyc2hlbGxcIilcbiAgfVxuICByZXR1cm4gcG93ZXJzaGVsbFxufVxuIl19","function e(e,t,r,o){Object.defineProperty(e,t,{get:r,set:o,enumerable:!0,configurable:!0})}function t(){return null!==m.sync(\"sudo\",{nothrow:!0})}function r(){return process.getuid?.()===0||!!process.env.CI}function o(){return r()&&t()}function n(e){return o()?`sudo ${e}`:e}function s(e,t=[],r=h){return o()?b(a(e,t),r):l(e,i(t),r)}function c(e,t=[],r=h){return o()?y(a(e,t),r):S(e,i(t),r)}function a(e,t){return`sudo ${i([e,...t]).join(\" \")}`}function i(e){return e.map(e=>`'${e}'`)}async function d(){try{return await S(\"fltmc\"),!0}catch{return!1}}async function u(){if(\"win32\"!==process.platform)return!1;try{return await S(\"fsutil\",[\"dirty\",\"query\",process.env.systemdrive??\"\"]),!0}catch(e){if(\"ENOENT\"===e.code)return d();return!1}}function f(){return\"win32\"===process.platform?R():r()}async function p(e){if((\"linux\"===process.platform||\"darwin\"===process.platform)&&o()&&void 0!==process.env.SUDO_USER){let t=w.statSync(e).isDirectory();await c(\"chown\",[...t?[\"-R\"]:[],process.env.SUDO_USER,e],h)}}var $,x={};import m from\"which\";import{execaCommandSync as b,execaSync as l,execaCommand as y,execa as S}from\"execa\";import w from\"fs\";e(x,\"hasSudo\",()=>t),e(x,\"isRoot\",()=>r),e(x,\"isSudo\",()=>o),e(x,\"prependSudo\",()=>n),e(x,\"defaultExecOptions\",()=>h),e(x,\"execRootSync\",()=>s),e(x,\"execRoot\",()=>c);let h={stdio:\"inherit\",shell:!0};e($={},\"isAdminWindows\",()=>R),e($,\"isAdminPosix\",()=>A),e($,\"isAdmin\",()=>f);let R=u,A=r;e({},\"grantUserWriteAccess\",()=>p);export{t as hasSudo,r as isRoot,o as isSudo,n as prependSudo,h as defaultExecOptions,s as execRootSync,c as execRoot,R as isAdminWindows,A as isAdminPosix,f as isAdmin,p as grantUserWriteAccess};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\n\nvar value = require(\"./valid-value\")\n , defineProperty = Object.defineProperty\n , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor\n , getOwnPropertyNames = Object.getOwnPropertyNames\n , getOwnPropertySymbols = Object.getOwnPropertySymbols;\n\nmodule.exports = function (target, source) {\n\tvar error, sourceObject = Object(value(source));\n\ttarget = Object(value(target));\n\tgetOwnPropertyNames(sourceObject).forEach(function (name) {\n\t\ttry {\n\t\t\tdefineProperty(target, name, getOwnPropertyDescriptor(source, name));\n\t\t} catch (e) { error = e; }\n\t});\n\tif (typeof getOwnPropertySymbols === \"function\") {\n\t\tgetOwnPropertySymbols(sourceObject).forEach(function (symbol) {\n\t\t\ttry {\n\t\t\t\tdefineProperty(target, symbol, getOwnPropertyDescriptor(source, symbol));\n\t\t\t} catch (e) { error = e; }\n\t\t});\n\t}\n\tif (error !== undefined) throw error;\n\treturn target;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? globalThis : require(\"./implementation\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tif (typeof globalThis !== \"object\") return false;\n\tif (!globalThis) return false;\n\treturn globalThis.Array === Array;\n};\n","var naiveFallback = function () {\n\tif (typeof self === \"object\" && self) return self;\n\tif (typeof window === \"object\" && window) return window;\n\tthrow new Error(\"Unable to resolve global `this`\");\n};\n\nmodule.exports = (function () {\n\tif (this) return this;\n\n\t// Unexpected strict mode (may happen if e.g. bundled into ESM module)\n\n\t// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis\n\t// In all ES5+ engines global object inherits from Object.prototype\n\t// (if you approached one that doesn't please report)\n\ttry {\n\t\tObject.defineProperty(Object.prototype, \"__global__\", {\n\t\t\tget: function () { return this; },\n\t\t\tconfigurable: true\n\t\t});\n\t} catch (error) {\n\t\t// Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)\n\t\treturn naiveFallback();\n\t}\n\ttry {\n\t\t// Safari case (window.__global__ is resolved with global context, but __global__ does not)\n\t\tif (!__global__) return naiveFallback();\n\t\treturn __global__;\n\t} finally {\n\t\tdelete Object.prototype.__global__;\n\t}\n})();\n","\"use strict\";\n\nvar isSymbol = require(\"./is-symbol\");\n\nmodule.exports = function (value) {\n\tif (!isSymbol(value)) throw new TypeError(value + \" is not a symbol\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tif (!value) return false;\n\tif (typeof value === \"symbol\") return true;\n\tif (!value.constructor) return false;\n\tif (value.constructor.name !== \"Symbol\") return false;\n\treturn value[value.constructor.toStringTag] === \"Symbol\";\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")()\n\t? require(\"ext/global-this\").Symbol\n\t: require(\"./polyfill\");\n","\"use strict\";\n\nvar global = require(\"ext/global-this\")\n , validTypes = { object: true, symbol: true };\n\nmodule.exports = function () {\n\tvar Symbol = global.Symbol;\n\tvar symbol;\n\tif (typeof Symbol !== \"function\") return false;\n\tsymbol = Symbol(\"test symbol\");\n\ttry { String(symbol); }\n\tcatch (e) { return false; }\n\n\t// Return 'true' also for polyfills\n\tif (!validTypes[typeof Symbol.iterator]) return false;\n\tif (!validTypes[typeof Symbol.toPrimitive]) return false;\n\tif (!validTypes[typeof Symbol.toStringTag]) return false;\n\n\treturn true;\n};\n","// ES2015 Symbol polyfill for environments that do not (or partially) support it\n\n\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"./validate-symbol\")\n , NativeSymbol = require(\"ext/global-this\").Symbol\n , generateName = require(\"./lib/private/generate-name\")\n , setupStandardSymbols = require(\"./lib/private/setup/standard-symbols\")\n , setupSymbolRegistry = require(\"./lib/private/setup/symbol-registry\");\n\nvar create = Object.create\n , defineProperties = Object.defineProperties\n , defineProperty = Object.defineProperty;\n\nvar SymbolPolyfill, HiddenSymbol, isNativeSafe;\n\nif (typeof NativeSymbol === \"function\") {\n\ttry {\n\t\tString(NativeSymbol());\n\t\tisNativeSafe = true;\n\t} catch (ignore) {}\n} else {\n\tNativeSymbol = null;\n}\n\n// Internal constructor (not one exposed) for creating Symbol instances.\n// This one is used to ensure that `someSymbol instanceof Symbol` always return false\nHiddenSymbol = function Symbol(description) {\n\tif (this instanceof HiddenSymbol) throw new TypeError(\"Symbol is not a constructor\");\n\treturn SymbolPolyfill(description);\n};\n\n// Exposed `Symbol` constructor\n// (returns instances of HiddenSymbol)\nmodule.exports = SymbolPolyfill = function Symbol(description) {\n\tvar symbol;\n\tif (this instanceof Symbol) throw new TypeError(\"Symbol is not a constructor\");\n\tif (isNativeSafe) return NativeSymbol(description);\n\tsymbol = create(HiddenSymbol.prototype);\n\tdescription = description === undefined ? \"\" : String(description);\n\treturn defineProperties(symbol, {\n\t\t__description__: d(\"\", description),\n\t\t__name__: d(\"\", generateName(description))\n\t});\n};\n\nsetupStandardSymbols(SymbolPolyfill);\nsetupSymbolRegistry(SymbolPolyfill);\n\n// Internal tweaks for real symbol producer\ndefineProperties(HiddenSymbol.prototype, {\n\tconstructor: d(SymbolPolyfill),\n\ttoString: d(\"\", function () { return this.__name__; })\n});\n\n// Proper implementation of methods exposed on Symbol.prototype\n// They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype\ndefineProperties(SymbolPolyfill.prototype, {\n\ttoString: d(function () { return \"Symbol (\" + validateSymbol(this).__description__ + \")\"; }),\n\tvalueOf: d(function () { return validateSymbol(this); })\n});\ndefineProperty(\n\tSymbolPolyfill.prototype, SymbolPolyfill.toPrimitive,\n\td(\"\", function () {\n\t\tvar symbol = validateSymbol(this);\n\t\tif (typeof symbol === \"symbol\") return symbol;\n\t\treturn symbol.toString();\n\t})\n);\ndefineProperty(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d(\"c\", \"Symbol\"));\n\n// Proper implementaton of toPrimitive and toStringTag for returned symbol instances\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toStringTag,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toStringTag])\n);\n\n// Note: It's important to define `toPrimitive` as last one, as some implementations\n// implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)\n// And that may invoke error in definition flow:\n// See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149\ndefineProperty(\n\tHiddenSymbol.prototype, SymbolPolyfill.toPrimitive,\n\td(\"c\", SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive])\n);\n","\"use strict\";\n\nvar d = require(\"d\");\n\nvar create = Object.create, defineProperty = Object.defineProperty, objPrototype = Object.prototype;\n\nvar created = create(null);\nmodule.exports = function (desc) {\n\tvar postfix = 0, name, ie11BugWorkaround;\n\twhile (created[desc + (postfix || \"\")]) ++postfix;\n\tdesc += postfix || \"\";\n\tcreated[desc] = true;\n\tname = \"@@\" + desc;\n\tdefineProperty(\n\t\tobjPrototype, name,\n\t\td.gs(null, function (value) {\n\t\t\t// For IE11 issue see:\n\t\t\t// https://connect.microsoft.com/IE/feedbackdetail/view/1928508/\n\t\t\t// ie11-broken-getters-on-dom-objects\n\t\t\t// https://github.com/medikoo/es6-symbol/issues/12\n\t\t\tif (ie11BugWorkaround) return;\n\t\t\tie11BugWorkaround = true;\n\t\t\tdefineProperty(this, name, d(value));\n\t\t\tie11BugWorkaround = false;\n\t\t})\n\t);\n\treturn name;\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , NativeSymbol = require(\"ext/global-this\").Symbol;\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\t// To ensure proper interoperability with other native functions (e.g. Array.from)\n\t\t// fallback to eventual native implementation of given symbol\n\t\thasInstance: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill(\"hasInstance\")\n\t\t),\n\t\tisConcatSpreadable: d(\n\t\t\t\"\",\n\t\t\t(NativeSymbol && NativeSymbol.isConcatSpreadable) ||\n\t\t\t\tSymbolPolyfill(\"isConcatSpreadable\")\n\t\t),\n\t\titerator: d(\"\", (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill(\"iterator\")),\n\t\tmatch: d(\"\", (NativeSymbol && NativeSymbol.match) || SymbolPolyfill(\"match\")),\n\t\treplace: d(\"\", (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill(\"replace\")),\n\t\tsearch: d(\"\", (NativeSymbol && NativeSymbol.search) || SymbolPolyfill(\"search\")),\n\t\tspecies: d(\"\", (NativeSymbol && NativeSymbol.species) || SymbolPolyfill(\"species\")),\n\t\tsplit: d(\"\", (NativeSymbol && NativeSymbol.split) || SymbolPolyfill(\"split\")),\n\t\ttoPrimitive: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill(\"toPrimitive\")\n\t\t),\n\t\ttoStringTag: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill(\"toStringTag\")\n\t\t),\n\t\tunscopables: d(\n\t\t\t\"\", (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill(\"unscopables\")\n\t\t)\n\t});\n};\n","\"use strict\";\n\nvar d = require(\"d\")\n , validateSymbol = require(\"../../../validate-symbol\");\n\nvar registry = Object.create(null);\n\nmodule.exports = function (SymbolPolyfill) {\n\treturn Object.defineProperties(SymbolPolyfill, {\n\t\tfor: d(function (key) {\n\t\t\tif (registry[key]) return registry[key];\n\t\t\treturn (registry[key] = SymbolPolyfill(String(key)));\n\t\t}),\n\t\tkeyFor: d(function (symbol) {\n\t\t\tvar key;\n\t\t\tvalidateSymbol(symbol);\n\t\t\tfor (key in registry) {\n\t\t\t\tif (registry[key] === symbol) return key;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t});\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Array.from : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar from = Array.from, arr, result;\n\tif (typeof from !== \"function\") return false;\n\tarr = [\"raz\", \"dwa\"];\n\tresult = from(arr);\n\treturn Boolean(result && result !== arr && result[1] === \"dwa\");\n};\n","\"use strict\";\n\nvar iteratorSymbol = require(\"es6-symbol\").iterator\n , isArguments = require(\"../../function/is-arguments\")\n , isFunction = require(\"../../function/is-function\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , callable = require(\"../../object/valid-callable\")\n , validValue = require(\"../../object/valid-value\")\n , isValue = require(\"../../object/is-value\")\n , isString = require(\"../../string/is-string\")\n , isArray = Array.isArray\n , call = Function.prototype.call\n , desc = { configurable: true, enumerable: true, writable: true, value: null }\n , defineProperty = Object.defineProperty;\n\n// eslint-disable-next-line complexity, max-lines-per-function\nmodule.exports = function (arrayLike /*, mapFn, thisArg*/) {\n\tvar mapFn = arguments[1]\n\t , thisArg = arguments[2]\n\t , Context\n\t , i\n\t , j\n\t , arr\n\t , length\n\t , code\n\t , iterator\n\t , result\n\t , getIterator\n\t , value;\n\n\tarrayLike = Object(validValue(arrayLike));\n\n\tif (isValue(mapFn)) callable(mapFn);\n\tif (!this || this === Array || !isFunction(this)) {\n\t\t// Result: Plain array\n\t\tif (!mapFn) {\n\t\t\tif (isArguments(arrayLike)) {\n\t\t\t\t// Source: Arguments\n\t\t\t\tlength = arrayLike.length;\n\t\t\t\tif (length !== 1) return Array.apply(null, arrayLike);\n\t\t\t\tarr = new Array(1);\n\t\t\t\tarr[0] = arrayLike[0];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t\tif (isArray(arrayLike)) {\n\t\t\t\t// Source: Array\n\t\t\t\tarr = new Array((length = arrayLike.length));\n\t\t\t\tfor (i = 0; i < length; ++i) arr[i] = arrayLike[i];\n\t\t\t\treturn arr;\n\t\t\t}\n\t\t}\n\t\tarr = [];\n\t} else {\n\t\t// Result: Non plain array\n\t\tContext = this;\n\t}\n\n\tif (!isArray(arrayLike)) {\n\t\tif ((getIterator = arrayLike[iteratorSymbol]) !== undefined) {\n\t\t\t// Source: Iterator\n\t\t\titerator = callable(getIterator).call(arrayLike);\n\t\t\tif (Context) arr = new Context();\n\t\t\tresult = iterator.next();\n\t\t\ti = 0;\n\t\t\twhile (!result.done) {\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[i] = value;\n\t\t\t\t}\n\t\t\t\tresult = iterator.next();\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tlength = i;\n\t\t} else if (isString(arrayLike)) {\n\t\t\t// Source: String\n\t\t\tlength = arrayLike.length;\n\t\t\tif (Context) arr = new Context();\n\t\t\tfor (i = 0, j = 0; i < length; ++i) {\n\t\t\t\tvalue = arrayLike[i];\n\t\t\t\tif (i + 1 < length) {\n\t\t\t\t\tcode = value.charCodeAt(0);\n\t\t\t\t\t// eslint-disable-next-line max-depth\n\t\t\t\t\tif (code >= 0xd800 && code <= 0xdbff) value += arrayLike[++i];\n\t\t\t\t}\n\t\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, value, j) : value;\n\t\t\t\tif (Context) {\n\t\t\t\t\tdesc.value = value;\n\t\t\t\t\tdefineProperty(arr, j, desc);\n\t\t\t\t} else {\n\t\t\t\t\tarr[j] = value;\n\t\t\t\t}\n\t\t\t\t++j;\n\t\t\t}\n\t\t\tlength = j;\n\t\t}\n\t}\n\tif (length === undefined) {\n\t\t// Source: array or array-like\n\t\tlength = toPosInt(arrayLike.length);\n\t\tif (Context) arr = new Context(length);\n\t\tfor (i = 0; i < length; ++i) {\n\t\t\tvalue = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];\n\t\t\tif (Context) {\n\t\t\t\tdesc.value = value;\n\t\t\t\tdefineProperty(arr, i, desc);\n\t\t\t} else {\n\t\t\t\tarr[i] = value;\n\t\t\t}\n\t\t}\n\t}\n\tif (Context) {\n\t\tdesc.value = null;\n\t\tarr.length = length;\n\t}\n\treturn arr;\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , id = objToString.call((function () { return arguments; })());\n\nmodule.exports = function (value) { return objToString.call(value) === id; };\n","\"use strict\";\n\nvar objToString = Object.prototype.toString\n , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);\n\nmodule.exports = function (value) {\n\treturn typeof value === \"function\" && isFunctionStringTag(objToString.call(value));\n};\n","\"use strict\";\n\nvar objToString = Object.prototype.toString, id = objToString.call(\"\");\n\nmodule.exports = function (value) {\n\treturn (\n\t\ttypeof value === \"string\" ||\n\t\t(value &&\n\t\t\ttypeof value === \"object\" &&\n\t\t\t(value instanceof String || objToString.call(value) === id)) ||\n\t\tfalse\n\t);\n};\n","\"use strict\";\n\nvar numberIsNaN = require(\"../../number/is-nan\")\n , toPosInt = require(\"../../number/to-pos-integer\")\n , value = require(\"../../object/valid-value\")\n , indexOf = Array.prototype.indexOf\n , objHasOwnProperty = Object.prototype.hasOwnProperty\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (searchElement /*, fromIndex*/) {\n\tvar i, length, fromIndex, val;\n\tif (!numberIsNaN(searchElement)) return indexOf.apply(this, arguments);\n\n\tlength = toPosInt(value(this).length);\n\tfromIndex = arguments[1];\n\tif (isNaN(fromIndex)) fromIndex = 0;\n\telse if (fromIndex >= 0) fromIndex = floor(fromIndex);\n\telse fromIndex = toPosInt(this.length) - floor(abs(fromIndex));\n\n\tfor (i = fromIndex; i < length; ++i) {\n\t\tif (objHasOwnProperty.call(this, i)) {\n\t\t\tval = this[i];\n\t\t\tif (numberIsNaN(val)) return i; // Jslint: ignore\n\t\t}\n\t}\n\treturn -1;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Number.isNaN : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar numberIsNaN = Number.isNaN;\n\tif (typeof numberIsNaN !== \"function\") return false;\n\treturn !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);\n};\n","\"use strict\";\n\nmodule.exports = function (value) {\n\t// eslint-disable-next-line no-self-compare\n\treturn value !== value;\n};\n","\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , forEach = require(\"./for-each\")\n , call = Function.prototype.call;\n\nmodule.exports = function (obj, cb /*, thisArg*/) {\n\tvar result = {}, thisArg = arguments[2];\n\tcallable(cb);\n\tforEach(obj, function (value, key, targetObj, index) {\n\t\tresult[key] = call.call(cb, thisArg, value, key, targetObj, index);\n\t});\n\treturn result;\n};\n","'use strict';\n\nvar ensureCallable = function (fn) {\n\tif (typeof fn !== 'function') throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n\nvar byObserver = function (Observer) {\n\tvar node = document.createTextNode(''), queue, currentQueue, i = 0;\n\tnew Observer(function () {\n\t\tvar callback;\n\t\tif (!queue) {\n\t\t\tif (!currentQueue) return;\n\t\t\tqueue = currentQueue;\n\t\t} else if (currentQueue) {\n\t\t\tqueue = currentQueue.concat(queue);\n\t\t}\n\t\tcurrentQueue = queue;\n\t\tqueue = null;\n\t\tif (typeof currentQueue === 'function') {\n\t\t\tcallback = currentQueue;\n\t\t\tcurrentQueue = null;\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}\n\t\tnode.data = (i = ++i % 2); // Invoke other batch, to handle leftover callbacks in case of crash\n\t\twhile (currentQueue) {\n\t\t\tcallback = currentQueue.shift();\n\t\t\tif (!currentQueue.length) currentQueue = null;\n\t\t\tcallback();\n\t\t}\n\t}).observe(node, { characterData: true });\n\treturn function (fn) {\n\t\tensureCallable(fn);\n\t\tif (queue) {\n\t\t\tif (typeof queue === 'function') queue = [queue, fn];\n\t\t\telse queue.push(fn);\n\t\t\treturn;\n\t\t}\n\t\tqueue = fn;\n\t\tnode.data = (i = ++i % 2);\n\t};\n};\n\nmodule.exports = (function () {\n\t// Node.js\n\tif ((typeof process === 'object') && process && (typeof process.nextTick === 'function')) {\n\t\treturn process.nextTick;\n\t}\n\n\t// queueMicrotask\n\tif (typeof queueMicrotask === \"function\") {\n\t\treturn function (cb) { queueMicrotask(ensureCallable(cb)); };\n\t}\n\n\t// MutationObserver\n\tif ((typeof document === 'object') && document) {\n\t\tif (typeof MutationObserver === 'function') return byObserver(MutationObserver);\n\t\tif (typeof WebKitMutationObserver === 'function') return byObserver(WebKitMutationObserver);\n\t}\n\n\t// W3C Draft\n\t// http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html\n\tif (typeof setImmediate === 'function') {\n\t\treturn function (cb) { setImmediate(ensureCallable(cb)); };\n\t}\n\n\t// Wide available standard\n\tif ((typeof setTimeout === 'function') || (typeof setTimeout === 'object')) {\n\t\treturn function (cb) { setTimeout(ensureCallable(cb), 0); };\n\t}\n\n\treturn null;\n}());\n","// Deprecated\n\n\"use strict\";\n\nmodule.exports = function (obj) { return typeof obj === \"function\"; };\n","module.exports = isPromise;\nmodule.exports.default = isPromise;\n\nfunction isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n}\n","/* eslint max-statements: 0 */\n\n// Support for functions returning promise\n\n\"use strict\";\n\nvar objectMap = require(\"es5-ext/object/map\")\n , primitiveSet = require(\"es5-ext/object/primitive-set\")\n , ensureString = require(\"es5-ext/object/validate-stringifiable-value\")\n , toShortString = require(\"es5-ext/to-short-string-representation\")\n , isPromise = require(\"is-promise\")\n , nextTick = require(\"next-tick\");\n\nvar create = Object.create\n , supportedModes = primitiveSet(\"then\", \"then:finally\", \"done\", \"done:finally\");\n\nrequire(\"../lib/registered-extensions\").promise = function (mode, conf) {\n\tvar waiting = create(null), cache = create(null), promises = create(null);\n\n\tif (mode === true) {\n\t\tmode = null;\n\t} else {\n\t\tmode = ensureString(mode);\n\t\tif (!supportedModes[mode]) {\n\t\t\tthrow new TypeError(\"'\" + toShortString(mode) + \"' is not valid promise mode\");\n\t\t}\n\t}\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id, ignore, promise) {\n\t\tvar isFailed = false;\n\n\t\tif (!isPromise(promise)) {\n\t\t\t// Non promise result\n\t\t\tcache[id] = promise;\n\t\t\tconf.emit(\"setasync\", id, 1);\n\t\t\treturn;\n\t\t}\n\t\twaiting[id] = 1;\n\t\tpromises[id] = promise;\n\t\tvar onSuccess = function (result) {\n\t\t\tvar count = waiting[id];\n\t\t\tif (isFailed) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Detected unordered then|done & finally resolution, which \" +\n\t\t\t\t\t\t\"in turn makes proper detection of success/failure impossible (when in \" +\n\t\t\t\t\t\t\"'done:finally' mode)\\n\" +\n\t\t\t\t\t\t\"Consider to rely on 'then' or 'done' mode instead.\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!count) return; // Deleted from cache before resolved\n\t\t\tdelete waiting[id];\n\t\t\tcache[id] = result;\n\t\t\tconf.emit(\"setasync\", id, count);\n\t\t};\n\t\tvar onFailure = function () {\n\t\t\tisFailed = true;\n\t\t\tif (!waiting[id]) return; // Deleted from cache (or succeed in case of finally)\n\t\t\tdelete waiting[id];\n\t\t\tdelete promises[id];\n\t\t\tconf.delete(id);\n\t\t};\n\n\t\tvar resolvedMode = mode;\n\t\tif (!resolvedMode) resolvedMode = \"then\";\n\n\t\tif (resolvedMode === \"then\") {\n\t\t\tvar nextTickFailure = function () { nextTick(onFailure); };\n\t\t\t// Eventual finally needs to be attached to non rejected promise\n\t\t\t// (so we not force propagation of unhandled rejection)\n\t\t\tpromise = promise.then(function (result) {\n\t\t\t\tnextTick(onSuccess.bind(this, result));\n\t\t\t}, nextTickFailure);\n\t\t\t// If `finally` is a function we attach to it to remove cancelled promises.\n\t\t\tif (typeof promise.finally === \"function\") {\n\t\t\t\tpromise.finally(nextTickFailure);\n\t\t\t}\n\t\t} else if (resolvedMode === \"done\") {\n\t\t\t// Not recommended, as it may mute any eventual \"Unhandled error\" events\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess, onFailure);\n\t\t} else if (resolvedMode === \"done:finally\") {\n\t\t\t// The only mode with no side effects assuming library does not throw unconditionally\n\t\t\t// for rejected promises.\n\t\t\tif (typeof promise.done !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'done' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (typeof promise.finally !== \"function\") {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Memoizee error: Retrieved promise does not implement 'finally' \" +\n\t\t\t\t\t\t\"in 'done:finally' mode\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tpromise.done(onSuccess);\n\t\t\tpromise.finally(onFailure);\n\t\t}\n\t});\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id, args, context) {\n\t\tvar promise;\n\t\tif (waiting[id]) {\n\t\t\t++waiting[id]; // Still waiting\n\t\t\treturn;\n\t\t}\n\t\tpromise = promises[id];\n\t\tvar emit = function () { conf.emit(\"getasync\", id, args, context); };\n\t\tif (isPromise(promise)) {\n\t\t\tif (typeof promise.done === \"function\") promise.done(emit);\n\t\t\telse {\n\t\t\t\tpromise.then(function () { nextTick(emit); });\n\t\t\t}\n\t\t} else {\n\t\t\temit();\n\t\t}\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tdelete promises[id];\n\t\tif (waiting[id]) {\n\t\t\tdelete waiting[id];\n\t\t\treturn; // Not yet resolved\n\t\t}\n\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\tvar result = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, [result]);\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\twaiting = create(null);\n\t\tpromises = create(null);\n\t\tconf.emit(\"clearasync\", objectMap(oldCache, function (data) { return [data]; }));\n\t});\n};\n","\"use strict\";\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (arg /*, …args*/) {\n\tvar set = create(null);\n\tforEach.call(arguments, function (name) { set[name] = true; });\n\treturn set;\n};\n","\"use strict\";\n\nvar ensureValue = require(\"./valid-value\")\n , stringifiable = require(\"./validate-stringifiable\");\n\nmodule.exports = function (value) { return stringifiable(ensureValue(value)); };\n","\"use strict\";\n\nvar isCallable = require(\"./is-callable\");\n\nmodule.exports = function (stringifiable) {\n\ttry {\n\t\tif (stringifiable && isCallable(stringifiable.toString)) return stringifiable.toString();\n\t\treturn String(stringifiable);\n\t} catch (e) {\n\t\tthrow new TypeError(\"Passed argument cannot be stringifed\");\n\t}\n};\n","\"use strict\";\n\nvar safeToString = require(\"./safe-to-string\");\n\nvar reNewLine = /[\\n\\r\\u2028\\u2029]/g;\n\nmodule.exports = function (value) {\n\tvar string = safeToString(value);\n\t// Trim if too long\n\tif (string.length > 100) string = string.slice(0, 99) + \"…\";\n\t// Replace eventual new lines\n\tstring = string.replace(reNewLine, function (char) {\n\t\treturn JSON.stringify(char).slice(1, -1);\n\t});\n\treturn string;\n};\n","\"use strict\";\n\nvar isCallable = require(\"./object/is-callable\");\n\nmodule.exports = function (value) {\n\ttry {\n\t\tif (value && isCallable(value.toString)) return value.toString();\n\t\treturn String(value);\n\t} catch (e) {\n\t\treturn \"\";\n\t}\n};\n","import fs, {promises as fsPromises} from 'node:fs';\n\nexport async function pathExists(path) {\n\ttry {\n\t\tawait fsPromises.access(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function pathExistsSync(path) {\n\ttry {\n\t\tfs.accessSync(path);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n","import { homedir } from \"os\";\nimport { join } from \"path\";\nimport { isSudo } from \"admina\";\nexport function userHomeDir() {\n if (isSudo() && typeof process.env.SUDO_USER === \"string\" && process.env.SUDO_USER !== \"\") {\n // use the user profile even if root\n if (process.platform === \"darwin\") {\n return join(\"/Users/\", process.env.SUDO_USER);\n }\n else {\n return join(\"/home/\", process.env.SUDO_USER);\n }\n }\n else {\n const maybeHomeDir = homedir();\n if (maybeHomeDir === \"\") {\n return undefined;\n }\n return maybeHomeDir;\n }\n}\nconst tildeRegex = /^~(?=$|\\/|\\\\)/;\n/**\n * Replaces a tilde with the user's home directory\n *\n * @example UntildifyUser(\"~/foo\") // /home/user/foo\n *\n * @param path The path to untildify\n * @returns The untildified path\n */\nexport function untildifyUser(path) {\n const maybeHomeDir = userHomeDir();\n if (maybeHomeDir === undefined) {\n return path;\n }\n return path.replace(tildeR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iAgICByZXR1cm4gbWF5YmVIb21lRGlyXG4gIH1cbn1cblxuY29uc3QgdGlsZGVSZWdleCA9IC9efig/PSR8XFwvfFxcXFwpL1xuXG4vKipcbiAqIFJlcGxhY2VzIGEgdGlsZGUgd2l0aCB0aGUgdXNlcidzIGhvbWUgZGlyZWN0b3J5XG4gKlxuICogQGV4YW1wbGUgVW50aWxkaWZ5VXNlcihcIn4vZm9vXCIpIC8vIC9ob21lL3VzZXIvZm9vXG4gKlxuICogQHBhcmFtIHBhdGggVGhlIHBhdGggdG8gdW50aWxkaWZ5XG4gKiBAcmV0dXJucyBUaGUgdW50aWxkaWZpZWQgcGF0aFxuICovXG5leHBvcnQgZnVuY3Rpb24gdW50aWxkaWZ5VXNlcihwYXRoOiBzdHJpbmcpIHtcbiAgY29uc3QgbWF5YmVIb21lRGlyID0gdXNlckhvbWVEaXIoKVxuICBpZiAobWF5YmVIb21lRGlyID09PSB1bmRlZmluZWQpIHtcbiAgICByZXR1cm4gcGF0aFxuICB9XG5cbiAgcmV0dXJuIHBhdGgucmVwbGFjZSh0aWxkZVJlZ2V4LCBtYXliZUhvbWVEaXIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { grantUserWriteAccess } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport memoize from \"memoizee\";\nimport { pathExists } from \"path-exists\";\nimport { untildifyUser } from \"untildify-user\";\nconst { appendFile, readFile, writeFile } = promises;\nexport const defaultRcPath = untildifyUser(\"~/.bashrc\");\nasync function sourceRCInRc_(options) {\n const sourceRcString = options.guard === undefined\n ? `\\nsource \"${options.rcPath}\"\\n`\n : `\\n# ${options.guard}\\nif [[ \"$SOURCE_${options.guard.toUpperCase()}RC\" != 0 && -f \"${options.rcPath}\" ]]; then source \"${options.rcPath}\"; fi\\n`;\n try {\n await Promise.all([\n addRCHeader(options),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.bashrc\")),\n addSourceToTargetRc(sourceRcString, untildifyUser(\"~/.profile\")),\n ]);\n }\n catch (err) {\n warning(`Failed to add ${sourceRcString} to .profile or .bashrc. You should add it manually: ${err}`);\n }\n}\n/**\n * handles adding conditions to source rc file from .bashrc and .profile\n */\nexport const sourceRCInRc = memoize(sourceRCInRc_, { promise: true });\nasync function addRCHeader(options) {\n // a variable that prevents source rc from being called from .bashrc and .profile\n const rcHeader = options.guard === undefined\n ? \"\\n# Automatically Generated by envosman\\n\"\n : `\\n# Automatically Generated by envosman ${options.guard}\\nexport SOURCE_${options.guard.toUpperCase()}RC=0\\n`;\n if (await pathExists(options.rcPath)) {\n const rcContent = await readFile(options.rcPath, \"utf8\");\n if (!rcContent.includes(rcHeader)) {\n // already executed setupCppInProfile\n await appendFile(options.rcPath, `\\n${rcHeader}\\n`);\n info(`Added ${rcHeader} to ${options.rcPath}`);\n }\n }\n}\nasync function addSourceToTargetRc(sourceRcString, targetRcPath) {\n if (await pathExists(targetRcPath)) {\n const bashrcContent = await readFile(targetRcPath, \"utf-8\");\n if (!bashrcContent.includes(sourceRcString)) {\n await appendFile(targetRcPath, sourceRcString);\n info(`${sourceRcString} was added to ${targetRcPath}`);\n }\n }\n}\nexport async function finalizeRC(rcOptions) {\n if (await pathExists(rcOptions.rcPath)) {\n const entries = (await readFile(rcOptions.rcPath, \"utf-8\")).split(\"\\n\");\n const uniqueEntries = [...new Set(entries.reverse())].reverse(); // remove duplicates, keeping the latest entry\n await writeFile(rcOptions.rcPath, uniqueEntries.join(\"\\n\"));\n await grantUserWriteAccess(rcOptions.rcPath);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmMtZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yYy1maWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLG9CQUFvQixFQUFFL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wgc291cmNlUmNTdHJpbmcpXG4gICAgICBpbmZvKGAke3NvdXJjZVJjU3RyaW5nfSB3YXMgYWRkZWQgdG8gJHt0YXJnZXRSY1BhdGh9YClcbiAgICB9XG4gIH1cbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGZpbmFsaXplUkMocmNPcHRpb25zOiBSY09wdGlvbnMpIHtcbiAgaWYgKGF3YWl0IHBhdGhFeGlzdHMocmNPcHRpb25zLnJjUGF0aCkpIHtcbiAgICBjb25zdCBlbnRyaWVzID0gKGF3YWl0IHJlYWRGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIFwidXRmLThcIikpLnNwbGl0KFwiXFxuXCIpXG5cbiAgICBjb25zdCB1bmlxdWVFbnRyaWVzID0gWy4uLm5ldyBTZXQoZW50cmllcy5yZXZlcnNlKCkpXS5yZXZlcnNlKCkgLy8gcmVtb3ZlIGR1cGxpY2F0ZXMsIGtlZXBpbmcgdGhlIGxhdGVzdCBlbnRyeVxuXG4gICAgYXdhaXQgd3JpdGVGaWxlKHJjT3B0aW9ucy5yY1BhdGgsIHVuaXF1ZUVudHJpZXMuam9pbihcIlxcblwiKSlcblxuICAgIGF3YWl0IGdyYW50VXNlcldyaXRlQWNjZXNzKHJjT3B0aW9ucy5yY1BhdGgpXG4gIH1cbn1cbiJdfQ==","import { promises } from \"fs\";\nimport { exportVariable as ghExportVariable } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nimport { escapeString } from \"./utils.js\";\nconst { appendFile } = promises;\n/**\n * Add an environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addEnv(name, valGiven, givenOptions = {}) {\n const options = {\n escapeSpace: false,\n overwrite: true,\n rcPath: defaultRcPath,\n ...givenOptions,\n };\n const val = escapeString(valGiven ?? \"\", options.escapeSpace);\n try {\n if (GITHUB_ACTIONS) {\n try {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n ghExportVariable(name, val);\n }\n catch (err) {\n error(err);\n await addEnvSystem(name, val, options);\n }\n }\n else {\n await addEnvSystem(name, val, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to export environment variable ${name}=${val}. You should add it manually.`);\n }\n}\nasync function addEnvSystem(name, valGiven, options) {\n const val = valGiven ?? \"\";\n switch (process.platform) {\n case \"win32\": {\n if (!options.overwrite) {\n if (process.env[name] !== undefined) {\n info(`Environment variable ${name} is already defined. Skipping.`);\n return;\n }\n }\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit\n await execPowershell(`[Environment]::SetEnvironmentVariable('${name}', '${val}', \"User\")`);\n info(`${name}='${val}' was set in the environment.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n if (!options.overwrite) {\n await appendFile(options.rcPath, `\\nif [ -z \"\\${${name}}\" ]; then export ${name}=\"${val}\"; fi\\n`);\n info(`if not defined ${name} then ${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n else {\n await appendFile(options.rcPath, `\\nexport ${name}=\"${val}\"\\n`);\n info(`${name}=\"${val}\" was added to \"${options.rcPath}`);\n }\n return;\n }\n default: {\n // fall through shell path modification\n }\n }\n process.env[name] = val;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hZGQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxJQUFJLENBQUE7QUFDN0IsT0FBTyxFQUFFLGNBQWMsSUFBSSxnQkFBZ0IsRUFBRSxNQUFNLGVBQWUsQ0FBQTtBQUNsRSxPQUFP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2V0RW52aXJvbm1lbnRWYXJpYWJsZSgnJHtuYW1lfScsICcke3ZhbH0nLCBcIlVzZXJcIilgKVxuICAgICAgaW5mbyhgJHtuYW1lfT0nJHt2YWx9JyB3YXMgc2V0IGluIHRoZSBlbnZpcm9ubWVudC5gKVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGNhc2UgXCJsaW51eFwiOlxuICAgIGNhc2UgXCJkYXJ3aW5cIjoge1xuICAgICAgYXdhaXQgc291cmNlUkNJblJjKG9wdGlvbnMpXG4gICAgICBpZiAoIW9wdGlvbnMub3ZlcndyaXRlKSB7XG4gICAgICAgIGF3YWl0IGFwcGVuZEZpbGUob3B0aW9ucy5yY1BhdGgsIGBcXG5pZiBbIC16IFwiXFwkeyR7bmFtZX19XCIgXTsgdGhlbiBleHBvcnQgJHtuYW1lfT1cIiR7dmFsfVwiOyBmaVxcbmApXG4gICAgICAgIGluZm8oYGlmIG5vdCBkZWZpbmVkICR7bmFtZX0gdGhlbiAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgYXdhaXQgYXBwZW5kRmlsZShvcHRpb25zLnJjUGF0aCwgYFxcbmV4cG9ydCAke25hbWV9PVwiJHt2YWx9XCJcXG5gKVxuICAgICAgICBpbmZvKGAke25hbWV9PVwiJHt2YWx9XCIgd2FzIGFkZGVkIHRvIFwiJHtvcHRpb25zLnJjUGF0aH1gKVxuICAgICAgfVxuICAgICAgcmV0dXJuXG4gICAgfVxuICAgIGRlZmF1bHQ6IHtcbiAgICAgIC8vIGZhbGwgdGhyb3VnaCBzaGVsbCBwYXRoIG1vZGlmaWNhdGlvblxuICAgIH1cbiAgfVxuICBwcm9jZXNzLmVudltuYW1lXSA9IHZhbFxufVxuIl19","import escapeSpace from \"escape-path-with-spaces\";\nimport escapeQuote from \"escape-quotes\";\n/**\n * Escape a string for use in a shell command\n * @param valGiven The string to escape\n * @param shouldEscapeSpace Whether to escape spaces in the string\n *\n * @private\n */\nexport function escapeString(valGiven, shouldEscapeSpace = false) {\n const spaceEscaped = shouldEscapeSpace ? escapeSpace(valGiven) : valGiven;\n return escapeQuote(spaceEscaped, \"\\\"\", \"\\\\\");\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXRpbHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdXRpbHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxXQUFXLE1BQU0seUJBQXlCLENBQUE7QUFDakQsT0FBTyxXQUFXLE1BQU0sZUFBZSxDQUFBO0FBRXZDOzs7Ozs7R0FNRztBQUNILE1BQU0sVUFBVSxZQUFZLENBQUMsUUFBZ0IsRUFBRSxvQkFBNkIsS0FBSztJQUMvRSxNQUFNLFlBQVksR0FBRyxpQkFBaUIsQ0FBQyxDQUFDLENBQUMsV0FBVyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQyxRQUFRLENBQUE7SUFDekUsT0FBTyxXQUFXLENBQUMsWUFBWSxFQUFFLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQTtBQUM5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IGVzY2FwZVNwYWNlIGZyb20gXCJlc2NhcGUtcGF0aC13aXRoLXNwYWNlc1wiXG5pbXBvcnQgZXNjYXBlUXVvdGUgZnJvbSBcImVzY2FwZS1xdW90ZXNcIlxuXG4vKipcbiAqIEVzY2FwZSBhIHN0cmluZyBmb3IgdXNlIGluIGEgc2hlbGwgY29tbWFuZFxuICogQHBhcmFtIHZhbEdpdmVuIFRoZSBzdHJpbmcgdG8gZXNjYXBlXG4gKiBAcGFyYW0gc2hvdWxkRXNjYXBlU3BhY2UgV2hldGhlciB0byBlc2NhcGUgc3BhY2VzIGluIHRoZSBzdHJpbmdcbiAqXG4gKiBAcHJpdmF0ZVxuICovXG5leHBvcnQgZnVuY3Rpb24gZXNjYXBlU3RyaW5nKHZhbEdpdmVuOiBzdHJpbmcsIHNob3VsZEVzY2FwZVNwYWNlOiBib29sZWFuID0gZmFsc2UpIHtcbiAgY29uc3Qgc3BhY2VFc2NhcGVkID0gc2hvdWxkRXNjYXBlU3BhY2UgPyBlc2NhcGVTcGFjZSh2YWxHaXZlbikgOiB2YWxHaXZlblxuICByZXR1cm4gZXNjYXBlUXVvdGUoc3BhY2VFc2NhcGVkLCBcIlxcXCJcIiwgXCJcXFxcXCIpXG59XG4iXX0=","import { promises } from \"fs\";\nimport { delimiter } from \"path\";\nimport { addPath as ghAddPath } from \"@actions/core\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { error, info } from \"ci-log\";\nimport { execPowershell } from \"exec-powershell\";\nimport { defaultRcPath, sourceRCInRc } from \"./rc-file.js\";\nconst { appendFile } = promises;\n/**\n * Add a path to the PATH environment variable.\n *\n * This function is cross-platforms and works in all the local or CI systems.\n */\nexport async function addPath(path, givenOptions = {}) {\n const options = { rcPath: defaultRcPath, ...givenOptions };\n if (isIgnoredPath(path)) {\n return;\n }\n process.env.PATH = `${path}${delimiter}${process.env.PATH}`;\n try {\n if (GITHUB_ACTIONS) {\n try {\n ghAddPath(path);\n }\n catch (err) {\n error(err);\n await addPathSystem(path, options);\n }\n }\n else {\n await addPathSystem(path, options);\n }\n }\n catch (err) {\n error(`${err}\\nFailed to add ${path} to the percistent PATH. You should add it manually.`);\n }\n}\nasync function addPathSystem(path, options) {\n switch (process.platform) {\n case \"win32\": {\n // We do not use `execaSync(`setx PATH \"${path};%PATH%\"`)` because of its character limit and also because %PATH% is different for user and system\n await execPowershell(`$USER_PATH=([Environment]::GetEnvironmentVariable(\"PATH\", \"User\")); [Environment]::SetEnvironmentVariable(\"PATH\", \"${path};$USER_PATH\", \"User\")`);\n info(`\"${path}\" was added to the PATH.`);\n return;\n }\n case \"linux\":\n case \"darwin\": {\n await sourceRCInRc(options);\n await appendFile(options.rcPath, `\\nexport PATH=\"${path}:$PATH\"\\n`);\n info(`\"${path}\" was added to \"${options.rcPath}\"`);\n return;\n }\n default: {\n return;\n }\n }\n}\nconst ignoredPaths = [/\\/usr\\/bin\\/?/, /\\/usr\\/local\\/bin\\/?/];\n/** Skip adding /usr/bin to PATH if it is already there */\nfunction isIgnoredPath(path) {\n if (ignoredPaths.some((checkedPath) => checkedPath.test(path))) {\n const paths = process.env.PATH?.split(delimiter) ?? [];\n return paths.includes(path);\n }\n return false;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLXBhdGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYWRkLXBhdGgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLElBQUksQ0FBQTtBQUM3QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxPQUFPLElBQUksU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQ3BELE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxTQUFTLENBQUE7QUFDeEMsT0FBTyxFQUFFLEtBQUssRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDcEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGlCQUFpQixDQUFBO0FBQ2hELE9BQU8sRUFBRSxhQUFhLEVBQUUsWUFBWSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQzFELE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFRLENBQUE7QUFhL0I7Ozs7R0FJRztBQUVILE1BQU0sQ0FBQyxLQUFLLFVBQVUsT0FBTyxDQUFDLElBQVksRUFBRSxlQUF3QyxFQUFFO0lBQ3BGLE1BQU0sT0FBTyxH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vbWUoKGNoZWNrZWRQYXRoKSA9PiBjaGVja2VkUGF0aC50ZXN0KHBhdGgpKSkge1xuICAgIGNvbnN0IHBhdGhzID0gcHJvY2Vzcy5lbnYuUEFUSD8uc3BsaXQoZGVsaW1pdGVyKSA/PyBbXVxuICAgIHJldHVybiBwYXRocy5pbmNsdWRlcyhwYXRoKVxuICB9XG4gIHJldHVybiBmYWxzZVxufVxuIl19","\n//==============//\n// DEPENDENCIES //\n//==============//\n\nconst numerous = require('numerous');\nconst isNode = require('is-node');\n\n\n//================//\n// MODULE GLOBALS //\n//================//\n\n/**\n * Pre-calculating millisecond values for each time unit.\n */\nconst timeUnits = [\n ['years', 12 * 4 * 7 * 24 * 60 * 60 * 1000],\n ['months', 4 * 7 * 24 * 60 * 60 * 1000],\n ['weeks', 7 * 24 * 60 * 60 * 1000],\n ['days', 24 * 60 * 60 * 1000],\n ['hours', 60 * 60 * 1000],\n ['minutes', 60 * 1000],\n ['seconds', 1000],\n];\n\nconst defaultConfig = {\n locale: 'en',\n span: 2,\n delimiter: ', ',\n unitType: 'long',\n unitTypeLookupOrder: ['long', 'short', 'narrow'],\n autoloadLocales: true,\n};\n\n/**\n * Contains data of loaded locales.\n * @type {Object}\n */\nconst locales = {};\n\n\n//=========//\n// EXPORTS //\n//=========//\n\nmodule.exports = {\n create: timeDeltaFactory,\n addLocale,\n defaultConfig,\n};\n\n\n//===========//\n// FUNCTIONS //\n//===========//\n\n/**\n * Adds pluralization data for the specified locale.\n * Should be called in browser.\n *\n * @param {Object|Object[]} localeData\n */\nfunction addLocale(localeData) {\n\n // Normalizing input\n if (!Array.isArray(localeData)) {\n localeData = [localeData];\n }\n\n for (const item of localeData) {\n const { id, data } = item;\n locales[id] = data;\n }\n\n}\n\n\n/**\n * Creates new instance.\n *\n * @param {object?} config\n *\n * @returns {object}\n */\nfunction timeDeltaFactory(config) {\n\n // Initializing config by extending the default one\n config = Object.assign({}, defaultConfig, config || {});\n\n return {\n\n /**\n * Public proxy for internal format function.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object?} options\n *\n * @returns {string}\n */\n format: function (firstDate, secondDate, options) {\n\n // Allowing to override config with each individual call\n options = Object.assign({}, config, options || {});\n\n return format(firstDate, secondDate, options);\n\n }\n\n };\n\n}\n\n\n/**\n * Returns difference between two dates as a text string.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n * @param {object} config\n *\n * @returns {string}\n */\nfunction format(firstDate, secondDate, config) {\n\n ensureLocaleLoadedOrThrow(config.locale, {\n autoload: config.autoloadLocales,\n });\n\n // Handling input arguments\n // -----\n\n if (!firstDate) {\n throw new Error('Missing first date argument');\n }\n\n if (!secondDate) {\n throw new Error('Missing second date argument');\n }\n\n // Calculating\n // -----\n\n const difference = getDifference(firstDate, secondDate);\n const parts = [];\n\n for (const unit of difference) {\n const [name, value] = unit;\n if (value > 0) {\n parts.push(pluralize(name, value, config));\n }\n if (parts.length >= config.span) {\n break;\n }\n }\n\n // Returning the string value\n return parts.join(config.delimiter);\n\n}\n\n\n/**\n * Checks if locale is loaded. If not, tries to load it in Node.js,\n * or throws and error in Browser.\n *\n * @param {string} locale\n * @param {Object?} options\n */\nfunction ensureLocaleLoadedOrThrow(locale, options) {\n\n const { autoload } = options;\n\n if (hasLocale(locale)) {\n return;\n }\n\n if (isNode && autoload) {\n requireLocale(locale);\n\n } else {\n throw new Error(\n `Missing locale: ${locale}, you must load it manually before using it`\n );\n }\n\n}\n\n\n/**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} localeId\n *\n * @returns {boolean}\n */\nfunction hasLocale(localeId) {\n return Boolean(locales[localeId]);\n}\n\n/**\n * Tries to load the specified locale.\n *\n * @param {string} localeId\n */\nfunction requireLocale(localeId) {\n try {\n addLocale(\n require(`../locales/${localeId}.js`)\n );\n\n } catch (error) {\n throw Error(\n `Failed to load locale: ${localeId} from ../locales/${localeId}.js. If using a bundled time-delta, set 'autoloadLocales: false' in the config: ${error}`\n );\n\n }\n}\n\n\n/**\n * Returns difference as separate time units.\n *\n * @param {Date} firstDate\n * @param {Date} secondDate\n *\n * @returns {Array}\n */\nfunction getDifference(firstDate, secondDate) {\n let difference = (secondDate - firstDate);\n const results = [];\n timeUnits.some(function (unit) {\n const name = unit[0];\n const divider = unit[1];\n const value = Math.floor(difference / divider);\n difference -= value * divider;\n results.push([name, value]);\n if (difference <= 0) {\n // Breaking the loop.\n return true;\n }\n });\n return results;\n}\n\n/**\n * Returns localized and pluralized time unit.\n *\n * @param {string} unit\n * @param {int} value\n * @param {object} config\n *\n * @returns {string}\n */\nfunction pluralize(unit, value, config) {\n const unitTypeData = getLocaleDataForUnitType(config);\n const unitString = numerous.pluralize(\n config.locale,\n value,\n unitTypeData[unit]\n );\n return unitString.replace('{0}', value);\n}\n\n\n/**\n * Returns locale data for preferred unit type.\n *\n * @param {object} config\n *\n * @returns {Array}\n */\nfunction getLocaleDataForUnitType(config) {\n\n const localeData = locales[config.locale];\n\n // Making a copy of array from config.\n let lookupOrder = config.unitTypeLookupOrder.slice();\n\n // Adding interested type to the top.\n lookupOrder.unshift(config.unitType);\n\n // Making sure only unique items are present.\n lookupOrder = arrayUnique(lookupOrder);\n\n let unitTypeData = null;\n lookupOrder.some(function (unitType) {\n if ('undefined' !== typeof localeData[unitType]) {\n unitTypeData = localeData[unitType];\n // Breaking the loop.\n return true;\n }\n });\n\n if (null === unitTypeData) {\n throw new Error('Can not find any unit type data for locale: ' + config.locale);\n }\n\n return unitTypeData;\n}\n\n/**\n * Returns array with only unique items.\n *\n * @param {Array} array\n *\n * @returns {Array}\n */\nfunction arrayUnique(array) {\n return Array.from(\n new Set(array)\n );\n}\n","const SPACE_CHARACTERS = /\\s+/g\n\n// hoisted class for cyclic dependency\nclass Range {\n constructor (range, options) {\n options = parseOptions(options)\n\n if (range instanceof Range) {\n if (\n range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease\n ) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n // just put it in the set and return\n this.raw = range.value\n this.set = [[range]]\n this.formatted = undefined\n return this\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range.trim().replace(SPACE_CHARACTERS, ' ')\n\n // First, split on ||\n this.set = this.raw\n .split('||')\n // map the range to a 2d array of comparators\n .map(r => this.parseRange(r.trim()))\n // throw out any comparator lists that are empty\n // this generally means that it was not a valid range, which is allowed\n // in loose mode, but will still throw if the WHOLE range is invalid.\n .filter(c => c.length)\n\n if (!this.set.length) {\n throw new TypeError(`Invalid SemVer Range: ${this.raw}`)\n }\n\n // if we have any that are not the null set, throw out null sets.\n if (this.set.length > 1) {\n // keep the first one, in case they're all null sets\n const first = this.set[0]\n this.set = this.set.filter(c => !isNullSet(c[0]))\n if (this.set.length === 0) {\n this.set = [first]\n } else if (this.set.length > 1) {\n // if we have any that are *, then the range is just *\n for (const c of this.set) {\n if (c.length === 1 && isAny(c[0])) {\n this.set = [c]\n break\n }\n }\n }\n }\n\n this.formatted = undefined\n }\n\n get range () {\n if (this.formatted === undefined) {\n this.formatted = ''\n for (let i = 0; i < this.set.length; i++) {\n if (i > 0) {\n this.formatted += '||'\n }\n const comps = this.set[i]\n for (let k = 0; k < comps.length; k++) {\n if (k > 0) {\n this.formatted += ' '\n }\n this.formatted += comps[k].toString().trim()\n }\n }\n }\n return this.formatted\n }\n\n format () {\n return this.range\n }\n\n toString () {\n return this.range\n }\n\n parseRange (range) {\n // memoize range parsing for performance.\n // this is a very hot path, and fully deterministic.\n const memoOpts =\n (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |\n (this.options.loose && FLAG_LOOSE)\n const memoKey = memoOpts + ':' + range\n const cached = cache.get(memoKey)\n if (cached) {\n return cached\n }\n\n const loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace(this.options.includePrerelease))\n debug('hyphen replace', range)\n\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range)\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n debug('tilde trim', range)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n debug('caret trim', range)\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n let rangeList = range\n .split(' ')\n .map(comp => parseComparator(comp, this.options))\n .join(' ')\n .split(/\\s+/)\n // >=0.0.0 is equivalent to *\n .map(comp => replaceGTE0(comp, this.options))\n\n if (loose) {\n // in loose mode, throw out any that are not valid comparators\n rangeList = rangeList.filter(comp => {\n debug('loose invalid filter', comp, this.options)\n return !!comp.match(re[t.COMPARATORLOOSE])\n })\n }\n debug('range list', rangeList)\n\n // if any comparators are the null set, then replace with JUST null set\n // if more than one comparator, remove any * comparators\n // also, don't include the same comparator more than once\n const rangeMap = new Map()\n const comparators = rangeList.map(comp => new Comparator(comp, this.options))\n for (const comp of comparators) {\n if (isNullSet(comp)) {\n return [comp]\n }\n rangeMap.set(comp.value, comp)\n }\n if (rangeMap.size > 1 && rangeMap.has('')) {\n rangeMap.delete('')\n }\n\n const result = [...rangeMap.values()]\n cache.set(memoKey, result)\n return result\n }\n\n intersects (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some((thisComparators) => {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some((rangeComparators) => {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every((thisComparator) => {\n return rangeComparators.every((rangeComparator) => {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n }\n\n // if ANY of the sets match ALL of its comparators, then pass\n test (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (let i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n }\n}\n\nmodule.exports = Range\n\nconst LRU = require('../internal/lrucache')\nconst cache = new LRU()\n\nconst parseOptions = require('../internal/parse-options')\nconst Comparator = require('./comparator')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst {\n safeRe: re,\n t,\n comparatorTrimReplace,\n tildeTrimReplace,\n caretTrimReplace,\n} = require('../internal/re')\nconst { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')\n\nconst isNullSet = c => c.value === '<0.0.0-0'\nconst isAny = c => c.value === ''\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nconst isSatisfiable = (comparators, options) => {\n let result = true\n const remainingComparators = comparators.slice()\n let testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every((otherComparator) => {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nconst parseComparator = (comp, options) => {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nconst isX = id => !id || id.toLowerCase() === 'x' || id === '*'\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nconst replaceTildes = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceTilde(c, options))\n .join(' ')\n}\n\nconst replaceTilde = (comp, options) => {\n const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('tilde', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nconst replaceCarets = (comp, options) => {\n return comp\n .trim()\n .split(/\\s+/)\n .map((c) => replaceCaret(c, options))\n .join(' ')\n}\n\nconst replaceCaret = (comp, options) => {\n debug('caret', comp, options)\n const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n const z = options.includePrerelease ? '-0' : ''\n return comp.replace(r, (_, M, m, p, pr) => {\n debug('caret', comp, _, M, m, p, pr)\n let ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`\n } else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`\n } else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p}-${pr\n } <${+M + 1}.0.0-0`\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${m}.${+p + 1}-0`\n } else {\n ret = `>=${M}.${m}.${p\n }${z} <${M}.${+m + 1}.0-0`\n }\n } else {\n ret = `>=${M}.${m}.${p\n } <${+M + 1}.0.0-0`\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nconst replaceXRanges = (comp, options) => {\n debug('replaceXRanges', comp, options)\n return comp\n .split(/\\s+/)\n .map((c) => replaceXRange(c, options))\n .join(' ')\n}\n\nconst replaceXRange = (comp, options) => {\n comp = comp.trim()\n const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n const xM = isX(M)\n const xm = xM || isX(m)\n const xp = xm || isX(p)\n const anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n if (gtlt === '<') {\n pr = '-0'\n }\n\n ret = `${gtlt + M}.${m}.${p}${pr}`\n } else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`\n } else if (xp) {\n ret = `>=${M}.${m}.0${pr\n } <${M}.${+m + 1}.0-0`\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nconst replaceStars = (comp, options) => {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp\n .trim()\n .replace(re[t.STAR], '')\n}\n\nconst replaceGTE0 = (comp, options) => {\n debug('replaceGTE0', comp, options)\n return comp\n .trim()\n .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\n// TODO build?\nconst hyphenReplace = incPr => ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = `>=${fM}.0.0${incPr ? '-0' : ''}`\n } else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`\n } else if (fpr) {\n from = `>=${from}`\n } else {\n from = `>=${from}${incPr ? '-0' : ''}`\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`\n } else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`\n } else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`\n } else if (incPr) {\n to = `<${tM}.${tm}.${+tp + 1}-0`\n } else {\n to = `<=${to}`\n }\n\n return `${from} ${to}`.trim()\n}\n\nconst testSet = (set, version, options) => {\n for (let i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (let i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === Comparator.ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n const allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n","const ANY = Symbol('SemVer ANY')\n// hoisted class for cyclic dependency\nclass Comparator {\n static get ANY () {\n return ANY\n }\n\n constructor (comp, options) {\n options = parseOptions(options)\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n }\n\n parse (comp) {\n const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n const m = comp.match(r)\n\n if (!m) {\n throw new TypeError(`Invalid comparator: ${comp}`)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n }\n\n toString () {\n return this.value\n }\n\n test (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n }\n\n intersects (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n return new Range(comp.value, options).test(this.value)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n return new Range(this.value, options).test(comp.semver)\n }\n\n options = parseOptions(options)\n\n // Special cases where nothing can possibly be lower\n if (options.includePrerelease &&\n (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {\n return false\n }\n if (!options.includePrerelease &&\n (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {\n return false\n }\n\n // Same direction increasing (> or >=)\n if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {\n return true\n }\n // Same direction decreasing (< or <=)\n if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {\n return true\n }\n // same SemVer and both sides are inclusive (<= or >=)\n if (\n (this.semver.version === comp.semver.version) &&\n this.operator.includes('=') && comp.operator.includes('=')) {\n return true\n }\n // opposite directions less than\n if (cmp(this.semver, '<', comp.semver, options) &&\n this.operator.startsWith('>') && comp.operator.startsWith('<')) {\n return true\n }\n // opposite directions greater than\n if (cmp(this.semver, '>', comp.semver, options) &&\n this.operator.startsWith('<') && comp.operator.startsWith('>')) {\n return true\n }\n return false\n }\n}\n\nmodule.exports = Comparator\n\nconst parseOptions = require('../internal/parse-options')\nconst { safeRe: re, t } = require('../internal/re')\nconst cmp = require('../functions/cmp')\nconst debug = require('../internal/debug')\nconst SemVer = require('./semver')\nconst Range = require('./range')\n","'use strict';\n\nvar process$1 = require('process');\nvar semver = require('semver');\nvar os = require('os');\nvar path = require('path');\nvar fs = require('fs');\nvar https = require('https');\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar packageJson = process$1.env.npm_package_json;\nvar userAgent = process$1.env.npm_config_user_agent;\nvar isNpm6 = Boolean(userAgent && userAgent.startsWith('npm'));\nvar isNpm7 = Boolean(packageJson && packageJson.endsWith('package.json'));\nvar isNpm = isNpm6 || isNpm7;\nvar isYarn = Boolean(userAgent && userAgent.startsWith('yarn'));\nvar isNpmOrYarn = isNpm || isYarn;\n\nvar homeDirectory = os.homedir();\nvar configDir = process.env.XDG_CONFIG_HOME ||\n path.join(homeDirectory, '.config', 'simple-update-notifier');\nvar getConfigFile = function (packageName) {\n return path.join(configDir, \"\".concat(packageName.replace('@', '').replace('/', '__'), \".json\"));\n};\nvar createConfigDir = function () {\n if (!fs.existsSync(configDir)) {\n fs.mkdirSync(configDir, { recursive: true });\n }\n};\nvar getLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n try {\n if (!fs.existsSync(configFile)) {\n return undefined;\n }\n var file = JSON.parse(fs.readFileSync(configFile, 'utf8'));\n return file.lastUpdateCheck;\n }\n catch (_a) {\n return undefined;\n }\n};\nvar saveLastUpdate = function (packageName) {\n var configFile = getConfigFile(packageName);\n fs.writeFileSync(configFile, JSON.stringify({ lastUpdateCheck: new Date().getTime() }));\n};\n\nvar getDistVersion = function (packageName, distTag) { return __awaiter(void 0, void 0, void 0, function () {\n var url;\n return __generator(this, function (_a) {\n url = \"https://registry.npmjs.org/-/package/\".concat(packageName, \"/dist-tags\");\n return [2 /*return*/, new Promise(function (resolve, reject) {\n https\n .get(url, function (res) {\n var body = '';\n res.on('data', function (chunk) { return (body += chunk); });\n res.on('end', function () {\n try {\n var json = JSON.parse(body);\n var version = json[distTag];\n if (!version) {\n reject(new Error('Error getting version'));\n }\n resolve(version);\n }\n catch (_a) {\n reject(new Error('Could not parse version response'));\n }\n });\n })\n .on('error', function (err) { return reject(err); });\n })];\n });\n}); };\n\nvar hasNewVersion = function (_a) {\n var pkg = _a.pkg, _b = _a.updateCheckInterval, updateCheckInterval = _b === void 0 ? 1000 * 60 * 60 * 24 : _b, _c = _a.distTag, distTag = _c === void 0 ? 'latest' : _c, alwaysRun = _a.alwaysRun, debug = _a.debug;\n return __awaiter(void 0, void 0, void 0, function () {\n var lastUpdateCheck, latestVersion;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n createConfigDir();\n lastUpdateCheck = getLastUpdate(pkg.name);\n if (!(alwaysRun ||\n !lastUpdateCheck ||\n lastUpdateCheck < new Date().getTime() - updateCheckInterval)) return [3 /*break*/, 2];\n return [4 /*yield*/, getDistVersion(pkg.name, distTag)];\n case 1:\n latestVersion = _d.sent();\n saveLastUpdate(pkg.name);\n if (semver.gt(latestVersion, pkg.version)) {\n return [2 /*return*/, latestVersion];\n }\n else if (debug) {\n console.error(\"Latest version (\".concat(latestVersion, \") not newer than current version (\").concat(pkg.version, \")\"));\n }\n return [3 /*break*/, 3];\n case 2:\n if (debug) {\n console.error(\"Too recent to check for a new update. simpleUpdateNotifier() interval set to \".concat(updateCheckInterval, \"ms but only \").concat(new Date().getTime() - lastUpdateCheck, \"ms since last check.\"));\n }\n _d.label = 3;\n case 3: return [2 /*return*/, false];\n }\n });\n });\n};\n\nvar borderedText = function (text) {\n var lines = text.split('\\n');\n var width = Math.max.apply(Math, lines.map(function (l) { return l.length; }));\n var res = [\"\\u250C\".concat('─'.repeat(width + 2), \"\\u2510\")];\n for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {\n var line = lines_1[_i];\n res.push(\"\\u2502 \".concat(line.padEnd(width), \" \\u2502\"));\n }\n res.push(\"\\u2514\".concat('─'.repeat(width + 2), \"\\u2518\"));\n return res.join('\\n');\n};\n\nvar simpleUpdateNotifier = function (args) { return __awaiter(void 0, void 0, void 0, function () {\n var latestVersion, err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!args.alwaysRun &&\n (!process.stdout.isTTY || (isNpmOrYarn && !args.shouldNotifyInNpmScript))) {\n if (args.debug) {\n console.error('Opting out of running simpleUpdateNotifier()');\n }\n return [2 /*return*/];\n }\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, hasNewVersion(args)];\n case 2:\n latestVersion = _a.sent();\n if (latestVersion) {\n console.error(borderedText(\"New version of \".concat(args.pkg.name, \" available!\\nCurrent Version: \").concat(args.pkg.version, \"\\nLatest Version: \").concat(latestVersion)));\n }\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n // Catch any network errors or cache writing errors so module doesn't cause a crash\n if (args.debug && err_1 instanceof Error) {\n console.error('Unexpected error in simpleUpdateNotifier():', err_1);\n }\n return [3 /*break*/, 4];\n case 4: return [2 /*return*/];\n }\n });\n}); };\n\nmodule.exports = simpleUpdateNotifier;\n","function toArr(any) {\n\treturn any == null ? [] : Array.isArray(any) ? any : [any];\n}\n\nfunction toVal(out, key, val, opts) {\n\tvar x, old=out[key], nxt=(\n\t\t!!~opts.string.indexOf(key) ? (val == null || val === true ? '' : String(val))\n\t\t: typeof val === 'boolean' ? val\n\t\t: !!~opts.boolean.indexOf(key) ? (val === 'false' ? false : val === 'true' || (out._.push((x = +val,x * 0 === 0) ? x : val),!!val))\n\t\t: (x = +val,x * 0 === 0) ? x : val\n\t);\n\tout[key] = old == null ? nxt : (Array.isArray(old) ? old.concat(nxt) : [old, nxt]);\n}\n\nexport default function (args, opts) {\n\targs = args || [];\n\topts = opts || {};\n\n\tvar k, arr, arg, name, val, out={ _:[] };\n\tvar i=0, j=0, idx=0, len=args.length;\n\n\tconst alibi = opts.alias !== void 0;\n\tconst strict = opts.unknown !== void 0;\n\tconst defaults = opts.default !== void 0;\n\n\topts.alias = opts.alias || {};\n\topts.string = toArr(opts.string);\n\topts.boolean = toArr(opts.boolean);\n\n\tif (alibi) {\n\t\tfor (k in opts.alias) {\n\t\t\tarr = opts.alias[k] = toArr(opts.alias[k]);\n\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t(opts.alias[arr[i]] = arr.concat(k)).splice(i, 1);\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (i=opts.boolean.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.boolean[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.boolean.push(arr[j]);\n\t}\n\n\tfor (i=opts.string.length; i-- > 0;) {\n\t\tarr = opts.alias[opts.string[i]] || [];\n\t\tfor (j=arr.length; j-- > 0;) opts.string.push(arr[j]);\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tname = typeof opts.default[k];\n\t\t\tarr = opts.alias[k] = opts.alias[k] || [];\n\t\t\tif (opts[name] !== void 0) {\n\t\t\t\topts[name].push(k);\n\t\t\t\tfor (i=0; i < arr.length; i++) {\n\t\t\t\t\topts[name].push(arr[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst keys = strict ? Object.keys(opts.alias) : [];\n\n\tfor (i=0; i < len; i++) {\n\t\targ = args[i];\n\n\t\tif (arg === '--') {\n\t\t\tout._ = out._.concat(args.slice(++i));\n\t\t\tbreak;\n\t\t}\n\n\t\tfor (j=0; j < arg.length; j++) {\n\t\t\tif (arg.charCodeAt(j) !== 45) break; // \"-\"\n\t\t}\n\n\t\tif (j === 0) {\n\t\t\tout._.push(arg);\n\t\t} else if (arg.substring(j, j + 3) === 'no-') {\n\t\t\tname = arg.substring(j + 3);\n\t\t\tif (strict && !~keys.indexOf(name)) {\n\t\t\t\treturn opts.unknown(arg);\n\t\t\t}\n\t\t\tout[name] = false;\n\t\t} else {\n\t\t\tfor (idx=j+1; idx < arg.length; idx++) {\n\t\t\t\tif (arg.charCodeAt(idx) === 61) break; // \"=\"\n\t\t\t}\n\n\t\t\tname = arg.substring(j, idx);\n\t\t\tval = arg.substring(++idx) || (i+1 === len || (''+args[i+1]).charCodeAt(0) === 45 || args[++i]);\n\t\t\tarr = (j === 2 ? [name] : name);\n\n\t\t\tfor (idx=0; idx < arr.length; idx++) {\n\t\t\t\tname = arr[idx];\n\t\t\t\tif (strict && !~keys.indexOf(name)) return opts.unknown('-'.repeat(j) + name);\n\t\t\t\ttoVal(out, name, (idx + 1 < arr.length) || val, opts);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (defaults) {\n\t\tfor (k in opts.default) {\n\t\t\tif (out[k] === void 0) {\n\t\t\t\tout[k] = opts.default[k];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (alibi) {\n\t\tfor (k in out) {\n\t\t\tarr = opts.alias[k] || [];\n\t\t\twhile (arr.length > 0) {\n\t\t\t\tout[arr.shift()] = out[k];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn out;\n}\n","import { promises } from \"fs\";\nimport { execRoot } from \"admina\";\nimport { GITHUB_ACTIONS } from \"ci-info\";\nimport { sourceRC } from \"envosman\";\nconst { appendFile } = promises;\n/**\n * Update the alternatives for a package\n * @param name The name of the package\n * @param path The path to the binary\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function updateAptAlternatives(name, path, priority = 40) {\n await execRoot(\"update-alternatives\", [\"--install\", `/usr/bin/${name}`, name, path, priority.toString()]);\n}\n/**\n * Add the update-alternatives command to the rc file\n * @param name The name of the package\n * @param path The path to the binary\n * @param rcOptions The options for the rc file to add the update-alternatives command to\n * @param priority The priority of the alternative (Defaults to `40`)\n */\nexport async function addUpdateAlternativesToRc(name, path, rcOptions, priority = 40) {\n if (GITHUB_ACTIONS) {\n await updateAptAlternatives(name, path, priority);\n }\n else {\n await sourceRC(rcOptions);\n await appendFile(rcOptions.rcPath, `\\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${name} ${name} ${path} ${priority}; fi\\n`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWx0ZXJuYXRpdmVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2FsdGVybmF0aXZlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sSUFBSSxDQUFBO0FBQzdCLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDakMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBRW5DLE1BQU0sRUFBRSxVQUFVLEVBQUUsR0FBRyxRQUFR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5jIGZ1bmN0aW9uIGFkZFVwZGF0ZUFsdGVybmF0aXZlc1RvUmMoXG4gIG5hbWU6IHN0cmluZyxcbiAgcGF0aDogc3RyaW5nLFxuICByY09wdGlvbnM6IFJjT3B0aW9ucyxcbiAgcHJpb3JpdHk6IG51bWJlciA9IDQwLFxuKSB7XG4gIGlmIChHSVRIVUJfQUNUSU9OUykge1xuICAgIGF3YWl0IHVwZGF0ZUFwdEFsdGVybmF0aXZlcyhuYW1lLCBwYXRoLCBwcmlvcml0eSlcbiAgfSBlbHNlIHtcbiAgICBhd2FpdCBzb3VyY2VSQyhyY09wdGlvbnMpXG4gICAgYXdhaXQgYXBwZW5kRmlsZShcbiAgICAgIHJjT3B0aW9ucy5yY1BhdGgsXG4gICAgICBgXFxuaWYgWyAkVUlEIC1lcSAwIF07IHRoZW4gdXBkYXRlLWFsdGVybmF0aXZlcyAtLWluc3RhbGwgL3Vzci9iaW4vJHtuYW1lfSAke25hbWV9ICR7cGF0aH0gJHtwcmlvcml0eX07IGZpXFxuYCxcbiAgICApXG4gIH1cbn1cbiJdfQ==","/**\n * Get the environment variables to use for the apt command\n * @param apt The apt command to use\n * @private Used internally\n */\nexport function getAptEnv(apt) {\n const env = { ...process.env, DEBIAN_FRONTEND: \"noninteractive\" };\n if (apt === \"nala\") {\n // if LANG/LC_ALL is not set, enable utf8 otherwise nala fails because of ASCII encoding\n if (env.LANG === undefined) {\n env.LANG = \"C.UTF-8\";\n }\n if (env.LC_ALL === undefined) {\n env.LC_ALL = \"C.UTF-8\";\n }\n }\n return env;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWVudi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQtZW52LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0dBSUc7QUFFSCxNQUFNLFVBQVUsU0FBUyxDQUFDLEdBQVc7SUFDbkM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BlbnYuTEFORyA9IFwiQy5VVEYtOFwiXG4gICAgfVxuICAgIGlmIChlbnYuTENfQUxMID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGVudi5MQ19BTEwgPSBcIkMuVVRGLThcIlxuICAgIH1cbiAgfVxuXG4gIHJldHVybiBlbnZcbn1cbiJdfQ==","import which from \"which\";\n/**\n * Check if nala is installed\n */\nexport function hasNala() {\n return which.sync(\"nala\", { nothrow: true }) !== null;\n}\n/**\n * Get the apt command to use\n * If nala is installed, use that, otherwise use apt-get\n */\nexport function getApt() {\n let apt;\n if (hasNala()) {\n apt = \"nala\";\n }\n else {\n apt = \"apt-get\";\n }\n return apt;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0LWFwdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9nZXQtYXB0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQTtBQUV6Qjs7R0FFRztBQUNILE1BQU0sVUFBVSxPQUFPO0lBQ3JCLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxNQUFNLEVBQUUsRUFBRSxPQUFPLEVBQUUsSUFBSSxFQUFFLENBQUMsS0FBSyxJQUFJLENBQUE7QUFDdkQsQ0FBQztBQUVEOzs7R0FHRztBQUNILE1BQU0sVUFBVSxNQUFNO0lBQ3BCLElBQUksR0FBVyxDQUFBO0lBQ2YsSUFBSSxPQUFPLEVBQUUsRUFBRSxDQUFDO1FBQ2QsR0FBRyxHQUFHLE1BQU0sQ0FBQTtJQUNkLENBQUM7U0FBTSxDQUFDO1FBQ04sR0FBRyxHQUFHLFNBQVMsQ0FBQTtJQUNqQixDQUFDO0lBQ0QsT0FBTyxHQUFHLENBQUE7QUFDWixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHdoaWNoIGZyb20gXCJ3aGljaFwiXG5cbi8qKlxuICogQ2hlY2sgaWYgbmFsYSBpcyBpbnN0YWxsZWRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGhhc05hbGEoKSB7XG4gIHJldHVybiB3aGljaC5zeW5jKFwibmFsYVwiLCB7IG5vdGhyb3c6IHRydWUgfSkgIT09IG51bGxcbn1cblxuLyoqXG4gKiBHZXQgdGhlIGFwdCBjb21tYW5kIHRvIHVzZVxuICogSWYgbmFsYSBpcyBpbnN0YWxsZWQsIHVzZSB0aGF0LCBvdGhlcndpc2UgdXNlIGFwdC1nZXRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldEFwdCgpIHtcbiAgbGV0IGFwdDogc3RyaW5nXG4gIGlmIChoYXNOYWxhKCkpIHtcbiAgICBhcHQgPSBcIm5hbGFcIlxuICB9IGVsc2Uge1xuICAgIGFwdCA9IFwiYXB0LWdldFwiXG4gIH1cbiAgcmV0dXJuIGFwdFxufVxuIl19","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","import { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\n/**\n * Check if a package is installed\n * @param pack The package to check\n * @returns `true` if the package is installed, `false` otherwise\n */\nexport async function isAptPackInstalled(pack) {\n try {\n // check if a package is installed\n const { stdout } = await execa(\"dpkg\", [\"-s\", pack], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains a line that starts with \"Status: install ok installed\"\n return lines.some((line) => line.startsWith(\"Status: install ok installed\"));\n }\n catch {\n return false;\n }\n}\n/**\n * Check if a package matching a regexp is installed\n * @param regexp The regexp to check\n * @returns `true` if a package is installed, `false` otherwise\n */\nexport async function isAptPackRegexInstalled(regexp) {\n try {\n // check if a package matching the regexp is installed\n const { stdout } = await execa(\"dpkg\", [\"-l\", regexp], { env: getAptEnv(\"apt-get\"), stdio: \"pipe\" });\n if (typeof stdout !== \"string\") {\n return false;\n }\n const lines = stdout.split(\"\\n\");\n // check if the output contains any lines that start with \"ii\"\n return lines.some((line) => line.startsWith(\"ii\"));\n }\n catch {\n return false;\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXMtaW5zdGFsbGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2lzLWluc3RhbGxlZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQzdCLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFFeEM7Ozs7R0FJRztBQUNILE1BQU0sQ0FBQyxLQUFLLFVBQVUsa0JBQWtCLENBQUMsSUFBWTtJQUNuRCxJQUFJLENBQUM7UUFDSCxrQ0FBa0M7UUFDbEMsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLE1BQU0sS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLElBQUksRUFBRSxJQUFJLENBQUMsRUFBRSxFQUFFLEdBQUcsRUFBRSxTQUFTLENBQUMsU0FBUyxDQUFDLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxDQUFDLENBQUE7UUFDbEcsSUFBSSxPQUFPLE1BQU0sS0FBSyxRQUFRLEVBQUUsQ0FBQztZQUMvQixPQUFPLEtBQUssQ0FBQTtRQUNkLENBQUM7UUFDRCxNQUFNLEtBQUssR0FBRyxNQUFNLENBQUMsS0FBSyxDQUFDLElB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yYW0gcmVnZXhwIFRoZSByZWdleHAgdG8gY2hlY2tcbiAqIEByZXR1cm5zIGB0cnVlYCBpZiBhIHBhY2thZ2UgaXMgaW5zdGFsbGVkLCBgZmFsc2VgIG90aGVyd2lzZVxuICovXG5leHBvcnQgYXN5bmMgZnVuY3Rpb24gaXNBcHRQYWNrUmVnZXhJbnN0YWxsZWQocmVnZXhwOiBzdHJpbmcpIHtcbiAgdHJ5IHtcbiAgICAvLyBjaGVjayBpZiBhIHBhY2thZ2UgbWF0Y2hpbmcgdGhlIHJlZ2V4cCBpcyBpbnN0YWxsZWRcbiAgICBjb25zdCB7IHN0ZG91dCB9ID0gYXdhaXQgZXhlY2EoXCJkcGtnXCIsIFtcIi1sXCIsIHJlZ2V4cF0sIHsgZW52OiBnZXRBcHRFbnYoXCJhcHQtZ2V0XCIpLCBzdGRpbzogXCJwaXBlXCIgfSlcbiAgICBpZiAodHlwZW9mIHN0ZG91dCAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgcmV0dXJuIGZhbHNlXG4gICAgfVxuICAgIGNvbnN0IGxpbmVzID0gc3Rkb3V0LnNwbGl0KFwiXFxuXCIpXG4gICAgLy8gY2hlY2sgaWYgdGhlIG91dHB1dCBjb250YWlucyBhbnkgbGluZXMgdGhhdCBzdGFydCB3aXRoIFwiaWlcIlxuICAgIHJldHVybiBsaW5lcy5zb21lKChsaW5lKSA9PiBsaW5lLnN0YXJ0c1dpdGgoXCJpaVwiKSlcbiAgfSBjYXRjaCB7XG4gICAgcmV0dXJuIGZhbHNlXG4gIH1cbn1cbiJdfQ==","import { warning } from \"ci-log\";\nimport escapeRegex from \"escape-string-regexp\";\nimport { execa } from \"execa\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized, updatedRepos } from \"./update.js\";\n/**\n * The type of apt package to install\n */\nexport var AptPackageType;\n(function (AptPackageType) {\n AptPackageType[AptPackageType[\"NameDashVersion\"] = 0] = \"NameDashVersion\";\n AptPackageType[AptPackageType[\"NameEqualsVersion\"] = 1] = \"NameEqualsVersion\";\n AptPackageType[AptPackageType[\"Name\"] = 2] = \"Name\";\n AptPackageType[AptPackageType[\"None\"] = 3] = \"None\";\n})(AptPackageType || (AptPackageType = {}));\n/**\n * Filter out the packages that are already installed and qualify the packages into a full package name/version\n */\nexport async function filterAndQualifyAptPackages(packages, apt = getApt()) {\n return (await Promise.all(packages.map((pack) => qualifiedNeededAptPackage(pack, apt))))\n .filter((pack) => pack !== undefined);\n}\n/**\n * Qualify the package into full package name/version.\n * If the package is not installed, return the full package name/version.\n * If the package is already installed, return undefined\n */\nexport async function qualifiedNeededAptPackage(pack, apt = getApt()) {\n // Qualify the package into full package name/version\n const qualified = await getAptArg(apt, pack.name, pack.version);\n // filter out the package that are already installed\n return (await isAptPackInstalled(qualified)) ? undefined : qualified;\n}\nasync function aptPackageType(apt, name, version) {\n if (version !== undefined && version !== \"\") {\n const { stdout } = await execa(\"apt-cache\", [\n \"search\",\n \"--names-only\",\n `^${escapeRegex(name)}-${escapeRegex(version)}$`,\n ], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (stdout.trim() !== \"\") {\n return AptPackageType.NameDashVersion;\n }\n try {\n // check if apt-get show can find the version\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"apt-cache\", [\"show\", `${name}=${version}`], { env: getAptEnv(apt) });\n if (stdout.trim() === \"\") {\n return AptPackageType.NameEqualsVersion;\n }\n }\n catch {\n // ignore\n }\n }\n try {\n const { stdout: showStdout } = await execa(\"apt-cache\", [\"show\", name], { env: getAptEnv(apt), stdio: \"pipe\" });\n if (showStdout.trim() !== \"\") {\n return AptPackageType.Name;\n }\n }\n catch {\n // ignore\n }\n // If apt-cache fails, update the repos and try again\n if (!updatedRepos) {\n updateAptReposMemoized(apt);\n return aptPackageType(apt, name, version);\n }\n return AptPackageType.None;\n}\nasync function getAptArg(apt, name, version) {\n const package_type = await aptPackageType(apt, name, version);\n switch (package_type) {\n case AptPackageType.NameDashVersion:\n return `${name}-${version}`;\n case AptPackageType.NameEqualsVersion:\n return `${name}=${version}`;\n case AptPackageType.Name:\n if (version !== undefined && version !== \"\") {\n warning(`Could not find package ${name} with version ${version}. Installing the latest version.`);\n }\n return name;\n default:\n throw new Error(`Could not find package ${name} ${version ?? \"\"}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicXVhbGlmeS1pbnN0YWxsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3F1YWxpZnktaW5zdGFsbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sUUFBUSxDQUFBO0FBQ2hDLE9BQU8sV0FBVyxNQUFNLHNCQUFzQixDQUFBO0FBQzlDLE9BQU8sRUFBRSxLQUFLLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDN0IsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBRXJDLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLG1CQUFtQixDQUFBO0FBQ3RELE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxZQUFZLEVBQUUsTUFBTSxhQUFhLENBQUE7QUFFbEU7O0dBRUc7QUFDSCxNQUFNLENBQU4sSUFBWSxjQUtYO0FBTEQsV0FBWSxjQUFjO0lBQ3hCLHlFQUFtQixDQUFBO0lBQ25CLDZFQUFxQixDQUFBO0lBQ3JCLG1EQUFRLENBQUE7SUFDUixtREFBUSxDQUFBO0FBQ1YsQ0FBQyxFQUxXLGNBQWMsS0FBZCxjQUFjLFFBS3pCO0FBRUQ7O0dBRUc7QUFDSCxNQUFNLENBQUMsS0FBS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W9uICE9PSBcIlwiKSB7XG4gICAgICAgIHdhcm5pbmcoYENvdWxkIG5vdCBmaW5kIHBhY2thZ2UgJHtuYW1lfSB3aXRoIHZlcnNpb24gJHt2ZXJzaW9ufS4gSW5zdGFsbGluZyB0aGUgbGF0ZXN0IHZlcnNpb24uYClcbiAgICAgIH1cbiAgICAgIHJldHVybiBuYW1lXG4gICAgZGVmYXVsdDpcbiAgICAgIHRocm93IG5ldyBFcnJvcihgQ291bGQgbm90IGZpbmQgcGFja2FnZSAke25hbWV9ICR7dmVyc2lvbiA/PyBcIlwifWApXG4gIH1cbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { info, warning } from \"ci-log\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { addAptKey } from \"./apt-key.js\";\nimport { addAptRepository } from \"./apt-repository.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { filterAndQualifyAptPackages } from \"./qualify-install.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nconst retryErrors = [\n \"E: Could not get lock\",\n \"dpkg: error processing archive\",\n \"dpkg: error: dpkg status database is locked by another process\",\n];\n/**\n * Install a package using apt\n *\n * @param packages The packages to install (name, and optional info like version and repositories)\n * @param update Whether to update the package list before installing (Defaults to `false`)\n *\n * @returns The installation information\n *\n * @example\n * ```ts\n * await installAptPack([{ name: \"ca-certificates\" }, { name: \"gnupg\" }])\n * ```\n *\n * @example\n * ```ts\n await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n * ```\n */\nexport async function installAptPack(packages, update = false) {\n const apt = getApt();\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via ${apt}`);\n }\n // Update the repos if needed\n if (update) {\n updateAptReposMemoized(apt);\n }\n // Add the repos if needed\n await addRepositories(apt, packages);\n const needToInstall = await filterAndQualifyAptPackages(packages, apt);\n if (needToInstall.length === 0) {\n info(\"All packages are already installed\");\n return { binDir: \"/usr/bin/\" };\n }\n // Initialize apt if needed\n await initAptMemoized(apt);\n try {\n // Add the keys if needed\n await addAptKeys(packages);\n // Install\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", ...needToInstall], {\n ...defaultExecOptions,\n env: getAptEnv(apt),\n });\n }\n catch (err) {\n if (isExecaError(err)) {\n if (retryErrors.some((error) => err.stderr.includes(error))) {\n warning(`Failed to install packages ${needToInstall}. Retrying...`);\n execRootSync(apt, [\"install\", \"--fix-broken\", \"-y\", \"-o\", aptTimeout, ...needToInstall], { ...defaultExecOptions, env: getAptEnv(apt) });\n }\n }\n else {\n throw err;\n }\n }\n return { binDir: \"/usr/bin/\" };\n}\nasync function addRepositories(apt, packages) {\n const allRepositories = [...new Set(packages.flatMap((pack) => pack.repository ?? []))];\n await Promise.all(allRepositories.map((repo) => addAptRepository(repo, apt)));\n}\nasync function addAptKeys(packages) {\n await Promise.all(packages.map(async (pack) => {\n if (pack.key !== undefined) {\n await addAptKey(pack.key);\n }\n }));\n}\nfunction isExecaError(err) {\n return typeof err.stderr === \"string\";\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbnN0YWxsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDekQsT0FBTyxFQUFFLElBQUksRUFBRSxPQUFPLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFFdEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUN4QyxPQUFPLEVBQXlCLFNB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ge1xuICAgICAgYXdhaXQgYWRkQXB0S2V5KHBhY2sua2V5KVxuICAgIH1cbiAgfSkpXG59XG5cbmZ1bmN0aW9uIGlzRXhlY2FFcnJvcihlcnI6IHVua25vd24pOiBlcnIgaXMgRXhlY2FFcnJvciB7XG4gIHJldHVybiB0eXBlb2YgKGVyciBhcyBFeGVjYUVycm9yKS5zdGRlcnIgPT09IFwic3RyaW5nXCJcbn1cbiJdfQ==","import { defaultExecOptions, execRootSync } from \"admina\";\nimport { getAptEnv } from \"./apt-env.js\";\nimport { aptTimeout } from \"./apt-timeout.js\";\nimport { getApt } from \"./get-apt.js\";\nimport { initAptMemoized } from \"./init-apt.js\";\nimport { isAptPackInstalled } from \"./is-installed.js\";\nimport { updateAptReposMemoized } from \"./update.js\";\nexport async function addAptRepository(repo, apt = getApt()) {\n await initAptMemoized(apt);\n await installAddAptRepo(apt);\n execRootSync(\"add-apt-repository\", [\"-y\", \"--no-update\", repo], { ...defaultExecOptions, env: getAptEnv(apt) });\n // Update the repos\n updateAptReposMemoized.clear(); // ensure update is called\n updateAptReposMemoized(apt);\n}\nexport async function installAddAptRepo(apt) {\n if (await isAptPackInstalled(\"software-properties-common\")) {\n return;\n }\n execRootSync(apt, [\"install\", \"-y\", \"--fix-broken\", \"-o\", aptTimeout, \"software-properties-common\"], { ...defaultExecOptions, env: getAptEnv(apt) });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LXJlcG9zaXRvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvYXB0LXJlcG9zaXRvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQTtBQUN6RCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBQ3hDLE9BQU8sRUFBRSxVQUF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XBkYXRlIGlzIGNhbGxlZFxuICB1cGRhdGVBcHRSZXBvc01lbW9pemVkKGFwdClcbn1cblxuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIGluc3RhbGxBZGRBcHRSZXBvKGFwdDogc3RyaW5nKSB7XG4gIGlmIChhd2FpdCBpc0FwdFBhY2tJbnN0YWxsZWQoXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiKSkge1xuICAgIHJldHVyblxuICB9XG4gIGV4ZWNSb290U3luYyhcbiAgICBhcHQsXG4gICAgW1wiaW5zdGFsbFwiLCBcIi15XCIsIFwiLS1maXgtYnJva2VuXCIsIFwiLW9cIiwgYXB0VGltZW91dCwgXCJzb2Z0d2FyZS1wcm9wZXJ0aWVzLWNvbW1vblwiXSxcbiAgICB7IC4uLmRlZmF1bHRFeGVjT3B0aW9ucywgZW52OiBnZXRBcHRFbnYoYXB0KSB9LFxuICApXG59XG4iXX0=","import { tmpdir } from \"os\";\nimport { join } from \"path\";\nimport { execRoot, execRootSync } from \"admina\";\nimport { warning } from \"ci-log\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { pathExists } from \"path-exists\";\nimport { installAptPack } from \"./install.js\";\n/**\n * Add an apt key\n * @param options The options for adding the key\n * @returns The file name of the key that was added or `undefined` if it failed\n *\n * @example\n * ```ts\n * await addAptKey({ key: \"3B4FE6ACC0B21F32\" fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n *\n * @example\n * ```ts\n * await addAptKey({ keyUrl: \"https://bazel.build/bazel-release.pub.gpg\", fileName: \"bazel-archive-keyring.gpg\"})\n * ```\n */\nexport function addAptKey(options) {\n if (\"keyUrl\" in options) {\n return addAptKeyViaURL(options);\n }\n else {\n return addAptKeyViaServer(options);\n }\n}\nexport const defaultKeyStorePath = \"/etc/apt/trusted.gpg.d\";\nexport const defaultKeyServer = \"keyserver.ubuntu.com\";\n/**\n * Add an apt key via a keyserver\n * @returns The file name of the key that was added or `undefined` if it failed\n */\nexport async function addAptKeyViaServer({ key, keyServer = defaultKeyServer, fileName, keyStorePath = defaultKeyServer }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await execRoot(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--keyserver\",\n keyServer,\n \"--recv-keys\",\n key,\n ]);\n await execRoot(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via server ${keyServer}: ${err}`);\n return undefined;\n }\n}\n/**\n * Add an apt key via a download\n * @param options The options for adding the key\n * @returns The file name of the key that was added\n */\nexport async function addAptKeyViaURL({ keyUrl, fileName, keyStorePath = defaultKeyStorePath }) {\n try {\n assertGpgFileName(fileName);\n const filePath = join(keyStorePath, fileName);\n if (!(await pathExists(filePath))) {\n initGpg();\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dlPath = join(tmpdir(), fileName);\n const dl = new DownloaderHelper(keyUrl, tmpdir(), { fileName });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download ${keyUrl}: ${err}`);\n });\n await dl.start();\n execRootSync(\"gpg\", [\n \"--no-default-keyring\",\n \"--keyring\",\n `gnupg-ring:${filePath}`,\n \"--import\",\n dlPath,\n ]);\n execRootSync(\"chmod\", [\"644\", filePath]);\n }\n return filePath;\n }\n catch (err) {\n warning(`Failed to add apt key via download ${keyUrl}: ${err}`);\n return undefined;\n }\n}\nfunction initGpg() {\n execRootSync(\"gpg\", [\"-k\"]);\n}\nfunction assertGpgFileName(fileName) {\n if (!fileName.endsWith(\".gpg\")) {\n throw new Error(`Key file name must end with .gpg: ${fileName}`);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXB0LWtleS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hcHQta2V5LnRzIl0sIm5hbWVzIjp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IG5hbWUgbXVzdCBlbmQgd2l0aCAuZ3BnOiAke2ZpbGVOYW1lfWApXG4gIH1cbn1cbiJdfQ==","import { tmpdir } from \"os\";\nimport { dirname, join } from \"path\";\nimport { addPath } from \"envosman\";\nimport { execaSync } from \"execa\";\nimport { DownloaderHelper } from \"node-downloader-helper\";\nimport { installAptPack } from \"setup-apt\";\nimport which from \"which\";\n/* eslint-disable require-atomic-updates */\nlet binDir;\nexport async function setupBrew(options = {}) {\n // brew is only available on darwin and linux\n if (![\"darwin\", \"linux\"].includes(process.platform)) {\n return undefined;\n }\n // check if the function has already been called\n if (typeof binDir === \"string\") {\n return { binDir };\n }\n // check if brew is already installed\n const maybeBinDir = await which(\"brew\", { nothrow: true });\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir);\n return { binDir };\n }\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }]);\n const dl = new DownloaderHelper(\"https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh\", tmpdir(), {\n fileName: \"install-brew.sh\",\n });\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the brew installer script: ${err}`);\n });\n await dl.start();\n // brew installation is not thread-safe\n execaSync(\"/bin/bash\", [dl.getDownloadPath()], {\n stdio: \"inherit\",\n env: {\n NONINTERACTIVE: \"1\",\n },\n });\n // add the bin directory to the PATH\n binDir = getBrewBinDir();\n await addPath(binDir, options.rcOptions);\n return { binDir };\n}\n/**\n * Get the path to the bin directory of brew\n * @returns {string} The path where brew binary is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewBinDir() {\n return join(getBrewDir(), \"bin\");\n}\n/**\n * Get the path where brew is installed\n * @returns {string} The path where brew is installed\n *\n * Based on the installation script from https://brew.sh\n */\nexport function getBrewDir() {\n if (process.platform === \"darwin\") {\n if (process.arch === \"arm64\") {\n return \"/opt/homebrew\";\n }\n else {\n return \"/usr/local\";\n }\n }\n if (process.platform === \"linux\") {\n return \"/home/linuxbrew/.linuxbrew\";\n }\n thro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G4gICAgfVxuICB9XG5cbiAgaWYgKHByb2Nlc3MucGxhdGZvcm0gPT09IFwibGludXhcIikge1xuICAgIHJldHVybiBcIi9ob21lL2xpbnV4YnJldy8ubGludXhicmV3XCJcbiAgfVxuXG4gIHRocm93IG5ldyBFcnJvcihcIlVuc3VwcG9ydGVkIHBsYXRmb3JtIGZvciBicmV3XCIpXG59XG4iXX0=","import { join } from \"path\";\nimport { info } from \"ci-log\";\nimport { execaSync } from \"execa\";\nimport which from \"which\";\nimport { getBrewBinDir, setupBrew } from \"./install.js\";\n/* eslint-disable require-atomic-updates */\nlet hasBrew = false;\n/** A function that installs a package using brew\n *\n * @param name The name of the package\n * @param version The version of the package (optional)\n * @param options The options for installing the package\n *\n * @returns The installation information\n */\nexport async function installBrewPack(name, version, givenOptions = {}) {\n const options = {\n overwrite: true,\n cask: false,\n args: [],\n ...givenOptions,\n };\n info(`Installing ${name} ${version ?? \"\"} via brew`);\n if (!hasBrew || which.sync(\"brew\", { nothrow: true }) === null) {\n await setupBrew();\n hasBrew = true;\n }\n const binDir = getBrewBinDir();\n const brewPath = join(binDir, \"brew\");\n // Args\n const args = [\n \"install\",\n (version !== undefined && version !== \"\") ? `${name}@${version}` : name,\n ];\n if (options.overwrite) {\n args.push(\"--overwrite\");\n }\n if (options.cask) {\n args.push(\"--cask\");\n }\n // brew is not thread-safe\n execaSync(brewPath, args, { stdio: \"inherit\" });\n return { binDir };\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zdGFsbC1wYWNrLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2luc3RhbGwtcGFjay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sTUFBTSxDQUFBO0FBQzNCLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDN0IsT0FBTyx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H1cblxuICBjb25zdCBiaW5EaXIgPSBnZXRCcmV3QmluRGlyKClcbiAgY29uc3QgYnJld1BhdGggPSBqb2luKGJpbkRpciwgXCJicmV3XCIpXG5cbiAgLy8gQXJnc1xuICBjb25zdCBhcmdzID0gW1xuICAgIFwiaW5zdGFsbFwiLFxuICAgICh2ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgdmVyc2lvbiAhPT0gXCJcIikgPyBgJHtuYW1lfUAke3ZlcnNpb259YCA6IG5hbWUsXG4gIF1cbiAgaWYgKG9wdGlvbnMub3ZlcndyaXRlKSB7XG4gICAgYXJncy5wdXNoKFwiLS1vdmVyd3JpdGVcIilcbiAgfVxuICBpZiAob3B0aW9ucy5jYXNrKSB7XG4gICAgYXJncy5wdXNoKFwiLS1jYXNrXCIpXG4gIH1cblxuICAvLyBicmV3IGlzIG5vdCB0aHJlYWQtc2FmZVxuICBleGVjYVN5bmMoYnJld1BhdGgsIGFyZ3MsIHsgc3RkaW86IFwiaW5oZXJpdFwiIH0pXG5cbiAgcmV0dXJuIHsgYmluRGlyIH1cbn1cbiJdfQ==","import which from \"which\"\n\nlet hasDnfCache: undefined | boolean = undefined\n\nexport function hasDnf(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (hasDnfCache === undefined) {\n hasDnfCache = which.sync(\"dnf\", { nothrow: true }) !== null\n }\n\n return hasDnfCache\n}\n","import which from \"which\"\n\nlet isArchCache: undefined | boolean = undefined\n\nexport function isArch(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isArchCache === undefined) {\n // detect arch by checking if pacman exists\n isArchCache = which.sync(\"pacman\", { nothrow: true }) !== null\n }\n\n return isArchCache\n}\n","import which from \"which\"\n\nlet isUbuntuCache: undefined | boolean = undefined\n\nexport function isUbuntu(): boolean {\n if (process.platform !== \"linux\") {\n return false\n }\n if (isUbuntuCache === undefined) {\n const apt = \"apt-get\"\n isUbuntuCache = which.sync(apt, { nothrow: true }) !== null\n }\n\n return isUbuntuCache\n}\n","import { dirname } from \"path\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet binDir: string | undefined\n\nexport async function setupChocolatey(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _version: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _setupDir: string,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _arch: string,\n): Promise {\n if (process.platform !== \"win32\") {\n return undefined\n }\n\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"choco\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n let powershell = \"powershell.exe\"\n const maybePowerShell = which.sync(`${process.env.SystemRoot}\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe`, {\n nothrow: true,\n })\n if (maybePowerShell !== null) {\n powershell = maybePowerShell\n }\n\n // https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe\n execaSync(\n powershell,\n [\n \"-NoProfile\",\n \"-InputFormat\",\n \"None\",\n \"-ExecutionPolicy\",\n \"Bypass\",\n \"-Command\",\n \"[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))\",\n ],\n { stdio: \"inherit\" },\n )\n\n const chocoPath = `${process.env.ALLUSERSPROFILE}\\\\chocolatey\\\\bin`\n await addPath(chocoPath, rcOptions)\n\n const maybeChoco = which.sync(\"choco\", { nothrow: true })\n if (maybeChoco !== null) {\n binDir = dirname(maybeChoco)\n } else {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n\n if (await pathExists(binDir)) {\n return { binDir }\n }\n return undefined\n}\n","/* eslint-disable require-atomic-updates */\nimport { info } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport which from \"which\"\nimport { setupChocolatey } from \"../../chocolatey/chocolatey.js\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\nlet hasChoco = false\n\n/** A function that installs a package using choco */\nexport async function setupChocoPack(name: string, version?: string, args: string[] = []): Promise {\n info(`Installing ${name} ${version ?? \"\"} via chocolatey`)\n\n if (!hasChoco || which.sync(\"choco\", { nothrow: true }) === null) {\n await setupChocolatey(\"\", \"\", process.arch)\n hasChoco = true\n }\n\n // https://github.com/jberezanski/ChocolateyPackages/issues/97#issuecomment-986825694\n const PATH = process.env.PATH\n const env = { ...process.env }\n env.TMP = undefined\n env.TEMP = undefined\n env.Path = undefined\n env.PATH = PATH\n\n if (version !== undefined && version !== \"\") {\n execaSync(\"choco\", [\"install\", \"-y\", name, `--version=${version}`, ...args], {\n env,\n extendEnv: false,\n stdio: \"inherit\",\n })\n } else {\n try {\n execaSync(\"choco\", [\"install\", \"-y\", name, ...args], { env, extendEnv: false, stdio: \"inherit\" })\n } catch (err) {\n // if the package requires a reboot, downgrade the error to a notice\n if ((err as Error).message.includes(\"exit code 3010\")) {\n info(`${name} might require a reboot for the completion of the installation.`)\n } else {\n throw err\n }\n }\n }\n\n const binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n","import { execRootSync } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\ntype DnfPackage = {\n name: string\n version?: string\n}\n\n/** A function that installs a package using dnf */\nexport async function setupDnfPack(packages: DnfPackage[]): Promise {\n for (const { name, version } of packages) {\n info(`Installing ${name} ${version ?? \"\"} via dnf`)\n }\n\n const dnfArgs = await Promise.all(packages.map((pack) => getDnfArg(pack.name, pack.version)))\n execRootSync(\"dnf\", [\"-y\", \"install\", ...dnfArgs])\n\n return { binDir: \"/usr/bin/\" }\n}\n\nasync function getDnfArg(name: string, version: string | undefined) {\n if (version !== undefined && version !== \"\") {\n // check if name-version is available\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}-${version}`])\n\n if (stdout.trim() !== \"\") {\n return `${name}-${version}`\n } else {\n // try with ${name}${version}\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { stdout } = await execa(\"dnf\", [\"search\", \"-q\", `${name}${version}`])\n if (stdout.trim() !== \"\") {\n return `${name}${version}`\n }\n\n warning(`Failed to install ${name} ${version} via dnf, trying without version`)\n }\n }\n return name\n}\n","import { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRootSync, isRoot } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa, execaSync } from \"execa\"\nimport which from \"which\"\nimport type { InstallationInfo } from \"./setupBin.js\"\n\n/* eslint-disable require-atomic-updates */\nlet didUpdate: boolean = false\nlet didInit: boolean = false\n\n/** A function that installs a package using pacman */\nexport async function setupPacmanPack(name: string, version?: string, aur?: string): Promise {\n info(`Installing ${name} ${version ?? \"\"} via pacman`)\n\n const pacman = \"pacman\"\n\n if (aur === \"yay\") {\n setupYay()\n }\n\n // yay can't run as root, so skip update\n if (!didUpdate && aur !== \"yay\") {\n execRootSync(pacman, [\"-Sy\", \"--noconfirm\"])\n didUpdate = true\n }\n\n // install base-devel\n if (!didInit && aur !== \"yay\") {\n execRootSync(pacman, [\"-S\", \"--noconfirm\", \"base-devel\"])\n didInit = true\n }\n\n const runInstall = (arg: string) => {\n if (aur === \"yay\") {\n // run yay as non-root to fix ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.\n if (isRoot() && createdBuilderUser) {\n // Run yay as builder user\n return execRootSync(\"su\", [\"-\", \"builder\", \"-c\", `yay -S --noconfirm ${arg}`])\n } else {\n return execaSync(aur, [\"-S\", \"--noconfirm\", arg])\n }\n }\n return execRootSync(aur ?? pacman, [\"-S\", \"--noconfirm\", arg])\n }\n\n if (version !== undefined && version !== \"\") {\n // check if version is available\n const availableVersions = await availablePacmanVersions(pacman, name)\n if (availableVersions.includes(version)) {\n // try different version formats\n try {\n runInstall(`${name}=${version}`)\n } catch {\n runInstall(`${name}${version}`)\n }\n } else {\n // try without version\n info(`Failed to install ${name} ${version} via pacman, trying without version`)\n runInstall(name)\n }\n } else {\n // version not specified, install latest\n runInstall(name)\n }\n\n return { binDir: \"/usr/bin/\" }\n}\n\nconst pacmanSiVersionRegex = /Version\\s*:\\s*(.*)/g\n\n/** Query pacman for available versions */\nasync function availablePacmanVersions(pacman: string, name: string) {\n const availableVersions = []\n try {\n const { stdout } = await execa(pacman, [\"-Si\", name])\n\n for (const match of stdout.matchAll(pacmanSiVersionRegex)) {\n availableVersions.push(match[1])\n }\n } catch (err) {\n warning(`Failed to get available versions for ${name}: ${err}`)\n }\n return availableVersions\n}\n\nlet createdBuilderUser = false\n\nfunction setupYay() {\n if (which.sync(\"yay\", { nothrow: true }) === null) {\n try {\n // Install prerequisites\n execRootSync(\"pacman\", [\"-S\", \"--noconfirm\", \"base-devel\", \"git\"])\n\n const yayBuildDir = join(tmpdir(), \"yay\")\n\n execRootSync(\"mkdir\", [\"-p\", yayBuildDir])\n\n if (isRoot()) {\n // Create a non-root user to build yay\n warning(\"Creating a non-root user to build yay\")\n execRootSync(\"useradd\", [\"-m\", \"-G\", \"wheel\", \"builder\"])\n execRootSync(\"passwd\", [\"-d\", \"builder\"])\n execRootSync(\"chown\", [\"-R\", \"builder:builder\", yayBuildDir])\n execRootSync(\"bash\", [\"-c\", `echo \"builder ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers`])\n createdBuilderUser = true\n\n // Clone the yay repository into a temporary directory\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `git clone https://aur.archlinux.org/yay.git ${yayBuildDir}`], {\n stdio: \"inherit\",\n })\n\n execaSync(\"su\", [\"-\", \"builder\", \"-c\", `cd ${yayBuildDir} && makepkg -si --noconfirm`], {\n stdio: \"inherit\",\n })\n } else {\n // Clone the yay repository into a temporary directory\n execaSync(\"git\", [\"clone\", \"https://aur.archlinux.org/yay.git\", yayBuildDir], {\n stdio: \"inherit\",\n cwd: tmpdir(),\n })\n\n // Build and install yay\n execaSync(\"makepkg\", [\"-si\", \"--noconfirm\"], {\n stdio: \"inherit\",\n cwd: yayBuildDir,\n })\n }\n\n // clean-up\n execaSync(\"rm\", [\"-rf\", yayBuildDir], { stdio: \"inherit\" })\n } catch (error) {\n throw new Error(`Failed to install yay: ${error}. Install yay manually and re-run the script.`)\n }\n }\n}\n","function e(e,a){return Object.keys(a).forEach((r=>{\"default\"===r||\"__esModule\"===r||e.hasOwnProperty(r)||Object.defineProperty(e,r,{enumerable:!0,get(){return a[r]}})})),e}function a(e,a,r,s){Object.defineProperty(e,a,{get:r,set:s,enumerable:!0,configurable:!0})}function r(e,a=!0){return a?u(e):u(e,x(e))}function s(e){return E(e).replace(RegExp(y(N)+\"$\"),\"\")}function t(e,a=\".exe\",r=\"\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function n(e,a){const r=x(e),s=`${a}${u(e,r)}${r}`;return h(l(e),s)}function i(e,a){const r=x(e),s=`${u(e,r)}${a}${r}`;return h(l(e),s)}function o(e,a=\".cmd\",r=\".sh\"){return\"win32\"===process.platform?`${e}${a}`:`${e}${r}`}function m(e){return\"win32\"===process.platform?e:\"./\"+e}function c(e){const a=x(e).length;return e.slice(0,-a)}function d(e,a){return z(e,a)}function f(e,a){const r=g(a,e);return!(!r||\"..\"===r||r.startsWith(\"..\"+N)||r===w(e))}import{basename as u,delimiter as p,dirname as l,extname as x,format as v,isAbsolute as $,join as h,normalize as E,parse as P,posix as b,relative as g,resolve as w,sep as N,toNamespacedPath as S,win32 as j}from\"path\";import y from\"escape-string-regexp\";import z from\"replace-ext\";var O={},R={};a(R,\"name\",(()=>r));var A={};a(A,\"normalizeTrim\",(()=>s));var I={};a(I,\"addExeExt\",(()=>t));var T={};a(T,\"addNamePrefix\",(()=>n));var _={};a(_,\"addNameSuffix\",(()=>i));var k={};a(k,\"addShExt\",(()=>o));var M={};a(M,\"addShRelativePrefix\",(()=>m));var W={};a(W,\"removeExt\",(()=>c));var q={};a(q,\"replaceExt\",(()=>d));var B={};a(B,\"isPathInside\",(()=>f)),e(O,R),e(O,A),e(O,I),e(O,T),e(O,_),e(O,k),e(O,M),e(O,W),e(O,q),e(O,B);export{u as basename,p as delimiter,l as dirname,x as extname,v as format,$ as isAbsolute,h as join,E as normalize,P as parse,b as posix,g as relative,w as resolve,N as sep,S as toNamespacedPath,j as win32,r as name,s as normalizeTrim,t as addExeExt,n as addNamePrefix,i as addNameSuffix,o as addShExt,m as addShRelativePrefix,c as removeExt,d as replaceExt,f as isPathInside};\n//# sourceMappingURL=index.node.mjs.map\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;\nconst assert_1 = require(\"assert\");\nconst path = __importStar(require(\"path\"));\nconst ioUtil = __importStar(require(\"./io-util\"));\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive, copySourceDirectory } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory() && copySourceDirectory\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Check for invalid characters\n // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file\n if (/[*\"<>|]/.test(inputPath)) {\n throw new Error('File path must not contain `*`, `\"`, `<`, `>` or `|` on Windows');\n }\n }\n try {\n // note if path does not exist, error is silent\n yield ioUtil.rm(inputPath, {\n force: true,\n maxRetries: 3,\n recursive: true,\n retryDelay: 300\n });\n }\n catch (err) {\n throw new Error(`File was unable to be removed ${err}`);\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n yield ioUtil.mkdir(fsPath, { recursive: true });\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n else {\n throw new Error(`Unable to locate executable file: ${tool}. 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.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n const copySourceDirectory = options.copySourceDirectory == null\n ? true\n : Boolean(options.copySourceDirectory);\n return { force, recursive, copySourceDirectory };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst mm = __importStar(require(\"./manifest\"));\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst httpm = __importStar(require(\"@actions/http-client\"));\nconst semver = __importStar(require(\"semver\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst assert_1 = require(\"assert\");\nconst v4_1 = __importDefault(require(\"uuid/v4\"));\nconst exec_1 = require(\"@actions/exec/lib/exec\");\nconst retry_helper_1 = require(\"./retry-helper\");\nclass HTTPError extends Error {\n constructor(httpStatusCode) {\n super(`Unexpected HTTP response: ${httpStatusCode}`);\n this.httpStatusCode = httpStatusCode;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nexports.HTTPError = HTTPError;\nconst IS_WINDOWS = process.platform === 'win32';\nconst IS_MAC = process.platform === 'darwin';\nconst userAgent = 'actions/tool-cache';\n/**\n * Download a tool from an url and stream it into a file\n *\n * @param url url of tool to download\n * @param dest path to download tool\n * @param auth authorization header\n * @param headers other headers\n * @returns path to downloaded tool\n */\nfunction downloadTool(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n dest = dest || path.join(_getTempDirectory(), v4_1.default());\n yield io.mkdirP(path.dirname(dest));\n core.debug(`Downloading ${url}`);\n core.debug(`Destination ${dest}`);\n const maxAttempts = 3;\n const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10);\n const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);\n const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);\n return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {\n return yield downloadToolAttempt(url, dest || '', auth, headers);\n }), (err) => {\n if (err instanceof HTTPError && err.httpStatusCode) {\n // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests\n if (err.httpStatusCode < 500 &&\n err.httpStatusCode !== 408 &&\n err.httpStatusCode !== 429) {\n return false;\n }\n }\n // Otherwise retry\n return true;\n });\n });\n}\nexports.downloadTool = downloadTool;\nfunction downloadToolAttempt(url, dest, auth, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(dest)) {\n throw new Error(`Destination file path ${dest} already exists`);\n }\n // Get the response headers\n const http = new httpm.HttpClient(userAgent, [], {\n allowRetries: false\n });\n if (auth) {\n core.debug('set auth');\n if (headers === undefined) {\n headers = {};\n }\n headers.authorization = auth;\n }\n const response = yield http.get(url, headers);\n if (response.message.statusCode !== 200) {\n const err = new HTTPError(response.message.statusCode);\n core.debug(`Failed to download from \"${url}\". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);\n throw err;\n }\n // Download the response body\n const pipeline = util.promisify(stream.pipeline);\n const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message);\n const readStream = responseMessageFactory();\n let succeeded = false;\n try {\n yield pipeline(readStream, fs.createWriteStream(dest));\n core.debug('download complete');\n succeeded = true;\n return dest;\n }\n finally {\n // Error, delete dest before retry\n if (!succeeded) {\n core.debug('download failed');\n try {\n yield io.rmRF(dest);\n }\n catch (err) {\n core.debug(`Failed to delete '${dest}'. ${err.message}`);\n }\n }\n }\n });\n}\n/**\n * Extract a .7z file\n *\n * @param file path to the .7z file\n * @param dest destination directory. Optional.\n * @param _7zPath path to 7zr.exe. Optional, for long path support. Most .7z archives do not have this\n * problem. If your .7z archive contains very long paths, you can pass the path to 7zr.exe which will\n * gracefully handle long paths. By default 7zdec.exe is used because it is a very small program and is\n * bundled with the tool lib. However it does not support long paths. 7zr.exe is the reduced command line\n * interface, it is smaller than the full command line interface, and it does support long paths. At the\n * time of this writing, it is freely available from the LZMA SDK that is available on the 7zip website.\n * Be sure to check the current license agreement. If 7zr.exe is bundled with your action, then the path\n * to 7zr.exe can be pass to this function.\n * @returns path to the destination directory\n */\nfunction extract7z(file, dest, _7zPath) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n const originalCwd = process.cwd();\n process.chdir(dest);\n if (_7zPath) {\n try {\n const logLevel = core.isDebug() ? '-bb1' : '-bb0';\n const args = [\n 'x',\n logLevel,\n '-bd',\n '-sccUTF-8',\n file\n ];\n const options = {\n silent: true\n };\n yield exec_1.exec(`\"${_7zPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n else {\n const escapedScript = path\n .join(__dirname, '..', 'scripts', 'Invoke-7zdec.ps1')\n .replace(/'/g, \"''\")\n .replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const escapedTarget = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`;\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n command\n ];\n const options = {\n silent: true\n };\n try {\n const powershellPath = yield io.which('powershell', true);\n yield exec_1.exec(`\"${powershellPath}\"`, args, options);\n }\n finally {\n process.chdir(originalCwd);\n }\n }\n return dest;\n });\n}\nexports.extract7z = extract7z;\n/**\n * Extract a compressed tar archive\n *\n * @param file path to the tar\n * @param dest destination directory. Optional.\n * @param flags flags for the tar command to use for extraction. Defaults to 'xz' (extracting gzipped tars). Optional.\n * @returns path to the destination directory\n */\nfunction extractTar(file, dest, flags = 'xz') {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n // Create dest\n dest = yield _createExtractFolder(dest);\n // Determine whether GNU tar\n core.debug('Checking tar --version');\n let versionOutput = '';\n yield exec_1.exec('tar --version', [], {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n core.debug(versionOutput.trim());\n const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');\n // Initialize args\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n if (core.isDebug() && !flags.includes('v')) {\n args.push('-v');\n }\n let destArg = dest;\n let fileArg = file;\n if (IS_WINDOWS && isGnuTar) {\n args.push('--force-local');\n destArg = dest.replace(/\\\\/g, '/');\n // Technically only the dest needs to have `/` but for aesthetic consistency\n // convert slashes in the file arg too.\n fileArg = file.replace(/\\\\/g, '/');\n }\n if (isGnuTar) {\n // Suppress warnings when using GNU tar to extract archives created by BSD tar\n args.push('--warning=no-unknown-keyword');\n args.push('--overwrite');\n }\n args.push('-C', destArg, '-f', fileArg);\n yield exec_1.exec(`tar`, args);\n return dest;\n });\n}\nexports.extractTar = extractTar;\n/**\n * Extract a xar compatible archive\n *\n * @param file path to the archive\n * @param dest destination directory. Optional.\n * @param flags flags for the xar. Optional.\n * @returns path to the destination directory\n */\nfunction extractXar(file, dest, flags = []) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');\n assert_1.ok(file, 'parameter \"file\" is required');\n dest = yield _createExtractFolder(dest);\n let args;\n if (flags instanceof Array) {\n args = flags;\n }\n else {\n args = [flags];\n }\n args.push('-x', '-C', dest, '-f', file);\n if (core.isDebug()) {\n args.push('-v');\n }\n const xarPath = yield io.which('xar', true);\n yield exec_1.exec(`\"${xarPath}\"`, _unique(args));\n return dest;\n });\n}\nexports.extractXar = extractXar;\n/**\n * Extract a zip\n *\n * @param file path to the zip\n * @param dest destination directory. Optional.\n * @returns path to the destination directory\n */\nfunction extractZip(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!file) {\n throw new Error(\"parameter 'file' is required\");\n }\n dest = yield _createExtractFolder(dest);\n if (IS_WINDOWS) {\n yield extractZipWin(file, dest);\n }\n else {\n yield extractZipNix(file, dest);\n }\n return dest;\n });\n}\nexports.extractZip = extractZip;\nfunction extractZipWin(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n // build the powershell command\n const escapedFile = file.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, ''); // double-up single quotes, remove double quotes and newlines\n const escapedDest = dest.replace(/'/g, \"''\").replace(/\"|\\n|\\r/g, '');\n const pwshPath = yield io.which('pwsh', false);\n //To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory\n //and the -Force flag for Expand-Archive as a fallback\n if (pwshPath) {\n //attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive\n const pwshCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,\n `try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`,\n `catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n pwshCommand\n ];\n core.debug(`Using pwsh at path: ${pwshPath}`);\n yield exec_1.exec(`\"${pwshPath}\"`, args);\n }\n else {\n const powershellCommand = [\n `$ErrorActionPreference = 'Stop' ;`,\n `try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,\n `if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`,\n `else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`\n ].join(' ');\n const args = [\n '-NoLogo',\n '-Sta',\n '-NoProfile',\n '-NonInteractive',\n '-ExecutionPolicy',\n 'Unrestricted',\n '-Command',\n powershellCommand\n ];\n const powershellPath = yield io.which('powershell', true);\n core.debug(`Using powershell at path: ${powershellPath}`);\n yield exec_1.exec(`\"${powershellPath}\"`, args);\n }\n });\n}\nfunction extractZipNix(file, dest) {\n return __awaiter(this, void 0, void 0, function* () {\n const unzipPath = yield io.which('unzip', true);\n const args = [file];\n if (!core.isDebug()) {\n args.unshift('-q');\n }\n args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run\n yield exec_1.exec(`\"${unzipPath}\"`, args, { cwd: dest });\n });\n}\n/**\n * Caches a directory and installs it into the tool cacheDir\n *\n * @param sourceDir the directory to cache into tools\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheDir(sourceDir, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source dir: ${sourceDir}`);\n if (!fs.statSync(sourceDir).isDirectory()) {\n throw new Error('sourceDir is not a directory');\n }\n // Create the tool dir\n const destPath = yield _createToolPath(tool, version, arch);\n // copy each child item. do not move. move can fail on Windows\n // due to anti-virus software having an open handle on a file.\n for (const itemName of fs.readdirSync(sourceDir)) {\n const s = path.join(sourceDir, itemName);\n yield io.cp(s, destPath, { recursive: true });\n }\n // write .complete\n _completeToolPath(tool, version, arch);\n return destPath;\n });\n}\nexports.cacheDir = cacheDir;\n/**\n * Caches a downloaded file (GUID) and installs it\n * into the tool cache with a given targetName\n *\n * @param sourceFile the file to cache into tools. Typically a result of downloadTool which is a guid.\n * @param targetFile the name of the file name in the tools directory\n * @param tool tool name\n * @param version version of the tool. semver format\n * @param arch architecture of the tool. Optional. Defaults to machine architecture\n */\nfunction cacheFile(sourceFile, targetFile, tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n version = semver.clean(version) || version;\n arch = arch || os.arch();\n core.debug(`Caching tool ${tool} ${version} ${arch}`);\n core.debug(`source file: ${sourceFile}`);\n if (!fs.statSync(sourceFile).isFile()) {\n throw new Error('sourceFile is not a file');\n }\n // create the tool dir\n const destFolder = yield _createToolPath(tool, version, arch);\n // copy instead of move. move can fail on Windows due to\n // anti-virus software having an open handle on a file.\n const destPath = path.join(destFolder, targetFile);\n core.debug(`destination file ${destPath}`);\n yield io.cp(sourceFile, destPath);\n // write .complete\n _completeToolPath(tool, version, arch);\n return destFolder;\n });\n}\nexports.cacheFile = cacheFile;\n/**\n * Finds the path to a tool version in the local installed tool cache\n *\n * @param toolName name of the tool\n * @param versionSpec version of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction find(toolName, versionSpec, arch) {\n if (!toolName) {\n throw new Error('toolName parameter is required');\n }\n if (!versionSpec) {\n throw new Error('versionSpec parameter is required');\n }\n arch = arch || os.arch();\n // attempt to resolve an explicit version\n if (!isExplicitVersion(versionSpec)) {\n const localVersions = findAllVersions(toolName, arch);\n const match = evaluateVersions(localVersions, versionSpec);\n versionSpec = match;\n }\n // check for the explicit version in the cache\n let toolPath = '';\n if (versionSpec) {\n versionSpec = semver.clean(versionSpec) || '';\n const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch);\n core.debug(`checking cache: ${cachePath}`);\n if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) {\n core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`);\n toolPath = cachePath;\n }\n else {\n core.debug('not found');\n }\n }\n return toolPath;\n}\nexports.find = find;\n/**\n * Finds the paths to all versions of a tool that are installed in the local tool cache\n *\n * @param toolName name of the tool\n * @param arch optional arch. defaults to arch of computer\n */\nfunction findAllVersions(toolName, arch) {\n const versions = [];\n arch = arch || os.arch();\n const toolPath = path.join(_getCacheDirectory(), toolName);\n if (fs.existsSync(toolPath)) {\n const children = fs.readdirSync(toolPath);\n for (const child of children) {\n if (isExplicitVersion(child)) {\n const fullPath = path.join(toolPath, child, arch || '');\n if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {\n versions.push(child);\n }\n }\n }\n }\n return versions;\n}\nexports.findAllVersions = findAllVersions;\nfunction getManifestFromRepo(owner, repo, auth, branch = 'master') {\n return __awaiter(this, void 0, void 0, function* () {\n let releases = [];\n const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;\n const http = new httpm.HttpClient('tool-cache');\n const headers = {};\n if (auth) {\n core.debug('set auth');\n headers.authorization = auth;\n }\n const response = yield http.getJson(treeUrl, headers);\n if (!response.result) {\n return releases;\n }\n let manifestUrl = '';\n for (const item of response.result.tree) {\n if (item.path === 'versions-manifest.json') {\n manifestUrl = item.url;\n break;\n }\n }\n headers['accept'] = 'application/vnd.github.VERSION.raw';\n let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();\n if (versionsRaw) {\n // shouldn't be needed but protects against invalid json saved with BOM\n versionsRaw = versionsRaw.replace(/^\\uFEFF/, '');\n try {\n releases = JSON.parse(versionsRaw);\n }\n catch (_a) {\n core.debug('Invalid json');\n }\n }\n return releases;\n });\n}\nexports.getManifestFromRepo = getManifestFromRepo;\nfunction findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) {\n return __awaiter(this, void 0, void 0, function* () {\n // wrap the internal impl\n const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter);\n return match;\n });\n}\nexports.findFromManifest = findFromManifest;\nfunction _createExtractFolder(dest) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!dest) {\n // create a temp dir\n dest = path.join(_getTempDirectory(), v4_1.default());\n }\n yield io.mkdirP(dest);\n return dest;\n });\n}\nfunction _createToolPath(tool, version, arch) {\n return __awaiter(this, void 0, void 0, function* () {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n core.debug(`destination ${folderPath}`);\n const markerPath = `${folderPath}.complete`;\n yield io.rmRF(folderPath);\n yield io.rmRF(markerPath);\n yield io.mkdirP(folderPath);\n return folderPath;\n });\n}\nfunction _completeToolPath(tool, version, arch) {\n const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');\n const markerPath = `${folderPath}.complete`;\n fs.writeFileSync(markerPath, '');\n core.debug('finished caching tool');\n}\n/**\n * Check if version string is explicit\n *\n * @param versionSpec version string to check\n */\nfunction isExplicitVersion(versionSpec) {\n const c = semver.clean(versionSpec) || '';\n core.debug(`isExplicit: ${c}`);\n const valid = semver.valid(c) != null;\n core.debug(`explicit? ${valid}`);\n return valid;\n}\nexports.isExplicitVersion = isExplicitVersion;\n/**\n * Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec`\n *\n * @param versions array of versions to evaluate\n * @param versionSpec semantic version spec to satisfy\n */\nfunction evaluateVersions(versions, versionSpec) {\n let version = '';\n core.debug(`evaluating ${versions.length} versions`);\n versions = versions.sort((a, b) => {\n if (semver.gt(a, b)) {\n return 1;\n }\n return -1;\n });\n for (let i = versions.length - 1; i >= 0; i--) {\n const potential = versions[i];\n const satisfied = semver.satisfies(potential, versionSpec);\n if (satisfied) {\n version = potential;\n break;\n }\n }\n if (version) {\n core.debug(`matched: ${version}`);\n }\n else {\n core.debug('match not found');\n }\n return version;\n}\nexports.evaluateVersions = evaluateVersions;\n/**\n * Gets RUNNER_TOOL_CACHE\n */\nfunction _getCacheDirectory() {\n const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';\n assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');\n return cacheDirectory;\n}\n/**\n * Gets RUNNER_TEMP\n */\nfunction _getTempDirectory() {\n const tempDirectory = process.env['RUNNER_TEMP'] || '';\n assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');\n return tempDirectory;\n}\n/**\n * Gets a global variable\n */\nfunction _getGlobal(key, defaultValue) {\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const value = global[key];\n /* eslint-enable @typescript-eslint/no-explicit-any */\n return value !== undefined ? value : defaultValue;\n}\n/**\n * Returns an array of unique values.\n * @param values Values to make unique.\n */\nfunction _unique(values) {\n return Array.from(new Set(values));\n}\n//# sourceMappingURL=tool-cache.js.map","'use strict';\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryAsPromised = exports.TimeoutError = void 0;\nclass TimeoutError extends Error {\n constructor(message, previousError) {\n super(message);\n this.name = \"TimeoutError\";\n this.previous = previousError;\n }\n}\nexports.TimeoutError = TimeoutError;\nfunction matches(match, err) {\n if (typeof match === 'function') {\n try {\n if (err instanceof match)\n return true;\n }\n catch (_) {\n return !!match(err);\n }\n }\n if (match === err.toString())\n return true;\n if (match === err.message)\n return true;\n return match instanceof RegExp\n && (match.test(err.message) || match.test(err.toString()));\n}\nfunction retryAsPromised(callback, optionsInput) {\n if (!callback || !optionsInput) {\n throw new Error('retry-as-promised must be passed a callback and a options set');\n }\n optionsInput = (typeof optionsInput === \"number\" ? { max: optionsInput } : optionsInput);\n const options = {\n $current: \"$current\" in optionsInput ? optionsInput.$current : 1,\n max: optionsInput.max,\n timeout: optionsInput.timeout || undefined,\n match: optionsInput.match ? Array.isArray(optionsInput.match) ? optionsInput.match : [optionsInput.match] : [],\n backoffBase: optionsInput.backoffBase === undefined ? 100 : optionsInput.backoffBase,\n backoffExponent: optionsInput.backoffExponent || 1.1,\n report: optionsInput.report,\n name: optionsInput.name || callback.name || 'unknown'\n };\n if (options.match && !Array.isArray(options.match))\n options.match = [options.match];\n if (options.report)\n options.report('Trying ' + options.name + ' #' + options.$current + ' at ' + new Date().toLocaleTimeString(), options);\n return new Promise(function (resolve, reject) {\n let timeout;\n let backoffTimeout;\n let lastError;\n if (options.timeout) {\n timeout = setTimeout(function () {\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n reject(new TimeoutError(options.name + ' timed out', lastError));\n }, options.timeout);\n }\n Promise.resolve(callback({ current: options.$current }))\n .then(resolve)\n .then(function () {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n })\n .catch(function (err) {\n if (timeout)\n clearTimeout(timeout);\n if (backoffTimeout)\n clearTimeout(backoffTimeout);\n lastError = err;\n if (options.report)\n options.report((err && err.toString()) || err, options, err);\n // Should not retry if max has been reached\n var shouldRetry = options.$current < options.max;\n if (!shouldRetry)\n return reject(err);\n shouldRetry = options.match.length === 0 || options.match.some(function (match) {\n return matches(match, err);\n });\n if (!shouldRetry)\n return reject(err);\n var retryDelay = options.backoffBase * Math.pow(options.backoffExponent, options.$current - 1);\n // Do some accounting\n options.$current++;\n if (options.report)\n options.report(`Retrying ${options.name} (${options.$current})`, options);\n if (retryDelay) {\n // Use backoff function to ease retry rate\n if (options.report)\n options.report(`Delaying retry of ${options.name} by ${retryDelay}`, options);\n backoffTimeout = setTimeout(function () {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }, retryDelay);\n }\n else {\n retryAsPromised(callback, options)\n .then(resolve)\n .catch(reject);\n }\n });\n });\n}\nexports.retryAsPromised = retryAsPromised;\n;\nexports.default = retryAsPromised;\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSevenZip(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"7zip\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"p7zip\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"p7zip\", version)\n } else if (hasDnf()) {\n return setupDnfPack([\n { name: \"p7zip\", version },\n { name: \"p7zip-plugins\", version },\n ])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"p7zip-full\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { mkdirP } from \"@actions/io\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, warning } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { setupSevenZip } from \"../../sevenzip/sevenzip.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\nexport { extractTar, extractXar } from \"@actions/tool-cache\"\n\nexport enum ArchiveType {\n Tar = 0,\n TarGz = 1,\n TarXz = 2,\n Zip = 3,\n SevenZip = 4,\n}\n\nexport function getArchiveType(file: string): ArchiveType {\n const ext = file.split(\".\").pop()\n\n if (ext === \"tar\") {\n return ArchiveType.Tar\n }\n\n if (ext === \"gz\" || ext === \"tgz\") {\n return ArchiveType.TarGz\n }\n\n if (ext === \"xz\" || ext === \"txz\") {\n return ArchiveType.TarXz\n }\n\n if (ext === \"zip\") {\n return ArchiveType.Zip\n }\n\n if (ext === \"7z\" || ext === \"exe\") {\n return ArchiveType.SevenZip\n }\n\n // default to 7z\n warning(`Unknown archive type: ${ext}. Defaulting to 7z`)\n return ArchiveType.SevenZip\n}\n\nexport function getExtractFunction(archiveType: ArchiveType) {\n switch (archiveType) {\n case ArchiveType.Tar:\n case ArchiveType.TarGz:\n return extractTarByExe\n case ArchiveType.TarXz:\n return extractTarByExe\n case ArchiveType.Zip:\n return extractZip\n default:\n return extract7Zip\n }\n}\n\nlet sevenZip: string | undefined\n\n/// Extract 7z using 7z\nexport async function extract7Zip(file: string, dest: string) {\n await execa(await getSevenZip(), [\"x\", file, `-o${dest}`, \"-y\"], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n}\n\n/// install 7z if needed\nasync function getSevenZip() {\n if (sevenZip === undefined) {\n if (which.sync(\"7z\", { nothrow: true }) === null) {\n await setupSevenZip(\"\", \"\", process.arch)\n }\n // eslint-disable-next-line require-atomic-updates\n sevenZip = \"7z\"\n }\n return sevenZip\n}\n\n/// Extract Exe using 7z\nexport function extractExe(file: string, dest: string) {\n return extract7Zip(file, dest)\n}\n\n/// Extract Zip using unzip or 7z\nexport async function extractZip(file: string, dest: string) {\n // prefer 7z if available (faster especially on Windows)\n if (which.sync(\"7z\", { nothrow: true }) !== null) {\n return extract7Zip(file, dest)\n }\n\n // if unzip is available use it (usually available on posix systems)\n if (which.sync(\"unzip\", { nothrow: true }) !== null) {\n await execa(\"unzip\", [\"-q\", file, \"-d\", dest], { stdio: \"inherit\" })\n await grantUserWriteAccess(dest)\n return dest\n }\n\n // fallback to 7z (will install 7z if needed)\n return extract7Zip(file, dest)\n}\n\nexport async function extractTarByExe(file: string, dest: string, stripComponents: number = 0, flags: string[] = []) {\n await installTarDependencies(getArchiveType(file))\n\n try {\n await mkdirP(dest)\n } catch {\n // ignore\n }\n\n // TODO windows fails to create symlinks\n // https://github.com/heroku/heroku-slugs/issues/3\n\n try {\n await execa(\"tar\", [\"xf\", file, \"-C\", dest, `--strip-components=${stripComponents}`, ...flags], {\n stdio: \"inherit\",\n })\n } catch (e) {\n if (process.platform === \"win32\" && (e as Error).message.includes(\"Can't create '\\\\\\\\?\\\\C:\")) {\n warning(`Failed to extract symlink ${file} to ${dest}. Ignoring this symlink.`)\n }\n }\n\n await grantUserWriteAccess(dest)\n return dest\n}\n\nasync function installTarDependencies(archiveType: ArchiveType) {\n info(\"Installing tar extraction dependencies\")\n\n switch (archiveType) {\n case ArchiveType.TarGz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"gzip\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"gzip\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"gzip\" }, { name: \"tar\" }])\n }\n }\n break\n }\n case ArchiveType.TarXz: {\n if (process.platform === \"linux\") {\n if (isArch()) {\n await setupPacmanPack(\"xz\")\n await setupPacmanPack(\"tar\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"xz\" }, { name: \"tar\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"xz-utils\" }, { name: \"tar\" }])\n }\n }\n break\n }\n default:\n throw new Error(`Unsupported archive type: ${archiveType} for tar extraction`)\n }\n}\n","import { tmpdir } from \"os\"\nimport { basename, join } from \"path\"\nimport { cacheDir, downloadTool, find } from \"@actions/tool-cache\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { chmod } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { maybeGetInput, rcOptions } from \"../../cli-options.js\"\nimport { getArchiveType, getExtractFunction } from \"./extract.js\"\n\n/** A type that describes a package */\nexport type PackageInfo = {\n /** Url to download the package */\n url: string\n /** The top folder name once it is extracted. It can be `\"\"` if there is no top folder */\n extractedFolderName: string\n /** The relative directory in which the binary is located. It can be `\"\"` if the exe is in the top folder */\n binRelativeDir: string\n /** The main binary file. */\n binFileName: string\n /** The function to extract the downloaded archive. It can be `undefined`, if the binary itself is downloaded directly. */\n extractFunction?: (file: string, dest: string) => Promise\n}\n\nexport type InstallationInfo = {\n /** The top install dir */\n installDir?: string\n binDir: string\n bin?: string\n}\n\n/**\n * A function that:\n *\n * - Downloads and extracts a package\n * - Adds the bin path of the package to PATH\n * - Caches the downloaded directory into tool cache for usage from other sessions\n *\n * @returns The installation directory\n */\nexport async function setupBin(\n name: string,\n version: string,\n getPackageInfo: (version: string, platform: NodeJS.Platform, arch: string) => PackageInfo | Promise,\n setupDir: string,\n arch: string,\n): Promise {\n info(`Installing ${name} ${version} ${arch} via direct downloading`)\n\n process.env.RUNNER_TEMP = process.env.RUNNER_TEMP ?? tmpdir()\n process.env.RUNNER_TOOL_CACHE = process.env.RUNNER_TOOL_CACHE ?? join(tmpdir(), \"setup-cpp\", \"hostedtoolcache\")\n\n const { url, binRelativeDir, binFileName, extractedFolderName, extractFunction } = await getPackageInfo(\n version,\n process.platform,\n arch,\n )\n\n // Restore from cache (if found).\n if (GITHUB_ACTIONS) {\n try {\n const dir = find(name, version)\n if (dir) {\n const installDir = join(dir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n if (await pathExists(join(binDir, binFileName))) {\n info(`${name} ${version} was found in the cache at ${binDir}.`)\n await addPath(binDir, rcOptions)\n\n return { installDir, binDir }\n }\n }\n } catch {\n // fails on a local machine?\n }\n }\n\n const installDir = join(setupDir, extractedFolderName)\n const binDir = join(installDir, binRelativeDir)\n const binFile = join(binDir, binFileName)\n\n await downloadExtractInstall(binDir, binFile, name, version, url, setupDir, extractFunction, arch)\n\n await cacheInstallation(setupDir, name, version)\n\n return { installDir, binDir }\n}\n\nasync function downloadExtractInstall(\n binDir: string,\n binFile: string,\n name: string,\n version: string,\n url: string,\n setupDir: string,\n givenExtractFunction: PackageInfo[\"extractFunction\"],\n arch: string,\n) {\n // download ane extract the package into the installation directory.\n if ((await Promise.all([pathExists(binDir), pathExists(binFile)])).includes(false)) {\n try {\n const downloaded = await tryDownload(name, version, url)\n\n info(`Extracting ${downloaded} to ${setupDir}`)\n\n const extractFunction = givenExtractFunction ?? getExtractFunction(getArchiveType(url))\n await extractFunction(downloaded, setupDir)\n } catch (err) {\n throw new Error(`Failed to download ${name} ${version} ${arch} from ${url}: ${err}`)\n }\n }\n\n // Adding the bin dir to the path\n /** The directory which the tool is installed to */\n info(`Add ${binDir} to PATH`)\n await addPath(binDir, rcOptions)\n\n // Check if the binary exists after extraction\n if (!(await pathExists(binFile))) {\n throw new Error(`Failed to find the binary ${binFile} after extracting ${name} ${version} ${arch}`)\n }\n\n // make the binary executable on non-windows platforms\n if (process.platform !== \"win32\") {\n try {\n await chmod(binFile, \"755\")\n } catch (err) {\n warning(`Failed to make ${binFile} executable: ${err}`)\n }\n }\n}\n\nasync function tryDownload(name: string, version: string, url: string) {\n info(`Download ${name} ${version}`)\n // try to download the package 4 times with 2 seconds delay\n const downloaded = await retry(\n () => {\n const downloadedFilePath = join(process.env.RUNNER_TEMP ?? tmpdir(), `${Date.now()}-${basename(url)}`)\n\n return downloadTool(url, downloadedFilePath)\n },\n { name: url, max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n return downloaded\n}\n\nasync function cacheInstallation(setupDir: string, name: string, version: string) {\n // check if inside Github Actions. If so, cache the installation\n if (GITHUB_ACTIONS && typeof process.env.RUNNER_TOOL_CACHE === \"string\") {\n if (maybeGetInput(\"cache-tools\") === \"true\" || process.env.CACHE_TOOLS === \"true\") {\n await cacheDir(setupDir, name, version)\n }\n }\n}\n","import { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverLte from \"semver/functions/lte\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform data for cmake */\nfunction getCmakePackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const semVersion = semverCoerce(version) ?? version\n switch (platform) {\n case \"win32\": {\n const isOld = semverLte(semVersion, \"v3.19.6\")\n let osArchStr: string\n if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"win64-x64\" : \"windows-x86_64\"\n } else if (x86.includes(arch)) {\n osArchStr = isOld ? \"win32-x86\" : \"windows-i386\"\n } else if (arm64.includes(arch)) {\n osArchStr = \"windows-arm64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Windows`)\n osArchStr = `windows-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.zip`,\n }\n }\n case \"darwin\": {\n const isOld = semverLte(semVersion, \"v3.19.1\")\n const osArchStr = isOld ? \"Darwin-x86_64\" : \"macos-universal\"\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"CMake.app/Contents/bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n case \"linux\": {\n const isOld = semverLte(semVersion, \"v3.19.8\")\n let osArchStr: string\n if (arm64.includes(arch)) {\n osArchStr = isOld ? \"Linux-aarch64\" : \"linux-aarch64\"\n } else if (x86_64.includes(arch)) {\n osArchStr = isOld ? \"Linux-x86_64\" : \"linux-x86_64\"\n } else {\n info(`Trying unsupported arch '${arch}' for cmake on Linux`)\n osArchStr = `linux-${arch}`\n }\n const folderName = `cmake-${version}-${osArchStr}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"cmake\"),\n extractedFolderName: folderName,\n url: `https://github.com/Kitware/CMake/releases/download/v${version}/${folderName}.tar.gz`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Setup cmake */\nexport function setupCmake(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"cmake\", version, getCmakePackageInfo, setupDir, arch)\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { info } from \"ci-log\"\nimport { isUrlOnline } from \"is-url-online\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverCompare from \"semver/functions/compare\"\nimport semverValid from \"semver/functions/valid\"\n\n/**\n * Gets the specific versions supported by this action compatible with the supplied (specific or minimum) version in\n * descending order of release (e.g., `5.0.2`, `5.0.1`, and `5.0.0` for `5`).\n */\nexport function getSpecificVersions(versions: Set, semversion: string): string[] {\n return Array.from(versions)\n .filter((v) => /^\\d+\\.\\d+\\.\\d+$/.test(v) && v.startsWith(semversion))\n .sort((a, b) => {\n try {\n return semverCompare(a, b)\n } catch (err) {\n return a.localeCompare(b)\n }\n })\n .reverse()\n}\n\n/**\n * Gets the specific and minimum versions that can be used to refer to the supplied specific versions (e.g., `3`, `3.5`,\n * `3.5.2` for `3.5.2`).\n */\nexport function getVersions(specific: string[]): Set {\n const versions = new Set(specific)\n\n for (const version of specific) {\n versions.add(/^\\d+/.exec(version)![0])\n versions.add(/^\\d+\\.\\d+/.exec(version)![0])\n }\n\n return versions\n}\n\n/** Gets the most recent specific version for which there is a valid download URL. */\nexport async function getSpecificVersionAndUrl(\n versions: Set,\n platform: string,\n version: string,\n getUrl: (platform: string, version: string) => string | null | Promise,\n): Promise<[string, string]> {\n // specific ubuntu version\n if (platform === \"linux\" && version.includes(\"ubuntu\")) {\n const url = await getUrl(platform, version)\n // eslint-disable-next-line no-await-in-loop\n if (url !== null && (await isUrlOnline(url))) {\n return [version, url]\n }\n }\n\n // if the given set doesn't include the version, throw an error\n if (!versions.has(version)) {\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n }\n\n const offlineUrls: string[] = []\n\n // TODO use Promise.any\n for (const specificVersion of getSpecificVersions(versions, version)) {\n // eslint-disable-next-line no-await-in-loop\n const url = await getUrl(platform, specificVersion)\n if (url !== null) {\n // eslint-disable-next-line no-await-in-loop\n if (await isUrlOnline(url)) {\n return [specificVersion, url]\n } else {\n offlineUrls.push(url)\n }\n }\n }\n\n throw new Error(\n `Unsupported target! (platform='${platform}', version='${version}'). Try one of the following: ${\n JSON.stringify(\n versions,\n )\n }`,\n )\n}\n\nexport const defaultVersionRegex = /v?(\\d\\S*)/\n\n/** Get the version of a binary */\nexport async function getBinVersion(file: string, versionRegex: RegExp = defaultVersionRegex) {\n try {\n const execout = await getExecOutput(file, [\"--version\"])\n const version_output = execout.stdout || execout.stderr || \"\"\n const version = version_output.trim().match(versionRegex)?.[1]\n return semverCoerce(version) ?? undefined\n } catch (e) {\n console.error(e)\n return undefined\n }\n}\n\n/** Check if the given bin is up to date against the target version */\nexport async function isBinUptoDate(\n givenFile: string,\n targetVersion: string,\n versionRegex: RegExp = defaultVersionRegex,\n) {\n const givenVersion = await getBinVersion(givenFile, versionRegex)\n if (givenVersion !== undefined && targetVersion !== \"\") {\n return semverCompare(givenVersion, targetVersion) !== -1\n } else {\n // assume given version is old\n return false\n }\n}\n\n/** Coerce the given version if it is invalid */\nexport function semverCoerceIfInvalid(version: string) {\n if (semverValid(version) === null) {\n // version coercion\n try {\n // find the semver version of an integer\n const coercedVersion = semverCoerce(version)\n if (coercedVersion !== null) {\n info(`Coerced version '${version}' to '${coercedVersion}'`)\n return coercedVersion.version\n }\n } catch (err) {\n // handled below\n }\n }\n return version\n}\n\nexport function removeVPrefix(version: string) {\n return Number.parseInt(version.replace(/^v/, \"\"), 10)\n}\n\nexport function addVPrefix(version: string) {\n if (!version.match(/^v/)) {\n return `v${version}`\n }\n return version\n}\n\nexport function compareVersion(tag1: string, tag2: string) {\n const v1 = semverCoerce(tag1)\n const v2 = semverCoerce(tag2)\n if (v1 !== null && v2 !== null) {\n // put the latest version first\n return v2.compare(v1)\n }\n\n // if the tags are not semver, compare them as strings, putting the latest tag first\n return tag2.localeCompare(tag1)\n}\n","export function unique(dirs: string[]) {\n return [...new Set(dirs)]\n}\n\nexport function quoteIfHasSpace(str: string, quoteChar = \"\\\"\") {\n return str.includes(\" \") ? `${quoteChar}${str}${quoteChar}` : str\n}\n","import assert from \"assert\"\nimport { homedir } from \"os\"\nimport { dirname, join, parse as pathParse } from \"path\"\nimport { getExecOutput } from \"@actions/exec\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { hasPipx, setupPipPackSystem, setupPipPackWithPython } from \"../utils/setup/setupPipPack.js\"\nimport { isBinUptoDate } from \"../utils/setup/version.js\"\nimport { unique } from \"../utils/std/index.js\"\nimport { MinVersions } from \"../versions/default_versions.js\"\n\nexport async function setupPython(version: string, setupDir: string, arch: string): Promise {\n const installInfo = await findOrSetupPython(version, setupDir, arch)\n assert(installInfo.bin !== undefined)\n const foundPython = installInfo.bin\n\n // setup pip\n const foundPip = await findOrSetupPip(foundPython)\n if (foundPip === undefined) {\n throw new Error(\"pip was not installed correctly\")\n }\n\n await setupPipx(foundPython)\n\n await setupWheel(foundPython)\n\n return installInfo\n}\n\nasync function setupPipx(foundPython: string) {\n try {\n if (!(await hasPipx(foundPython))) {\n try {\n await setupPipPackWithPython(foundPython, \"pipx\", undefined, { upgrade: true, usePipx: false })\n } catch (err) {\n if (setupPipPackSystem(\"pipx\", false) === null) {\n throw new Error(`pipx was not installed correctly ${err}`)\n }\n }\n }\n await execa(foundPython, [\"-m\", \"pipx\", \"ensurepath\"], { stdio: \"inherit\" })\n await setupPipPackWithPython(foundPython, \"venv\", undefined, { upgrade: false, usePipx: false })\n } catch (err) {\n warning(`Failed to install pipx: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\n/** Setup wheel and setuptools */\nasync function setupWheel(foundPython: string) {\n try {\n await setupPipPackWithPython(foundPython, \"setuptools\", undefined, {\n upgrade: true,\n isLibrary: true,\n usePipx: false,\n })\n await setupPipPackWithPython(foundPython, \"wheel\", undefined, { upgrade: true, isLibrary: true, usePipx: false })\n } catch (err) {\n warning(`Failed to install setuptools or wheel: ${(err as Error).toString()}. Ignoring...`)\n }\n}\n\nasync function findOrSetupPython(version: string, setupDir: string, arch: string): Promise {\n let installInfo: InstallationInfo | undefined\n let foundPython = await findPython(setupDir)\n\n if (foundPython !== undefined) {\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } else {\n // if python is not found, try to install it\n if (GITHUB_ACTIONS) {\n // install python in GitHub Actions\n try {\n info(\"Installing python in GitHub Actions\")\n const { setupActionsPython } = await import(\"./actions_python.js\")\n await setupActionsPython(version, setupDir, arch)\n\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(foundPython)\n installInfo = { bin: foundPython, installDir: binDir, binDir }\n } catch (err) {\n warning((err as Error).toString())\n }\n }\n if (installInfo === undefined) {\n // install python via system package manager\n installInfo = await setupPythonSystem(setupDir, version)\n }\n }\n\n if (foundPython === undefined || installInfo.bin === undefined) {\n foundPython = await findPython(setupDir)\n if (foundPython === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n installInfo = { bin: foundPython, installDir: dirname(foundPython), binDir: dirname(foundPython) }\n }\n\n return installInfo\n}\n\nasync function setupPythonSystem(setupDir: string, version: string) {\n let installInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (setupDir) {\n await setupChocoPack(\"python3\", version, [`--params=/InstallDir:${setupDir}`])\n } else {\n await setupChocoPack(\"python3\", version)\n }\n // Adding the bin dir to the path\n const bin = await findPython(setupDir)\n if (bin === undefined) {\n throw new Error(\"Python binary could not be found\")\n }\n const binDir = dirname(bin)\n /** The directory which the tool is installed to */\n await addPath(binDir, rcOptions)\n installInfo = { installDir: binDir, binDir, bin }\n break\n }\n case \"darwin\": {\n installInfo = await installBrewPack(\"python3\", version)\n // add the python and pip binaries to the path\n const brewPythonPrefix: {\n stdout: string\n stderr: string\n } = await execa(\"brew\", [\"--prefix\", \"python\"], { stdio: \"pipe\" })\n const brewPythonBin = join(brewPythonPrefix.stdout, \"libexec\", \"bin\")\n await addPath(brewPythonBin, rcOptions)\n\n break\n }\n case \"linux\": {\n if (isArch()) {\n installInfo = await setupPacmanPack(\"python\", version)\n } else if (hasDnf()) {\n installInfo = await setupDnfPack([{ name: \"python3\", version }])\n } else if (isUbuntu()) {\n installInfo = await installAptPack([{ name: \"python3\", version }, { name: \"python-is-python3\" }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n break\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n return installInfo\n}\n\nasync function findPython(binDir?: string) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, binDir)\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n\n // On Windows, search in C:\\PythonXX\n if (process.platform === \"win32\") {\n const rootDir = pathParse(homedir()).root\n // find all directories in rootDir using readdir\n const pythonDirs = (await readdir(rootDir)).filter((dir) => dir.startsWith(\"Python\"))\n\n for (const pythonDir of pythonDirs) {\n for (const pythonBin of [\"python3\", \"python\"]) {\n // eslint-disable-next-line no-await-in-loop\n const foundPython = await isPythonUpToDate(pythonBin, join(rootDir, pythonDir))\n if (foundPython !== undefined) {\n return foundPython\n }\n }\n }\n }\n\n return undefined\n}\n\nasync function isPythonUpToDate(candidate: string, binDir?: string) {\n try {\n if (binDir !== undefined) {\n const pythonBinPath = join(binDir, addExeExt(candidate))\n if (await pathExists(pythonBinPath)) {\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pythonBinPaths = (await which(candidate, { nothrow: true, all: true })) ?? []\n for (const pythonBinPath of pythonBinPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pythonBinPath, MinVersions.python!)) {\n return pythonBinPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function findOrSetupPip(foundPython: string) {\n const maybePip = await findPip()\n\n if (maybePip === undefined) {\n // install pip if not installed\n info(\"pip was not found. Installing pip\")\n await setupPip(foundPython)\n return findPip() // recurse to check if pip is on PATH and up-to-date\n }\n\n return maybePip\n}\n\nasync function findPip() {\n for (const pipCandidate of [\"pip3\", \"pip\"]) {\n // eslint-disable-next-line no-await-in-loop\n const maybePip = await isPipUptoDate(pipCandidate)\n if (maybePip !== undefined) {\n return maybePip\n }\n }\n return undefined\n}\n\nasync function isPipUptoDate(pip: string) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n const pipPaths = (await which(pip, { nothrow: true, all: true })) ?? []\n for (const pipPath of pipPaths) {\n // eslint-disable-next-line no-await-in-loop\n if (await isBinUptoDate(pipPath, MinVersions.pip!)) {\n return pipPath\n }\n }\n } catch {\n // fall through\n }\n return undefined\n}\n\nasync function setupPip(foundPython: string) {\n const upgraded = await ensurePipUpgrade(foundPython)\n if (!upgraded) {\n // ensure that pip is installed on Linux (happens when python is found but pip not installed)\n await setupPipPackSystem(\"pip\")\n\n // upgrade pip\n await ensurePipUpgrade(foundPython)\n }\n}\n\nasync function ensurePipUpgrade(foundPython: string) {\n try {\n await execa(foundPython, [\"-m\", \"ensurepip\", \"-U\", \"--upgrade\"], { stdio: \"inherit\" })\n return true\n } catch (err1) {\n info((err1 as Error).toString())\n try {\n // ensure pip is disabled on Ubuntu\n await execa(foundPython, [\"-m\", \"pip\", \"install\", \"--upgrade\", \"pip\"], { stdio: \"inherit\" })\n return true\n } catch (err2) {\n info((err2 as Error).toString())\n // pip module not found\n }\n }\n // all methods failed\n return false\n}\n\nasync function addPythonBaseExecPrefix_(python: string) {\n const dirs: string[] = []\n\n // detection based on the platform\n if (process.platform === \"linux\") {\n dirs.push(\"/home/runner/.local/bin/\")\n } else if (process.platform === \"darwin\") {\n dirs.push(\"/usr/local/bin/\")\n }\n\n // detection using python.sys\n const base_exec_prefix = (await getExecOutput(`${python} -c \"import sys;print(sys.base_exec_prefix);\"`)).stdout.trim()\n // any of these are possible depending on the operating system!\n dirs.push(join(base_exec_prefix, \"Scripts\"), join(base_exec_prefix, \"Scripts\", \"bin\"), join(base_exec_prefix, \"bin\"))\n\n // remove duplicates\n return unique(dirs)\n}\n\n/**\n * Add the base exec prefix to the PATH. This is required for Conan, Meson, etc. to work properly.\n *\n * The answer is cached for subsequent calls\n */\nexport const addPythonBaseExecPrefix = memoize(addPythonBaseExecPrefix_, { promise: true })\n","import type { Opts } from \"../cli-options.js\"\nimport type { Inputs } from \"../tool.js\"\nimport { DefaultUbuntuVersion, DefaultVersions } from \"./default_versions.js\"\n\n/** Get the default version if passed true or undefined, otherwise return the version itself */\nexport function getVersion(name: string, version: string | undefined, osVersion: number[] | null = null) {\n if (isVersionDefault(version) && process.platform === \"linux\" && osVersion !== null && name in DefaultUbuntuVersion) {\n return getDefaultLinuxVersion(osVersion, DefaultUbuntuVersion[name]!)\n } else if (isVersionDefault(version) && name in DefaultVersions) {\n return DefaultVersions[name] ?? \"\"\n } else if (version === \"true\") {\n return \"\"\n }\n return version ?? \"\"\n}\n\nfunction isVersionDefault(version: string | undefined) {\n return version === \"true\" || version === undefined\n}\n\n/// choose the default linux version based on ubuntu version\nfunction getDefaultLinuxVersion(osVersion: number[], toolLinuxVersions: Record) {\n const osVersionMaj = osVersion[0]\n\n // find which version block the os version is in\n const satisfyingVersion = Object.keys(toolLinuxVersions)\n .map((v) => Number.parseInt(v, 10))\n .sort((a, b) => b - a) // sort in descending order\n .find((v) => osVersionMaj >= v)\n\n return satisfyingVersion === undefined ? \"\" : toolLinuxVersions[satisfyingVersion]\n}\n\n/**\n * Sync the versions for the given inputs\n *\n * If the return is false, it means that versions don't match the target version\n */\nexport function syncVersions(opts: Opts, tools: Inputs[]): boolean {\n const toolsInUse = tools.filter((tool) => opts[tool] !== undefined)\n const toolsNonDefaultVersion = toolsInUse.filter((tool) => !isVersionDefault(opts[tool]))\n\n const targetVersion = toolsNonDefaultVersion.length >= 1 ? opts[toolsNonDefaultVersion[0]] : \"true\"\n\n if (toolsNonDefaultVersion.some((tool) => opts[tool] !== targetVersion)) {\n // error if any explicit versions don't match the target version\n return false\n }\n\n for (const tool of toolsInUse) {\n opts[tool] = targetVersion\n }\n\n return true\n}\n","import os from \"os\"\nimport { warning } from \"ci-log\"\nimport memoize from \"memoizee\"\nimport { installAptPack } from \"setup-apt\"\nimport { getUbuntuVersion } from \"ubuntu-version\"\nimport which from \"which\"\nimport { isUbuntu } from \"./isUbuntu.js\"\n\nasync function ubuntuVersion_(): Promise {\n try {\n if (isUbuntu()) {\n try {\n if (which.sync(\"lsb_release\", { nothrow: true }) === null) {\n await installAptPack([{ name: \"lsb-release\" }])\n }\n } catch {\n return detectUsingOsVersion()\n }\n\n const versionSplitted = await getUbuntuVersion()\n\n if (versionSplitted.length === 0) {\n return detectUsingOsVersion()\n }\n\n return versionSplitted\n } else {\n return null\n }\n } catch (err) {\n warning((err as Error).toString())\n return null\n }\n}\n\n/** Detect Ubuntu version */\nexport const ubuntuVersion = memoize(ubuntuVersion_, { promise: true })\n\n/** Detect Ubuntu version using os.version() for Ubuntu based distros */\nfunction detectUsingOsVersion() {\n if (!(\"version\" in os && typeof os.version === \"function\")) {\n return null\n }\n\n // #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2\n const osVersion: string = os.version()\n // parse the version\n const versionMatch = osVersion.match(/(\\d+)\\.(\\d+)\\.(\\d+)/)\n if (versionMatch === null) {\n return null\n }\n\n const majorVersion = Number.parseInt(versionMatch[1], 10)\n const minorVersion = Number.parseInt(versionMatch[2], 10)\n const patchVersion = Number.parseInt(versionMatch[3], 10)\n\n return [majorVersion, minorVersion, patchVersion]\n}\n","import { dirname, join } from \"path\"\nimport { info } from \"@actions/core\"\nimport { addPath } from \"envosman\"\nimport { execa, execaSync } from \"execa\"\nimport memoize from \"memoizee\"\nimport { mkdirp } from \"mkdirp\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { rcOptions } from \"../../cli-options.js\"\nimport { addPythonBaseExecPrefix, setupPython } from \"../../python/python.js\"\nimport { getVersion } from \"../../versions/versions.js\"\nimport { hasDnf } from \"../env/hasDnf.js\"\nimport { isArch } from \"../env/isArch.js\"\nimport { isUbuntu } from \"../env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../env/ubuntu_version.js\"\nimport type { InstallationInfo } from \"./setupBin.js\"\nimport { setupDnfPack } from \"./setupDnfPack.js\"\nimport { setupPacmanPack } from \"./setupPacmanPack.js\"\n\nexport type SetupPipPackOptions = {\n /** Whether to use pipx instead of pip */\n usePipx?: boolean\n /** Whether to install the package as a user */\n user?: boolean\n /** Whether to upgrade the package */\n upgrade?: boolean\n /** Whether the package is a library */\n isLibrary?: boolean\n}\n\n/** A function that installs a package using pip */\nexport async function setupPipPack(\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n return setupPipPackWithPython(await getPython(), name, version, options)\n}\n\nexport async function setupPipPackWithPython(\n givenPython: string,\n name: string,\n version?: string,\n options: SetupPipPackOptions = {},\n): Promise {\n const { usePipx = true, user = true, upgrade = false, isLibrary = false } = options\n\n const isPipx = usePipx && !isLibrary && (await hasPipx(givenPython))\n const pip = isPipx ? \"pipx\" : \"pip\"\n\n const hasPackage = await pipHasPackage(givenPython, name)\n if (hasPackage) {\n try {\n info(`Installing ${name} ${version ?? \"\"} via ${pip}`)\n\n const nameAndVersion = version !== undefined && version !== \"\" ? `${name}==${version}` : name\n const upgradeFlag = upgrade ? (isPipx ? [\"upgrade\"] : [\"install\", \"--upgrade\"]) : [\"install\"]\n const userFlag = !isPipx && user ? [\"--user\"] : []\n\n const env = process.env\n\n if (isPipx && user) {\n // install to user home\n env.PIPX_HOME = await getPipxHome()\n env.PIPX_BIN_DIR = await getPipxBinDir()\n }\n\n execaSync(givenPython, [\"-m\", pip, ...upgradeFlag, ...userFlag, nameAndVersion], {\n stdio: \"inherit\",\n env,\n })\n } catch (err) {\n info(`Failed to install ${name} via ${pip}: ${err}.`)\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} via ${pip}: ${err}.`)\n }\n }\n } else {\n if ((await setupPipPackSystem(name)) === null) {\n throw new Error(`Failed to install ${name} as it was not found via ${pip} or the system package manager`)\n }\n }\n\n const execPaths = await addPythonBaseExecPrefix(givenPython)\n const binDir = await findBinDir(execPaths, name)\n\n await addPath(binDir, rcOptions)\n\n return { binDir }\n}\n\nexport async function hasPipx(givenPython: string) {\n return (await execa(givenPython, [\"-m\", \"pipx\", \"--help\"], { stdio: \"ignore\", reject: false })).exitCode === 0\n}\n\nasync function getPipxHome_() {\n let pipxHome = process.env.PIPX_HOME\n if (pipxHome !== undefined) {\n return pipxHome\n }\n\n // Based on https://pipx.pypa.io/stable/installation/\n const compatHome = untildifyUser(\"~/.local/pipx\")\n if (await pathExists(compatHome)) {\n return compatHome\n }\n\n switch (process.platform) {\n case \"win32\": {\n pipxHome = untildifyUser(\"~/AppData/Local/pipx\")\n break\n }\n case \"darwin\": {\n pipxHome = untildifyUser(\"~/Library/Application Support/pipx\")\n break\n }\n default: {\n pipxHome = untildifyUser(\"~/.local/share/pipx\")\n break\n }\n }\n\n await mkdirp(pipxHome)\n await mkdirp(join(pipxHome, \"trash\"))\n await mkdirp(join(pipxHome, \"shared\"))\n await mkdirp(join(pipxHome, \"venv\"))\n return pipxHome\n}\nconst getPipxHome = memoize(getPipxHome_, { promise: true })\n\nasync function getPipxBinDir_() {\n if (process.env.PIPX_BIN_DIR !== undefined) {\n return process.env.PIPX_BIN_DIR\n }\n\n const pipxBinDir = untildifyUser(\"~/.local/bin\")\n await addPath(pipxBinDir, rcOptions)\n await mkdirp(pipxBinDir)\n return pipxBinDir\n}\nconst getPipxBinDir = memoize(getPipxBinDir_, { promise: true })\n\nasync function getPython_(): Promise {\n const pythonBin = (await setupPython(getVersion(\"python\", undefined, await ubuntuVersion()), \"\", process.arch)).bin\n if (pythonBin === undefined) {\n throw new Error(\"Python binary was not found\")\n }\n return pythonBin\n}\nconst getPython = memoize(getPython_, { promise: true })\n\nasync function pipHasPackage(python: string, name: string) {\n const result = await execa(python, [\"-m\", \"pip\", \"-qq\", \"index\", \"versions\", name], {\n stdio: \"ignore\",\n reject: false,\n })\n return result.exitCode === 0\n}\n\nasync function findBinDir(dirs: string[], name: string) {\n const exists = await Promise.all(dirs.map((dir) => pathExists(join(dir, addExeExt(name)))))\n const dirIndex = exists.findIndex((exist) => exist)\n if (dirIndex !== -1) {\n const foundDir = dirs[dirIndex]\n return foundDir\n }\n\n const whichDir = which.sync(addExeExt(name), { nothrow: true })\n if (whichDir !== null) {\n return dirname(whichDir)\n }\n\n return dirs[dirs.length - 1]\n}\n\nexport function setupPipPackSystem(name: string, addPythonPrefix = true) {\n if (process.platform === \"linux\") {\n info(`Installing ${name} via the system package manager`)\n if (isArch()) {\n return setupPacmanPack(addPythonPrefix ? `python-${name}` : name)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: addPythonPrefix ? `python3-${name}` : name }])\n }\n } else if (process.platform === \"darwin\") {\n return installBrewPack(name)\n }\n return null\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupGraphviz(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"graphviz\", version)\n return activateGraphviz()\n }\n case \"darwin\": {\n return installBrewPack(\"graphviz\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"graphviz\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"graphviz\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"graphviz\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateGraphviz(): Promise {\n switch (process.platform) {\n case \"win32\": {\n const binDir = \"C:/Program Files/Graphviz/bin\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { join } from \"path\"\n\nexport async function setupDmg(path: string, destDir: string) {\n const { ArchiveHdi } = await import(\"@shockpkg/archive-files/esm/archive/hdi.mjs\")\n\n const dmg = new ArchiveHdi(path)\n await dmg.read(async (entry) => {\n await entry.extract(join(destDir, entry.path))\n })\n}\n","import { join } from \"path\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { setupGraphviz } from \"../graphviz/graphviz.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nimport { pathExists } from \"path-exists\"\nimport retry from \"retry-as-promised\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { macosVersion } from \"../utils/env/macos_version.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { setupDmg } from \"../utils/setup/setupDmg.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n/** Get the platform data for cmake */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction getDoxygenPackageInfo(version: string, platform: NodeJS.Platform, _arch: string): PackageInfo {\n switch (platform) {\n case \"linux\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.linux.bin.tar.gz`,\n }\n }\n case \"win32\": {\n const folderName = `doxygen-${version}`\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n url: `https://www.doxygen.nl/files/${folderName}.windows.x64.bin.zip`,\n }\n }\n case \"darwin\": {\n const folderName = `Doxygen-${version}`\n return {\n binRelativeDir: \"Doxygen/Doxygen.app/Contents/Resources/\",\n binFileName: addExeExt(\"doxygen\"),\n extractedFolderName: folderName,\n extractFunction: setupDmg,\n url: `https://doxygen.nl/files/${folderName}.dmg`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupDoxygen(version: string, setupDir: string, arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // try to download the package 4 times with 2 seconds delay\n await retry(\n () => {\n return setupChocoPack(\"doxygen.install\", version)\n },\n { name: \"doxygen.install\", max: 4, backoffBase: 2000, report: (err) => info(err) },\n )\n const binDir = await activateWinDoxygen()\n const installationInfo = { binDir }\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n return installationInfo\n }\n case \"darwin\": {\n // let installationInfo: InstallationInfo\n // try {\n // installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n // } catch {\n const installationInfo = await installBrewPack(\"doxygen\", undefined)\n // }\n\n // only install graphviz if the macOS version is greater than 11\n if (macosVersion()[0] > 11) {\n await setupGraphviz(getVersion(\"graphviz\", undefined), \"\", arch)\n }\n return installationInfo\n }\n case \"linux\": {\n let installationInfo: InstallationInfo\n if (version === \"\" || isArch() || hasDnf()) {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"doxygen\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"doxygen\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([{ name: \"doxygen\", version }])\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n } else if (isUbuntu()) {\n try {\n // doxygen on stable Ubuntu repositories is very old. So, we use get the binary from the website itself\n installationInfo = await setupBin(\"doxygen\", version, getDoxygenPackageInfo, setupDir, arch)\n try {\n await installAptPack([{ name: \"libclang-cpp9\" }])\n } catch (err) {\n info(`Failed to download libclang-cpp9 that might be needed for running doxygen. ${err}`)\n }\n } catch (err) {\n notice(`Failed to download doxygen binary. ${err}. Falling back to apt-get.`)\n installationInfo = await installAptPack([{ name: \"doxygen\" }])\n }\n } else {\n throw new Error(\"Unsupported linux distributions\")\n }\n await setupGraphviz(getVersion(\"graphviz\", undefined, await ubuntuVersion()), \"\", arch)\n return installationInfo\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinDoxygen() {\n switch (process.platform) {\n case \"win32\": {\n for (\n const binDir of [\n \"C:/ProgramData/chocolatey/bin\",\n \"C:/Program Files/doxygen/bin\",\n \"C:/Program Files (x86)/doxygen\",\n ]\n ) {\n // eslint-disable-next-line no-await-in-loop\n if (await pathExists(join(binDir, \"doxygen.exe\"))) {\n // eslint-disable-next-line no-await-in-loop\n await addPath(binDir, rcOptions)\n return binDir\n }\n }\n throw new Error(\"Failed to find doxygen binary\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { getExecOutput } from \"@actions/exec\"\nimport { error } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupMacOSSDK() {\n if (process.platform === \"darwin\") {\n try {\n const xcrun = await getExecOutput(\"xcrun --sdk macosx --show-sdk-path\")\n const sdkroot = xcrun.stdout || xcrun.stderr\n if (sdkroot) {\n await addEnv(\"SDKROOT\", sdkroot.trim(), rcOptions)\n } else {\n error(\"SDKROOT not set\")\n }\n } catch (e) {\n error(e as Error | string)\n }\n }\n}\n","import { readFile } from \"fs/promises\"\n\n/**\n * The list of assets\n * @key tag The tag of the release\n * @value assets The names of the assets of the release\n */\nexport type Assets = Record\n\n/**\n * Load the list of assets from a json file\n */\nexport async function loadAssetList(path: string): Promise {\n const data = await readFile(path, \"utf-8\")\n return JSON.parse(data)\n}\n\ntype MatchAssetOpts = {\n version: string\n keywords?: string[]\n optionalKeywords?: string[]\n filterMapTag?: (tag: string) => string | undefined\n filterName?: (asset: string) => boolean\n}\n\n/**\n * Match the asset that matches the version and given keywords\n */\nexport function matchAsset(\n assets: Assets,\n opts: MatchAssetOpts,\n): { tag: string; name: string } | undefined {\n // get the list of versions\n const origTags = Object.keys(assets)\n\n // filter/map the tags\n const versionMap: Map = new Map()\n if (opts.filterMapTag === undefined) {\n for (const origTag of origTags) {\n versionMap.set(origTag, origTag)\n }\n } else {\n for (const origTag of origTags) {\n const mappedTag = opts.filterMapTag(origTag)\n if (mappedTag !== undefined) {\n versionMap.set(mappedTag, origTag)\n }\n }\n }\n\n if (versionMap.size === 0) {\n return undefined\n }\n\n // find the first tag that starts with the version\n // loop over the versions starting with the latest\n const candidateTags: string[] = []\n for (const [version, origTag] of versionMap.entries()) {\n if (version.startsWith(opts.version)) {\n candidateTags.push(origTag)\n }\n }\n\n if (candidateTags.length === 0) {\n return undefined\n }\n\n // Loop over the candidate tags and return the first one that has assets\n for (const candidateTag of candidateTags) {\n // get the list of assets\n let assetNames = assets[candidateTag]\n if (assetNames === undefined) {\n continue\n }\n\n // filter the assets\n if (opts.filterName !== undefined) {\n assetNames = assetNames.filter(opts.filterName)\n }\n\n if (assetNames.length === 0) {\n continue\n }\n\n // check if this version contains the keywords and optional keywords in the asset name\n const match = matchAssetName(candidateTag, assetNames, opts)\n if (match !== undefined) {\n return match\n }\n }\n\n return undefined\n}\n\nfunction matchAssetName(tag: string, assetNames: string[], opts: MatchAssetOpts) {\n // if no keywords are given, return the first asset\n if (\n (opts.keywords === undefined\n || opts.keywords.length === 0)\n && (opts.optionalKeywords === undefined\n || opts.optionalKeywords.length === 0)\n ) {\n return { tag, name: assetNames[0] }\n }\n\n // check if the asset contains all the keywords\n let candidates: string[] = []\n if (\n opts.keywords !== undefined\n && opts.keywords.length !== 0\n ) {\n for (const name of assetNames) {\n if (opts.keywords!.every((keyword) => name.includes(keyword))) {\n candidates.push(name)\n }\n }\n } else {\n candidates = assetNames\n }\n\n if (candidates.length === 0) {\n return undefined\n }\n\n // prefer the candidates that contain more optional keywords\n if (\n opts.optionalKeywords !== undefined\n && opts.optionalKeywords.length !== 0\n ) {\n // rate the candidates based on the number of optional keywords they contain\n const candidateScores = candidates.map((name) => {\n let score = 0\n for (const keyword of opts.optionalKeywords!) {\n if (name.includes(keyword)) {\n score++\n }\n }\n return score\n })\n\n // find the candidate with the highest score\n const maxScore = Math.max(...candidateScores)\n const maxIndex = candidateScores.indexOf(maxScore)\n return { tag, name: candidates[maxIndex] }\n }\n\n // return the first candidate if no optional keywords are given\n return { tag, name: candidates[0] }\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { addEnv, addPath } from \"envosman\"\nimport { type ExecaReturnValue, execa } from \"execa\"\nimport { readdir } from \"fs/promises\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport semverCoerce from \"semver/functions/coerce\"\nimport semverMajor from \"semver/functions/major\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { extract7Zip } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { compareVersion } from \"../utils/setup/version.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nasync function getGccPackageInfo(version: string, platform: NodeJS.Platform, arch: string): Promise {\n switch (platform) {\n case \"win32\": {\n const mingwAssets = await loadAssetList(\n join(dirname, \"github_brechtsanders_winlibs_mingw.json\"),\n )\n\n const mingwArchMap = {\n x64: \"x86_64\",\n ia32: \"i386\",\n } as Record\n\n const asset = matchAsset(\n mingwAssets,\n {\n version,\n keywords: [\n mingwArchMap[arch] ?? arch,\n ],\n },\n )\n\n if (asset === undefined) {\n throw new Error(`No asset found for version ${version} and arch ${arch}`)\n }\n\n return {\n binRelativeDir: \"bin/\",\n binFileName: addExeExt(\"g++\"),\n extractedFolderName: \"mingw64\",\n extractFunction: extract7Zip,\n url: `https://github.com/brechtsanders/winlibs_mingw/releases/download/${asset.tag}/${asset.name}`,\n }\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\nexport async function setupGcc(version: string, setupDir: string, arch: string, priority: number = 40) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\": {\n if (arch === \"arm\" || arch === \"arm64\") {\n await setupChocoPack(\"gcc-arm-embedded\", version)\n }\n try {\n installationInfo = await setupBin(\"g++\", version, getGccPackageInfo, setupDir, arch)\n } catch (err) {\n info(`Failed to download g++ binary. ${err}. Falling back to chocolatey.`)\n installationInfo = await setupChocoMingw(version, arch)\n }\n break\n }\n case \"darwin\": {\n installationInfo = await installBrewPack(\"gcc\", version)\n break\n }\n case \"linux\": {\n if (arch === \"x64\") {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([\n { name: \"gcc\", version },\n { name: \"gcc-c++\", version },\n { name: \"libstdc++-devel\" },\n ])\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc\" }, { name: \"g++\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([\n {\n name: \"gcc\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n {\n name: \"g++\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n }\n } else {\n info(`Install g++-multilib because gcc for ${arch} was requested`)\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"gcc-multilib\", version)\n } else if (isUbuntu()) {\n if (version === \"\") {\n // the default version\n installationInfo = await installAptPack([{ name: \"gcc-multilib\" }])\n } else {\n // add the PPA for access to more versions\n installationInfo = await installAptPack([{\n name: \"gcc-multilib\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n }])\n }\n }\n }\n break\n }\n // TODO support bare-metal (need to support passing it as the input)\n // TODO support abi\n // case \"none\": {\n // if (arch === \"arm\" || arch === \"arm64\") {\n // return installAptPack(\"gcc-arm-none-eabi\", version, [\n // \"ppa:ubuntu-toolchain-r/test\",\n // ])\n // } else {\n // throw new Error(`Unsupported platform for ${arch}`)\n // }\n // }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n await activateGcc(version, installationInfo.binDir, priority)\n return installationInfo\n }\n return undefined\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMingw(version: string, setupDir: string, arch: string) {\n let installationInfo: InstallationInfo | undefined\n switch (process.platform) {\n case \"win32\":\n case \"darwin\": {\n return setupGcc(version, setupDir, arch)\n }\n case \"linux\": {\n if (isArch()) {\n installationInfo = await setupPacmanPack(\"mingw-w64-gcc\", version)\n } else if (hasDnf()) {\n installationInfo = await setupDnfPack([{ name: \"mingw64-gcc\", version }])\n } else if (isUbuntu()) {\n installationInfo = await installAptPack([\n {\n name: \"mingw-w64\",\n version,\n repository: \"ppa:ubuntu-toolchain-r/test\",\n key: { key: \"1E9377A2BA9EF27F\", fileName: \"ubuntu-toolchain-r-test.gpg\" },\n },\n ])\n }\n break\n }\n default: {\n throw new Error(`Unsupported platform for ${arch}`)\n }\n }\n if (installationInfo !== undefined) {\n // TODO: setup alternatives and update CC/CXX env. ?\n // Setting up g++-mingw-w64-i686-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode\n // Setting up g++-mingw-w64-x86-64-win32 (10.3.0-14ubuntu1+24.3) ...\n // update-alternatives: using /usr/bin/x86_64-w64-mingw32-g++-win32 to provide /usr/bin/x86_64-w64-mingw32-g++ (x86_64-w64-mingw32-g++) in auto mode\n // await activateGcc(version, installationInfo.binDir)\n return installationInfo\n }\n return undefined\n}\n\nasync function setupChocoMingw(version: string, arch: string): Promise {\n await setupChocoPack(\"mingw\", version)\n let binDir: string | undefined\n if (arch === \"x64\" && (await pathExists(\"C:/tools/mingw64/bin\"))) {\n binDir = \"C:/tools/mingw64/bin\"\n await addPath(binDir, rcOptions)\n } else if (arch === \"ia32\" && (await pathExists(\"C:/tools/mingw32/bin\"))) {\n binDir = \"C:/tools/mingw32/bin\"\n await addPath(binDir, rcOptions)\n } else if (await pathExists(`${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin/g++.exe`)) {\n binDir = `${process.env.ChocolateyInstall ?? \"C:/ProgramData/chocolatey\"}/bin`\n }\n if (binDir !== undefined) {\n return { binDir }\n }\n return undefined\n}\n\nasync function activateGcc(givenVersion: string, binDir: string, priority: number = 40) {\n const promises: Promise>[] = []\n // Setup gcc as the compiler\n\n // TODO\n // const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n // const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n // promises.push(\n // addEnv(\"LD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${ld}`, rcOptions),\n // addEnv(\"DYLD_LIBRARY_PATH\", `${installDir}/lib${path.delimiter}${dyld}`, rcOptions),\n // addEnv(\"CPATH\", `${installDir}/lib/gcc/${majorVersion}/include`, rcOptions),\n // addEnv(\"LDFLAGS\", `-L${installDir}/lib`, rcOptions),\n // addEnv(\"CPPFLAGS\", `-I${installDir}/include`, rcOptions),\n // )\n\n if (process.platform === \"win32\") {\n promises.push(\n addEnv(\"CC\", addExeExt(`${binDir}/gcc`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${binDir}/g++`), rcOptions),\n )\n } else {\n // if version is empty, get the version from the gcc command\n let version = givenVersion\n if (givenVersion === \"\") {\n version = await getGccCmdVersion(binDir, version)\n info(`Using gcc version ${version}`)\n }\n\n const majorVersion = semverMajor(semverCoerce(version) ?? version)\n if (majorVersion >= 5) {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${majorVersion}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${majorVersion}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${majorVersion}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${majorVersion}`, rcOptions, priority),\n )\n }\n } else {\n promises.push(\n addEnv(\"CC\", `${binDir}/gcc-${version}`, rcOptions),\n addEnv(\"CXX\", `${binDir}/g++-${version}`, rcOptions),\n )\n\n if (isUbuntu()) {\n promises.push(\n addUpdateAlternativesToRc(\"cc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${binDir}/g++-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"gcc\", `${binDir}/gcc-${version}`, rcOptions, priority),\n addUpdateAlternativesToRc(\"g++\", `${binDir}/g++-${version}`, rcOptions, priority),\n )\n }\n }\n }\n\n promises.push(setupMacOSSDK())\n\n if (GITHUB_ACTIONS) {\n await addGccLoggingMatcher()\n }\n\n await Promise.all(promises)\n}\n\nasync function getGccCmdVersion(binDir: string, givenVersion: string) {\n // TODO get the version from the package manager\n try {\n let gccExe = \"gcc\"\n if (await pathExists(`${binDir}/gcc`)) {\n gccExe = `${binDir}/gcc`\n } else {\n // try to find the gcc exe in the bin dir\n const files = (await readdir(binDir)).sort(\n (exe1, exe2) => {\n const version1 = exe1.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n const version2 = exe2.match(/^gcc-?(.*)(\\.exe)?$/)?.[1] ?? \"\"\n return compareVersion(version1, version2)\n },\n )\n for (const file of files) {\n if (file.startsWith(\"gcc\")) {\n gccExe = `${binDir}/${file}`\n break\n }\n }\n }\n\n const { stdout: versionStdout } = await execa(gccExe, [\"--version\"], { stdio: \"pipe\" })\n\n // gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0\n // gcc-12 (Homebrew GCC 12.4.0) 12.4.0\n // gcc (Ubuntu 13.1.0-8ubuntu1~22.04) 13.1.0\n\n const versionMatch = (versionStdout as string).match(/gcc.* \\(.*\\) ([\\d.]+)/)\n\n if (versionMatch !== null) {\n return versionMatch[1]\n }\n\n warning(`Failed to parse gcc version from: ${versionStdout}`)\n return givenVersion\n } catch (err) {\n error(`Failed to get gcc version: ${err}`)\n return givenVersion\n }\n}\n\nasync function addGccLoggingMatcher() {\n const matcherPath = join(dirname, \"gcc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the gcc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addEnv } from \"envosman\"\nimport semverMajor from \"semver/functions/major\"\nimport semverValid from \"semver/functions/valid\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupGcovr(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"gcovr\", version)\n}\n\nexport function activateGcovLLVM() {\n return addEnv(\"GCOV\", \"llvm-cov gcov\", rcOptions)\n}\n\nexport function activateGcovGCC(gccVersion: string) {\n const gccSemver = semverValid(gccVersion)\n const gccMajor = gccSemver !== null ? semverMajor(gccSemver) : gccVersion\n const gcov = gccMajor !== \"\" ? `gcov-${gccMajor}` : \"gcov\"\n\n return addEnv(\"GCOV\", gcov, rcOptions)\n}\n","import { addExeExt } from \"patha\"\nimport { arm64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name Ninja uses in their download links */\nfunction getNinjaPlatformArch(platform: NodeJS.Platform, arch: string) {\n switch (platform) {\n case \"win32\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"win\"\n : arm64.includes(arch)\n ? \"winarm64\"\n : \"win\"\n case \"darwin\":\n return \"mac\"\n case \"linux\":\n return x86_64.includes(arch)\n || x86.includes(arch)\n ? \"linux\"\n : arm64.includes(arch)\n ? \"linux-aarch64\"\n : \"linux\"\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n/** Get the platform data for ninja */\nfunction getNinjaPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const ninjaPlatform = getNinjaPlatformArch(platform, arch)\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"ninja\"),\n extractedFolderName: \"\",\n url: `https://github.com/ninja-build/ninja/releases/download/v${version}/ninja-${ninjaPlatform}.zip`,\n }\n}\n\nexport function setupNinja(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"ninja\", version, getNinjaPackageInfo, setupDir, arch)\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { execa } from \"execa\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { untildifyUser } from \"untildify-user\"\nimport which from \"which\"\nimport { setupCmake } from \"../cmake/cmake.js\"\nimport { setupNinja } from \"../ninja/ninja.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractTarByExe } from \"../utils/setup/extract.js\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { addVPrefix, removeVPrefix } from \"../utils/setup/version.js\"\nimport { getVersion } from \"../versions/versions.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nfunction getDownloadKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/releases/download/${version}/kcov-amd64.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"usr/local/bin\",\n binFileName: addExeExt(\"kcov\"),\n }\n}\n\nfunction getBuildKcovPackageInfo(version: string): PackageInfo {\n return {\n url: `https://github.com/SimonKagstrom/kcov/archive/refs/tags/${version}.tar.gz`,\n extractedFolderName: \"\",\n binRelativeDir: \"build/src\",\n binFileName: addExeExt(\"kcov\"),\n extractFunction: buildKcov,\n }\n}\n\nasync function buildKcov(file: string, dest: string) {\n const out = await extractTarByExe(file, dest, 1)\n\n // build after extraction using CMake\n const cmake = await getCmake()\n\n if (process.platform === \"linux\") {\n if (isArch()) {\n await Promise.all([setupPacmanPack(\"libdwarf\"), setupPacmanPack(\"libcurl-openssl\")])\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"libdwarf-devel\" }, { name: \"libcurl-devel\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libdw-dev\" }, { name: \"libcurl4-openssl-dev\" }])\n }\n }\n\n // apply gcc13.patch\n try {\n if (which.sync(\"patch\", { nothrow: true }) !== null) {\n const patch = join(dirname, \"gcc13.patch\")\n await execa(\"patch\", [\"-N\", \"-p1\", \"-i\", patch], { cwd: out, stdio: \"inherit\" })\n } else {\n info(\"`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13\")\n }\n } catch {\n // ignore\n }\n\n const buildDir = join(out, \"build\")\n await execa(cmake, [\"-S\", out, \"-B\", buildDir, \"-DCMAKE_BUILD_TYPE=Release\", \"-G\", \"Ninja\"], {\n cwd: out,\n stdio: \"inherit\",\n })\n await execa(cmake, [\"--build\", buildDir, \"--config\", \"Release\"], { cwd: out, stdio: \"inherit\" })\n // execRootSync(cmake, [\"--install\", buildDir], out)\n // return \"user/local/bin\" // the cmake install prefix\n return out\n}\n\nasync function getCmake() {\n let cmake = which.sync(\"cmake\", { nothrow: true })\n if (cmake === null) {\n const { binDir } = await setupCmake(\n getVersion(\"cmake\", undefined, await ubuntuVersion()),\n join(untildifyUser(\"~\"), \"cmake\"),\n \"\",\n )\n cmake = join(binDir, \"cmake\")\n }\n const ninja = which.sync(\"ninja\", { nothrow: true })\n if (ninja === null) {\n await setupNinja(getVersion(\"ninja\", undefined, await ubuntuVersion()), join(untildifyUser(\"~\"), \"ninja\"), \"\")\n }\n return cmake\n}\n\nexport async function setupKcov(versionGiven: string, setupDir: string, arch: string) {\n if (process.platform !== \"linux\") {\n info(\"Kcov is not supported on non-linux\")\n return\n }\n\n // parse version\n const versionSplit = versionGiven.split(\"-\")\n let version = addVPrefix(versionSplit[0])\n const installMethod = versionSplit[1] as \"binary\" | undefined\n const version_number = removeVPrefix(version)\n // fix inconsistency in tagging\n if (version_number === 38) {\n version = \"v38\"\n }\n\n let installationInfo: InstallationInfo\n if (installMethod === \"binary\" && version_number >= 39) {\n installationInfo = await setupBin(\"kcov\", version, getDownloadKcovPackageInfo, setupDir, arch)\n if (isArch()) {\n await setupPacmanPack(\"binutils\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"binutils\" }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"libbinutils\" }])\n }\n return installationInfo\n } else {\n installationInfo = await setupBin(\"kcov\", version, getBuildKcovPackageInfo, setupDir, arch)\n }\n return installationInfo\n}\n","import { error } from \"console\"\nimport { notice } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\n\nexport async function setupAppleClang() {\n if (process.platform !== \"darwin\") {\n return\n }\n\n if (await which(\"clang\", { nothrow: true }) !== null && await which(\"clang++\", { nothrow: true }) !== null) {\n notice(\"Assuming clang is an Apple Clang compiler\")\n await Promise.all([addEnv(\"CC\", \"clang\", rcOptions), addEnv(\"CXX\", \"clang++\", rcOptions)])\n }\n\n // TODO install Apple Clang automatically\n error(\"Apple Clang automatic installation is not supported yet\")\n}\n","const core = require('@actions/core')\nconst child_process = require('child_process')\nconst fs = require('fs')\nconst path = require('path')\nconst process = require('process')\n\nconst PROGRAM_FILES_X86 = process.env['ProgramFiles(x86)']\nconst PROGRAM_FILES = [process.env['ProgramFiles(x86)'], process.env['ProgramFiles']]\n\n\nconst EDITIONS = ['Enterprise', 'Professional', 'Community', 'BuildTools']\nconst YEARS = ['2022', '2019', '2017']\n\nconst VsYearVersion = {\n '2022': '17.0',\n '2019': '16.0',\n '2017': '15.0',\n '2015': '14.0',\n '2013': '12.0',\n}\n\n/**\n * Convert the vs version (e.g. 2022) or year (e.g. 17.0) to the version number (e.g. 17.0)\n * @param {string | undefined} vsversion the year (e.g. 2022) or version number (e.g. 17.0)\n * @returns {string | undefined} the version number (e.g. 17.0)\n */\nfunction vsversion_to_versionnumber(vsversion) {\n if (Object.values(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n if (vsversion in VsYearVersion) {\n return VsYearVersion[vsversion]\n }\n }\n return vsversion\n}\nexports.vsversion_to_versionnumber = vsversion_to_versionnumber\n\n/**\n * Convert the vs version (e.g. 17.0) or year (e.g. 2022) to the year (e.g. 2022)\n * @param {string} vsversion the version number (e.g. 17.0) or year (e.g. 2022)\n * @returns {string} the year (e.g. 2022)\n */\nfunction vsversion_to_year(vsversion) {\n if (Object.keys(VsYearVersion).includes(vsversion)) {\n return vsversion\n } else {\n for (const [year, ver] of Object.entries(VsYearVersion)) {\n if (ver === vsversion) {\n return year\n }\n }\n }\n return vsversion\n}\nexports.vsversion_to_year = vsversion_to_year\n\nconst VSWHERE_PATH = `${PROGRAM_FILES_X86}\\\\Microsoft Visual Studio\\\\Installer`\n\n/**\n * Find MSVC tools with vswhere\n * @param {string} pattern the pattern to search for\n * @param {string} version_pattern the version pattern to search for\n * @returns {string | null} the path to the found MSVC tools\n */\nfunction findWithVswhere(pattern, version_pattern) {\n try {\n let installationPath = child_process.execSync(`vswhere -products * ${version_pattern} -prerelease -property installationPath`).toString().trim()\n return installationPath + '\\\\' + pattern\n } catch (e) {\n core.warning(`vswhere failed: ${e}`)\n }\n return null\n}\nexports.findWithVswhere = findWithVswhere\n\n/**\n * Find the vcvarsall.bat file for the given Visual Studio version\n * @param {string | undefined} vsversion the version of Visual Studio to find (year or version number)\n * @returns {string} the path to the vcvarsall.bat file\n */\nfunction findVcvarsall(vsversion) {\n const vsversion_number = vsversion_to_versionnumber(vsversion)\n let version_pattern\n if (vsversion_number) {\n const upper_bound = vsversion_number.split('.')[0] + '.9'\n version_pattern = `-version \"${vsversion_number},${upper_bound}\"`\n } else {\n version_pattern = \"-latest\"\n }\n\n // If vswhere is available, ask it about the location of the latest Visual Studio.\n let path = findWithVswhere('VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat', version_pattern)\n if (path && fs.existsSync(path)) {\n core.info(`Found with vswhere: ${path}`)\n return path\n }\n core.info(\"Not found with vswhere\")\n\n // If that does not work, try the standard installation locations,\n // starting with the latest and moving to the oldest.\n const years = vsversion ? [vsversion_to_year(vsversion)] : YEARS\n for (const prog_files of PROGRAM_FILES) {\n for (const ver of years) {\n for (const ed of EDITIONS) {\n path = `${prog_files}\\\\Microsoft Visual Studio\\\\${ver}\\\\${ed}\\\\VC\\\\Auxiliary\\\\Build\\\\vcvarsall.bat`\n core.info(`Trying standard location: ${path}`)\n if (fs.existsSync(path)) {\n core.info(`Found standard location: ${path}`)\n return path\n }\n }\n }\n }\n core.info(\"Not found in standard locations\")\n\n // Special case for Visual Studio 2015 (and maybe earlier), try it out too.\n path = `${PROGRAM_FILES_X86}\\\\Microsoft Visual C++ Build Tools\\\\vcbuildtools.bat`\n if (fs.existsSync(path)) {\n core.info(`Found VS 2015: ${path}`)\n return path\n }\n core.info(`Not found in VS 2015 location: ${path}`)\n\n throw new Error('Microsoft Visual Studio not found')\n}\nexports.findVcvarsall = findVcvarsall\n\nfunction isPathVariable(name) {\n const pathLikeVariables = ['PATH', 'INCLUDE', 'LIB', 'LIBPATH']\n return pathLikeVariables.indexOf(name.toUpperCase()) != -1\n}\n\nfunction filterPathValue(path) {\n let paths = path.split(';')\n // Remove duplicates by keeping the first occurance and preserving order.\n // This keeps path shadowing working as intended.\n function unique(value, index, self) {\n return self.indexOf(value) === index\n }\n return paths.filter(unique).join(';')\n}\n\n/**\n * Setup MSVC Developer Command Prompt\n * @param {string} arch - Target architecture\n * @param {string | undefined} sdk - Windows SDK number to build for\n * @param {string | undefined} toolset - VC++ compiler toolset version\n * @param {boolean | 'true' | 'false' | undefined} uwp - Build for Universal Windows Platform\n * @param {boolean | 'true' | 'false' | undefined} spectre - Enable Spectre mitigations\n * @param {string | undefined} vsversion - The Visual Studio version to use. This can be the version number (e.g. 16.0 for 2019) or the year (e.g. \"2019\").\n */\nfunction setupMSVCDevCmd(arch, sdk, toolset, uwp, spectre, vsversion) {\n if (process.platform != 'win32') {\n core.info('This is not a Windows virtual environment, bye!')\n return\n }\n\n // Add standard location of \"vswhere\" to PATH, in case it's not there.\n process.env.PATH += path.delimiter + VSWHERE_PATH\n\n // There are all sorts of way the architectures are called. In addition to\n // values supported by Microsoft Visual C++, recognize some common aliases.\n let arch_aliases = {\n \"win32\": \"x86\",\n \"win64\": \"x64\",\n \"x86_64\": \"x64\",\n \"x86-64\": \"x64\",\n }\n // Ignore case when matching as that's what humans expect.\n if (arch.toLowerCase() in arch_aliases) {\n arch = arch_aliases[arch.toLowerCase()]\n }\n\n // Due to the way Microsoft Visual C++ is configured, we have to resort to the following hack:\n // Call the configuration batch file and then output *all* the environment variables.\n\n var args = [arch]\n\n if (uwp && JSON.parse(uwp) === true) {\n args.push('uwp')\n }\n if (sdk) {\n args.push(sdk)\n }\n if (toolset) {\n args.push(`-vcvars_ver=${toolset}`)\n }\n if (spectre && JSON.parse(spectre) === true) {\n args.push('-vcvars_spectre_libs=spectre')\n }\n\n const vcvars = `\"${findVcvarsall(vsversion)}\" ${args.join(' ')}`\n core.debug(`vcvars command-line: ${vcvars}`)\n\n const cmd_output_string = child_process.execSync(`set && cls && ${vcvars} && cls && set`, {shell: \"cmd\"}).toString()\n const cmd_output_parts = cmd_output_string.split('\\f')\n\n const old_environment = cmd_output_parts[0].split('\\r\\n')\n const vcvars_output = cmd_output_parts[1].split('\\r\\n')\n const new_environment = cmd_output_parts[2].split('\\r\\n')\n\n // If vsvars.bat is given an incorrect command line, it will print out\n // an error and *still* exit successfully. Parse out errors from output\n // which don't look like environment variables, and fail if appropriate.\n const error_messages = vcvars_output.filter((line) => {\n if (line.match(/^\\[ERROR.*\\]/)) {\n // Don't print this particular line which will be confusing in output.\n if (!line.match(/Error in script usage. The correct usage is:$/)) {\n return true\n }\n }\n return false\n })\n if (error_messages.length > 0) {\n throw new Error('invalid parameters' + '\\r\\n' + error_messages.join('\\r\\n'))\n }\n\n // Convert old environment lines into a dictionary for easier lookup.\n let old_env_vars = {}\n for (let string of old_environment) {\n const [name, value] = string.split('=')\n old_env_vars[name] = value\n }\n\n // Now look at the new environment and export everything that changed.\n // These are the variables set by vsvars.bat. Also export everything\n // that was not there during the first sweep: those are new variables.\n core.startGroup('Environment variables')\n for (let string of new_environment) {\n // vsvars.bat likes to print some fluff at the beginning.\n // Skip lines that don't look like environment variables.\n if (!string.includes('=')) {\n continue;\n }\n let [name, new_value] = string.split('=')\n let old_value = old_env_vars[name]\n // For new variables \"old_value === undefined\".\n if (new_value !== old_value) {\n core.info(`Setting ${name}`)\n // Special case for a bunch of PATH-like variables: vcvarsall.bat\n // just prepends its stuff without checking if its already there.\n // This makes repeated invocations of this action fail after some\n // point, when the environment variable overflows. Avoid that.\n if (isPathVariable(name)) {\n new_value = filterPathValue(new_value)\n }\n core.exportVariable(name, new_value)\n }\n }\n core.endGroup()\n\n core.info(`Configured Developer Command Prompt`)\n}\nexports.setupMSVCDevCmd = setupMSVCDevCmd\n","// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { info } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport { setupMSVCDevCmd } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { rcOptions } from \"../cli-options.js\"\n\nfunction getArch(arch: string): string {\n switch (arch) {\n case \"x32\":\n case \"32\":\n case \"ia32\": {\n return \"x86\"\n }\n case \"64\": {\n return \"x64\"\n }\n default: {\n return arch\n }\n }\n}\n\nexport async function setupVCVarsall(\n vsversion: string,\n VCTargetsPath: string | undefined,\n arch: string,\n toolset: string | undefined,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (VCTargetsPath !== undefined && (await pathExists(VCTargetsPath))) {\n info(`Adding ${VCTargetsPath} to PATH`)\n await addEnv(\"VCTargetsPath\", VCTargetsPath, rcOptions)\n }\n\n await setupMSVCDevCmd(getArch(arch), sdk, toolset, uwp, spectre, vsversion)\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error } from \"ci-log\"\nimport pTimeout from \"p-timeout\"\nimport { setupBrew } from \"setup-brew\"\nimport { getSuccessMessage, rcOptions } from \"./cli-options.js\"\nimport { type ToolName, llvmTools, setups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\nexport const DEFAULT_TIMEOUT = 20 * 60 * 1000 // 20 minutes\n\nexport async function installTool(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n errorMessages: string[],\n timeout: number = DEFAULT_TIMEOUT,\n) {\n startGroup(`Installing ${tool} ${version}`)\n try {\n await pTimeout(installToolImpl(tool, version, osVersion, arch, setupCppDir, successMessages), {\n milliseconds: timeout,\n message: `Timeout while installing ${tool} ${version}. You can increase the timeout from options`,\n })\n } catch (e) {\n // push error message to the logger\n error(e as string | Error)\n if (e instanceof Error && e.stack !== undefined) {\n error(e.stack)\n }\n errorMessages.push(`${tool} failed to install`)\n }\n endGroup()\n}\n\nasync function installToolImpl(\n tool: ToolName,\n version: string,\n osVersion: number[] | null,\n arch: string,\n setupCppDir: string,\n successMessages: string[],\n) {\n const hasLLVM = llvmTools.includes(tool)\n\n let installationInfo: InstallationInfo | undefined | void\n if (tool === \"vcvarsall\") {\n // eslint-disable-next-line no-await-in-loop\n await setupVCVarsall(getVersion(tool, version, osVersion), undefined, arch, undefined, undefined, false, false)\n } else if (tool === \"brew\") {\n // eslint-disable no-await-in-loop\n installationInfo = await setupBrew({ rcOptions })\n } else {\n // the tool installation directory (for the functions that ue it)\n const setupDir = join(setupCppDir, hasLLVM ? \"llvm\" : tool)\n\n const setupVersion = getVersion(tool, version, osVersion)\n\n // get the setup function\n const setupFunction = setups[tool]\n\n // eslint-disable no-await-in-loop\n installationInfo = await setupFunction(setupVersion, setupDir, arch)\n }\n // preparing a report string\n successMessages.push(getSuccessMessage(tool, installationInfo))\n}\n","export class TimeoutError extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = 'TimeoutError';\n\t}\n}\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new AbortError(errorMessage)\n\t: new DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined\n\t\t? getDOMException('This operation was aborted.')\n\t\t: signal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nexport default function pTimeout(promise, options) {\n\tconst {\n\t\tmilliseconds,\n\t\tfallback,\n\t\tmessage,\n\t\tcustomTimers = {setTimeout, clearTimeout},\n\t} = options;\n\n\tlet timer;\n\n\tconst wrappedPromise = new Promise((resolve, reject) => {\n\t\tif (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) {\n\t\t\tthrow new TypeError(`Expected \\`milliseconds\\` to be a positive number, got \\`${milliseconds}\\``);\n\t\t}\n\n\t\tif (options.signal) {\n\t\t\tconst {signal} = options;\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\tif (milliseconds === Number.POSITIVE_INFINITY) {\n\t\t\tpromise.then(resolve, reject);\n\t\t\treturn;\n\t\t}\n\n\t\t// We create the error outside of `setTimeout` to preserve the stack trace.\n\t\tconst timeoutError = new TimeoutError();\n\n\t\ttimer = customTimers.setTimeout.call(undefined, () => {\n\t\t\tif (fallback) {\n\t\t\t\ttry {\n\t\t\t\t\tresolve(fallback());\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (typeof promise.cancel === 'function') {\n\t\t\t\tpromise.cancel();\n\t\t\t}\n\n\t\t\tif (message === false) {\n\t\t\t\tresolve();\n\t\t\t} else if (message instanceof Error) {\n\t\t\t\treject(message);\n\t\t\t} else {\n\t\t\t\ttimeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`;\n\t\t\t\treject(timeoutError);\n\t\t\t}\n\t\t}, milliseconds);\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tresolve(await promise);\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t})();\n\t});\n\n\tconst cancelablePromise = wrappedPromise.finally(() => {\n\t\tcancelablePromise.clear();\n\t});\n\n\tcancelablePromise.clear = () => {\n\t\tcustomTimers.clearTimeout.call(undefined, timer);\n\t\ttimer = undefined;\n\t};\n\n\treturn cancelablePromise;\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { info } from \"ci-log\"\nimport { addExeExt } from \"patha\"\nimport { loadAssetList, matchAsset } from \"../utils/asset/load-assets.js\"\nimport { arm64, armv7, powerpc64le, sparc64, x86, x86_64 } from \"../utils/env/arch.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { extractExe, extractTarByExe } from \"../utils/setup/extract.js\"\nimport type { PackageInfo } from \"../utils/setup/setupBin.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function getLLVMPackageInfo(\n version: string,\n platform: NodeJS.Platform,\n arch: string,\n): Promise {\n const url = await getLLVMAssetURL(platform, arch, version)\n info(`Downloading LLVM from ${url}`)\n\n return {\n url,\n extractedFolderName: \"\",\n binRelativeDir: \"bin\",\n binFileName: addExeExt(\"clang\"),\n extractFunction: platform === \"win32\"\n ? extractExe\n : (file: string, dest: string) => {\n return extractTarByExe(file, dest, 1)\n },\n }\n}\n\nexport async function getLLVMAssetURL(platform: string, arch: string, version: string) {\n const { keywords, optionalKeywords } = await getAssetKeywords(platform, arch)\n\n // first check the github releases\n const llvmGitHubAssets = await loadAssetList(\n join(dirname, \"github_llvm_llvm-project.json\"),\n )\n const ghAsset = matchAsset(\n llvmGitHubAssets,\n {\n version,\n keywords,\n optionalKeywords,\n filterMapTag(tag) {\n return tag.replace(/^llvmorg-/, \"\")\n },\n },\n )\n\n if (ghAsset !== undefined) {\n return `https://github.com/llvm/llvm-project/releases/download/${ghAsset.tag}/${ghAsset.name}`\n }\n\n // check the llvm website\n const llvmWebsiteAssets = await loadAssetList(\n join(dirname, \"llvm_org_releases.json\"),\n )\n\n const websiteAsset = matchAsset(\n llvmWebsiteAssets,\n {\n version,\n keywords,\n optionalKeywords,\n },\n )\n\n if (websiteAsset !== undefined) {\n return `https://llvm.org/releases/${websiteAsset.tag}/${websiteAsset.name}`\n }\n\n throw new Error(`No asset found for version ${version} matching ${keywords} and ${optionalKeywords}`)\n}\n\nasync function getAssetKeywords(platform: string, arch: string) {\n const keywords: string[] = []\n const optionalKeywords: string[] = []\n\n switch (platform) {\n case \"win32\": {\n if (x86_64.includes(arch)) {\n keywords.push(\"win64\")\n // TODO fallback to win32 if win64 is not available (e.g. for LLVM 3.6.2 and older)\n } else if (x86.includes(arch)) {\n keywords.push(\"win32\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"woa64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"linux\": {\n keywords.push(\"linux\")\n\n if (isUbuntu()) {\n optionalKeywords.push(\"ubuntu\")\n\n const ubuntuVer = await ubuntuVersion()\n if (ubuntuVer !== null) {\n optionalKeywords.push(`${ubuntuVer[0]}`)\n const ubuntuMin = ubuntuVer[1] < 10 ? `0${ubuntuVer[1]}` : `${ubuntuVer[1]}`\n\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}`)\n optionalKeywords.push(`${ubuntuVer[0]}.${ubuntuMin}.${ubuntuVer[2]}`)\n }\n } else if (hasDnf()) {\n optionalKeywords.push(\"rhel\")\n }\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"x86\")\n } else if (arm64.includes(arch)) {\n keywords.push(\"aarch64\")\n } else if (armv7.includes(arch)) {\n keywords.push(\"armv7a\")\n } else if (powerpc64le.includes(arch)) {\n keywords.push(\"powerpc64le\")\n } else if (sparc64.includes(arch)) {\n keywords.push(\"sparc64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n case \"darwin\": {\n keywords.push(\"apple\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"x86_64\")\n } else if (arm64.includes(arch)) {\n // allow falling back to x86_64 if arm64 is not available\n optionalKeywords.push(\"arm64\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n break\n }\n case \"freebsd\": {\n keywords.push(\"freebsd\")\n\n if (x86_64.includes(arch)) {\n keywords.push(\"amd64\")\n } else if (x86.includes(arch)) {\n keywords.push(\"i386\")\n } else {\n info(`Using arch ${arch} for LLVM`)\n keywords.push(arch)\n }\n\n break\n }\n default:\n info(`Using ${platform} ${arch} for LLVM`)\n optionalKeywords.push(platform, arch)\n break\n }\n return { keywords, optionalKeywords }\n}\n","import path, { delimiter, join } from \"path\"\nimport { fileURLToPath } from \"url\"\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { info, warning } from \"ci-log\"\nimport { addEnv } from \"envosman\"\nimport memoize from \"memoizee\"\nimport { pathExists } from \"path-exists\"\nimport { addExeExt } from \"patha\"\nimport { addUpdateAlternativesToRc, installAptPack } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupGcc } from \"../gcc/gcc.js\"\nimport { setupMacOSSDK } from \"../macos-sdk/macos-sdk.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type InstallationInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\nimport { semverCoerceIfInvalid } from \"../utils/setup/version.js\"\nimport { quoteIfHasSpace } from \"../utils/std/index.js\"\nimport { getVersion } from \"../versions/versions.js\"\nimport { LLVMPackages, setupLLVMApt } from \"./llvm_installer.js\"\nimport { getLLVMPackageInfo } from \"./llvm_url.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\nexport async function setupLLVM(version: string, setupDir: string, arch: string): Promise {\n const installationInfo = await setupLLVMWithoutActivation(version, setupDir, arch)\n await activateLLVM(installationInfo.installDir ?? setupDir, version)\n return installationInfo\n}\n\nasync function setupLLVMWithoutActivation_(version: string, setupDir: string, arch: string) {\n // install LLVM\n const [installationInfo, _1] = await Promise.all([\n setupLLVMOnly(version, setupDir, arch),\n addLLVMLoggingMatcher(),\n ])\n\n // install LLVM dependencies\n await setupLLVMDeps(arch)\n\n return installationInfo\n}\nconst setupLLVMWithoutActivation = memoize(setupLLVMWithoutActivation_, { promise: true })\n\n/**\n * Setup clang-format\n *\n * This uses the LLVM installer on Ubuntu, and the LLVM binaries on other platforms\n */\nexport function setupClangFormat(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch, LLVMPackages.ClangFormat)\n}\n\n/** Setup llvm tools (clang tidy, etc.) without activating llvm and using it as the compiler */\nexport function setupClangTools(version: string, setupDir: string, arch: string) {\n return setupLLVMOnly(version, setupDir, arch)\n}\n\nasync function setupLLVMOnly(\n version: string,\n setupDir: string,\n arch: string,\n packages: LLVMPackages = LLVMPackages.All,\n) {\n const majorVersion = majorLLVMVersion(version)\n try {\n if (isUbuntu()) {\n return await setupLLVMApt(majorVersion, packages)\n }\n } catch (err) {\n info(`Failed to install llvm via system package manager ${err}`)\n }\n\n const installationInfo = await setupBin(\"llvm\", version, getLLVMPackageInfo, setupDir, arch)\n await llvmBinaryDeps(majorVersion)\n return installationInfo\n}\n\nfunction majorLLVMVersion(version: string) {\n const coeredVersion = semverCoerceIfInvalid(version)\n return Number.parseInt(coeredVersion.split(\".\")[0], 10)\n}\n\nasync function llvmBinaryDeps_(majorVersion: number) {\n if (isUbuntu()) {\n if (majorVersion <= 10) {\n await installAptPack([{ name: \"libtinfo5\" }])\n } else {\n await installAptPack([{ name: \"libtinfo-dev\" }])\n }\n } else if (isArch()) {\n // https://aur.archlinux.org/packages/ncurses5-compat-libs\n await setupPacmanPack(\"ncurses5-compat-libs\", undefined, \"yay\")\n } else if (hasDnf()) {\n // https://packages.fedoraproject.org/pkgs/ncurses/ncurses-compat-libs/index.html\n await setupDnfPack([\n { name: \"ncurses-compat-libs\" },\n ])\n }\n}\nconst llvmBinaryDeps = memoize(llvmBinaryDeps_, { promise: true })\n\nasync function setupLLVMDeps_(arch: string) {\n if (process.platform === \"linux\") {\n // using llvm requires ld, an up to date libstdc++, etc. So, install gcc first,\n // but with a lower priority than the one used by activateLLVM()\n await setupGcc(getVersion(\"gcc\", undefined, await ubuntuVersion()), \"\", arch, 40)\n }\n}\nconst setupLLVMDeps = memoize(setupLLVMDeps_, { promise: true })\n\nexport async function activateLLVM(directory: string, version: string) {\n const ld = process.env.LD_LIBRARY_PATH ?? \"\"\n const dyld = process.env.DYLD_LIBRARY_PATH ?? \"\"\n\n const llvmMajor = majorLLVMVersion(version)\n\n const actPromises: Promise[] = [\n // compiler paths\n addEnv(\"CC\", addExeExt(`${directory}/bin/clang`), rcOptions),\n addEnv(\"CXX\", addExeExt(`${directory}/bin/clang++`), rcOptions),\n\n // the output of this action\n addEnv(\"LLVM_PATH\", directory, rcOptions),\n\n // Setup LLVM as the compiler\n addEnv(\"LD_LIBRARY_PATH\", `${ld}${delimiter}${directory}/lib`, rcOptions),\n addEnv(\"DYLD_LIBRARY_PATH\", `${dyld}${delimiter}${directory}/lib`, rcOptions),\n\n // compiler flags\n addEnv(\"LLVM_LDFLAGS\", `-L${quoteIfHasSpace(`${directory}/lib`)}`, rcOptions),\n addEnv(\"LLVM_CPPFLAGS\", `-I${quoteIfHasSpace(`${directory}/include`)}`, rcOptions),\n\n // CPATH\n await pathExists(`${directory}/lib/clang/${version}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${version}/include`, rcOptions)\n : await pathExists(`${directory}/lib/clang/${llvmMajor}/include`)\n ? addEnv(\"LLVM_CPATH\", `${directory}/lib/clang/${llvmMajor}/include`, rcOptions)\n : Promise.resolve(),\n\n addEnv(\"LIBRARY_PATH\", `${directory}/lib`, rcOptions),\n\n // os sdks\n setupMacOSSDK(),\n ]\n\n if (isUbuntu()) {\n const priority = 60\n actPromises.push(\n addUpdateAlternativesToRc(\"cc\", `${directory}/bin/clang`, rcOptions, priority),\n addUpdateAlternativesToRc(\"cxx\", `${directory}/bin/clang++`, rcOptions, priority),\n addUpdateAlternativesToRc(\"clang\", `${directory}/bin/clang`, rcOptions),\n addUpdateAlternativesToRc(\"clang++\", `${directory}/bin/clang++`, rcOptions),\n addUpdateAlternativesToRc(\"lld\", `${directory}/bin/lld`, rcOptions),\n addUpdateAlternativesToRc(\"ld.lld\", `${directory}/bin/ld.lld`, rcOptions),\n addUpdateAlternativesToRc(\"llvm-ar\", `${directory}/bin/llvm-ar`, rcOptions),\n )\n }\n\n await Promise.all(actPromises)\n}\n\nasync function addLLVMLoggingMatcher() {\n if (GITHUB_ACTIONS) {\n const matcherPath = join(dirname, \"llvm_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the llvm_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n }\n}\n","import { info } from \"console\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\nimport { execRoot } from \"admina\"\nimport { addPath } from \"envosman\"\nimport { chmod, readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { aptTimeout, hasNala, installAptPack, isAptPackRegexInstalled } from \"setup-apt\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { DEFAULT_TIMEOUT } from \"../installTool.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\n\nexport enum LLVMPackages {\n All = 0,\n ClangFormat = 1,\n Core = 2,\n}\n\nexport async function setupLLVMApt(\n majorVersion: number,\n packages: LLVMPackages = LLVMPackages.All,\n): Promise {\n // TODO for older versions, this also includes the minor version\n const installationFolder = `/usr/lib/llvm-${majorVersion}`\n\n // download the installation script\n await installAptPack([{ name: \"ca-certificates\" }])\n const dl = new DownloaderHelper(\"https://apt.llvm.org/llvm.sh\", tmpdir(), { fileName: \"llvm.sh\" })\n dl.on(\"error\", (err) => {\n throw new Error(`Failed to download the LLVM installer script: ${err}`)\n })\n await dl.start()\n const installerScript = await readFile(dl.getDownloadPath(), \"utf-8\")\n\n const installerPath = join(tmpdir(), \"llvm-setup-cpp.sh\")\n const neededPackages = await patchAptLLVMScript(\n installerScript,\n installerPath,\n majorVersion,\n packages,\n )\n await installAptPack(neededPackages)\n await chmod(installerPath, \"755\")\n await execRoot(\n \"bash\",\n [installerPath, `${majorVersion}`, ...(packages === LLVMPackages.All ? [\"all\"] : [])],\n {\n stdio: \"inherit\",\n shell: true,\n timeout: DEFAULT_TIMEOUT,\n },\n )\n\n await addPath(`${installationFolder}/bin`, rcOptions)\n\n return {\n installDir: `${installationFolder}`,\n binDir: `${installationFolder}/bin`,\n bin: `${installationFolder}/bin/clang++`,\n }\n}\n\nasync function patchAptLLVMScript(\n givenScript: string,\n target_path: string,\n majorVersion: number,\n packages: LLVMPackages,\n) {\n let script = debugScript(givenScript)\n script = nonInteractiveScript(script)\n script = choosePackages(packages, script, majorVersion)\n script = await removeConflictingPackages(script)\n script = useNalaScript(script)\n\n await writeFile(target_path, script)\n\n // the packages needed by the script\n return [{ name: \"lsb-release\" }, { name: \"wget\" }, { name: \"software-properties-common\" }, { name: \"gnupg\" }]\n}\n\nfunction debugScript(script: string) {\n if (process.env.NODE_DEBUG !== \"1\" && process.env.NODE_DEBUG !== \"true\") {\n return script.replace(/set -eux/g, \"set -eu\")\n }\n return script\n}\n\nfunction nonInteractiveScript(script: string) {\n // make the scirpt non-interactive and fix broken packages\n return script.replace(\n /add-apt-repository \"\\${REPO_NAME}\"/g,\n `add-apt-repository -y -n \"\\${REPO_NAME}\"\napt-get update -o ${aptTimeout} -y`,\n )\n}\n\nasync function removeConflictingPackages(givenScript: string) {\n // fix conflicts between libclang-rt and libclang\n let script = givenScript.replace(\n /apt-get install -y/g,\n `apt-get install -o Dpkg::Options::=\"--force-overwrite\" -o ${aptTimeout} -y --fix-broken`,\n )\n\n // check if these are installed and if so, remove them from the script as they conflict\n const conflictingPackages = [\"libc++-$LLVM_VERSION-dev\", \"libc++abi-$LLVM_VERSION-dev\", \"libunwind-$LLVM_VERSION-dev\"]\n await Promise.all(\n conflictingPackages.map(async (pack) => {\n const installingPack = pack.replace(\"$LLVM_VERSION\", \"*\")\n if (await isAptPackRegexInstalled(installingPack)) {\n info(`Removing conflicting package ${installingPack}`)\n script = script.replace(pack, \"\")\n }\n }),\n )\n return script\n}\n\nfunction useNalaScript(script: string) {\n // use nala if it is available\n if (hasNala()) {\n return script.replace(/apt-get/g, \"nala\")\n }\n return script\n}\n\nfunction choosePackages(packages: LLVMPackages, script: string, majorVersion: number) {\n if (packages === LLVMPackages.ClangFormat) {\n return script.replace(/ -y \\$PKG/g, ` -y clang-format-${majorVersion}`)\n }\n return script\n}\n","import path, { join } from \"path\"\nimport { fileURLToPath } from \"url\"\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nimport { GITHUB_ACTIONS } from \"ci-info\"\nimport { error, info, warning } from \"ci-log\"\nimport { findVcvarsall, vsversion_to_versionnumber } from \"msvc-dev-cmd/lib.js\"\nimport { pathExists } from \"path-exists\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupVCVarsall } from \"../vcvarsall/vcvarsall.js\"\n\nconst dirname = typeof __dirname === \"string\" ? __dirname : path.dirname(fileURLToPath(import.meta.url))\n\ntype MSVCVersion = \"2022\" | \"17.0\" | \"2019\" | \"16.0\" | \"2017\" | \"15.0\" | \"2015\" | \"14.0\" | \"2013\" | \"12.0\" | string\n\nexport async function setupMSVC(\n versionGiven: MSVCVersion,\n _setupDir: string,\n arch: string,\n sdk?: string,\n uwp?: boolean,\n spectre?: boolean,\n) {\n if (process.platform !== \"win32\") {\n return\n }\n const version = vsversion_to_versionnumber(versionGiven) as string\n\n // check if the given version is already installed\n info(`Checking if MSVC ${version} is already installed`)\n let installed = false\n try {\n const vcvarsall_path = findVcvarsall(version) as string\n installed = true\n info(`Found the pre-installed version of MSVC at ${vcvarsall_path}`)\n } catch {\n // not installed, try installing\n }\n\n let toolset: string | undefined\n let VCTargetsPath: string | undefined\n // https://github.com/aminya/setup-cpp/issues/1\n if (!installed) {\n try {\n if (version === \"14.0\") {\n toolset = \"14.0\"\n await setupChocoPack(\"visualcpp-build-tools\", \"14.0.25420.1\", [\"--ignore-dependencies\"])\n VCTargetsPath = \"C:/Program Files (x86)/MSBuild/Microsoft.Cpp/v4.0/v140\"\n } else if (version === \"15.0\") {\n toolset = \"14.16\"\n await setupChocoPack(\"visualstudio2017buildtools\", \"15.9.41.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16\" // TODO verify path\n } else if (version === \"16.0\") {\n toolset = \"14.29\"\n await setupChocoPack(\"visualstudio2019buildtools\", \"16.11.7.0\", [])\n VCTargetsPath = \"C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133\"\n } else if (version === \"17.0\") {\n toolset = undefined\n await setupChocoPack(\"visualstudio2022buildtools\", \"117.0.5.0\", [])\n VCTargetsPath = undefined\n } else {\n error(`The given MSVC versions ${versionGiven} is not supported yet.`)\n }\n } catch (e) {\n error(e as string | Error)\n }\n }\n // run vcvarsall.bat environment variables\n await setupVCVarsall(version, VCTargetsPath, arch, toolset, sdk, uwp, spectre)\n\n if (GITHUB_ACTIONS) {\n await addMSVCLoggingMatcher()\n }\n}\n\nasync function addMSVCLoggingMatcher() {\n const matcherPath = join(dirname, \"msvc_matcher.json\")\n if (!(await pathExists(matcherPath))) {\n return warning(\"the msvc_matcher.json file does not exist in the same folder as setup-cpp.js\")\n }\n info(`::add-matcher::${matcherPath}`)\n}\n","import { addPath } from \"envosman\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupOpencppcoverage(version: string | undefined, _setupDir: string, _arch: string) {\n if (process.platform !== \"win32\") {\n return\n }\n await setupChocoPack(\"opencppcoverage\", version)\n const binDir = await activateOpencppcoverage()\n return { binDir }\n}\n\nasync function activateOpencppcoverage() {\n const binDir = \"C:/Program Files/OpenCppCoverage\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { execRootSync } from \"admina\"\nimport { error } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { addExeExt } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { ubuntuVersion } from \"../utils/env/ubuntu_version.js\"\nimport { type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n/** Get the platform data for cmake */\nfunction getPowerShellPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n return {\n url: getPowershellUrl(platform, arch, version),\n binRelativeDir: \"\",\n binFileName: addExeExt(\"pwsh\"),\n extractedFolderName: \"\",\n }\n}\n\nfunction getPowershellUrl(\n platform: string,\n arch: string,\n version: string,\n) {\n switch (platform) {\n case \"win32\": {\n const osArchStr = ([\"ia32\", \"x86\", \"i386\", \"x32\"].includes(arch))\n ? \"win-x86\"\n : \"win-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/PowerShell-${version}-${osArchStr}.zip`\n }\n case \"darwin\": {\n const osArchStr = [\"arm\", \"arm64\"].includes(arch) ? \"osx-arm64\" : \"osx-x64\"\n\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n case \"linux\": {\n const archMap = {\n arm64: \"linux-arm64\",\n arm: \"linux-arm64\",\n arm32: \"linux-arm32\",\n aarch64: \"linux-arm64\",\n x64: \"linux-x64\",\n } as Record\n const osArchStr = archMap[arch] ?? \"linux-x64\"\n // TODO support musl\n return `https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${osArchStr}.tar.gz`\n }\n default:\n throw new Error(`Unsupported platform '${platform}'`)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershell(version: string, setupDir: string, arch: string) {\n try {\n return await setupBin(\"pwsh\", version, getPowerShellPackageInfo, setupDir, arch)\n } catch (err) {\n error(`Failed to setup pwsh via download: ${err}. Trying package managers...`)\n return setupPowershellSystem(version, setupDir, arch)\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupPowershellSystem(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"powershell-core\", version)\n const binDir = \"C:/Program Files/PowerShell/7\"\n await addPath(binDir, rcOptions)\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"powershell\", version, { cask: true, overwrite: false })\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"powershell-bin\", version, \"yay\")\n } else if (hasDnf()) {\n await setupDnfPack([{ name: \"curl\" }])\n execRootSync(\"/bin/bash\", [\n \"-c\",\n \"curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo\",\n ])\n return setupDnfPack([{ name: \"powershell\", version }])\n } else if (isUbuntu()) {\n await installAptPack([{ name: \"curl\" }])\n const ubuntuVerSplitted = (await ubuntuVersion())!\n const ubuntuVersionString = `${ubuntuVerSplitted[0]}.0${ubuntuVerSplitted[1]}`\n\n execRootSync(\"curl\", [\n \"-LJO\",\n `https://packages.microsoft.com/config/ubuntu/${ubuntuVersionString}/packages-microsoft-prod.deb`,\n ])\n execRootSync(\"dpkg\", [\"-i\", \"packages-microsoft-prod.deb\"])\n\n // TODO Debian\n // const keyFileName = await addAptKeyViaURL(\n // \"microsoft.asc\",\n // \"https://packages.microsoft.com/keys/microsoft.asc\"\n // )\n // execRootSync(\"/bin/bash\", [\n // \"-c\",\n // `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main\" > /etc/apt/sources.list.d/microsoft.list`,\n // ])\n\n return installAptPack([{ name: \"powershell\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addExeExt } from \"patha\"\nimport { type InstallationInfo, type PackageInfo, setupBin } from \"../utils/setup/setupBin.js\"\n\n/** Get the platform name task uses in their download links */\nfunction getTaskPlatform(platform: NodeJS.Platform) {\n switch (platform) {\n case \"win32\":\n return \"windows\"\n default:\n return platform\n }\n}\n\n/** Get the arch name task uses in their download links */\nfunction getTaskArch(arch: string) {\n switch (arch) {\n case \"x64\":\n return \"amd64\"\n case \"ia32\":\n case \"x86\":\n case \"i386\":\n case \"x32\":\n return \"386\"\n default:\n return arch\n }\n}\n\n/** Get the platform data for task */\nfunction getTaskPackageInfo(version: string, platform: NodeJS.Platform, arch: string): PackageInfo {\n const taskPlatform = getTaskPlatform(platform)\n const taskArch = getTaskArch(arch)\n const extension = platform === \"win32\" ? \"zip\" : \"tar.gz\"\n return {\n binRelativeDir: \"\",\n binFileName: addExeExt(\"task\"),\n extractedFolderName: \"\",\n url: `https://github.com/go-task/task/releases/download/v${version}/task_${taskPlatform}_${taskArch}.${extension}`,\n }\n}\n\nexport function setupTask(version: string, setupDir: string, arch: string): Promise {\n return setupBin(\"task\", version, getTaskPackageInfo, setupDir, arch)\n}\n","import { getInput } from \"@actions/core\"\nimport { info } from \"ci-log\"\nimport mri from \"mri\"\nimport { untildifyUser } from \"untildify-user\"\nimport { type Inputs, inputs } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\n\nexport function parseArgs(args: string[]): Opts {\n return mri & { help: boolean }>(args, {\n string: [...inputs, \"timeout\"],\n default: Object.fromEntries(inputs.map((inp) => [inp, maybeGetInput(inp)])),\n alias: { h: \"help\" },\n boolean: \"help\",\n })\n}\n\nexport function printHelp() {\n info(`\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 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 you would like to install for this tool. e.g. --conan true or --conan \"1.42.1\"\n\nAll the available tools:\n`)\n\n console.table(\n {\n \"compiler and analyzer\": {\n tools: \"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format\",\n },\n \"build system\": { tools: \"--cmake, --ninja, --meson, --make, --task, --bazel\" },\n \"package manager\": { tools: \"--vcpkg, --conan, --choco, --brew, --nala\" },\n cache: { tools: \"--ccache, --sccache\" },\n documentation: { tools: \"--doxygen, --graphviz\" },\n coverage: { tools: \"--gcovr, --opencppcoverage, --kcov\" },\n other: { tools: \"--python, --powershell, --sevenzip\" },\n },\n [\"tools\"],\n )\n}\n/** Get an object from github actions */\n\nexport function maybeGetInput(key: string) {\n const value = getInput(key.toLowerCase())\n if (value !== \"false\" && value !== \"\") {\n return value\n }\n return undefined // skip installation\n}\nexport type Opts = mri.Argv<\n Record & {\n help: boolean\n timeout?: string\n }\n>\n\nexport function getSuccessMessage(tool: string, installationInfo: InstallationInfo | undefined | void) {\n let msg = `✅ ${tool} was installed successfully:`\n if (installationInfo === undefined) {\n return msg\n }\n if (\"installDir\" in installationInfo) {\n msg += `\\n- The installation directory is ${installationInfo.installDir}`\n }\n if (installationInfo.binDir !== \"\") {\n msg += `\\n- The binary directory is ${installationInfo.binDir}`\n }\n return msg\n}\n\nexport const rcOptions = {\n rcPath: untildifyUser(\"~/.cpprc\"),\n guard: \"cpp\",\n}\n","'use strict'\n\nconst vendors = require('./vendors.json')\n\nconst env = process.env\n\n// Used for testing only\nObject.defineProperty(exports, '_vendors', {\n value: vendors.map(function (v) {\n return v.constant\n })\n})\n\nexports.name = null\nexports.isPR = null\n\nvendors.forEach(function (vendor) {\n const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]\n const isCI = envs.every(function (obj) {\n return checkEnv(obj)\n })\n\n exports[vendor.constant] = isCI\n\n if (!isCI) {\n return\n }\n\n exports.name = vendor.name\n\n switch (typeof vendor.pr) {\n case 'string':\n // \"pr\": \"CIRRUS_PR\"\n exports.isPR = !!env[vendor.pr]\n break\n case 'object':\n if ('env' in vendor.pr) {\n // \"pr\": { \"env\": \"BUILDKITE_PULL_REQUEST\", \"ne\": \"false\" }\n exports.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne\n } else if ('any' in vendor.pr) {\n // \"pr\": { \"any\": [\"ghprbPullId\", \"CHANGE_ID\"] }\n exports.isPR = vendor.pr.any.some(function (key) {\n return !!env[key]\n })\n } else {\n // \"pr\": { \"DRONE_BUILD_EVENT\": \"pull_request\" }\n exports.isPR = checkEnv(vendor.pr)\n }\n break\n default:\n // PR detection not supported for this vendor\n exports.isPR = null\n }\n})\n\nexports.isCI = !!(\n env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'\n (env.BUILD_ID || // Jenkins, Cloudbees\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari\n env.CI_APP_ID || // Appflow\n env.CI_BUILD_ID || // Appflow\n env.CI_BUILD_NUMBER || // Appflow\n env.CI_NAME || // Codeship and others\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.RUN_ID || // TaskCluster, dsari\n exports.name ||\n false)\n)\n\nfunction checkEnv (obj) {\n // \"env\": \"CIRRUS\"\n if (typeof obj === 'string') return !!env[obj]\n\n // \"env\": { \"env\": \"NODE\", \"includes\": \"/app/.heroku/node/bin/node\" }\n if ('env' in obj) {\n // Currently there are no other types, uncomment when there are\n // if ('includes' in obj) {\n return env[obj.env] && env[obj.env].includes(obj.includes)\n // }\n }\n if ('any' in obj) {\n return obj.any.some(function (k) {\n return !!env[k]\n })\n }\n return Object.keys(obj).every(function (k) {\n return env[k] === obj[k]\n })\n}\n","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import rng from './rng.js';\nimport stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import v35 from './v35.js';\nimport md5 from './md5.js';\nconst v3 = v35('v3', 0x30, md5);\nexport default v3;","import crypto from 'crypto';\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('md5').update(bytes).digest();\n}\n\nexport default md5;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nconst v5 = v35('v5', 0x50, sha1);\nexport default v5;","import crypto from 'crypto';\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return crypto.createHash('sha1').update(bytes).digest();\n}\n\nexport default sha1;","export default '00000000-0000-0000-0000-000000000000';","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","module.exports = require('./lib/tunnel');\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as http from 'http';\nimport * as https from 'https';\nimport * as pm from './proxy';\nimport * as tunnel from 'tunnel';\nexport var HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes || (HttpCodes = {}));\nexport var Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers || (Headers = {}));\nexport var MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes || (MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nexport function getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nexport class HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n statusCode;\n result;\n}\nexport class HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n message;\n async readBody() {\n return new Promise(async (resolve) => {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n });\n }\n async readBodyBuffer() {\n return new Promise(async (resolve) => {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n });\n }\n}\nexport function isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexport class HttpClient {\n userAgent;\n handlers;\n requestOptions;\n _ignoreSslError = false;\n _socketTimeout;\n _allowRedirects = true;\n _allowRedirectDowngrade = false;\n _maxRedirects = 50;\n _allowRetries = false;\n _maxRetries = 1;\n _agent;\n _proxyAgent;\n _proxyAgentDispatcher;\n _keepAlive = false;\n _disposed = false;\n constructor(userAgent, handlers, requestOptions) {\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n async options(requestUrl, additionalHeaders) {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n }\n async get(requestUrl, additionalHeaders) {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n }\n async del(requestUrl, additionalHeaders) {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n }\n async post(requestUrl, data, additionalHeaders) {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n }\n async patch(requestUrl, data, additionalHeaders) {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n }\n async put(requestUrl, data, additionalHeaders) {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n }\n async head(requestUrl, additionalHeaders) {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n }\n async sendStream(verb, requestUrl, stream, additionalHeaders) {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n async getJson(requestUrl, additionalHeaders = {}) {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = await this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async postJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async putJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n async patchJson(requestUrl, obj, additionalHeaders = {}) {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = await this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n async request(verb, requestUrl, data, headers) {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = await this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n await response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = await this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n await response.readBody();\n await this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n async requestRaw(info, data) {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n async getAgentDispatcher(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (!useProxy) {\n return undefined;\n }\n return await this._getProxyAgentDispatcher(parsedUrl, proxyUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (!useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: {\n ...((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n }),\n host: proxyUrl.hostname,\n port: proxyUrl.port\n }\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if tunneling agent isn't assigned create a new agent\n if (!agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n async _getProxyAgentDispatcher(parsedUrl, proxyUrl) {\n let proxyAgent;\n if (this._keepAlive) {\n proxyAgent = this._proxyAgentDispatcher;\n }\n // if agent is already assigned use that agent.\n if (proxyAgent) {\n return proxyAgent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n // Lazy load ProxyAgent to avoid bundling all the undici\n const ProxyAgent = (await import('undici/lib/proxy-agent'));\n proxyAgent = new ProxyAgent({\n uri: proxyUrl.href,\n pipelining: !this._keepAlive ? 0 : 1,\n ...((proxyUrl.username || proxyUrl.password) && {\n token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString('base64')}`\n })\n });\n this._proxyAgentDispatcher = proxyAgent;\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, {\n rejectUnauthorized: false\n });\n }\n return proxyAgent;\n }\n async _performExponentialBackoff(retryNumber) {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n }\n async _processResponse(res, options) {\n return new Promise(async (resolve, reject) => {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = await res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n });\n }\n}\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction checkPathExt (path, options) {\n var pathext = options.pathExt !== undefined ?\n options.pathExt : process.env.PATHEXT\n\n if (!pathext) {\n return true\n }\n\n pathext = pathext.split(';')\n if (pathext.indexOf('') !== -1) {\n return true\n }\n for (var i = 0; i < pathext.length; i++) {\n var p = pathext[i].toLowerCase()\n if (p && path.substr(-p.length).toLowerCase() === p) {\n return true\n }\n }\n return false\n}\n\nfunction checkStat (stat, path, options) {\n if (!stat.isSymbolicLink() && !stat.isFile()) {\n return false\n }\n return checkPathExt(path, options)\n}\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, path, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), path, options)\n}\n","module.exports = isexe\nisexe.sync = sync\n\nvar fs = require('fs')\n\nfunction isexe (path, options, cb) {\n fs.stat(path, function (er, stat) {\n cb(er, er ? false : checkStat(stat, options))\n })\n}\n\nfunction sync (path, options) {\n return checkStat(fs.statSync(path), options)\n}\n\nfunction checkStat (stat, options) {\n return stat.isFile() && checkMode(stat, options)\n}\n\nfunction checkMode (stat, options) {\n var mod = stat.mode\n var uid = stat.uid\n var gid = stat.gid\n\n var myUid = options.uid !== undefined ?\n options.uid : process.getuid && process.getuid()\n var myGid = options.gid !== undefined ?\n options.gid : process.getgid && process.getgid()\n\n var u = parseInt('100', 8)\n var g = parseInt('010', 8)\n var o = parseInt('001', 8)\n var ug = u | g\n\n var ret = (mod & o) ||\n (mod & g) && gid === myGid ||\n (mod & u) && uid === myUid ||\n (mod & ug) && myUid === 0\n\n return ret\n}\n","const isWindows = process.platform === 'win32' ||\n process.env.OSTYPE === 'cygwin' ||\n process.env.OSTYPE === 'msys'\n\nconst path = require('path')\nconst COLON = isWindows ? ';' : ':'\nconst isexe = require('isexe')\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, opt) => {\n const colon = opt.colon || COLON\n\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(/\\//) || isWindows && cmd.match(/\\\\/) ? ['']\n : (\n [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(opt.path || process.env.PATH ||\n /* istanbul ignore next: very unusual */ '').split(colon),\n ]\n )\n const pathExtExe = isWindows\n ? opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM'\n : ''\n const pathExt = isWindows ? pathExtExe.split(colon) : ['']\n\n if (isWindows) {\n if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')\n pathExt.unshift('')\n }\n\n return {\n pathEnv,\n pathExt,\n pathExtExe,\n }\n}\n\nconst which = (cmd, opt, cb) => {\n if (typeof opt === 'function') {\n cb = opt\n opt = {}\n }\n if (!opt)\n opt = {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n const step = i => new Promise((resolve, reject) => {\n if (i === pathEnv.length)\n return opt.all && found.length ? resolve(found)\n : reject(getNotFoundError(cmd))\n\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n resolve(subStep(p, i, 0))\n })\n\n const subStep = (p, i, ii) => new Promise((resolve, reject) => {\n if (ii === pathExt.length)\n return resolve(step(i + 1))\n const ext = pathExt[ii]\n isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {\n if (!er && is) {\n if (opt.all)\n found.push(p + ext)\n else\n return resolve(p + ext)\n }\n return resolve(subStep(p, i, ii + 1))\n })\n })\n\n return cb ? step(0).then(res => cb(null, res), cb) : step(0)\n}\n\nconst whichSync = (cmd, opt) => {\n opt = opt || {}\n\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (let i = 0; i < pathEnv.length; i ++) {\n const ppRaw = pathEnv[i]\n const pathPart = /^\".*\"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw\n\n const pCmd = path.join(pathPart, cmd)\n const p = !pathPart && /^\\.[\\\\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd\n : pCmd\n\n for (let j = 0; j < pathExt.length; j ++) {\n const cur = p + pathExt[j]\n try {\n const is = isexe.sync(cur, { pathExt: pathExtExe })\n if (is) {\n if (opt.all)\n found.push(cur)\n else\n return cur\n }\n } catch (ex) {}\n }\n }\n\n if (opt.all && found.length)\n return found\n\n if (opt.nothrow)\n return null\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","'use strict';\n\nconst pathKey = (options = {}) => {\n\tconst environment = options.env || process.env;\n\tconst platform = options.platform || process.platform;\n\n\tif (platform !== 'win32') {\n\t\treturn 'PATH';\n\t}\n\n\treturn Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';\n};\n\nmodule.exports = pathKey;\n// TODO: Remove this for the next major release\nmodule.exports.default = pathKey;\n","'use strict';\n\n// See http://www.robvanderwoude.com/escapechars.php\nconst metaCharsRegExp = /([()\\][%!^\"`<>&|;, *?])/g;\n\nfunction escapeCommand(arg) {\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n return arg;\n}\n\nfunction escapeArgument(arg, doubleEscapeMetaChars) {\n // Convert to string\n arg = `${arg}`;\n\n // Algorithm below is based on https://qntm.org/cmd\n\n // Sequence of backslashes followed by a double quote:\n // double up all the backslashes and escape the double quote\n arg = arg.replace(/(\\\\*)\"/g, '$1$1\\\\\"');\n\n // Sequence of backslashes followed by the end of the string\n // (which will become a double quote later):\n // double up all the backslashes\n arg = arg.replace(/(\\\\*)$/, '$1$1');\n\n // All other backslashes occur literally\n\n // Quote the whole thing:\n arg = `\"${arg}\"`;\n\n // Escape meta chars\n arg = arg.replace(metaCharsRegExp, '^$1');\n\n // Double escape meta chars if necessary\n if (doubleEscapeMetaChars) {\n arg = arg.replace(metaCharsRegExp, '^$1');\n }\n\n return arg;\n}\n\nmodule.exports.command = escapeCommand;\nmodule.exports.argument = escapeArgument;\n","'use strict';\nconst shebangRegex = require('shebang-regex');\n\nmodule.exports = (string = '') => {\n\tconst match = string.match(shebangRegex);\n\n\tif (!match) {\n\t\treturn null;\n\t}\n\n\tconst [path, argument] = match[0].replace(/#! ?/, '').split(' ');\n\tconst binary = path.split('/').pop();\n\n\tif (binary === 'env') {\n\t\treturn argument;\n\t}\n\n\treturn argument ? `${binary} ${argument}` : binary;\n};\n","'use strict';\nmodule.exports = /^#!(.*)/;\n","'use strict';\n\nconst fs = require('fs');\nconst shebangCommand = require('shebang-command');\n\nfunction readShebang(command) {\n // Read the first 150 bytes from the file\n const size = 150;\n const buffer = Buffer.alloc(size);\n\n let fd;\n\n try {\n fd = fs.openSync(command, 'r');\n fs.readSync(fd, buffer, 0, size, 0);\n fs.closeSync(fd);\n } catch (e) { /* Empty */ }\n\n // Attempt to extract shebang (null is returned if not a shebang)\n return shebangCommand(buffer.toString());\n}\n\nmodule.exports = readShebang;\n","'use strict';\n\nconst path = require('path');\nconst resolveCommand = require('./util/resolveCommand');\nconst escape = require('./util/escape');\nconst readShebang = require('./util/readShebang');\n\nconst isWin = process.platform === 'win32';\nconst isExecutableRegExp = /\\.(?:com|exe)$/i;\nconst isCmdShimRegExp = /node_modules[\\\\/].bin[\\\\/][^\\\\/]+\\.cmd$/i;\n\nfunction detectShebang(parsed) {\n parsed.file = resolveCommand(parsed);\n\n const shebang = parsed.file && readShebang(parsed.file);\n\n if (shebang) {\n parsed.args.unshift(parsed.file);\n parsed.command = shebang;\n\n return resolveCommand(parsed);\n }\n\n return parsed.file;\n}\n\nfunction parseNonShell(parsed) {\n if (!isWin) {\n return parsed;\n }\n\n // Detect & add support for shebangs\n const commandFile = detectShebang(parsed);\n\n // We don't need a shell if the command filename is an executable\n const needsShell = !isExecutableRegExp.test(commandFile);\n\n // If a shell is required, use cmd.exe and take care of escaping everything correctly\n // Note that `forceShell` is an hidden option used only in tests\n if (parsed.options.forceShell || needsShell) {\n // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`\n // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument\n // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,\n // we need to double escape them\n const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);\n\n // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\\bar)\n // This is necessary otherwise it will always fail with ENOENT in those cases\n parsed.command = path.normalize(parsed.command);\n\n // Escape command & arguments\n parsed.command = escape.command(parsed.command);\n parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));\n\n const shellCommand = [parsed.command].concat(parsed.args).join(' ');\n\n parsed.args = ['/d', '/s', '/c', `\"${shellCommand}\"`];\n parsed.command = process.env.comspec || 'cmd.exe';\n parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped\n }\n\n return parsed;\n}\n\nfunction parse(command, args, options) {\n // Normalize arguments, similar to nodejs\n if (args && !Array.isArray(args)) {\n options = args;\n args = null;\n }\n\n args = args ? args.slice(0) : []; // Clone array to avoid changing the original\n options = Object.assign({}, options); // Clone object to avoid changing the original\n\n // Build our parsed object\n const parsed = {\n command,\n args,\n options,\n file: undefined,\n original: {\n command,\n args,\n },\n };\n\n // Delegate further parsing to shell or non-shell\n return options.shell ? parsed : parseNonShell(parsed);\n}\n\nmodule.exports = parse;\n","import process from 'node:process';\nimport path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport pathKey from 'path-key';\n\nexport const npmRunPath = ({\n\tcwd = process.cwd(),\n\tpath: pathOption = process.env[pathKey()],\n\tpreferLocal = true,\n\texecPath = process.execPath,\n\taddExecPath = true,\n} = {}) => {\n\tconst cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;\n\tconst cwdPath = path.resolve(cwdString);\n\tconst result = [];\n\n\tif (preferLocal) {\n\t\tapplyPreferLocal(result, cwdPath);\n\t}\n\n\tif (addExecPath) {\n\t\tapplyExecPath(result, execPath, cwdPath);\n\t}\n\n\treturn [...result, pathOption].join(path.delimiter);\n};\n\nconst applyPreferLocal = (result, cwdPath) => {\n\tlet previous;\n\n\twhile (previous !== cwdPath) {\n\t\tresult.push(path.join(cwdPath, 'node_modules/.bin'));\n\t\tprevious = cwdPath;\n\t\tcwdPath = path.resolve(cwdPath, '..');\n\t}\n};\n\n// Ensure the running `node` binary is used\nconst applyExecPath = (result, execPath, cwdPath) => {\n\tconst execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;\n\tresult.push(path.resolve(cwdPath, execPathString, '..'));\n};\n\nexport const npmRunPathEnv = ({env = process.env, ...options} = {}) => {\n\tenv = {...env};\n\n\tconst pathName = pathKey({env});\n\toptions.path = env[pathName];\n\tenv[pathName] = npmRunPath(options);\n\n\treturn env;\n};\n","const copyProperty = (to, from, property, ignoreNonConfigurable) => {\n\t// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.\n\t// `Function#prototype` is non-writable and non-configurable so can never be modified.\n\tif (property === 'length' || property === 'prototype') {\n\t\treturn;\n\t}\n\n\t// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.\n\tif (property === 'arguments' || property === 'caller') {\n\t\treturn;\n\t}\n\n\tconst toDescriptor = Object.getOwnPropertyDescriptor(to, property);\n\tconst fromDescriptor = Object.getOwnPropertyDescriptor(from, property);\n\n\tif (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {\n\t\treturn;\n\t}\n\n\tObject.defineProperty(to, property, fromDescriptor);\n};\n\n// `Object.defineProperty()` throws if the property exists, is not configurable and either:\n// - one its descriptors is changed\n// - it is non-writable and its value is changed\nconst canCopyProperty = function (toDescriptor, fromDescriptor) {\n\treturn toDescriptor === undefined || toDescriptor.configurable || (\n\t\ttoDescriptor.writable === fromDescriptor.writable &&\n\t\ttoDescriptor.enumerable === fromDescriptor.enumerable &&\n\t\ttoDescriptor.configurable === fromDescriptor.configurable &&\n\t\t(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)\n\t);\n};\n\nconst changePrototype = (to, from) => {\n\tconst fromPrototype = Object.getPrototypeOf(from);\n\tif (fromPrototype === Object.getPrototypeOf(to)) {\n\t\treturn;\n\t}\n\n\tObject.setPrototypeOf(to, fromPrototype);\n};\n\nconst wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\\n${fromBody}`;\n\nconst toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');\nconst toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');\n\n// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.\n// We use `bind()` instead of a closure for the same reason.\n// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.\nconst changeToString = (to, from, name) => {\n\tconst withName = name === '' ? '' : `with ${name.trim()}() `;\n\tconst newToString = wrappedToString.bind(null, withName, from.toString());\n\t// Ensure `to.toString.toString` is non-enumerable and has the same `same`\n\tObject.defineProperty(newToString, 'name', toStringName);\n\tObject.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});\n};\n\nexport default function mimicFunction(to, from, {ignoreNonConfigurable = false} = {}) {\n\tconst {name} = to;\n\n\tfor (const property of Reflect.ownKeys(from)) {\n\t\tcopyProperty(to, from, property, ignoreNonConfigurable);\n\t}\n\n\tchangePrototype(to, from);\n\tchangeToString(to, from, name);\n\n\treturn to;\n}\n","import mimicFunction from 'mimic-fn';\n\nconst calledFunctions = new WeakMap();\n\nconst onetime = (function_, options = {}) => {\n\tif (typeof function_ !== 'function') {\n\t\tthrow new TypeError('Expected a function');\n\t}\n\n\tlet returnValue;\n\tlet callCount = 0;\n\tconst functionName = function_.displayName || function_.name || '';\n\n\tconst onetime = function (...arguments_) {\n\t\tcalledFunctions.set(onetime, ++callCount);\n\n\t\tif (callCount === 1) {\n\t\t\treturnValue = function_.apply(this, arguments_);\n\t\t\tfunction_ = null;\n\t\t} else if (options.throw === true) {\n\t\t\tthrow new Error(`Function \\`${functionName}\\` can only be called once`);\n\t\t}\n\n\t\treturn returnValue;\n\t};\n\n\tmimicFunction(onetime, function_);\n\tcalledFunctions.set(onetime, callCount);\n\n\treturn onetime;\n};\n\nonetime.callCount = function_ => {\n\tif (!calledFunctions.has(function_)) {\n\t\tthrow new Error(`The given function \\`${function_.name}\\` is not wrapped by the \\`onetime\\` package`);\n\t}\n\n\treturn calledFunctions.get(function_);\n};\n\nexport default onetime;\n","\nexport const getRealtimeSignals=()=>{\nconst length=SIGRTMAX-SIGRTMIN+1;\nreturn Array.from({length},getRealtimeSignal);\n};\n\nconst getRealtimeSignal=(value,index)=>({\nname:`SIGRT${index+1}`,\nnumber:SIGRTMIN+index,\naction:\"terminate\",\ndescription:\"Application-specific signal (realtime)\",\nstandard:\"posix\"\n});\n\nconst SIGRTMIN=34;\nexport const SIGRTMAX=64;","\n\nexport const SIGNALS=[\n{\nname:\"SIGHUP\",\nnumber:1,\naction:\"terminate\",\ndescription:\"Terminal closed\",\nstandard:\"posix\"\n},\n{\nname:\"SIGINT\",\nnumber:2,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-C\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGQUIT\",\nnumber:3,\naction:\"core\",\ndescription:\"User interruption with CTRL-\\\\\",\nstandard:\"posix\"\n},\n{\nname:\"SIGILL\",\nnumber:4,\naction:\"core\",\ndescription:\"Invalid machine instruction\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGTRAP\",\nnumber:5,\naction:\"core\",\ndescription:\"Debugger breakpoint\",\nstandard:\"posix\"\n},\n{\nname:\"SIGABRT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGIOT\",\nnumber:6,\naction:\"core\",\ndescription:\"Aborted\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGBUS\",\nnumber:7,\naction:\"core\",\ndescription:\n\"Bus error due to misaligned, non-existing address or paging error\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGEMT\",\nnumber:7,\naction:\"terminate\",\ndescription:\"Command should be emulated but is not implemented\",\nstandard:\"other\"\n},\n{\nname:\"SIGFPE\",\nnumber:8,\naction:\"core\",\ndescription:\"Floating point arithmetic error\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGKILL\",\nnumber:9,\naction:\"terminate\",\ndescription:\"Forced termination\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGUSR1\",\nnumber:10,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGSEGV\",\nnumber:11,\naction:\"core\",\ndescription:\"Segmentation fault\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGUSR2\",\nnumber:12,\naction:\"terminate\",\ndescription:\"Application-specific signal\",\nstandard:\"posix\"\n},\n{\nname:\"SIGPIPE\",\nnumber:13,\naction:\"terminate\",\ndescription:\"Broken pipe or socket\",\nstandard:\"posix\"\n},\n{\nname:\"SIGALRM\",\nnumber:14,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTERM\",\nnumber:15,\naction:\"terminate\",\ndescription:\"Termination\",\nstandard:\"ansi\"\n},\n{\nname:\"SIGSTKFLT\",\nnumber:16,\naction:\"terminate\",\ndescription:\"Stack is empty or overflowed\",\nstandard:\"other\"\n},\n{\nname:\"SIGCHLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"posix\"\n},\n{\nname:\"SIGCLD\",\nnumber:17,\naction:\"ignore\",\ndescription:\"Child process terminated, paused or unpaused\",\nstandard:\"other\"\n},\n{\nname:\"SIGCONT\",\nnumber:18,\naction:\"unpause\",\ndescription:\"Unpaused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGSTOP\",\nnumber:19,\naction:\"pause\",\ndescription:\"Paused\",\nstandard:\"posix\",\nforced:true\n},\n{\nname:\"SIGTSTP\",\nnumber:20,\naction:\"pause\",\ndescription:\"Paused using CTRL-Z or \\\"suspend\\\"\",\nstandard:\"posix\"\n},\n{\nname:\"SIGTTIN\",\nnumber:21,\naction:\"pause\",\ndescription:\"Background process cannot read terminal input\",\nstandard:\"posix\"\n},\n{\nname:\"SIGBREAK\",\nnumber:21,\naction:\"terminate\",\ndescription:\"User interruption with CTRL-BREAK\",\nstandard:\"other\"\n},\n{\nname:\"SIGTTOU\",\nnumber:22,\naction:\"pause\",\ndescription:\"Background process cannot write to terminal output\",\nstandard:\"posix\"\n},\n{\nname:\"SIGURG\",\nnumber:23,\naction:\"ignore\",\ndescription:\"Socket received out-of-band data\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXCPU\",\nnumber:24,\naction:\"core\",\ndescription:\"Process timed out\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGXFSZ\",\nnumber:25,\naction:\"core\",\ndescription:\"File too big\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGVTALRM\",\nnumber:26,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGPROF\",\nnumber:27,\naction:\"terminate\",\ndescription:\"Timeout or timer\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGWINCH\",\nnumber:28,\naction:\"ignore\",\ndescription:\"Terminal window size changed\",\nstandard:\"bsd\"\n},\n{\nname:\"SIGIO\",\nnumber:29,\naction:\"terminate\",\ndescription:\"I/O is available\",\nstandard:\"other\"\n},\n{\nname:\"SIGPOLL\",\nnumber:29,\naction:\"terminate\",\ndescription:\"Watched event\",\nstandard:\"other\"\n},\n{\nname:\"SIGINFO\",\nnumber:29,\naction:\"ignore\",\ndescription:\"Request for process information\",\nstandard:\"other\"\n},\n{\nname:\"SIGPWR\",\nnumber:30,\naction:\"terminate\",\ndescription:\"Device running out of power\",\nstandard:\"systemv\"\n},\n{\nname:\"SIGSYS\",\nnumber:31,\naction:\"core\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n},\n{\nname:\"SIGUNUSED\",\nnumber:31,\naction:\"terminate\",\ndescription:\"Invalid system call\",\nstandard:\"other\"\n}];","import{constants}from\"node:os\";\n\nimport{SIGNALS}from\"./core.js\";\nimport{getRealtimeSignals}from\"./realtime.js\";\n\n\n\nexport const getSignals=()=>{\nconst realtimeSignals=getRealtimeSignals();\nconst signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);\nreturn signals;\n};\n\n\n\n\n\n\n\nconst normalizeSignal=({\nname,\nnumber:defaultNumber,\ndescription,\naction,\nforced=false,\nstandard\n})=>{\nconst{\nsignals:{[name]:constantSignal}\n}=constants;\nconst supported=constantSignal!==undefined;\nconst number=supported?constantSignal:defaultNumber;\nreturn{name,number,description,supported,action,forced,standard};\n};","import{constants}from\"node:os\";\n\nimport{SIGRTMAX}from\"./realtime.js\";\nimport{getSignals}from\"./signals.js\";\n\n\n\nconst getSignalsByName=()=>{\nconst signals=getSignals();\nreturn Object.fromEntries(signals.map(getSignalByName));\n};\n\nconst getSignalByName=({\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n})=>[name,{name,number,description,supported,action,forced,standard}];\n\nexport const signalsByName=getSignalsByName();\n\n\n\n\nconst getSignalsByNumber=()=>{\nconst signals=getSignals();\nconst length=SIGRTMAX+1;\nconst signalsA=Array.from({length},(value,number)=>\ngetSignalByNumber(number,signals));\n\nreturn Object.assign({},...signalsA);\n};\n\nconst getSignalByNumber=(number,signals)=>{\nconst signal=findSignalByNumber(number,signals);\n\nif(signal===undefined){\nreturn{};\n}\n\nconst{name,description,supported,action,forced,standard}=signal;\nreturn{\n[number]:{\nname,\nnumber,\ndescription,\nsupported,\naction,\nforced,\nstandard\n}\n};\n};\n\n\n\nconst findSignalByNumber=(number,signals)=>{\nconst signal=signals.find(({name})=>constants.signals[name]===number);\n\nif(signal!==undefined){\nreturn signal;\n}\n\nreturn signals.find((signalA)=>signalA.number===number);\n};\n\nexport const signalsByNumber=getSignalsByNumber();","import process from 'node:process';\nimport {signalsByName} from 'human-signals';\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nexport const makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\tescapedCommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout, cwd = process.cwd()}},\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.escapedCommand = escapedCommand;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\terror.cwd = cwd;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n","const aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nexport const normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\n// `ipc` is pushed unless it is already present\nexport const normalizeStdioNode = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n","// Note: since nyc uses this module to output coverage, any lines\n// that are in the direct sync flow of nyc's outputCoverage are\n// ignored, since we can never get coverage for them.\n// grab a reference to node's real process object right away\nvar process = global.process\n\nconst processOk = function (process) {\n return process &&\n typeof process === 'object' &&\n typeof process.removeListener === 'function' &&\n typeof process.emit === 'function' &&\n typeof process.reallyExit === 'function' &&\n typeof process.listeners === 'function' &&\n typeof process.kill === 'function' &&\n typeof process.pid === 'number' &&\n typeof process.on === 'function'\n}\n\n// some kind of non-node environment, just no-op\n/* istanbul ignore if */\nif (!processOk(process)) {\n module.exports = function () {\n return function () {}\n }\n} else {\n var assert = require('assert')\n var signals = require('./signals.js')\n var isWin = /^win/i.test(process.platform)\n\n var EE = require('events')\n /* istanbul ignore if */\n if (typeof EE !== 'function') {\n EE = EE.EventEmitter\n }\n\n var emitter\n if (process.__signal_exit_emitter__) {\n emitter = process.__signal_exit_emitter__\n } else {\n emitter = process.__signal_exit_emitter__ = new EE()\n emitter.count = 0\n emitter.emitted = {}\n }\n\n // Because this emitter is a global, we have to check to see if a\n // previous version of this library failed to enable infinite listeners.\n // I know what you're about to say. But literally everything about\n // signal-exit is a compromise with evil. Get used to it.\n if (!emitter.infinite) {\n emitter.setMaxListeners(Infinity)\n emitter.infinite = true\n }\n\n module.exports = function (cb, opts) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return function () {}\n }\n assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')\n\n if (loaded === false) {\n load()\n }\n\n var ev = 'exit'\n if (opts && opts.alwaysLast) {\n ev = 'afterexit'\n }\n\n var remove = function () {\n emitter.removeListener(ev, cb)\n if (emitter.listeners('exit').length === 0 &&\n emitter.listeners('afterexit').length === 0) {\n unload()\n }\n }\n emitter.on(ev, cb)\n\n return remove\n }\n\n var unload = function unload () {\n if (!loaded || !processOk(global.process)) {\n return\n }\n loaded = false\n\n signals.forEach(function (sig) {\n try {\n process.removeListener(sig, sigListeners[sig])\n } catch (er) {}\n })\n process.emit = originalProcessEmit\n process.reallyExit = originalProcessReallyExit\n emitter.count -= 1\n }\n module.exports.unload = unload\n\n var emit = function emit (event, code, signal) {\n /* istanbul ignore if */\n if (emitter.emitted[event]) {\n return\n }\n emitter.emitted[event] = true\n emitter.emit(event, code, signal)\n }\n\n // { : , ... }\n var sigListeners = {}\n signals.forEach(function (sig) {\n sigListeners[sig] = function listener () {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n // If there are no other listeners, an exit is coming!\n // Simplest way: remove us and then re-send the signal.\n // We know that this will kill the process, so we can\n // safely emit now.\n var listeners = process.listeners(sig)\n if (listeners.length === emitter.count) {\n unload()\n emit('exit', null, sig)\n /* istanbul ignore next */\n emit('afterexit', null, sig)\n /* istanbul ignore next */\n if (isWin && sig === 'SIGHUP') {\n // \"SIGHUP\" throws an `ENOSYS` error on Windows,\n // so use a supported signal instead\n sig = 'SIGINT'\n }\n /* istanbul ignore next */\n process.kill(process.pid, sig)\n }\n }\n })\n\n module.exports.signals = function () {\n return signals\n }\n\n var loaded = false\n\n var load = function load () {\n if (loaded || !processOk(global.process)) {\n return\n }\n loaded = true\n\n // This is the number of onSignalExit's that are in play.\n // It's important so that we can count the correct number of\n // listeners on signals, and don't wait for the other one to\n // handle it instead of us.\n emitter.count += 1\n\n signals = signals.filter(function (sig) {\n try {\n process.on(sig, sigListeners[sig])\n return true\n } catch (er) {\n return false\n }\n })\n\n process.emit = processEmit\n process.reallyExit = processReallyExit\n }\n module.exports.load = load\n\n var originalProcessReallyExit = process.reallyExit\n var processReallyExit = function processReallyExit (code) {\n /* istanbul ignore if */\n if (!processOk(global.process)) {\n return\n }\n process.exitCode = code || /* istanbul ignore next */ 0\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n originalProcessReallyExit.call(process, process.exitCode)\n }\n\n var originalProcessEmit = process.emit\n var processEmit = function processEmit (ev, arg) {\n if (ev === 'exit' && processOk(global.process)) {\n /* istanbul ignore else */\n if (arg !== undefined) {\n process.exitCode = arg\n }\n var ret = originalProcessEmit.apply(this, arguments)\n /* istanbul ignore next */\n emit('exit', process.exitCode, null)\n /* istanbul ignore next */\n emit('afterexit', process.exitCode, null)\n /* istanbul ignore next */\n return ret\n } else {\n return originalProcessEmit.apply(this, arguments)\n }\n }\n}\n","// This is not the set of all possible signals.\n//\n// It IS, however, the set of all signals that trigger\n// an exit on either Linux or BSD systems. Linux is a\n// superset of the signal names supported on BSD, and\n// the unknown signals just fail to register, so we can\n// catch that easily enough.\n//\n// Don't bother with SIGKILL. It's uncatchable, which\n// means that we can't fire any callbacks anyway.\n//\n// If a user does happen to register a handler on a non-\n// fatal signal like SIGWINCH or something, and then\n// exit, it'll end up firing `process.emit('exit')`, so\n// the handler will be fired anyway.\n//\n// SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised\n// artificially, inherently leave the process in a\n// state from which it is not safe to try and enter JS\n// listeners.\nmodule.exports = [\n 'SIGABRT',\n 'SIGALRM',\n 'SIGHUP',\n 'SIGINT',\n 'SIGTERM'\n]\n\nif (process.platform !== 'win32') {\n module.exports.push(\n 'SIGVTALRM',\n 'SIGXCPU',\n 'SIGXFSZ',\n 'SIGUSR2',\n 'SIGTRAP',\n 'SIGSYS',\n 'SIGQUIT',\n 'SIGIOT'\n // should detect profiler and enable/disable accordingly.\n // see #21\n // 'SIGPROF'\n )\n}\n\nif (process.platform === 'linux') {\n module.exports.push(\n 'SIGIO',\n 'SIGPOLL',\n 'SIGPWR',\n 'SIGSTKFLT',\n 'SIGUNUSED'\n )\n}\n","'use strict';\nconst {PassThrough: PassThroughStream} = require('stream');\n\nmodule.exports = options => {\n\toptions = {...options};\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst isBuffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || isBuffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (isBuffer) {\n\t\tencoding = null;\n\t}\n\n\tconst stream = new PassThroughStream({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tlet length = 0;\n\tconst chunks = [];\n\n\tstream.on('data', chunk => {\n\t\tchunks.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlength = chunks.length;\n\t\t} else {\n\t\t\tlength += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn chunks;\n\t\t}\n\n\t\treturn isBuffer ? Buffer.concat(chunks, length) : chunks.join('');\n\t};\n\n\tstream.getBufferedLength = () => length;\n\n\treturn stream;\n};\n","'use strict';\n\nconst { PassThrough } = require('stream');\n\nmodule.exports = function (/*streams...*/) {\n var sources = []\n var output = new PassThrough({objectMode: true})\n\n output.setMaxListeners(0)\n\n output.add = add\n output.isEmpty = isEmpty\n\n output.on('unpipe', remove)\n\n Array.prototype.slice.call(arguments).forEach(add)\n\n return output\n\n function add (source) {\n if (Array.isArray(source)) {\n source.forEach(add)\n return this\n }\n\n sources.push(source);\n source.once('end', remove.bind(null, source))\n source.once('error', output.emit.bind(output, 'error'))\n source.pipe(output, {end: false})\n return this\n }\n\n function isEmpty () {\n return sources.length == 0;\n }\n\n function remove (source) {\n sources = sources.filter(function (it) { return it !== source })\n if (!sources.length && output.readable) { output.end() }\n }\n}\n","import {Buffer} from 'node:buffer';\nimport {ChildProcess} from 'node:child_process';\n\nconst normalizeArgs = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn [file];\n\t}\n\n\treturn [file, ...args];\n};\n\nconst NO_ESCAPE_REGEXP = /^[\\w.-]+$/;\nconst DOUBLE_QUOTES_REGEXP = /\"/g;\n\nconst escapeArg = arg => {\n\tif (typeof arg !== 'string' || NO_ESCAPE_REGEXP.test(arg)) {\n\t\treturn arg;\n\t}\n\n\treturn `\"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\\\\"')}\"`;\n};\n\nexport const joinCommand = (file, args) => normalizeArgs(file, args).join(' ');\n\nexport const getEscapedCommand = (file, args) => normalizeArgs(file, args).map(arg => escapeArg(arg)).join(' ');\n\nconst SPACES_REGEXP = / +/g;\n\n// Handle `execaCommand()`\nexport const parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens[tokens.length - 1];\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nconst parseExpression = expression => {\n\tconst typeOfExpression = typeof expression;\n\n\tif (typeOfExpression === 'string') {\n\t\treturn expression;\n\t}\n\n\tif (typeOfExpression === 'number') {\n\t\treturn String(expression);\n\t}\n\n\tif (\n\t\ttypeOfExpression === 'object'\n\t\t&& expression !== null\n\t\t&& !(expression instanceof ChildProcess)\n\t\t&& 'stdout' in expression\n\t) {\n\t\tconst typeOfStdout = typeof expression.stdout;\n\n\t\tif (typeOfStdout === 'string') {\n\t\t\treturn expression.stdout;\n\t\t}\n\n\t\tif (Buffer.isBuffer(expression.stdout)) {\n\t\t\treturn expression.stdout.toString();\n\t\t}\n\n\t\tthrow new TypeError(`Unexpected \"${typeOfStdout}\" stdout in template expression`);\n\t}\n\n\tthrow new TypeError(`Unexpected \"${typeOfExpression}\" in template expression`);\n};\n\nconst concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0\n\t? [...tokens, ...nextTokens]\n\t: [\n\t\t...tokens.slice(0, -1),\n\t\t`${tokens[tokens.length - 1]}${nextTokens[0]}`,\n\t\t...nextTokens.slice(1),\n\t];\n\nconst parseTemplate = ({templates, expressions, tokens, index, template}) => {\n\tconst templateString = template ?? templates.raw[index];\n\tconst templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);\n\tconst newTokens = concatTokens(\n\t\ttokens,\n\t\ttemplateTokens,\n\t\ttemplateString.startsWith(' '),\n\t);\n\n\tif (index === expressions.length) {\n\t\treturn newTokens;\n\t}\n\n\tconst expression = expressions[index];\n\tconst expressionTokens = Array.isArray(expression)\n\t\t? expression.map(expression => parseExpression(expression))\n\t\t: [parseExpression(expression)];\n\treturn concatTokens(\n\t\tnewTokens,\n\t\texpressionTokens,\n\t\ttemplateString.endsWith(' '),\n\t);\n};\n\nexport const parseTemplates = (templates, expressions) => {\n\tlet tokens = [];\n\n\tfor (const [index, template] of templates.entries()) {\n\t\ttokens = parseTemplate({templates, expressions, tokens, index, template});\n\t}\n\n\treturn tokens;\n};\n\n","import {debuglog} from 'node:util';\nimport process from 'node:process';\n\nexport const verboseDefault = debuglog('execa').enabled;\n\nconst padField = (field, padding) => String(field).padStart(padding, '0');\n\nconst getTimestamp = () => {\n\tconst date = new Date();\n\treturn `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;\n};\n\nexport const logCommand = (escapedCommand, {verbose}) => {\n\tif (!verbose) {\n\t\treturn;\n\t}\n\n\tprocess.stderr.write(`[${getTimestamp()}] ${escapedCommand}\\n`);\n};\n","export default function stripFinalNewline(input) {\n\tconst LF = typeof input === 'string' ? '\\n' : '\\n'.charCodeAt();\n\tconst CR = typeof input === 'string' ? '\\r' : '\\r'.charCodeAt();\n\n\tif (input[input.length - 1] === LF) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\tif (input[input.length - 1] === CR) {\n\t\tinput = input.slice(0, -1);\n\t}\n\n\treturn input;\n}\n","\"use strict\";\n/**\n * This is the Posix implementation of isexe, which uses the file\n * mode and uid/gid values.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable according to the mode and\n * current (or specified) user and group IDs.\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable according to\n * the mode and current (or specified) user and group IDs.\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkStat = (stat, options) => stat.isFile() && checkMode(stat, options);\nconst checkMode = (stat, options) => {\n const myUid = options.uid ?? process.getuid?.();\n const myGroups = options.groups ?? process.getgroups?.() ?? [];\n const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];\n if (myUid === undefined || myGid === undefined) {\n throw new Error('cannot get uid or gid');\n }\n const groups = new Set([myGid, ...myGroups]);\n const mod = stat.mode;\n const uid = stat.uid;\n const gid = stat.gid;\n const u = parseInt('100', 8);\n const g = parseInt('010', 8);\n const o = parseInt('001', 8);\n const ug = u | g;\n return !!(mod & o ||\n (mod & g && groups.has(gid)) ||\n (mod & u && uid === myUid) ||\n (mod & ug && myUid === 0));\n};\n//# sourceMappingURL=posix.js.map","\"use strict\";\n/**\n * This is the Windows implementation of isexe, which uses the file\n * extension and PATHEXT setting.\n *\n * @module\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = void 0;\nconst fs_1 = require(\"fs\");\nconst promises_1 = require(\"fs/promises\");\n/**\n * Determine whether a path is executable based on the file extension\n * and PATHEXT environment variable (or specified pathExt option)\n */\nconst isexe = async (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat(await (0, promises_1.stat)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.isexe = isexe;\n/**\n * Synchronously determine whether a path is executable based on the file\n * extension and PATHEXT environment variable (or specified pathExt option)\n */\nconst sync = (path, options = {}) => {\n const { ignoreErrors = false } = options;\n try {\n return checkStat((0, fs_1.statSync)(path), path, options);\n }\n catch (e) {\n const er = e;\n if (ignoreErrors || er.code === 'EACCES')\n return false;\n throw er;\n }\n};\nexports.sync = sync;\nconst checkPathExt = (path, options) => {\n const { pathExt = process.env.PATHEXT || '' } = options;\n const peSplit = pathExt.split(';');\n if (peSplit.indexOf('') !== -1) {\n return true;\n }\n for (let i = 0; i < peSplit.length; i++) {\n const p = peSplit[i].toLowerCase();\n const ext = path.substring(path.length - p.length).toLowerCase();\n if (p && ext === p) {\n return true;\n }\n }\n return false;\n};\nconst checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options);\n//# sourceMappingURL=win32.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=options.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sync = exports.isexe = exports.posix = exports.win32 = void 0;\nconst posix = __importStar(require(\"./posix.js\"));\nexports.posix = posix;\nconst win32 = __importStar(require(\"./win32.js\"));\nexports.win32 = win32;\n__exportStar(require(\"./options.js\"), exports);\nconst platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform;\nconst impl = platform === 'win32' ? win32 : posix;\n/**\n * Determine whether a path is executable on the current platform.\n */\nexports.isexe = impl.isexe;\n/**\n * Synchronously determine whether a path is executable on the\n * current platform.\n */\nexports.sync = impl.sync;\n//# sourceMappingURL=index.js.map","const { isexe, sync: isexeSync } = require('isexe')\nconst { join, delimiter, sep, posix } = require('path')\n\nconst isWindows = process.platform === 'win32'\n\n// used to check for slashed in commands passed in. always checks for the posix\n// seperator on all platforms, and checks for the current separator when not on\n// a posix platform. don't use the isWindows check for this since that is mocked\n// in tests but we still need the code to actually work when called. that is also\n// why it is ignored from coverage.\n/* istanbul ignore next */\nconst rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\\\)/g, '\\\\$1'))\nconst rRel = new RegExp(`^\\\\.${rSlash.source}`)\n\nconst getNotFoundError = (cmd) =>\n Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' })\n\nconst getPathInfo = (cmd, {\n path: optPath = process.env.PATH,\n pathExt: optPathExt = process.env.PATHEXT,\n delimiter: optDelimiter = delimiter,\n}) => {\n // If it has a slash, then we don't bother searching the pathenv.\n // just check the file itself, and that's it.\n const pathEnv = cmd.match(rSlash) ? [''] : [\n // windows always checks the cwd first\n ...(isWindows ? [process.cwd()] : []),\n ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter),\n ]\n\n if (isWindows) {\n const pathExtExe = optPathExt ||\n ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter)\n const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()])\n if (cmd.includes('.') && pathExt[0] !== '') {\n pathExt.unshift('')\n }\n return { pathEnv, pathExt, pathExtExe }\n }\n\n return { pathEnv, pathExt: [''] }\n}\n\nconst getPathPart = (raw, cmd) => {\n const pathPart = /^\".*\"$/.test(raw) ? raw.slice(1, -1) : raw\n const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : ''\n return prefix + join(pathPart, cmd)\n}\n\nconst which = async (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const envPart of pathEnv) {\n const p = getPathPart(envPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nconst whichSync = (cmd, opt = {}) => {\n const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt)\n const found = []\n\n for (const pathEnvPart of pathEnv) {\n const p = getPathPart(pathEnvPart, cmd)\n\n for (const ext of pathExt) {\n const withExt = p + ext\n const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true })\n if (is) {\n if (!opt.all) {\n return withExt\n }\n found.push(withExt)\n }\n }\n }\n\n if (opt.all && found.length) {\n return found\n }\n\n if (opt.nothrow) {\n return null\n }\n\n throw getNotFoundError(cmd)\n}\n\nmodule.exports = which\nwhich.sync = whichSync\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar sign = Math.sign;\n\tif (typeof sign !== \"function\") return false;\n\treturn sign(10) === 1 && sign(-20) === -1;\n};\n","// Internal method, used by iteration functions.\n// Calls a function for each key-value pair found in object\n// Optionally takes compareFn to iterate object in specific order\n\n\"use strict\";\n\nvar callable = require(\"./valid-callable\")\n , value = require(\"./valid-value\")\n , bind = Function.prototype.bind\n , call = Function.prototype.call\n , keys = Object.keys\n , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nmodule.exports = function (method, defVal) {\n\treturn function (obj, cb /*, thisArg, compareFn*/) {\n\t\tvar list, thisArg = arguments[2], compareFn = arguments[3];\n\t\tobj = Object(value(obj));\n\t\tcallable(cb);\n\n\t\tlist = keys(obj);\n\t\tif (compareFn) {\n\t\t\tlist.sort(typeof compareFn === \"function\" ? bind.call(compareFn, obj) : undefined);\n\t\t}\n\t\tif (typeof method !== \"function\") method = list[method];\n\t\treturn call.call(method, list, function (key, index) {\n\t\t\tif (!objPropertyIsEnumerable.call(obj, key)) return defVal;\n\t\t\treturn call.call(cb, thisArg, obj[key], key, obj, index);\n\t\t});\n\t};\n};\n","\"use strict\";\n\nmodule.exports = function () {\n\tvar assign = Object.assign, obj;\n\tif (typeof assign !== \"function\") return false;\n\tobj = { foo: \"raz\" };\n\tassign(obj, { bar: \"dwa\" }, { trzy: \"trzy\" });\n\treturn obj.foo + obj.bar + obj.trzy === \"razdwatrzy\";\n};\n","\"use strict\";\n\nvar _undefined = require(\"../function/noop\")(); // Support ES3 engines\n\nmodule.exports = function (val) { return val !== _undefined && val !== null; };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar forEach = Array.prototype.forEach, create = Object.create;\n\nvar process = function (src, obj) {\n\tvar key;\n\tfor (key in src) obj[key] = src[key];\n};\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function (opts1 /*, …options*/) {\n\tvar result = create(null);\n\tforEach.call(arguments, function (options) {\n\t\tif (!isValue(options)) return;\n\t\tprocess(Object(options), result);\n\t});\n\treturn result;\n};\n","\"use strict\";\n\nvar sign = require(\"../math/sign\")\n , abs = Math.abs\n , floor = Math.floor;\n\nmodule.exports = function (value) {\n\tif (isNaN(value)) return 0;\n\tvalue = Number(value);\n\tif (value === 0 || !isFinite(value)) return value;\n\treturn sign(value) * floor(abs(value));\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Math.sign : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function (value) {\n\tvalue = Number(value);\n\tif (isNaN(value) || value === 0) return value;\n\treturn value > 0 ? 1 : -1;\n};\n","\"use strict\";\n\nvar toInteger = require(\"./to-integer\")\n , max = Math.max;\n\nmodule.exports = function (value) { return max(0, toInteger(value)); };\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\");\n\nmodule.exports = function (optsLength, fnLength, isAsync) {\n\tvar length;\n\tif (isNaN(optsLength)) {\n\t\tlength = fnLength;\n\t\tif (!(length >= 0)) return 1;\n\t\tif (isAsync && length) return length - 1;\n\t\treturn length;\n\t}\n\tif (optsLength === false) return false;\n\treturn toPosInt(optsLength);\n};\n","\"use strict\";\n\nmodule.exports = function (fn) {\n\tif (typeof fn !== \"function\") throw new TypeError(fn + \" is not a function\");\n\treturn fn;\n};\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) throw new TypeError(\"Cannot use null or undefined\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./_iterate\")(\"forEach\");\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.assign : require(\"./shim\");\n","\"use strict\";\n\nvar keys = require(\"../keys\")\n , value = require(\"../valid-value\")\n , max = Math.max;\n\nmodule.exports = function (dest, src /*, …srcn*/) {\n\tvar error, i, length = max(arguments.length, 2), assign;\n\tdest = Object(value(dest));\n\tassign = function (key) {\n\t\ttry {\n\t\t\tdest[key] = src[key];\n\t\t} catch (e) {\n\t\t\tif (!error) error = e;\n\t\t}\n\t};\n\tfor (i = 1; i < length; ++i) {\n\t\tsrc = arguments[i];\n\t\tkeys(src).forEach(assign);\n\t}\n\tif (error !== undefined) throw error;\n\treturn dest;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? Object.keys : require(\"./shim\");\n","\"use strict\";\n\nmodule.exports = function () {\n\ttry {\n\t\tObject.keys(\"primitive\");\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isValue = require(\"../is-value\");\n\nvar keys = Object.keys;\n\nmodule.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };\n","\"use strict\";\n\nvar isValue = require(\"./is-value\");\n\nvar map = { function: true, object: true };\n\nmodule.exports = function (value) { return (isValue(value) && map[typeof value]) || false; };\n","\"use strict\";\n\nvar assign = require(\"../object/assign\")\n , isObject = require(\"../object/is-object\")\n , isValue = require(\"../object/is-value\")\n , captureStackTrace = Error.captureStackTrace;\n\nmodule.exports = function (message /*, code, ext*/) {\n\tvar err = new Error(message), code = arguments[1], ext = arguments[2];\n\tif (!isValue(ext)) {\n\t\tif (isObject(code)) {\n\t\t\text = code;\n\t\t\tcode = null;\n\t\t}\n\t}\n\tif (isValue(ext)) assign(err, ext);\n\tif (isValue(code)) err.code = code;\n\tif (captureStackTrace) captureStackTrace(err, module.exports);\n\treturn err;\n};\n","\"use strict\";\n\nvar toPosInt = require(\"../number/to-pos-integer\");\n\nvar test = function (arg1, arg2) { return arg2; };\n\nvar desc, defineProperty, generate, mixin;\n\ntry {\n\tObject.defineProperty(test, \"length\", {\n\t\tconfigurable: true,\n\t\twritable: false,\n\t\tenumerable: false,\n\t\tvalue: 1\n\t});\n}\ncatch (ignore) {}\n\nif (test.length === 1) {\n\t// ES6\n\tdesc = { configurable: true, writable: false, enumerable: false };\n\tdefineProperty = Object.defineProperty;\n\tmodule.exports = function (fn, length) {\n\t\tlength = toPosInt(length);\n\t\tif (fn.length === length) return fn;\n\t\tdesc.value = length;\n\t\treturn defineProperty(fn, \"length\", desc);\n\t};\n} else {\n\tmixin = require(\"../object/mixin\");\n\tgenerate = (function () {\n\t\tvar cache = [];\n\t\treturn function (length) {\n\t\t\tvar args, i = 0;\n\t\t\tif (cache[length]) return cache[length];\n\t\t\targs = [];\n\t\t\twhile (length--) args.push(\"a\" + (++i).toString(36));\n\t\t\t// eslint-disable-next-line no-new-func\n\t\t\treturn new Function(\n\t\t\t\t\"fn\",\n\t\t\t\t\"return function (\" + args.join(\", \") + \") { return fn.apply(this, arguments); };\"\n\t\t\t);\n\t\t};\n\t})();\n\tmodule.exports = function (src, length) {\n\t\tvar target;\n\t\tlength = toPosInt(length);\n\t\tif (src.length === length) return src;\n\t\ttarget = generate(length)(src);\n\t\ttry { mixin(target, src); }\n\t\tcatch (ignore) {}\n\t\treturn target;\n\t};\n}\n","\"use strict\";\n\n// ES3 safe\nvar _undefined = void 0;\n\nmodule.exports = function (value) { return value !== _undefined && value !== null; };\n","\"use strict\";\n\nvar isValue = require(\"../value/is\");\n\n// prettier-ignore\nvar possibleTypes = { \"object\": true, \"function\": true, \"undefined\": true /* document.all */ };\n\nmodule.exports = function (value) {\n\tif (!isValue(value)) return false;\n\treturn hasOwnProperty.call(possibleTypes, typeof value);\n};\n","\"use strict\";\n\nvar isPrototype = require(\"../prototype/is\");\n\nmodule.exports = function (value) {\n\tif (typeof value !== \"function\") return false;\n\n\tif (!hasOwnProperty.call(value, \"length\")) return false;\n\n\ttry {\n\t\tif (typeof value.length !== \"number\") return false;\n\t\tif (typeof value.call !== \"function\") return false;\n\t\tif (typeof value.apply !== \"function\") return false;\n\t} catch (error) {\n\t\treturn false;\n\t}\n\n\treturn !isPrototype(value);\n};\n","\"use strict\";\n\nvar isObject = require(\"../object/is\");\n\nmodule.exports = function (value) {\n\tif (!isObject(value)) return false;\n\ttry {\n\t\tif (!value.constructor) return false;\n\t\treturn value.constructor.prototype === value;\n\t} catch (error) {\n\t\treturn false;\n\t}\n};\n","\"use strict\";\n\nvar isFunction = require(\"../function/is\");\n\nvar classRe = /^\\s*class[\\s{/}]/, functionToString = Function.prototype.toString;\n\nmodule.exports = function (value) {\n\tif (!isFunction(value)) return false;\n\tif (classRe.test(functionToString.call(value))) return false;\n\treturn true;\n};\n","\"use strict\";\n\nvar str = \"razdwatrzy\";\n\nmodule.exports = function () {\n\tif (typeof str.contains !== \"function\") return false;\n\treturn str.contains(\"dwa\") === true && str.contains(\"foo\") === false;\n};\n","\"use strict\";\n\nmodule.exports = require(\"./is-implemented\")() ? String.prototype.contains : require(\"./shim\");\n","\"use strict\";\n\nvar indexOf = String.prototype.indexOf;\n\nmodule.exports = function (searchString /*, position*/) {\n\treturn indexOf.call(this, searchString, arguments[1]) > -1;\n};\n","\"use strict\";\n\nvar isValue = require(\"type/value/is\")\n , isPlainFunction = require(\"type/plain-function/is\")\n , assign = require(\"es5-ext/object/assign\")\n , normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , contains = require(\"es5-ext/string/#/contains\");\n\nvar d = (module.exports = function (dscr, value/*, options*/) {\n\tvar c, e, w, options, desc;\n\tif (arguments.length < 2 || typeof dscr !== \"string\") {\n\t\toptions = value;\n\t\tvalue = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[2];\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t\tw = contains.call(dscr, \"w\");\n\t} else {\n\t\tc = w = true;\n\t\te = false;\n\t}\n\n\tdesc = { value: value, configurable: c, enumerable: e, writable: w };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n});\n\nd.gs = function (dscr, get, set/*, options*/) {\n\tvar c, e, options, desc;\n\tif (typeof dscr !== \"string\") {\n\t\toptions = set;\n\t\tset = get;\n\t\tget = dscr;\n\t\tdscr = null;\n\t} else {\n\t\toptions = arguments[3];\n\t}\n\tif (!isValue(get)) {\n\t\tget = undefined;\n\t} else if (!isPlainFunction(get)) {\n\t\toptions = get;\n\t\tget = set = undefined;\n\t} else if (!isValue(set)) {\n\t\tset = undefined;\n\t} else if (!isPlainFunction(set)) {\n\t\toptions = set;\n\t\tset = undefined;\n\t}\n\tif (isValue(dscr)) {\n\t\tc = contains.call(dscr, \"c\");\n\t\te = contains.call(dscr, \"e\");\n\t} else {\n\t\tc = true;\n\t\te = false;\n\t}\n\n\tdesc = { get: get, set: set, configurable: c, enumerable: e };\n\treturn !options ? desc : assign(normalizeOpts(options), desc);\n};\n","'use strict';\n\nvar d = require('d')\n , callable = require('es5-ext/object/valid-callable')\n\n , apply = Function.prototype.apply, call = Function.prototype.call\n , create = Object.create, defineProperty = Object.defineProperty\n , defineProperties = Object.defineProperties\n , hasOwnProperty = Object.prototype.hasOwnProperty\n , descriptor = { configurable: true, enumerable: false, writable: true }\n\n , on, once, off, emit, methods, descriptors, base;\n\non = function (type, listener) {\n\tvar data;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) {\n\t\tdata = descriptor.value = create(null);\n\t\tdefineProperty(this, '__ee__', descriptor);\n\t\tdescriptor.value = null;\n\t} else {\n\t\tdata = this.__ee__;\n\t}\n\tif (!data[type]) data[type] = listener;\n\telse if (typeof data[type] === 'object') data[type].push(listener);\n\telse data[type] = [data[type], listener];\n\n\treturn this;\n};\n\nonce = function (type, listener) {\n\tvar once, self;\n\n\tcallable(listener);\n\tself = this;\n\ton.call(this, type, once = function () {\n\t\toff.call(self, type, once);\n\t\tapply.call(listener, this, arguments);\n\t});\n\n\tonce.__eeOnceListener__ = listener;\n\treturn this;\n};\n\noff = function (type, listener) {\n\tvar data, listeners, candidate, i;\n\n\tcallable(listener);\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return this;\n\tdata = this.__ee__;\n\tif (!data[type]) return this;\n\tlisteners = data[type];\n\n\tif (typeof listeners === 'object') {\n\t\tfor (i = 0; (candidate = listeners[i]); ++i) {\n\t\t\tif ((candidate === listener) ||\n\t\t\t\t\t(candidate.__eeOnceListener__ === listener)) {\n\t\t\t\tif (listeners.length === 2) data[type] = listeners[i ? 0 : 1];\n\t\t\t\telse listeners.splice(i, 1);\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ((listeners === listener) ||\n\t\t\t\t(listeners.__eeOnceListener__ === listener)) {\n\t\t\tdelete data[type];\n\t\t}\n\t}\n\n\treturn this;\n};\n\nemit = function (type) {\n\tvar i, l, listener, listeners, args;\n\n\tif (!hasOwnProperty.call(this, '__ee__')) return;\n\tlisteners = this.__ee__[type];\n\tif (!listeners) return;\n\n\tif (typeof listeners === 'object') {\n\t\tl = arguments.length;\n\t\targs = new Array(l - 1);\n\t\tfor (i = 1; i < l; ++i) args[i - 1] = arguments[i];\n\n\t\tlisteners = listeners.slice();\n\t\tfor (i = 0; (listener = listeners[i]); ++i) {\n\t\t\tapply.call(listener, this, args);\n\t\t}\n\t} else {\n\t\tswitch (arguments.length) {\n\t\tcase 1:\n\t\t\tcall.call(listeners, this);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcall.call(listeners, this, arguments[1]);\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcall.call(listeners, this, arguments[1], arguments[2]);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tl = arguments.length;\n\t\t\targs = new Array(l - 1);\n\t\t\tfor (i = 1; i < l; ++i) {\n\t\t\t\targs[i - 1] = arguments[i];\n\t\t\t}\n\t\t\tapply.call(listeners, this, args);\n\t\t}\n\t}\n};\n\nmethods = {\n\ton: on,\n\tonce: once,\n\toff: off,\n\temit: emit\n};\n\ndescriptors = {\n\ton: d(on),\n\tonce: d(once),\n\toff: d(off),\n\temit: d(emit)\n};\n\nbase = defineProperties({}, descriptors);\n\nmodule.exports = exports = function (o) {\n\treturn (o == null) ? create(base) : defineProperties(Object(o), descriptors);\n};\nexports.methods = methods;\n","\"use strict\";\n\nvar toArray = require(\"es5-ext/array/to-array\")\n , isValue = require(\"es5-ext/object/is-value\")\n , callable = require(\"es5-ext/object/valid-callable\");\n\nvar slice = Array.prototype.slice, resolveArgs;\n\nresolveArgs = function (args) {\n\treturn this.map(function (resolve, i) { return resolve ? resolve(args[i]) : args[i]; }).concat(\n\t\tslice.call(args, this.length)\n\t);\n};\n\nmodule.exports = function (resolvers) {\n\tresolvers = toArray(resolvers);\n\tresolvers.forEach(function (resolve) { if (isValue(resolve)) callable(resolve); });\n\treturn resolveArgs.bind(resolvers);\n};\n","\"use strict\";\n\nvar from = require(\"./from\")\n , isArray = Array.isArray;\n\nmodule.exports = function (arrayLike) { return isArray(arrayLike) ? arrayLike : from(arrayLike); };\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\");\n\nmodule.exports = function (userNormalizer) {\n\tvar normalizer;\n\tif (typeof userNormalizer === \"function\") return { set: userNormalizer, get: userNormalizer };\n\tnormalizer = { get: callable(userNormalizer.get) };\n\tif (userNormalizer.set !== undefined) {\n\t\tnormalizer.set = callable(userNormalizer.set);\n\t\tif (userNormalizer.delete) normalizer.delete = callable(userNormalizer.delete);\n\t\tif (userNormalizer.clear) normalizer.clear = callable(userNormalizer.clear);\n\t\treturn normalizer;\n\t}\n\tnormalizer.set = normalizer.get;\n\treturn normalizer;\n};\n","/* eslint no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n\"use strict\";\n\nvar customError = require(\"es5-ext/error/custom\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , d = require(\"d\")\n , ee = require(\"event-emitter\").methods\n , resolveResolve = require(\"./resolve-resolve\")\n , resolveNormalize = require(\"./resolve-normalize\");\n\nvar apply = Function.prototype.apply\n , call = Function.prototype.call\n , create = Object.create\n , defineProperties = Object.defineProperties\n , on = ee.on\n , emit = ee.emit;\n\nmodule.exports = function (original, length, options) {\n\tvar cache = create(null)\n\t , conf\n\t , memLength\n\t , get\n\t , set\n\t , del\n\t , clear\n\t , extDel\n\t , extGet\n\t , extHas\n\t , normalizer\n\t , getListeners\n\t , setListeners\n\t , deleteListeners\n\t , memoized\n\t , resolve;\n\tif (length !== false) memLength = length;\n\telse if (isNaN(original.length)) memLength = 1;\n\telse memLength = original.length;\n\n\tif (options.normalizer) {\n\t\tnormalizer = resolveNormalize(options.normalizer);\n\t\tget = normalizer.get;\n\t\tset = normalizer.set;\n\t\tdel = normalizer.delete;\n\t\tclear = normalizer.clear;\n\t}\n\tif (options.resolvers != null) resolve = resolveResolve(options.resolvers);\n\n\tif (get) {\n\t\tmemoized = defineLength(function (arg) {\n\t\t\tvar id, result, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id !== null) {\n\t\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\t\treturn cache[id];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (id === null) {\n\t\t\t\tid = get(args);\n\t\t\t\tif (id !== null) throw customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t\tid = set(args);\n\t\t\t} else if (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\tmemoized = function () {\n\t\t\tvar result;\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", \"data\", arguments, this);\n\t\t\t\treturn cache.data;\n\t\t\t}\n\t\t\tif (arguments.length) result = apply.call(original, this, arguments);\n\t\t\telse result = call.call(original, this);\n\t\t\tif (hasOwnProperty.call(cache, \"data\")) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache.data = result;\n\t\t\tif (setListeners) conf.emit(\"set\", \"data\", null, result);\n\t\t\treturn result;\n\t\t};\n\t} else {\n\t\tmemoized = function (arg) {\n\t\t\tvar result, args = arguments, id;\n\t\t\tif (resolve) args = resolve(arguments);\n\t\t\tid = String(args[0]);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tif (getListeners) conf.emit(\"get\", id, args, this);\n\t\t\t\treturn cache[id];\n\t\t\t}\n\t\t\tif (args.length === 1) result = call.call(original, this, args[0]);\n\t\t\telse result = apply.call(original, this, args);\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tthrow customError(\"Circular invocation\", \"CIRCULAR_INVOCATION\");\n\t\t\t}\n\t\t\tcache[id] = result;\n\t\t\tif (setListeners) conf.emit(\"set\", id, null, result);\n\t\t\treturn result;\n\t\t};\n\t}\n\tconf = {\n\t\toriginal: original,\n\t\tmemoized: memoized,\n\t\tprofileName: options.profileName,\n\t\tget: function (args) {\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tif (get) return get(args);\n\t\t\treturn String(args[0]);\n\t\t},\n\t\thas: function (id) { return hasOwnProperty.call(cache, id); },\n\t\tdelete: function (id) {\n\t\t\tvar result;\n\t\t\tif (!hasOwnProperty.call(cache, id)) return;\n\t\t\tif (del) del(id);\n\t\t\tresult = cache[id];\n\t\t\tdelete cache[id];\n\t\t\tif (deleteListeners) conf.emit(\"delete\", id, result);\n\t\t},\n\t\tclear: function () {\n\t\t\tvar oldCache = cache;\n\t\t\tif (clear) clear();\n\t\t\tcache = create(null);\n\t\t\tconf.emit(\"clear\", oldCache);\n\t\t},\n\t\ton: function (type, listener) {\n\t\t\tif (type === \"get\") getListeners = true;\n\t\t\telse if (type === \"set\") setListeners = true;\n\t\t\telse if (type === \"delete\") deleteListeners = true;\n\t\t\treturn on.call(this, type, listener);\n\t\t},\n\t\temit: emit,\n\t\tupdateEnv: function () { original = conf.original; },\n\t};\n\tif (get) {\n\t\textDel = defineLength(function (arg) {\n\t\t\tvar id, args = arguments;\n\t\t\tif (resolve) args = resolve(args);\n\t\t\tid = get(args);\n\t\t\tif (id === null) return;\n\t\t\tconf.delete(id);\n\t\t}, memLength);\n\t} else if (length === 0) {\n\t\textDel = function () { return conf.delete(\"data\"); };\n\t} else {\n\t\textDel = function (arg) {\n\t\t\tif (resolve) arg = resolve(arguments)[0];\n\t\t\treturn conf.delete(arg);\n\t\t};\n\t}\n\textGet = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return cache.data;\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\treturn cache[id];\n\t});\n\textHas = defineLength(function () {\n\t\tvar id, args = arguments;\n\t\tif (length === 0) return conf.has(\"data\");\n\t\tif (resolve) args = resolve(args);\n\t\tif (get) id = get(args);\n\t\telse id = String(args[0]);\n\t\tif (id === null) return false;\n\t\treturn conf.has(id);\n\t});\n\tdefineProperties(memoized, {\n\t\t__memoized__: d(true),\n\t\tdelete: d(extDel),\n\t\tclear: d(conf.clear),\n\t\t_get: d(extGet),\n\t\t_has: d(extHas),\n\t});\n\treturn conf;\n};\n","\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"./lib/registered-extensions\")\n , configure = require(\"./lib/configure-map\")\n , resolveLength = require(\"./lib/resolve-length\");\n\nmodule.exports = function self(fn/*, options */) {\n\tvar options, length, conf;\n\n\tcallable(fn);\n\toptions = Object(arguments[1]);\n\n\tif (options.async && options.promise) {\n\t\tthrow new Error(\"Options 'async' and 'promise' cannot be used together\");\n\t}\n\n\t// Do not memoize already memoized function\n\tif (hasOwnProperty.call(fn, \"__memoized__\") && !options.force) return fn;\n\n\t// Resolve length;\n\tlength = resolveLength(options.length, fn.length, options.async && extensions.async);\n\n\t// Configure cache map\n\tconf = configure(fn, length, options);\n\n\t// Bind eventual extensions\n\tforEach(extensions, function (extFn, name) {\n\t\tif (options[name]) extFn(options[name], conf, options);\n\t});\n\n\tif (self.__profiler__) self.__profiler__(conf);\n\n\tconf.updateEnv();\n\treturn conf.memoized;\n};\n","\"use strict\";\n\nvar normalizeOpts = require(\"es5-ext/object/normalize-options\")\n , resolveLength = require(\"./lib/resolve-length\")\n , plain = require(\"./plain\");\n\nmodule.exports = function (fn/*, options*/) {\n\tvar options = normalizeOpts(arguments[1]), length;\n\n\tif (!options.normalizer) {\n\t\tlength = options.length = resolveLength(options.length, fn.length, options.async);\n\t\tif (length !== 0) {\n\t\t\tif (options.primitive) {\n\t\t\t\tif (length === false) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/primitive\");\n\t\t\t\t} else if (length > 1) {\n\t\t\t\t\toptions.normalizer = require(\"./normalizers/get-primitive-fixed\")(length);\n\t\t\t\t}\n\t\t\t} else if (length === false) options.normalizer = require(\"./normalizers/get\")();\n\t\t\telse if (length === 1) options.normalizer = require(\"./normalizers/get-1\")();\n\t\t\telse options.normalizer = require(\"./normalizers/get-fixed\")(length);\n\t\t}\n\t}\n\n\t// Assure extensions\n\tif (options.async) require(\"./ext/async\");\n\tif (options.promise) require(\"./ext/promise\");\n\tif (options.dispose) require(\"./ext/dispose\");\n\tif (options.maxAge) require(\"./ext/max-age\");\n\tif (options.max) require(\"./ext/max\");\n\tif (options.refCounter) require(\"./ext/ref-counter\");\n\n\treturn plain(fn, options);\n};\n","\"use strict\";\n\nmodule.exports = function (args) {\n\tvar id, i, length = args.length;\n\tif (!length) return \"\\u0002\";\n\tid = String(args[(i = 0)]);\n\twhile (--length) id += \"\\u0001\" + args[++i];\n\treturn id;\n};\n","\"use strict\";\n\nmodule.exports = function (length) {\n\tif (!length) {\n\t\treturn function () { return \"\"; };\n\t}\n\treturn function (args) {\n\t\tvar id = String(args[0]), i = 0, currentLength = length;\n\t\twhile (--currentLength) {\n\t\t\tid += \"\\u0001\" + args[++i];\n\t\t}\n\t\treturn id;\n\t};\n};\n","/* eslint max-statements: 0 */\n\n\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nvar create = Object.create;\n\nmodule.exports = function () {\n\tvar lastId = 0, map = [], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) return set[length] || null;\n\t\t\tif ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) return null;\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\treturn set[1][i] || null;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i, length = args.length;\n\t\t\tif (length === 0) {\n\t\t\t\tset[length] = ++lastId;\n\t\t\t} else {\n\t\t\t\tif (!set[length]) {\n\t\t\t\t\tset[length] = [[], []];\n\t\t\t\t}\n\t\t\t\tset = set[length];\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t\t}\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t}\n\t\t\t\tset[1][i] = ++lastId;\n\t\t\t}\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, args = cache[id], length = args.length, path = [];\n\t\t\tif (length === 0) {\n\t\t\t\tdelete set[length];\n\t\t\t} else if ((set = set[length])) {\n\t\t\t\twhile (index < length - 1) {\n\t\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\t\tif (i === -1) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tpath.push(set, i);\n\t\t\t\t\tset = set[1][i];\n\t\t\t\t\t++index;\n\t\t\t\t}\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tid = set[1][i];\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\t\ti = path.pop();\n\t\t\t\t\tset = path.pop();\n\t\t\t\t\tset[0].splice(i, 1);\n\t\t\t\t\tset[1].splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\");\n\nmodule.exports = function () {\n\tvar lastId = 0, argsMap = [], cache = [];\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = indexOf.call(argsMap, args[0]);\n\t\t\treturn index === -1 ? null : cache[index];\n\t\t},\n\t\tset: function (args) {\n\t\t\targsMap.push(args[0]);\n\t\t\tcache.push(++lastId);\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = indexOf.call(cache, id);\n\t\t\tif (index !== -1) {\n\t\t\t\targsMap.splice(index, 1);\n\t\t\t\tcache.splice(index, 1);\n\t\t\t}\n\t\t},\n\t\tclear: function () {\n\t\t\targsMap = [];\n\t\t\tcache = [];\n\t\t},\n\t};\n};\n","\"use strict\";\n\nvar indexOf = require(\"es5-ext/array/#/e-index-of\")\n , create = Object.create;\n\nmodule.exports = function (length) {\n\tvar lastId = 0, map = [[], []], cache = create(null);\n\treturn {\n\t\tget: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) return null;\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) return null;\n\t\t\treturn set[1][i] || null;\n\t\t},\n\t\tset: function (args) {\n\t\t\tvar index = 0, set = map, i;\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t\t\tset[1].push([[], []]);\n\t\t\t\t}\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\ti = set[0].push(args[index]) - 1;\n\t\t\t}\n\t\t\tset[1][i] = ++lastId;\n\t\t\tcache[lastId] = args;\n\t\t\treturn lastId;\n\t\t},\n\t\tdelete: function (id) {\n\t\t\tvar index = 0, set = map, i, path = [], args = cache[id];\n\t\t\twhile (index < length - 1) {\n\t\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\t\tif (i === -1) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpath.push(set, i);\n\t\t\t\tset = set[1][i];\n\t\t\t\t++index;\n\t\t\t}\n\t\t\ti = indexOf.call(set[0], args[index]);\n\t\t\tif (i === -1) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tid = set[1][i];\n\t\t\tset[0].splice(i, 1);\n\t\t\tset[1].splice(i, 1);\n\t\t\twhile (!set[0].length && path.length) {\n\t\t\t\ti = path.pop();\n\t\t\t\tset = path.pop();\n\t\t\t\tset[0].splice(i, 1);\n\t\t\t\tset[1].splice(i, 1);\n\t\t\t}\n\t\t\tdelete cache[id];\n\t\t},\n\t\tclear: function () {\n\t\t\tmap = [[], []];\n\t\t\tcache = create(null);\n\t\t},\n\t};\n};\n","/* eslint consistent-this: 0, no-shadow:0, no-eq-null: 0, eqeqeq: 0, no-unused-vars: 0 */\n\n// Support for asynchronous functions\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , objectMap = require(\"es5-ext/object/map\")\n , mixin = require(\"es5-ext/object/mixin\")\n , defineLength = require(\"es5-ext/function/_define-length\")\n , nextTick = require(\"next-tick\");\n\nvar slice = Array.prototype.slice, apply = Function.prototype.apply, create = Object.create;\n\nrequire(\"../lib/registered-extensions\").async = function (tbi, conf) {\n\tvar waiting = create(null)\n\t , cache = create(null)\n\t , base = conf.memoized\n\t , original = conf.original\n\t , currentCallback\n\t , currentContext\n\t , currentArgs;\n\n\t// Initial\n\tconf.memoized = defineLength(function (arg) {\n\t\tvar args = arguments, last = args[args.length - 1];\n\t\tif (typeof last === \"function\") {\n\t\t\tcurrentCallback = last;\n\t\t\targs = slice.call(args, 0, -1);\n\t\t}\n\t\treturn base.apply((currentContext = this), (currentArgs = args));\n\t}, base);\n\ttry { mixin(conf.memoized, base); }\n\tcatch (ignore) {}\n\n\t// From cache (sync)\n\tconf.on(\"get\", function (id) {\n\t\tvar cb, context, args;\n\t\tif (!currentCallback) return;\n\n\t\t// Unresolved\n\t\tif (waiting[id]) {\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback];\n\t\t\telse waiting[id].push(currentCallback);\n\t\t\tcurrentCallback = null;\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolved, assure next tick invocation\n\t\tcb = currentCallback;\n\t\tcontext = currentContext;\n\t\targs = currentArgs;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\tnextTick(function () {\n\t\t\tvar data;\n\t\t\tif (hasOwnProperty.call(cache, id)) {\n\t\t\t\tdata = cache[id];\n\t\t\t\tconf.emit(\"getasync\", id, args, context);\n\t\t\t\tapply.call(cb, data.context, data.args);\n\t\t\t} else {\n\t\t\t\t// Purged in a meantime, we shouldn't rely on cached value, recall\n\t\t\t\tcurrentCallback = cb;\n\t\t\t\tcurrentContext = context;\n\t\t\t\tcurrentArgs = args;\n\t\t\t\tbase.apply(context, args);\n\t\t\t}\n\t\t});\n\t});\n\n\t// Not from cache\n\tconf.original = function () {\n\t\tvar args, cb, origCb, result;\n\t\tif (!currentCallback) return apply.call(original, this, arguments);\n\t\targs = aFrom(arguments);\n\t\tcb = function self(err) {\n\t\t\tvar cb, args, id = self.id;\n\t\t\tif (id == null) {\n\t\t\t\t// Shouldn't happen, means async callback was called sync way\n\t\t\t\tnextTick(apply.bind(self, this, arguments));\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tdelete self.id;\n\t\t\tcb = waiting[id];\n\t\t\tdelete waiting[id];\n\t\t\tif (!cb) {\n\t\t\t\t// Already processed,\n\t\t\t\t// outcome of race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\targs = aFrom(arguments);\n\t\t\tif (conf.has(id)) {\n\t\t\t\tif (err) {\n\t\t\t\t\tconf.delete(id);\n\t\t\t\t} else {\n\t\t\t\t\tcache[id] = { context: this, args: args };\n\t\t\t\t\tconf.emit(\"setasync\", id, typeof cb === \"function\" ? 1 : cb.length);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof cb === \"function\") {\n\t\t\t\tresult = apply.call(cb, this, args);\n\t\t\t} else {\n\t\t\t\tcb.forEach(function (cb) { result = apply.call(cb, this, args); }, this);\n\t\t\t}\n\t\t\treturn result;\n\t\t};\n\t\torigCb = currentCallback;\n\t\tcurrentCallback = currentContext = currentArgs = null;\n\t\targs.push(cb);\n\t\tresult = apply.call(original, this, args);\n\t\tcb.cb = origCb;\n\t\tcurrentCallback = cb;\n\t\treturn result;\n\t};\n\n\t// After not from cache call\n\tconf.on(\"set\", function (id) {\n\t\tif (!currentCallback) {\n\t\t\tconf.delete(id);\n\t\t\treturn;\n\t\t}\n\t\tif (waiting[id]) {\n\t\t\t// Race condition: asyncFn(1, cb), asyncFn.clear(), asyncFn(1, cb)\n\t\t\tif (typeof waiting[id] === \"function\") waiting[id] = [waiting[id], currentCallback.cb];\n\t\t\telse waiting[id].push(currentCallback.cb);\n\t\t} else {\n\t\t\twaiting[id] = currentCallback.cb;\n\t\t}\n\t\tdelete currentCallback.cb;\n\t\tcurrentCallback.id = id;\n\t\tcurrentCallback = null;\n\t});\n\n\t// On delete\n\tconf.on(\"delete\", function (id) {\n\t\tvar result;\n\t\t// If false, we don't have value yet, so we assume that intention is not\n\t\t// to memoize this call. After value is obtained we don't cache it but\n\t\t// gracefully pass to callback\n\t\tif (hasOwnProperty.call(waiting, id)) return;\n\t\tif (!cache[id]) return;\n\t\tresult = cache[id];\n\t\tdelete cache[id];\n\t\tconf.emit(\"deleteasync\", id, slice.call(result.args, 1));\n\t});\n\n\t// On clear\n\tconf.on(\"clear\", function () {\n\t\tvar oldCache = cache;\n\t\tcache = create(null);\n\t\tconf.emit(\n\t\t\t\"clearasync\", objectMap(oldCache, function (data) { return slice.call(data.args, 1); })\n\t\t);\n\t});\n};\n","// Call dispose callback on each cache purge\n\n\"use strict\";\n\nvar callable = require(\"es5-ext/object/valid-callable\")\n , forEach = require(\"es5-ext/object/for-each\")\n , extensions = require(\"../lib/registered-extensions\")\n , apply = Function.prototype.apply;\n\nextensions.dispose = function (dispose, conf, options) {\n\tvar del;\n\tcallable(dispose);\n\tif ((options.async && extensions.async) || (options.promise && extensions.promise)) {\n\t\tconf.on(\n\t\t\t\"deleteasync\",\n\t\t\t(del = function (id, resultArray) { apply.call(dispose, null, resultArray); })\n\t\t);\n\t\tconf.on(\"clearasync\", function (cache) {\n\t\t\tforEach(cache, function (result, id) { del(id, result); });\n\t\t});\n\t\treturn;\n\t}\n\tconf.on(\"delete\", (del = function (id, result) { dispose(result); }));\n\tconf.on(\"clear\", function (cache) {\n\t\tforEach(cache, function (result, id) { del(id, result); });\n\t});\n};\n","/* eslint consistent-this: 0 */\n\n// Timeout cached values\n\n\"use strict\";\n\nvar aFrom = require(\"es5-ext/array/from\")\n , forEach = require(\"es5-ext/object/for-each\")\n , nextTick = require(\"next-tick\")\n , isPromise = require(\"is-promise\")\n , timeout = require(\"timers-ext/valid-timeout\")\n , extensions = require(\"../lib/registered-extensions\");\n\nvar noop = Function.prototype, max = Math.max, min = Math.min, create = Object.create;\n\nextensions.maxAge = function (maxAge, conf, options) {\n\tvar timeouts, postfix, preFetchAge, preFetchTimeouts;\n\n\tmaxAge = timeout(maxAge);\n\tif (!maxAge) return;\n\n\ttimeouts = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\tconf.on(\"set\" + postfix, function (id) {\n\t\ttimeouts[id] = setTimeout(function () { conf.delete(id); }, maxAge);\n\t\tif (typeof timeouts[id].unref === \"function\") timeouts[id].unref();\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id]) {\n\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\t}\n\t\tpreFetchTimeouts[id] = setTimeout(function () {\n\t\t\tdelete preFetchTimeouts[id];\n\t\t}, preFetchAge);\n\t\tif (typeof preFetchTimeouts[id].unref === \"function\") preFetchTimeouts[id].unref();\n\t});\n\tconf.on(\"delete\" + postfix, function (id) {\n\t\tclearTimeout(timeouts[id]);\n\t\tdelete timeouts[id];\n\t\tif (!preFetchTimeouts) return;\n\t\tif (preFetchTimeouts[id] !== \"nextTick\") clearTimeout(preFetchTimeouts[id]);\n\t\tdelete preFetchTimeouts[id];\n\t});\n\n\tif (options.preFetch) {\n\t\tif (options.preFetch === true || isNaN(options.preFetch)) {\n\t\t\tpreFetchAge = 0.333;\n\t\t} else {\n\t\t\tpreFetchAge = max(min(Number(options.preFetch), 1), 0);\n\t\t}\n\t\tif (preFetchAge) {\n\t\t\tpreFetchTimeouts = {};\n\t\t\tpreFetchAge = (1 - preFetchAge) * maxAge;\n\t\t\tconf.on(\"get\" + postfix, function (id, args, context) {\n\t\t\t\tif (!preFetchTimeouts[id]) {\n\t\t\t\t\tpreFetchTimeouts[id] = \"nextTick\";\n\t\t\t\t\tnextTick(function () {\n\t\t\t\t\t\tvar result;\n\t\t\t\t\t\tif (preFetchTimeouts[id] !== \"nextTick\") return;\n\t\t\t\t\t\tdelete preFetchTimeouts[id];\n\t\t\t\t\t\tconf.delete(id);\n\t\t\t\t\t\tif (options.async) {\n\t\t\t\t\t\t\targs = aFrom(args);\n\t\t\t\t\t\t\targs.push(noop);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tresult = conf.memoized.apply(context, args);\n\t\t\t\t\t\tif (options.promise) {\n\t\t\t\t\t\t\t// Supress eventual error warnings\n\t\t\t\t\t\t\tif (isPromise(result)) {\n\t\t\t\t\t\t\t\tif (typeof result.done === \"function\") result.done(noop, noop);\n\t\t\t\t\t\t\t\telse result.then(noop, noop);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tconf.on(\"clear\" + postfix, function () {\n\t\tforEach(timeouts, function (id) { clearTimeout(id); });\n\t\ttimeouts = {};\n\t\tif (preFetchTimeouts) {\n\t\t\tforEach(preFetchTimeouts, function (id) { if (id !== \"nextTick\") clearTimeout(id); });\n\t\t\tpreFetchTimeouts = {};\n\t\t}\n\t});\n};\n","\"use strict\";\n\nvar toPosInt = require(\"es5-ext/number/to-pos-integer\")\n , maxTimeout = require(\"./max-timeout\");\n\nmodule.exports = function (value) {\n\tvalue = toPosInt(value);\n\tif (value > maxTimeout) throw new TypeError(value + \" exceeds maximum possible timeout\");\n\treturn value;\n};\n","\"use strict\";\n\nmodule.exports = 2147483647;\n","// Limit cache size, LRU (least recently used) algorithm.\n\n\"use strict\";\n\nvar toPosInteger = require(\"es5-ext/number/to-pos-integer\")\n , lruQueue = require(\"lru-queue\")\n , extensions = require(\"../lib/registered-extensions\");\n\nextensions.max = function (max, conf, options) {\n\tvar postfix, queue, hit;\n\n\tmax = toPosInteger(max);\n\tif (!max) return;\n\n\tqueue = lruQueue(max);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\n\t\t\"set\" + postfix,\n\t\t(hit = function (id) {\n\t\t\tid = queue.hit(id);\n\t\t\tif (id === undefined) return;\n\t\t\tconf.delete(id);\n\t\t})\n\t);\n\tconf.on(\"get\" + postfix, hit);\n\tconf.on(\"delete\" + postfix, queue.delete);\n\tconf.on(\"clear\" + postfix, queue.clear);\n};\n","'use strict';\n\nvar toPosInt = require('es5-ext/number/to-pos-integer')\n\n , create = Object.create, hasOwnProperty = Object.prototype.hasOwnProperty;\n\nmodule.exports = function (limit) {\n\tvar size = 0, base = 1, queue = create(null), map = create(null), index = 0, del;\n\tlimit = toPosInt(limit);\n\treturn {\n\t\thit: function (id) {\n\t\t\tvar oldIndex = map[id], nuIndex = ++index;\n\t\t\tqueue[nuIndex] = id;\n\t\t\tmap[id] = nuIndex;\n\t\t\tif (!oldIndex) {\n\t\t\t\t++size;\n\t\t\t\tif (size <= limit) return;\n\t\t\t\tid = queue[base];\n\t\t\t\tdel(id);\n\t\t\t\treturn id;\n\t\t\t}\n\t\t\tdelete queue[oldIndex];\n\t\t\tif (base !== oldIndex) return;\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tdelete: del = function (id) {\n\t\t\tvar oldIndex = map[id];\n\t\t\tif (!oldIndex) return;\n\t\t\tdelete queue[oldIndex];\n\t\t\tdelete map[id];\n\t\t\t--size;\n\t\t\tif (base !== oldIndex) return;\n\t\t\tif (!size) {\n\t\t\t\tindex = 0;\n\t\t\t\tbase = 1;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\twhile (!hasOwnProperty.call(queue, ++base)) continue; //jslint: skip\n\t\t},\n\t\tclear: function () {\n\t\t\tsize = 0;\n\t\t\tbase = 1;\n\t\t\tqueue = create(null);\n\t\t\tmap = create(null);\n\t\t\tindex = 0;\n\t\t}\n\t};\n};\n","// Reference counter, useful for garbage collector like functionality\n\n\"use strict\";\n\nvar d = require(\"d\")\n , extensions = require(\"../lib/registered-extensions\")\n , create = Object.create\n , defineProperties = Object.defineProperties;\n\nextensions.refCounter = function (ignore, conf, options) {\n\tvar cache, postfix;\n\n\tcache = create(null);\n\tpostfix =\n\t\t(options.async && extensions.async) || (options.promise && extensions.promise)\n\t\t\t? \"async\"\n\t\t\t: \"\";\n\n\tconf.on(\"set\" + postfix, function (id, length) { cache[id] = length || 1; });\n\tconf.on(\"get\" + postfix, function (id) { ++cache[id]; });\n\tconf.on(\"delete\" + postfix, function (id) { delete cache[id]; });\n\tconf.on(\"clear\" + postfix, function () { cache = {}; });\n\n\tdefineProperties(conf.memoized, {\n\t\tdeleteRef: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return null;\n\t\t\tif (!cache[id]) return null;\n\t\t\tif (!--cache[id]) {\n\t\t\t\tconf.delete(id);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}),\n\t\tgetRefCount: d(function () {\n\t\t\tvar id = conf.get(arguments);\n\t\t\tif (id === null) return 0;\n\t\t\tif (!cache[id]) return 0;\n\t\t\treturn cache[id];\n\t\t}),\n\t});\n};\n","const os = require(\"os\");\r\n\r\n// to detect on with os user had used path.resolve(...)\r\nconst is_posix_os = (os.platform() !== \"win32\");\r\nconst version = os.release();\r\n\r\n// For some windows version (Windows 10 v1803), it is not useful to escape spaces in path\r\n// https://docs.microsoft.com/en-us/windows/release-information/\r\nconst windows_version_regex = /(\\d+\\.\\d+)\\.(\\d+)/;\r\nconst should_not_escape = (major_release = \"\", os_build = \"\") =>\r\n /1\\d+\\.\\d+/.test(major_release) && Number(os_build) >= 17134.1184;\r\n\r\nmodule.exports = function (given_path) {\r\n return (is_posix_os)\r\n // for posix path, escape is simple\r\n ? given_path.replace(/(\\s+)/g, '\\\\$1')\r\n // for windows, it depend of the build\r\n : (should_not_escape(...windows_version_regex.exec(version).splice(1)))\r\n // on major version, no need to escape anymore\r\n // https://support.microsoft.com/en-us/help/4467268/url-encoded-unc-paths-not-url-decoded-in-windows-10-version-1803-later\r\n ? given_path\r\n // on older version, replace space with symbol %20\r\n : given_path.replace(/(\\s+)/g, '%20');\r\n};","// Generated by CoffeeScript 1.10.0\n(function() {\n var regexEscape, reverse;\n\n regexEscape = require('escape-string-regexp');\n\n reverse = function(s) {\n return s.split('').reverse().join('');\n };\n\n module.exports = function(s, chars, escapeChar) {\n var regex;\n if (chars == null) {\n chars = '\\'';\n }\n if (escapeChar == null) {\n escapeChar = '\\\\';\n }\n if (typeof s !== 'string') {\n return s;\n }\n regex = new RegExp(\"([\" + (regexEscape(chars)) + \"])(?!\" + (regexEscape(escapeChar)) + \")\", 'g');\n return reverse(reverse(s).replace(regex, \"$1\" + escapeChar));\n };\n\n}).call(this);\n","'use strict';\n\nvar matchOperatorsRe = /[|\\\\{}()[\\]^$+*?.]/g;\n\nmodule.exports = function (str) {\n\tif (typeof str !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn str.replace(matchOperatorsRe, '\\\\$&');\n};\n","(function () {\n\n 'use strict';\n\n var root = this;\n\n\n //=========//\n // GLOBALS //\n //=========//\n\n var locales = {};\n\n\n //==========//\n // EXPOSING //\n //==========//\n\n var moduleDefinition = {\n create: factory,\n addLocale: addLocale,\n pluralize: pluralize\n };\n\n if ('undefined' !== typeof module && 'undefined' !== typeof module.exports) {\n module.exports = moduleDefinition;\n } else {\n root.numerous = moduleDefinition;\n }\n\n\n //==================//\n // PUBLIC FUNCTIONS //\n //==================//\n\n /**\n * Creates new instance of numerous.\n *\n * @param {string} locale\n * @returns {object}\n */\n function factory (locale) {\n\n checkLocale(locale);\n\n return {\n pluralize: function (value, variants) {\n return pluralize(locale, value, variants);\n }\n };\n }\n\n /**\n * Adds pluralization function for specified locale.\n * Usually externally called by locale itself.\n *\n * @param {string} locale\n * @param {function} callable\n */\n function addLocale (locale, callable) {\n locales[locale] = callable;\n }\n\n /**\n * Returns variant from the specified list of variants\n * according to the specified value and locale.\n *\n * @param {string} locale\n * @param {int} value\n * @param {object} variants\n */\n function pluralize (locale, value, variants) {\n\n checkLocale(locale);\n\n if ('object' !== typeof variants) {\n throw new Error('List of variants should be specified as an object');\n }\n\n var key = locales[locale](value);\n\n return ('undefined' !== typeof variants[key] ? variants[key] : null);\n }\n\n\n //===================//\n // PRIVATE FUNCTIONS //\n //===================//\n\n /**\n * Returns true if specified locale is loaded, false otherwise.\n *\n * @param {string} locale\n *\n * @returns {boolean}\n */\n function hasLocale (locale) {\n return ('undefined' !== typeof locales[locale]);\n }\n\n /**\n * Checks if locale is loaded. If not, tries to load it.\n *\n * @param {string} locale\n */\n function checkLocale (locale) {\n if (!hasLocale(locale)) {\n requireLocale(locale);\n }\n }\n\n /**\n * Tries to load the specified locale.\n *\n * @param {string} locale\n */\n function requireLocale (locale) {\n try {\n require(__dirname + '/../locales/' + locale + '.js');\n } catch (error) {\n throw Error('Failed to load the following locale: ' + locale);\n }\n }\n\n}).call(this);\n","module.exports = require('./lib/numerous.js');\n","(function () {\n var root = this;\n var numerous;\n if ('function' === typeof require) {\n numerous = require('../lib/numerous.js');\n } else {\n numerous = root.numerous;\n }\n numerous.addLocale('en', function pluralize_en(n /*``*/ ) {\n var i = Math.floor(Math.abs(n)),\n v = n.toString().replace(/^[^.]*\\.?/, \"\").length;\n if (typeof n === \"string\") n = parseInt(n, 10);\n if (i === 1 && v === 0) return \"one\";\n return \"other\"\n });\n}).call(this);","// Coding standard for this project defined @ https://github.com/MatthewSH/standards/blob/master/JavaScript.md\n'use strict';\n\nexports = module.exports = !!(typeof process !== 'undefined' && process.versions && process.versions.node);\n","\nmodule.exports = require('./lib/time-delta.js');\n","module.exports = {\n \"id\": \"en\",\n \"data\": {\n \"long\": {\n \"years\": {\n \"one\": \"{0} year\",\n \"other\": \"{0} years\"\n },\n \"months\": {\n \"one\": \"{0} month\",\n \"other\": \"{0} months\"\n },\n \"weeks\": {\n \"one\": \"{0} week\",\n \"other\": \"{0} weeks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hour\",\n \"other\": \"{0} hours\"\n },\n \"minutes\": {\n \"one\": \"{0} minute\",\n \"other\": \"{0} minutes\"\n },\n \"seconds\": {\n \"one\": \"{0} second\",\n \"other\": \"{0} seconds\"\n }\n },\n \"narrow\": {\n \"years\": {\n \"one\": \"{0}y\",\n \"other\": \"{0}y\"\n },\n \"months\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"weeks\": {\n \"one\": \"{0}w\",\n \"other\": \"{0}w\"\n },\n \"days\": {\n \"one\": \"{0}d\",\n \"other\": \"{0}d\"\n },\n \"hours\": {\n \"one\": \"{0}h\",\n \"other\": \"{0}h\"\n },\n \"minutes\": {\n \"one\": \"{0}m\",\n \"other\": \"{0}m\"\n },\n \"seconds\": {\n \"one\": \"{0}s\",\n \"other\": \"{0}s\"\n }\n },\n \"short\": {\n \"years\": {\n \"one\": \"{0} yr\",\n \"other\": \"{0} yrs\"\n },\n \"months\": {\n \"one\": \"{0} mth\",\n \"other\": \"{0} mths\"\n },\n \"weeks\": {\n \"one\": \"{0} wk\",\n \"other\": \"{0} wks\"\n },\n \"days\": {\n \"one\": \"{0} day\",\n \"other\": \"{0} days\"\n },\n \"hours\": {\n \"one\": \"{0} hr\",\n \"other\": \"{0} hr\"\n },\n \"minutes\": {\n \"one\": \"{0} min\",\n \"other\": \"{0} min\"\n },\n \"seconds\": {\n \"one\": \"{0} sec\",\n \"other\": \"{0} sec\"\n }\n }\n }\n};\n","// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nconst SEMVER_SPEC_VERSION = '2.0.0'\n\nconst MAX_LENGTH = 256\nconst MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n/* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nconst MAX_SAFE_COMPONENT_LENGTH = 16\n\n// Max safe length for a build identifier. The max length minus 6 characters for\n// the shortest version with a build 0.0.0+BUILD.\nconst MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\nconst RELEASE_TYPES = [\n 'major',\n 'premajor',\n 'minor',\n 'preminor',\n 'patch',\n 'prepatch',\n 'prerelease',\n]\n\nmodule.exports = {\n MAX_LENGTH,\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_SAFE_INTEGER,\n RELEASE_TYPES,\n SEMVER_SPEC_VERSION,\n FLAG_INCLUDE_PRERELEASE: 0b001,\n FLAG_LOOSE: 0b010,\n}\n","const debug = (\n typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)\n) ? (...args) => console.error('SEMVER', ...args)\n : () => {}\n\nmodule.exports = debug\n","const {\n MAX_SAFE_COMPONENT_LENGTH,\n MAX_SAFE_BUILD_LENGTH,\n MAX_LENGTH,\n} = require('./constants')\nconst debug = require('./debug')\nexports = module.exports = {}\n\n// The actual regexps go on exports.re\nconst re = exports.re = []\nconst safeRe = exports.safeRe = []\nconst src = exports.src = []\nconst t = exports.t = {}\nlet R = 0\n\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nconst safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nconst makeSafeRegex = (value) => {\n for (const [token, max] of safeRegexReplacements) {\n value = value\n .split(`${token}*`).join(`${token}{0,${max}}`)\n .split(`${token}+`).join(`${token}{1,${max}}`)\n }\n return value\n}\n\nconst createToken = (name, value, isGlobal) => {\n const safe = makeSafeRegex(value)\n const index = R++\n debug(name, index, value)\n t[name] = index\n src[index] = value\n re[index] = new RegExp(value, isGlobal ? 'g' : undefined)\n safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ncreateToken('NUMERICIDENTIFIER', '0|[1-9]\\\\d*')\ncreateToken('NUMERICIDENTIFIERLOOSE', '\\\\d+')\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ncreateToken('NONNUMERICIDENTIFIER', `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ncreateToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIER]})`)\n\ncreateToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})\\\\.` +\n `(${src[t.NUMERICIDENTIFIERLOOSE]})`)\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ncreateToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\ncreateToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]\n}|${src[t.NONNUMERICIDENTIFIER]})`)\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ncreateToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIER]})*))`)\n\ncreateToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]\n}(?:\\\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ncreateToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ncreateToken('BUILD', `(?:\\\\+(${src[t.BUILDIDENTIFIER]\n}(?:\\\\.${src[t.BUILDIDENTIFIER]})*))`)\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ncreateToken('FULLPLAIN', `v?${src[t.MAINVERSION]\n}${src[t.PRERELEASE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('FULL', `^${src[t.FULLPLAIN]}$`)\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ncreateToken('LOOSEPLAIN', `[v=\\\\s]*${src[t.MAINVERSIONLOOSE]\n}${src[t.PRERELEASELOOSE]}?${\n src[t.BUILD]}?`)\n\ncreateToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)\n\ncreateToken('GTLT', '((?:<|>)?=?)')\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ncreateToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\\\*`)\ncreateToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\\\*`)\n\ncreateToken('XRANGEPLAIN', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIER]})` +\n `(?:${src[t.PRERELEASE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGEPLAINLOOSE', `[v=\\\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:\\\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +\n `(?:${src[t.PRERELEASELOOSE]})?${\n src[t.BUILD]}?` +\n `)?)?`)\n\ncreateToken('XRANGE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAIN]}$`)\ncreateToken('XRANGELOOSE', `^${src[t.GTLT]}\\\\s*${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ncreateToken('COERCEPLAIN', `${'(^|[^\\\\d])' +\n '(\\\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +\n `(?:\\\\.(\\\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)\ncreateToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\\\d])`)\ncreateToken('COERCEFULL', src[t.COERCEPLAIN] +\n `(?:${src[t.PRERELEASE]})?` +\n `(?:${src[t.BUILD]})?` +\n `(?:$|[^\\\\d])`)\ncreateToken('COERCERTL', src[t.COERCE], true)\ncreateToken('COERCERTLFULL', src[t.COERCEFULL], true)\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ncreateToken('LONETILDE', '(?:~>?)')\n\ncreateToken('TILDETRIM', `(\\\\s*)${src[t.LONETILDE]}\\\\s+`, true)\nexports.tildeTrimReplace = '$1~'\n\ncreateToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ncreateToken('LONECARET', '(?:\\\\^)')\n\ncreateToken('CARETTRIM', `(\\\\s*)${src[t.LONECARET]}\\\\s+`, true)\nexports.caretTrimReplace = '$1^'\n\ncreateToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)\ncreateToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ncreateToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\\\s*(${src[t.LOOSEPLAIN]})$|^$`)\ncreateToken('COMPARATOR', `^${src[t.GTLT]}\\\\s*(${src[t.FULLPLAIN]})$|^$`)\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ncreateToken('COMPARATORTRIM', `(\\\\s*)${src[t.GTLT]\n}\\\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)\nexports.comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ncreateToken('HYPHENRANGE', `^\\\\s*(${src[t.XRANGEPLAIN]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAIN]})` +\n `\\\\s*$`)\n\ncreateToken('HYPHENRANGELOOSE', `^\\\\s*(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s+-\\\\s+` +\n `(${src[t.XRANGEPLAINLOOSE]})` +\n `\\\\s*$`)\n\n// Star ranges basically just allow anything at all.\ncreateToken('STAR', '(<|>)?=?\\\\s*\\\\*')\n// >=0.0.0 is like a star\ncreateToken('GTE0', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0\\\\s*$')\ncreateToken('GTE0PRE', '^\\\\s*>=\\\\s*0\\\\.0\\\\.0-0\\\\s*$')\n","// parse out just the options we care about\nconst looseOption = Object.freeze({ loose: true })\nconst emptyOpts = Object.freeze({ })\nconst parseOptions = options => {\n if (!options) {\n return emptyOpts\n }\n\n if (typeof options !== 'object') {\n return looseOption\n }\n\n return options\n}\nmodule.exports = parseOptions\n","const numeric = /^[0-9]+$/\nconst compareIdentifiers = (a, b) => {\n const anum = numeric.test(a)\n const bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nconst rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)\n\nmodule.exports = {\n compareIdentifiers,\n rcompareIdentifiers,\n}\n","const debug = require('../internal/debug')\nconst { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst parseOptions = require('../internal/parse-options')\nconst { compareIdentifiers } = require('../internal/identifiers')\nclass SemVer {\n constructor (version, options) {\n options = parseOptions(options)\n\n if (version instanceof SemVer) {\n if (version.loose === !!options.loose &&\n version.includePrerelease === !!options.includePrerelease) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError(`Invalid version. Must be a string. Got type \"${typeof version}\".`)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError(\n `version is longer than ${MAX_LENGTH} characters`\n )\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n // this isn't actually relevant for versions, but keep it so that we\n // don't run into trouble passing this.options around.\n this.includePrerelease = !!options.includePrerelease\n\n const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError(`Invalid Version: ${version}`)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map((id) => {\n if (/^[0-9]+$/.test(id)) {\n const num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n }\n\n format () {\n this.version = `${this.major}.${this.minor}.${this.patch}`\n if (this.prerelease.length) {\n this.version += `-${this.prerelease.join('.')}`\n }\n return this.version\n }\n\n toString () {\n return this.version\n }\n\n compare (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n if (typeof other === 'string' && other === this.version) {\n return 0\n }\n other = new SemVer(other, this.options)\n }\n\n if (other.version === this.version) {\n return 0\n }\n\n return this.compareMain(other) || this.comparePre(other)\n }\n\n compareMain (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return (\n compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n )\n }\n\n comparePre (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n let i = 0\n do {\n const a = this.prerelease[i]\n const b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n compareBuild (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n let i = 0\n do {\n const a = this.build[i]\n const b = other.build[i]\n debug('build compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n }\n\n // preminor will bump the version up to the next minor release, and immediately\n // down to pre-release. premajor and prepatch work the same way.\n inc (release, identifier, identifierBase) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier, identifierBase)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier, identifierBase)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier, identifierBase)\n this.inc('pre', identifier, identifierBase)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier, identifierBase)\n }\n this.inc('pre', identifier, identifierBase)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (\n this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0\n ) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.\n case 'pre': {\n const base = Number(identifierBase) ? 1 : 0\n\n if (!identifier && identifierBase === false) {\n throw new Error('invalid increment argument: identifier is empty')\n }\n\n if (this.prerelease.length === 0) {\n this.prerelease = [base]\n } else {\n let i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n if (identifier === this.prerelease.join('.') && identifierBase === false) {\n throw new Error('invalid increment argument: identifier already exists')\n }\n this.prerelease.push(base)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n let prerelease = [identifier, base]\n if (identifierBase === false) {\n prerelease = [identifier]\n }\n if (compareIdentifiers(this.prerelease[0], identifier) === 0) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = prerelease\n }\n } else {\n this.prerelease = prerelease\n }\n }\n break\n }\n default:\n throw new Error(`invalid increment argument: ${release}`)\n }\n this.raw = this.format()\n if (this.build.length) {\n this.raw += `+${this.build.join('.')}`\n }\n return this\n }\n}\n\nmodule.exports = SemVer\n","const SemVer = require('../classes/semver')\nconst parse = (version, options, throwErrors = false) => {\n if (version instanceof SemVer) {\n return version\n }\n try {\n return new SemVer(version, options)\n } catch (er) {\n if (!throwErrors) {\n return null\n }\n throw er\n }\n}\n\nmodule.exports = parse\n","const parse = require('./parse')\nconst valid = (version, options) => {\n const v = parse(version, options)\n return v ? v.version : null\n}\nmodule.exports = valid\n","const parse = require('./parse')\nconst clean = (version, options) => {\n const s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\nmodule.exports = clean\n","const SemVer = require('../classes/semver')\n\nconst inc = (version, release, options, identifier, identifierBase) => {\n if (typeof (options) === 'string') {\n identifierBase = identifier\n identifier = options\n options = undefined\n }\n\n try {\n return new SemVer(\n version instanceof SemVer ? version.version : version,\n options\n ).inc(release, identifier, identifierBase).version\n } catch (er) {\n return null\n }\n}\nmodule.exports = inc\n","const parse = require('./parse.js')\n\nconst diff = (version1, version2) => {\n const v1 = parse(version1, null, true)\n const v2 = parse(version2, null, true)\n const comparison = v1.compare(v2)\n\n if (comparison === 0) {\n return null\n }\n\n const v1Higher = comparison > 0\n const highVersion = v1Higher ? v1 : v2\n const lowVersion = v1Higher ? v2 : v1\n const highHasPre = !!highVersion.prerelease.length\n const lowHasPre = !!lowVersion.prerelease.length\n\n if (lowHasPre && !highHasPre) {\n // Going from prerelease -> no prerelease requires some special casing\n\n // If the low version has only a major, then it will always be a major\n // Some examples:\n // 1.0.0-1 -> 1.0.0\n // 1.0.0-1 -> 1.1.1\n // 1.0.0-1 -> 2.0.0\n if (!lowVersion.patch && !lowVersion.minor) {\n return 'major'\n }\n\n // Otherwise it can be determined by checking the high version\n\n if (highVersion.patch) {\n // anything higher than a patch bump would result in the wrong version\n return 'patch'\n }\n\n if (highVersion.minor) {\n // anything higher than a minor bump would result in the wrong version\n return 'minor'\n }\n\n // bumping major/minor/patch all have same result\n return 'major'\n }\n\n // add the `pre` prefix if we are going to a prerelease version\n const prefix = highHasPre ? 'pre' : ''\n\n if (v1.major !== v2.major) {\n return prefix + 'major'\n }\n\n if (v1.minor !== v2.minor) {\n return prefix + 'minor'\n }\n\n if (v1.patch !== v2.patch) {\n return prefix + 'patch'\n }\n\n // high and low are preleases\n return 'prerelease'\n}\n\nmodule.exports = diff\n","const SemVer = require('../classes/semver')\nconst major = (a, loose) => new SemVer(a, loose).major\nmodule.exports = major\n","const SemVer = require('../classes/semver')\nconst minor = (a, loose) => new SemVer(a, loose).minor\nmodule.exports = minor\n","const SemVer = require('../classes/semver')\nconst patch = (a, loose) => new SemVer(a, loose).patch\nmodule.exports = patch\n","const parse = require('./parse')\nconst prerelease = (version, options) => {\n const parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\nmodule.exports = prerelease\n","const SemVer = require('../classes/semver')\nconst compare = (a, b, loose) =>\n new SemVer(a, loose).compare(new SemVer(b, loose))\n\nmodule.exports = compare\n","const compare = require('./compare')\nconst rcompare = (a, b, loose) => compare(b, a, loose)\nmodule.exports = rcompare\n","const compare = require('./compare')\nconst compareLoose = (a, b) => compare(a, b, true)\nmodule.exports = compareLoose\n","const SemVer = require('../classes/semver')\nconst compareBuild = (a, b, loose) => {\n const versionA = new SemVer(a, loose)\n const versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\nmodule.exports = compareBuild\n","const compareBuild = require('./compare-build')\nconst sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))\nmodule.exports = sort\n","const compareBuild = require('./compare-build')\nconst rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))\nmodule.exports = rsort\n","const compare = require('./compare')\nconst gt = (a, b, loose) => compare(a, b, loose) > 0\nmodule.exports = gt\n","const compare = require('./compare')\nconst lt = (a, b, loose) => compare(a, b, loose) < 0\nmodule.exports = lt\n","const compare = require('./compare')\nconst eq = (a, b, loose) => compare(a, b, loose) === 0\nmodule.exports = eq\n","const compare = require('./compare')\nconst neq = (a, b, loose) => compare(a, b, loose) !== 0\nmodule.exports = neq\n","const compare = require('./compare')\nconst gte = (a, b, loose) => compare(a, b, loose) >= 0\nmodule.exports = gte\n","const compare = require('./compare')\nconst lte = (a, b, loose) => compare(a, b, loose) <= 0\nmodule.exports = lte\n","const eq = require('./eq')\nconst neq = require('./neq')\nconst gt = require('./gt')\nconst gte = require('./gte')\nconst lt = require('./lt')\nconst lte = require('./lte')\n\nconst cmp = (a, op, b, loose) => {\n switch (op) {\n case '===':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a === b\n\n case '!==':\n if (typeof a === 'object') {\n a = a.version\n }\n if (typeof b === 'object') {\n b = b.version\n }\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError(`Invalid operator: ${op}`)\n }\n}\nmodule.exports = cmp\n","const SemVer = require('../classes/semver')\nconst parse = require('./parse')\nconst { safeRe: re, t } = require('../internal/re')\n\nconst coerce = (version, options) => {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n let match = null\n if (!options.rtl) {\n match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n // With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]\n let next\n while ((next = coerceRtlRegex.exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n coerceRtlRegex.lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n const major = match[2]\n const minor = match[3] || '0'\n const patch = match[4] || '0'\n const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''\n const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''\n\n return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)\n}\nmodule.exports = coerce\n","class LRUCache {\n constructor () {\n this.max = 1000\n this.map = new Map()\n }\n\n get (key) {\n const value = this.map.get(key)\n if (value === undefined) {\n return undefined\n } else {\n // Remove the key from the map and add it to the end\n this.map.delete(key)\n this.map.set(key, value)\n return value\n }\n }\n\n delete (key) {\n return this.map.delete(key)\n }\n\n set (key, value) {\n const deleted = this.delete(key)\n\n if (!deleted && value !== undefined) {\n // If cache is full, delete the least recently used item\n if (this.map.size >= this.max) {\n const firstKey = this.map.keys().next().value\n this.delete(firstKey)\n }\n\n this.map.set(key, value)\n }\n\n return this\n }\n}\n\nmodule.exports = LRUCache\n","const Range = require('../classes/range')\nconst satisfies = (version, range, options) => {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\nmodule.exports = satisfies\n","const Range = require('../classes/range')\n\n// Mostly just for testing and legacy API reasons\nconst toComparators = (range, options) =>\n new Range(range, options).set\n .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))\n\nmodule.exports = toComparators\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\n\nconst maxSatisfying = (versions, range, options) => {\n let max = null\n let maxSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\nmodule.exports = maxSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst minSatisfying = (versions, range, options) => {\n let min = null\n let minSV = null\n let rangeObj = null\n try {\n rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach((v) => {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\nmodule.exports = minSatisfying\n","const SemVer = require('../classes/semver')\nconst Range = require('../classes/range')\nconst gt = require('../functions/gt')\n\nconst minVersion = (range, loose) => {\n range = new Range(range, loose)\n\n let minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let setMin = null\n comparators.forEach((comparator) => {\n // Clone to avoid manipulating the comparator's semver object.\n const compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!setMin || gt(compver, setMin)) {\n setMin = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error(`Unexpected operation: ${comparator.operator}`)\n }\n })\n if (setMin && (!minver || gt(minver, setMin))) {\n minver = setMin\n }\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\nmodule.exports = minVersion\n","const Range = require('../classes/range')\nconst validRange = (range, options) => {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\nmodule.exports = validRange\n","const SemVer = require('../classes/semver')\nconst Comparator = require('../classes/comparator')\nconst { ANY } = Comparator\nconst Range = require('../classes/range')\nconst satisfies = require('../functions/satisfies')\nconst gt = require('../functions/gt')\nconst lt = require('../functions/lt')\nconst lte = require('../functions/lte')\nconst gte = require('../functions/gte')\n\nconst outside = (version, range, hilo, options) => {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n let gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisfies the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (let i = 0; i < range.set.length; ++i) {\n const comparators = range.set[i]\n\n let high = null\n let low = null\n\n comparators.forEach((comparator) => {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nmodule.exports = outside\n","// Determine if version is greater than all the versions possible in the range.\nconst outside = require('./outside')\nconst gtr = (version, range, options) => outside(version, range, '>', options)\nmodule.exports = gtr\n","const outside = require('./outside')\n// Determine if version is less than all the versions possible in the range\nconst ltr = (version, range, options) => outside(version, range, '<', options)\nmodule.exports = ltr\n","const Range = require('../classes/range')\nconst intersects = (r1, r2, options) => {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2, options)\n}\nmodule.exports = intersects\n","// given a set of versions and a range, create a \"simplified\" range\n// that includes the same versions that the original range does\n// If the original range is shorter than the simplified one, return that.\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\nmodule.exports = (versions, range, options) => {\n const set = []\n let first = null\n let prev = null\n const v = versions.sort((a, b) => compare(a, b, options))\n for (const version of v) {\n const included = satisfies(version, range, options)\n if (included) {\n prev = version\n if (!first) {\n first = version\n }\n } else {\n if (prev) {\n set.push([first, prev])\n }\n prev = null\n first = null\n }\n }\n if (first) {\n set.push([first, null])\n }\n\n const ranges = []\n for (const [min, max] of set) {\n if (min === max) {\n ranges.push(min)\n } else if (!max && min === v[0]) {\n ranges.push('*')\n } else if (!max) {\n ranges.push(`>=${min}`)\n } else if (min === v[0]) {\n ranges.push(`<=${max}`)\n } else {\n ranges.push(`${min} - ${max}`)\n }\n }\n const simplified = ranges.join(' || ')\n const original = typeof range.raw === 'string' ? range.raw : String(range)\n return simplified.length < original.length ? simplified : range\n}\n","const Range = require('../classes/range.js')\nconst Comparator = require('../classes/comparator.js')\nconst { ANY } = Comparator\nconst satisfies = require('../functions/satisfies.js')\nconst compare = require('../functions/compare.js')\n\n// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:\n// - Every simple range `r1, r2, ...` is a null set, OR\n// - Every simple range `r1, r2, ...` which is not a null set is a subset of\n// some `R1, R2, ...`\n//\n// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:\n// - If c is only the ANY comparator\n// - If C is only the ANY comparator, return true\n// - Else if in prerelease mode, return false\n// - else replace c with `[>=0.0.0]`\n// - If C is only the ANY comparator\n// - if in prerelease mode, return true\n// - else replace C with `[>=0.0.0]`\n// - Let EQ be the set of = comparators in c\n// - If EQ is more than one, return true (null set)\n// - Let GT be the highest > or >= comparator in c\n// - Let LT be the lowest < or <= comparator in c\n// - If GT and LT, and GT.semver > LT.semver, return true (null set)\n// - If any C is a = range, and GT or LT are set, return false\n// - If EQ\n// - If GT, and EQ does not satisfy GT, return true (null set)\n// - If LT, and EQ does not satisfy LT, return true (null set)\n// - If EQ satisfies every C, return true\n// - Else return false\n// - If GT\n// - If GT.semver is lower than any > or >= comp in C, return false\n// - If GT is >=, and GT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the GT.semver tuple, return false\n// - If LT\n// - If LT.semver is greater than any < or <= comp in C, return false\n// - If LT is <=, and LT.semver does not satisfy every C, return false\n// - If GT.semver has a prerelease, and not in prerelease mode\n// - If no C has a prerelease and the LT.semver tuple, return false\n// - Else return true\n\nconst subset = (sub, dom, options = {}) => {\n if (sub === dom) {\n return true\n }\n\n sub = new Range(sub, options)\n dom = new Range(dom, options)\n let sawNonNull = false\n\n OUTER: for (const simpleSub of sub.set) {\n for (const simpleDom of dom.set) {\n const isSub = simpleSubset(simpleSub, simpleDom, options)\n sawNonNull = sawNonNull || isSub !== null\n if (isSub) {\n continue OUTER\n }\n }\n // the null set is a subset of everything, but null simple ranges in\n // a complex range should be ignored. so if we saw a non-null range,\n // then we know this isn't a subset, but if EVERY simple range was null,\n // then it is a subset.\n if (sawNonNull) {\n return false\n }\n }\n return true\n}\n\nconst minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]\nconst minimumVersion = [new Comparator('>=0.0.0')]\n\nconst simpleSubset = (sub, dom, options) => {\n if (sub === dom) {\n return true\n }\n\n if (sub.length === 1 && sub[0].semver === ANY) {\n if (dom.length === 1 && dom[0].semver === ANY) {\n return true\n } else if (options.includePrerelease) {\n sub = minimumVersionWithPreRelease\n } else {\n sub = minimumVersion\n }\n }\n\n if (dom.length === 1 && dom[0].semver === ANY) {\n if (options.includePrerelease) {\n return true\n } else {\n dom = minimumVersion\n }\n }\n\n const eqSet = new Set()\n let gt, lt\n for (const c of sub) {\n if (c.operator === '>' || c.operator === '>=') {\n gt = higherGT(gt, c, options)\n } else if (c.operator === '<' || c.operator === '<=') {\n lt = lowerLT(lt, c, options)\n } else {\n eqSet.add(c.semver)\n }\n }\n\n if (eqSet.size > 1) {\n return null\n }\n\n let gtltComp\n if (gt && lt) {\n gtltComp = compare(gt.semver, lt.semver, options)\n if (gtltComp > 0) {\n return null\n } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {\n return null\n }\n }\n\n // will iterate one or zero times\n for (const eq of eqSet) {\n if (gt && !satisfies(eq, String(gt), options)) {\n return null\n }\n\n if (lt && !satisfies(eq, String(lt), options)) {\n return null\n }\n\n for (const c of dom) {\n if (!satisfies(eq, String(c), options)) {\n return false\n }\n }\n\n return true\n }\n\n let higher, lower\n let hasDomLT, hasDomGT\n // if the subset has a prerelease, we need a comparator in the superset\n // with the same tuple and a prerelease, or it's not a subset\n let needDomLTPre = lt &&\n !options.includePrerelease &&\n lt.semver.prerelease.length ? lt.semver : false\n let needDomGTPre = gt &&\n !options.includePrerelease &&\n gt.semver.prerelease.length ? gt.semver : false\n // exception: <1.2.3-0 is the same as <1.2.3\n if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&\n lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {\n needDomLTPre = false\n }\n\n for (const c of dom) {\n hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='\n hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='\n if (gt) {\n if (needDomGTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomGTPre.major &&\n c.semver.minor === needDomGTPre.minor &&\n c.semver.patch === needDomGTPre.patch) {\n needDomGTPre = false\n }\n }\n if (c.operator === '>' || c.operator === '>=') {\n higher = higherGT(gt, c, options)\n if (higher === c && higher !== gt) {\n return false\n }\n } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {\n return false\n }\n }\n if (lt) {\n if (needDomLTPre) {\n if (c.semver.prerelease && c.semver.prerelease.length &&\n c.semver.major === needDomLTPre.major &&\n c.semver.minor === needDomLTPre.minor &&\n c.semver.patch === needDomLTPre.patch) {\n needDomLTPre = false\n }\n }\n if (c.operator === '<' || c.operator === '<=') {\n lower = lowerLT(lt, c, options)\n if (lower === c && lower !== lt) {\n return false\n }\n } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {\n return false\n }\n }\n if (!c.operator && (lt || gt) && gtltComp !== 0) {\n return false\n }\n }\n\n // if there was a < or >, and nothing in the dom, then must be false\n // UNLESS it was limited by another range in the other direction.\n // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0\n if (gt && hasDomLT && !lt && gtltComp !== 0) {\n return false\n }\n\n if (lt && hasDomGT && !gt && gtltComp !== 0) {\n return false\n }\n\n // we needed a prerelease range in a specific tuple, but didn't get one\n // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,\n // because it includes prereleases in the 1.2.3 tuple\n if (needDomGTPre || needDomLTPre) {\n return false\n }\n\n return true\n}\n\n// >=1.2.3 is lower than >1.2.3\nconst higherGT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp > 0 ? a\n : comp < 0 ? b\n : b.operator === '>' && a.operator === '>=' ? b\n : a\n}\n\n// <=1.2.3 is higher than <1.2.3\nconst lowerLT = (a, b, options) => {\n if (!a) {\n return b\n }\n const comp = compare(a.semver, b.semver, options)\n return comp < 0 ? a\n : comp > 0 ? b\n : b.operator === '<' && a.operator === '<=' ? b\n : a\n}\n\nmodule.exports = subset\n","// just pre-load all the stuff that index.js lazily exports\nconst internalRe = require('./internal/re')\nconst constants = require('./internal/constants')\nconst SemVer = require('./classes/semver')\nconst identifiers = require('./internal/identifiers')\nconst parse = require('./functions/parse')\nconst valid = require('./functions/valid')\nconst clean = require('./functions/clean')\nconst inc = require('./functions/inc')\nconst diff = require('./functions/diff')\nconst major = require('./functions/major')\nconst minor = require('./functions/minor')\nconst patch = require('./functions/patch')\nconst prerelease = require('./functions/prerelease')\nconst compare = require('./functions/compare')\nconst rcompare = require('./functions/rcompare')\nconst compareLoose = require('./functions/compare-loose')\nconst compareBuild = require('./functions/compare-build')\nconst sort = require('./functions/sort')\nconst rsort = require('./functions/rsort')\nconst gt = require('./functions/gt')\nconst lt = require('./functions/lt')\nconst eq = require('./functions/eq')\nconst neq = require('./functions/neq')\nconst gte = require('./functions/gte')\nconst lte = require('./functions/lte')\nconst cmp = require('./functions/cmp')\nconst coerce = require('./functions/coerce')\nconst Comparator = require('./classes/comparator')\nconst Range = require('./classes/range')\nconst satisfies = require('./functions/satisfies')\nconst toComparators = require('./ranges/to-comparators')\nconst maxSatisfying = require('./ranges/max-satisfying')\nconst minSatisfying = require('./ranges/min-satisfying')\nconst minVersion = require('./ranges/min-version')\nconst validRange = require('./ranges/valid')\nconst outside = require('./ranges/outside')\nconst gtr = require('./ranges/gtr')\nconst ltr = require('./ranges/ltr')\nconst intersects = require('./ranges/intersects')\nconst simplifyRange = require('./ranges/simplify')\nconst subset = require('./ranges/subset')\nmodule.exports = {\n parse,\n valid,\n clean,\n inc,\n diff,\n major,\n minor,\n patch,\n prerelease,\n compare,\n rcompare,\n compareLoose,\n compareBuild,\n sort,\n rsort,\n gt,\n lt,\n eq,\n neq,\n gte,\n lte,\n cmp,\n coerce,\n Comparator,\n Range,\n satisfies,\n toComparators,\n maxSatisfying,\n minSatisfying,\n minVersion,\n validRange,\n outside,\n gtr,\n ltr,\n intersects,\n simplifyRange,\n subset,\n SemVer,\n re: internalRe.re,\n src: internalRe.src,\n tokens: internalRe.t,\n SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,\n RELEASE_TYPES: constants.RELEASE_TYPES,\n compareIdentifiers: identifiers.compareIdentifiers,\n rcompareIdentifiers: identifiers.rcompareIdentifiers,\n}\n","'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.DownloaderHelper=exports.DH_STATES=void 0;var _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&'function'==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?'symbol':typeof a},_createClass=function(){function a(a,b){for(var c,d=0;dthis.__opts.progressThrottle)&&(this.__opts.progressThrottle=this.__defaultOpts.progressThrottle),this.url=b||this.url,this.__reqOptions=this.__getReqOptions(this.__opts.method,this.url,this.__opts.headers),this.__initProtocol(this.url)}},{key:'getOptions',value:function a(){return this.__opts}},{key:'getMetadata',value:function a(){return this.__opts.metadata}},{key:'getStats',value:function a(){return{total:this.__total,name:this.__fileName,downloaded:this.__downloaded,progress:this.__progress,speed:this.__statsEstimate.bytes}}},{key:'getTotalSize',value:function b(){var a=this;return new Promise(function(b,c){var d=function(b){a.__initProtocol(b);var c=Object.assign({},a.__headers);c.hasOwnProperty('range')&&delete c.range;var d=a.__getReqOptions('HEAD',b,c);return Object.assign({},a.__reqOptions,d)},e=function(f,g){var h=a.__protocol.request(g,function(g){if(a.__isRequireRedirect(g)){var h=/^https?:\\/\\//.test(g.headers.location)?g.headers.location:new _url.URL(g.headers.location,f).href;return a.emit('redirected',h,f),e(h,d(h))}return 200===g.statusCode?void b({name:a.__getFileNameFromHeaders(g.headers,g),total:parseInt(g.headers['content-length'])||null}):c(new Error('Response status was '+g.statusCode))});h.on('error',function(a){return c(a)}),h.on('timeout',function(){return c(new Error('timeout'))}),h.on('uncaughtException',function(a){return c(a)}),h.end()};e(a.url,d(a.url))})}},{key:'getResumeState',value:function a(){return{downloaded:this.__downloaded,filePath:this.__filePath,fileName:this.__fileName,total:this.__total}}},{key:'resumeFromFile',value:function d(a){var b=this,c=1=g))return this.emit('skip',{totalSize:this.__total,fileName:this.__fileName,filePath:this.__filePath,downloadedSize:f}),this.__setState(this.__states.SKIPPED),b(!0)}this.__fileStream=fs.createWriteStream(this.__filePath,{})}else this.__fileStream=fs.createWriteStream(this.__filePath,{flags:'a'});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,e.on('data',function(a){return d.__calculateStats(a.length)}),this.__pipes.forEach(function(a){e.pipe(a.stream,a.options),e=a.stream}),e.pipe(this.__fileStream),e.on('error',this.__onError(b,c)),this.__fileStream.on('finish',this.__onFinished(b,c)),this.__fileStream.on('error',this.__onError(b,c))}},{key:'__hasFinished',value:function a(){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 b(a){return 300a.statusCode&&a.headers.hasOwnProperty('location')&&a.headers.location}},{key:'__onFinished',value:function d(a,b){var c=this;return function(){c.__fileStream.close(function(d){if(d)return b(d);if(c.__hasFinished()){var e=!!c.__total&&c.__downloaded!==c.__total;if(e&&c.__isResumable&&c.__opts.resumeOnIncomplete&&c.__resumeRetryCount<=c.__opts.resumeOnIncompleteMaxRetry)return c.__resumeRetryCount++,c.emit('warning',new Error('uncomplete download, retrying')),c.resume();c.__setState(c.__states.FINISHED),c.__pipes=[],c.emit('end',{fileName:c.__fileName,filePath:c.__filePath,totalSize:c.__total,incomplete:e,onDiskSize:c.__getFilesizeInBytes(c.__filePath),downloadedSize:c.__downloaded})}return a(c.__downloaded===c.__total)})}}},{key:'__closeFileStream',value:function b(){var a=this;return this.__fileStream?new Promise(function(b,c){a.__fileStream.close(function(a){return a?c(a):b(!0)})}):Promise.resolve(!0)}},{key:'__onError',value:function e(a,b){var c=this,d=!!(2=g?Promise.reject(b||new Error('reached the maximum retries')):(this.__retryCount++,this.__setState(this.__states.RETRY),this.emit('retry',this.__retryCount,this.__opts.retry,b),this.__response&&(this.__response.unpipe(),this.__pipes.forEach(function(a){return a.stream.unpipe()})),this.__fileStream&&this.__fileStream.removeAllListeners(),this.__requestAbort(),this.__closeFileStream().then(function(){return new Promise(function(b){return a.__retryTimeout=setTimeout(function(){return b(0this.__opts.progressThrottle)&&(this.__statsEstimate.throttleTime=b,this.emit('progress.throttled',this.getStats())),this.emit('progress',this.getStats()))}},{key:'__setState',value:function b(a){this.state=a,this.emit('stateChanged',this.state)}},{key:'__getReqOptions',value:function f(a,b){var c=2 validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n// Get the path of cmd.exe in windows\nfunction getCmdPath() {\n var _a;\n return (_a = process.env['COMSPEC']) !== null && _a !== void 0 ? _a : `cmd.exe`;\n}\nexports.getCmdPath = getCmdPath;\n//# sourceMappingURL=io-util.js.map","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\nvar MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar safeRe = exports.safeRe = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\nvar LETTERDASHNUMBER = '[a-zA-Z0-9-]'\n\n// Replace some greedy regex tokens to prevent regex dos issues. These regex are\n// used internally via the safeRe object since all inputs in this library get\n// normalized first to trim and collapse all extra whitespace. The original\n// regexes are exported for userland consumption and lower level usage. A\n// future breaking change could export the safer regex only with a note that\n// all input should have extra whitespace removed.\nvar safeRegexReplacements = [\n ['\\\\s', 1],\n ['\\\\d', MAX_LENGTH],\n [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],\n]\n\nfunction makeSafeRe (value) {\n for (var i = 0; i < safeRegexReplacements.length; i++) {\n var token = safeRegexReplacements[i][0]\n var max = safeRegexReplacements[i][1]\n value = value\n .split(token + '*').join(token + '{0,' + max + '}')\n .split(token + '+').join(token + '{1,' + max + '}')\n }\n return value\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '\\\\d+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-]' + LETTERDASHNUMBER + '*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = LETTERDASHNUMBER + '+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\nsafeRe[t.COERCERTL] = new RegExp(makeSafeRe(src[t.COERCE]), 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nsafeRe[t.TILDETRIM] = new RegExp(makeSafeRe(src[t.TILDETRIM]), 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nsafeRe[t.CARETTRIM] = new RegExp(makeSafeRe(src[t.CARETTRIM]), 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nsafeRe[t.COMPARATORTRIM] = new RegExp(makeSafeRe(src[t.COMPARATORTRIM]), 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n\n // Replace all greedy whitespace to prevent regex dos issues. These regex are\n // used internally via the safeRe object since all inputs in this library get\n // normalized first to trim and collapse all extra whitespace. The original\n // regexes are exported for userland consumption and lower level usage. A\n // future breaking change could export the safer regex only with a note that\n // all input should have extra whitespace removed.\n safeRe[i] = new RegExp(makeSafeRe(src[i]))\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? safeRe[t.LOOSE] : safeRe[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n comp = comp.trim().split(/\\s+/).join(' ')\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First reduce all whitespace as much as possible so we do not have to rely\n // on potentially slow regexes like \\s*. This is then stored and used for\n // future error messages as well.\n this.raw = range\n .trim()\n .split(/\\s+/)\n .join(' ')\n\n // First, split based on boolean or ||\n this.set = this.raw.split('||').map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + this.raw)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? safeRe[t.HYPHENRANGELOOSE] : safeRe[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(safeRe[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, safeRe[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(safeRe[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(safeRe[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? safeRe[t.COMPARATORLOOSE] : safeRe[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? safeRe[t.TILDELOOSE] : safeRe[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? safeRe[t.CARETLOOSE] : safeRe[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? safeRe[t.XRANGELOOSE] : safeRe[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(safeRe[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(safeRe[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = safeRe[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n safeRe[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n safeRe[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;\nconst semver = __importStar(require(\"semver\"));\nconst core_1 = require(\"@actions/core\");\n// needs to be require for core node modules to be mocked\n/* eslint @typescript-eslint/no-require-imports: 0 */\nconst os = require(\"os\");\nconst cp = require(\"child_process\");\nconst fs = require(\"fs\");\nfunction _findMatch(versionSpec, stable, candidates, archFilter) {\n return __awaiter(this, void 0, void 0, function* () {\n const platFilter = os.platform();\n let result;\n let match;\n let file;\n for (const candidate of candidates) {\n const version = candidate.version;\n core_1.debug(`check ${version} satisfies ${versionSpec}`);\n if (semver.satisfies(version, versionSpec) &&\n (!stable || candidate.stable === stable)) {\n file = candidate.files.find(item => {\n core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);\n let chk = item.arch === archFilter && item.platform === platFilter;\n if (chk && item.platform_version) {\n const osVersion = module.exports._getOsVersion();\n if (osVersion === item.platform_version) {\n chk = true;\n }\n else {\n chk = semver.satisfies(osVersion, item.platform_version);\n }\n }\n return chk;\n });\n if (file) {\n core_1.debug(`matched ${candidate.version}`);\n match = candidate;\n break;\n }\n }\n }\n if (match && file) {\n // clone since we're mutating the file list to be only the file that matches\n result = Object.assign({}, match);\n result.files = [file];\n }\n return result;\n });\n}\nexports._findMatch = _findMatch;\nfunction _getOsVersion() {\n // TODO: add windows and other linux, arm variants\n // right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python)\n const plat = os.platform();\n let version = '';\n if (plat === 'darwin') {\n version = cp.execSync('sw_vers -productVersion').toString();\n }\n else if (plat === 'linux') {\n // lsb_release process not in some containers, readfile\n // Run cat /etc/lsb-release\n // DISTRIB_ID=Ubuntu\n // DISTRIB_RELEASE=18.04\n // DISTRIB_CODENAME=bionic\n // DISTRIB_DESCRIPTION=\"Ubuntu 18.04.4 LTS\"\n const lsbContents = module.exports._readLinuxVersionFile();\n if (lsbContents) {\n const lines = lsbContents.split('\\n');\n for (const line of lines) {\n const parts = line.split('=');\n if (parts.length === 2 &&\n (parts[0].trim() === 'VERSION_ID' ||\n parts[0].trim() === 'DISTRIB_RELEASE')) {\n version = parts[1]\n .trim()\n .replace(/^\"/, '')\n .replace(/\"$/, '');\n break;\n }\n }\n }\n }\n return version;\n}\nexports._getOsVersion = _getOsVersion;\nfunction _readLinuxVersionFile() {\n const lsbReleaseFile = '/etc/lsb-release';\n const osReleaseFile = '/etc/os-release';\n let contents = '';\n if (fs.existsSync(lsbReleaseFile)) {\n contents = fs.readFileSync(lsbReleaseFile).toString();\n }\n else if (fs.existsSync(osReleaseFile)) {\n contents = fs.readFileSync(osReleaseFile).toString();\n }\n return contents;\n}\nexports._readLinuxVersionFile = _readLinuxVersionFile;\n//# sourceMappingURL=manifest.js.map","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n error = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RetryHelper = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Internal class for retries\n */\nclass RetryHelper {\n constructor(maxAttempts, minSeconds, maxSeconds) {\n if (maxAttempts < 1) {\n throw new Error('max attempts should be greater than or equal to 1');\n }\n this.maxAttempts = maxAttempts;\n this.minSeconds = Math.floor(minSeconds);\n this.maxSeconds = Math.floor(maxSeconds);\n if (this.minSeconds > this.maxSeconds) {\n throw new Error('min seconds should be less than or equal to max seconds');\n }\n }\n execute(action, isRetryable) {\n return __awaiter(this, void 0, void 0, function* () {\n let attempt = 1;\n while (attempt < this.maxAttempts) {\n // Try\n try {\n return yield action();\n }\n catch (err) {\n if (isRetryable && !isRetryable(err)) {\n throw err;\n }\n core.info(err.message);\n }\n // Sleep\n const seconds = this.getSleepAmount();\n core.info(`Waiting ${seconds} seconds before trying again`);\n yield this.sleep(seconds);\n attempt++;\n }\n // Last attempt\n return yield action();\n });\n }\n getSleepAmount() {\n return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) +\n this.minSeconds);\n }\n sleep(seconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, seconds * 1000));\n });\n }\n}\nexports.RetryHelper = RetryHelper;\n//# sourceMappingURL=retry-helper.js.map","import { mkdir, mkdirSync, stat, statSync, } from 'fs';\nexport const optsArg = (opts) => {\n if (!opts) {\n opts = { mode: 0o777 };\n }\n else if (typeof opts === 'object') {\n opts = { mode: 0o777, ...opts };\n }\n else if (typeof opts === 'number') {\n opts = { mode: opts };\n }\n else if (typeof opts === 'string') {\n opts = { mode: parseInt(opts, 8) };\n }\n else {\n throw new TypeError('invalid options argument');\n }\n const resolved = opts;\n const optsFs = opts.fs || {};\n opts.mkdir = opts.mkdir || optsFs.mkdir || mkdir;\n opts.mkdirAsync = opts.mkdirAsync\n ? opts.mkdirAsync\n : async (path, options) => {\n return new Promise((res, rej) => resolved.mkdir(path, options, (er, made) => er ? rej(er) : res(made)));\n };\n opts.stat = opts.stat || optsFs.stat || stat;\n opts.statAsync = opts.statAsync\n ? opts.statAsync\n : async (path) => new Promise((res, rej) => resolved.stat(path, (err, stats) => (err ? rej(err) : res(stats))));\n opts.statSync = opts.statSync || optsFs.statSync || statSync;\n opts.mkdirSync = opts.mkdirSync || optsFs.mkdirSync || mkdirSync;\n return resolved;\n};\n//# sourceMappingURL=opts-arg.js.map","import { dirname } from 'path';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpManualSync = (path, options, made) => {\n const parent = dirname(path);\n const opts = { ...optsArg(options), recursive: false };\n if (parent === path) {\n try {\n return opts.mkdirSync(path, opts);\n }\n catch (er) {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n return;\n }\n }\n try {\n opts.mkdirSync(path, opts);\n return made || path;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts, mkdirpManualSync(parent, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer && fer.code !== 'EROFS') {\n throw er;\n }\n try {\n if (!opts.statSync(path).isDirectory())\n throw er;\n }\n catch (_) {\n throw er;\n }\n }\n};\nexport const mkdirpManual = Object.assign(async (path, options, made) => {\n const opts = optsArg(options);\n opts.recursive = false;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirAsync(path, opts).catch(er => {\n // swallowed by recursive implementation on posix systems\n // any other error is a failure\n const fer = er;\n if (fer && fer.code !== 'EISDIR') {\n throw er;\n }\n });\n }\n return opts.mkdirAsync(path, opts).then(() => made || path, async (er) => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(parent, opts).then((made) => mkdirpManual(path, opts, made));\n }\n if (fer && fer.code !== 'EEXIST' && fer.code !== 'EROFS') {\n throw er;\n }\n return opts.statAsync(path).then(st => {\n if (st.isDirectory()) {\n return made;\n }\n else {\n throw er;\n }\n }, () => {\n throw er;\n });\n });\n}, { sync: mkdirpManualSync });\n//# sourceMappingURL=mkdirp-manual.js.map","import { dirname } from 'path';\nexport const findMade = async (opts, parent, path) => {\n // we never want the 'made' return value to be a root directory\n if (path === parent) {\n return;\n }\n return opts.statAsync(parent).then(st => (st.isDirectory() ? path : undefined), // will fail later\n // will fail later\n er => {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMade(opts, dirname(parent), parent)\n : undefined;\n });\n};\nexport const findMadeSync = (opts, parent, path) => {\n if (path === parent) {\n return undefined;\n }\n try {\n return opts.statSync(parent).isDirectory() ? path : undefined;\n }\n catch (er) {\n const fer = er;\n return fer && fer.code === 'ENOENT'\n ? findMadeSync(opts, dirname(parent), parent)\n : undefined;\n }\n};\n//# sourceMappingURL=find-made.js.map","import { dirname } from 'path';\nimport { findMade, findMadeSync } from './find-made.js';\nimport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { optsArg } from './opts-arg.js';\nexport const mkdirpNativeSync = (path, options) => {\n const opts = optsArg(options);\n opts.recursive = true;\n const parent = dirname(path);\n if (parent === path) {\n return opts.mkdirSync(path, opts);\n }\n const made = findMadeSync(opts, path);\n try {\n opts.mkdirSync(path, opts);\n return made;\n }\n catch (er) {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManualSync(path, opts);\n }\n else {\n throw er;\n }\n }\n};\nexport const mkdirpNative = Object.assign(async (path, options) => {\n const opts = { ...optsArg(options), recursive: true };\n const parent = dirname(path);\n if (parent === path) {\n return await opts.mkdirAsync(path, opts);\n }\n return findMade(opts, path).then((made) => opts\n .mkdirAsync(path, opts)\n .then(m => made || m)\n .catch(er => {\n const fer = er;\n if (fer && fer.code === 'ENOENT') {\n return mkdirpManual(path, opts);\n }\n else {\n throw er;\n }\n }));\n}, { sync: mkdirpNativeSync });\n//# sourceMappingURL=mkdirp-native.js.map","const platform = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;\nimport { parse, resolve } from 'path';\nexport const pathArg = (path) => {\n if (/\\0/.test(path)) {\n // simulate same failure that node raises\n throw Object.assign(new TypeError('path must be a string without null bytes'), {\n path,\n code: 'ERR_INVALID_ARG_VALUE',\n });\n }\n path = resolve(path);\n if (platform === 'win32') {\n const badWinChars = /[*|\"<>?:]/;\n const { root } = parse(path);\n if (badWinChars.test(path.substring(root.length))) {\n throw Object.assign(new Error('Illegal characters in path.'), {\n path,\n code: 'EINVAL',\n });\n }\n }\n return path;\n};\n//# sourceMappingURL=path-arg.js.map","import { mkdir, mkdirSync } from 'fs';\nimport { optsArg } from './opts-arg.js';\nconst version = process.env.__TESTING_MKDIRP_NODE_VERSION__ || process.version;\nconst versArr = version.replace(/^v/, '').split('.');\nconst hasNative = +versArr[0] > 10 || (+versArr[0] === 10 && +versArr[1] >= 12);\nexport const useNativeSync = !hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdirSync === mkdirSync;\nexport const useNative = Object.assign(!hasNative\n ? () => false\n : (opts) => optsArg(opts).mkdir === mkdir, {\n sync: useNativeSync,\n});\n//# sourceMappingURL=use-native.js.map","import { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nimport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nimport { optsArg } from './opts-arg.js';\nimport { pathArg } from './path-arg.js';\nimport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore start */\nexport { mkdirpManual, mkdirpManualSync } from './mkdirp-manual.js';\nexport { mkdirpNative, mkdirpNativeSync } from './mkdirp-native.js';\nexport { useNative, useNativeSync } from './use-native.js';\n/* c8 ignore stop */\nexport const mkdirpSync = (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNativeSync(resolved)\n ? mkdirpNativeSync(path, resolved)\n : mkdirpManualSync(path, resolved);\n};\nexport const sync = mkdirpSync;\nexport const manual = mkdirpManual;\nexport const manualSync = mkdirpManualSync;\nexport const native = mkdirpNative;\nexport const nativeSync = mkdirpNativeSync;\nexport const mkdirp = Object.assign(async (path, opts) => {\n path = pathArg(path);\n const resolved = optsArg(opts);\n return useNative(resolved)\n ? mkdirpNative(path, resolved)\n : mkdirpManual(path, resolved);\n}, {\n mkdirpSync,\n mkdirpNative,\n mkdirpNativeSync,\n mkdirpManual,\n mkdirpManualSync,\n sync: mkdirpSync,\n native: mkdirpNative,\n nativeSync: mkdirpNativeSync,\n manual: mkdirpManual,\n manualSync: mkdirpManualSync,\n useNative,\n useNativeSync,\n});\n//# sourceMappingURL=index.js.map","import { isArch } from \"../utils/env/isArch.js\"\n\nconst defaultLLVM = process.platform === \"darwin\" && process.arch === \"x64\"\n ? \"15.0.7\"\n : \"18.1.8\"\n\n/**\n * Default versions for the tools\n * DefaultUbuntuVersion overrides the default version for the tools on Ubuntu\n */\nexport const DefaultVersions: Record = {\n // https://github.com/llvm/llvm-project/releases\n llvm: defaultLLVM,\n clang: defaultLLVM,\n \"clang++\": defaultLLVM,\n \"clang-tidy\": defaultLLVM,\n clangtidy: defaultLLVM,\n \"clang-format\": defaultLLVM,\n clangformat: defaultLLVM,\n ninja: \"1.12.1\", // https://github.com/ninja-build/ninja/releases\n cmake: \"3.30.2\", // https://github.com/Kitware/CMake/releases\n gcovr: \"5.2\", // \"6.0\", // https://pypi.org/project/gcovr/\n conan: \"1.64.1\", // 2.0.17 // https://github.com/conan-io/conan/releases\n meson: \"1.5.1\", // https://github.com/mesonbuild/meson/releases\n kcov: \"42\", // https://github.com/SimonKagstrom/kcov/releases\n task: \"3.38.0\", // https://github.com/go-task/task/releases\n doxygen: isArch() ? \"1.11.0-4\" : \"1.11.0\", // https://www.doxygen.nl/download.html // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=doxygen // https://formulae.brew.sh/formula/doxygen // https://archlinux.org/packages/extra/x86_64/doxygen/\n gcc: process.platform === \"win32\"\n ? \"14.2.0posix-18.1.8-12.0.0-ucrt-r1\"\n : \"\", // use the default version on Ubuntu, Fedora, Arch, macOS, etc.\n // mingw: isArch() ? \"12.2.0-1\" : \"8\", // https://archlinux.org/packages/extra/x86_64/mingw-w64-gcc/\n powershell: \"7.4.5\",\n}\n\nexport const MinVersions: Record = {\n pip: \"22.2.0\",\n python: \"3.7.9\",\n}\n\n/// If an ubuntu versions is not in this map:\n// - the newer ubuntu versions use the first entry (e.g. v20),\n// - the older ones use \"\"\nexport const DefaultUbuntuVersion: Record | undefined> = {\n // https://packages.ubuntu.com/search?suite=all&arch=any&searchon=names&keywords=mingw-w64\n mingw: {\n 24: \"8.0.0-1\",\n 22: \"8.0.0-1\",\n 20: \"7.0.0-2\",\n },\n gcovr: {\n 24: \"6.0\",\n 22: \"6.0\",\n 20: \"6.0\",\n 18: \"5.0\",\n },\n meson: {\n 24: \"1.0.0\",\n 22: \"1.0.0\",\n 20: \"1.0.0\",\n 18: \"0.61.4\",\n },\n nala: {\n 24: \"\",\n 22: \"\",\n 21: \"legacy\",\n 20: \"legacy\",\n 18: \"legacy\",\n 16: \"legacy\",\n 14: \"legacy\",\n },\n kcov: {\n 24: \"42-binary\",\n 22: \"42-binary\",\n 20: \"40-binary\", // https://github.com/SimonKagstrom/kcov/releases\n 18: \"40\",\n 16: \"40\",\n 14: \"40\",\n },\n doxygen: {\n 24: \"1.11.0\",\n 22: \"1.11.0\",\n 20: \"1.10.0\",\n 18: \"1.10.0\",\n },\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getUbuntuVersion = void 0;\nconst child_process_1 = require(\"child_process\");\nfunction isSystemError(e) {\n return 'errno' in e;\n}\nfunction command(exe, args) {\n return new Promise((resolve, reject) => {\n child_process_1.execFile(exe, args, { encoding: 'utf8', shell: false }, (error, stdout, stderr) => {\n if (error) {\n if (isSystemError(error) && error.code === 'ENOENT') {\n resolve(null); // When lsb_release is not found\n return;\n }\n reject(new Error(`Could not execute \\`${exe} ${args.join(' ')}\\`: ${error} (stderr=${stderr})`));\n return;\n }\n resolve(stdout);\n });\n });\n}\nasync function getUbuntuVersion() {\n if (process.platform !== 'linux') {\n return [];\n }\n const stdout = await command('lsb_release', ['-a']);\n if (stdout === null) {\n return [];\n }\n const reDistributor = /^Distributor ID:\\s*(.+)$/;\n const reDescription = /^Description:\\s*Ubuntu\\s+(\\d+)\\.(\\d+)(?:\\.(\\d+))?/;\n const reRelease = /^Release:\\s*(\\d+)\\.(\\d+)(?:\\.(\\d+))?$/;\n let description = null;\n let release = null;\n let distributorFound = false;\n for (const line of stdout.split('\\n')) {\n const m = line.match(reDistributor);\n if (m !== null) {\n const distributor = m[1];\n if (distributor !== 'Ubuntu') {\n return [];\n }\n distributorFound = true;\n }\n const desc = line.match(reDescription);\n if (desc) {\n description = desc;\n }\n const rel = line.match(reRelease);\n if (rel) {\n release = rel;\n }\n if (distributorFound && description && release) {\n break;\n }\n }\n if (!distributorFound) {\n return [];\n }\n for (const m of [description, release]) {\n if (m) {\n const ss = [m[1], m[2]];\n if (m[3]) {\n ss.push(m[3]);\n }\n return ss.map(s => parseInt(s, 10));\n }\n }\n return [];\n}\nexports.getUbuntuVersion = getUbuntuVersion;\n//# sourceMappingURL=index.js.map","import os from 'node:os';\n\nconst nameMap = new Map([\n\t[24, ['Sequoia', '15']],\n\t[23, ['Sonoma', '14']],\n\t[22, ['Ventura', '13']],\n\t[21, ['Monterey', '12']],\n\t[20, ['Big Sur', '11']],\n\t[19, ['Catalina', '10.15']],\n\t[18, ['Mojave', '10.14']],\n\t[17, ['High Sierra', '10.13']],\n\t[16, ['Sierra', '10.12']],\n\t[15, ['El Capitan', '10.11']],\n\t[14, ['Yosemite', '10.10']],\n\t[13, ['Mavericks', '10.9']],\n\t[12, ['Mountain Lion', '10.8']],\n\t[11, ['Lion', '10.7']],\n\t[10, ['Snow Leopard', '10.6']],\n\t[9, ['Leopard', '10.5']],\n\t[8, ['Tiger', '10.4']],\n\t[7, ['Panther', '10.3']],\n\t[6, ['Jaguar', '10.2']],\n\t[5, ['Puma', '10.1']],\n]);\n\nexport default function macosRelease(release) {\n\trelease = Number((release || os.release()).split('.')[0]);\n\n\tconst [name, version] = nameMap.get(release) || ['Unknown', ''];\n\n\treturn {\n\t\tname,\n\t\tversion,\n\t};\n}\n","import macosRelease from \"macos-release\"\nimport memoize from \"memoizee\"\n\n/**\n * Get macOS version\n *\n * @returns {number[]} - The macOS version as an array of numbers\n */\nfunction macosVersion_() {\n if (process.platform !== \"darwin\") {\n return []\n }\n\n const { version } = macosRelease()\n return version.split(\".\").map((v) => Number.parseInt(v, 10))\n}\nexport const macosVersion = memoize(macosVersion_)\n","import { tmpdir } from \"os\"\nimport { dirname, join } from \"path\"\nimport { execRootSync } from \"admina\"\nimport { error, info } from \"ci-log\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport { DownloaderHelper } from \"node-downloader-helper\"\nimport { hasNala, installAptPack, qualifiedNeededAptPackage } from \"setup-apt\"\nimport which from \"which\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\n\nlet binDir: string | undefined\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupNala(version: string, _setupDir: string, _arch: string) {\n if (!isUbuntu()) {\n return undefined\n }\n if (typeof binDir === \"string\") {\n return { binDir }\n }\n\n const maybeBinDir = which.sync(\"nala\", { nothrow: true })\n if (maybeBinDir !== null) {\n binDir = dirname(maybeBinDir)\n return { binDir }\n }\n\n await installAptPack([{ name: \"python3-apt\" }])\n\n binDir = \"/usr/bin\" // eslint-disable-line require-atomic-updates\n\n // If nala is available in the default repositories, install it\n try {\n const nalaPack = await qualifiedNeededAptPackage({ name: \"nala\", version })\n if (nalaPack !== undefined) {\n await installAptPack([{ name: nalaPack }])\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala: ${err}`)\n }\n\n // Nala is not available in the default repositories\n // Check if the legacy version is available\n try {\n const nalaLegacyPack = await qualifiedNeededAptPackage({ name: \"nala-legacy\" })\n if (nalaLegacyPack !== undefined) {\n await installAptPack([{ name: nalaLegacyPack }], true)\n return { binDir }\n }\n } catch (err) {\n // ignore\n info(`Failed to install nala-legacy: ${err}`)\n }\n\n // Install via the installer script\n await setupNalaViaInstaller()\n\n return { binDir }\n}\n\nasync function setupNalaViaInstaller() {\n const installer = new DownloaderHelper(\n \"https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh\",\n tmpdir(),\n { fileName: \"install-nala.sh\" },\n )\n installer.on(\"error\", (err) => {\n throw new Error(`Failed to download install-nala.sh: ${err}`)\n })\n await installer.start()\n\n const installerPath = join(tmpdir(), \"install-nala.sh\")\n\n // Patch the installer script to not use sudo explicitly\n const script = await readFile(installerPath, \"utf8\")\n await writeFile(installerPath, script.replace(/sudo/g, \"\"))\n\n await installAptPack([{ name: \"wget\" }])\n\n try {\n execRootSync(\"bash\", [installerPath])\n } catch (err) {\n error(`Failed to install nala via installer: ${err}`)\n execRootSync(\"apt\", [\"install\", \"-y\", \"-t\", \"nala\", \"nala\"])\n }\n}\n\nexport function bashWithNala(script: string) {\n if (hasNala()) {\n return `apt-get() { nala $@; }; export -f apt-get; ${script}; unset -f apt-get`\n }\n return script\n}\n","import { dirname, join } from \"path\"\nimport { grantUserWriteAccess } from \"admina\"\nimport { info, notice } from \"ci-log\"\nimport { addPath } from \"envosman\"\nimport { execaSync } from \"execa\"\nimport { pathExists } from \"path-exists\"\nimport { addShExt, addShRelativePrefix } from \"patha\"\nimport { installAptPack } from \"setup-apt\"\nimport which from \"which\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport type { InstallationInfo } from \"../utils/setup/setupBin.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\nlet hasVCPKG = false\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupVcpkg(version: string, setupDir: string, _arch: string): Promise {\n if (!hasVCPKG || which.sync(\"vcpkg\", { nothrow: true }) === null) {\n if (process.platform === \"linux\") {\n // vcpkg download and extraction dependencies\n if (isArch()) {\n await Promise.all([\n setupPacmanPack(\"curl\"),\n setupPacmanPack(\"zip\"),\n setupPacmanPack(\"unzip\"),\n setupPacmanPack(\"tar\"),\n setupPacmanPack(\"git\"),\n setupPacmanPack(\"pkg-config\"),\n ])\n } else if (hasDnf()) {\n await setupDnfPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n } else if (isUbuntu()) {\n await installAptPack([\n { name: \"curl\" },\n { name: \"zip\" },\n { name: \"unzip\" },\n { name: \"tar\" },\n { name: \"git\" },\n { name: \"pkg-config\" },\n ])\n }\n }\n\n // clone if not already exists\n if (!(await pathExists(join(setupDir, addShExt(\"bootstrap-vcpkg\", \".bat\"))))) {\n execaSync(\"git\", [\"clone\", \"https://github.com/microsoft/vcpkg\"], { cwd: dirname(setupDir), stdio: \"inherit\" })\n } else {\n notice(`Vcpkg folder already exists at ${setupDir}. Skipping the clone`)\n }\n\n // if version specified, checkout the version\n if (version !== \"\" && version !== \"true\") {\n info(`Checking out vcpkg version ${version}`)\n execaSync(\"git\", [\"checkout\", version], {\n cwd: setupDir,\n stdio: \"inherit\",\n })\n }\n\n // bootstrap vcpkg\n execaSync(addShExt(addShRelativePrefix(\"bootstrap-vcpkg\"), \".bat\"), {\n cwd: setupDir,\n shell: true,\n stdio: \"inherit\",\n })\n\n await grantUserWriteAccess(setupDir)\n\n await addPath(setupDir, rcOptions)\n // eslint-disable-next-line require-atomic-updates\n hasVCPKG = true\n return { binDir: setupDir }\n }\n\n return { binDir: dirname(which.sync(\"vcpkg\")) }\n}\n","import { setupBrew } from \"setup-brew\"\nimport { setupBazel } from \"./bazel/bazel.js\"\nimport { setupCcache } from \"./ccache/ccache.js\"\nimport { setupChocolatey } from \"./chocolatey/chocolatey.js\"\nimport { setupCmake } from \"./cmake/cmake.js\"\nimport { setupConan } from \"./conan/conan.js\"\nimport { setupCppcheck } from \"./cppcheck/cppcheck.js\"\nimport { setupDoxygen } from \"./doxygen/doxygen.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { setupGcovr } from \"./gcovr/gcovr.js\"\nimport { setupGraphviz } from \"./graphviz/graphviz.js\"\nimport { setupKcov } from \"./kcov/kcov.js\"\nimport { setupAppleClang } from \"./llvm/apple-clang.js\"\nimport { setupClangFormat, setupClangTools, setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMake } from \"./make/make.js\"\nimport { setupMeson } from \"./meson/meson.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { setupNala } from \"./nala/nala.js\"\nimport { setupNinja } from \"./ninja/ninja.js\"\nimport { setupOpencppcoverage } from \"./opencppcoverage/opencppcoverage.js\"\nimport { setupPowershell } from \"./powershell/powershell.js\"\nimport { setupPython } from \"./python/python.js\"\nimport { setupSccache } from \"./sccache/sccache.js\"\nimport { setupSevenZip } from \"./sevenzip/sevenzip.js\"\nimport { setupTask } from \"./task/task.js\"\nimport { setupVcpkg } from \"./vcpkg/vcpkg.js\"\nimport { setupVCVarsall } from \"./vcvarsall/vcvarsall.js\"\n\nexport const llvmSetups = { llvm: setupLLVM, clang: setupLLVM, \"clang++\": setupLLVM } as const\nexport const gccSetups = { gcc: setupGcc, \"g++\": setupGcc } as const\nexport const mingwSetups = { mingw: setupMingw } as const\nexport const msvcSetups = {\n msvc: setupMSVC,\n cl: setupMSVC,\n msbuild: setupMSVC,\n visualstudio: setupMSVC,\n} as const\nexport const appleClangSetups = {\n appleclang: setupAppleClang,\n applellvm: setupAppleClang,\n \"apple-clang\": setupAppleClang,\n \"apple-llvm\": setupAppleClang,\n} as const\n\nexport const llvmTools = [\"llvm\", \"clang\", \"clang++\", \"clang-tidy\", \"clang-format\", \"clangtidy\", \"clangformat\"]\n\n/** The setup functions */\nexport const setups = {\n ...llvmSetups,\n ...gccSetups,\n ...mingwSetups,\n ...msvcSetups,\n ...appleClangSetups,\n nala: setupNala,\n cmake: setupCmake,\n ninja: setupNinja,\n python: setupPython,\n vcpkg: setupVcpkg,\n bazel: setupBazel,\n conan: setupConan,\n meson: setupMeson,\n gcovr: setupGcovr,\n opencppcoverage: setupOpencppcoverage,\n OpenCppCoverage: setupOpencppcoverage,\n choco: setupChocolatey,\n brew: setupBrew,\n powershell: setupPowershell,\n pwsh: setupPowershell,\n ccache: setupCcache,\n sccache: setupSccache,\n doxygen: setupDoxygen,\n graphviz: setupGraphviz,\n cppcheck: setupCppcheck,\n \"clang-tidy\": setupClangTools,\n clangtidy: setupClangTools,\n \"clang-format\": setupClangFormat,\n clangformat: setupClangFormat,\n vcvarsall: setupVCVarsall,\n kcov: setupKcov,\n make: setupMake,\n task: setupTask,\n sevenzip: setupSevenZip,\n \"7zip\": setupSevenZip,\n \"7z\": setupSevenZip,\n} as const\n\nexport type ToolName = keyof typeof setups\n\n/** The tools that can be installed */\nexport const tools = Object.keys(setups) as Array\n\n/** The possible inputs to the program */\nexport type Inputs = keyof typeof setups | \"compiler\" | \"architecture\" | \"timeout\"\n\n/** An array of possible inputs */\nexport const inputs: Array = [\"compiler\", \"architecture\", \"timeout\", ...tools]\n","import { execRootSync } from \"admina\"\nimport { addAptKeyViaURL, installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupBazel(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n // install bazelisk because it contains both\n return setupChocoPack(\"bazelisk\", version)\n }\n case \"darwin\": {\n // install bazelisk because it contains both\n return installBrewPack(\"bazelisk\", version)\n }\n case \"linux\": {\n if (isArch()) {\n throw new Error(\"installing bazel on Arch linux is not supported yet\")\n } else if (hasDnf()) {\n // https://bazel.build/install/redhat\n await setupDnfPack([{ name: \"dnf-plugins-core\" }])\n execRootSync(\"dnf\", [\"copr\", \"enable\", \"vbatts/bazel\"])\n return setupDnfPack([{ name: \"bazel4\" }])\n } else if (isUbuntu()) {\n // https://bazel.build/install/ubuntu\n const keyFileName = await addAptKeyViaURL({\n fileName: \"bazel-archive-keyring.gpg\",\n keyUrl: \"https://bazel.build/bazel-release.pub.gpg\",\n })\n execRootSync(\"bash\", [\n \"-c\",\n `echo \"deb [arch=amd64 signed-by=${keyFileName}] https://storage.googleapis.com/bazel-apt stable jdk1.8\" | tee /etc/apt/sources.list.d/bazel.list`,\n ])\n return installAptPack([{ name: \"bazel\", version }], true)\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupConan(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"conan\", version)\n}\n","import { setupPipPack } from \"../utils/setup/setupPipPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupMeson(version: string | undefined, _setupDir: string, _arch: string) {\n return setupPipPack(\"meson\", version)\n}\n","import { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupCcache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"ccache\", version)\n }\n case \"darwin\": {\n return installBrewPack(\"ccache\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"ccache\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"ccache\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { installBrewPack } from \"setup-brew\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function setupSccache(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"sccache\", version)\n }\n case \"linux\":\n case \"darwin\": {\n return installBrewPack(\"sccache\", version)\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","import { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupCppcheck(version: string | undefined, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n await setupChocoPack(\"cppcheck\", version)\n const binDir = await activateWinCppcheck()\n return { binDir }\n }\n case \"darwin\": {\n return installBrewPack(\"cppcheck\", version)\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"cppcheck\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"ccache\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"cppcheck\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n\nasync function activateWinCppcheck() {\n const binDir = \"C:/Program Files/Cppcheck\"\n await addPath(binDir, rcOptions)\n return binDir\n}\n","import { join } from \"path\"\nimport { addPath } from \"envosman\"\nimport { installAptPack } from \"setup-apt\"\nimport { getBrewDir, installBrewPack } from \"setup-brew\"\nimport { rcOptions } from \"../cli-options.js\"\nimport { hasDnf } from \"../utils/env/hasDnf.js\"\nimport { isArch } from \"../utils/env/isArch.js\"\nimport { isUbuntu } from \"../utils/env/isUbuntu.js\"\nimport { setupChocoPack } from \"../utils/setup/setupChocoPack.js\"\nimport { setupDnfPack } from \"../utils/setup/setupDnfPack.js\"\nimport { setupPacmanPack } from \"../utils/setup/setupPacmanPack.js\"\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport async function setupMake(version: string, _setupDir: string, _arch: string) {\n switch (process.platform) {\n case \"win32\": {\n return setupChocoPack(\"make\", version)\n }\n case \"darwin\": {\n await installBrewPack(\"make\", version)\n\n const gnuBinDir = join(getBrewDir(), \"opt/make/libexec/gnubin\")\n await addPath(gnuBinDir, rcOptions)\n return { binDir: gnuBinDir }\n }\n case \"linux\": {\n if (isArch()) {\n return setupPacmanPack(\"make\", version)\n } else if (hasDnf()) {\n return setupDnfPack([{ name: \"make\", version }])\n } else if (isUbuntu()) {\n return installAptPack([{ name: \"make\", version }])\n }\n throw new Error(\"Unsupported linux distribution\")\n }\n default: {\n throw new Error(\"Unsupported platform\")\n }\n }\n}\n","#!/usr/bin/env node\n/* eslint-disable node/shebang */\n\nimport { GITHUB_ACTIONS, isCI } from \"ci-info\"\nimport { error, info, success, warning } from \"ci-log\"\nimport { finalizeRC } from \"envosman\"\nimport * as numerous from \"numerous\"\nimport numerousLocale from \"numerous/locales/en.js\"\nimport * as timeDelta from \"time-delta\"\nimport timeDeltaLocale from \"time-delta/locales/en.js\"\nimport { untildifyUser } from \"untildify-user\"\nimport { checkUpdates } from \"./check-updates.js\"\nimport { parseArgs, printHelp, rcOptions } from \"./cli-options.js\"\nimport { installCompiler } from \"./compilers.js\"\nimport { installTool } from \"./installTool.js\"\nimport { type Inputs, llvmTools, tools } from \"./tool.js\"\nimport { isArch } from \"./utils/env/isArch.js\"\nimport { ubuntuVersion } from \"./utils/env/ubuntu_version.js\"\nimport { setupPacmanPack } from \"./utils/setup/setupPacmanPack.js\"\nimport { syncVersions } from \"./versions/versions.js\"\n\n/** The main entry function */\nasync function main(args: string[]): Promise {\n let checkUpdatePromise = Promise.resolve()\n if (!GITHUB_ACTIONS) {\n checkUpdatePromise = checkUpdates()\n process.env.ACTIONS_ALLOW_UNSECURE_COMMANDS = \"true\"\n }\n\n // parse options using mri or github actions\n const opts = parseArgs(args)\n\n // print help\n if (opts.help) {\n printHelp()\n }\n\n // cpu architecture\n const arch = opts.architecture ?? process.arch\n\n // the installation dir for the tools that are downloaded directly\n const setupCppDir = process.env.SETUP_CPP_DIR ?? untildifyUser(\"~\")\n\n // report messages\n const successMessages: string[] = []\n const errorMessages: string[] = []\n\n const timeFormatter = timeDelta.create({ autoloadLocales: true })\n timeDelta.addLocale(timeDeltaLocale as timeDelta.Locale)\n numerous.addLocale(numerousLocale as numerous.Locale)\n let time1: number\n let time2: number\n\n // installing the specified tools\n\n const osVersion = await ubuntuVersion()\n\n // sync the version for the llvm tools\n if (!syncVersions(opts, llvmTools as Inputs[])) {\n error(\"The same version must be used for llvm, clang-format and clang-tidy\")\n return 1\n }\n\n if (isArch() && typeof opts.cppcheck === \"string\" && typeof opts.gcovr === \"string\") {\n info(\"installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux\")\n await setupPacmanPack(\"python-pygments\")\n }\n\n // loop over the tools and run their setup function\n\n let failedFast = false\n for (const tool of tools) {\n // fail fast inside CI when any tool fails\n if (isCI) {\n if (errorMessages.length !== 0) {\n failedFast = true\n break\n }\n }\n\n // get the version or \"true\" or undefined for this tool from the options\n const version = opts[tool]\n\n // skip if undefined\n if (version !== undefined) {\n // running the setup function for this tool\n time1 = Date.now()\n // eslint-disable-next-line no-await-in-loop\n await installTool(\n tool,\n version,\n osVersion,\n arch,\n setupCppDir,\n successMessages,\n errorMessages,\n Number.parseFloat(opts.timeout ?? \"20\") * 60 * 1000,\n )\n time2 = Date.now()\n info(`took ${timeFormatter.format(time1, time2) || \"0 seconds\"}`)\n }\n }\n\n if (!failedFast) {\n // installing the specified compiler\n const maybeCompiler = opts.compiler\n if (maybeCompiler !== undefined) {\n const time1Compiler = Date.now()\n await installCompiler(maybeCompiler, osVersion, setupCppDir, arch, successMessages, errorMessages)\n const time2Compiler = Date.now()\n info(`took ${timeFormatter.format(time1Compiler, time2Compiler) || \"0 seconds\"}`)\n }\n }\n\n await finalizeRC(rcOptions)\n\n if (successMessages.length === 0 && errorMessages.length === 0) {\n warning(\"setup-cpp was called without any arguments. Nothing to do.\")\n return 0\n }\n\n // report the messages in the end\n for (const tool of successMessages) {\n success(tool)\n }\n for (const tool of errorMessages) {\n error(tool)\n }\n\n info(\"setup-cpp finished\")\n\n if (!GITHUB_ACTIONS) {\n switch (process.platform) {\n case \"win32\": {\n warning(\"Run `RefreshEnv.cmd` or restart your shell to update the environment.\")\n break\n }\n case \"linux\":\n case \"darwin\": {\n warning(\"Run `source ~/.cpprc` or restart your shell to update the environment.\")\n break\n }\n default: {\n // nothing\n }\n }\n }\n\n await checkUpdatePromise\n\n return errorMessages.length === 0 ? 0 : 1 // exit with non-zero if any error message\n}\n\n// Run main\nmain(process.argv)\n .then((ret) => {\n process.exitCode = ret\n })\n .catch((err) => {\n error(\"main() panicked!\")\n error(err as string | Error)\n process.exitCode = 1\n })\n","import { warning } from \"ci-log\"\nimport updateNotifier from \"simple-update-notifier\"\nimport packageJson from \"../package-version.json\"\n\n// auto self update notifier\nexport async function checkUpdates() {\n try {\n await updateNotifier({ pkg: packageJson })\n } catch (err) {\n warning(`Failed to check for updates: ${err instanceof Error ? err.message + err.stack : err}`)\n }\n}\n","import { join } from \"path\"\nimport { endGroup, startGroup } from \"@actions/core\"\nimport { error, info } from \"ci-log\"\nimport semverValid from \"semver/functions/valid\"\nimport { getSuccessMessage } from \"./cli-options.js\"\nimport { setupGcc, setupMingw } from \"./gcc/gcc.js\"\nimport { activateGcovGCC, activateGcovLLVM } from \"./gcovr/gcovr.js\"\nimport { setupAppleClang } from \"./llvm/apple-clang.js\"\nimport { setupLLVM } from \"./llvm/llvm.js\"\nimport { setupMSVC } from \"./msvc/msvc.js\"\nimport { appleClangSetups, gccSetups, llvmSetups, mingwSetups, msvcSetups } from \"./tool.js\"\nimport type { InstallationInfo } from \"./utils/setup/setupBin.js\"\nimport { getVersion } from \"./versions/versions.js\"\n\n/**\n * Detecting the compiler version. Divide the given string by `-` and use the second element as the version\n *\n * @param compilerAndVersion - The compiler and version string\n * @returns The compiler and version\n *\n * @nothrow It doesn't throw any error, but it logs the error if it fails to parse the compiler info\n */\nexport function getCompilerInfo(compilerAndVersion: string) {\n try {\n const compilerAndMaybeVersion = compilerAndVersion.split(\"-\")\n const compiler = compilerAndMaybeVersion[0]\n if (1 in compilerAndMaybeVersion) {\n const maybeVersion = compilerAndMaybeVersion[1]\n if (semverValid(maybeVersion) === null) {\n info(`Invalid semver version ${maybeVersion} used for the compiler.`)\n }\n return { compiler, version: maybeVersion }\n }\n return { compiler, version: undefined }\n } catch (err) {\n error(`Failed to parse the compiler info ${compilerAndVersion}: ${err}`)\n return { compiler: compilerAndVersion, version: undefined }\n }\n}\n\n/** Installing the specified compiler */\nexport async function installCompiler(\n compilerAndVersion: string,\n osVersion: number[] | null,\n setupCppDir: string,\n arch: string,\n successMessages: string[],\n errorMessages: string[],\n) {\n const { compiler, version } = getCompilerInfo(compilerAndVersion)\n\n let installationInfo: InstallationInfo | undefined | void | null // null means the compiler is not supported\n try {\n // install the compiler. We allow some aliases for the compiler name\n startGroup(`Installing ${compiler} ${version ?? \"\"}`)\n if (compiler in llvmSetups) {\n installationInfo = await setupLLVM(\n getVersion(\"llvm\", version, osVersion),\n join(setupCppDir, \"llvm\"),\n arch,\n )\n await activateGcovLLVM()\n } else if (compiler in gccSetups) {\n const gccVersion = getVersion(\"gcc\", version, osVersion)\n installationInfo = await setupGcc(gccVersion, join(setupCppDir, \"gcc\"), arch)\n await activateGcovGCC(gccVersion)\n } else if (compiler in mingwSetups) {\n const gccVersion = getVersion(\"mingw\", version, osVersion)\n installationInfo = await setupMingw(gccVersion, join(setupCppDir, \"gcc\"), arch)\n await activateGcovGCC(gccVersion)\n } else if (compiler in msvcSetups) {\n installationInfo = await setupMSVC(\n getVersion(\"msvc\", version, osVersion),\n join(setupCppDir, \"msvc\"),\n arch,\n )\n } else if (compiler in appleClangSetups) {\n await setupAppleClang()\n } else {\n installationInfo = null\n errorMessages.push(`Unsupported compiler ${compiler}`)\n }\n } catch (err) {\n error(err as string | Error)\n errorMessages.push(`Failed to install the ${compilerAndVersion}`)\n }\n\n if (installationInfo !== null) {\n successMessages.push(getSuccessMessage(compiler, installationInfo))\n }\n\n endGroup()\n}\n"],"names":["issueCommand","command","properties","message","cmd","Command","process","stdout","write","os","EOL","rng","poolPtr","rnds8Pool","length","crypto","randomFillSync","slice","validate","uuid","REGEX","test","stringify","arr","offset","byteToHex","toLowerCase","TypeError","parse","v","Uint8Array","parseInt","v35","name","version","hashfunc","generateUUID","value","namespace","buf","str","unescape","encodeURIComponent","bytes","i","push","charCodeAt","stringToBytes","set","err","DNS","URL","getProxyUrl","reqUrl","usingSsl","protocol","hostname","host","hostLower","startsWith","isLoopbackAddress","noProxy","env","reqPort","port","upperReqHosts","toUpperCase","upperNoProxyItem","split","map","x","trim","filter","some","endsWith","checkBypass","proxyVar","DecodedURL","TunnelingAgent","options","self","this","proxyOptions","proxy","maxSockets","http","Agent","defaultMaxSockets","requests","sockets","on","socket","localAddress","toOptions","len","pending","splice","request","onSocket","destroy","removeSocket","createSecureSocket","cb","prototype","createSocket","call","hostHeader","getHeader","tlsOptions","mergeOptions","servername","replace","secureSocket","tls","connect","indexOf","target","arguments","overrides","keys","Object","j","keyLen","k","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","defineProperty","exports","summary","markdownSummary","SUMMARY_DOCS_URL","SUMMARY_ENV_VAR","os_1","require$$0","fs_1","require$$1","access","appendFile","writeFile","promises","_summary","constructor","_buffer","filePath","_filePath","pathFromEnv","Error","constants","R_OK","W_OK","_a","wrap","tag","content","attrs","htmlAttrs","entries","key","join","overwrite","writeFunc","encoding","emptyBuffer","clear","isEmptyBuffer","addRaw","text","addEOL","addCodeBlock","code","lang","assign","element","addList","items","ordered","listItems","item","addTable","rows","tableBody","row","cells","cell","header","data","colspan","rowspan","addDetails","label","addImage","src","alt","width","height","addHeading","level","includes","addSeparator","addBreak","addQuote","cite","addLink","href","getInput","val","required","trimWhitespace","error","command_1","utils_1","toCommandProperties","startGroup","issue","endGroup","__createBinding","create","o","m","k2","enumerable","get","__setModuleDefault","__importStar","mod","__esModule","hasOwnProperty","getIDToken","getState","group","info","notice","warning","debug","isDebug","setCommandEcho","setOutput","getBooleanInput","getMultilineInput","addPath","exportVariable","ExitCode","file_command_1","require$$2","require$$3","path","require$$4","oidc_utils_1","oidcUtils","OidcClient","http_client_1","auth_1","core_1","createHttpClient","allowRetry","maxRetry","requestOptions","allowRetries","maxRetries","HttpClient","BearerCredentialHandler","getRequestToken","token","getIDTokenUrl","runtimeUrl","getCall","id_token_url","httpclient","res","getJson","catch","statusCode","id_token","audience","setSecret","require$$5","convertedVal","toCommandValue","issueFileCommand","prepareKeyValueMessage","secret","inputPath","delimiter","inputs","input","enabled","setFailed","exitCode","Failure","fn","saveState","aud","summary_1","require$$6","summary_2","path_utils_1","pathUtils","toPlatformPath","toWin32Path","toPosixPath","pth","sep","require$$7","GITHUB_ACTIONS","core.error","console","log","msg","core.warning","core.notice","core.info","isexe","er","is","core","ignoreErrors","resolveCommandAttempt","parsed","withoutPathExt","cwd","hasCustomCwd","shouldSwitchCwd","chdir","disabled","resolved","which","sync","getPathKey","pathExt","notFoundError","original","syscall","errno","spawnargs","args","verifyENOENT","status","isWin","file","spawn","spawned","cp","enoent","hookChildProcess","pathKey","platform","reverse","find","isStream","stream","pipe","isWritableStream","writable","_write","_writableState","async","getStream","inputStream","maxBuffer","Infinity","bufferStream","rejectPromise","getBufferedLength","BufferConstants","MAX_LENGTH","bufferedData","getBufferedValue","streamPipelinePromisified","MaxBufferError","execa","handleArguments","joinCommand","escapedCommand","getEscapedCommand","logCommand","timeout","Number","isFinite","validateTimeout","childProcess","dummySpawned","ChildProcess","errorPromise","makeError","stderr","all","timedOut","isCanceled","killed","mergePromise","spawnedPromise","signal","stdin","getSpawnedPromise","timedPromise","killSignal","timeoutId","timeoutPromise","setTimeout","kill","timeoutKill","safeSpawnedPromise","finally","clearTimeout","race","setupTimeout","processDone","cleanup","detached","removeExitHandler","onExit","setExitHandler","spawnedKill","bind","cancel","spawnedCancel","handlePromiseOnce","onetime","stdoutResult","stderrResult","allResult","buffer","stdoutPromise","getStreamPromise","stderrPromise","allPromise","getBufferedData","getSpawnedResult","handleOutput","returnedError","aborted","failed","inputFile","validateInputOptions","createReadStream","end","handleInput","mixed","mergeStream","add","makeAllStream","pipeStdout","pipeToTarget","pipeStderr","pipeAll","addPipeMethods","execaSync","readFileSync","getInputSync","handleInputSync","spawnSync","execPowershell","startupFlags","execOptions","stdio","execa.execa","powershell","maybePwsh","nothrow","maybePowerShell","getPowerShell","t","r","configurable","getuid","CI","n","s","h","parseCommand","b","a","l","c","y","S","f","R","p","SUDO_USER","w","statSync","isDirectory","getOwnPropertyDescriptor","getOwnPropertyNames","getOwnPropertySymbols","mixin$1","source","sourceObject","forEach","symbol","globalThis_1","isImplemented","globalThis","Array","naiveFallback","window","implementation","__global__","isSymbol","toStringTag","validateSymbol","es6Symbol","global","validTypes","object","Symbol","iterator","toPrimitive","SymbolPolyfill","HiddenSymbol","isNativeSafe","d","NativeSymbol","generateName","objPrototype","created","desc","ie11BugWorkaround","postfix","gs","setupStandardSymbols","standardSymbols","defineProperties","hasInstance","isConcatSpreadable","match","search","species","unscopables","setupSymbolRegistry","registry","symbolRegistry","for","String","keyFor","ignore","description","polyfill","__description__","__name__","toString","valueOf","from","iteratorSymbol","isArguments","objToString","id","isFunction","isFunctionStringTag","RegExp","toPosInt","callable","validValue","isValue","isString","isArray","Function","shim","arrayLike","Context","getIterator","mapFn","numberIsNaN","isNan","isNaN","NaN","objHasOwnProperty","abs","Math","floor","eIndexOf","searchElement","fromIndex","obj","targetObj","index","ensureCallable","byObserver","Observer","queue","currentQueue","node","document","createTextNode","callback","concat","shift","observe","characterData","nextTick","queueMicrotask","MutationObserver","WebKitMutationObserver","setImmediate","isCallable","isPromise","isPromiseModule","default","objectMap","primitiveSet","arg","ensureString","ensureValue","stringifiable","validateStringifiable","validateStringifiableValue","toShortString","safeToString","toShortStringRepresentation","string","char","JSON","supportedModes","registeredExtensions","promise","mode","conf","waiting","cache","isFailed","emit","onSuccess","count","onFailure","delete","resolvedMode","nextTickFailure","context","oldCache","pathExists","fsPromises","untildifyUser","maybeHomeDir","isSudo","homedir","userHomeDir","tildeRegex","addRCHeader","rcHeader","guard","rcPath","readFile","addSourceToTargetRc","sourceRcString","targetRcPath","addEnv","valGiven","givenOptions","escapeSpace","defaultRcPath","shouldEscapeSpace","spaceEscaped","escapeQuote","escapeString","addEnvSystem","sourceRCInRc","ignoredPaths","checkedPath","PATH","isIgnoredPath","ghAddPath","addPathSystem","addLocale","localeData","locales","pluralize","unit","config","unitTypeData","locale","lookupOrder","unitTypeLookupOrder","unshift","unitType","Set","getLocaleDataForUnitType","numerous","SPACE_CHARACTERS","Range","range","parseOptions","loose","includePrerelease","raw","Comparator","formatted","parseRange","first","isNullSet","isAny","comps","format","memoKey","FLAG_INCLUDE_PRERELEASE","FLAG_LOOSE","cached","re","HYPHENRANGELOOSE","HYPHENRANGE","hyphenReplace","COMPARATORTRIM","comparatorTrimReplace","TILDETRIM","tildeTrimReplace","CARETTRIM","caretTrimReplace","rangeList","comp","parseComparator","replaceGTE0","COMPARATORLOOSE","rangeMap","Map","comparators","size","has","values","intersects","thisComparators","isSatisfiable","rangeComparators","every","thisComparator","rangeComparator","SemVer","testSet","safeRe","remainingComparators","testComparator","pop","otherComparator","replaceCarets","replaceTildes","replaceXRanges","replaceStars","isX","replaceTilde","TILDELOOSE","TILDE","_","M","pr","ret","replaceCaret","z","CARETLOOSE","CARET","replaceXRange","XRANGELOOSE","XRANGE","gtlt","xM","xm","xp","STAR","GTE0PRE","GTE0","incPr","$0","fM","fm","fp","fpr","fb","to","tM","tm","tp","tpr","prerelease","semver","ANY","allowed","major","minor","patch","operator","COMPARATOR","cmp","__generator","body","verb","op","g","ops","trys","sent","throw","return","toArr","any","toVal","out","opts","old","nxt","boolean","addUpdateAlternativesToRc","rcOptions","priority","execRoot","updateAptAlternatives","sourceRC","getAptEnv","apt","DEBIAN_FRONTEND","LANG","LC_ALL","hasNala","getApt","escapeStringRegexp","isAptPackInstalled","pack","line","filterAndQualifyAptPackages","packages","qualifiedNeededAptPackage","qualified","aptPackageType","AptPackageType","NameDashVersion","NameEqualsVersion","Name","getAptArg","escapeRegex","showStdout","updatedRepos","None","updateAptReposMemoized","installAptPack","update","allRepositories","flatMap","repository","repo","initAptMemoized","execRootSync","aptTimeout","defaultExecOptions","installAddAptRepo","addAptRepository","addRepositories","needToInstall","binDir","addAptKeyViaURL","keyServer","defaultKeyServer","fileName","keyStorePath","assertGpgFileName","addAptKeyViaServer","addAptKeys","isExecaError","retryErrors","keyUrl","defaultKeyStorePath","dlPath","tmpdir","dl","DownloaderHelper","start","initGpg","s$1","setupBrew","maybeBinDir","dirname","getDownloadPath","NONINTERACTIVE","getBrewBinDir","getBrewDir","arch","installBrewPack","cask","hasBrew","brewPath","hasDnf","hasDnfCache","isArch","isArchCache","isUbuntu","isUbuntuCache","setupChocolatey","_version","_setupDir","_arch","SystemRoot","chocoPath","ALLUSERSPROFILE","maybeChoco","ChocolateyInstall","setupChocoPack","hasChoco","TMP","TEMP","Path","extendEnv","setupDnfPack","getDnfArg","setupPacmanPack","aur","pacman","yayBuildDir","isRoot","createdBuilderUser","didUpdate","didInit","runInstall","availableVersions","matchAll","pacmanSiVersionRegex","availablePacmanVersions","u","E","N","rmRF","ioUtil","IS_WINDOWS","rm","force","recursive","retryDelay","mkdirP","fsPath","assert_1$1","ok","mkdir","findInPath","tool","extensions","extension","isRooted","tryGetExecutablePath","directories","matches","directory","cpDirRecursive","sourceDir","destDir","currentDepth","files","readdir","srcFile","destFile","lstat","copyFile","chmod","stat","isSymbolicLink","unlink","symlinkFull","readlink","symlink","exists","exec","commandLine","commandArgs","tr","argStringToArray","toolPath","ToolRunner","findAllVersions","toolName","versions","_getCacheDirectory","fs","existsSync","children","readdirSync","child","isExplicitVersion","fullPath","_createExtractFolder","dest","_getTempDirectory","v4_1","io","_createToolPath","folderPath","clean","core$1","markerPath","_completeToolPath","fs$1","writeFileSync","versionSpec","valid","evaluateVersions","sort","gt","potential","satisfies","cacheDirectory","assert_1","tempDirectory","_getGlobal","defaultValue","retryAsPromised","optionsInput","$current","max","backoffBase","backoffExponent","report","Date","toLocaleTimeString","backoffTimeout","lastError","TimeoutError","current","shouldRetry","pow","setupSevenZip","getArchiveType","ext","extract7Zip","sevenZip","getSevenZip","grantUserWriteAccess","extractExe","extractZip","extractTarByExe","stripComponents","flags","archiveType","installTarDependencies","setupBin","getPackageInfo","setupDir","RUNNER_TEMP","RUNNER_TOOL_CACHE","url","binRelativeDir","binFileName","extractedFolderName","extractFunction","dir","installDir","binFile","givenExtractFunction","downloaded","retry","downloadedFilePath","now","basename","downloadTool","tryDownload","getExtractFunction","downloadExtractInstall","maybeGetInput","CACHE_TOOLS","cacheDir","cacheInstallation","getCmakePackageInfo","semVersion","semverCoerce","isOld","semverLte","osArchStr","x86_64","x86","arm64","folderName","addExeExt","setupCmake","isBinUptoDate","givenFile","targetVersion","versionRegex","defaultVersionRegex","givenVersion","execout","getExecOutput","version_output","getBinVersion","semverCompare","quoteIfHasSpace","quoteChar","setupPython","installInfo","foundPython","findPython","bin","setupActionsPython","import","brewPythonPrefix","brewPythonBin","setupPythonSystem","findOrSetupPython","require$$0$3","foundPip","maybePip","findPip","ensurePipUpgrade","setupPipPackSystem","setupPip","findOrSetupPip","hasPipx","setupPipPackWithPython","upgrade","usePipx","setupPipx","isLibrary","setupWheel","pythonBin","isPythonUpToDate","rootDir","pathParse","root","pythonDirs","pythonDir","candidate","pythonBinPath","MinVersions","pythonBinPaths","pipCandidate","isPipUptoDate","pip","pipPaths","pipPath","err1","err2","getVersion","osVersion","isVersionDefault","DefaultUbuntuVersion","toolLinuxVersions","osVersionMaj","satisfyingVersion","getDefaultLinuxVersion","DefaultVersions","detectUsingOsVersion","versionMatch","setupPipPack","getPython","givenPython","user","isPipx","hasPackage","python","pipHasPackage","nameAndVersion","upgradeFlag","userFlag","PIPX_HOME","getPipxHome","PIPX_BIN_DIR","getPipxBinDir","execPaths","addPythonBaseExecPrefix","dirs","dirIndex","findIndex","exist","whichDir","findBinDir","addPythonPrefix","setupGraphviz","activateGraphviz","setupDmg","ArchiveHdi","dmg","read","entry","extract","getDoxygenPackageInfo","setupMacOSSDK","xcrun","sdkroot","loadAssetList","matchAsset","assets","origTags","versionMap","filterMapTag","origTag","mappedTag","candidateTags","candidateTag","assetNames","filterName","matchAssetName","keywords","optionalKeywords","candidates","keyword","candidateScores","score","maxScore","getGccPackageInfo","asset","x64","ia32","setupGcc","installationInfo","setupChocoMingw","gccExe","exe1","exe2","tag1","tag2","v1","v2","compare","localeCompare","compareVersion","versionStdout","getGccCmdVersion","majorVersion","semverMajor","matcherPath","addGccLoggingMatcher","activateGcc","setupMingw","activateGcovGCC","gccVersion","gccSemver","semverValid","gccMajor","getNinjaPackageInfo","ninjaPlatform","getNinjaPlatformArch","setupNinja","getDownloadKcovPackageInfo","getBuildKcovPackageInfo","buildKcov","cmake","ubuntuVersion","getCmake","buildDir","setupAppleClang","vsversion_to_versionnumber","vsversion","VsYearVersion","vsversion_to_year","year","ver","findVcvarsall","vsversion_number","version_pattern","upper_bound","pattern","child_process","execSync","installationPath","findWithVswhere","years","YEARS","prog_files","PROGRAM_FILES","ed","EDITIONS","PROGRAM_FILES_X86","isPathVariable","setupVCVarsall","VCTargetsPath","toolset","sdk","uwp","spectre","setupMSVCDevCmd","getArch","installTool","setupCppDir","successMessages","errorMessages","milliseconds","fallback","customTimers","timer","cancelablePromise","sign","getAbortedReason","addEventListener","timeoutError","pTimeout","hasLLVM","llvmTools","setupVersion","setupFunction","setups","getSuccessMessage","installToolImpl","stack","getLLVMPackageInfo","ubuntuVer","ubuntuMin","armv7","powerpc64le","sparc64","getAssetKeywords","ghAsset","websiteAsset","getLLVMAssetURL","setupLLVM","setupLLVMWithoutActivation","ld","LD_LIBRARY_PATH","dyld","DYLD_LIBRARY_PATH","llvmMajor","majorLLVMVersion","actPromises","activateLLVM","setupClangFormat","setupLLVMOnly","LLVMPackages","ClangFormat","setupClangTools","All","installationFolder","installerScript","installerPath","neededPackages","givenScript","target_path","script","NODE_DEBUG","debugScript","nonInteractiveScript","choosePackages","installingPack","regexp","isAptPackRegexInstalled","info$1","removeConflictingPackages","useNalaScript","patchAptLLVMScript","shell","setupLLVMApt","llvmBinaryDeps","coeredVersion","coercedVersion","semverCoerceIfInvalid","addLLVMLoggingMatcher","setupMSVC","versionGiven","installed","vcvarsall_path","addMSVCLoggingMatcher","setupOpencppcoverage","activateOpencppcoverage","getPowerShellPackageInfo","getPowershellUrl","arm","arm32","aarch64","setupPowershell","ubuntuVerSplitted","setupPowershellSystem","getTaskPackageInfo","taskPlatform","getTaskPlatform","taskArch","getTaskArch","checkEnv","vendors","constant","isPR","vendor","isCI","ne","BUILD_ID","BUILD_NUMBER","CI_APP_ID","CI_BUILD_ID","CI_BUILD_NUMBER","CI_NAME","CONTINUOUS_INTEGRATION","RUN_ID","utils","annotationProperties","title","startLine","endLine","col","startColumn","endColumn","__createBinding$6","cmdStr","escapeData","byteToHex$1","substr","_nodeId","_clockseq","_lastMSecs","_lastNSecs","v3$1","Buffer","createHash","digest","v5","clockseq","seedBytes","random","msecs","nsecs","dt","tl","tmh","rnds","__createBinding$5","fileCommand","uuid_1","fs$4","appendFileSync","v4","convertedValue","_decodedUsername","_decodedPassword","base","super","decodeURIComponent","username","password","https","events","util","tunnel","httpOverHttp","agent","httpsOverHttp","defaultPort","httpOverHttps","httpsOverHttps","inherits","EventEmitter","addRequest","req","onFree","onCloseOrRemove","removeListener","onConnect","head","connectReq","removeAllListeners","placeholder","connectOptions","method","headers","proxyAuth","useChunkedEncodingByDefault","once","cause","pos","HttpCodes","Headers","MediaTypes","HttpRedirectCodes","MovedPermanently","ResourceMoved","SeeOther","TemporaryRedirect","PermanentRedirect","HttpResponseRetryCodes","BadGateway","ServiceUnavailable","GatewayTimeout","RetryableHttpVerbs","HttpClientError","setPrototypeOf","HttpClientResponse","readBody","output","alloc","chunk","readBodyBuffer","chunks","lowercaseKeys","reduce","userAgent","handlers","_ignoreSslError","_socketTimeout","_allowRedirects","_allowRedirectDowngrade","_maxRedirects","_allowRetries","_maxRetries","_agent","_proxyAgent","_proxyAgentDispatcher","_keepAlive","_disposed","ignoreSslError","socketTimeout","allowRedirects","allowRedirectDowngrade","maxRedirects","keepAlive","requestUrl","additionalHeaders","del","post","put","sendStream","Accept","_getExistingOrDefaultHeader","ApplicationJson","_processResponse","postJson","ContentType","putJson","patchJson","parsedUrl","_prepareRequest","maxTries","response","numTries","requestRaw","Unauthorized","authenticationHandler","handler","canHandleAuthentication","handleAuthentication","redirectsRemaining","redirectUrl","parsedRedirectUrl","_performExponentialBackoff","dispose","requestRawWithCallback","onResult","handleResult","callbackCalled","byteLength","httpModule","sock","getAgent","serverUrl","_getAgent","getAgentDispatcher","proxyUrl","pm.getProxyUrl","_getProxyAgentDispatcher","pathname","_mergeHeaders","prepareRequest","_default","clientHeader","useProxy","globalAgent","agentOptions","tunnelAgent","overHttps","tunnel.httpsOverHttps","tunnel.httpsOverHttp","tunnel.httpOverHttps","tunnel.httpOverHttp","rejectUnauthorized","proxyAgent","uri","pipelining","requestTls","retryNumber","ms","min","contents","NotFound","deserializeDates","auth","PersonalAccessTokenCredentialHandler","BasicCredentialHandler","TESTING_WINDOWS","checkStat","isFile","checkPathExt","pathext","PATHEXT","checkMode","uid","gid","myUid","myGid","getgid","ug","isexe_1","isWindows","OSTYPE","COLON","getNotFoundError","getPathInfo","opt","colon","pathEnv","pathExtExe","found","ppRaw","pathPart","pCmd","subStep","ii","which_1","cur","ex","environment","pathKeyModule","metaCharsRegExp","_escape","argument","doubleEscapeMetaChars","shebangRegex","resolveCommand","escape","readShebang","fd","openSync","readSync","closeSync","binary","shebangCommand","isExecutableRegExp","isCmdShimRegExp","commandFile","shebang","detectShebang","needsShell","forceShell","needsDoubleEscapeMetaChars","normalize","shellCommand","comspec","windowsVerbatimArguments","parseNonShell","originalEmit","arg1","verifyENOENTSync","crossSpawnModule","_parse","_enoent","npmRunPathEnv","pathName","pathOption","preferLocal","execPath","addExecPath","cwdString","fileURLToPath","cwdPath","previous","applyPreferLocal","execPathString","applyExecPath","npmRunPath","copyProperty","property","ignoreNonConfigurable","toDescriptor","fromDescriptor","canCopyProperty","wrappedToString","withName","fromBody","toStringDescriptor","toStringName","calledFunctions","WeakMap","function_","returnValue","callCount","functionName","displayName","arguments_","Reflect","ownKeys","fromPrototype","getPrototypeOf","changePrototype","newToString","changeToString","mimicFunction","getRealtimeSignal","number","SIGRTMIN","action","standard","SIGNALS","forced","getSignals","realtimeSignals","normalizeSignal","defaultNumber","signals","name2","constantSignal","supported","getSignalByName","signalsByName","fromEntries","getSignalsByName","findSignalByNumber","signalA","signalsA","SIGRTMAX","getSignalByNumber","getSignalsByNumber","signalDescription","prefix","errorCode","getErrorPrefix","execaMessage","isError","shortMessage","Boolean","originalMessage","aliases","processOk","reallyExit","listeners","pid","emitter","assert","module","EE","__signal_exit_emitter__","emitted","infinite","setMaxListeners","equal","loaded","load","ev","alwaysLast","unload","sig","sigListeners","originalProcessEmit","originalProcessReallyExit","signalExitModule","event","emit$1","process$3","signalExit","processEmit","processReallyExit","killResult","setKillTimeout","shouldForceKill","getForceKillAfterTimeout","unref","forceKillAfterTimeout","isSigterm","SIGTERM","streamName","createWriteStream","isExecaChildProcess","PassThrough","PassThroughStream","promisify","array","isBuffer","objectMode","setEncoding","pipeline","getStreamModule","sources","remove","it","readable","isEmpty","streamPromise","nativePromisePrototype","descriptors","descriptor","normalizeArgs","NO_ESCAPE_REGEXP","DOUBLE_QUOTES_REGEXP","escapeArg","SPACES_REGEXP","tokens","previousToken","verboseDefault","debuglog","padField","field","padding","padStart","verbose","date","getHours","getMinutes","getSeconds","getMilliseconds","getTimestamp","crossSpawn","stripFinalNewline","localDir","windowsHide","envOption","getEnv","alias","hasAlias","normalizeStdio","CR","posix","promises_1","myGroups","groups","getgroups","win32","peSplit","substring","__exportStar","impl","_ISEXE_TEST_PLATFORM_","isexeSync","rSlash","rRel","optPath","optPathExt","optDelimiter","getPathPart","envPart","withExt","lib","pathEnvPart","$","A","systemdrive","normalizeOptions","opts1","forEach$2","process$2","toPosInteger","toInteger","resolveLength","optsLength","fnLength","isAsync","validCallable","objPropertyIsEnumerable","propertyIsEnumerable","list","compareFn","defVal","foo","bar","trzy","shim$3","function","isObject","captureStackTrace","generate","mixin","arg2","possibleTypes","undefined","isPrototype","classRe","functionToString","contains","searchString","isPlainFunction","normalizeOpts","dModule","dscr","off","methods","type","listener","__eeOnceListener__","__ee__","resolveArgs","customError","defineLength","ee","resolveResolve","resolvers","configure","memLength","extDel","extGet","extHas","normalizer","getListeners","setListeners","deleteListeners","memoized","userNormalizer","resolveNormalize","profileName","updateEnv","__memoized__","_get","_has","plain","extFn","__profiler__","memoizee","primitive","getPrimitiveFixed","currentLength","lastId","get1","argsMap","getFixed","aFrom","tbi","currentCallback","currentContext","currentArgs","last","origCb","resultArray","maxAge","maxTimeout","validTimeout","noop","timeouts","preFetchAge","preFetchTimeouts","preFetch","lruQueue","limit","hit","oldIndex","nuIndex","refCounter","deleteRef","getRefCount","memoize","is_posix_os","release","windows_version_regex","given_path","major_release","os_build","should_not_escape","regexEscape","matchOperatorsRe","escapeQuotesModule","chars","escapeChar","regex","variants","checkLocale","hasLocale","commonjsRequire","__dirname","requireLocale","isNode","timeUnits","defaultConfig","span","autoloadLocales","timeDelta","firstDate","secondDate","autoload","localeId","require","ensureLocaleLoadedOrThrow","difference","results","divider","getDifference","parts","long","one","other","months","weeks","days","hours","minutes","seconds","narrow","short","MAX_SAFE_COMPONENT_LENGTH","MAX_SAFE_BUILD_LENGTH","MAX_SAFE_INTEGER","RELEASE_TYPES","SEMVER_SPEC_VERSION","debug_1","LETTERDASHNUMBER","safeRegexReplacements","createToken","isGlobal","safe","makeSafeRegex","NUMERICIDENTIFIER","NUMERICIDENTIFIERLOOSE","NONNUMERICIDENTIFIER","PRERELEASEIDENTIFIER","PRERELEASEIDENTIFIERLOOSE","BUILDIDENTIFIER","MAINVERSION","PRERELEASE","BUILD","FULLPLAIN","MAINVERSIONLOOSE","PRERELEASELOOSE","LOOSEPLAIN","XRANGEIDENTIFIER","XRANGEIDENTIFIERLOOSE","GTLT","XRANGEPLAIN","XRANGEPLAINLOOSE","COERCEPLAIN","COERCE","COERCEFULL","LONETILDE","LONECARET","looseOption","freeze","emptyOpts","parseOptions_1","numeric","compareIdentifiers","anum","bnum","identifiers","rcompareIdentifiers","LOOSE","FULL","num","build","compareMain","comparePre","compareBuild","inc","identifier","identifierBase","parse_1","throwErrors","valid_1","major_1","compare_1","compareBuild_1","versionA","versionB","gt_1","lt_1","eq_1","neq_1","gte_1","lte_1","eq","neq","gte","lt","lte","cmp_1","coerce_1","rtl","coerceRtlRegex","COERCERTLFULL","COERCERTL","lastIndex","lrucache","firstKey","satisfies_1","outside_1","hilo","gtfn","ltefn","ltfn","ecomp","high","low","comparator","outside","minimumVersionWithPreRelease","minimumVersion","simpleSubset","sub","dom","eqSet","gtltComp","higher","lower","hasDomLT","hasDomGT","higherGT","lowerLT","needDomLTPre","needDomGTPre","internalRe","diff","version1","version2","comparison","v1Higher","highVersion","lowVersion","highHasPre","require$$9","require$$13","rcompare","compareLoose","require$$16","rsort","require$$19","require$$20","require$$21","require$$22","require$$23","require$$24","require$$25","coerce","require$$26","require$$27","require$$28","require$$29","toComparators","maxSatisfying","maxSV","rangeObj","minSatisfying","minSV","minVersion","minver","setMin","compver","validRange","require$$35","gtr","ltr","r1","r2","simplifyRange","prev","ranges","simplified","subset","sawNonNull","OUTER","simpleSub","simpleDom","isSub","packageJson","npm_package_json","npm_config_user_agent","isNpm6","isNpm7","isNpm","isYarn","isNpmOrYarn","homeDirectory","configDir","XDG_CONFIG_HOME","getConfigFile","packageName","getDistVersion","distTag","hasNewVersion","pkg","_b","updateCheckInterval","_c","alwaysRun","lastUpdateCheck","latestVersion","_d","mkdirSync","configFile","getLastUpdate","getTime","err_1","isTTY","shouldNotifyInNpmScript","lines","repeat","_i","lines_1","padEnd","borderedText","_interopRequireWildcard","_possibleConstructorReturn","ReferenceError","DH_STATES","_typeof","_createClass","_url","_events","IDLE","SKIPPED","STARTED","DOWNLOADING","RETRY","PAUSED","RESUMED","STOPPED","FINISHED","FAILED","_classCallCheck","__proto__","captureRejections","__validate","requestURL","state","__defaultOpts","metadata","override","forceResume","removeOnStop","removeOnFail","progressThrottle","httpRequestOptions","httpsRequestOptions","resumeOnIncomplete","resumeIfFileExists","resumeOnIncompleteMaxRetry","__opts","__pipes","__total","__downloaded","__progress","__retryCount","__retryTimeout","__resumeRetryCount","__states","__promise","__request","__response","__isAborted","__isResumed","__isResumable","__isRedirected","__destFolder","__statsEstimate","time","prevBytes","throttleTime","__fileName","__filePath","updateOptions","_inherits","__start","getTotalSize","total","__getFilePath","__getFilesizeInBytes","resumeFromFile","unpipe","__fileStream","__requestAbort","__closeFileStream","__setState","__reqOptions","__emitStop","__headers","__getReqOptions","__initProtocol","progress","speed","__protocol","__isRequireRedirect","location","__getFileNameFromHeaders","destroyed","__downloadRequest","__onError","__onTimeout","__resetStats","__startDownload","skip","skipSmaller","totalSize","downloadedSize","isResumed","__calculateStats","__onFinished","close","__hasFinished","resume","incomplete","onDiskSize","__retry","__removeFile","delay","__getFileNameFromOpts","__uniqFileNameSync","prevPath","prevFileName","getStats","throwIfNoEntry","accessSync","F_OK","abort","__resolvePending","toInstall","npath","first2chars","nFileName","extname","nFilepath","O","I","T","W","q","B","isUnixExecutable","stats","getCmdPath","UV_FS_O_EXLOCK","rmdir","rename","open","READONLY","O_RDONLY","useStat","normalizeSeparators","upperExt","validExt","originalFilePath","upperName","actualName","__createBinding$4","mkdirP_1","mv","copySourceDirectory","readCopyOptions","destStat","newDest","relative","destExists","check","tok","makeSafeRe","tb","defaultResult","rangeTmp","sameDirectionIncreasing","sameDirectionDecreasing","sameSemVer","differentDirectionsInclusive","oppositeDirectionsLessThan","oppositeDirectionsGreaterThan","compRe","_readLinuxVersionFile","_getOsVersion","_findMatch","stable","archFilter","platFilter","chk","platform_version","plat","lsbContents","lsbReleaseFile","osReleaseFile","randomBytes","bytesToUuid","__createBinding$3","toolrunner","timers_1","_debug","_getCommandString","noPrefix","_getSpawnFileName","_getSpawnArgs","_isCmdFile","_windowsQuoteCmdArg","_processLineBuffer","strBuffer","onLine","argline","_endsWith","upperToolPath","_uvQuoteCmdArg","cmdSpecialChars","needsQuotes","quoteHit","_cloneExecOptions","silent","failOnStdErr","ignoreReturnCode","outStream","errStream","_getSpawnOptions","argv0","optionsNonNull","ExecState","stdbuffer","stdline","errbuffer","processStderr","errline","processError","processExited","processClosed","CheckComplete","processExitCode","argString","append","escaped","inQuotes","charAt","_setResult","HandleTimeout","__createBinding$2","exec_1","getExecOutput_1","string_decoder_1","exec_2","stdoutDecoder","StringDecoder","stderrDecoder","originalStdoutListener","originalStdErrListener","__createBinding$1","retryHelper","RetryHelper","maxAttempts","minSeconds","maxSeconds","execute","isRetryable","attempt","core$2","getSleepAmount","sleep","__importDefault","toolCache","findFromManifest","getManifestFromRepo","find_1","cacheFile","cacheDir_1","extractXar","extractTar","extract7z","downloadTool_1","HTTPError","mm","httpm","require$$8","require$$10","require$$11","require$$12","retry_helper_1","httpStatusCode","IS_MAC","authorization","statusMessage","readStream","responseMessageFactory","succeeded","downloadToolAttempt","_7zPath","originalCwd","powershellPath","versionOutput","isGnuTar","destArg","fileArg","xarPath","escapedFile","escapedDest","pwshPath","extractZipWin","unzipPath","extractZipNix","destPath","itemName","sourceFile","targetFile","destFolder","cachePath","owner","branch","releases","treeUrl","manifestUrl","tree","versionsRaw","manifest","dist","previousError","optsArg","optsFs","mkdirAsync","rej","made","statAsync","mkdirpManualSync","parent","fer","mkdirpManual","st","findMade","findMadeSync","mkdirpNativeSync","mkdirpNative","__TESTING_MKDIRP_PLATFORM__","pathArg","badWinChars","versArr","__TESTING_MKDIRP_NODE_VERSION__","hasNative","useNativeSync","useNative","mkdirpSync","mkdirp","native","nativeSync","manual","manualSync","defaultLLVM","llvm","clang","clangtidy","clangformat","ninja","gcovr","conan","meson","kcov","task","doxygen","gcc","mingw","nala","base_exec_prefix","unique","getUbuntuVersion_1","getUbuntuVersion","child_process_1","exe","execFile","reDistributor","reDescription","reRelease","distributorFound","rel","ss","versionSplitted","pipxHome","compatHome","pipxBinDir","nameMap","macosVersion","macosRelease","AbortError","getDOMException","errorMessage","DOMException","reason","vsversion_to_versionnumber_1","VSWHERE_PATH","findVcvarsall_1","setupMSVCDevCmd_1","process$1","arch_aliases","win64","vcvars","cmd_output_parts","old_environment","vcvars_output","new_environment","error_messages","old_env_vars","new_value","_1","setupLLVMDeps","hasVCPKG","llvmSetups","gccSetups","mingwSetups","msvcSetups","msvc","cl","msbuild","visualstudio","appleClangSetups","appleclang","applellvm","nalaPack","nalaLegacyPack","installer","setupNalaViaInstaller","vcpkg","addShExt","addShRelativePrefix","bazel","opencppcoverage","OpenCppCoverage","choco","brew","pwsh","ccache","sccache","activateWinDoxygen","graphviz","cppcheck","activateWinCppcheck","vcvarsall","versionSplit","addVPrefix","installMethod","version_number","removeVPrefix","make","gnuBinDir","sevenzip","tools","checkUpdatePromise","updateNotifier","checkUpdates","ACTIONS_ALLOW_UNSECURE_COMMANDS","idx","alibi","strict","unknown","defaults","mri","inp","parseArgs","help","table","documentation","coverage","architecture","SETUP_CPP_DIR","timeFormatter","timeDelta.create","time1","time2","timeDelta.addLocale","timeDeltaLocale","numerous.addLocale","numerousLocale","toolsInUse","toolsNonDefaultVersion","syncVersions","failedFast","parseFloat","maybeCompiler","compiler","time1Compiler","compilerAndVersion","compilerAndMaybeVersion","maybeVersion","getCompilerInfo","installCompiler","time2Compiler","uniqueEntries","finalizeRC","main","argv"],"mappings":";whBAkCA,SAASA,EAAaC,EAASC,EAAYC,GACvC,MAAMC,EAAM,IAAIC,GAAQJ,EAASC,EAAYC,GAC7CG,QAAQC,OAAOC,MAAMJ,KAAiBK,GAAGC,IAC7C,CCjCe,SAASC,IAMtB,OALIC,GAAUC,GAAUC,OAAS,KAC/BC,GAAOC,eAAeH,IACZD,GAAA,GAGLC,GAAUI,MAAML,GAASA,IAAW,GAC7C,CCTA,SAASM,EAASC,GAChB,MAAuB,iBAATA,GAAqBC,GAAMC,KAAKF,EAChD,CCQA,SAASG,EAAUC,EAAKC,EAAS,GAGzB,MAAAL,GAAQM,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IAAM,IAAMC,GAAUF,EAAIC,EAAS,IAAMC,GAAUF,EAAIC,EAAS,IA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,YACPhnC,YAAY,kBACZinC,SAAS,SAET,CACAxnD,KAAK,SACLqnD,OAAO,EACPE,OAAO,YACPhnC,YAAY,gCACZinC,SAAS,QAET,CACAxnD,KAAK,UACLqnD,OAAO,EACPE,OAAO,OACPhnC,YAAY,iCACZinC,SAAS,SAET,CACAxnD,KAAK,SACLqnD,OAAO,EACPE,OAAO,OACPhnC,YAAY,8BACZinC,SAAS,QAET,CACAxnD,KAAK,UACLqnD,OAAO,EACPE,OAAO,OACPhnC,YAAY,sBACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,EACPE,OAAO,OACPhnC,YAAY,UACZinC,SAAS,QAET,CACAxnD,KAAK,SACLqnD,OAAO,EACPE,OAAO,OACPhnC,YAAY,UACZinC,SAAS,OAET,CACAxnD,KAAK,SACLqnD,OAAO,EACPE,OAAO,OACPhnC,YACA,oEACAinC,SAAS,OAET,CACAxnD,KAAK,SACLqnD,OAAO,EACPE,OAAO,YACPhnC,YAAY,oDACZinC,SAAS,SAET,CACAxnD,KAAK,SACLqnD,OAAO,EACPE,OAAO,OACPhnC,YAAY,kCACZinC,SAAS,QAET,CACAxnD,KAAK,UACLqnD,OAAO,EACPE,OAAO,YACPhnC,YAAY,qBACZinC,SAAS,QACTE,QAAO,GAEP,CACA1nD,KAAK,UACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,8BACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,OACPhnC,YAAY,qBACZinC,SAAS,QAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,8BACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,wBACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,mBACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,cACZinC,SAAS,QAET,CACAxnD,KAAK,YACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,+BACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,SACPhnC,YAAY,+CACZinC,SAAS,SAET,CACAxnD,KAAK,SACLqnD,OAAO,GACPE,OAAO,SACPhnC,YAAY,+CACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,UACPhnC,YAAY,WACZinC,SAAS,QACTE,QAAO,GAEP,CACA1nD,KAAK,UACLqnD,OAAO,GACPE,OAAO,QACPhnC,YAAY,SACZinC,SAAS,QACTE,QAAO,GAEP,CACA1nD,KAAK,UACLqnD,OAAO,GACPE,OAAO,QACPhnC,YAAY,mCACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,QACPhnC,YAAY,gDACZinC,SAAS,SAET,CACAxnD,KAAK,WACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,oCACZinC,SAAS,SAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,QACPhnC,YAAY,qDACZinC,SAAS,SAET,CACAxnD,KAAK,SACLqnD,OAAO,GACPE,OAAO,SACPhnC,YAAY,mCACZinC,SAAS,OAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,OACPhnC,YAAY,oBACZinC,SAAS,OAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,OACPhnC,YAAY,eACZinC,SAAS,OAET,CACAxnD,KAAK,YACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,mBACZinC,SAAS,OAET,CACAxnD,KAAK,UACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,mBACZinC,SAAS,OAET,CACAxnD,KAAK,WACLqnD,OAAO,GACPE,OAAO,SACPhnC,YAAY,+BACZinC,SAAS,OAET,CACAxnD,KAAK,QACLqnD,OAAO,GACPE,OAAO,YACPhnC,YAAY,mBACZinC,SAAS,SAET,CACAxnD,KA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LhvB,QAAQwS,SAAWwc,CAAA,IAEpBzd,OAAO5O,IACN8K,EAAM,oBACNA,EAAM9K,GACN3C,QAAQwS,SAAW,CAAA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,65,66,67,68,69,73,88,89,90,91,92,113,116,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,276,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,294,295]} \ No newline at end of file diff --git a/src/__tests__/main.test.ts b/src/__tests__/main.test.ts index b5b220d8..c192a7b3 100644 --- a/src/__tests__/main.test.ts +++ b/src/__tests__/main.test.ts @@ -1,6 +1,6 @@ import { parseArgs } from "../cli-options.js" import { getCompilerInfo } from "../compilers.js" -import type { Inputs } from "../tool.js" +import { type Inputs, llvmTools } from "../tool.js" import { DefaultUbuntuVersion, DefaultVersions } from "../versions/default_versions.js" import { getVersion, syncVersions } from "../versions/versions.js" @@ -27,24 +27,23 @@ describe("getCompilerInfo", () => { describe("syncVersion", () => { it("Syncs llvm tools versions", () => { - const llvmTools = ["llvm", "clangtidy", "clangformat"] as Inputs[] - expect(syncVersions(parseArgs(["--llvm", "14.0.0", "--clangtidy", "true"]), llvmTools)).toBe(true) - expect(syncVersions(parseArgs(["--llvm", "13.0.0", "--clangtidy", "true"]), llvmTools)).toBe(true) - expect(syncVersions(parseArgs(["--llvm", "13.0.0", "--clangtidy", "12.0.0"]), llvmTools)).toBe(false) + expect(syncVersions(parseArgs(["--llvm", "14.0.0", "--clangtidy", "true"]), llvmTools as Inputs[])).toBe(true) + expect(syncVersions(parseArgs(["--llvm", "13.0.0", "--clangtidy", "true"]), llvmTools as Inputs[])).toBe(true) + expect(syncVersions(parseArgs(["--llvm", "13.0.0", "--clangtidy", "12.0.0"]), llvmTools as Inputs[])).toBe(false) const opts1 = parseArgs(["--llvm", "14.0.0", "--clangtidy", "true"]) - expect(syncVersions(opts1, llvmTools)).toBe(true) + expect(syncVersions(opts1, llvmTools as Inputs[])).toBe(true) expect(opts1.llvm).toBe(opts1.clangtidy) expect(opts1.clangformat).toBe(undefined) const opts2 = parseArgs(["--clangtidy", "15.0.0", "--clangformat", "true"]) - expect(syncVersions(opts2, llvmTools)).toBe(true) + expect(syncVersions(opts2, llvmTools as Inputs[])).toBe(true) expect(opts2.llvm).toBe(undefined) expect(opts2.clangtidy).toBe("15.0.0") expect(opts2.clangformat).toBe("15.0.0") const opts3 = parseArgs(["--llvm", "true", "--clangformat", "true"]) - expect(syncVersions(opts3, llvmTools)).toBe(true) + expect(syncVersions(opts3, llvmTools as Inputs[])).toBe(true) expect(opts3.llvm).toBe("true") expect(opts3.clangtidy).toBe(undefined) expect(opts3.clangformat).toBe("true") diff --git a/src/cli-options.ts b/src/cli-options.ts index b51e23a1..c48b699a 100644 --- a/src/cli-options.ts +++ b/src/cli-options.ts @@ -32,7 +32,9 @@ All the available tools: console.table( { - "compiler and analyzer": { tools: "--llvm, --gcc, --msvc, --vcvarsall, --cppcheck, --clangtidy, --clangformat" }, + "compiler and analyzer": { + tools: "--llvm, --gcc, --msvc, --apple-clang, --vcvarsall, --cppcheck, --clang-tidy, --clang-format", + }, "build system": { tools: "--cmake, --ninja, --meson, --make, --task, --bazel" }, "package manager": { tools: "--vcpkg, --conan, --choco, --brew, --nala" }, cache: { tools: "--ccache, --sccache" }, diff --git a/src/compilers.ts b/src/compilers.ts index 132a2a76..7fb35668 100644 --- a/src/compilers.ts +++ b/src/compilers.ts @@ -1,29 +1,41 @@ import { join } from "path" -import { endGroup, notice, startGroup } from "@actions/core" +import { endGroup, startGroup } from "@actions/core" import { error, info } from "ci-log" -import { addEnv } from "envosman" import semverValid from "semver/functions/valid" -import { getSuccessMessage, rcOptions } from "./cli-options.js" +import { getSuccessMessage } from "./cli-options.js" import { setupGcc, setupMingw } from "./gcc/gcc.js" import { activateGcovGCC, activateGcovLLVM } from "./gcovr/gcovr.js" +import { setupAppleClang } from "./llvm/apple-clang.js" import { setupLLVM } from "./llvm/llvm.js" import { setupMSVC } from "./msvc/msvc.js" +import { appleClangSetups, gccSetups, llvmSetups, mingwSetups, msvcSetups } from "./tool.js" +import type { InstallationInfo } from "./utils/setup/setupBin.js" import { getVersion } from "./versions/versions.js" -/** Detecting the compiler version. Divide the given string by `-` and use the second element as the version */ +/** + * Detecting the compiler version. Divide the given string by `-` and use the second element as the version + * + * @param compilerAndVersion - The compiler and version string + * @returns The compiler and version + * + * @nothrow It doesn't throw any error, but it logs the error if it fails to parse the compiler info + */ export function getCompilerInfo(compilerAndVersion: string) { - const compilerAndMaybeVersion = compilerAndVersion.split("-") - const compiler = compilerAndMaybeVersion[0] - if (1 in compilerAndMaybeVersion) { - const maybeVersion = compilerAndMaybeVersion[1] - if (semverValid(maybeVersion) !== null) { - return { compiler, version: maybeVersion } - } else { - info(`Invalid semver version ${maybeVersion} used for the compiler.`) + try { + const compilerAndMaybeVersion = compilerAndVersion.split("-") + const compiler = compilerAndMaybeVersion[0] + if (1 in compilerAndMaybeVersion) { + const maybeVersion = compilerAndMaybeVersion[1] + if (semverValid(maybeVersion) === null) { + info(`Invalid semver version ${maybeVersion} used for the compiler.`) + } return { compiler, version: maybeVersion } } + return { compiler, version: undefined } + } catch (err) { + error(`Failed to parse the compiler info ${compilerAndVersion}: ${err}`) + return { compiler: compilerAndVersion, version: undefined } } - return { compiler, version: undefined } } /** Installing the specified compiler */ @@ -35,73 +47,47 @@ export async function installCompiler( successMessages: string[], errorMessages: string[], ) { - try { - const { compiler, version } = getCompilerInfo(compilerAndVersion) + const { compiler, version } = getCompilerInfo(compilerAndVersion) + let installationInfo: InstallationInfo | undefined | void | null // null means the compiler is not supported + try { // install the compiler. We allow some aliases for the compiler name startGroup(`Installing ${compiler} ${version ?? ""}`) - switch (compiler) { - case "llvm": - case "clang": - case "clang++": { - const installationInfo = await setupLLVM( - getVersion("llvm", version, osVersion), - join(setupCppDir, "llvm"), - arch, - ) - - await activateGcovLLVM() - - successMessages.push(getSuccessMessage("llvm", installationInfo)) - break - } - case "gcc": - case "mingw": - case "cygwin": - case "msys": { - const gccVersion = compiler === "mingw" - ? getVersion("mingw", version, osVersion) - : getVersion("gcc", version, osVersion) - const installationInfo = compiler === "mingw" - ? await setupMingw(gccVersion, join(setupCppDir, "gcc"), arch) - : await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch) - - await activateGcovGCC(gccVersion) - - successMessages.push(getSuccessMessage("gcc", installationInfo)) - break - } - case "cl": - case "msvc": - case "msbuild": - case "vs": - case "visualstudio": - case "visualcpp": - case "visualc++": { - const installationInfo = await setupMSVC( - getVersion("msvc", version, osVersion), - join(setupCppDir, "msvc"), - arch, - ) - - successMessages.push(getSuccessMessage("msvc", installationInfo)) - break - } - case "appleclang": - case "applellvm": { - notice("Assuming apple-clang is already installed") - await Promise.all([addEnv("CC", "clang", rcOptions), addEnv("CXX", "clang++", rcOptions)]) - successMessages.push(getSuccessMessage("apple-clang", undefined)) - break - } - default: { - errorMessages.push(`Unsupported compiler ${compiler}`) - } + if (compiler in llvmSetups) { + installationInfo = await setupLLVM( + getVersion("llvm", version, osVersion), + join(setupCppDir, "llvm"), + arch, + ) + await activateGcovLLVM() + } else if (compiler in gccSetups) { + const gccVersion = getVersion("gcc", version, osVersion) + installationInfo = await setupGcc(gccVersion, join(setupCppDir, "gcc"), arch) + await activateGcovGCC(gccVersion) + } else if (compiler in mingwSetups) { + const gccVersion = getVersion("mingw", version, osVersion) + installationInfo = await setupMingw(gccVersion, join(setupCppDir, "gcc"), arch) + await activateGcovGCC(gccVersion) + } else if (compiler in msvcSetups) { + installationInfo = await setupMSVC( + getVersion("msvc", version, osVersion), + join(setupCppDir, "msvc"), + arch, + ) + } else if (compiler in appleClangSetups) { + await setupAppleClang() + } else { + installationInfo = null + errorMessages.push(`Unsupported compiler ${compiler}`) } } catch (err) { error(err as string | Error) errorMessages.push(`Failed to install the ${compilerAndVersion}`) } + if (installationInfo !== null) { + successMessages.push(getSuccessMessage(compiler, installationInfo)) + } + endGroup() } diff --git a/src/installTool.ts b/src/installTool.ts index 2a894ca1..019988e9 100644 --- a/src/installTool.ts +++ b/src/installTool.ts @@ -4,7 +4,7 @@ import { error } from "ci-log" import pTimeout from "p-timeout" import { setupBrew } from "setup-brew" import { getSuccessMessage, rcOptions } from "./cli-options.js" -import { type ToolName, setups } from "./tool.js" +import { type ToolName, llvmTools, setups } from "./tool.js" import type { InstallationInfo } from "./utils/setup/setupBin.js" import { setupVCVarsall } from "./vcvarsall/vcvarsall.js" import { getVersion } from "./versions/versions.js" @@ -46,7 +46,7 @@ async function installToolImpl( setupCppDir: string, successMessages: string[], ) { - const hasLLVM = ["llvm", "clangformat", "clangtidy"].includes(tool) + const hasLLVM = llvmTools.includes(tool) let installationInfo: InstallationInfo | undefined | void if (tool === "vcvarsall") { diff --git a/src/llvm/apple-clang.ts b/src/llvm/apple-clang.ts new file mode 100644 index 00000000..bdd1d3a9 --- /dev/null +++ b/src/llvm/apple-clang.ts @@ -0,0 +1,19 @@ +import { error } from "console" +import { notice } from "ci-log" +import { addEnv } from "envosman" +import which from "which" +import { rcOptions } from "../cli-options.js" + +export async function setupAppleClang() { + if (process.platform !== "darwin") { + return + } + + if (await which("clang", { nothrow: true }) !== null && await which("clang++", { nothrow: true }) !== null) { + notice("Assuming clang is an Apple Clang compiler") + await Promise.all([addEnv("CC", "clang", rcOptions), addEnv("CXX", "clang++", rcOptions)]) + } + + // TODO install Apple Clang automatically + error("Apple Clang automatic installation is not supported yet") +} diff --git a/src/setup-cpp.ts b/src/setup-cpp.ts index 9e6676d6..3963d60e 100644 --- a/src/setup-cpp.ts +++ b/src/setup-cpp.ts @@ -13,7 +13,7 @@ import { checkUpdates } from "./check-updates.js" import { parseArgs, printHelp, rcOptions } from "./cli-options.js" import { installCompiler } from "./compilers.js" import { installTool } from "./installTool.js" -import { tools } from "./tool.js" +import { type Inputs, llvmTools, tools } from "./tool.js" import { isArch } from "./utils/env/isArch.js" import { ubuntuVersion } from "./utils/env/ubuntu_version.js" import { setupPacmanPack } from "./utils/setup/setupPacmanPack.js" @@ -56,8 +56,8 @@ async function main(args: string[]): Promise { const osVersion = await ubuntuVersion() // sync the version for the llvm tools - if (!syncVersions(opts, ["llvm", "clangtidy", "clangformat"])) { - error("The same version must be used for llvm, clangformat and clangtidy") + if (!syncVersions(opts, llvmTools as Inputs[])) { + error("The same version must be used for llvm, clang-format and clang-tidy") return 1 } diff --git a/src/tool.ts b/src/tool.ts index d88d98ab..06c1f43a 100644 --- a/src/tool.ts +++ b/src/tool.ts @@ -6,10 +6,11 @@ import { setupCmake } from "./cmake/cmake.js" import { setupConan } from "./conan/conan.js" import { setupCppcheck } from "./cppcheck/cppcheck.js" import { setupDoxygen } from "./doxygen/doxygen.js" -import { setupGcc } from "./gcc/gcc.js" +import { setupGcc, setupMingw } from "./gcc/gcc.js" import { setupGcovr } from "./gcovr/gcovr.js" import { setupGraphviz } from "./graphviz/graphviz.js" import { setupKcov } from "./kcov/kcov.js" +import { setupAppleClang } from "./llvm/apple-clang.js" import { setupClangFormat, setupClangTools, setupLLVM } from "./llvm/llvm.js" import { setupMake } from "./make/make.js" import { setupMeson } from "./meson/meson.js" @@ -25,8 +26,31 @@ import { setupTask } from "./task/task.js" import { setupVcpkg } from "./vcpkg/vcpkg.js" import { setupVCVarsall } from "./vcvarsall/vcvarsall.js" +export const llvmSetups = { llvm: setupLLVM, clang: setupLLVM, "clang++": setupLLVM } as const +export const gccSetups = { gcc: setupGcc, "g++": setupGcc } as const +export const mingwSetups = { mingw: setupMingw } as const +export const msvcSetups = { + msvc: setupMSVC, + cl: setupMSVC, + msbuild: setupMSVC, + visualstudio: setupMSVC, +} as const +export const appleClangSetups = { + appleclang: setupAppleClang, + applellvm: setupAppleClang, + "apple-clang": setupAppleClang, + "apple-llvm": setupAppleClang, +} as const + +export const llvmTools = ["llvm", "clang", "clang++", "clang-tidy", "clang-format", "clangtidy", "clangformat"] + /** The setup functions */ export const setups = { + ...llvmSetups, + ...gccSetups, + ...mingwSetups, + ...msvcSetups, + ...appleClangSetups, nala: setupNala, cmake: setupCmake, ninja: setupNinja, @@ -37,25 +61,28 @@ export const setups = { meson: setupMeson, gcovr: setupGcovr, opencppcoverage: setupOpencppcoverage, - llvm: setupLLVM, - gcc: setupGcc, + OpenCppCoverage: setupOpencppcoverage, choco: setupChocolatey, brew: setupBrew, powershell: setupPowershell, + pwsh: setupPowershell, ccache: setupCcache, sccache: setupSccache, doxygen: setupDoxygen, graphviz: setupGraphviz, cppcheck: setupCppcheck, + "clang-tidy": setupClangTools, clangtidy: setupClangTools, + "clang-format": setupClangFormat, clangformat: setupClangFormat, - msvc: setupMSVC, vcvarsall: setupVCVarsall, kcov: setupKcov, make: setupMake, task: setupTask, sevenzip: setupSevenZip, -} + "7zip": setupSevenZip, + "7z": setupSevenZip, +} as const export type ToolName = keyof typeof setups diff --git a/src/versions/default_versions.ts b/src/versions/default_versions.ts index fd970215..f3e29a8c 100644 --- a/src/versions/default_versions.ts +++ b/src/versions/default_versions.ts @@ -11,7 +11,11 @@ const defaultLLVM = process.platform === "darwin" && process.arch === "x64" export const DefaultVersions: Record = { // https://github.com/llvm/llvm-project/releases llvm: defaultLLVM, + clang: defaultLLVM, + "clang++": defaultLLVM, + "clang-tidy": defaultLLVM, clangtidy: defaultLLVM, + "clang-format": defaultLLVM, clangformat: defaultLLVM, ninja: "1.12.1", // https://github.com/ninja-build/ninja/releases cmake: "3.30.2", // https://github.com/Kitware/CMake/releases