diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cdd8d864..3e5fbf59 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -241,12 +241,12 @@ jobs: pnpm: - 9.9.0 container: - - { file: "ubuntu-llvm.dockerfile", image: "setup-cpp-ubuntu-llvm", tag: "22.04-0.40.0" } - - { file: "fedora-llvm.dockerfile", image: "setup-cpp-fedora-llvm", tag: "40-0.40.0" } - - { file: "arch-llvm.dockerfile", image: "setup-cpp-arch-llvm", tag: "base-0.40.0" } - - { file: "ubuntu-mingw.dockerfile", image: "setup-cpp-ubuntu-mingw", tag: "22.04-0.40.0" } - # - { file: "fedora-mingw.dockerfile", image: "setup-cpp-fedora-mingw", tag: "40-0.40.0" } - # - { file: "arch-mingw.dockerfile", image: "setup-cpp-arch-mingw", tag: "base-0.40.0" } + - { file: "ubuntu-llvm.dockerfile", image: "setup-cpp-ubuntu-llvm", tag: "22.04-0.41.0" } + - { file: "fedora-llvm.dockerfile", image: "setup-cpp-fedora-llvm", tag: "40-0.41.0" } + - { file: "arch-llvm.dockerfile", image: "setup-cpp-arch-llvm", tag: "base-0.41.0" } + - { file: "ubuntu-mingw.dockerfile", image: "setup-cpp-ubuntu-mingw", tag: "22.04-0.41.0" } + # - { file: "fedora-mingw.dockerfile", image: "setup-cpp-fedora-mingw", tag: "40-0.41.0" } + # - { file: "arch-mingw.dockerfile", image: "setup-cpp-arch-mingw", tag: "base-0.41.0" } steps: - uses: actions/checkout@v4 with: diff --git a/README.md b/README.md index 851ffdf3..f72db77e 100644 --- a/README.md +++ b/README.md @@ -37,15 +37,13 @@ Run `setup-cpp` with the available options. ```shell # Windows example (open PowerShell as admin) npx setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true - -RefreshEnv.cmd # activate the environment +# restart the shell to activate the environment ``` ```shell # Linux/Macos example sudo npx setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true - -source ~/.cpprc +source ~/.cpprc # activate cpp environment variables ``` NOTE: In the `compiler` entry, you can specify the version after `-` like `llvm-11.0.0`. For the tools, you can pass a specific version instead of `true` that chooses the default version @@ -58,36 +56,41 @@ NOTE: setup-cpp requires Nodejs 12 or higher. If Nodejs shipped with your distri #### With executable -Download the executable for your platform from [here](https://github.com/aminya/setup-cpp/releases/tag/v0.40.0), and run it with the available options. You can also automate downloading using `wget`, `curl`, or other similar tools. - -An example that installs llvm, cmake, ninja, ccache, and vcpkg: +Download the executable for your platform from [here](https://github.com/aminya/setup-cpp/releases/tag/v0.41.0), and run it with the available options. You can also automate downloading using `curl`, or other similar tools. ```shell -# windows example (open PowerShell as admin) -curl -LJO "https://github.com/aminya/setup-cpp/releases/download/v0.40.0/setup-cpp-x64-windows.exe" -./setup-cpp-x64-windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true +# windows x64 +curl -o ./setup-cpp.exe -LJ "https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-x64-windows.exe" -RefreshEnv.cmd # activate cpp environment variables -``` +# linux x64 +curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-x64-linux" +chmod +x ./setup-cpp -```shell -# linux example -wget "https://github.com/aminya/setup-cpp/releases/download/v0.40.0/setup-cpp-x64-linux" -chmod +x ./setup-cpp-x64-linux -sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true +# macos arm64 +curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-arm64-macos" +chmod +x ./setup-cpp -source ~/.cpprc # activate cpp environment variables +# macos x64 +curl -o ./setup-cpp -LJ "https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-x64-macos" +chmod +x ./setup-cpp ``` +An example that installs llvm, cmake, ninja, ccache, and vcpkg: + ```shell -# macos example -wget "https://github.com/aminya/setup-cpp/releases/download/v0.40.0/setup-cpp-x64-macos" -chmod +x ./setup-cpp-x64-macos -sudo ./setup-cpp-x64-macos --compiler llvm --cmake true --ninja true --ccache true --vcpkg true +# windows example (open PowerShell as admin) +./setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true +# restart the shell to activate the environment +``` +```shell +# linux/macos example +sudo ./setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true source ~/.cpprc # activate cpp environment variables ``` +NOTE: On Unix systems, if you are already a root user (e.g., in a GitLab runner or Docker), you will not need to use `sudo`. + ### Inside GitHub Actions Here is a complete cross-platform example that tests llvm, gcc, and msvc. It also uses cmake, ninja, vcpkg, and cppcheck. @@ -156,19 +159,19 @@ To provide fast development environments, `setup-cpp` provides several prebuilt You can use these images as a base image for your project. ```dockerfile -FROM aminya/setup-cpp-ubuntu-llvm:22.04-0.40.0 AS builder +FROM aminya/setup-cpp-ubuntu-llvm:22.04-0.41.0 AS builder ``` ```dockerfile -FROM aminya/setup-cpp-ubuntu-mingw:22.04-0.40.0 AS builder +FROM aminya/setup-cpp-ubuntu-mingw:22.04-0.41.0 AS builder ``` ```dockerfile -FROM aminya/setup-cpp-fedora-llvm:40-0.40.0 AS builder +FROM aminya/setup-cpp-fedora-llvm:40-0.41.0 AS builder ``` ```dockerfile -FROM aminya/setup-cpp-arch-llvm:base-0.40.0 AS builder +FROM aminya/setup-cpp-arch-llvm:base-0.41.0 AS builder ``` The names are in the format `aminya/setup-cpp--:-`. @@ -187,7 +190,7 @@ RUN apt-get update -qq && \ # install nodejs apt-get install -y --no-install-recommends nodejs npm && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --nala true \ @@ -296,7 +299,7 @@ stages: apt-get install -y --no-install-recommends nodejs npm # install setup-cpp - npm install -g setup-cpp@v0.40.0 + npm install -g setup-cpp@v0.41.0 # install the compiler and tools ./setup-cpp-x64-linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true diff --git a/dev/docker/setup-cpp/setup-cpp-arch-llvm.dockerfile b/dev/docker/setup-cpp/setup-cpp-arch-llvm.dockerfile index 1ad11719..c9909729 100644 --- a/dev/docker/setup-cpp/setup-cpp-arch-llvm.dockerfile +++ b/dev/docker/setup-cpp/setup-cpp-arch-llvm.dockerfile @@ -6,7 +6,7 @@ RUN pacman -Syuu --noconfirm && \ # install nodejs pacman -S --noconfirm --needed nodejs npm && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --compiler llvm \ diff --git a/dev/docker/setup-cpp/setup-cpp-arch-mingw.dockerfile b/dev/docker/setup-cpp/setup-cpp-arch-mingw.dockerfile index 2e7eb862..f45b4682 100644 --- a/dev/docker/setup-cpp/setup-cpp-arch-mingw.dockerfile +++ b/dev/docker/setup-cpp/setup-cpp-arch-mingw.dockerfile @@ -6,7 +6,7 @@ RUN pacman -Syuu --noconfirm && \ # install nodejs pacman -S --noconfirm --needed nodejs npm && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --compiler mingw \ diff --git a/dev/docker/setup-cpp/setup-cpp-fedora-llvm.dockerfile b/dev/docker/setup-cpp/setup-cpp-fedora-llvm.dockerfile index 2e728a53..1ffd284b 100644 --- a/dev/docker/setup-cpp/setup-cpp-fedora-llvm.dockerfile +++ b/dev/docker/setup-cpp/setup-cpp-fedora-llvm.dockerfile @@ -4,7 +4,7 @@ FROM fedora:40 AS setup-cpp-fedora # install nodejs RUN dnf -y install nodejs npm && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --compiler llvm \ diff --git a/dev/docker/setup-cpp/setup-cpp-fedora-mingw.dockerfile b/dev/docker/setup-cpp/setup-cpp-fedora-mingw.dockerfile index a4cc4234..df4195a5 100644 --- a/dev/docker/setup-cpp/setup-cpp-fedora-mingw.dockerfile +++ b/dev/docker/setup-cpp/setup-cpp-fedora-mingw.dockerfile @@ -4,7 +4,7 @@ FROM fedora:40 AS setup-cpp-fedora-mingw # install nodejs RUN dnf -y install nodejs npm && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --compiler mingw \ diff --git a/dev/docker/setup-cpp/setup-cpp-ubuntu-20.0.4-llvm.dockerfile b/dev/docker/setup-cpp/setup-cpp-ubuntu-20.0.4-llvm.dockerfile index 500eb6c0..5501b647 100644 --- a/dev/docker/setup-cpp/setup-cpp-ubuntu-20.0.4-llvm.dockerfile +++ b/dev/docker/setup-cpp/setup-cpp-ubuntu-20.0.4-llvm.dockerfile @@ -11,7 +11,7 @@ RUN apt-get update -qq && \ apt-get update -qq && \ apt-get install -y --no-install-recommends nodejs && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --nala true \ diff --git a/dev/docker/setup-cpp/setup-cpp-ubuntu-llvm.dockerfile b/dev/docker/setup-cpp/setup-cpp-ubuntu-llvm.dockerfile index 2ac83660..e2139948 100644 --- a/dev/docker/setup-cpp/setup-cpp-ubuntu-llvm.dockerfile +++ b/dev/docker/setup-cpp/setup-cpp-ubuntu-llvm.dockerfile @@ -5,7 +5,7 @@ RUN apt-get update -qq && \ # install nodejs apt-get install -y --no-install-recommends nodejs npm && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --nala true \ diff --git a/dev/docker/setup-cpp/setup-cpp-ubuntu-mingw.dockerfile b/dev/docker/setup-cpp/setup-cpp-ubuntu-mingw.dockerfile index fbd5b85a..ef48a75e 100644 --- a/dev/docker/setup-cpp/setup-cpp-ubuntu-mingw.dockerfile +++ b/dev/docker/setup-cpp/setup-cpp-ubuntu-mingw.dockerfile @@ -5,7 +5,7 @@ RUN apt-get update -qq && \ # install nodejs apt-get install -y --no-install-recommends nodejs npm && \ # install setup-cpp - npm install -g setup-cpp@v0.40.0 && \ + npm install -g setup-cpp@v0.41.0 && \ # install the compiler and tools setup-cpp \ --nala true \ diff --git a/dist/legacy/setup-cpp.js b/dist/legacy/setup-cpp.js index 80040637..4a867049 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 Xr(e,t,r);process.stdout.write(""+n+Vr.EOL)}function o(){return Kr>Yr.length-16&&(vr.randomFillSync(Yr),Kr=0),Yr.slice(Kr,Kr+=16)}function i(e){return"string"==typeof e&&Jr.test(e)}function s(e,t=0){const r=(Qr[e[t+0]]+Qr[e[t+1]]+Qr[e[t+2]]+Qr[e[t+3]]+"-"+Qr[e[t+4]]+Qr[e[t+5]]+"-"+Qr[e[t+6]]+Qr[e[t+7]]+"-"+Qr[e[t+8]]+Qr[e[t+9]]+"-"+Qr[e[t+10]]+Qr[e[t+11]]+Qr[e[t+12]]+Qr[e[t+13]]+Qr[e[t+14]]+Qr[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 vn(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new vn("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||En.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=wn.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 Gn||(Gn=1,function(e){var t=kr&&kr.__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=hr,n=mr,{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}(Yn)),Yn}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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=kr&&kr.__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=kr&&kr.__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=Mr,u=Wr,p=Gr,f=a(hr),d=a(yr),v=function(){if(Un)return mn;Un=1;var e=kr&&kr.__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(mn,"__esModule",{value:!0}),mn.OidcClient=void 0;const t=jn,n=Fn,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 mn.OidcClient=i,mn}();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(Bn)return Kn;Bn=1;var e=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=kr&&kr.__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(Kn,"__esModule",{value:!0}),Kn.toPlatformPath=Kn.toWin32Path=Kn.toPosixPath=void 0;const n=r(yr);return Kn.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Kn.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Kn.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Kn}();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}})}(Fr)),Fr}function v(e){return jr.GITHUB_ACTIONS?Jn.error(e):console.log(`${e}`)}function y(e){return jr.GITHUB_ACTIONS?Jn.warning(e):console.log(`${e}`)}function g(e){return jr.GITHUB_ACTIONS?Jn.notice(e):console.log(`${e}`)}function w(e){return jr.GITHUB_ACTIONS?Jn.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)}))}))}Wn(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=po.sync(e.command,{path:r[fo({env:r})],pathExt:t?uo.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=uo.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 So&&1===e&&!t.file?b(t.original,"spawn"):null}function R(e,t,r){const n=To(e,t,r),o=Io.spawn(n.command,n.args,n.options);return xo.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=Ni(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=xi.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await Ci(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new $i)}))})),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),bi(n.options);try{s=Sr.spawn(n.file,n.args,n.options)}catch(p){const e=new Sr.ChildProcess,t=Promise.reject(zo({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return zi(e,t),e}const a=Xi(s),c=_i(s,n.options,a),l=Oi(s,n.options,c);s.kill=mi.bind(null,s.kill.bind(s)),s.cancel=Ei.bind(null,s,{isCanceled:!1});const u=jo((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,u,p]=await qi(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=zo({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 Fi(s,n.options),s.all=Mi(s,n.options),Si(s),zi(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=Ui(n.options);let a;try{a=Sr.spawnSync(n.file,n.args,{...n.options,input:s})}catch(u){throw zo({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=zo({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=mr.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 mr.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?yr.join("/Users/",process.env.SUDO_USER):yr.join("/home/",process.env.SUDO_USER);{const e=hr.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(jr.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void w(`Environment variable ${e} is already defined. Skipping.`);Jn.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(yr.delimiter))?r:[]).includes(e)}(e)){process.env.PATH=`${e}${yr.delimiter}${process.env.PATH}`;try{if(jr.GITHUB_ACTIONS)try{Jn.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){jr.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=yr.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=yr.join(r,t);if(!(await ee(n))){xe(),await Ie([{name:"ca-certificates"}]);const r=yr.join(hr.tmpdir(),t),o=new jd.DownloaderHelper(e,hr.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=yr.dirname(t),{binDir:Wd};await Ie([{name:"ca-certificates"}]);const r=new jd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",hr.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 yr.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=yr.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=yr.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,ry);const c=oa.sync("choco",{nothrow:!0});return Qd=null!==c?yr.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,ry),{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=yr.join(hr.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:hr.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?yr.basename(e):yr.basename(e,yr.extname(e))}function He(e){return yr.normalize(e).replace(RegExp(_e(yr.sep)+"$"),"")}function Ve(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function ze(e,t){const r=yr.extname(e),n=`${t}${yr.basename(e,r)}${r}`;return yr.join(yr.dirname(e),n)}function Xe(e,t){const r=yr.extname(e),n=`${yr.basename(e,r)}${t}${r}`;return yr.join(yr.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=yr.extname(e).length;return e.slice(0,-t)}function Je(e,t){return sh(e,t)}function Qe(e,t){const r=yr.relative(t,e);return!(!r||".."===r||r.startsWith(".."+yr.sep)||r===yr.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=kr[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("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:hr.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:yr.join(hr.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:l,extractedFolderName:u,extractFunction:p}=await r(t,process.platform,o);if(jr.GITHUB_ACTIONS)try{const r=Bm(e,t);if(r){const n=yr.join(r,u),o=yr.join(n,c);if(await ee(yr.join(o,l)))return w(`${e} ${t} was found in the cache at ${o}.`),await se(o,ry),{installDir:n,binDir:o}}}catch{}const f=yr.join(n,u),d=yr.join(f,c),h=yr.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=yr.join(null!=(e=process.env.RUNNER_TEMP)?e:hr.tmpdir(),`${Date.now()}-${yr.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,ry),!(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){jr.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==fr("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)}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=yr.dirname(o);n={bin:o,installDir:e,binDir:e}}else{if(jr.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 It(t),void 0===o)throw Error("Python binary could not be found");const s=yr.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 It(e);if(void 0===n)throw Error("Python binary could not be found");const o=yr.dirname(n);await se(o,ry),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=yr.join(e.stdout,"libexec","bin");await se(n,ry);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 It(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:yr.dirname(o),binDir:yr.dirname(o)}}return n}(e,t,r);Ir(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await xt();return void 0===t?(w("pip was not found. Installing pip"),await async function(e){await At(e)||(await jt("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===jt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await P(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await Dt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){y(`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){y(`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=yr.parse(hr.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 Tt(t,yr.join(e,r));if(void 0!==n)return n}}}async function Tt(e,t){var r;try{if(void 0!==t){const r=yr.join(t,Ve(e));if(await ee(r)&&await Rt(r,pv.python))return r}const n=null!=(r=await oa(e,{nothrow:!0,all:!0}))?r:[];for(const e of n)if(await Rt(e,pv.python))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){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.pip))return e}catch{}}async function At(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 Nt(e,t,r=null){var n;return Ct(t)&&"linux"===process.platform&&null!==r&&e in fv?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,fv[e]):Ct(t)&&e in uv?null!=(n=uv[e])?n:"":"true"===t?"":null!=t?t:""}function Ct(e){return"true"===e||void 0===e}function $t(){if(!("version"in hr)||"function"!=typeof hr.version)return null;const e=hr.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 Ev(),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 P(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,t);if(u)try{Jn.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 gv(),u.PIPX_BIN_DIR=await wv()),A(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(d){if(Jn.info(`Failed to install ${t} via ${l}: ${d}.`),null===await jt(t))throw Error(`Failed to install ${t} via ${l}: ${d}.`)}else if(null===await jt(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);const p=await dv(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>ee(yr.join(e,Ve(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=oa.sync(Ve(t),{nothrow:!0});return null!==n?yr.dirname(n):e[e.length-1]}(p,t);return await se(f,ry),{binDir:f}}async function kt(e){return 0===(await P(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function jt(e,t=!0){if("linux"===process.platform){if(Jn.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 Ut(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,ry),{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 Ft(e,t){const{ArchiveHdi:r}=await Promise.resolve().then((()=>require("./assets/hdi-Ca-ZsNp_.js"))),n=new r(e);await n.read((async e=>{await e.extract(yr.join(t,e.path))}))}function Mt(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: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 exports.getExecOutput_1("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await oe("SDKROOT",t.trim(),ry):v("SDKROOT not set")}catch(e){v(e)}}async function Bt(e){const t=await bs(e,"utf-8");return JSON.parse(t)}function qt(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=Ht(i,r,t);if(void 0!==n)return n}}function Ht(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){var n;if("win32"===t){const t=qt(await Bt(yr.join(Ov,"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 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 _t("g++",e,Vt,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,ry)):"ia32"===t&&await ee("C:/tools/mingw32/bin")?(o="C:/tools/mingw32/bin",await se(o,ry)):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"),ry),oe("CXX",Ve(t+"/g++"),ry));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}`,ry),oe("CXX",`${t}/g++-${s}`,ry)),ke()&&o.push(ye("cc",`${t}/gcc-${s}`,ry,r),ye("cxx",`${t}/g++-${s}`,ry,r),ye("gcc",`${t}/gcc-${s}`,ry,r),ye("g++",`${t}/g++-${s}`,ry,r))):(o.push(oe("CC",`${t}/gcc-${a}`,ry),oe("CXX",`${t}/g++-${a}`,ry)),ke()&&o.push(ye("cc",`${t}/gcc-${a}`,ry,r),ye("cxx",`${t}/g++-${a}`,ry,r),ye("gcc",`${t}/gcc-${a}`,ry,r),ye("g++",`${t}/g++-${a}`,ry,r)))}o.push(Gt()),jr.GITHUB_ACTIONS&&await async function(){const e=yr.join(Ov,"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 Xt(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 Wt(e,t,r){return _t("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:Ve("kcov")}}function Kt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:Ve("kcov"),extractFunction:Jt}}async function Jt(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(Nt("cmake",void 0,await yv()),yr.join(te("~"),"cmake"),"");e=yr.join(t,"cmake")}return null===oa.sync("ninja",{nothrow:!0})&&await Wt(Nt("ninja",void 0,await yv()),yr.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=yr.join(Rv,"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=yr.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 Qt(e){return Object.values(Uv).includes(e)?e:e in Uv?Uv[e]:e}function Zt(e){if(Object.keys(Uv).includes(e))return e;for(const[t,r]of Object.entries(Uv))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(""+Av.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Pv.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Nv.existsSync(n))return Pv.info("Found with vswhere: "+n),n;Pv.info("Not found with vswhere");const o=e?[Zt(e)]:jv;for(const i of Dv)for(const e of o)for(const t of kv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Pv.info("Trying standard location: "+n),Nv.existsSync(n))return Pv.info("Found standard location: "+n),n;if(Pv.info("Not found in standard locations"),n=Lv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Nv.existsSync(n))return Pv.info("Found VS 2015: "+n),n;throw Pv.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 ee(t)&&(w(`Adding ${t} to PATH`),await oe("VCTargetsPath",t,ry)),await Bv(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=qv){Jn.startGroup(`Installing ${e} ${t}`);let c=!1;try{c=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(xv(e)),e.addEventListener("abort",(()=>{c(xv(e))}))}if(r===1/0)return void e.then(a,c);const l=new Sv;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 rr(Nt(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Ae({rcOptions:ry});else{const i=yr.join(o,s?"llvm":e),c=Nt(e,t,r),l=Zv[e];a=await l(c,i,n)}return i.push(dr(e,a)),s}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(l){v(l),l instanceof Error&&void 0!==l.stack&&v(l.stack),s.push(e+" failed to install")}return Jn.endGroup(),c}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":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 yv();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=qt(await Bt(yr.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=qt(await Bt(yr.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 ir(e,t,r){var n;const o=await Xv(e,t,r);return await async function(e){var t,r;const n=null!=(t=process.env.LD_LIBRARY_PATH)?t:"",o=null!=(r=process.env.DYLD_LIBRARY_PATH)?r:"",i=[oe("LLVM_PATH",e,ry),oe("LD_LIBRARY_PATH",`${e}/lib${yr.delimiter}${n}`,ry),oe("DYLD_LIBRARY_PATH",`${e}/lib${yr.delimiter}${o}`,ry),oe("LDFLAGS",`-L"${e}/lib"`,ry),oe("CPPFLAGS",`-I"${e}/include"`,ry),oe("CC",Ve(e+"/bin/clang"),ry),oe("CXX",Ve(e+"/bin/clang++"),ry),oe("LIBRARY_PATH",e+"/lib",ry),Gt()];if(ke()){const t=60;i.push(ye("cc",e+"/bin/clang",ry,t),ye("cxx",e+"/bin/clang++",ry,t),ye("clang",e+"/bin/clang",ry),ye("clang++",e+"/bin/clang++",ry),ye("lld",e+"/bin/lld",ry),ye("ld.lld",e+"/bin/ld.lld",ry),ye("llvm-ar",e+"/bin/llvm-ar",ry))}await Promise.all(i)}(null!=(n=o.installDir)?n:t),o}async function sr(e,t,r,n=Hv.All){const o=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),i=Number.parseInt(o.split(".")[0],10);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",hr.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=yr.join(hr.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)&&(Nr.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:qv}),await se(r+"/bin",ry),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(i,n)}catch(a){w("Failed to install llvm via system package manager "+a)}const s=await _t("llvm",e,or,t,r);return await Wv(i),s}async function ar(){if(jr.GITHUB_ACTIONS){const e=yr.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 cr(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Fv(e);w(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=Gv(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 rr(s,c,r,a,n,o,i),jr.GITHUB_ACTIONS&&await async function(){const e=yr.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)}()}function lr(e,t,r){return{url:ur(t,r,e),binRelativeDir:"",binFileName:Ve("pwsh"),extractedFolderName:""}}function ur(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 pr(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 fr(e){const t=Jn.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function dr(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 hr=require("os"),mr=require("fs"),vr=require("crypto"),yr=require("path"),gr=require("http"),wr=require("https");require("net");const Er=require("tls"),_r=require("events"),br=require("util"),Or=require("buffer"),Rr=require("process"),Sr=require("child_process"),Ir=require("assert"),Tr=require("stream"),xr=require("url"),Pr=require("string_decoder"),Ar=require("timers"),Nr=require("console");var Cr="undefined"!=typeof document?document.currentScript:null;const $r=e(mr),Lr=e(gr),Dr=e(wr);var kr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},jr={};const Ur=[{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=Ur,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))}(jr);var Fr={},Mr={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.toCommandProperties=Gr.toCommandValue=void 0,Gr.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Gr.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 Br=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hr=kr&&kr.__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)&&Br(t,e,r);return qr(t,e),t};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.issue=Mr.issueCommand=void 0;const Vr=Hr(hr),zr=Gr;Mr.issueCommand=n,Mr.issue=function(e,t=""){n(e,{},t)};class Xr{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,zr.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 zr.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var Wr={};const Yr=new Uint8Array(256);let Kr=Yr.length;const Jr=/^(?:[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,Qr=[];for(let oy=0;256>oy;++oy)Qr.push((oy+256).toString(16).substr(1));let Zr,en,tn=0,rn=0;const nn=c("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),vr.createHash("md5").update(e).digest()})),on=c("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),vr.createHash("sha1").update(e).digest()})),sn=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||Zr,c=void 0!==e.clockseq?e.clockseq:en;if(null==a||null==c){const t=e.random||(e.rng||o)();null==a&&(a=Zr=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=en=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:rn+1;const p=l-tn+(u-rn)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||l>tn)&&void 0===e.nsecs&&(u=0),u>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");tn=l,rn=u,en=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:nn,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:on,validate:i,version:function(e){if(!i(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),an=r(sn);var cn=kr&&kr.__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]}),ln=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),un=kr&&kr.__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)&&cn(t,e,r);return ln(t,e),t};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.prepareKeyValueMessage=Wr.issueFileCommand=void 0;const pn=un(mr),fn=un(hr),dn=an,hn=Gr;Wr.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!pn.existsSync(r))throw Error("Missing file at path: "+r);pn.appendFileSync(r,`${hn.toCommandValue(t)}${fn.EOL}`,{encoding:"utf8"})},Wr.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+dn.v4(),n=hn.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}${fn.EOL}${n}${fn.EOL}${r}`};var mn={};class vn 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 yn,gn={},wn=Er,En=gr,_n=wr,bn=_r,On=br;gn.httpOverHttp=function(e){var t=new u(e);return t.request=En.request,t},gn.httpsOverHttp=function(e){var t=new u(e);return t.request=En.request,t.createSocket=p,t.defaultPort=443,t},gn.httpOverHttps=function(e){var t=new u(e);return t.request=_n.request,t},gn.httpsOverHttps=function(e){var t=new u(e);return t.request=_n.request,t.createSocket=p,t.defaultPort=443,t},On.inherits(u,bn.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?(yn("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?(yn("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)):(yn("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")),yn("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(),yn("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)}))}},yn=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(){},gn.debug=yn;var Rn,Sn,In,Tn,xn,Pn=gn;(Sn=Rn||(Rn={}))[Sn.OK=200]="OK",Sn[Sn.MultipleChoices=300]="MultipleChoices",Sn[Sn.MovedPermanently=301]="MovedPermanently",Sn[Sn.ResourceMoved=302]="ResourceMoved",Sn[Sn.SeeOther=303]="SeeOther",Sn[Sn.NotModified=304]="NotModified",Sn[Sn.UseProxy=305]="UseProxy",Sn[Sn.SwitchProxy=306]="SwitchProxy",Sn[Sn.TemporaryRedirect=307]="TemporaryRedirect",Sn[Sn.PermanentRedirect=308]="PermanentRedirect",Sn[Sn.BadRequest=400]="BadRequest",Sn[Sn.Unauthorized=401]="Unauthorized",Sn[Sn.PaymentRequired=402]="PaymentRequired",Sn[Sn.Forbidden=403]="Forbidden",Sn[Sn.NotFound=404]="NotFound",Sn[Sn.MethodNotAllowed=405]="MethodNotAllowed",Sn[Sn.NotAcceptable=406]="NotAcceptable",Sn[Sn.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Sn[Sn.RequestTimeout=408]="RequestTimeout",Sn[Sn.Conflict=409]="Conflict",Sn[Sn.Gone=410]="Gone",Sn[Sn.TooManyRequests=429]="TooManyRequests",Sn[Sn.InternalServerError=500]="InternalServerError",Sn[Sn.NotImplemented=501]="NotImplemented",Sn[Sn.BadGateway=502]="BadGateway",Sn[Sn.ServiceUnavailable=503]="ServiceUnavailable",Sn[Sn.GatewayTimeout=504]="GatewayTimeout",(Tn=In||(In={})).Accept="accept",Tn.ContentType="content-type",(xn||(xn={})).ApplicationJson="application/json";const An=[Rn.MovedPermanently,Rn.ResourceMoved,Rn.SeeOther,Rn.TemporaryRedirect,Rn.PermanentRedirect],Nn=[Rn.BadGateway,Rn.ServiceUnavailable,Rn.GatewayTimeout],Cn=["OPTIONS","GET","DELETE","HEAD"];class $n extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,$n.prototype)}statusCode;result}class Ln{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 Dn=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),kn=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return In},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[In.Accept]=this._getExistingOrDefaultHeader(t,In.Accept,xn.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[In.Accept]=this._getExistingOrDefaultHeader(r,In.Accept,xn.ApplicationJson),r[In.ContentType]=this._getExistingOrDefaultHeader(r,In.ContentType,xn.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[In.Accept]=this._getExistingOrDefaultHeader(r,In.Accept,xn.ApplicationJson),r[In.ContentType]=this._getExistingOrDefaultHeader(r,In.ContentType,xn.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[In.Accept]=this._getExistingOrDefaultHeader(r,In.Accept,xn.ApplicationJson),r[In.ContentType]=this._getExistingOrDefaultHeader(r,In.ContentType,xn.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&&Cn.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===Rn.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&&An.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||!Nn.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 Ln(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?Dr:Lr;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({},Dn(this.requestOptions.headers),Dn(e||{})):Dn(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=Dn(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||Lr.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?Pn.httpsOverHttps:Pn.httpsOverHttp:s?Pn.httpOverHttps:Pn.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new Dr.Agent(e):new Lr.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===Rn.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 $n(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:$n,HttpClientResponse:Ln,get HttpCodes(){return Rn},get MediaTypes(){return xn},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"})),jn=r(kn);var Un,Fn={},Mn=kr&&kr.__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(Fn,"__esModule",{value:!0}),Fn.PersonalAccessTokenCredentialHandler=Fn.BearerCredentialHandler=Fn.BasicCredentialHandler=void 0,Fn.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 Mn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Fn.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 Mn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Fn.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 Mn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var Gn,Bn,qn,Hn,Vn,zn,Xn,Wn,Yn={},Kn={},Jn=m(),Qn={exports:{}};Wn="win32"===process.platform||kr.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(Vn)return Hn;Vn=1,Hn=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=mr;return Hn}():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(Xn)return zn;Xn=1,zn=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=mr;return zn}();var Zn=E;E.sync=function(e,t){try{return Wn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const eo="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,to=yr,ro=eo?";":":",no=Zn,oo=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),io=(e,t)=>{const r=t.colon||ro,n=e.match(/\//)||eo&&e.match(/\\/)?[""]:[...eo?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=eo?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=eo?o.split(r):[""];return eo&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},so=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=io(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(oo(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=to.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];no(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 ao=so;so.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=io(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=to.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(no.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 oo(e)};var co={exports:{}};const lo=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};co.exports=lo,co.exports.default=lo;const uo=yr,po=ao,fo=co.exports;var ho={};const mo=/([()\][%!^"`<>&|;, *?])/g;ho.command=function(e){return e.replace(mo,"^$1")},ho.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(mo,"^$1"),t&&(e=e.replace(mo,"^$1")),e};const vo=/^#!(.*)/,yo=mr,go=yr,wo=function(e){return _(e)||_(e,!0)},Eo=ho,_o=function(e){const t=Buffer.alloc(150);let r;try{r=yo.openSync(e,"r"),yo.readSync(r,t,0,150,0),yo.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(vo);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},bo="win32"===process.platform,Oo=/\.(?:com|exe)$/i,Ro=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,So="win32"===process.platform,Io=Sr,To=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(!bo)return e;const t=function(e){e.file=wo(e);const t=e.file&&_o(e.file);return t?(e.args.unshift(e.file),e.command=t,wo(e)):e.file}(e),r=!Oo.test(t);if(e.options.forceShell||r){const r=Ro.test(t);e.command=go.normalize(e.command),e.command=Eo.command(e.command),e.args=e.args.map((e=>Eo.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)},xo={hookChildProcess:function(e,t){if(!So)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 So&&1===e&&!t.file?b(t.original,"spawnSync"):null},notFoundError:b};Qn.exports=R,Qn.exports.spawn=R,Qn.exports.sync=function(e,t,r){const n=To(e,t,r),o=Io.spawnSync(n.command,n.args,n.options);return o.error=o.error||xo.verifyENOENTSync(o.status,n),o},Qn.exports._parse=To,Qn.exports._enoent=xo;const Po=t(Qn.exports),Ao=({env:e=Rr.env,...t}={})=>{const r=S({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Rr.cwd(),path:t=Rr.env[S()],preferLocal:r=!0,execPath:n=Rr.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?xr.fileURLToPath(e):e,s=yr.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(yr.join(t,"node_modules/.bin")),r=t,t=yr.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?xr.fileURLToPath(t):t;e.push(yr.resolve(r,n,".."))})(a,n,s),[...a,t].join(yr.delimiter)})(t),e},No=(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);!Co(o,i)&&n||Object.defineProperty(e,r,i)},Co=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)},$o=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Lo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Do=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),ko=new WeakMap,jo=(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(ko.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))No(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=$o.bind(null,n,""+t);Object.defineProperty(o,"name",Do),Object.defineProperty(e,"toString",{...Lo,value:o})})(e,t,n)}(i,e),ko.set(i,n),i};jo.callCount=e=>{if(!ko.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ko.get(e)};const Uo=(e,t)=>({name:"SIGRT"+(t+1),number:Fo+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Fo=34,Mo=[{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"}],Go=()=>{const e=Array.from({length:64-Fo+1},Uo);return[...Mo,...e].map(Bo)},Bo=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=hr.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}],Ho=(()=>{const e=Go();return Object.fromEntries(e.map(qo))})(),Vo=(e,t)=>{const r=t.find((({name:t})=>hr.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Go(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Vo(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 zo=({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=Rr.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:Ho[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},Xo=["stdin","stdout","stderr"];var Wo,Yo={exports:{}},Ko={exports:{}},Jo=kr.process;const Qo=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(Qo(Jo)){var Zo,ei=Ir,ti=(Wo||(Wo=1,(di=Ko).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&di.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&di.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Ko.exports),ri=/^win/i.test(Jo.platform),ni=_r;"function"!=typeof ni&&(ni=ni.EventEmitter),Jo.__signal_exit_emitter__?Zo=Jo.__signal_exit_emitter__:((Zo=Jo.__signal_exit_emitter__=new ni).count=0,Zo.emitted={}),Zo.infinite||(Zo.setMaxListeners(1/0),Zo.infinite=!0),Yo.exports=function(e,t){if(!Qo(kr.process))return function(){};ei.equal(typeof e,"function","a callback must be provided for exit handler"),!1===ai&&ci();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),Zo.on(r,e),function(){Zo.removeListener(r,e),0===Zo.listeners("exit").length&&0===Zo.listeners("afterexit").length&&oi()}};var oi=function(){ai&&Qo(kr.process)&&(ai=!1,ti.forEach((function(e){try{Jo.removeListener(e,si[e])}catch(t){}})),Jo.emit=pi,Jo.reallyExit=li,Zo.count-=1)};Yo.exports.unload=oi;var ii=function(e,t,r){Zo.emitted[e]||(Zo.emitted[e]=!0,Zo.emit(e,t,r))},si={};ti.forEach((function(e){si[e]=function(){Qo(kr.process)&&Jo.listeners(e).length===Zo.count&&(oi(),ii("exit",null,e),ii("afterexit",null,e),ri&&"SIGHUP"===e&&(e="SIGINT"),Jo.kill(Jo.pid,e))}})),Yo.exports.signals=function(){return ti};var ai=!1,ci=function(){!ai&&Qo(kr.process)&&(ai=!0,Zo.count+=1,ti=ti.filter((function(e){try{return Jo.on(e,si[e]),!0}catch(t){return!1}})),Jo.emit=fi,Jo.reallyExit=ui)};Yo.exports.load=ci;var li=Jo.reallyExit,ui=function(e){Qo(kr.process)&&(Jo.exitCode=e||0,ii("exit",Jo.exitCode,null),ii("afterexit",Jo.exitCode,null),li.call(Jo,Jo.exitCode))},pi=Jo.emit,fi=function(e,t){if("exit"===e&&Qo(kr.process)){void 0!==t&&(Jo.exitCode=t);var r=pi.apply(this,arguments);return ii("exit",Jo.exitCode,null),ii("afterexit",Jo.exitCode,null),r}return pi.apply(this,arguments)}}else Yo.exports=function(){return function(){}};var di;const hi=t(Yo.exports),mi=(e,t="SIGTERM",r={})=>{const n=e(t);return vi(e,t,r,n),n},vi=(e,t,r,n)=>{if(!yi(t,r,n))return;const o=wi(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},yi=(e,{forceKillAfterTimeout:t},r)=>gi(e)&&!1!==t&&r,gi=e=>e===hr.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),wi=({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},Ei=(e,t)=>{e.kill()&&(t.isCanceled=!0)},_i=(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])},bi=({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})`)},Oi=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=hi((()=>{e.kill()}));return n.finally((()=>{o()}))},Ri=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(mr.createWriteStream(r)),e;if(T(r))return e[t].pipe(r),e;if(!(e=>e instanceof Sr.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},Si=e=>{null!==e.stdout&&(e.pipeStdout=Ri.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Ri.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Ri.bind(void 0,e,"all"))};var Ii={exports:{}};const{PassThrough:Ti}=Tr,{constants:xi}=Or,Pi=Tr,{promisify:Ai}=br,Ni=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 Ti({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},Ci=Ai(Pi.pipeline);class $i extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}Ii.exports=x,Ii.exports.buffer=(e,t)=>x(e,{...t,encoding:"buffer"}),Ii.exports.array=(e,t)=>x(e,{...t,array:!0}),Ii.exports.MaxBufferError=$i;const Li=t(Ii.exports),{PassThrough:Di}=Tr,ki=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 Di({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})),ji=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Ui=e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(ji(e),mr.readFileSync(t)))(e);if(I(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},Fi=(e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(ji(e),mr.createReadStream(t)))(t);void 0!==r&&(I(r)?r.pipe(e.stdin):e.stdin.end(r))},Mi=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=ki();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},Gi=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},Bi=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?Li(e,{encoding:t,maxBuffer:n}):Li.buffer(e,{maxBuffer:n})},qi=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},s)=>{const a=Bi(e,{encoding:n,buffer:o,maxBuffer:i}),c=Bi(t,{encoding:n,buffer:o,maxBuffer:i}),l=Bi(r,{encoding:n,buffer:o,maxBuffer:2*i});try{return await Promise.all([s,a,c,l])}catch(u){return Promise.all([{error:u,signal:u.signal,timedOut:u.timedOut},Gi(e,a),Gi(t,c),Gi(r,l)])}},Hi=(async()=>{})().constructor.prototype,Vi=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Hi,e)])),zi=(e,t)=>{for(const[r,n]of Vi){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Xi=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)}))})),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=br.debuglog("execa").enabled,rs=(e,t)=>(e+"").padStart(t,"0"),ns=(e,{verbose:t})=>{t&&Rr.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=Po._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||Rr.cwd(),execPath:Rr.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?{...Rr.env,...e}:e;return r?Ao({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Xo.map((t=>e[t]));if((e=>Xo.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+Xo.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,Xo.length)},((e,r)=>t[r]))})(r),"win32"===Rr.platform&&"cmd"===yr.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},is=(e,t,r)=>"string"==typeof t||Or.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=$r.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}=$r.promises,$s="rm"in $r.promises?$r.promises.rm:br.promisify($r.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=mr,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=mr,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=kr&&kr.__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=kr&&kr.__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}=yr,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(ny){}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(ny){}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(ny){}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}=mr.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=hr,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}=mr.promises,{appendFile:Qu}=mr.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=hr,Ed=yr,_d=mr,bd=wr,Od=Rr.env.npm_package_json,Rd=Rr.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.40.0"};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(mr),s=xr,a=t(yr),c=t(gr),l=t(wr),u=_r,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}=mr.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=yr;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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=kr&&kr.__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=kr&&kr.__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(mr),c=i(yr);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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ph=kr&&kr.__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=kr&&kr.__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=Ir,Ch=Ph(yr),$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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=kr&&kr.__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=kr&&kr.__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=hr,l=Sr,u=mr;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=vr,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yh=kr&&kr.__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=kr&&kr.__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(hr),Qh=Yh(_r),Zh=Yh(Sr),em=Yh(yr),tm=Yh(Sh),rm=Yh(Ih),nm=Ar,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cm=kr&&kr.__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=kr&&kr.__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=Pr,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mm=kr&&kr.__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=kr&&kr.__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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Em=kr&&kr.__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=kr&&kr.__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=kr&&kr.__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(mr),Im=Em(Uh),Tm=Em(hr),xm=Em(yr),Pm=Em(jn),Am=Em(jh),Nm=Em(Tr),Cm=Em(br),$m=Ir,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||mr.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||mr.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||mr.statSync,e.mkdirSync=e.mkdirSync||r.mkdirSync||mr.mkdirSync,t},Wm=(e,t,r)=>{const n=yr.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=yr.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,yr.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,yr.dirname(t),t):void 0}},Qm=(e,t)=>{const r=Xm(t);if(r.recursive=!0,yr.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 yr.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=yr.resolve(e),"win32"===ev){const t=/[*|"<>?:]/,{root:r}=yr.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===mr.mkdirSync:()=>!1,iv=Object.assign(nv?e=>Xm(e).mkdir===mr.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,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: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={pip:"22.2.0",python:"3.7.9"},fv={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"}},dv=$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(yr.join(r,"Scripts"),yr.join(r,"Scripts","bin"),yr.join(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var hv={};Object.defineProperty(hv,"__esModule",{value:!0});var mv=hv.getUbuntuVersion=void 0;const vv=Sr;mv=hv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{vv.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 yv=$u((async function(){try{if(ke()){try{null===oa.sync("lsb_release",{nothrow:!0})&&await Ie([{name:"lsb-release"}])}catch{return $t()}const e=await mv();return 0===e.length?$t():e}return null}catch(e){return y(""+e),null}}),{promise:!0}),gv=$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(yr.join(e,"trash")),await av(yr.join(e,"shared")),await av(yr.join(e,"venv")),e}),{promise:!0}),wv=$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,ry),await av(e),e}),{promise:!0}),Ev=$u((async function(){const e=(await St(Nt("python",void 0,await yv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),_v=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"]]]),bv=$u((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||hr.release()).split(".")[0];const[t,r]=_v.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Ov="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href)),Rv="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href));class Sv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Iv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Tv=e=>void 0===globalThis.DOMException?new Iv(e):new DOMException(e),xv=e=>{const t=void 0===e.reason?Tv("This operation was aborted."):e.reason;return t instanceof Error?t:Tv(t)},Pv=m(),Av=Sr,Nv=mr,Cv=yr,$v=Rr,Lv=$v.env["ProgramFiles(x86)"],Dv=[$v.env["ProgramFiles(x86)"],$v.env.ProgramFiles],kv=["Enterprise","Professional","Community","BuildTools"],jv=["2022","2019","2017"],Uv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Fv=Qt;const Mv=Lv+"\\Microsoft Visual Studio\\Installer";var Gv=er,Bv=function(e,t,r,n,o,i){if("win32"!=$v.platform)return void Pv.info("This is not a Windows virtual environment, bye!");$v.env.PATH+=Cv.delimiter+Mv;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(" ")}`;Pv.debug("vcvars command-line: "+c);const l=(""+Av.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}Pv.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Pv.info("Setting "+e),tr(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Pv.exportVariable(e,t))}Pv.endGroup(),Pv.info("Configured Developer Command Prompt")};const qv=12e5;var 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:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href)),zv="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href)),Xv=$u((async function(e,t,r){const[n,o]=await Promise.all([sr(e,t,r),ar()]);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 zt(Nt("gcc",void 0,await yv()),"",e,40)}),{promise:!0}),Kv="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href));let Jv,Qv=!1;const Zv={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=yr.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",hr.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=yr.join(hr.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:Wt,python:St,vcpkg:async function(e,t,r){return Qv&&null!==oa.sync("vcpkg",{nothrow:!0})?{binDir:yr.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(yr.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:yr.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,ry),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 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 se(e,ry),e}()}},llvm:ir,gcc:zt,choco:je,brew:Ae,powershell:async function(e,t,r){try{return await _t("pwsh",e,lr,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,ry),{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 yv();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 $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(yr.join(e,"doxygen.exe")))return await se(e,ry),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Ut(Nt("graphviz",void 0)),t}case"darwin":{const e=await $e("doxygen",void 0);return bv()[0]>11&&await Ut(Nt("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,Mt,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 Ut(Nt("graphviz",void 0,await yv())),o}default:throw Error("Unsupported platform")}},graphviz:Ut,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,ry),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")}},clangtidy:function(e,t,r){return sr(e,t,r)},clangformat:function(e,t,r){return sr(e,t,r,Hv.ClangFormat)},msvc:cr,vcvarsall:rr,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,Kt,t,r),a):(a=await _t("kcov",o,Yt,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=yr.join(Ce(),"opt/make/libexec/gnubin");return await se(t,ry),{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,pr,t,r)},sevenzip:mt},ey=Object.keys(Zv),ty=["compiler","architecture","timeout",...ey],ry={rcPath:te("~/.cpprc"),guard:"cpp"};(async function(e){var t,r,n;let o=Promise.resolve();jr.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:[...ty,"timeout"],default:Object.fromEntries(ty.map((e=>[e,fr(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=up.create({autoloadLocales:!0});let p,f;up.addLocale(pp),rp.addLocale(np);const d=await yv();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,m=!1;for(const v of ey){if(jr.isCI&&0!==l.length){m=!0;break}const e=i[v];void 0!==e&&(p=Date.now(),h=await nr(v,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(!m){const e=i.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i,s){try{const{compiler:a,version:c}=function(e){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}}(e);switch(Jn.startGroup(`Installing ${a} ${null!=c?c:""}`),a){case"llvm":case"clang":case"clang++":{const e=await ir(Nt("llvm",c,t),yr.join(r,"llvm"),n);await oe("GCOV","llvm-cov gcov",ry),o.push(dr("llvm",e));break}case"gcc":case"mingw":case"cygwin":case"msys":{const e=Nt("mingw"===a?"mingw":"gcc",c,t),s="mingw"===a?await async function(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return zt(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,yr.join(r,"gcc"),n):await zt(e,yr.join(r,"gcc"),n);i&&await oe("CPPFLAGS","",ry),await function(e){const t=Lp(e),r=null!==t?Mp(t):e;return oe("GCOV",""!==r?"gcov-"+r:"gcov",ry)}(e),o.push(dr("gcc",s));break}case"cl":case"msvc":case"msbuild":case"vs":case"visualstudio":case"visualcpp":case"visualc++":{const e=await cr(Nt("msvc",c,t),yr.join(r,"msvc"),n);i&&await oe("CPPFLAGS","",ry),o.push(dr("msvc",e));break}case"appleclang":case"applellvm":Jn.notice("Assuming apple-clang is already installed"),await Promise.all([oe("CC","clang",ry),oe("CXX","clang++",ry)]),o.push(dr("apple-clang",void 0));break;default:s.push("Unsupported compiler "+a)}}catch(a){v(a),s.push("Failed to install the "+e)}Jn.endGroup()}(e,d,a,s,c,h,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)}}(ry),0===c.length&&0===l.length)return y("setup-cpp was called without any arguments. Nothing to do."),0;for(const v of c)console.log(`${v}`);for(const y of l)v(y);if(w("setup-cpp finished"),!jr.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=jr,exports.commonjsGlobal=kr,exports.coreExports=Jn,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=Pn,exports.v4_1=Hh,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 Xr(e,t,r);process.stdout.write(""+n+Vr.EOL)}function o(){return Kr>Yr.length-16&&(vr.randomFillSync(Yr),Kr=0),Yr.slice(Kr,Kr+=16)}function i(e){return"string"==typeof e&&Jr.test(e)}function s(e,t=0){const r=(Qr[e[t+0]]+Qr[e[t+1]]+Qr[e[t+2]]+Qr[e[t+3]]+"-"+Qr[e[t+4]]+Qr[e[t+5]]+"-"+Qr[e[t+6]]+Qr[e[t+7]]+"-"+Qr[e[t+8]]+Qr[e[t+9]]+"-"+Qr[e[t+10]]+Qr[e[t+11]]+Qr[e[t+12]]+Qr[e[t+13]]+Qr[e[t+14]]+Qr[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 vn(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new vn("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||En.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=wn.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 Gn||(Gn=1,function(e){var t=kr&&kr.__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=hr,n=mr,{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}(Yn)),Yn}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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=kr&&kr.__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=kr&&kr.__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=Mr,u=Wr,p=Gr,f=a(hr),d=a(yr),v=function(){if(Un)return mn;Un=1;var e=kr&&kr.__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(mn,"__esModule",{value:!0}),mn.OidcClient=void 0;const t=jn,n=Fn,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 mn.OidcClient=i,mn}();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(Bn)return Kn;Bn=1;var e=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=kr&&kr.__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(Kn,"__esModule",{value:!0}),Kn.toPlatformPath=Kn.toWin32Path=Kn.toPosixPath=void 0;const n=r(yr);return Kn.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Kn.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Kn.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Kn}();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}})}(Fr)),Fr}function v(e){return jr.GITHUB_ACTIONS?Jn.error(e):console.log(`${e}`)}function y(e){return jr.GITHUB_ACTIONS?Jn.warning(e):console.log(`${e}`)}function g(e){return jr.GITHUB_ACTIONS?Jn.notice(e):console.log(`${e}`)}function w(e){return jr.GITHUB_ACTIONS?Jn.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)}))}))}Wn(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=po.sync(e.command,{path:r[fo({env:r})],pathExt:t?uo.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=uo.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 So&&1===e&&!t.file?b(t.original,"spawn"):null}function R(e,t,r){const n=To(e,t,r),o=Io.spawn(n.command,n.args,n.options);return xo.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=Ni(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=xi.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await Ci(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new $i)}))})),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),bi(n.options);try{s=Sr.spawn(n.file,n.args,n.options)}catch(p){const e=new Sr.ChildProcess,t=Promise.reject(zo({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return zi(e,t),e}const a=Xi(s),c=_i(s,n.options,a),l=Oi(s,n.options,c);s.kill=mi.bind(null,s.kill.bind(s)),s.cancel=Ei.bind(null,s,{isCanceled:!1});const u=jo((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,u,p]=await qi(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=zo({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 Fi(s,n.options),s.all=Mi(s,n.options),Si(s),zi(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=Ui(n.options);let a;try{a=Sr.spawnSync(n.file,n.args,{...n.options,input:s})}catch(u){throw zo({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=zo({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=mr.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 mr.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?yr.join("/Users/",process.env.SUDO_USER):yr.join("/home/",process.env.SUDO_USER);{const e=hr.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(jr.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void w(`Environment variable ${e} is already defined. Skipping.`);Jn.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(yr.delimiter))?r:[]).includes(e)}(e)){process.env.PATH=`${e}${yr.delimiter}${process.env.PATH}`;try{if(jr.GITHUB_ACTIONS)try{Jn.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){jr.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=yr.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=yr.join(r,t);if(!(await ee(n))){xe(),await Ie([{name:"ca-certificates"}]);const r=yr.join(hr.tmpdir(),t),o=new jd.DownloaderHelper(e,hr.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=yr.dirname(t),{binDir:Wd};await Ie([{name:"ca-certificates"}]);const r=new jd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",hr.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 yr.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=yr.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=yr.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,ry);const c=oa.sync("choco",{nothrow:!0});return Qd=null!==c?yr.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,ry),{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=yr.join(hr.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:hr.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?yr.basename(e):yr.basename(e,yr.extname(e))}function He(e){return yr.normalize(e).replace(RegExp(_e(yr.sep)+"$"),"")}function Ve(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function ze(e,t){const r=yr.extname(e),n=`${t}${yr.basename(e,r)}${r}`;return yr.join(yr.dirname(e),n)}function Xe(e,t){const r=yr.extname(e),n=`${yr.basename(e,r)}${t}${r}`;return yr.join(yr.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=yr.extname(e).length;return e.slice(0,-t)}function Je(e,t){return sh(e,t)}function Qe(e,t){const r=yr.relative(t,e);return!(!r||".."===r||r.startsWith(".."+yr.sep)||r===yr.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=kr[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("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:hr.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:yr.join(hr.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:l,extractedFolderName:u,extractFunction:p}=await r(t,process.platform,o);if(jr.GITHUB_ACTIONS)try{const r=Bm(e,t);if(r){const n=yr.join(r,u),o=yr.join(n,c);if(await ee(yr.join(o,l)))return w(`${e} ${t} was found in the cache at ${o}.`),await se(o,ry),{installDir:n,binDir:o}}}catch{}const f=yr.join(n,u),d=yr.join(f,c),h=yr.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=yr.join(null!=(e=process.env.RUNNER_TEMP)?e:hr.tmpdir(),`${Date.now()}-${yr.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,ry),!(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){jr.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==fr("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)}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=yr.dirname(o);n={bin:o,installDir:e,binDir:e}}else{if(jr.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 It(t),void 0===o)throw Error("Python binary could not be found");const s=yr.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 It(e);if(void 0===n)throw Error("Python binary could not be found");const o=yr.dirname(n);await se(o,ry),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=yr.join(e.stdout,"libexec","bin");await se(n,ry);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 It(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:yr.dirname(o),binDir:yr.dirname(o)}}return n}(e,t,r);Ir(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await xt();return void 0===t?(w("pip was not found. Installing pip"),await async function(e){await At(e)||(await jt("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===jt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await P(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await Dt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){y(`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){y(`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=yr.parse(hr.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 Tt(t,yr.join(e,r));if(void 0!==n)return n}}}async function Tt(e,t){var r;try{if(void 0!==t){const r=yr.join(t,Ve(e));if(await ee(r)&&await Rt(r,pv.python))return r}const n=null!=(r=await oa(e,{nothrow:!0,all:!0}))?r:[];for(const e of n)if(await Rt(e,pv.python))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){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.pip))return e}catch{}}async function At(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 Nt(e,t,r=null){var n;return Ct(t)&&"linux"===process.platform&&null!==r&&e in fv?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,fv[e]):Ct(t)&&e in uv?null!=(n=uv[e])?n:"":"true"===t?"":null!=t?t:""}function Ct(e){return"true"===e||void 0===e}function $t(){if(!("version"in hr)||"function"!=typeof hr.version)return null;const e=hr.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 Ev(),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 P(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,t);if(u)try{Jn.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 gv(),u.PIPX_BIN_DIR=await wv()),A(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(d){if(Jn.info(`Failed to install ${t} via ${l}: ${d}.`),null===await jt(t))throw Error(`Failed to install ${t} via ${l}: ${d}.`)}else if(null===await jt(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);const p=await dv(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>ee(yr.join(e,Ve(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=oa.sync(Ve(t),{nothrow:!0});return null!==n?yr.dirname(n):e[e.length-1]}(p,t);return await se(f,ry),{binDir:f}}async function kt(e){return 0===(await P(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function jt(e,t=!0){if("linux"===process.platform){if(Jn.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 Ut(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,ry),{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 Ft(e,t){const{ArchiveHdi:r}=await Promise.resolve().then((()=>require("./assets/hdi-Ca-ZsNp_.js"))),n=new r(e);await n.read((async e=>{await e.extract(yr.join(t,e.path))}))}function Mt(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: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 exports.getExecOutput_1("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await oe("SDKROOT",t.trim(),ry):v("SDKROOT not set")}catch(e){v(e)}}async function Bt(e){const t=await bs(e,"utf-8");return JSON.parse(t)}function qt(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=Ht(i,r,t);if(void 0!==n)return n}}function Ht(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){var n;if("win32"===t){const t=qt(await Bt(yr.join(Ov,"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 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 _t("g++",e,Vt,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,ry)):"ia32"===t&&await ee("C:/tools/mingw32/bin")?(o="C:/tools/mingw32/bin",await se(o,ry)):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"),ry),oe("CXX",Ve(t+"/g++"),ry));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}`,ry),oe("CXX",`${t}/g++-${s}`,ry)),ke()&&o.push(ye("cc",`${t}/gcc-${s}`,ry,r),ye("cxx",`${t}/g++-${s}`,ry,r),ye("gcc",`${t}/gcc-${s}`,ry,r),ye("g++",`${t}/g++-${s}`,ry,r))):(o.push(oe("CC",`${t}/gcc-${a}`,ry),oe("CXX",`${t}/g++-${a}`,ry)),ke()&&o.push(ye("cc",`${t}/gcc-${a}`,ry,r),ye("cxx",`${t}/g++-${a}`,ry,r),ye("gcc",`${t}/gcc-${a}`,ry,r),ye("g++",`${t}/g++-${a}`,ry,r)))}o.push(Gt()),jr.GITHUB_ACTIONS&&await async function(){const e=yr.join(Ov,"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 Xt(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 Wt(e,t,r){return _t("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:Ve("kcov")}}function Kt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:Ve("kcov"),extractFunction:Jt}}async function Jt(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(Nt("cmake",void 0,await yv()),yr.join(te("~"),"cmake"),"");e=yr.join(t,"cmake")}return null===oa.sync("ninja",{nothrow:!0})&&await Wt(Nt("ninja",void 0,await yv()),yr.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=yr.join(Rv,"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=yr.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 Qt(e){return Object.values(Uv).includes(e)?e:e in Uv?Uv[e]:e}function Zt(e){if(Object.keys(Uv).includes(e))return e;for(const[t,r]of Object.entries(Uv))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(""+Av.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Pv.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Nv.existsSync(n))return Pv.info("Found with vswhere: "+n),n;Pv.info("Not found with vswhere");const o=e?[Zt(e)]:jv;for(const i of Dv)for(const e of o)for(const t of kv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Pv.info("Trying standard location: "+n),Nv.existsSync(n))return Pv.info("Found standard location: "+n),n;if(Pv.info("Not found in standard locations"),n=Lv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Nv.existsSync(n))return Pv.info("Found VS 2015: "+n),n;throw Pv.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 ee(t)&&(w(`Adding ${t} to PATH`),await oe("VCTargetsPath",t,ry)),await Bv(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=qv){Jn.startGroup(`Installing ${e} ${t}`);let c=!1;try{c=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(xv(e)),e.addEventListener("abort",(()=>{c(xv(e))}))}if(r===1/0)return void e.then(a,c);const l=new Sv;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 rr(Nt(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Ae({rcOptions:ry});else{const i=yr.join(o,s?"llvm":e),c=Nt(e,t,r),l=Zv[e];a=await l(c,i,n)}return i.push(dr(e,a)),s}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(l){v(l),l instanceof Error&&void 0!==l.stack&&v(l.stack),s.push(e+" failed to install")}return Jn.endGroup(),c}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":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 yv();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=qt(await Bt(yr.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=qt(await Bt(yr.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 ir(e,t,r){var n;const o=await Xv(e,t,r);return await async function(e){var t,r;const n=null!=(t=process.env.LD_LIBRARY_PATH)?t:"",o=null!=(r=process.env.DYLD_LIBRARY_PATH)?r:"",i=[oe("LLVM_PATH",e,ry),oe("LD_LIBRARY_PATH",`${e}/lib${yr.delimiter}${n}`,ry),oe("DYLD_LIBRARY_PATH",`${e}/lib${yr.delimiter}${o}`,ry),oe("LDFLAGS",`-L"${e}/lib"`,ry),oe("CPPFLAGS",`-I"${e}/include"`,ry),oe("CC",Ve(e+"/bin/clang"),ry),oe("CXX",Ve(e+"/bin/clang++"),ry),oe("LIBRARY_PATH",e+"/lib",ry),Gt()];if(ke()){const t=60;i.push(ye("cc",e+"/bin/clang",ry,t),ye("cxx",e+"/bin/clang++",ry,t),ye("clang",e+"/bin/clang",ry),ye("clang++",e+"/bin/clang++",ry),ye("lld",e+"/bin/lld",ry),ye("ld.lld",e+"/bin/ld.lld",ry),ye("llvm-ar",e+"/bin/llvm-ar",ry))}await Promise.all(i)}(null!=(n=o.installDir)?n:t),o}async function sr(e,t,r,n=Hv.All){const o=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),i=Number.parseInt(o.split(".")[0],10);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",hr.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=yr.join(hr.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)&&(Nr.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:qv}),await se(r+"/bin",ry),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(i,n)}catch(a){w("Failed to install llvm via system package manager "+a)}const s=await _t("llvm",e,or,t,r);return await Wv(i),s}async function ar(){if(jr.GITHUB_ACTIONS){const e=yr.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 cr(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Fv(e);w(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=Gv(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 rr(s,c,r,a,n,o,i),jr.GITHUB_ACTIONS&&await async function(){const e=yr.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)}()}function lr(e,t,r){return{url:ur(t,r,e),binRelativeDir:"",binFileName:Ve("pwsh"),extractedFolderName:""}}function ur(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 pr(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 fr(e){const t=Jn.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function dr(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 hr=require("os"),mr=require("fs"),vr=require("crypto"),yr=require("path"),gr=require("http"),wr=require("https");require("net");const Er=require("tls"),_r=require("events"),br=require("util"),Or=require("buffer"),Rr=require("process"),Sr=require("child_process"),Ir=require("assert"),Tr=require("stream"),xr=require("url"),Pr=require("string_decoder"),Ar=require("timers"),Nr=require("console");var Cr="undefined"!=typeof document?document.currentScript:null;const $r=e(mr),Lr=e(gr),Dr=e(wr);var kr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},jr={};const Ur=[{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=Ur,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))}(jr);var Fr={},Mr={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.toCommandProperties=Gr.toCommandValue=void 0,Gr.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},Gr.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 Br=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hr=kr&&kr.__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)&&Br(t,e,r);return qr(t,e),t};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.issue=Mr.issueCommand=void 0;const Vr=Hr(hr),zr=Gr;Mr.issueCommand=n,Mr.issue=function(e,t=""){n(e,{},t)};class Xr{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,zr.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 zr.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var Wr={};const Yr=new Uint8Array(256);let Kr=Yr.length;const Jr=/^(?:[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,Qr=[];for(let oy=0;256>oy;++oy)Qr.push((oy+256).toString(16).substr(1));let Zr,en,tn=0,rn=0;const nn=c("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),vr.createHash("md5").update(e).digest()})),on=c("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),vr.createHash("sha1").update(e).digest()})),sn=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||Zr,c=void 0!==e.clockseq?e.clockseq:en;if(null==a||null==c){const t=e.random||(e.rng||o)();null==a&&(a=Zr=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=en=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:rn+1;const p=l-tn+(u-rn)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||l>tn)&&void 0===e.nsecs&&(u=0),u>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");tn=l,rn=u,en=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:nn,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:on,validate:i,version:function(e){if(!i(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),an=r(sn);var cn=kr&&kr.__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]}),ln=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),un=kr&&kr.__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)&&cn(t,e,r);return ln(t,e),t};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.prepareKeyValueMessage=Wr.issueFileCommand=void 0;const pn=un(mr),fn=un(hr),dn=an,hn=Gr;Wr.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!pn.existsSync(r))throw Error("Missing file at path: "+r);pn.appendFileSync(r,`${hn.toCommandValue(t)}${fn.EOL}`,{encoding:"utf8"})},Wr.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+dn.v4(),n=hn.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}${fn.EOL}${n}${fn.EOL}${r}`};var mn={};class vn 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 yn,gn={},wn=Er,En=gr,_n=wr,bn=_r,On=br;gn.httpOverHttp=function(e){var t=new u(e);return t.request=En.request,t},gn.httpsOverHttp=function(e){var t=new u(e);return t.request=En.request,t.createSocket=p,t.defaultPort=443,t},gn.httpOverHttps=function(e){var t=new u(e);return t.request=_n.request,t},gn.httpsOverHttps=function(e){var t=new u(e);return t.request=_n.request,t.createSocket=p,t.defaultPort=443,t},On.inherits(u,bn.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?(yn("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?(yn("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)):(yn("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")),yn("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(),yn("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)}))}},yn=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(){},gn.debug=yn;var Rn,Sn,In,Tn,xn,Pn=gn;(Sn=Rn||(Rn={}))[Sn.OK=200]="OK",Sn[Sn.MultipleChoices=300]="MultipleChoices",Sn[Sn.MovedPermanently=301]="MovedPermanently",Sn[Sn.ResourceMoved=302]="ResourceMoved",Sn[Sn.SeeOther=303]="SeeOther",Sn[Sn.NotModified=304]="NotModified",Sn[Sn.UseProxy=305]="UseProxy",Sn[Sn.SwitchProxy=306]="SwitchProxy",Sn[Sn.TemporaryRedirect=307]="TemporaryRedirect",Sn[Sn.PermanentRedirect=308]="PermanentRedirect",Sn[Sn.BadRequest=400]="BadRequest",Sn[Sn.Unauthorized=401]="Unauthorized",Sn[Sn.PaymentRequired=402]="PaymentRequired",Sn[Sn.Forbidden=403]="Forbidden",Sn[Sn.NotFound=404]="NotFound",Sn[Sn.MethodNotAllowed=405]="MethodNotAllowed",Sn[Sn.NotAcceptable=406]="NotAcceptable",Sn[Sn.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",Sn[Sn.RequestTimeout=408]="RequestTimeout",Sn[Sn.Conflict=409]="Conflict",Sn[Sn.Gone=410]="Gone",Sn[Sn.TooManyRequests=429]="TooManyRequests",Sn[Sn.InternalServerError=500]="InternalServerError",Sn[Sn.NotImplemented=501]="NotImplemented",Sn[Sn.BadGateway=502]="BadGateway",Sn[Sn.ServiceUnavailable=503]="ServiceUnavailable",Sn[Sn.GatewayTimeout=504]="GatewayTimeout",(Tn=In||(In={})).Accept="accept",Tn.ContentType="content-type",(xn||(xn={})).ApplicationJson="application/json";const An=[Rn.MovedPermanently,Rn.ResourceMoved,Rn.SeeOther,Rn.TemporaryRedirect,Rn.PermanentRedirect],Nn=[Rn.BadGateway,Rn.ServiceUnavailable,Rn.GatewayTimeout],Cn=["OPTIONS","GET","DELETE","HEAD"];class $n extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,$n.prototype)}statusCode;result}class Ln{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 Dn=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),kn=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return In},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[In.Accept]=this._getExistingOrDefaultHeader(t,In.Accept,xn.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[In.Accept]=this._getExistingOrDefaultHeader(r,In.Accept,xn.ApplicationJson),r[In.ContentType]=this._getExistingOrDefaultHeader(r,In.ContentType,xn.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[In.Accept]=this._getExistingOrDefaultHeader(r,In.Accept,xn.ApplicationJson),r[In.ContentType]=this._getExistingOrDefaultHeader(r,In.ContentType,xn.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[In.Accept]=this._getExistingOrDefaultHeader(r,In.Accept,xn.ApplicationJson),r[In.ContentType]=this._getExistingOrDefaultHeader(r,In.ContentType,xn.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&&Cn.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===Rn.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&&An.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||!Nn.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 Ln(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?Dr:Lr;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({},Dn(this.requestOptions.headers),Dn(e||{})):Dn(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=Dn(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||Lr.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?Pn.httpsOverHttps:Pn.httpsOverHttp:s?Pn.httpOverHttps:Pn.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new Dr.Agent(e):new Lr.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===Rn.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 $n(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:$n,HttpClientResponse:Ln,get HttpCodes(){return Rn},get MediaTypes(){return xn},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"})),jn=r(kn);var Un,Fn={},Mn=kr&&kr.__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(Fn,"__esModule",{value:!0}),Fn.PersonalAccessTokenCredentialHandler=Fn.BearerCredentialHandler=Fn.BasicCredentialHandler=void 0,Fn.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 Mn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Fn.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 Mn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Fn.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 Mn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var Gn,Bn,qn,Hn,Vn,zn,Xn,Wn,Yn={},Kn={},Jn=m(),Qn={exports:{}};Wn="win32"===process.platform||kr.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(Vn)return Hn;Vn=1,Hn=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=mr;return Hn}():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(Xn)return zn;Xn=1,zn=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=mr;return zn}();var Zn=E;E.sync=function(e,t){try{return Wn.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const eo="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,to=yr,ro=eo?";":":",no=Zn,oo=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),io=(e,t)=>{const r=t.colon||ro,n=e.match(/\//)||eo&&e.match(/\\/)?[""]:[...eo?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=eo?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=eo?o.split(r):[""];return eo&&-1!==e.indexOf(".")&&""!==i[0]&&i.unshift(""),{pathEnv:n,pathExt:i,pathExtExe:o}},so=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=io(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(oo(e));const a=n[r],l=/^".*"$/.test(a)?a.slice(1,-1):a,u=to.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];no(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 ao=so;so.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=io(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=to.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(no.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 oo(e)};var co={exports:{}};const lo=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};co.exports=lo,co.exports.default=lo;const uo=yr,po=ao,fo=co.exports;var ho={};const mo=/([()\][%!^"`<>&|;, *?])/g;ho.command=function(e){return e.replace(mo,"^$1")},ho.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(mo,"^$1"),t&&(e=e.replace(mo,"^$1")),e};const vo=/^#!(.*)/,yo=mr,go=yr,wo=function(e){return _(e)||_(e,!0)},Eo=ho,_o=function(e){const t=Buffer.alloc(150);let r;try{r=yo.openSync(e,"r"),yo.readSync(r,t,0,150,0),yo.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(vo);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},bo="win32"===process.platform,Oo=/\.(?:com|exe)$/i,Ro=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,So="win32"===process.platform,Io=Sr,To=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(!bo)return e;const t=function(e){e.file=wo(e);const t=e.file&&_o(e.file);return t?(e.args.unshift(e.file),e.command=t,wo(e)):e.file}(e),r=!Oo.test(t);if(e.options.forceShell||r){const r=Ro.test(t);e.command=go.normalize(e.command),e.command=Eo.command(e.command),e.args=e.args.map((e=>Eo.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)},xo={hookChildProcess:function(e,t){if(!So)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 So&&1===e&&!t.file?b(t.original,"spawnSync"):null},notFoundError:b};Qn.exports=R,Qn.exports.spawn=R,Qn.exports.sync=function(e,t,r){const n=To(e,t,r),o=Io.spawnSync(n.command,n.args,n.options);return o.error=o.error||xo.verifyENOENTSync(o.status,n),o},Qn.exports._parse=To,Qn.exports._enoent=xo;const Po=t(Qn.exports),Ao=({env:e=Rr.env,...t}={})=>{const r=S({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Rr.cwd(),path:t=Rr.env[S()],preferLocal:r=!0,execPath:n=Rr.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?xr.fileURLToPath(e):e,s=yr.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(yr.join(t,"node_modules/.bin")),r=t,t=yr.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?xr.fileURLToPath(t):t;e.push(yr.resolve(r,n,".."))})(a,n,s),[...a,t].join(yr.delimiter)})(t),e},No=(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);!Co(o,i)&&n||Object.defineProperty(e,r,i)},Co=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)},$o=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Lo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Do=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),ko=new WeakMap,jo=(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(ko.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))No(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=$o.bind(null,n,""+t);Object.defineProperty(o,"name",Do),Object.defineProperty(e,"toString",{...Lo,value:o})})(e,t,n)}(i,e),ko.set(i,n),i};jo.callCount=e=>{if(!ko.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ko.get(e)};const Uo=(e,t)=>({name:"SIGRT"+(t+1),number:Fo+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Fo=34,Mo=[{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"}],Go=()=>{const e=Array.from({length:64-Fo+1},Uo);return[...Mo,...e].map(Bo)},Bo=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=hr.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}],Ho=(()=>{const e=Go();return Object.fromEntries(e.map(qo))})(),Vo=(e,t)=>{const r=t.find((({name:t})=>hr.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Go(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Vo(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 zo=({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=Rr.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:Ho[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},Xo=["stdin","stdout","stderr"];var Wo,Yo={exports:{}},Ko={exports:{}},Jo=kr.process;const Qo=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(Qo(Jo)){var Zo,ei=Ir,ti=(Wo||(Wo=1,(di=Ko).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&di.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&di.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Ko.exports),ri=/^win/i.test(Jo.platform),ni=_r;"function"!=typeof ni&&(ni=ni.EventEmitter),Jo.__signal_exit_emitter__?Zo=Jo.__signal_exit_emitter__:((Zo=Jo.__signal_exit_emitter__=new ni).count=0,Zo.emitted={}),Zo.infinite||(Zo.setMaxListeners(1/0),Zo.infinite=!0),Yo.exports=function(e,t){if(!Qo(kr.process))return function(){};ei.equal(typeof e,"function","a callback must be provided for exit handler"),!1===ai&&ci();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),Zo.on(r,e),function(){Zo.removeListener(r,e),0===Zo.listeners("exit").length&&0===Zo.listeners("afterexit").length&&oi()}};var oi=function(){ai&&Qo(kr.process)&&(ai=!1,ti.forEach((function(e){try{Jo.removeListener(e,si[e])}catch(t){}})),Jo.emit=pi,Jo.reallyExit=li,Zo.count-=1)};Yo.exports.unload=oi;var ii=function(e,t,r){Zo.emitted[e]||(Zo.emitted[e]=!0,Zo.emit(e,t,r))},si={};ti.forEach((function(e){si[e]=function(){Qo(kr.process)&&Jo.listeners(e).length===Zo.count&&(oi(),ii("exit",null,e),ii("afterexit",null,e),ri&&"SIGHUP"===e&&(e="SIGINT"),Jo.kill(Jo.pid,e))}})),Yo.exports.signals=function(){return ti};var ai=!1,ci=function(){!ai&&Qo(kr.process)&&(ai=!0,Zo.count+=1,ti=ti.filter((function(e){try{return Jo.on(e,si[e]),!0}catch(t){return!1}})),Jo.emit=fi,Jo.reallyExit=ui)};Yo.exports.load=ci;var li=Jo.reallyExit,ui=function(e){Qo(kr.process)&&(Jo.exitCode=e||0,ii("exit",Jo.exitCode,null),ii("afterexit",Jo.exitCode,null),li.call(Jo,Jo.exitCode))},pi=Jo.emit,fi=function(e,t){if("exit"===e&&Qo(kr.process)){void 0!==t&&(Jo.exitCode=t);var r=pi.apply(this,arguments);return ii("exit",Jo.exitCode,null),ii("afterexit",Jo.exitCode,null),r}return pi.apply(this,arguments)}}else Yo.exports=function(){return function(){}};var di;const hi=t(Yo.exports),mi=(e,t="SIGTERM",r={})=>{const n=e(t);return vi(e,t,r,n),n},vi=(e,t,r,n)=>{if(!yi(t,r,n))return;const o=wi(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},yi=(e,{forceKillAfterTimeout:t},r)=>gi(e)&&!1!==t&&r,gi=e=>e===hr.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),wi=({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},Ei=(e,t)=>{e.kill()&&(t.isCanceled=!0)},_i=(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])},bi=({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})`)},Oi=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=hi((()=>{e.kill()}));return n.finally((()=>{o()}))},Ri=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(mr.createWriteStream(r)),e;if(T(r))return e[t].pipe(r),e;if(!(e=>e instanceof Sr.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},Si=e=>{null!==e.stdout&&(e.pipeStdout=Ri.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Ri.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Ri.bind(void 0,e,"all"))};var Ii={exports:{}};const{PassThrough:Ti}=Tr,{constants:xi}=Or,Pi=Tr,{promisify:Ai}=br,Ni=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 Ti({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},Ci=Ai(Pi.pipeline);class $i extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}Ii.exports=x,Ii.exports.buffer=(e,t)=>x(e,{...t,encoding:"buffer"}),Ii.exports.array=(e,t)=>x(e,{...t,array:!0}),Ii.exports.MaxBufferError=$i;const Li=t(Ii.exports),{PassThrough:Di}=Tr,ki=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 Di({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})),ji=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},Ui=e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(ji(e),mr.readFileSync(t)))(e);if(I(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},Fi=(e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(ji(e),mr.createReadStream(t)))(t);void 0!==r&&(I(r)?r.pipe(e.stdin):e.stdin.end(r))},Mi=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=ki();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},Gi=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},Bi=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?Li(e,{encoding:t,maxBuffer:n}):Li.buffer(e,{maxBuffer:n})},qi=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},s)=>{const a=Bi(e,{encoding:n,buffer:o,maxBuffer:i}),c=Bi(t,{encoding:n,buffer:o,maxBuffer:i}),l=Bi(r,{encoding:n,buffer:o,maxBuffer:2*i});try{return await Promise.all([s,a,c,l])}catch(u){return Promise.all([{error:u,signal:u.signal,timedOut:u.timedOut},Gi(e,a),Gi(t,c),Gi(r,l)])}},Hi=(async()=>{})().constructor.prototype,Vi=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Hi,e)])),zi=(e,t)=>{for(const[r,n]of Vi){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Xi=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)}))})),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=br.debuglog("execa").enabled,rs=(e,t)=>(e+"").padStart(t,"0"),ns=(e,{verbose:t})=>{t&&Rr.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=Po._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||Rr.cwd(),execPath:Rr.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?{...Rr.env,...e}:e;return r?Ao({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Xo.map((t=>e[t]));if((e=>Xo.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+Xo.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,Xo.length)},((e,r)=>t[r]))})(r),"win32"===Rr.platform&&"cmd"===yr.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},is=(e,t,r)=>"string"==typeof t||Or.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=$r.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}=$r.promises,$s="rm"in $r.promises?$r.promises.rm:br.promisify($r.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=mr,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=mr,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=kr&&kr.__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=kr&&kr.__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}=yr,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(ny){}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(ny){}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(ny){}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}=mr.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=hr,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}=mr.promises,{appendFile:Qu}=mr.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=hr,Ed=yr,_d=mr,bd=wr,Od=Rr.env.npm_package_json,Rd=Rr.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.0"};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(mr),s=xr,a=t(yr),c=t(gr),l=t(wr),u=_r,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}=mr.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=yr;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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=kr&&kr.__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=kr&&kr.__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(mr),c=i(yr);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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ph=kr&&kr.__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=kr&&kr.__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=Ir,Ch=Ph(yr),$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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=kr&&kr.__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=kr&&kr.__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=hr,l=Sr,u=mr;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=vr,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Yh=kr&&kr.__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=kr&&kr.__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(hr),Qh=Yh(_r),Zh=Yh(Sr),em=Yh(yr),tm=Yh(Sh),rm=Yh(Ih),nm=Ar,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),cm=kr&&kr.__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=kr&&kr.__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=Pr,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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),mm=kr&&kr.__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=kr&&kr.__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=kr&&kr.__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=kr&&kr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Em=kr&&kr.__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=kr&&kr.__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=kr&&kr.__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(mr),Im=Em(Uh),Tm=Em(hr),xm=Em(yr),Pm=Em(jn),Am=Em(jh),Nm=Em(Tr),Cm=Em(br),$m=Ir,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||mr.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||mr.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||mr.statSync,e.mkdirSync=e.mkdirSync||r.mkdirSync||mr.mkdirSync,t},Wm=(e,t,r)=>{const n=yr.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=yr.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,yr.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,yr.dirname(t),t):void 0}},Qm=(e,t)=>{const r=Xm(t);if(r.recursive=!0,yr.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 yr.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=yr.resolve(e),"win32"===ev){const t=/[*|"<>?:]/,{root:r}=yr.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===mr.mkdirSync:()=>!1,iv=Object.assign(nv?e=>Xm(e).mkdir===mr.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,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: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={pip:"22.2.0",python:"3.7.9"},fv={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"}},dv=$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(yr.join(r,"Scripts"),yr.join(r,"Scripts","bin"),yr.join(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var hv={};Object.defineProperty(hv,"__esModule",{value:!0});var mv=hv.getUbuntuVersion=void 0;const vv=Sr;mv=hv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{vv.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 yv=$u((async function(){try{if(ke()){try{null===oa.sync("lsb_release",{nothrow:!0})&&await Ie([{name:"lsb-release"}])}catch{return $t()}const e=await mv();return 0===e.length?$t():e}return null}catch(e){return y(""+e),null}}),{promise:!0}),gv=$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(yr.join(e,"trash")),await av(yr.join(e,"shared")),await av(yr.join(e,"venv")),e}),{promise:!0}),wv=$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,ry),await av(e),e}),{promise:!0}),Ev=$u((async function(){const e=(await St(Nt("python",void 0,await yv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),_v=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"]]]),bv=$u((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||hr.release()).split(".")[0];const[t,r]=_v.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Ov="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href)),Rv="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href));class Sv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Iv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Tv=e=>void 0===globalThis.DOMException?new Iv(e):new DOMException(e),xv=e=>{const t=void 0===e.reason?Tv("This operation was aborted."):e.reason;return t instanceof Error?t:Tv(t)},Pv=m(),Av=Sr,Nv=mr,Cv=yr,$v=Rr,Lv=$v.env["ProgramFiles(x86)"],Dv=[$v.env["ProgramFiles(x86)"],$v.env.ProgramFiles],kv=["Enterprise","Professional","Community","BuildTools"],jv=["2022","2019","2017"],Uv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Fv=Qt;const Mv=Lv+"\\Microsoft Visual Studio\\Installer";var Gv=er,Bv=function(e,t,r,n,o,i){if("win32"!=$v.platform)return void Pv.info("This is not a Windows virtual environment, bye!");$v.env.PATH+=Cv.delimiter+Mv;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(" ")}`;Pv.debug("vcvars command-line: "+c);const l=(""+Av.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}Pv.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Pv.info("Setting "+e),tr(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Pv.exportVariable(e,t))}Pv.endGroup(),Pv.info("Configured Developer Command Prompt")};const qv=12e5;var 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:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href)),zv="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href)),Xv=$u((async function(e,t,r){const[n,o]=await Promise.all([sr(e,t,r),ar()]);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 zt(Nt("gcc",void 0,await yv()),"",e,40)}),{promise:!0}),Kv="string"==typeof __dirname?__dirname:yr.dirname(xr.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Cr&&Cr.src||new URL("setup-cpp.js",document.baseURI).href));let Jv,Qv=!1;const Zv={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=yr.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",hr.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=yr.join(hr.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:Wt,python:St,vcpkg:async function(e,t,r){return Qv&&null!==oa.sync("vcpkg",{nothrow:!0})?{binDir:yr.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(yr.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:yr.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,ry),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 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 se(e,ry),e}()}},llvm:ir,gcc:zt,choco:je,brew:Ae,powershell:async function(e,t,r){try{return await _t("pwsh",e,lr,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,ry),{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 yv();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 $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(yr.join(e,"doxygen.exe")))return await se(e,ry),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Ut(Nt("graphviz",void 0)),t}case"darwin":{const e=await $e("doxygen",void 0);return bv()[0]>11&&await Ut(Nt("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,Mt,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 Ut(Nt("graphviz",void 0,await yv())),o}default:throw Error("Unsupported platform")}},graphviz:Ut,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,ry),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")}},clangtidy:function(e,t,r){return sr(e,t,r)},clangformat:function(e,t,r){return sr(e,t,r,Hv.ClangFormat)},msvc:cr,vcvarsall:rr,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,Kt,t,r),a):(a=await _t("kcov",o,Yt,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=yr.join(Ce(),"opt/make/libexec/gnubin");return await se(t,ry),{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,pr,t,r)},sevenzip:mt},ey=Object.keys(Zv),ty=["compiler","architecture","timeout",...ey],ry={rcPath:te("~/.cpprc"),guard:"cpp"};(async function(e){var t,r,n;let o=Promise.resolve();jr.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:[...ty,"timeout"],default:Object.fromEntries(ty.map((e=>[e,fr(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=up.create({autoloadLocales:!0});let p,f;up.addLocale(pp),rp.addLocale(np);const d=await yv();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,m=!1;for(const v of ey){if(jr.isCI&&0!==l.length){m=!0;break}const e=i[v];void 0!==e&&(p=Date.now(),h=await nr(v,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(!m){const e=i.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i,s){try{const{compiler:a,version:c}=function(e){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}}(e);switch(Jn.startGroup(`Installing ${a} ${null!=c?c:""}`),a){case"llvm":case"clang":case"clang++":{const e=await ir(Nt("llvm",c,t),yr.join(r,"llvm"),n);await oe("GCOV","llvm-cov gcov",ry),o.push(dr("llvm",e));break}case"gcc":case"mingw":case"cygwin":case"msys":{const e=Nt("mingw"===a?"mingw":"gcc",c,t),s="mingw"===a?await async function(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return zt(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,yr.join(r,"gcc"),n):await zt(e,yr.join(r,"gcc"),n);i&&await oe("CPPFLAGS","",ry),await function(e){const t=Lp(e),r=null!==t?Mp(t):e;return oe("GCOV",""!==r?"gcov-"+r:"gcov",ry)}(e),o.push(dr("gcc",s));break}case"cl":case"msvc":case"msbuild":case"vs":case"visualstudio":case"visualcpp":case"visualc++":{const e=await cr(Nt("msvc",c,t),yr.join(r,"msvc"),n);i&&await oe("CPPFLAGS","",ry),o.push(dr("msvc",e));break}case"appleclang":case"applellvm":Jn.notice("Assuming apple-clang is already installed"),await Promise.all([oe("CC","clang",ry),oe("CXX","clang++",ry)]),o.push(dr("apple-clang",void 0));break;default:s.push("Unsupported compiler "+a)}}catch(a){v(a),s.push("Failed to install the "+e)}Jn.endGroup()}(e,d,a,s,c,h,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)}}(ry),0===c.length&&0===l.length)return y("setup-cpp was called without any arguments. Nothing to do."),0;for(const v of c)console.log(`${v}`);for(const y of l)v(y);if(w("setup-cpp finished"),!jr.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=jr,exports.commonjsGlobal=kr,exports.coreExports=Jn,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=Pn,exports.v4_1=Hh,exports.warning=y; //# sourceMappingURL=setup-cpp.js.map diff --git a/dist/modern/setup-cpp.mjs b/dist/modern/setup-cpp.mjs index 2b4968b0..6e73a3e6 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 Tn(e,t,r);process.stdout.write(""+n+Sn.EOL)}function n(){return An>Pn.length-16&&(br.randomFillSync(Pn),An=0),Pn.slice(An,An+=16)}function o(e){return"string"==typeof e&&Nn.test(e)}function i(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(!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 Yn(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Yn("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||Zn.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=Qn.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 _o||(_o=1,function(e){var t=vn&&vn.__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=dr,n=vr,{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}(Po)),Po}function h(){return Oo||(Oo=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=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=vn&&vn.__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=vn&&vn.__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=En,l=xn,p=_n,f=a(dr),m=a(Or),v=function(){if(go)return Wn;go=1;var e=vn&&vn.__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.OidcClient=void 0;const t=yo,n=wo,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 Wn.OidcClient=i,Wn}();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(bo)return Ao;bo=1;var e=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=vn&&vn.__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(Ao,"__esModule",{value:!0}),Ao.toPlatformPath=Ao.toWin32Path=Ao.toPosixPath=void 0;const n=r(Or);return Ao.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Ao.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Ao.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Ao}();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}})}(wn)),wn}function m(e){return yn.GITHUB_ACTIONS?No.error(e):console.log(`${e}`)}function v(e){return yn.GITHUB_ACTIONS?No.warning(e):console.log(`${e}`)}function y(e){return yn.GITHUB_ACTIONS?No.notice(e):console.log(`${e}`)}function g(e){return yn.GITHUB_ACTIONS?No.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)}))}))}xo(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=Vo.sync(e.command,{path:r[zo({env:r})],pathExt:t?qo.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=qo.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 oi&&1===e&&!t.file?_(t.original,"spawn"):null}function O(e,t,r){const n=si(e,t,r),o=ii.spawn(n.command,n.args,n.options);return ai.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=ls(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=as.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await ps(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new fs)}))})),n.getBufferedValue()}function x(e,t,r){const n=Us(e,t,r),o=As(e,t),i=Ns(e,t);let s;ks(i,n.options),ts(n.options);try{s=en.spawn(n.file,n.args,n.options)}catch(p){const e=new en.ChildProcess,t=Promise.reject(Si({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Ss(e,t),e}const a=Is(s),c=es(s,n.options,a),u=rs(s,n.options,c);s.kill=Wi.bind(null,s.kill.bind(s)),s.cancel=Zi.bind(null,s,{isCanceled:!1});const l=vi((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,l,p]=await bs(s,n.options,u),f=js(n.options,c),d=js(n.options,l),h=js(n.options,p);if(e||0!==t||null!==r){const c=Si({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 gs(s,n.options),s.all=ws(s,n.options),os(s),Ss(s,l),s}function P(e,t,r){const n=Us(e,t,r),o=As(e,t),i=Ns(e,t);ks(i,n.options);const s=ys(n.options);let a;try{a=en.spawnSync(n.file,n.args,{...n.options,input:s})}catch(l){throw Si({error:l,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=js(n.options,a.stdout,a.error),u=js(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Si({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===pa){const e=la.sync("pwsh",{nothrow:!0});null!==e&&(pa=e);const t=la.sync("powershell",{nothrow:!0});null!==t&&(pa=t)}if(void 0===pa)throw Error("Could not find powershell");return pa}(),[...t,"-c",e],r)}function N(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function C(){return null!==la.sync("sudo",{nothrow:!0})}function $(){return 0===process.getuid?.()||!!process.env.CI}function L(){return $()&&C()}function D(e){return L()?"sudo "+e:e}function k(e,t=[],r=ha){return L()?function(e,t){const[r,...n]=$s(e);return P(r,n,t)}(j(e,t),r):P(e,F(t),r)}function U(e,t=[],r=ha){return L()?function(e,t){const[r,...n]=$s(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?ma():$()}async function G(e){if(("linux"===process.platform||"darwin"===process.platform)&&L()&&void 0!==process.env.SUDO_USER){let t=vr.statSync(e).isDirectory();await U("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],ha)}}function B(){if(sc)return ic;sc=1;var e=Va,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return ic=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 jc?Uc:(jc=1,Uc=(Lc?$c:(Lc=1,$c=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(kc)return Dc;kc=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 Dc=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(qc)return Hc;qc=1;var e=Bc?Gc:(Bc=1,Gc=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return Hc=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function V(){return eu?Zc:(eu=1,Zc=function(){if(Mc)return Fc;Mc=1;var e=H(),t={object:!0,symbol:!0};return Fc=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(Qc)return Jc;Qc=1;var e,t,r,n=Pc,o=q(),i=H().Symbol,s=function(){if(zc)return Vc;zc=1;var e=Pc,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return Vc=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(Wc)return Xc;Wc=1;var e=Pc,t=H().Symbol;return Xc=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(Kc)return Yc;Kc=1;var e=Pc,t=q(),r=Object.create(null);return Yc=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)},Jc=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])),Jc}())}function z(){return lu?uu:(lu=1,uu=(Cc?Nc:(Cc=1,Nc=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(cu)return au;cu=1;var e=V().iterator,t=function(){if(ru)return tu;ru=1;var e={}.toString,t=e.call(function(){return arguments}());return tu=function(r){return e.call(r)===t}}(),r=function(){if(ou)return nu;ou=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return nu=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=Ma,o=Ha,i=Va,s=Na,a=function(){if(su)return iu;su=1;var e={}.toString,t=e.call("");return iu=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 au=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},au}())}function X(){if(Pu)return xu;Pu=1;var e=Tu?Iu:(Tu=1,Iu=(Ou?bu:(Ou=1,bu=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:Su?Ru:(Su=1,Ru=function(e){return e!=e})),t=Ma,r=Va,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return xu=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},xu}function W(){if(Uu)return ku;Uu=1;var e=Ha,t=Qa,r=function(){}.call;return ku=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},ku}function Y(){if(Fu)return ju;Fu=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 ju=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 qu?Hu:(qu=1,Hu=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,Al.exports=e,Al.exports.default=e),Al.exports}function Q(){if(el)return Pl;el=1;var e=W(),t=function(){if(Bu)return Gu;Bu=1;var e=[].forEach,t=Object.create;return Gu=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Gu}(),r=function(){if(Wu)return Xu;Wu=1;var e=Va,t=function(){if(zu)return Vu;zu=1;var e=K();return Vu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Xu=function(r){return t(e(r))}}(),n=function(){if(Qu)return Ju;Qu=1;var e=function(){if(Ku)return Yu;Ku=1;var e=K();return Yu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return""}}}();return Ju=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]})))}))},Pl}async function Z(e){try{return await un.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?Rr("/Users/",process.env.SUDO_USER):Rr("/home/",process.env.SUDO_USER);{const e=hr();if(""===e)return;return e}}();return void 0===t?e:e.replace(Ml,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 Bl(e.rcPath,"utf8")).includes(t)||(await Gl(e.rcPath,`\n${t}\n`),g(`Added ${t} to ${e.rcPath}`)))}async function re(e,t){await Z(t)&&((await Bl(t,"utf-8")).includes(e)||(await Gl(t,e),g(`${e} was added to ${t}`)))}async function ne(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:ql,...r},o=function(e,t=!1){const r=t?Kl(e):e;return rp(r,'"',"\\")}(t??"",n.escapeSpace);try{if(yn.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void g(`Environment variable ${e} is already defined. Skipping.`);No.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 Vl(r),void(r.overwrite?(await np(r.rcPath,`\nexport ${e}="${n}"\n`),g(`${e}="${n}" was added to "${r.rcPath}`)):(await np(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:ql,...t};if(!function(e){return!!ip.some((t=>t.test(e)))&&(process.env.PATH?.split(Sr)??[]).includes(e)}(e)){process.env.PATH=`${e}${Sr}${process.env.PATH}`;try{if(yn.GITHUB_ACTIONS)try{No.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 Vl(t),await op(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;mp[e]=r}}function ue(e,t,r){const n=function(e){const t=mp[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 pp.pluralize(r.locale,t,n[e]).replace("{0}",t)}function le(){if($f)return Cf;$f=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}}Cf=t;const r=new kf,n=Rp,o=pe(),i=Ep,s=Dp,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:p}=_p,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=wp,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 Cf}function pe(){if(Df)return Lf;Df=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(">")))}}Lf=t;const r=Rp,{safeRe:n,t:o}=_p,i=Sf,s=Ep,a=Dp,c=le();return Lf}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){yn.GITHUB_ACTIONS?await async function(e,t,r=40){await U("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Vl(r),await qd(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!==la.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 Wd.NameDashVersion:return`${t}-${r}`;case Wd.NameEqualsVersion:return`${t}=${r}`;case Wd.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 Wd.NameDashVersion;try{const{stdout:n}=await x("apt-cache",["show",`${t}=${r}`],{env:ye(e)});if(""===n.trim())return Wd.NameEqualsVersion}catch{}}try{const{stdout:r}=await x("apt-cache",["show",t],{env:ye(e),stdio:"pipe"});if(""!==r.trim())return Wd.Name}catch{}return zd?Wd.None:(Xd(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&&Xd(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 Kd(t),await async function(e){await _e("software-properties-common")||k(e,["install","-y","--fix-broken","-o",Vd,"software-properties-common"],{...ha,env:ye(e)})}(t),k("add-apt-repository",["-y","--no-update",e],{...ha,env:ye(t)}),Xd.clear(),Xd(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 Kd(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=Rr(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],{...ha,env:ye(r)})}catch(o){if(!function(e){return"string"==typeof e.stderr}(o))throw o;Jd.some((e=>o.stderr.includes(e)))&&(v(`Failed to install packages ${n}. Retrying...`),k(r,["install","--fix-broken","-y","-o",Vd,...n],{...ha,env:ye(r)}))}return{binDir:"/usr/bin/"}}async function Ie({keyUrl:e,fileName:t,keyStorePath:r=Qd}){try{xe(t);const n=Rr(r,t);if(!(await Z(n))){Te(),await Se([{name:"ca-certificates"}]);const r=Rr(mr(),t),o=new Hd.DownloaderHelper(e,mr(),{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 eh)return{binDir:eh};const t=await la("brew",{nothrow:!0});if(null!==t)return eh=Ir(t),{binDir:eh};await Se([{name:"ca-certificates"}]);const r=new Hd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",mr(),{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"}}),eh=Ae(),await ie(eh,e.rcOptions),{binDir:eh}}function Ae(){return Rr(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 Ce(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};g(`Installing ${e} ${t??""} via brew`),ih&&null!==la.sync("brew",{nothrow:!0})||(await Pe(),ih=!0);const o=Ae(),i=Rr(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 $e(){return"linux"===process.platform&&(void 0===th&&(th=null!==la.sync("dnf",{nothrow:!0})),th)}function Le(){return"linux"===process.platform&&(void 0===rh&&(rh=null!==la.sync("pacman",{nothrow:!0})),rh)}function De(){return"linux"===process.platform&&(void 0===nh&&(nh=null!==la.sync("apt-get",{nothrow:!0})),nh)}async function ke(e,t,r){if("win32"!==process.platform)return;if("string"==typeof oh)return{binDir:oh};const n=la.sync("choco",{nothrow:!0});if(null!==n)return oh=Ir(n),{binDir:oh};let o="powershell.exe";const i=la.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,ly);const a=la.sync("choco",{nothrow:!0});return oh=null!==a?Ir(a):(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin",await Z(oh)?{binDir:oh}:void 0}async function Ue(e,t,r=[]){g(`Installing ${e} ${t??""} via chocolatey`),sh&&null!==la.sync("choco",{nothrow:!0})||(await ke(0,0,process),sh=!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,ly),{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===la.sync("yay",{nothrow:!0}))try{k("pacman",["-S","--noconfirm","base-devel","git"]);const e=Rr(mr(),"yay");k("mkdir",["-p",e]),$()?(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']),lh=!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:mr()}),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.`)}}(),ah||"yay"===r||(k(n,["-Sy","--noconfirm"]),ah=!0),ch||"yay"===r||(k(n,["-S","--noconfirm","base-devel"]),ch=!0);const o=e=>"yay"===r?$()&&lh?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?Tr(e):Tr(e,xr(e))}function He(e){return Pr(e).replace(RegExp(Ee(Ar)+"$"),"")}function qe(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ve(e,t){const r=xr(e),n=`${t}${Tr(e,r)}${r}`;return Rr(Ir(e),n)}function ze(e,t){const r=xr(e),n=`${Tr(e,r)}${t}${r}`;return Rr(Ir(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=xr(e).length;return e.slice(0,-t)}function Ke(e,t){return fh(e,t)}function Je(e,t){const r=Nr(t,e);return!(!r||".."===r||r.startsWith(".."+Ar)||r===Cr(e))}function Qe(e){return kh(this,void 0,void 0,(function*(){if(Fh.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Fh.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 kh(this,void 0,void 0,(function*(){Uh.ok(e,"a path argument must be provided"),yield Fh.mkdir(e,{recursive:!0})}))}function et(e){return kh(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(Fh.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(jh.delimiter))e&&t.push(e);if(Fh.isRooted(e)){const r=yield Fh.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(jh.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(jh.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield Fh.tryGetExecutablePath(jh.join(o,e),t);r&&n.push(r)}return n}))}function tt(e,t,r,n){return kh(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield Ze(t);const o=yield Fh.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield Fh.lstat(o)).isDirectory()?yield tt(o,s,r,n):yield rt(o,s,n)}yield Fh.chmod(t,(yield Fh.stat(e)).mode)}))}function rt(e,t,r){return kh(this,void 0,void 0,(function*(){if((yield Fh.lstat(e)).isSymbolicLink()){try{yield Fh.lstat(t),yield Fh.unlink(t)}catch(n){"EPERM"===n.code&&(yield Fh.chmod(t,"0666"),yield Fh.unlink(t))}const r=yield Fh.readlink(e);yield Fh.symlink(r,t,Fh.IS_WINDOWS?"junction":null)}else(yield Fh.exists(t))&&!r||(yield Fh.copyFile(e,t))}))}function nt(e,t,r){return mm(this,void 0,void 0,(function*(){const n=gm.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 gm.ToolRunner(o,t,r).exec()}))}function ot(e,t){const r=[];t=t||Dm.arch();const n=km.join(lt(),e);if($m.existsSync(n)){const e=$m.readdirSync(n);for(const o of e)if(ct(o)){const e=km.join(n,o,t||"");$m.existsSync(e)&&$m.existsSync(e+".complete")&&r.push(o)}}return r}function it(e){return Pm(this,void 0,void 0,(function*(){return e||(e=km.join(pt(),Bm.default())),yield Cm.mkdirP(e),e}))}function st(e,t,r){return Pm(this,void 0,void 0,(function*(){const n=km.join(lt(),e,jm.clean(t)||t,r||"");Nm.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=km.join(lt(),e,jm.clean(t)||t,r||"");$m.writeFileSync(n+".complete",""),Nm.debug("finished caching tool")}function ct(e){const t=jm.clean(e)||"";Nm.debug("isExplicit: "+t);const r=null!=jm.valid(t);return Nm.debug("explicit? "+r),r}function ut(e,t){let r="";Nm.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>jm.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(jm.satisfies(o,t)){r=o;break}}return Nm.debug(r?"matched: "+r:"match not found"),r}function lt(){const e=process.env.RUNNER_TOOL_CACHE||"";return Gm.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function pt(){const e=process.env.RUNNER_TEMP||"";return Gm.ok(e,"Expected RUNNER_TEMP to be defined"),e}function ft(e,t){const r=vn[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 Qm(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 Ce("p7zip",e);case"linux":if(Le())return Fe("p7zip",e);if($e())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===ev&&(null===la.sync("7z",{nothrow:!0})&&await ht("",0,process),ev="7z"),ev}(),["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!==la.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")):$e()?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")):$e()?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 Mh(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??mr(),process.env.RUNNER_TOOL_CACHE=process.env.RUNNER_TOOL_CACHE??Rr(mr(),"setup-cpp","hostedtoolcache");const{url:i,binRelativeDir:s,binFileName:a,extractedFolderName:c,extractFunction:u}=await r(t,process.platform,o);if(yn.GITHUB_ACTIONS)try{const r=Km(e,t);if(r){const n=Rr(r,c),o=Rr(n,s);if(await Z(Rr(o,a)))return g(`${e} ${t} was found in the cache at ${o}.`),await ie(o,ly),{installDir:n,binDir:o}}}catch{}const l=Rr(n,c),p=Rr(l,s),f=Rr(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=Rr(process.env.RUNNER_TEMP??mr(),`${Date.now()}-${Tr(r)}`);return Wm(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,ly),!(await Z(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await Wr(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){yn.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==pr("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await Ym(e,t,r))}(n,e,t),{installDir:l,binDir:p}}function _t(e,t,r){const n=Nf(e)??e;switch(t){case"win32":{const t=gf(n,"v3.19.6");let o;Rh.includes(r)?o=t?"win64-x64":"windows-x86_64":Sh.includes(r)?o=t?"win32-x86":"windows-i386":Ih.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}-${gf(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=gf(n,"v3.19.8");let o;Ih.includes(r)?o=t?"Linux-aarch64":"linux-aarch64":Rh.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=vv){const n=await async function(e,t=vv){try{const r=await vm(e,["--version"]),n=r.stdout||r.stderr||"",o=n.trim().match(t)?.[1];return Nf(o)??void 0}catch(r){return void console.error(r)}}(e,r);return void 0!==n&&""!==t&&-1!==Qp(n,t)}async function Rt(e,t,r){const n=await async function(e,t,r){let n,o=await St(t);if(void 0!==o){const e=Ir(o);n={bin:o,installDir:e,binDir:e}}else{if(yn.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 St(t),void 0===o)throw Error("Python binary could not be found");const s=Ir(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 St(e);if(void 0===n)throw Error("Python binary could not be found");const o=Ir(n);await ie(o,ly),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await Ce("python3",t);const e=await x("brew",["--prefix","python"],{stdio:"pipe"}),n=Rr(e.stdout,"libexec","bin");await ie(n,ly);break}case"linux":if(Le())r=await Fe("python",t);else if($e())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 St(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:Ir(o),binDir:Ir(o)}}return n}(e,t,r);Br(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await Tt();return void 0===t?(g("pip was not found. Installing pip"),await async function(e){await Pt(e)||(await kt("pip"),await Pt(e))}(e),Tt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await Dt(e)))try{await Lt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===kt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await x(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await Lt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){v(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await Lt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Lt(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 St(e){for(const t of["python3","python"]){const r=await It(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=$r(hr()).root,t=(await Yr(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await It(t,Rr(e,r));if(void 0!==n)return n}}}async function It(e,t){try{if(void 0!==t){const r=Rr(t,qe(e));if(await Z(r)&&await Ot(r,wv.python))return r}const r=await la(e,{nothrow:!0,all:!0})??[];for(const e of r)if(await Ot(e,wv.python))return e}catch{}}async function Tt(){for(const e of["pip3","pip"]){const t=await xt(e);if(void 0!==t)return t}}async function xt(e){try{const t=await la(e,{nothrow:!0,all:!0})??[];for(const e of t)if(await Ot(e,wv.pip))return e}catch{}}async function Pt(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 At(e,t,r=null){return Nt(t)&&"linux"===process.platform&&null!==r&&e in Ev?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,Ev[e]):Nt(t)&&e in gv?gv[e]??"":"true"===t?"":t??""}function Nt(e){return"true"===e||void 0===e}function Ct(){if(!("version"in dr)||"function"!=typeof dr.version)return null;const e=dr.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 $t(e,t,r={}){return Lt(await xv(),e,t,r)}async function Lt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await Dt(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{No.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 Iv(),l.PIPX_BIN_DIR=await Tv()),P(e,["-m",u,...o,...a,n],{stdio:"inherit",env:l})}catch(d){if(No.info(`Failed to install ${t} via ${u}: ${d}.`),null===await kt(t))throw Error(`Failed to install ${t} via ${u}: ${d}.`)}else if(null===await kt(t))throw Error(`Failed to install ${t} as it was not found via ${u} or the system package manager`);const p=await _v(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>Z(Rr(e,qe(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=la.sync(qe(t),{nothrow:!0});return null!==n?Ir(n):e[e.length-1]}(p,t);return await ie(f,ly),{binDir:f}}async function Dt(e){return 0===(await x(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function kt(e,t=!0){if("linux"===process.platform){if(No.info(`Installing ${e} via the system package manager`),Le())return Fe(t?"python-"+e:e);if($e())return je([{name:t?"python3-"+e:e}]);if(De())return Se([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return Ce(e);return null}async function Ut(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,ly),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return Ce("graphviz",e);case"linux":if(Le())return Fe("graphviz",e);if($e())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 jt(e,t){const{ArchiveHdi:r}=await import("./assets/hdi-CLiriP2M.mjs"),n=new r(e);await n.read((async e=>{await e.extract(Rr(t,e.path))}))}function Ft(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:jt,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Mt(){if("darwin"===process.platform)try{const e=await vm("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ne("SDKROOT",t.trim(),ly):m("SDKROOT not set")}catch(e){m(e)}}async function Gt(e){const t=await Kr(e,"utf-8");return JSON.parse(t)}function Bt(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=Ht(i,r,t);if(void 0!==n)return n}}function Ht(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 qt(e,t,r){if("win32"===t){const t=Bt(await Gt(Rr(Nv,"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 Vt(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,qt,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,ly)):"ia32"===t&&await Z("C:/tools/mingw32/bin")?(r="C:/tools/mingw32/bin",await ie(r,ly)):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 Ce("gcc",e);break;case"linux":"x64"===r?Le()?o=await Fe("gcc",e):$e()?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"),ly),ne("CXX",qe(t+"/g++"),ly));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 Yr(e)).sort(((e,t)=>function(e,t){const r=Nf(e),n=Nf(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=zp(Nf(o)??o);5>s?(n.push(ne("CC",`${t}/gcc-${o}`,ly),ne("CXX",`${t}/g++-${o}`,ly)),De()&&n.push(ve("cc",`${t}/gcc-${o}`,ly,r),ve("cxx",`${t}/g++-${o}`,ly,r),ve("gcc",`${t}/gcc-${o}`,ly,r),ve("g++",`${t}/g++-${o}`,ly,r))):(n.push(ne("CC",`${t}/gcc-${s}`,ly),ne("CXX",`${t}/g++-${s}`,ly)),De()&&n.push(ve("cc",`${t}/gcc-${s}`,ly,r),ve("cxx",`${t}/g++-${s}`,ly,r),ve("gcc",`${t}/gcc-${s}`,ly,r),ve("g++",`${t}/g++-${s}`,ly,r)))}n.push(Mt()),yn.GITHUB_ACTIONS&&await async function(){const e=Rr(Nv,"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 zt(e,t,r){const n=function(e,t){switch(e){case"win32":return Rh.includes(t)||Sh.includes(t)?"win":Ih.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return Rh.includes(t)||Sh.includes(t)?"linux":Ih.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 Xt(e,t,r){return Et("ninja",e,zt,t,r)}function Wt(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:qe("kcov")}}function Yt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:qe("kcov"),extractFunction:Kt}}async function Kt(e,t){const r=await wt(e,t,1),n=await async function(){let e=la.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await bt(At("cmake",void 0,await Sv()),Rr(ee("~"),"cmake"),"");e=Rr(t,"cmake")}return null===la.sync("ninja",{nothrow:!0})&&await Xt(At("ninja",void 0,await Sv()),Rr(ee("~"),"ninja"),""),e}();"linux"===process.platform&&(Le()?await Promise.all([Fe("libdwarf"),Fe("libcurl-openssl")]):$e()?await je([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):De()&&await Se([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==la.sync("patch",{nothrow:!0})){const e=Rr(Cv,"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=Rr(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 Jt(e){return Object.values(zv).includes(e)?e:e in zv?zv[e]:e}function Qt(e){if(Object.keys(zv).includes(e))return e;for(const[t,r]of Object.entries(zv))if(r===e)return t;return e}function Zt(e){const t=Jt(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(""+jv.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Uv.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Fv.existsSync(n))return Uv.info("Found with vswhere: "+n),n;Uv.info("Not found with vswhere");const o=e?[Qt(e)]:Vv;for(const i of Hv)for(const e of o)for(const t of qv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Uv.info("Trying standard location: "+n),Fv.existsSync(n))return Uv.info("Found standard location: "+n),n;if(Uv.info("Not found in standard locations"),n=Bv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Fv.existsSync(n))return Uv.info("Found VS 2015: "+n),n;throw Uv.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function er(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function tr(e,t,r,n,o,i,s){void 0!==t&&await Z(t)&&(g(`Adding ${t} to PATH`),await ne("VCTargetsPath",t,ly)),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 rr(e,t,r,n,o,i,s,a=Jv){No.startGroup(`Installing ${e} ${t}`);let c=!1;try{c=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(kv(e)),e.addEventListener("abort",(()=>{c(kv(e))}))}if(r===1/0)return void e.then(a,c);const u=new $v;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 tr(At(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Pe({rcOptions:ly});else{const i=Rr(o,s?"llvm":e),c=At(e,t,r),u=ay[e];a=await u(c,i,n)}return i.push(fr(e,a)),s}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(u){m(u),u instanceof Error&&void 0!==u.stack&&m(u.stack),s.push(e+" failed to install")}return No.endGroup(),c}async function nr(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":Rh.includes(t)?r.push("win64"):Sh.includes(t)?r.push("win32"):Ih.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 Sv();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 $e()&&n.push("rhel");Rh.includes(t)?r.push("x86_64"):Sh.includes(t)?r.push("x86"):Ih.includes(t)?r.push("aarch64"):Th.includes(t)?r.push("armv7a"):xh.includes(t)?r.push("powerpc64le"):Ph.includes(t)?r.push("sparc64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),Rh.includes(t)?r.push("x86_64"):Ih.includes(t)?n.push("arm64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),Rh.includes(t)?r.push("amd64"):Sh.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=Bt(await Gt(Rr(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=Bt(await Gt(Rr(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 or(e,t,r){const n=await ty(e,t,r);return await async function(e){const t=process.env.LD_LIBRARY_PATH??"",r=process.env.DYLD_LIBRARY_PATH??"",n=[ne("LLVM_PATH",e,ly),ne("LD_LIBRARY_PATH",`${e}/lib${Sr}${t}`,ly),ne("DYLD_LIBRARY_PATH",`${e}/lib${Sr}${r}`,ly),ne("LDFLAGS",`-L"${e}/lib"`,ly),ne("CPPFLAGS",`-I"${e}/include"`,ly),ne("CC",qe(e+"/bin/clang"),ly),ne("CXX",qe(e+"/bin/clang++"),ly),ne("LIBRARY_PATH",e+"/lib",ly),Mt()];if(De()){const t=60;n.push(ve("cc",e+"/bin/clang",ly,t),ve("cxx",e+"/bin/clang++",ly,t),ve("clang",e+"/bin/clang",ly),ve("clang++",e+"/bin/clang++",ly),ve("lld",e+"/bin/lld",ly),ve("ld.lld",e+"/bin/ld.lld",ly),ve("llvm-ar",e+"/bin/llvm-ar",ly))}await Promise.all(n)}(n.installDir??t),n}async function ir(e,t,r,n=Qv.All){const o=function(e){if(null===Mp(e))try{const t=Nf(e);if(null!==t)return g(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e),i=Number.parseInt(o.split(".")[0],10);try{if(De())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Se([{name:"ca-certificates"}]);const n=new Hd.DownloaderHelper("https://apt.llvm.org/llvm.sh",mr(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await Kr(n.getDownloadPath(),"utf-8"),i=Rr(mr(),"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 ${Vd} -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 ${Vd} -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)&&(mn("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return ge()?e.replace(/apt-get/g,"nala"):e}(o),await Jr(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Se(s),await Wr(i,"755"),await U("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:Jv}),await ie(r+"/bin",ly),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(i,n)}catch(a){g("Failed to install llvm via system package manager "+a)}const s=await Et("llvm",e,nr,t,r);return await ry(i),s}async function sr(){if(yn.GITHUB_ACTIONS){const e=Rr(ey,"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 ar(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Xv(e);g(`Checking if MSVC ${s} is already installed`);let a,c,u=!1;try{const e=Yv(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 tr(s,c,r,a,n,o,i),yn.GITHUB_ACTIONS&&await async function(){const e=Rr(oy,"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 cr(e,t,r){return{url:ur(t,r,e),binRelativeDir:"",binFileName:qe("pwsh"),extractedFolderName:""}}function ur(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 lr(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 pr(e){const t=No.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function fr(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 dr,{homedir as hr,tmpdir as mr}from"os";import vr,{promises as yr,mkdir as gr,stat as wr,statSync as Er,mkdirSync as _r}from"fs";import br from"crypto";import Or,{join as Rr,delimiter as Sr,dirname as Ir,basename as Tr,extname as xr,normalize as Pr,sep as Ar,relative as Nr,resolve as Cr,parse as $r}from"path";import*as Lr from"http";import Dr from"http";import*as kr from"https";import Ur from"https";import"net";import jr from"tls";import Fr from"events";import Mr from"util";import Gr from"child_process";import Br from"assert";import Hr from"buffer";import qr from"stream";import{debuglog as Vr}from"node:util";import zr from"node:process";import Xr,{chmod as Wr,readdir as Yr,readFile as Kr,writeFile as Jr}from"fs/promises";import{Buffer as Qr}from"node:buffer";import Zr from"node:path";import en,{ChildProcess as tn}from"node:child_process";import{fileURLToPath as rn}from"node:url";import nn,{constants as on}from"node:os";import{createWriteStream as sn,readFileSync as an,createReadStream as cn,promises as un}from"node:fs";import ln from"process";import pn,{fileURLToPath as fn}from"url";import dn from"string_decoder";import hn from"timers";import{info as mn}from"console";var vn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},yn={};const gn=[{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=gn,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))}(yn);var wn={},En={},_n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.toCommandProperties=_n.toCommandValue=void 0,_n.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},_n.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 bn=vn&&vn.__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]}),On=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Rn=vn&&vn.__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)&&bn(t,e,r);return On(t,e),t};Object.defineProperty(En,"__esModule",{value:!0}),En.issue=En.issueCommand=void 0;const Sn=Rn(dr),In=_n;En.issueCommand=r,En.issue=function(e,t=""){r(e,{},t)};class Tn{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,In.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 In.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var xn={};const Pn=new Uint8Array(256);let An=Pn.length;const Nn=/^(?:[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 fy=0;256>fy;++fy)Cn.push((fy+256).toString(16).substr(1));let $n,Ln,Dn=0,kn=0;const Un=a("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),br.createHash("md5").update(e).digest()})),jn=a("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),br.createHash("sha1").update(e).digest()})),Fn=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||$n,c=void 0!==e.clockseq?e.clockseq:Ln;if(null==a||null==c){const t=e.random||(e.rng||n)();null==a&&(a=$n=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=Ln=16383&(t[6]<<8|t[7]))}let u=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:kn+1;const p=u-Dn+(l-kn)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||u>Dn)&&void 0===e.nsecs&&(l=0),l>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Dn=u,kn=l,Ln=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:Un,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:jn,validate:o,version:function(e){if(!o(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),Mn=t(Fn);var Gn=vn&&vn.__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]}),Bn=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hn=vn&&vn.__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)&&Gn(t,e,r);return Bn(t,e),t};Object.defineProperty(xn,"__esModule",{value:!0}),xn.prepareKeyValueMessage=xn.issueFileCommand=void 0;const qn=Hn(vr),Vn=Hn(dr),zn=Mn,Xn=_n;xn.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!qn.existsSync(r))throw Error("Missing file at path: "+r);qn.appendFileSync(r,`${Xn.toCommandValue(t)}${Vn.EOL}`,{encoding:"utf8"})},xn.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+zn.v4(),n=Xn.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}${Vn.EOL}${n}${Vn.EOL}${r}`};var Wn={};class Yn 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 Kn,Jn={},Qn=jr,Zn=Dr,eo=Ur,to=Fr,ro=Mr;Jn.httpOverHttp=function(e){var t=new u(e);return t.request=Zn.request,t},Jn.httpsOverHttp=function(e){var t=new u(e);return t.request=Zn.request,t.createSocket=l,t.defaultPort=443,t},Jn.httpOverHttps=function(e){var t=new u(e);return t.request=eo.request,t},Jn.httpsOverHttps=function(e){var t=new u(e);return t.request=eo.request,t.createSocket=l,t.defaultPort=443,t},ro.inherits(u,to.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?(Kn("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?(Kn("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)):(Kn("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")),Kn("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(),Kn("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)}))}},Kn=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(){},Jn.debug=Kn;var no,oo,io,so,ao,co=Jn;(oo=no||(no={}))[oo.OK=200]="OK",oo[oo.MultipleChoices=300]="MultipleChoices",oo[oo.MovedPermanently=301]="MovedPermanently",oo[oo.ResourceMoved=302]="ResourceMoved",oo[oo.SeeOther=303]="SeeOther",oo[oo.NotModified=304]="NotModified",oo[oo.UseProxy=305]="UseProxy",oo[oo.SwitchProxy=306]="SwitchProxy",oo[oo.TemporaryRedirect=307]="TemporaryRedirect",oo[oo.PermanentRedirect=308]="PermanentRedirect",oo[oo.BadRequest=400]="BadRequest",oo[oo.Unauthorized=401]="Unauthorized",oo[oo.PaymentRequired=402]="PaymentRequired",oo[oo.Forbidden=403]="Forbidden",oo[oo.NotFound=404]="NotFound",oo[oo.MethodNotAllowed=405]="MethodNotAllowed",oo[oo.NotAcceptable=406]="NotAcceptable",oo[oo.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",oo[oo.RequestTimeout=408]="RequestTimeout",oo[oo.Conflict=409]="Conflict",oo[oo.Gone=410]="Gone",oo[oo.TooManyRequests=429]="TooManyRequests",oo[oo.InternalServerError=500]="InternalServerError",oo[oo.NotImplemented=501]="NotImplemented",oo[oo.BadGateway=502]="BadGateway",oo[oo.ServiceUnavailable=503]="ServiceUnavailable",oo[oo.GatewayTimeout=504]="GatewayTimeout",(so=io||(io={})).Accept="accept",so.ContentType="content-type",(ao||(ao={})).ApplicationJson="application/json";const uo=[no.MovedPermanently,no.ResourceMoved,no.SeeOther,no.TemporaryRedirect,no.PermanentRedirect],lo=[no.BadGateway,no.ServiceUnavailable,no.GatewayTimeout],po=["OPTIONS","GET","DELETE","HEAD"];class fo extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,fo.prototype)}statusCode;result}class ho{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 mo=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),vo=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return io},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[io.Accept]=this._getExistingOrDefaultHeader(t,io.Accept,ao.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[io.Accept]=this._getExistingOrDefaultHeader(r,io.Accept,ao.ApplicationJson),r[io.ContentType]=this._getExistingOrDefaultHeader(r,io.ContentType,ao.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[io.Accept]=this._getExistingOrDefaultHeader(r,io.Accept,ao.ApplicationJson),r[io.ContentType]=this._getExistingOrDefaultHeader(r,io.ContentType,ao.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[io.Accept]=this._getExistingOrDefaultHeader(r,io.Accept,ao.ApplicationJson),r[io.ContentType]=this._getExistingOrDefaultHeader(r,io.ContentType,ao.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&&po.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===no.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&&uo.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||!lo.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 ho(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?kr:Lr;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({},mo(this.requestOptions.headers),mo(e||{})):mo(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=mo(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||Lr.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?co.httpsOverHttps:co.httpsOverHttp:s?co.httpOverHttps:co.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new kr.Agent(e):new Lr.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===no.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 fo(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:fo,HttpClientResponse:ho,get HttpCodes(){return no},get MediaTypes(){return ao},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"})),yo=t(vo);var go,wo={},Eo=vn&&vn.__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(wo,"__esModule",{value:!0}),wo.PersonalAccessTokenCredentialHandler=wo.BearerCredentialHandler=wo.BasicCredentialHandler=void 0,wo.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 Eo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},wo.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 Eo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},wo.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 Eo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var _o,bo,Oo,Ro,So,Io,To,xo,Po={},Ao={},No=h(),Co={exports:{}};xo="win32"===process.platform||vn.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(So)return Ro;So=1,Ro=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=vr;return Ro}():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(To)return Io;To=1,Io=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=vr;return Io}();var $o=w;w.sync=function(e,t){try{return xo.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,Do=Or,ko=Lo?";":":",Uo=$o,jo=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Fo=(e,t)=>{const r=t.colon||ko,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}},Mo=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=Fo(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(jo(e));const a=n[r],u=/^".*"$/.test(a)?a.slice(1,-1):a,l=Do.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];Uo(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 Go=Mo;Mo.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=Fo(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,l=Do.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(Uo.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 jo(e)};var Bo={exports:{}};const Ho=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};Bo.exports=Ho,Bo.exports.default=Ho;const qo=Or,Vo=Go,zo=Bo.exports;var Xo={};const Wo=/([()\][%!^"`<>&|;, *?])/g;Xo.command=function(e){return e.replace(Wo,"^$1")},Xo.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Wo,"^$1"),t&&(e=e.replace(Wo,"^$1")),e};const Yo=/^#!(.*)/,Ko=vr,Jo=Or,Qo=function(e){return E(e)||E(e,!0)},Zo=Xo,ei=function(e){const t=Buffer.alloc(150);let r;try{r=Ko.openSync(e,"r"),Ko.readSync(r,t,0,150,0),Ko.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(Yo);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},ti="win32"===process.platform,ri=/\.(?:com|exe)$/i,ni=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,oi="win32"===process.platform,ii=Gr,si=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(!ti)return e;const t=function(e){e.file=Qo(e);const t=e.file&&ei(e.file);return t?(e.args.unshift(e.file),e.command=t,Qo(e)):e.file}(e),r=!ri.test(t);if(e.options.forceShell||r){const r=ni.test(t);e.command=Jo.normalize(e.command),e.command=Zo.command(e.command),e.args=e.args.map((e=>Zo.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)},ai={hookChildProcess:function(e,t){if(!oi)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 oi&&1===e&&!t.file?_(t.original,"spawnSync"):null},notFoundError:_};Co.exports=O,Co.exports.spawn=O,Co.exports.sync=function(e,t,r){const n=si(e,t,r),o=ii.spawnSync(n.command,n.args,n.options);return o.error=o.error||ai.verifyENOENTSync(o.status,n),o},Co.exports._parse=si,Co.exports._enoent=ai;const ci=e(Co.exports),ui=({env:e=zr.env,...t}={})=>{const r=R({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=zr.cwd(),path:t=zr.env[R()],preferLocal:r=!0,execPath:n=zr.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?rn(e):e,s=Zr.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(Zr.join(t,"node_modules/.bin")),r=t,t=Zr.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?rn(t):t;e.push(Zr.resolve(r,n,".."))})(a,n,s),[...a,t].join(Zr.delimiter)})(t),e},li=(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);!pi(o,i)&&n||Object.defineProperty(e,r,i)},pi=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)},fi=(e,t)=>`/* Wrapped ${e}*/\n${t}`,di=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),hi=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),mi=new WeakMap,vi=(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(mi.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))li(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=fi.bind(null,n,""+t);Object.defineProperty(o,"name",hi),Object.defineProperty(e,"toString",{...di,value:o})})(e,t,n)}(i,e),mi.set(i,n),i};vi.callCount=e=>{if(!mi.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return mi.get(e)};const yi=(e,t)=>({name:"SIGRT"+(t+1),number:gi+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),gi=34,wi=[{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"}],Ei=()=>{const e=Array.from({length:64-gi+1},yi);return[...wi,...e].map(_i)},_i=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=on,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},bi=({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}],Oi=(()=>{const e=Ei();return Object.fromEntries(e.map(bi))})(),Ri=(e,t)=>{const r=t.find((({name:t})=>on.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Ei(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Ri(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 Si=({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=zr.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:Oi[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},Ii=["stdin","stdout","stderr"];var Ti,xi={exports:{}},Pi={exports:{}},Ai=vn.process;const Ni=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(Ni(Ai)){var Ci,$i=Br,Li=(Ti||(Ti=1,(zi=Pi).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&zi.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&zi.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Pi.exports),Di=/^win/i.test(Ai.platform),ki=Fr;"function"!=typeof ki&&(ki=ki.EventEmitter),Ai.__signal_exit_emitter__?Ci=Ai.__signal_exit_emitter__:((Ci=Ai.__signal_exit_emitter__=new ki).count=0,Ci.emitted={}),Ci.infinite||(Ci.setMaxListeners(1/0),Ci.infinite=!0),xi.exports=function(e,t){if(!Ni(vn.process))return function(){};$i.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Mi&&Gi();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&&Ui()}};var Ui=function(){Mi&&Ni(vn.process)&&(Mi=!1,Li.forEach((function(e){try{Ai.removeListener(e,Fi[e])}catch(t){}})),Ai.emit=qi,Ai.reallyExit=Bi,Ci.count-=1)};xi.exports.unload=Ui;var ji=function(e,t,r){Ci.emitted[e]||(Ci.emitted[e]=!0,Ci.emit(e,t,r))},Fi={};Li.forEach((function(e){Fi[e]=function(){Ni(vn.process)&&Ai.listeners(e).length===Ci.count&&(Ui(),ji("exit",null,e),ji("afterexit",null,e),Di&&"SIGHUP"===e&&(e="SIGINT"),Ai.kill(Ai.pid,e))}})),xi.exports.signals=function(){return Li};var Mi=!1,Gi=function(){!Mi&&Ni(vn.process)&&(Mi=!0,Ci.count+=1,Li=Li.filter((function(e){try{return Ai.on(e,Fi[e]),!0}catch(t){return!1}})),Ai.emit=Vi,Ai.reallyExit=Hi)};xi.exports.load=Gi;var Bi=Ai.reallyExit,Hi=function(e){Ni(vn.process)&&(Ai.exitCode=e||0,ji("exit",Ai.exitCode,null),ji("afterexit",Ai.exitCode,null),Bi.call(Ai,Ai.exitCode))},qi=Ai.emit,Vi=function(e,t){if("exit"===e&&Ni(vn.process)){void 0!==t&&(Ai.exitCode=t);var r=qi.apply(this,arguments);return ji("exit",Ai.exitCode,null),ji("afterexit",Ai.exitCode,null),r}return qi.apply(this,arguments)}}else xi.exports=function(){return function(){}};var zi;const Xi=e(xi.exports),Wi=(e,t="SIGTERM",r={})=>{const n=e(t);return Yi(e,t,r,n),n},Yi=(e,t,r,n)=>{if(!Ki(t,r,n))return;const o=Qi(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},Ki=(e,{forceKillAfterTimeout:t},r)=>Ji(e)&&!1!==t&&r,Ji=e=>e===nn.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),Qi=({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},Zi=(e,t)=>{e.kill()&&(t.isCanceled=!0)},es=(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])},ts=({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})`)},rs=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=Xi((()=>{e.kill()}));return n.finally((()=>{o()}))},ns=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(sn(r)),e;if(I(r))return e[t].pipe(r),e;if(!(e=>e instanceof tn&&"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},os=e=>{null!==e.stdout&&(e.pipeStdout=ns.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=ns.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=ns.bind(void 0,e,"all"))};var is={exports:{}};const{PassThrough:ss}=qr,{constants:as}=Hr,cs=qr,{promisify:us}=Mr,ls=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 ss({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},ps=us(cs.pipeline);class fs extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}is.exports=T,is.exports.buffer=(e,t)=>T(e,{...t,encoding:"buffer"}),is.exports.array=(e,t)=>T(e,{...t,array:!0}),is.exports.MaxBufferError=fs;const ds=e(is.exports),{PassThrough:hs}=qr,ms=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 hs({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})),vs=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},ys=e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(vs(e),an(t)))(e);if(S(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},gs=(e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(vs(e),cn(t)))(t);void 0!==r&&(S(r)?r.pipe(e.stdin):e.stdin.end(r))},ws=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=ms();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},Es=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},_s=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?ds(e,{encoding:t,maxBuffer:n}):ds.buffer(e,{maxBuffer:n})},bs=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},s)=>{const a=_s(e,{encoding:n,buffer:o,maxBuffer:i}),c=_s(t,{encoding:n,buffer:o,maxBuffer:i}),u=_s(r,{encoding:n,buffer:o,maxBuffer:2*i});try{return await Promise.all([s,a,c,u])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},Es(e,a),Es(t,c),Es(r,u)])}},Os=(async()=>{})().constructor.prototype,Rs=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Os,e)])),Ss=(e,t)=>{for(const[r,n]of Rs){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Is=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)}))})),Ts=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],xs=/^[\w.-]+$/,Ps=/"/g,As=(e,t)=>Ts(e,t).join(" "),Ns=(e,t)=>Ts(e,t).map((e=>(e=>"string"!=typeof e||xs.test(e)?e:`"${e.replace(Ps,'\\"')}"`)(e))).join(" "),Cs=/ +/g,$s=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},Ls=Vr("execa").enabled,Ds=(e,t)=>(e+"").padStart(t,"0"),ks=(e,{verbose:t})=>{t&&zr.stderr.write(`[${(()=>{const e=new Date;return`${Ds(e.getHours(),2)}:${Ds(e.getMinutes(),2)}:${Ds(e.getSeconds(),2)}.${Ds(e.getMilliseconds(),3)}`})()}] ${e}\n`)},Us=(e,t,r={})=>{const n=ci._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||zr.cwd(),execPath:zr.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Ls,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...zr.env,...e}:e;return r?ui({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Ii.map((t=>e[t]));if((e=>Ii.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+Ii.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,Ii.length)},((e,r)=>t[r]))})(r),"win32"===zr.platform&&"cmd"===Zr.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},js=(e,t,r)=>"string"==typeof t||Qr.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 Fs={},Ms={};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.sync=Ms.isexe=void 0;const Gs=vr,Bs=Xr;Ms.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Hs(await(0,Bs.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Ms.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Hs((0,Gs.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Hs=(e,t)=>e.isFile()&&qs(e,t),qs=(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 Vs={};Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.sync=Vs.isexe=void 0;const zs=vr,Xs=Xr;Vs.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ws(await(0,Xs.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Vs.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ws((0,zs.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Ws=(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 Ys={};Object.defineProperty(Ys,"__esModule",{value:!0}),function(e){var t=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=vn&&vn.__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=vn&&vn.__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(Ms);e.posix=i;const s=n(Vs);e.win32=s,o(Ys,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(Fs);const{isexe:Ks,sync:Js}=Fs,{join:Qs,delimiter:Zs,sep:ea,posix:ta}=Or,ra="win32"===process.platform,na=RegExp(`[${ta.sep}${ea===ta.sep?"":ea}]`.replace(/(\\)/g,"\\$1")),oa=RegExp("^\\."+na.source),ia=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),sa=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=Zs})=>{const o=e.match(na)?[""]:[...ra?[process.cwd()]:[],...(t||"").split(n)];if(ra){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:[""]}},aa=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&oa.test(t)?t.slice(0,2):"")+Qs(r,t)},ca=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=sa(e,t),i=[];for(const s of r){const r=aa(s,e);for(const e of n){const n=r+e;if(await Ks(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 ia(e)};var ua=ca;ca.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=sa(e,t),i=[];for(const s of r){const r=aa(s,e);for(const e of n){const n=r+e;if(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 ia(e)};const la=e(ua);let pa;var fa,da={};N(da,"hasSudo",(()=>C)),N(da,"isRoot",(()=>$)),N(da,"isSudo",(()=>L)),N(da,"prependSudo",(()=>D)),N(da,"defaultExecOptions",(()=>ha)),N(da,"execRootSync",(()=>k)),N(da,"execRoot",(()=>U));let ha={stdio:"inherit",shell:!0};N(fa={},"isAdminWindows",(()=>ma)),N(fa,"isAdminPosix",(()=>va)),N(fa,"isAdmin",(()=>M));let ma=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}}()}},va=$;N({},"grantUserWriteAccess",(()=>G));var ya,ga,wa,Ea,_a,ba,Oa,Ra,Sa,Ia,Ta,xa,Pa,Aa,Na=function(e){return null!=e},Ca=Na,$a=[].forEach,La=Object.create,Da=function(e){var t=La(null);return $a.call(arguments,(function(e){Ca(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},ka="function"==typeof(wa=Math.sign)&&1===wa(10)&&-1===wa(-20)?Math.sign:ga?ya:(ga=1,ya=function(e){return isNaN(e=+e)||0===e?e:e>0?1:-1}),Ua=Math.abs,ja=Math.floor,Fa=Math.max,Ma=function(e){return Fa(0,function(e){return isNaN(e)?0:0!=(e=+e)&&isFinite(e)?ka(e)*ja(Ua(e)):e}(e))},Ga=Ma,Ba=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&Ga(e)},Ha=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},qa=Na,Va=function(e){if(!qa(e))throw new TypeError("Cannot use null or undefined");return e},za=Ha,Xa=Va,Wa=function(){}.bind,Ya=function(){}.call,Ka=Object.keys,Ja={}.propertyIsEnumerable,Qa=(Ea="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(Xa(e)),za(t),r=Ka(e),o&&r.sort("function"==typeof o?Wa.call(o,e):void 0),"function"!=typeof Ea&&(Ea=r[Ea]),Ya.call(Ea,r,(function(r,o){return Ja.call(e,r)?Ya.call(t,n,e[r],r,e,o):undefined}))}),Za={},ec={exports:{}},tc="function"==typeof(Aa=Object.assign)&&(Aa(Pa={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Pa.foo+Pa.bar+Pa.trzy==="razdwatrzy")?Object.assign:function(){if(xa)return Ta;xa=1;var e=Ia?Sa:(Ia=1,Sa=(ba?_a:(ba=1,_a=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(Ra)return Oa;Ra=1;var e=Na,t=Object.keys;return Oa=function(r){return t(e(r)?Object(r):r)}}()),t=Va,r=Math.max;return Ta=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},Ta}(),rc=Na,nc={function:!0,object:!0},oc=function(e){return rc(e)&&nc[typeof e]||!1};!function(e){var t=tc,r=oc,n=Na,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}}(ec);var ic,sc,ac,cc,uc=ec.exports,lc={exports:{}},pc=Ma;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(py){}cc=B(),ac=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); };")}}(),lc.exports=function(e,t){var r;if(t=pc(t),e.length===t)return e;r=ac(t)(e);try{cc(r,e)}catch(py){}return r};var fc,dc,hc=lc.exports,mc={exports:{}},vc=function(e){return null!=e},yc=vc,gc={object:!0,function:!0,undefined:!0},wc=function(e){if(!function(e){return!!yc(e)&&hasOwnProperty.call(gc,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},Ec=/^\s*class[\s{/}]/,_c=function(){}.toString,bc="razdwatrzy",Oc="function"==typeof bc.contains&&!0===bc.contains("dwa")&&!1===bc.contains("foo")?"".contains:function(){if(dc)return fc;dc=1;var e="".indexOf;return fc=function(t){return e.call(this,t,arguments[1])>-1}}(),Rc=vc,Sc=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!wc(e)}(e)&&!Ec.test(_c.call(e))},Ic=tc,Tc=Da,xc=Oc;(mc.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],Rc(e)?(r=xc.call(e,"c"),n=xc.call(e,"e"),o=xc.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?Ic(Tc(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],Rc(t)?Sc(t)?Rc(r)?Sc(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,Rc(e)?(n=xc.call(e,"c"),o=xc.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?Ic(Tc(i),s):s};var Pc=mc.exports,Ac={exports:{}};!function(e,t){var r,n,o,i,s,a,c,u=Pc,l=Ha,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}(Ac,Ac.exports);var Nc,Cc,$c,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,su,au,cu,uu,lu,pu,fu=Ac.exports,du=z(),hu=Array.isArray,mu=Na,vu=Ha,yu=[].slice;pu=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(yu.call(e,this.length))};var gu,wu,Eu,_u,bu,Ou,Ru,Su,Iu,Tu,xu,Pu,Au,Nu,Cu,$u,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,il,sl,al,cl,ul,ll,pl=Ha,fl=uc,dl=hc,hl=Pc,ml=fu.methods,vl=function(e){return(t=e,e=hu(t)?t:du(t)).forEach((function(e){mu(e)&&vu(e)})),pu.bind(e);var t},yl=function(){}.apply,gl=function(){}.call,wl=Object.create,El=Object.defineProperties,_l=ml.on,bl=ml.emit,Ol=Ha,Rl=Qa,Sl=Za,Il=function(e,t,r){var n,o,i,s,a,c,u,l,p,f,d,h,m,v,y,g=wl(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:pl(e.get)},void 0!==e.set?(t.set=pl(e.set),e.delete&&(t.delete=pl(e.delete)),e.clear&&(t.clear=pl(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=vl(r.resolvers)),v=i?dl((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?gl.call(e,this,a[0]):yl.call(e,this,a),null===r){if(null!==(r=i(a)))throw fl("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(g,r))throw fl("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?yl.call(e,this,arguments):gl.call(e,this),hasOwnProperty.call(g,"data"))throw fl("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?gl.call(e,this,i[0]):yl.call(e,this,i),hasOwnProperty.call(g,o))throw fl("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=wl(null),n.emit("clear",e)},on:function(e,t){return"get"===e?d=!0:"set"===e?h=!0:"delete"===e&&(m=!0),_l.call(this,e,t)},emit:bl,updateEnv:function(){e=n.original}},u=i?dl((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=dl((function(){var e,r=arguments;return 0===t?g.data:(y&&(r=y(r)),e=i?i(r):r[0]+"",g[e])})),p=dl((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))})),El(v,{__memoized__:hl(!0),delete:hl(u),clear:hl(n.clear),_get:hl(l),_has:hl(p)}),n},Tl=Ba,xl={},Pl={},Al={exports:{}},Nl={},Cl={},$l={},Ll={},Dl=Da,kl=Ba,Ul=function e(t){var r,n,o;if(Ol(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=Tl(r.length,t.length,r.async&&Sl.async),o=Il(t,n,r),Rl(Sl,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},jl=function(e){var t,r=Dl(arguments[1]);return r.normalizer||0!==(t=r.length=kl(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(wu||(wu=1,gu=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),gu):t>1&&(r.normalizer=(_u||(_u=1,Eu=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),Eu)(t)):r.normalizer=!1===t?function(){if(Nu)return Au;Nu=1;var e=X(),t=Object.create;return Au=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)}}},Au}()():1===t?function(){if($u)return Cu;$u=1;var e=X();return Cu=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(Du)return Lu;Du=1;var e=X(),t=Object.create;return Lu=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)}}},Lu}()(t)),r.async&&function(){if(Mu)return xl;Mu=1;var e=z(),t=W(),r=B(),n=hc,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(py){}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(tl)return Nl;tl=1;var e=Ha,t=Qa,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(sl)return Cl;sl=1;var e=z(),t=Qa,r=Y(),n=J(),o=function(){if(il)return ol;il=1;var e=Ma,t=nl?rl:(nl=1,rl=2147483647);return ol=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(ul)return $l;ul=1;var e=Ma,t=function(){if(cl)return al;cl=1;var e=Ma,t=Object.create,r={}.hasOwnProperty;return al=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(ll)return Ll;ll=1;var e=Pc,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}))})}}(),Ul(e,r)};const Fl=e(jl),Ml=/^~(?=$|\/|\\)/,{appendFile:Gl,readFile:Bl,writeFile:Hl}=yr,ql=ee("~/.bashrc"),Vl=Fl((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}),zl=dr,Xl="win32"!==zl.platform(),Wl=zl.release(),Yl=/(\d+\.\d+)\.(\d+)/,Kl=e((function(e){return Xl?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&+t>=17134.1184)(...Yl.exec(Wl).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var Jl,Ql,Zl,ep,tp={exports:{}};Zl=function(){if(Ql)return Jl;Ql=1;var e=/[|\\{}()[\]^$+*?.]/g;return Jl=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),ep=function(e){return e.split("").reverse().join("")},tp.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"),ep(ep(e).replace(n,"$1"+r)))};const rp=e(tp.exports),{appendFile:np}=yr,{appendFile:op}=yr,ip=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var sp={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}}()}(sp);var ap=sp.exports,cp=ap,up={};ap.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 lp={exports:{}};lp.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const pp=cp,fp=lp.exports,dp=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],hp={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},mp={};var vp={create:function(e){return e=Object.assign({},hp,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!mp[e]){if(!fp||!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 dp.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:hp};const yp=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 gp={exports:{}},wp={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},Ep="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}=wp,i=Ep,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*$")}(gp,gp.exports);var _p=gp.exports;const bp=Object.freeze({loose:!0}),Op=Object.freeze({});var Rp=e=>e?"object"!=typeof e?bp:e:Op;const Sp=/^[0-9]+$/,Ip=(e,t)=>{const r=Sp.test(e),n=Sp.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var Tp={compareIdentifiers:Ip,rcompareIdentifiers:(e,t)=>Ip(t,e)};const xp=Ep,{MAX_LENGTH:Pp,MAX_SAFE_INTEGER:Ap}=wp,{safeRe:Np,t:Cp}=_p,$p=Rp,{compareIdentifiers:Lp}=Tp;var Dp=class e{constructor(t,r){if(r=$p(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>Pp)throw new TypeError(`version is longer than ${Pp} characters`);xp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Np[Cp.LOOSE]:Np[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>Ap||0>this.major)throw new TypeError("Invalid major version");if(this.minor>Ap||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>Ap||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&&Ap>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(xp("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)),Lp(this.major,t.major)||Lp(this.minor,t.minor)||Lp(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(xp("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 Lp(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(xp("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 Lp(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===Lp(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 kp=Dp;var Up=(e,t,r=!1)=>{if(e instanceof kp)return e;try{return new kp(e,t)}catch(n){if(!r)return null;throw n}};const jp=Up;var Fp=(e,t)=>{const r=jp(e,t);return r?r.version:null};const Mp=e(Fp),Gp=Up;const Bp=Dp;const Hp=Up;const qp=Dp;var Vp=(e,t)=>new qp(e,t).major;const zp=e(Vp),Xp=Dp;const Wp=Dp;const Yp=Up;const Kp=Dp;var Jp=(e,t,r)=>new Kp(e,r).compare(new Kp(t,r));const Qp=e(Jp),Zp=Jp;const ef=Jp;const tf=Dp;var rf=(e,t,r)=>{const n=new tf(e,r),o=new tf(t,r);return n.compare(o)||n.compareBuild(o)};const nf=rf;const of=rf;const sf=Jp;var af=(e,t,r)=>sf(e,t,r)>0;const cf=Jp;var uf=(e,t,r)=>0>cf(e,t,r);const lf=Jp;var pf=(e,t,r)=>0===lf(e,t,r);const ff=Jp;var df=(e,t,r)=>0!==ff(e,t,r);const hf=Jp;var mf=(e,t,r)=>hf(e,t,r)>=0;const vf=Jp;var yf=(e,t,r)=>0>=vf(e,t,r);const gf=e(yf),wf=pf,Ef=df,_f=af,bf=mf,Of=uf,Rf=yf;var Sf=(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 wf(e,r,n);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);default:throw new TypeError("Invalid operator: "+t)}};const If=Dp,Tf=Up,{safeRe:xf,t:Pf}=_p;var Af=(e,t)=>{if(e instanceof If)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?xf[Pf.COERCERTLFULL]:xf[Pf.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?xf[Pf.COERCEFULL]:xf[Pf.COERCE]);return null===r?null:Tf(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const Nf=e(Af);var Cf,$f,Lf,Df,kf=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 Uf=le();var jf=(e,t,r)=>{try{t=new Uf(t,r)}catch(n){return!1}return t.test(e)};const Ff=le();const Mf=Dp,Gf=le();const Bf=Dp,Hf=le();const qf=Dp,Vf=le(),zf=af;const Xf=le();const Wf=Dp,Yf=pe(),{ANY:Kf}=Yf,Jf=le(),Qf=jf,Zf=af,ed=uf,td=yf,rd=mf;var nd=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new Wf(e,n),t=new Jf(t,n),r){case">":o=Zf,i=td,s=ed,a=">",c=">=";break;case"<":o=ed,i=rd,s=Zf,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qf(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===Kf&&(e=new Yf(">=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 od=nd;const id=nd;const sd=le();const ad=jf,cd=Jp,ud=le(),ld=pe(),{ANY:pd}=ld,fd=jf,dd=Jp,hd=[new ld(">=0.0.0-0")],md=[new ld(">=0.0.0")],vd=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===pd){if(1===t.length&&t[0].semver===pd)return!0;e=r.includePrerelease?hd:md}if(1===t.length&&t[0].semver===pd){if(r.includePrerelease)return!0;t=md}const n=new Set;let o,i,s,a,c,u,l;for(const d of e)">"===d.operator||">="===d.operator?o=yd(o,d,r):"<"===d.operator||"<="===d.operator?i=gd(i,d,r):n.add(d.semver);if(n.size>1)return null;if(o&&i){if(s=dd(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&&!fd(d,o+"",r))return null;if(i&&!fd(d,i+"",r))return null;for(const e of t)if(!fd(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=yd(o,d,r),a===d&&a!==o)return!1}else if(">="===o.operator&&!fd(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=gd(i,d,r),c===d&&c!==i)return!1}else if("<="===i.operator&&!fd(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)},yd=(e,t,r)=>{if(!e)return t;const n=dd(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},gd=(e,t,r)=>{if(!e)return t;const n=dd(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const wd=_p,Ed=wp,_d=Dp,bd=Tp;var Od={parse:Up,valid:Fp,clean:(e,t)=>{const r=Gp(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 Bp(e instanceof Bp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=Hp(e,null,!0),n=Hp(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:Vp,minor:(e,t)=>new Xp(e,t).minor,patch:(e,t)=>new Wp(e,t).patch,prerelease:(e,t)=>{const r=Yp(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:Jp,rcompare:(e,t,r)=>Zp(t,e,r),compareLoose:(e,t)=>ef(e,t,!0),compareBuild:rf,sort:(e,t)=>e.sort(((e,r)=>nf(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>of(r,e,t))),gt:af,lt:uf,eq:pf,neq:df,gte:mf,lte:yf,cmp:Sf,coerce:Af,Comparator:pe(),Range:le(),satisfies:jf,toComparators:(e,t)=>new Ff(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 Gf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Mf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Hf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new Bf(n,r)))})),n},minVersion:(e,t)=>{e=new Vf(e,t);let r=new qf("0.0.0");if(e.test(r))return r;if(r=new qf("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 qf(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!zf(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!zf(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new Xf(e,t).range||"*"}catch(r){return null}},outside:nd,gtr:(e,t,r)=>od(e,t,">",r),ltr:(e,t,r)=>id(e,t,"<",r),intersects:(e,t,r)=>(e=new sd(e,r),t=new sd(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>cd(e,t,r)));for(const u of s)ad(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 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=vd(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:_d,re:wd.re,src:wd.src,tokens:wd.t,SEMVER_SPEC_VERSION:Ed.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ed.RELEASE_TYPES,compareIdentifiers:bd.compareIdentifiers,rcompareIdentifiers:bd.rcompareIdentifiers},Rd=Od,Sd=dr,Id=Or,Td=vr,xd=Ur,Pd=ln.env.npm_package_json,Ad=ln.env.npm_config_user_agent,Nd=!(!Ad||!Ad.startsWith("npm")),Cd=!(!Pd||!Pd.endsWith("package.json")),$d=Nd||Cd,Ld=!(!Ad||!Ad.startsWith("yarn")),Dd=$d||Ld,kd=Sd.homedir(),Ud=process.env.XDG_CONFIG_HOME||Id.join(kd,".config","simple-update-notifier"),jd=function(e){return Id.join(Ud,"".concat(e.replace("@","").replace("/","__"),".json"))},Fd=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){xd.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)}))}))]}))}))},Md=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 Td.existsSync(Ud)||Td.mkdirSync(Ud,{recursive:!0}),r=function(t){var r=jd(t);try{if(!Td.existsSync(r))return;return JSON.parse(Td.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,Fd(t.name,i)]:[3,2];case 1:return o=c.sent(),u=jd(t.name),Td.writeFileSync(u,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),Rd.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 Gd=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||Dd&&!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,Md(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]}}))}))})),Bd={name:"setup-cpp",version:"0.40.0"};var Hd={};!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(vr),s=pn,a=t(Or),c=t(Dr),u=t(Ur),l=Fr,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)}(Hd);const{appendFile:qd}=yr,Vd="Dpkg::Lock::Timeout=300";let zd=!1;const Xd=Fl((function(e=we()){k(e,"nala"!==e?["update","-y","-o",Vd]:["update","-o",Vd],{...ha,env:ye(e)}),zd=!0}));var Wd,Yd;(Yd=Wd||(Wd={}))[Yd.NameDashVersion=0]="NameDashVersion",Yd[Yd.NameEqualsVersion=1]="NameEqualsVersion",Yd[Yd.Name=2]="Name",Yd[Yd.None=3]="None";const Kd=Fl((async function(e){Xd(e);const t=await be([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&k(e,["install","-y","--fix-broken","-o",Vd,...t],{...ha,env:ye(e)})}),{promise:!0}),Jd=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],Qd="/etc/apt/trusted.gpg.d",Zd="keyserver.ubuntu.com";let eh,th,rh,nh,oh,ih=!1,sh=!1,ah=!1,ch=!1;const uh=/Version\s*:\s*(.*)/g;let lh=!1;var ph=Or;const fh=e((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=ph.basename(e,ph.extname(e))+t,o=ph.join(ph.dirname(e),n);return(r=e.slice(0,2))==="."+ph.sep||"./"===r?"."+ph.sep+o:o}));var dh={},hh={};Ge(hh,"name",(()=>Be));var mh={};Ge(mh,"normalizeTrim",(()=>He));var vh={};Ge(vh,"addExeExt",(()=>qe));var yh={};Ge(yh,"addNamePrefix",(()=>Ve));var gh={};Ge(gh,"addNameSuffix",(()=>ze));var wh={};Ge(wh,"addShExt",(()=>Xe));var Eh={};Ge(Eh,"addShRelativePrefix",(()=>We));var _h={};Ge(_h,"removeExt",(()=>Ye));var bh={};Ge(bh,"replaceExt",(()=>Ke));var Oh={};Ge(Oh,"isPathInside",(()=>Je)),Me(dh,hh),Me(dh,mh),Me(dh,vh),Me(dh,yh),Me(dh,gh),Me(dh,wh),Me(dh,Eh),Me(dh,_h),Me(dh,bh),Me(dh,Oh);const Rh=["x64","amd64","x86_64","win64","64"],Sh=["x86","i386","ia32","win32","32","x32"],Ih=["aarch64","arm64","woa64","arm"],Th=["armv7","armv7a"],xh=["powerpc64le","ppc64le"],Ph=["sparc64"];var Ah={},Nh={},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=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=vn&&vn.__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=vn&&vn.__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(vr),c=i(Or);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 $h=vn&&vn.__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]}),Lh=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Dh=vn&&vn.__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)&&$h(t,e,r);return Lh(t,e),t},kh=vn&&vn.__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(Nh,"__esModule",{value:!0}),Nh.findInPath=Nh.which=Mh=Nh.mkdirP=Nh.rmRF=Nh.mv=Nh.cp=void 0;const Uh=Br,jh=Dh(Or),Fh=Dh(Ch);Nh.cp=function(e,t,r={}){return kh(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 Fh.exists(t))?yield Fh.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?jh.join(t,jh.basename(e)):t;if(!(yield Fh.exists(e)))throw Error("no such file or directory: "+e);if((yield Fh.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(""===jh.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield rt(e,a,n)}}))},Nh.mv=function(e,t,r={}){return kh(this,void 0,void 0,(function*(){if(yield Fh.exists(t)){let n=!0;if((yield Fh.isDirectory(t))&&(t=jh.join(t,jh.basename(e)),n=yield Fh.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield Qe(t)}}yield Ze(jh.dirname(t)),yield Fh.rename(e,t)}))},Nh.rmRF=Qe;var Mh=Nh.mkdirP=Ze;Nh.which=function e(t,r){return kh(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(Fh.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]:""}))},Nh.findInPath=et;var Gh={exports:{}},Bh={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 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=Bh.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(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,Bh.exports);var Hh=Bh.exports;!function(e,t){var r=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=vn&&vn.__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=vn&&vn.__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(Hh),a=h(),c=dr,u=Gr,l=vr;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}}(Gh,Gh.exports);for(var qh=Gh.exports,Vh=br,zh=[],Xh=0;256>Xh;++Xh)zh[Xh]=(Xh+256).toString(16).substr(1);var Wh=function(){return Vh.randomBytes(16)},Yh=function(e,t){var r=t||0;return""+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]},Kh=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||Wh)();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||Yh(o)},Jh={},Qh={},Zh=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tm=vn&&vn.__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=vn&&vn.__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}),Qh.argStringToArray=Qh.ToolRunner=void 0;const nm=tm(dr),om=tm(Fr),im=tm(Gr),sm=tm(Or),am=tm(Nh),cm=tm(Ch),um=hn,lm="win32"===process.platform;Qh.ToolRunner=class extends om.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(lm)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(nm.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+nm.EOL.length),o=n.indexOf(nm.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return lm&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(lm&&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 rm(this,void 0,void 0,(function*(){return!cm.isRooted(this.toolPath)&&(this.toolPath.includes("/")||lm&&this.toolPath.includes("\\"))&&(this.toolPath=sm.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield am.which(this.toolPath,!0),new Promise(((e,t)=>rm(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)+nm.EOL);const n=new pm(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield cm.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=im.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)}}))))}))}},Qh.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 pm extends om.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(pm.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 fm=vn&&vn.__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]}),dm=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),hm=vn&&vn.__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)&&fm(t,e,r);return dm(t,e),t},mm=vn&&vn.__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(Jh,"__esModule",{value:!0});var vm=Jh.getExecOutput=Jh.exec=void 0;const ym=dn,gm=hm(Qh);var wm=Jh.exec=nt;vm=Jh.getExecOutput=function(e,t,r){var n,o;return mm(this,void 0,void 0,(function*(){let i="",s="";const a=new ym.StringDecoder("utf8"),c=new ym.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 Em={},_m=vn&&vn.__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]}),bm=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Om=vn&&vn.__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)&&_m(t,e,r);return bm(t,e),t},Rm=vn&&vn.__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(Em,"__esModule",{value:!0}),Em.RetryHelper=void 0;const Sm=Om(h());Em.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 Rm(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;Sm.info(n.message)}const o=this.getSleepAmount();Sm.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 Rm(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var Im=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xm=vn&&vn.__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 Tm(t,e),t},Pm=vn&&vn.__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())}))},Am=vn&&vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.evaluateVersions=Ah.isExplicitVersion=Ah.findFromManifest=Ah.getManifestFromRepo=Ah.findAllVersions=Km=Ah.find=Ah.cacheFile=Ym=Ah.cacheDir=Ah.extractZip=Ah.extractXar=Ah.extractTar=Ah.extract7z=Wm=Ah.downloadTool=Ah.HTTPError=void 0;const Nm=xm(h()),Cm=xm(Nh),$m=xm(vr),Lm=xm(qh),Dm=xm(dr),km=xm(Or),Um=xm(yo),jm=xm(Hh),Fm=xm(qr),Mm=xm(Mr),Gm=Br,Bm=Am(Kh),Hm=Jh,qm=Em;class Vm extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Ah.HTTPError=Vm;const zm="win32"===process.platform,Xm="darwin"===process.platform;var Wm=Ah.downloadTool=function(e,t,r,n){return Pm(this,void 0,void 0,(function*(){t=t||km.join(pt(),Bm.default()),yield Cm.mkdirP(km.dirname(t)),Nm.debug("Downloading "+e),Nm.debug("Destination "+t);const o=ft("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=ft("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new qm.RetryHelper(3,o,i);return yield s.execute((()=>Pm(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return Pm(this,void 0,void 0,(function*(){if($m.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new Um.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(Nm.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 Vm(i.message.statusCode);throw Nm.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=Mm.promisify(Fm.pipeline),a=ft("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,$m.createWriteStream(t)),Nm.debug("download complete"),c=!0,t}finally{if(!c){Nm.debug("download failed");try{yield Cm.rmRF(t)}catch(u){Nm.debug(`Failed to delete '${t}'. ${u.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof Vm&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))};Ah.extract7z=function(e,t,r){return Pm(this,void 0,void 0,(function*(){Gm.ok(zm,"extract7z() not supported on current OS"),Gm.ok(e,'parameter "file" is required'),t=yield it(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",Nm.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield Hm.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${km.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 Hm.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},Ah.extractTar=function(e,t,r="xz"){return Pm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield it(t),Nm.debug("Checking tar --version");let n="";yield Hm.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),Nm.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],Nm.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return zm&&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 Hm.exec("tar",i),t}))},Ah.extractXar=function(e,t,r=[]){return Pm(this,void 0,void 0,(function*(){let n;Gm.ok(Xm,"extractXar() not supported on current OS"),Gm.ok(e,'parameter "file" is required'),t=yield it(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),Nm.isDebug()&&n.push("-v");const o=yield Cm.which("xar",!0);var i;return yield Hm.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},Ah.extractZip=function(e,t){return Pm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield it(t),zm?yield function(e,t){return Pm(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(" ")];Nm.debug("Using pwsh at path: "+o),yield Hm.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);Nm.debug("Using powershell at path: "+t),yield Hm.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return Pm(this,void 0,void 0,(function*(){const r=yield Cm.which("unzip",!0),n=[e];Nm.isDebug()||n.unshift("-q"),n.unshift("-o"),yield Hm.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))};var Ym=Ah.cacheDir=function(e,t,r,n){return Pm(this,void 0,void 0,(function*(){if(r=jm.clean(r)||r,n=n||Dm.arch(),Nm.debug(`Caching tool ${t} ${r} ${n}`),Nm.debug("source dir: "+e),!$m.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield st(t,r,n);for(const t of $m.readdirSync(e)){const r=km.join(e,t);yield Cm.cp(r,o,{recursive:!0})}return at(t,r,n),o}))};Ah.cacheFile=function(e,t,r,n,o){return Pm(this,void 0,void 0,(function*(){if(n=jm.clean(n)||n,o=o||Dm.arch(),Nm.debug(`Caching tool ${r} ${n} ${o}`),Nm.debug("source file: "+e),!$m.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield st(r,n,o),s=km.join(i,t);return Nm.debug("destination file "+s),yield Cm.cp(e,s),at(r,n,o),i}))};var Km=Ah.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||Dm.arch(),ct(t)||(t=ut(ot(e,r),t));let n="";if(t){t=jm.clean(t)||"";const o=km.join(lt(),e,t,r);Nm.debug("checking cache: "+o),$m.existsSync(o)&&$m.existsSync(o+".complete")?(Nm.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):Nm.debug("not found")}return n};Ah.findAllVersions=ot,Ah.getManifestFromRepo=function(e,t,r,n="master"){return Pm(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new Um.HttpClient("tool-cache"),a={};r&&(Nm.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){Nm.debug("Invalid json")}}return o}))},Ah.findFromManifest=function(e,t,r,n=Dm.arch()){return Pm(this,void 0,void 0,(function*(){return yield Lm._findMatch(e,t,r,n)}))},Ah.isExplicitVersion=ct,Ah.evaluateVersions=ut;var Jm={};Object.defineProperty(Jm,"__esModule",{value:!0}),Jm.retryAsPromised=Jm.TimeoutError=void 0;let Qm=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};Jm.TimeoutError=Qm,Jm.retryAsPromised=dt;var Zm=Jm.default=dt;let ev;const tv=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||gr,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||wr,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||Er,e.mkdirSync=e.mkdirSync||r.mkdirSync||_r,t},rv=(e,t,r)=>{const n=Ir(e),o={...tv(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 rv(e,o,rv(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}}},nv=Object.assign((async(e,t,r)=>{const n=tv(t);n.recursive=!1;const o=Ir(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 nv(o,n).then((t=>nv(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:rv}),ov=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?ov(e,Ir(t),t):void 0))},iv=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?iv(e,Ir(t),t):void 0}},sv=(e,t)=>{const r=tv(t);if(r.recursive=!0,Ir(e)===e)return r.mkdirSync(e,r);const n=iv(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return rv(e,r);throw o}},av=Object.assign((async(e,t)=>{const r={...tv(t),recursive:!0};return Ir(e)===e?await r.mkdirAsync(e,r):ov(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return nv(e,r);throw t}))))}),{sync:sv}),cv=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=Cr(e),"win32"===cv){const t=/[*|"<>?:]/,{root:r}=$r(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},lv=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),pv=+lv[0]>10||10==+lv[0]&&+lv[1]>=12,fv=pv?e=>tv(e).mkdirSync===_r:()=>!1,dv=Object.assign(pv?e=>tv(e).mkdir===gr:()=>!1,{sync:fv}),hv=(e,t)=>{e=uv(e);const r=tv(t);return fv(r)?sv(e,r):rv(e,r)},mv=Object.assign((async(e,t)=>{e=uv(e);const r=tv(t);return dv(r)?av(e,r):nv(e,r)}),{mkdirpSync:hv,mkdirpNative:av,mkdirpNativeSync:sv,mkdirpManual:nv,mkdirpManualSync:rv,sync:hv,native:av,nativeSync:sv,manual:nv,manualSync:rv,useNative:dv,useNativeSync:fv}),vv=/v?(\d\S*)/,yv="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",gv={llvm:yv,clangtidy:yv,clangformat:yv,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"},wv={pip:"22.2.0",python:"3.7.9"},Ev={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"}},_v=Fl((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 vm(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Rr(r,"Scripts"),Rr(r,"Scripts","bin"),Rr(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var bv={};Object.defineProperty(bv,"__esModule",{value:!0});var Ov=bv.getUbuntuVersion=void 0;const Rv=Gr;Ov=bv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{Rv.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 Sv=Fl((async function(){try{if(De()){try{null===la.sync("lsb_release",{nothrow:!0})&&await Se([{name:"lsb-release"}])}catch{return Ct()}const e=await Ov();return 0===e.length?Ct():e}return null}catch(e){return v(""+e),null}}),{promise:!0}),Iv=Fl((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 mv(e),await mv(Rr(e,"trash")),await mv(Rr(e,"shared")),await mv(Rr(e,"venv")),e}),{promise:!0}),Tv=Fl((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,ly),await mv(e),e}),{promise:!0}),xv=Fl((async function(){const e=(await Rt(At("python",void 0,await Sv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),Pv=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"]]]),Av=Fl((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||nn.release()).split(".")[0];const[t,r]=Pv.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Nv="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url)),Cv="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url));class $v extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Lv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Dv=e=>void 0===globalThis.DOMException?new Lv(e):new DOMException(e),kv=e=>{const t=void 0===e.reason?Dv("This operation was aborted."):e.reason;return t instanceof Error?t:Dv(t)},Uv=h(),jv=Gr,Fv=vr,Mv=Or,Gv=ln,Bv=Gv.env["ProgramFiles(x86)"],Hv=[Gv.env["ProgramFiles(x86)"],Gv.env.ProgramFiles],qv=["Enterprise","Professional","Community","BuildTools"],Vv=["2022","2019","2017"],zv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Xv=Jt;const Wv=Bv+"\\Microsoft Visual Studio\\Installer";var Yv=Zt,Kv=function(e,t,r,n,o,i){if("win32"!=Gv.platform)return void Uv.info("This is not a Windows virtual environment, bye!");Gv.env.PATH+=Mv.delimiter+Wv;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=`"${Zt(i)}" ${a.join(" ")}`;Uv.debug("vcvars command-line: "+c);const u=(""+jv.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}Uv.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Uv.info("Setting "+e),er(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Uv.exportVariable(e,t))}Uv.endGroup(),Uv.info("Configured Developer Command Prompt")};const Jv=12e5;var Qv=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(Qv||{});const Zv="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url)),ey="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url)),ty=Fl((async function(e,t,r){const[n,o]=await Promise.all([ir(e,t,r),sr()]);return await ny(r),n}),{promise:!0}),ry=Fl((async function(e){De()?e>10?await Se([{name:"libtinfo-dev"}]):await Se([{name:"libtinfo5"}]):Le()?await Fe("ncurses5-compat-libs",void 0,"yay"):$e()&&await je([{name:"ncurses-compat-libs"}])}),{promise:!0}),ny=Fl((async function(e){"linux"===process.platform&&await Vt(At("gcc",void 0,await Sv()),"",e,40)}),{promise:!0}),oy="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url));let iy,sy=!1;const ay={nala:async function(e,t,r){if(!De())return;if("string"==typeof iy)return{binDir:iy};const n=la.sync("nala",{nothrow:!0});if(null!==n)return iy=Ir(n),{binDir:iy};await Se([{name:"python3-apt"}]),iy="/usr/bin";try{const t=await Oe({name:"nala",version:e});if(void 0!==t)return await Se([{name:t}]),{binDir:iy}}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:iy}}catch(o){g("Failed to install nala-legacy: "+o)}return await async function(){const e=new Hd.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",mr(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Rr(mr(),"install-nala.sh"),r=await Kr(t,"utf8");await Jr(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:iy}},cmake:bt,ninja:Xt,python:Rt,vcpkg:async function(e,t,r){return sy&&null!==la.sync("vcpkg",{nothrow:!0})?{binDir:Ir(la.sync("vcpkg"))}:("linux"===process.platform&&(Le()?await Promise.all([Fe("curl"),Fe("zip"),Fe("unzip"),Fe("tar"),Fe("git"),Fe("pkg-config")]):$e()?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(Rr(t,Xe("bootstrap-vcpkg",".bat")))?y(`Vcpkg folder already exists at ${t}. Skipping the clone`):P("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Ir(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,ly),sy=!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(Le())throw Error("installing bazel on Arch linux is not supported yet");if($e())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 $t("conan",e)},meson:function(e,t,r){return $t("meson",e)},gcovr:function(e,t,r){return $t("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,ly),e}()}},llvm:or,gcc:Vt,choco:ke,brew:Pe,powershell:async function(e,t,r){try{return await Et("pwsh",e,cr,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,ly),{binDir:t}}case"darwin":return Ce("powershell",e,{cask:!0,overwrite:!1});case"linux":if(Le())return Fe("powershell-bin",e,"yay");if($e())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 Sv();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 Ce("ccache",e);case"linux":if(Le())return Fe("ccache",e);if($e())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 Ce("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(Rr(e,"doxygen.exe")))return await ie(e,ly),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Ut(At("graphviz",void 0)),t}case"darwin":{const e=await Ce("doxygen",void 0);return Av()[0]>11&&await Ut(At("graphviz",void 0)),e}case"linux":{let o;if(""===e||Le()||$e())if(Le())o=await Fe("doxygen",e);else{if($e())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,Ft,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 Ut(At("graphviz",void 0,await Sv())),o}default:throw Error("Unsupported platform")}},graphviz:Ut,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,ly),e}()};case"darwin":return Ce("cppcheck",e);case"linux":if(Le())return Fe("cppcheck",e);if($e())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 ir(e,t,r)},clangformat:function(e,t,r){return ir(e,t,r,Qv.ClangFormat)},msvc:ar,vcvarsall:tr,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,Yt,t,r),a):(a=await Et("kcov",o,Wt,t,r),Le()?await Fe("binutils"):$e()?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 Ce("make",e);const t=Rr(Ne(),"opt/make/libexec/gnubin");return await ie(t,ly),{binDir:t}}case"linux":if(Le())return Fe("make",e);if($e())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,lr,t,r)},sevenzip:ht},cy=Object.keys(ay),uy=["compiler","architecture","timeout",...cy],ly={rcPath:ee("~/.cpprc"),guard:"cpp"};(async function(e){let t=Promise.resolve();yn.GITHUB_ACTIONS||(t=async function(){try{await Gd({pkg:Bd})}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:[...uy,"timeout"],default:Object.fromEntries(uy.map((e=>[e,pr(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=vp.create({autoloadLocales:!0});let c,u;vp.addLocale(yp),cp.addLocale(up);const l=await Sv();if(!function(e){const t=["llvm","clangtidy","clangformat"].filter((t=>void 0!==e[t])),r=t.filter((t=>!Nt(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,f=!1;for(const d of cy){if(yn.isCI&&0!==s.length){f=!0;break}const e=r[d];void 0!==e&&(c=Date.now(),p=await rr(d,e,l,n,o,i,s,6e4*Number.parseFloat(r.timeout??"20")),u=Date.now(),g("took "+(a.format(c,u)||"0 seconds")))}if(!f){const e=r.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i,s){try{const{compiler:a,version:c}=function(e){const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null!==Mp(e)||g(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}(e);switch(No.startGroup(`Installing ${a} ${c??""}`),a){case"llvm":case"clang":case"clang++":{const e=await or(At("llvm",c,t),Rr(r,"llvm"),n);await ne("GCOV","llvm-cov gcov",ly),o.push(fr("llvm",e));break}case"gcc":case"mingw":case"cygwin":case"msys":{const e=At("mingw"===a?"mingw":"gcc",c,t),s="mingw"===a?await async function(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return Vt(e,t,r);case"linux":Le()?n=await Fe("mingw-w64-gcc",e):$e()?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,Rr(r,"gcc"),n):await Vt(e,Rr(r,"gcc"),n);i&&await ne("CPPFLAGS","",ly),await function(e){const t=Mp(e),r=null!==t?zp(t):e;return ne("GCOV",""!==r?"gcov-"+r:"gcov",ly)}(e),o.push(fr("gcc",s));break}case"cl":case"msvc":case"msbuild":case"vs":case"visualstudio":case"visualcpp":case"visualc++":{const e=await ar(At("msvc",c,t),Rr(r,"msvc"),n);i&&await ne("CPPFLAGS","",ly),o.push(fr("msvc",e));break}case"appleclang":case"applellvm":No.notice("Assuming apple-clang is already installed"),await Promise.all([ne("CC","clang",ly),ne("CXX","clang++",ly)]),o.push(fr("apple-clang",void 0));break;default:s.push("Unsupported compiler "+a)}}catch(a){m(a),s.push("Failed to install the "+e)}No.endGroup()}(e,l,o,n,i,p,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 Bl(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await Hl(e.rcPath,r.join("\n")),await G(e.rcPath)}}(ly),0===i.length&&0===s.length)return v("setup-cpp was called without any arguments. Nothing to do."),0;for(const d of i)console.log(`${d}`);for(const d of s)m(d);if(g("setup-cpp finished"),!yn.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{Od as a,No as b,vn as c,wm as d,Jh as e,g as f,vm as g,yn as h,Nh as i,e as j,Z as p,h as r,Hh as s,co as t,Kh 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 Tn(e,t,r);process.stdout.write(""+n+Sn.EOL)}function n(){return An>Pn.length-16&&(br.randomFillSync(Pn),An=0),Pn.slice(An,An+=16)}function o(e){return"string"==typeof e&&Nn.test(e)}function i(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(!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 Yn(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new Yn("http://"+r)}}function u(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||Zn.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=Qn.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 _o||(_o=1,function(e){var t=vn&&vn.__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=dr,n=vr,{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}(Po)),Po}function h(){return Oo||(Oo=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=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=vn&&vn.__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=vn&&vn.__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=En,l=xn,p=_n,f=a(dr),m=a(Or),v=function(){if(go)return Wn;go=1;var e=vn&&vn.__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.OidcClient=void 0;const t=yo,n=wo,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 Wn.OidcClient=i,Wn}();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(bo)return Ao;bo=1;var e=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=vn&&vn.__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(Ao,"__esModule",{value:!0}),Ao.toPlatformPath=Ao.toWin32Path=Ao.toPosixPath=void 0;const n=r(Or);return Ao.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Ao.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Ao.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Ao}();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}})}(wn)),wn}function m(e){return yn.GITHUB_ACTIONS?No.error(e):console.log(`${e}`)}function v(e){return yn.GITHUB_ACTIONS?No.warning(e):console.log(`${e}`)}function y(e){return yn.GITHUB_ACTIONS?No.notice(e):console.log(`${e}`)}function g(e){return yn.GITHUB_ACTIONS?No.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)}))}))}xo(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=Vo.sync(e.command,{path:r[zo({env:r})],pathExt:t?qo.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=qo.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 oi&&1===e&&!t.file?_(t.original,"spawn"):null}function O(e,t,r){const n=si(e,t,r),o=ii.spawn(n.command,n.args,n.options);return ai.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=ls(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=as.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await ps(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new fs)}))})),n.getBufferedValue()}function x(e,t,r){const n=Us(e,t,r),o=As(e,t),i=Ns(e,t);let s;ks(i,n.options),ts(n.options);try{s=en.spawn(n.file,n.args,n.options)}catch(p){const e=new en.ChildProcess,t=Promise.reject(Si({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return Ss(e,t),e}const a=Is(s),c=es(s,n.options,a),u=rs(s,n.options,c);s.kill=Wi.bind(null,s.kill.bind(s)),s.cancel=Zi.bind(null,s,{isCanceled:!1});const l=vi((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,l,p]=await bs(s,n.options,u),f=js(n.options,c),d=js(n.options,l),h=js(n.options,p);if(e||0!==t||null!==r){const c=Si({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 gs(s,n.options),s.all=ws(s,n.options),os(s),Ss(s,l),s}function P(e,t,r){const n=Us(e,t,r),o=As(e,t),i=Ns(e,t);ks(i,n.options);const s=ys(n.options);let a;try{a=en.spawnSync(n.file,n.args,{...n.options,input:s})}catch(l){throw Si({error:l,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=js(n.options,a.stdout,a.error),u=js(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=Si({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===pa){const e=la.sync("pwsh",{nothrow:!0});null!==e&&(pa=e);const t=la.sync("powershell",{nothrow:!0});null!==t&&(pa=t)}if(void 0===pa)throw Error("Could not find powershell");return pa}(),[...t,"-c",e],r)}function N(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function C(){return null!==la.sync("sudo",{nothrow:!0})}function $(){return 0===process.getuid?.()||!!process.env.CI}function L(){return $()&&C()}function D(e){return L()?"sudo "+e:e}function k(e,t=[],r=ha){return L()?function(e,t){const[r,...n]=$s(e);return P(r,n,t)}(j(e,t),r):P(e,F(t),r)}function U(e,t=[],r=ha){return L()?function(e,t){const[r,...n]=$s(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?ma():$()}async function G(e){if(("linux"===process.platform||"darwin"===process.platform)&&L()&&void 0!==process.env.SUDO_USER){let t=vr.statSync(e).isDirectory();await U("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],ha)}}function B(){if(sc)return ic;sc=1;var e=Va,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return ic=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 jc?Uc:(jc=1,Uc=(Lc?$c:(Lc=1,$c=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(kc)return Dc;kc=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 Dc=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(qc)return Hc;qc=1;var e=Bc?Gc:(Bc=1,Gc=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return Hc=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function V(){return eu?Zc:(eu=1,Zc=function(){if(Mc)return Fc;Mc=1;var e=H(),t={object:!0,symbol:!0};return Fc=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(Qc)return Jc;Qc=1;var e,t,r,n=Pc,o=q(),i=H().Symbol,s=function(){if(zc)return Vc;zc=1;var e=Pc,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return Vc=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(Wc)return Xc;Wc=1;var e=Pc,t=H().Symbol;return Xc=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(Kc)return Yc;Kc=1;var e=Pc,t=q(),r=Object.create(null);return Yc=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)},Jc=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])),Jc}())}function z(){return lu?uu:(lu=1,uu=(Cc?Nc:(Cc=1,Nc=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(cu)return au;cu=1;var e=V().iterator,t=function(){if(ru)return tu;ru=1;var e={}.toString,t=e.call(function(){return arguments}());return tu=function(r){return e.call(r)===t}}(),r=function(){if(ou)return nu;ou=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return nu=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=Ma,o=Ha,i=Va,s=Na,a=function(){if(su)return iu;su=1;var e={}.toString,t=e.call("");return iu=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 au=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},au}())}function X(){if(Pu)return xu;Pu=1;var e=Tu?Iu:(Tu=1,Iu=(Ou?bu:(Ou=1,bu=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:Su?Ru:(Su=1,Ru=function(e){return e!=e})),t=Ma,r=Va,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return xu=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},xu}function W(){if(Uu)return ku;Uu=1;var e=Ha,t=Qa,r=function(){}.call;return ku=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},ku}function Y(){if(Fu)return ju;Fu=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 ju=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 qu?Hu:(qu=1,Hu=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,Al.exports=e,Al.exports.default=e),Al.exports}function Q(){if(el)return Pl;el=1;var e=W(),t=function(){if(Bu)return Gu;Bu=1;var e=[].forEach,t=Object.create;return Gu=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Gu}(),r=function(){if(Wu)return Xu;Wu=1;var e=Va,t=function(){if(zu)return Vu;zu=1;var e=K();return Vu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Xu=function(r){return t(e(r))}}(),n=function(){if(Qu)return Ju;Qu=1;var e=function(){if(Ku)return Yu;Ku=1;var e=K();return Yu=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return""}}}();return Ju=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]})))}))},Pl}async function Z(e){try{return await un.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?Rr("/Users/",process.env.SUDO_USER):Rr("/home/",process.env.SUDO_USER);{const e=hr();if(""===e)return;return e}}();return void 0===t?e:e.replace(Ml,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 Bl(e.rcPath,"utf8")).includes(t)||(await Gl(e.rcPath,`\n${t}\n`),g(`Added ${t} to ${e.rcPath}`)))}async function re(e,t){await Z(t)&&((await Bl(t,"utf-8")).includes(e)||(await Gl(t,e),g(`${e} was added to ${t}`)))}async function ne(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:ql,...r},o=function(e,t=!1){const r=t?Kl(e):e;return rp(r,'"',"\\")}(t??"",n.escapeSpace);try{if(yn.GITHUB_ACTIONS)try{if(!n.overwrite&&void 0!==process.env[e])return void g(`Environment variable ${e} is already defined. Skipping.`);No.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 Vl(r),void(r.overwrite?(await np(r.rcPath,`\nexport ${e}="${n}"\n`),g(`${e}="${n}" was added to "${r.rcPath}`)):(await np(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:ql,...t};if(!function(e){return!!ip.some((t=>t.test(e)))&&(process.env.PATH?.split(Sr)??[]).includes(e)}(e)){process.env.PATH=`${e}${Sr}${process.env.PATH}`;try{if(yn.GITHUB_ACTIONS)try{No.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 Vl(t),await op(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;mp[e]=r}}function ue(e,t,r){const n=function(e){const t=mp[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 pp.pluralize(r.locale,t,n[e]).replace("{0}",t)}function le(){if($f)return Cf;$f=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}}Cf=t;const r=new kf,n=Rp,o=pe(),i=Ep,s=Dp,{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:p}=_p,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=wp,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 Cf}function pe(){if(Df)return Lf;Df=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(">")))}}Lf=t;const r=Rp,{safeRe:n,t:o}=_p,i=Sf,s=Ep,a=Dp,c=le();return Lf}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){yn.GITHUB_ACTIONS?await async function(e,t,r=40){await U("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Vl(r),await qd(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!==la.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 Wd.NameDashVersion:return`${t}-${r}`;case Wd.NameEqualsVersion:return`${t}=${r}`;case Wd.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 Wd.NameDashVersion;try{const{stdout:n}=await x("apt-cache",["show",`${t}=${r}`],{env:ye(e)});if(""===n.trim())return Wd.NameEqualsVersion}catch{}}try{const{stdout:r}=await x("apt-cache",["show",t],{env:ye(e),stdio:"pipe"});if(""!==r.trim())return Wd.Name}catch{}return zd?Wd.None:(Xd(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&&Xd(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 Kd(t),await async function(e){await _e("software-properties-common")||k(e,["install","-y","--fix-broken","-o",Vd,"software-properties-common"],{...ha,env:ye(e)})}(t),k("add-apt-repository",["-y","--no-update",e],{...ha,env:ye(t)}),Xd.clear(),Xd(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 Kd(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=Rr(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],{...ha,env:ye(r)})}catch(o){if(!function(e){return"string"==typeof e.stderr}(o))throw o;Jd.some((e=>o.stderr.includes(e)))&&(v(`Failed to install packages ${n}. Retrying...`),k(r,["install","--fix-broken","-y","-o",Vd,...n],{...ha,env:ye(r)}))}return{binDir:"/usr/bin/"}}async function Ie({keyUrl:e,fileName:t,keyStorePath:r=Qd}){try{xe(t);const n=Rr(r,t);if(!(await Z(n))){Te(),await Se([{name:"ca-certificates"}]);const r=Rr(mr(),t),o=new Hd.DownloaderHelper(e,mr(),{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 eh)return{binDir:eh};const t=await la("brew",{nothrow:!0});if(null!==t)return eh=Ir(t),{binDir:eh};await Se([{name:"ca-certificates"}]);const r=new Hd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",mr(),{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"}}),eh=Ae(),await ie(eh,e.rcOptions),{binDir:eh}}function Ae(){return Rr(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 Ce(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};g(`Installing ${e} ${t??""} via brew`),ih&&null!==la.sync("brew",{nothrow:!0})||(await Pe(),ih=!0);const o=Ae(),i=Rr(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 $e(){return"linux"===process.platform&&(void 0===th&&(th=null!==la.sync("dnf",{nothrow:!0})),th)}function Le(){return"linux"===process.platform&&(void 0===rh&&(rh=null!==la.sync("pacman",{nothrow:!0})),rh)}function De(){return"linux"===process.platform&&(void 0===nh&&(nh=null!==la.sync("apt-get",{nothrow:!0})),nh)}async function ke(e,t,r){if("win32"!==process.platform)return;if("string"==typeof oh)return{binDir:oh};const n=la.sync("choco",{nothrow:!0});if(null!==n)return oh=Ir(n),{binDir:oh};let o="powershell.exe";const i=la.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,ly);const a=la.sync("choco",{nothrow:!0});return oh=null!==a?Ir(a):(process.env.ChocolateyInstall??"C:/ProgramData/chocolatey")+"/bin",await Z(oh)?{binDir:oh}:void 0}async function Ue(e,t,r=[]){g(`Installing ${e} ${t??""} via chocolatey`),sh&&null!==la.sync("choco",{nothrow:!0})||(await ke(0,0,process),sh=!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,ly),{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===la.sync("yay",{nothrow:!0}))try{k("pacman",["-S","--noconfirm","base-devel","git"]);const e=Rr(mr(),"yay");k("mkdir",["-p",e]),$()?(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']),lh=!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:mr()}),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.`)}}(),ah||"yay"===r||(k(n,["-Sy","--noconfirm"]),ah=!0),ch||"yay"===r||(k(n,["-S","--noconfirm","base-devel"]),ch=!0);const o=e=>"yay"===r?$()&&lh?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?Tr(e):Tr(e,xr(e))}function He(e){return Pr(e).replace(RegExp(Ee(Ar)+"$"),"")}function qe(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ve(e,t){const r=xr(e),n=`${t}${Tr(e,r)}${r}`;return Rr(Ir(e),n)}function ze(e,t){const r=xr(e),n=`${Tr(e,r)}${t}${r}`;return Rr(Ir(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=xr(e).length;return e.slice(0,-t)}function Ke(e,t){return fh(e,t)}function Je(e,t){const r=Nr(t,e);return!(!r||".."===r||r.startsWith(".."+Ar)||r===Cr(e))}function Qe(e){return kh(this,void 0,void 0,(function*(){if(Fh.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield Fh.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 kh(this,void 0,void 0,(function*(){Uh.ok(e,"a path argument must be provided"),yield Fh.mkdir(e,{recursive:!0})}))}function et(e){return kh(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(Fh.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(jh.delimiter))e&&t.push(e);if(Fh.isRooted(e)){const r=yield Fh.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(jh.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(jh.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield Fh.tryGetExecutablePath(jh.join(o,e),t);r&&n.push(r)}return n}))}function tt(e,t,r,n){return kh(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield Ze(t);const o=yield Fh.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield Fh.lstat(o)).isDirectory()?yield tt(o,s,r,n):yield rt(o,s,n)}yield Fh.chmod(t,(yield Fh.stat(e)).mode)}))}function rt(e,t,r){return kh(this,void 0,void 0,(function*(){if((yield Fh.lstat(e)).isSymbolicLink()){try{yield Fh.lstat(t),yield Fh.unlink(t)}catch(n){"EPERM"===n.code&&(yield Fh.chmod(t,"0666"),yield Fh.unlink(t))}const r=yield Fh.readlink(e);yield Fh.symlink(r,t,Fh.IS_WINDOWS?"junction":null)}else(yield Fh.exists(t))&&!r||(yield Fh.copyFile(e,t))}))}function nt(e,t,r){return mm(this,void 0,void 0,(function*(){const n=gm.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 gm.ToolRunner(o,t,r).exec()}))}function ot(e,t){const r=[];t=t||Dm.arch();const n=km.join(lt(),e);if($m.existsSync(n)){const e=$m.readdirSync(n);for(const o of e)if(ct(o)){const e=km.join(n,o,t||"");$m.existsSync(e)&&$m.existsSync(e+".complete")&&r.push(o)}}return r}function it(e){return Pm(this,void 0,void 0,(function*(){return e||(e=km.join(pt(),Bm.default())),yield Cm.mkdirP(e),e}))}function st(e,t,r){return Pm(this,void 0,void 0,(function*(){const n=km.join(lt(),e,jm.clean(t)||t,r||"");Nm.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=km.join(lt(),e,jm.clean(t)||t,r||"");$m.writeFileSync(n+".complete",""),Nm.debug("finished caching tool")}function ct(e){const t=jm.clean(e)||"";Nm.debug("isExplicit: "+t);const r=null!=jm.valid(t);return Nm.debug("explicit? "+r),r}function ut(e,t){let r="";Nm.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>jm.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(jm.satisfies(o,t)){r=o;break}}return Nm.debug(r?"matched: "+r:"match not found"),r}function lt(){const e=process.env.RUNNER_TOOL_CACHE||"";return Gm.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function pt(){const e=process.env.RUNNER_TEMP||"";return Gm.ok(e,"Expected RUNNER_TEMP to be defined"),e}function ft(e,t){const r=vn[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 Qm(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 Ce("p7zip",e);case"linux":if(Le())return Fe("p7zip",e);if($e())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===ev&&(null===la.sync("7z",{nothrow:!0})&&await ht("",0,process),ev="7z"),ev}(),["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!==la.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")):$e()?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")):$e()?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 Mh(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??mr(),process.env.RUNNER_TOOL_CACHE=process.env.RUNNER_TOOL_CACHE??Rr(mr(),"setup-cpp","hostedtoolcache");const{url:i,binRelativeDir:s,binFileName:a,extractedFolderName:c,extractFunction:u}=await r(t,process.platform,o);if(yn.GITHUB_ACTIONS)try{const r=Km(e,t);if(r){const n=Rr(r,c),o=Rr(n,s);if(await Z(Rr(o,a)))return g(`${e} ${t} was found in the cache at ${o}.`),await ie(o,ly),{installDir:n,binDir:o}}}catch{}const l=Rr(n,c),p=Rr(l,s),f=Rr(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=Rr(process.env.RUNNER_TEMP??mr(),`${Date.now()}-${Tr(r)}`);return Wm(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,ly),!(await Z(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await Wr(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){yn.GITHUB_ACTIONS&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==pr("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await Ym(e,t,r))}(n,e,t),{installDir:l,binDir:p}}function _t(e,t,r){const n=Nf(e)??e;switch(t){case"win32":{const t=gf(n,"v3.19.6");let o;Rh.includes(r)?o=t?"win64-x64":"windows-x86_64":Sh.includes(r)?o=t?"win32-x86":"windows-i386":Ih.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}-${gf(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=gf(n,"v3.19.8");let o;Ih.includes(r)?o=t?"Linux-aarch64":"linux-aarch64":Rh.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=vv){const n=await async function(e,t=vv){try{const r=await vm(e,["--version"]),n=r.stdout||r.stderr||"",o=n.trim().match(t)?.[1];return Nf(o)??void 0}catch(r){return void console.error(r)}}(e,r);return void 0!==n&&""!==t&&-1!==Qp(n,t)}async function Rt(e,t,r){const n=await async function(e,t,r){let n,o=await St(t);if(void 0!==o){const e=Ir(o);n={bin:o,installDir:e,binDir:e}}else{if(yn.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 St(t),void 0===o)throw Error("Python binary could not be found");const s=Ir(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 St(e);if(void 0===n)throw Error("Python binary could not be found");const o=Ir(n);await ie(o,ly),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await Ce("python3",t);const e=await x("brew",["--prefix","python"],{stdio:"pipe"}),n=Rr(e.stdout,"libexec","bin");await ie(n,ly);break}case"linux":if(Le())r=await Fe("python",t);else if($e())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 St(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:Ir(o),binDir:Ir(o)}}return n}(e,t,r);Br(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await Tt();return void 0===t?(g("pip was not found. Installing pip"),await async function(e){await Pt(e)||(await kt("pip"),await Pt(e))}(e),Tt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await Dt(e)))try{await Lt(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===kt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await x(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await Lt(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){v(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await Lt(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await Lt(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 St(e){for(const t of["python3","python"]){const r=await It(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=$r(hr()).root,t=(await Yr(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await It(t,Rr(e,r));if(void 0!==n)return n}}}async function It(e,t){try{if(void 0!==t){const r=Rr(t,qe(e));if(await Z(r)&&await Ot(r,wv.python))return r}const r=await la(e,{nothrow:!0,all:!0})??[];for(const e of r)if(await Ot(e,wv.python))return e}catch{}}async function Tt(){for(const e of["pip3","pip"]){const t=await xt(e);if(void 0!==t)return t}}async function xt(e){try{const t=await la(e,{nothrow:!0,all:!0})??[];for(const e of t)if(await Ot(e,wv.pip))return e}catch{}}async function Pt(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 At(e,t,r=null){return Nt(t)&&"linux"===process.platform&&null!==r&&e in Ev?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,Ev[e]):Nt(t)&&e in gv?gv[e]??"":"true"===t?"":t??""}function Nt(e){return"true"===e||void 0===e}function Ct(){if(!("version"in dr)||"function"!=typeof dr.version)return null;const e=dr.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 $t(e,t,r={}){return Lt(await xv(),e,t,r)}async function Lt(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await Dt(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{No.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 Iv(),l.PIPX_BIN_DIR=await Tv()),P(e,["-m",u,...o,...a,n],{stdio:"inherit",env:l})}catch(d){if(No.info(`Failed to install ${t} via ${u}: ${d}.`),null===await kt(t))throw Error(`Failed to install ${t} via ${u}: ${d}.`)}else if(null===await kt(t))throw Error(`Failed to install ${t} as it was not found via ${u} or the system package manager`);const p=await _v(e),f=await async function(e,t){const r=(await Promise.all(e.map((e=>Z(Rr(e,qe(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=la.sync(qe(t),{nothrow:!0});return null!==n?Ir(n):e[e.length-1]}(p,t);return await ie(f,ly),{binDir:f}}async function Dt(e){return 0===(await x(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function kt(e,t=!0){if("linux"===process.platform){if(No.info(`Installing ${e} via the system package manager`),Le())return Fe(t?"python-"+e:e);if($e())return je([{name:t?"python3-"+e:e}]);if(De())return Se([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return Ce(e);return null}async function Ut(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,ly),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return Ce("graphviz",e);case"linux":if(Le())return Fe("graphviz",e);if($e())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 jt(e,t){const{ArchiveHdi:r}=await import("./assets/hdi-CLiriP2M.mjs"),n=new r(e);await n.read((async e=>{await e.extract(Rr(t,e.path))}))}function Ft(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:jt,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Mt(){if("darwin"===process.platform)try{const e=await vm("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ne("SDKROOT",t.trim(),ly):m("SDKROOT not set")}catch(e){m(e)}}async function Gt(e){const t=await Kr(e,"utf-8");return JSON.parse(t)}function Bt(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=Ht(i,r,t);if(void 0!==n)return n}}function Ht(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 qt(e,t,r){if("win32"===t){const t=Bt(await Gt(Rr(Nv,"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 Vt(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,qt,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,ly)):"ia32"===t&&await Z("C:/tools/mingw32/bin")?(r="C:/tools/mingw32/bin",await ie(r,ly)):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 Ce("gcc",e);break;case"linux":"x64"===r?Le()?o=await Fe("gcc",e):$e()?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"),ly),ne("CXX",qe(t+"/g++"),ly));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 Yr(e)).sort(((e,t)=>function(e,t){const r=Nf(e),n=Nf(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=zp(Nf(o)??o);5>s?(n.push(ne("CC",`${t}/gcc-${o}`,ly),ne("CXX",`${t}/g++-${o}`,ly)),De()&&n.push(ve("cc",`${t}/gcc-${o}`,ly,r),ve("cxx",`${t}/g++-${o}`,ly,r),ve("gcc",`${t}/gcc-${o}`,ly,r),ve("g++",`${t}/g++-${o}`,ly,r))):(n.push(ne("CC",`${t}/gcc-${s}`,ly),ne("CXX",`${t}/g++-${s}`,ly)),De()&&n.push(ve("cc",`${t}/gcc-${s}`,ly,r),ve("cxx",`${t}/g++-${s}`,ly,r),ve("gcc",`${t}/gcc-${s}`,ly,r),ve("g++",`${t}/g++-${s}`,ly,r)))}n.push(Mt()),yn.GITHUB_ACTIONS&&await async function(){const e=Rr(Nv,"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 zt(e,t,r){const n=function(e,t){switch(e){case"win32":return Rh.includes(t)||Sh.includes(t)?"win":Ih.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return Rh.includes(t)||Sh.includes(t)?"linux":Ih.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 Xt(e,t,r){return Et("ninja",e,zt,t,r)}function Wt(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:qe("kcov")}}function Yt(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:qe("kcov"),extractFunction:Kt}}async function Kt(e,t){const r=await wt(e,t,1),n=await async function(){let e=la.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await bt(At("cmake",void 0,await Sv()),Rr(ee("~"),"cmake"),"");e=Rr(t,"cmake")}return null===la.sync("ninja",{nothrow:!0})&&await Xt(At("ninja",void 0,await Sv()),Rr(ee("~"),"ninja"),""),e}();"linux"===process.platform&&(Le()?await Promise.all([Fe("libdwarf"),Fe("libcurl-openssl")]):$e()?await je([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):De()&&await Se([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==la.sync("patch",{nothrow:!0})){const e=Rr(Cv,"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=Rr(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 Jt(e){return Object.values(zv).includes(e)?e:e in zv?zv[e]:e}function Qt(e){if(Object.keys(zv).includes(e))return e;for(const[t,r]of Object.entries(zv))if(r===e)return t;return e}function Zt(e){const t=Jt(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(""+jv.execSync(`vswhere -products * ${t} -prerelease -property installationPath`)).trim()+"\\VC\\Auxiliary\\Build\\vcvarsall.bat"}catch(r){Uv.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Fv.existsSync(n))return Uv.info("Found with vswhere: "+n),n;Uv.info("Not found with vswhere");const o=e?[Qt(e)]:Vv;for(const i of Hv)for(const e of o)for(const t of qv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,Uv.info("Trying standard location: "+n),Fv.existsSync(n))return Uv.info("Found standard location: "+n),n;if(Uv.info("Not found in standard locations"),n=Bv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Fv.existsSync(n))return Uv.info("Found VS 2015: "+n),n;throw Uv.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function er(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function tr(e,t,r,n,o,i,s){void 0!==t&&await Z(t)&&(g(`Adding ${t} to PATH`),await ne("VCTargetsPath",t,ly)),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 rr(e,t,r,n,o,i,s,a=Jv){No.startGroup(`Installing ${e} ${t}`);let c=!1;try{c=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(kv(e)),e.addEventListener("abort",(()=>{c(kv(e))}))}if(r===1/0)return void e.then(a,c);const u=new $v;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 tr(At(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await Pe({rcOptions:ly});else{const i=Rr(o,s?"llvm":e),c=At(e,t,r),u=ay[e];a=await u(c,i,n)}return i.push(fr(e,a)),s}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(u){m(u),u instanceof Error&&void 0!==u.stack&&m(u.stack),s.push(e+" failed to install")}return No.endGroup(),c}async function nr(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":Rh.includes(t)?r.push("win64"):Sh.includes(t)?r.push("win32"):Ih.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 Sv();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 $e()&&n.push("rhel");Rh.includes(t)?r.push("x86_64"):Sh.includes(t)?r.push("x86"):Ih.includes(t)?r.push("aarch64"):Th.includes(t)?r.push("armv7a"):xh.includes(t)?r.push("powerpc64le"):Ph.includes(t)?r.push("sparc64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),Rh.includes(t)?r.push("x86_64"):Ih.includes(t)?n.push("arm64"):(g(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),Rh.includes(t)?r.push("amd64"):Sh.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=Bt(await Gt(Rr(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=Bt(await Gt(Rr(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 or(e,t,r){const n=await ty(e,t,r);return await async function(e){const t=process.env.LD_LIBRARY_PATH??"",r=process.env.DYLD_LIBRARY_PATH??"",n=[ne("LLVM_PATH",e,ly),ne("LD_LIBRARY_PATH",`${e}/lib${Sr}${t}`,ly),ne("DYLD_LIBRARY_PATH",`${e}/lib${Sr}${r}`,ly),ne("LDFLAGS",`-L"${e}/lib"`,ly),ne("CPPFLAGS",`-I"${e}/include"`,ly),ne("CC",qe(e+"/bin/clang"),ly),ne("CXX",qe(e+"/bin/clang++"),ly),ne("LIBRARY_PATH",e+"/lib",ly),Mt()];if(De()){const t=60;n.push(ve("cc",e+"/bin/clang",ly,t),ve("cxx",e+"/bin/clang++",ly,t),ve("clang",e+"/bin/clang",ly),ve("clang++",e+"/bin/clang++",ly),ve("lld",e+"/bin/lld",ly),ve("ld.lld",e+"/bin/ld.lld",ly),ve("llvm-ar",e+"/bin/llvm-ar",ly))}await Promise.all(n)}(n.installDir??t),n}async function ir(e,t,r,n=Qv.All){const o=function(e){if(null===Mp(e))try{const t=Nf(e);if(null!==t)return g(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e),i=Number.parseInt(o.split(".")[0],10);try{if(De())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Se([{name:"ca-certificates"}]);const n=new Hd.DownloaderHelper("https://apt.llvm.org/llvm.sh",mr(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await Kr(n.getDownloadPath(),"utf-8"),i=Rr(mr(),"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 ${Vd} -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 ${Vd} -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)&&(mn("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return ge()?e.replace(/apt-get/g,"nala"):e}(o),await Jr(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Se(s),await Wr(i,"755"),await U("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:Jv}),await ie(r+"/bin",ly),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(i,n)}catch(a){g("Failed to install llvm via system package manager "+a)}const s=await Et("llvm",e,nr,t,r);return await ry(i),s}async function sr(){if(yn.GITHUB_ACTIONS){const e=Rr(ey,"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 ar(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Xv(e);g(`Checking if MSVC ${s} is already installed`);let a,c,u=!1;try{const e=Yv(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 tr(s,c,r,a,n,o,i),yn.GITHUB_ACTIONS&&await async function(){const e=Rr(oy,"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 cr(e,t,r){return{url:ur(t,r,e),binRelativeDir:"",binFileName:qe("pwsh"),extractedFolderName:""}}function ur(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 lr(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 pr(e){const t=No.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function fr(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 dr,{homedir as hr,tmpdir as mr}from"os";import vr,{promises as yr,mkdir as gr,stat as wr,statSync as Er,mkdirSync as _r}from"fs";import br from"crypto";import Or,{join as Rr,delimiter as Sr,dirname as Ir,basename as Tr,extname as xr,normalize as Pr,sep as Ar,relative as Nr,resolve as Cr,parse as $r}from"path";import*as Lr from"http";import Dr from"http";import*as kr from"https";import Ur from"https";import"net";import jr from"tls";import Fr from"events";import Mr from"util";import Gr from"child_process";import Br from"assert";import Hr from"buffer";import qr from"stream";import{debuglog as Vr}from"node:util";import zr from"node:process";import Xr,{chmod as Wr,readdir as Yr,readFile as Kr,writeFile as Jr}from"fs/promises";import{Buffer as Qr}from"node:buffer";import Zr from"node:path";import en,{ChildProcess as tn}from"node:child_process";import{fileURLToPath as rn}from"node:url";import nn,{constants as on}from"node:os";import{createWriteStream as sn,readFileSync as an,createReadStream as cn,promises as un}from"node:fs";import ln from"process";import pn,{fileURLToPath as fn}from"url";import dn from"string_decoder";import hn from"timers";import{info as mn}from"console";var vn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},yn={};const gn=[{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=gn,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))}(yn);var wn={},En={},_n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.toCommandProperties=_n.toCommandValue=void 0,_n.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},_n.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 bn=vn&&vn.__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]}),On=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Rn=vn&&vn.__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)&&bn(t,e,r);return On(t,e),t};Object.defineProperty(En,"__esModule",{value:!0}),En.issue=En.issueCommand=void 0;const Sn=Rn(dr),In=_n;En.issueCommand=r,En.issue=function(e,t=""){r(e,{},t)};class Tn{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,In.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 In.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var xn={};const Pn=new Uint8Array(256);let An=Pn.length;const Nn=/^(?:[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 fy=0;256>fy;++fy)Cn.push((fy+256).toString(16).substr(1));let $n,Ln,Dn=0,kn=0;const Un=a("v3",48,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),br.createHash("md5").update(e).digest()})),jn=a("v5",80,(function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),br.createHash("sha1").update(e).digest()})),Fn=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||$n,c=void 0!==e.clockseq?e.clockseq:Ln;if(null==a||null==c){const t=e.random||(e.rng||n)();null==a&&(a=$n=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==c&&(c=Ln=16383&(t[6]<<8|t[7]))}let u=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:kn+1;const p=u-Dn+(l-kn)/1e4;if(0>p&&void 0===e.clockseq&&(c=c+1&16383),(0>p||u>Dn)&&void 0===e.nsecs&&(l=0),l>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");Dn=u,kn=l,Ln=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:Un,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:jn,validate:o,version:function(e){if(!o(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},Symbol.toStringTag,{value:"Module"})),Mn=t(Fn);var Gn=vn&&vn.__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]}),Bn=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Hn=vn&&vn.__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)&&Gn(t,e,r);return Bn(t,e),t};Object.defineProperty(xn,"__esModule",{value:!0}),xn.prepareKeyValueMessage=xn.issueFileCommand=void 0;const qn=Hn(vr),Vn=Hn(dr),zn=Mn,Xn=_n;xn.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!qn.existsSync(r))throw Error("Missing file at path: "+r);qn.appendFileSync(r,`${Xn.toCommandValue(t)}${Vn.EOL}`,{encoding:"utf8"})},xn.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+zn.v4(),n=Xn.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}${Vn.EOL}${n}${Vn.EOL}${r}`};var Wn={};class Yn 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 Kn,Jn={},Qn=jr,Zn=Dr,eo=Ur,to=Fr,ro=Mr;Jn.httpOverHttp=function(e){var t=new u(e);return t.request=Zn.request,t},Jn.httpsOverHttp=function(e){var t=new u(e);return t.request=Zn.request,t.createSocket=l,t.defaultPort=443,t},Jn.httpOverHttps=function(e){var t=new u(e);return t.request=eo.request,t},Jn.httpsOverHttps=function(e){var t=new u(e);return t.request=eo.request,t.createSocket=l,t.defaultPort=443,t},ro.inherits(u,to.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?(Kn("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?(Kn("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)):(Kn("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")),Kn("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(),Kn("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)}))}},Kn=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(){},Jn.debug=Kn;var no,oo,io,so,ao,co=Jn;(oo=no||(no={}))[oo.OK=200]="OK",oo[oo.MultipleChoices=300]="MultipleChoices",oo[oo.MovedPermanently=301]="MovedPermanently",oo[oo.ResourceMoved=302]="ResourceMoved",oo[oo.SeeOther=303]="SeeOther",oo[oo.NotModified=304]="NotModified",oo[oo.UseProxy=305]="UseProxy",oo[oo.SwitchProxy=306]="SwitchProxy",oo[oo.TemporaryRedirect=307]="TemporaryRedirect",oo[oo.PermanentRedirect=308]="PermanentRedirect",oo[oo.BadRequest=400]="BadRequest",oo[oo.Unauthorized=401]="Unauthorized",oo[oo.PaymentRequired=402]="PaymentRequired",oo[oo.Forbidden=403]="Forbidden",oo[oo.NotFound=404]="NotFound",oo[oo.MethodNotAllowed=405]="MethodNotAllowed",oo[oo.NotAcceptable=406]="NotAcceptable",oo[oo.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",oo[oo.RequestTimeout=408]="RequestTimeout",oo[oo.Conflict=409]="Conflict",oo[oo.Gone=410]="Gone",oo[oo.TooManyRequests=429]="TooManyRequests",oo[oo.InternalServerError=500]="InternalServerError",oo[oo.NotImplemented=501]="NotImplemented",oo[oo.BadGateway=502]="BadGateway",oo[oo.ServiceUnavailable=503]="ServiceUnavailable",oo[oo.GatewayTimeout=504]="GatewayTimeout",(so=io||(io={})).Accept="accept",so.ContentType="content-type",(ao||(ao={})).ApplicationJson="application/json";const uo=[no.MovedPermanently,no.ResourceMoved,no.SeeOther,no.TemporaryRedirect,no.PermanentRedirect],lo=[no.BadGateway,no.ServiceUnavailable,no.GatewayTimeout],po=["OPTIONS","GET","DELETE","HEAD"];class fo extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,fo.prototype)}statusCode;result}class ho{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 mo=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),vo=Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return io},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[io.Accept]=this._getExistingOrDefaultHeader(t,io.Accept,ao.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[io.Accept]=this._getExistingOrDefaultHeader(r,io.Accept,ao.ApplicationJson),r[io.ContentType]=this._getExistingOrDefaultHeader(r,io.ContentType,ao.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[io.Accept]=this._getExistingOrDefaultHeader(r,io.Accept,ao.ApplicationJson),r[io.ContentType]=this._getExistingOrDefaultHeader(r,io.ContentType,ao.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[io.Accept]=this._getExistingOrDefaultHeader(r,io.Accept,ao.ApplicationJson),r[io.ContentType]=this._getExistingOrDefaultHeader(r,io.ContentType,ao.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&&po.includes(e)?this._maxRetries+1:1;let a,c=0;do{if(a=await this.requestRaw(i,r),a&&a.message&&a.message.statusCode===no.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&&uo.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||!lo.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 ho(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?kr:Lr;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({},mo(this.requestOptions.headers),mo(e||{})):mo(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=mo(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||Lr.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?co.httpsOverHttps:co.httpsOverHttp:s?co.httpOverHttps:co.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:i};t=o?new kr.Agent(e):new Lr.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===no.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 fo(e,o);t.result=i.result,n(t)}else r(i)}))}},HttpClientError:fo,HttpClientResponse:ho,get HttpCodes(){return no},get MediaTypes(){return ao},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"})),yo=t(vo);var go,wo={},Eo=vn&&vn.__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(wo,"__esModule",{value:!0}),wo.PersonalAccessTokenCredentialHandler=wo.BearerCredentialHandler=wo.BasicCredentialHandler=void 0,wo.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 Eo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},wo.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 Eo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},wo.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 Eo(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var _o,bo,Oo,Ro,So,Io,To,xo,Po={},Ao={},No=h(),Co={exports:{}};xo="win32"===process.platform||vn.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(So)return Ro;So=1,Ro=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=vr;return Ro}():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(To)return Io;To=1,Io=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=vr;return Io}();var $o=w;w.sync=function(e,t){try{return xo.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,Do=Or,ko=Lo?";":":",Uo=$o,jo=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Fo=(e,t)=>{const r=t.colon||ko,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}},Mo=(e,t,r)=>{"function"==typeof t&&(r=t,t={}),t||(t={});const{pathEnv:n,pathExt:o,pathExtExe:i}=Fo(e,t),s=[],a=r=>new Promise(((o,i)=>{if(r===n.length)return t.all&&s.length?o(s):i(jo(e));const a=n[r],u=/^".*"$/.test(a)?a.slice(1,-1):a,l=Do.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];Uo(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 Go=Mo;Mo.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=Fo(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],u=/^".*"$/.test(c)?c.slice(1,-1):c,l=Do.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(Uo.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 jo(e)};var Bo={exports:{}};const Ho=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};Bo.exports=Ho,Bo.exports.default=Ho;const qo=Or,Vo=Go,zo=Bo.exports;var Xo={};const Wo=/([()\][%!^"`<>&|;, *?])/g;Xo.command=function(e){return e.replace(Wo,"^$1")},Xo.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Wo,"^$1"),t&&(e=e.replace(Wo,"^$1")),e};const Yo=/^#!(.*)/,Ko=vr,Jo=Or,Qo=function(e){return E(e)||E(e,!0)},Zo=Xo,ei=function(e){const t=Buffer.alloc(150);let r;try{r=Ko.openSync(e,"r"),Ko.readSync(r,t,0,150,0),Ko.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(Yo);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},ti="win32"===process.platform,ri=/\.(?:com|exe)$/i,ni=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,oi="win32"===process.platform,ii=Gr,si=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(!ti)return e;const t=function(e){e.file=Qo(e);const t=e.file&&ei(e.file);return t?(e.args.unshift(e.file),e.command=t,Qo(e)):e.file}(e),r=!ri.test(t);if(e.options.forceShell||r){const r=ni.test(t);e.command=Jo.normalize(e.command),e.command=Zo.command(e.command),e.args=e.args.map((e=>Zo.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)},ai={hookChildProcess:function(e,t){if(!oi)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 oi&&1===e&&!t.file?_(t.original,"spawnSync"):null},notFoundError:_};Co.exports=O,Co.exports.spawn=O,Co.exports.sync=function(e,t,r){const n=si(e,t,r),o=ii.spawnSync(n.command,n.args,n.options);return o.error=o.error||ai.verifyENOENTSync(o.status,n),o},Co.exports._parse=si,Co.exports._enoent=ai;const ci=e(Co.exports),ui=({env:e=zr.env,...t}={})=>{const r=R({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=zr.cwd(),path:t=zr.env[R()],preferLocal:r=!0,execPath:n=zr.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?rn(e):e,s=Zr.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(Zr.join(t,"node_modules/.bin")),r=t,t=Zr.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?rn(t):t;e.push(Zr.resolve(r,n,".."))})(a,n,s),[...a,t].join(Zr.delimiter)})(t),e},li=(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);!pi(o,i)&&n||Object.defineProperty(e,r,i)},pi=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)},fi=(e,t)=>`/* Wrapped ${e}*/\n${t}`,di=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),hi=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),mi=new WeakMap,vi=(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(mi.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))li(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=fi.bind(null,n,""+t);Object.defineProperty(o,"name",hi),Object.defineProperty(e,"toString",{...di,value:o})})(e,t,n)}(i,e),mi.set(i,n),i};vi.callCount=e=>{if(!mi.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return mi.get(e)};const yi=(e,t)=>({name:"SIGRT"+(t+1),number:gi+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),gi=34,wi=[{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"}],Ei=()=>{const e=Array.from({length:64-gi+1},yi);return[...wi,...e].map(_i)},_i=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=on,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},bi=({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}],Oi=(()=>{const e=Ei();return Object.fromEntries(e.map(bi))})(),Ri=(e,t)=>{const r=t.find((({name:t})=>on.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=Ei(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=Ri(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 Si=({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=zr.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:Oi[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},Ii=["stdin","stdout","stderr"];var Ti,xi={exports:{}},Pi={exports:{}},Ai=vn.process;const Ni=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(Ni(Ai)){var Ci,$i=Br,Li=(Ti||(Ti=1,(zi=Pi).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&zi.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&zi.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),Pi.exports),Di=/^win/i.test(Ai.platform),ki=Fr;"function"!=typeof ki&&(ki=ki.EventEmitter),Ai.__signal_exit_emitter__?Ci=Ai.__signal_exit_emitter__:((Ci=Ai.__signal_exit_emitter__=new ki).count=0,Ci.emitted={}),Ci.infinite||(Ci.setMaxListeners(1/0),Ci.infinite=!0),xi.exports=function(e,t){if(!Ni(vn.process))return function(){};$i.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Mi&&Gi();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&&Ui()}};var Ui=function(){Mi&&Ni(vn.process)&&(Mi=!1,Li.forEach((function(e){try{Ai.removeListener(e,Fi[e])}catch(t){}})),Ai.emit=qi,Ai.reallyExit=Bi,Ci.count-=1)};xi.exports.unload=Ui;var ji=function(e,t,r){Ci.emitted[e]||(Ci.emitted[e]=!0,Ci.emit(e,t,r))},Fi={};Li.forEach((function(e){Fi[e]=function(){Ni(vn.process)&&Ai.listeners(e).length===Ci.count&&(Ui(),ji("exit",null,e),ji("afterexit",null,e),Di&&"SIGHUP"===e&&(e="SIGINT"),Ai.kill(Ai.pid,e))}})),xi.exports.signals=function(){return Li};var Mi=!1,Gi=function(){!Mi&&Ni(vn.process)&&(Mi=!0,Ci.count+=1,Li=Li.filter((function(e){try{return Ai.on(e,Fi[e]),!0}catch(t){return!1}})),Ai.emit=Vi,Ai.reallyExit=Hi)};xi.exports.load=Gi;var Bi=Ai.reallyExit,Hi=function(e){Ni(vn.process)&&(Ai.exitCode=e||0,ji("exit",Ai.exitCode,null),ji("afterexit",Ai.exitCode,null),Bi.call(Ai,Ai.exitCode))},qi=Ai.emit,Vi=function(e,t){if("exit"===e&&Ni(vn.process)){void 0!==t&&(Ai.exitCode=t);var r=qi.apply(this,arguments);return ji("exit",Ai.exitCode,null),ji("afterexit",Ai.exitCode,null),r}return qi.apply(this,arguments)}}else xi.exports=function(){return function(){}};var zi;const Xi=e(xi.exports),Wi=(e,t="SIGTERM",r={})=>{const n=e(t);return Yi(e,t,r,n),n},Yi=(e,t,r,n)=>{if(!Ki(t,r,n))return;const o=Qi(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},Ki=(e,{forceKillAfterTimeout:t},r)=>Ji(e)&&!1!==t&&r,Ji=e=>e===nn.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),Qi=({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},Zi=(e,t)=>{e.kill()&&(t.isCanceled=!0)},es=(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])},ts=({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})`)},rs=async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=Xi((()=>{e.kill()}));return n.finally((()=>{o()}))},ns=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(sn(r)),e;if(I(r))return e[t].pipe(r),e;if(!(e=>e instanceof tn&&"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},os=e=>{null!==e.stdout&&(e.pipeStdout=ns.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=ns.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=ns.bind(void 0,e,"all"))};var is={exports:{}};const{PassThrough:ss}=qr,{constants:as}=Hr,cs=qr,{promisify:us}=Mr,ls=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 ss({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},ps=us(cs.pipeline);class fs extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}is.exports=T,is.exports.buffer=(e,t)=>T(e,{...t,encoding:"buffer"}),is.exports.array=(e,t)=>T(e,{...t,array:!0}),is.exports.MaxBufferError=fs;const ds=e(is.exports),{PassThrough:hs}=qr,ms=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 hs({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})),vs=e=>{if(void 0!==e)throw new TypeError("The `input` and `inputFile` options cannot be both set.")},ys=e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(vs(e),an(t)))(e);if(S(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t},gs=(e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(vs(e),cn(t)))(t);void 0!==r&&(S(r)?r.pipe(e.stdin):e.stdin.end(r))},ws=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=ms();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r},Es=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},_s=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?ds(e,{encoding:t,maxBuffer:n}):ds.buffer(e,{maxBuffer:n})},bs=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},s)=>{const a=_s(e,{encoding:n,buffer:o,maxBuffer:i}),c=_s(t,{encoding:n,buffer:o,maxBuffer:i}),u=_s(r,{encoding:n,buffer:o,maxBuffer:2*i});try{return await Promise.all([s,a,c,u])}catch(l){return Promise.all([{error:l,signal:l.signal,timedOut:l.timedOut},Es(e,a),Es(t,c),Es(r,u)])}},Os=(async()=>{})().constructor.prototype,Rs=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(Os,e)])),Ss=(e,t)=>{for(const[r,n]of Rs){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},Is=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)}))})),Ts=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],xs=/^[\w.-]+$/,Ps=/"/g,As=(e,t)=>Ts(e,t).join(" "),Ns=(e,t)=>Ts(e,t).map((e=>(e=>"string"!=typeof e||xs.test(e)?e:`"${e.replace(Ps,'\\"')}"`)(e))).join(" "),Cs=/ +/g,$s=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},Ls=Vr("execa").enabled,Ds=(e,t)=>(e+"").padStart(t,"0"),ks=(e,{verbose:t})=>{t&&zr.stderr.write(`[${(()=>{const e=new Date;return`${Ds(e.getHours(),2)}:${Ds(e.getMinutes(),2)}:${Ds(e.getSeconds(),2)}.${Ds(e.getMilliseconds(),3)}`})()}] ${e}\n`)},Us=(e,t,r={})=>{const n=ci._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||zr.cwd(),execPath:zr.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:Ls,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...zr.env,...e}:e;return r?ui({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return Ii.map((t=>e[t]));if((e=>Ii.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+Ii.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,Ii.length)},((e,r)=>t[r]))})(r),"win32"===zr.platform&&"cmd"===Zr.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},js=(e,t,r)=>"string"==typeof t||Qr.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 Fs={},Ms={};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.sync=Ms.isexe=void 0;const Gs=vr,Bs=Xr;Ms.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Hs(await(0,Bs.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Ms.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Hs((0,Gs.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Hs=(e,t)=>e.isFile()&&qs(e,t),qs=(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 Vs={};Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.sync=Vs.isexe=void 0;const zs=vr,Xs=Xr;Vs.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ws(await(0,Xs.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Vs.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Ws((0,zs.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Ws=(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 Ys={};Object.defineProperty(Ys,"__esModule",{value:!0}),function(e){var t=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=vn&&vn.__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=vn&&vn.__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(Ms);e.posix=i;const s=n(Vs);e.win32=s,o(Ys,e);const a="win32"===(process.env._ISEXE_TEST_PLATFORM_||process.platform)?s:i;e.isexe=a.isexe,e.sync=a.sync}(Fs);const{isexe:Ks,sync:Js}=Fs,{join:Qs,delimiter:Zs,sep:ea,posix:ta}=Or,ra="win32"===process.platform,na=RegExp(`[${ta.sep}${ea===ta.sep?"":ea}]`.replace(/(\\)/g,"\\$1")),oa=RegExp("^\\."+na.source),ia=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),sa=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=Zs})=>{const o=e.match(na)?[""]:[...ra?[process.cwd()]:[],...(t||"").split(n)];if(ra){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:[""]}},aa=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&oa.test(t)?t.slice(0,2):"")+Qs(r,t)},ca=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=sa(e,t),i=[];for(const s of r){const r=aa(s,e);for(const e of n){const n=r+e;if(await Ks(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 ia(e)};var ua=ca;ca.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=sa(e,t),i=[];for(const s of r){const r=aa(s,e);for(const e of n){const n=r+e;if(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 ia(e)};const la=e(ua);let pa;var fa,da={};N(da,"hasSudo",(()=>C)),N(da,"isRoot",(()=>$)),N(da,"isSudo",(()=>L)),N(da,"prependSudo",(()=>D)),N(da,"defaultExecOptions",(()=>ha)),N(da,"execRootSync",(()=>k)),N(da,"execRoot",(()=>U));let ha={stdio:"inherit",shell:!0};N(fa={},"isAdminWindows",(()=>ma)),N(fa,"isAdminPosix",(()=>va)),N(fa,"isAdmin",(()=>M));let ma=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}}()}},va=$;N({},"grantUserWriteAccess",(()=>G));var ya,ga,wa,Ea,_a,ba,Oa,Ra,Sa,Ia,Ta,xa,Pa,Aa,Na=function(e){return null!=e},Ca=Na,$a=[].forEach,La=Object.create,Da=function(e){var t=La(null);return $a.call(arguments,(function(e){Ca(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},ka="function"==typeof(wa=Math.sign)&&1===wa(10)&&-1===wa(-20)?Math.sign:ga?ya:(ga=1,ya=function(e){return isNaN(e=+e)||0===e?e:e>0?1:-1}),Ua=Math.abs,ja=Math.floor,Fa=Math.max,Ma=function(e){return Fa(0,function(e){return isNaN(e)?0:0!=(e=+e)&&isFinite(e)?ka(e)*ja(Ua(e)):e}(e))},Ga=Ma,Ba=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&Ga(e)},Ha=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},qa=Na,Va=function(e){if(!qa(e))throw new TypeError("Cannot use null or undefined");return e},za=Ha,Xa=Va,Wa=function(){}.bind,Ya=function(){}.call,Ka=Object.keys,Ja={}.propertyIsEnumerable,Qa=(Ea="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(Xa(e)),za(t),r=Ka(e),o&&r.sort("function"==typeof o?Wa.call(o,e):void 0),"function"!=typeof Ea&&(Ea=r[Ea]),Ya.call(Ea,r,(function(r,o){return Ja.call(e,r)?Ya.call(t,n,e[r],r,e,o):undefined}))}),Za={},ec={exports:{}},tc="function"==typeof(Aa=Object.assign)&&(Aa(Pa={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Pa.foo+Pa.bar+Pa.trzy==="razdwatrzy")?Object.assign:function(){if(xa)return Ta;xa=1;var e=Ia?Sa:(Ia=1,Sa=(ba?_a:(ba=1,_a=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(Ra)return Oa;Ra=1;var e=Na,t=Object.keys;return Oa=function(r){return t(e(r)?Object(r):r)}}()),t=Va,r=Math.max;return Ta=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},Ta}(),rc=Na,nc={function:!0,object:!0},oc=function(e){return rc(e)&&nc[typeof e]||!1};!function(e){var t=tc,r=oc,n=Na,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}}(ec);var ic,sc,ac,cc,uc=ec.exports,lc={exports:{}},pc=Ma;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(py){}cc=B(),ac=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); };")}}(),lc.exports=function(e,t){var r;if(t=pc(t),e.length===t)return e;r=ac(t)(e);try{cc(r,e)}catch(py){}return r};var fc,dc,hc=lc.exports,mc={exports:{}},vc=function(e){return null!=e},yc=vc,gc={object:!0,function:!0,undefined:!0},wc=function(e){if(!function(e){return!!yc(e)&&hasOwnProperty.call(gc,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},Ec=/^\s*class[\s{/}]/,_c=function(){}.toString,bc="razdwatrzy",Oc="function"==typeof bc.contains&&!0===bc.contains("dwa")&&!1===bc.contains("foo")?"".contains:function(){if(dc)return fc;dc=1;var e="".indexOf;return fc=function(t){return e.call(this,t,arguments[1])>-1}}(),Rc=vc,Sc=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!wc(e)}(e)&&!Ec.test(_c.call(e))},Ic=tc,Tc=Da,xc=Oc;(mc.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],Rc(e)?(r=xc.call(e,"c"),n=xc.call(e,"e"),o=xc.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?Ic(Tc(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],Rc(t)?Sc(t)?Rc(r)?Sc(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,Rc(e)?(n=xc.call(e,"c"),o=xc.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?Ic(Tc(i),s):s};var Pc=mc.exports,Ac={exports:{}};!function(e,t){var r,n,o,i,s,a,c,u=Pc,l=Ha,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}(Ac,Ac.exports);var Nc,Cc,$c,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,su,au,cu,uu,lu,pu,fu=Ac.exports,du=z(),hu=Array.isArray,mu=Na,vu=Ha,yu=[].slice;pu=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(yu.call(e,this.length))};var gu,wu,Eu,_u,bu,Ou,Ru,Su,Iu,Tu,xu,Pu,Au,Nu,Cu,$u,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,il,sl,al,cl,ul,ll,pl=Ha,fl=uc,dl=hc,hl=Pc,ml=fu.methods,vl=function(e){return(t=e,e=hu(t)?t:du(t)).forEach((function(e){mu(e)&&vu(e)})),pu.bind(e);var t},yl=function(){}.apply,gl=function(){}.call,wl=Object.create,El=Object.defineProperties,_l=ml.on,bl=ml.emit,Ol=Ha,Rl=Qa,Sl=Za,Il=function(e,t,r){var n,o,i,s,a,c,u,l,p,f,d,h,m,v,y,g=wl(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:pl(e.get)},void 0!==e.set?(t.set=pl(e.set),e.delete&&(t.delete=pl(e.delete)),e.clear&&(t.clear=pl(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=vl(r.resolvers)),v=i?dl((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?gl.call(e,this,a[0]):yl.call(e,this,a),null===r){if(null!==(r=i(a)))throw fl("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(g,r))throw fl("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?yl.call(e,this,arguments):gl.call(e,this),hasOwnProperty.call(g,"data"))throw fl("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?gl.call(e,this,i[0]):yl.call(e,this,i),hasOwnProperty.call(g,o))throw fl("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=wl(null),n.emit("clear",e)},on:function(e,t){return"get"===e?d=!0:"set"===e?h=!0:"delete"===e&&(m=!0),_l.call(this,e,t)},emit:bl,updateEnv:function(){e=n.original}},u=i?dl((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=dl((function(){var e,r=arguments;return 0===t?g.data:(y&&(r=y(r)),e=i?i(r):r[0]+"",g[e])})),p=dl((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))})),El(v,{__memoized__:hl(!0),delete:hl(u),clear:hl(n.clear),_get:hl(l),_has:hl(p)}),n},Tl=Ba,xl={},Pl={},Al={exports:{}},Nl={},Cl={},$l={},Ll={},Dl=Da,kl=Ba,Ul=function e(t){var r,n,o;if(Ol(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=Tl(r.length,t.length,r.async&&Sl.async),o=Il(t,n,r),Rl(Sl,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},jl=function(e){var t,r=Dl(arguments[1]);return r.normalizer||0!==(t=r.length=kl(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(wu||(wu=1,gu=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),gu):t>1&&(r.normalizer=(_u||(_u=1,Eu=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),Eu)(t)):r.normalizer=!1===t?function(){if(Nu)return Au;Nu=1;var e=X(),t=Object.create;return Au=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)}}},Au}()():1===t?function(){if($u)return Cu;$u=1;var e=X();return Cu=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(Du)return Lu;Du=1;var e=X(),t=Object.create;return Lu=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)}}},Lu}()(t)),r.async&&function(){if(Mu)return xl;Mu=1;var e=z(),t=W(),r=B(),n=hc,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(py){}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(tl)return Nl;tl=1;var e=Ha,t=Qa,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(sl)return Cl;sl=1;var e=z(),t=Qa,r=Y(),n=J(),o=function(){if(il)return ol;il=1;var e=Ma,t=nl?rl:(nl=1,rl=2147483647);return ol=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(ul)return $l;ul=1;var e=Ma,t=function(){if(cl)return al;cl=1;var e=Ma,t=Object.create,r={}.hasOwnProperty;return al=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(ll)return Ll;ll=1;var e=Pc,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}))})}}(),Ul(e,r)};const Fl=e(jl),Ml=/^~(?=$|\/|\\)/,{appendFile:Gl,readFile:Bl,writeFile:Hl}=yr,ql=ee("~/.bashrc"),Vl=Fl((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}),zl=dr,Xl="win32"!==zl.platform(),Wl=zl.release(),Yl=/(\d+\.\d+)\.(\d+)/,Kl=e((function(e){return Xl?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&+t>=17134.1184)(...Yl.exec(Wl).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var Jl,Ql,Zl,ep,tp={exports:{}};Zl=function(){if(Ql)return Jl;Ql=1;var e=/[|\\{}()[\]^$+*?.]/g;return Jl=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),ep=function(e){return e.split("").reverse().join("")},tp.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"),ep(ep(e).replace(n,"$1"+r)))};const rp=e(tp.exports),{appendFile:np}=yr,{appendFile:op}=yr,ip=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var sp={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}}()}(sp);var ap=sp.exports,cp=ap,up={};ap.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 lp={exports:{}};lp.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);const pp=cp,fp=lp.exports,dp=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],hp={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},mp={};var vp={create:function(e){return e=Object.assign({},hp,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!mp[e]){if(!fp||!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 dp.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:hp};const yp=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 gp={exports:{}},wp={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},Ep="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}=wp,i=Ep,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*$")}(gp,gp.exports);var _p=gp.exports;const bp=Object.freeze({loose:!0}),Op=Object.freeze({});var Rp=e=>e?"object"!=typeof e?bp:e:Op;const Sp=/^[0-9]+$/,Ip=(e,t)=>{const r=Sp.test(e),n=Sp.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var Tp={compareIdentifiers:Ip,rcompareIdentifiers:(e,t)=>Ip(t,e)};const xp=Ep,{MAX_LENGTH:Pp,MAX_SAFE_INTEGER:Ap}=wp,{safeRe:Np,t:Cp}=_p,$p=Rp,{compareIdentifiers:Lp}=Tp;var Dp=class e{constructor(t,r){if(r=$p(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>Pp)throw new TypeError(`version is longer than ${Pp} characters`);xp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?Np[Cp.LOOSE]:Np[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>Ap||0>this.major)throw new TypeError("Invalid major version");if(this.minor>Ap||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>Ap||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&&Ap>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(xp("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)),Lp(this.major,t.major)||Lp(this.minor,t.minor)||Lp(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(xp("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 Lp(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(xp("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 Lp(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===Lp(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 kp=Dp;var Up=(e,t,r=!1)=>{if(e instanceof kp)return e;try{return new kp(e,t)}catch(n){if(!r)return null;throw n}};const jp=Up;var Fp=(e,t)=>{const r=jp(e,t);return r?r.version:null};const Mp=e(Fp),Gp=Up;const Bp=Dp;const Hp=Up;const qp=Dp;var Vp=(e,t)=>new qp(e,t).major;const zp=e(Vp),Xp=Dp;const Wp=Dp;const Yp=Up;const Kp=Dp;var Jp=(e,t,r)=>new Kp(e,r).compare(new Kp(t,r));const Qp=e(Jp),Zp=Jp;const ef=Jp;const tf=Dp;var rf=(e,t,r)=>{const n=new tf(e,r),o=new tf(t,r);return n.compare(o)||n.compareBuild(o)};const nf=rf;const of=rf;const sf=Jp;var af=(e,t,r)=>sf(e,t,r)>0;const cf=Jp;var uf=(e,t,r)=>0>cf(e,t,r);const lf=Jp;var pf=(e,t,r)=>0===lf(e,t,r);const ff=Jp;var df=(e,t,r)=>0!==ff(e,t,r);const hf=Jp;var mf=(e,t,r)=>hf(e,t,r)>=0;const vf=Jp;var yf=(e,t,r)=>0>=vf(e,t,r);const gf=e(yf),wf=pf,Ef=df,_f=af,bf=mf,Of=uf,Rf=yf;var Sf=(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 wf(e,r,n);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);default:throw new TypeError("Invalid operator: "+t)}};const If=Dp,Tf=Up,{safeRe:xf,t:Pf}=_p;var Af=(e,t)=>{if(e instanceof If)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?xf[Pf.COERCERTLFULL]:xf[Pf.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?xf[Pf.COERCEFULL]:xf[Pf.COERCE]);return null===r?null:Tf(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const Nf=e(Af);var Cf,$f,Lf,Df,kf=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 Uf=le();var jf=(e,t,r)=>{try{t=new Uf(t,r)}catch(n){return!1}return t.test(e)};const Ff=le();const Mf=Dp,Gf=le();const Bf=Dp,Hf=le();const qf=Dp,Vf=le(),zf=af;const Xf=le();const Wf=Dp,Yf=pe(),{ANY:Kf}=Yf,Jf=le(),Qf=jf,Zf=af,ed=uf,td=yf,rd=mf;var nd=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new Wf(e,n),t=new Jf(t,n),r){case">":o=Zf,i=td,s=ed,a=">",c=">=";break;case"<":o=ed,i=rd,s=Zf,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Qf(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===Kf&&(e=new Yf(">=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 od=nd;const id=nd;const sd=le();const ad=jf,cd=Jp,ud=le(),ld=pe(),{ANY:pd}=ld,fd=jf,dd=Jp,hd=[new ld(">=0.0.0-0")],md=[new ld(">=0.0.0")],vd=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===pd){if(1===t.length&&t[0].semver===pd)return!0;e=r.includePrerelease?hd:md}if(1===t.length&&t[0].semver===pd){if(r.includePrerelease)return!0;t=md}const n=new Set;let o,i,s,a,c,u,l;for(const d of e)">"===d.operator||">="===d.operator?o=yd(o,d,r):"<"===d.operator||"<="===d.operator?i=gd(i,d,r):n.add(d.semver);if(n.size>1)return null;if(o&&i){if(s=dd(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&&!fd(d,o+"",r))return null;if(i&&!fd(d,i+"",r))return null;for(const e of t)if(!fd(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=yd(o,d,r),a===d&&a!==o)return!1}else if(">="===o.operator&&!fd(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=gd(i,d,r),c===d&&c!==i)return!1}else if("<="===i.operator&&!fd(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)},yd=(e,t,r)=>{if(!e)return t;const n=dd(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},gd=(e,t,r)=>{if(!e)return t;const n=dd(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const wd=_p,Ed=wp,_d=Dp,bd=Tp;var Od={parse:Up,valid:Fp,clean:(e,t)=>{const r=Gp(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 Bp(e instanceof Bp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=Hp(e,null,!0),n=Hp(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:Vp,minor:(e,t)=>new Xp(e,t).minor,patch:(e,t)=>new Wp(e,t).patch,prerelease:(e,t)=>{const r=Yp(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:Jp,rcompare:(e,t,r)=>Zp(t,e,r),compareLoose:(e,t)=>ef(e,t,!0),compareBuild:rf,sort:(e,t)=>e.sort(((e,r)=>nf(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>of(r,e,t))),gt:af,lt:uf,eq:pf,neq:df,gte:mf,lte:yf,cmp:Sf,coerce:Af,Comparator:pe(),Range:le(),satisfies:jf,toComparators:(e,t)=>new Ff(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 Gf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Mf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Hf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new Bf(n,r)))})),n},minVersion:(e,t)=>{e=new Vf(e,t);let r=new qf("0.0.0");if(e.test(r))return r;if(r=new qf("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 qf(e.semver.version);switch(e.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":t&&!zf(r,t)||(t=r);break;case"<":case"<=":break;default:throw Error("Unexpected operation: "+e.operator)}})),!t||r&&!zf(r,t)||(r=t)}return r&&e.test(r)?r:null},validRange:(e,t)=>{try{return new Xf(e,t).range||"*"}catch(r){return null}},outside:nd,gtr:(e,t,r)=>od(e,t,">",r),ltr:(e,t,r)=>id(e,t,"<",r),intersects:(e,t,r)=>(e=new sd(e,r),t=new sd(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>cd(e,t,r)));for(const u of s)ad(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 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=vd(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:_d,re:wd.re,src:wd.src,tokens:wd.t,SEMVER_SPEC_VERSION:Ed.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ed.RELEASE_TYPES,compareIdentifiers:bd.compareIdentifiers,rcompareIdentifiers:bd.rcompareIdentifiers},Rd=Od,Sd=dr,Id=Or,Td=vr,xd=Ur,Pd=ln.env.npm_package_json,Ad=ln.env.npm_config_user_agent,Nd=!(!Ad||!Ad.startsWith("npm")),Cd=!(!Pd||!Pd.endsWith("package.json")),$d=Nd||Cd,Ld=!(!Ad||!Ad.startsWith("yarn")),Dd=$d||Ld,kd=Sd.homedir(),Ud=process.env.XDG_CONFIG_HOME||Id.join(kd,".config","simple-update-notifier"),jd=function(e){return Id.join(Ud,"".concat(e.replace("@","").replace("/","__"),".json"))},Fd=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){xd.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)}))}))]}))}))},Md=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 Td.existsSync(Ud)||Td.mkdirSync(Ud,{recursive:!0}),r=function(t){var r=jd(t);try{if(!Td.existsSync(r))return;return JSON.parse(Td.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,Fd(t.name,i)]:[3,2];case 1:return o=c.sent(),u=jd(t.name),Td.writeFileSync(u,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),Rd.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 Gd=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||Dd&&!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,Md(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]}}))}))})),Bd={name:"setup-cpp",version:"0.41.0"};var Hd={};!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(vr),s=pn,a=t(Or),c=t(Dr),u=t(Ur),l=Fr,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)}(Hd);const{appendFile:qd}=yr,Vd="Dpkg::Lock::Timeout=300";let zd=!1;const Xd=Fl((function(e=we()){k(e,"nala"!==e?["update","-y","-o",Vd]:["update","-o",Vd],{...ha,env:ye(e)}),zd=!0}));var Wd,Yd;(Yd=Wd||(Wd={}))[Yd.NameDashVersion=0]="NameDashVersion",Yd[Yd.NameEqualsVersion=1]="NameEqualsVersion",Yd[Yd.Name=2]="Name",Yd[Yd.None=3]="None";const Kd=Fl((async function(e){Xd(e);const t=await be([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&k(e,["install","-y","--fix-broken","-o",Vd,...t],{...ha,env:ye(e)})}),{promise:!0}),Jd=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],Qd="/etc/apt/trusted.gpg.d",Zd="keyserver.ubuntu.com";let eh,th,rh,nh,oh,ih=!1,sh=!1,ah=!1,ch=!1;const uh=/Version\s*:\s*(.*)/g;let lh=!1;var ph=Or;const fh=e((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=ph.basename(e,ph.extname(e))+t,o=ph.join(ph.dirname(e),n);return(r=e.slice(0,2))==="."+ph.sep||"./"===r?"."+ph.sep+o:o}));var dh={},hh={};Ge(hh,"name",(()=>Be));var mh={};Ge(mh,"normalizeTrim",(()=>He));var vh={};Ge(vh,"addExeExt",(()=>qe));var yh={};Ge(yh,"addNamePrefix",(()=>Ve));var gh={};Ge(gh,"addNameSuffix",(()=>ze));var wh={};Ge(wh,"addShExt",(()=>Xe));var Eh={};Ge(Eh,"addShRelativePrefix",(()=>We));var _h={};Ge(_h,"removeExt",(()=>Ye));var bh={};Ge(bh,"replaceExt",(()=>Ke));var Oh={};Ge(Oh,"isPathInside",(()=>Je)),Me(dh,hh),Me(dh,mh),Me(dh,vh),Me(dh,yh),Me(dh,gh),Me(dh,wh),Me(dh,Eh),Me(dh,_h),Me(dh,bh),Me(dh,Oh);const Rh=["x64","amd64","x86_64","win64","64"],Sh=["x86","i386","ia32","win32","32","x32"],Ih=["aarch64","arm64","woa64","arm"],Th=["armv7","armv7a"],xh=["powerpc64le","ppc64le"],Ph=["sparc64"];var Ah={},Nh={},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=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=vn&&vn.__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=vn&&vn.__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(vr),c=i(Or);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 $h=vn&&vn.__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]}),Lh=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Dh=vn&&vn.__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)&&$h(t,e,r);return Lh(t,e),t},kh=vn&&vn.__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(Nh,"__esModule",{value:!0}),Nh.findInPath=Nh.which=Mh=Nh.mkdirP=Nh.rmRF=Nh.mv=Nh.cp=void 0;const Uh=Br,jh=Dh(Or),Fh=Dh(Ch);Nh.cp=function(e,t,r={}){return kh(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 Fh.exists(t))?yield Fh.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?jh.join(t,jh.basename(e)):t;if(!(yield Fh.exists(e)))throw Error("no such file or directory: "+e);if((yield Fh.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(""===jh.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield rt(e,a,n)}}))},Nh.mv=function(e,t,r={}){return kh(this,void 0,void 0,(function*(){if(yield Fh.exists(t)){let n=!0;if((yield Fh.isDirectory(t))&&(t=jh.join(t,jh.basename(e)),n=yield Fh.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield Qe(t)}}yield Ze(jh.dirname(t)),yield Fh.rename(e,t)}))},Nh.rmRF=Qe;var Mh=Nh.mkdirP=Ze;Nh.which=function e(t,r){return kh(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(Fh.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]:""}))},Nh.findInPath=et;var Gh={exports:{}},Bh={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 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=Bh.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(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,Bh.exports);var Hh=Bh.exports;!function(e,t){var r=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=vn&&vn.__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=vn&&vn.__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(Hh),a=h(),c=dr,u=Gr,l=vr;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}}(Gh,Gh.exports);for(var qh=Gh.exports,Vh=br,zh=[],Xh=0;256>Xh;++Xh)zh[Xh]=(Xh+256).toString(16).substr(1);var Wh=function(){return Vh.randomBytes(16)},Yh=function(e,t){var r=t||0;return""+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+"-"+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]+zh[e[r++]]},Kh=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||Wh)();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||Yh(o)},Jh={},Qh={},Zh=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),tm=vn&&vn.__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=vn&&vn.__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}),Qh.argStringToArray=Qh.ToolRunner=void 0;const nm=tm(dr),om=tm(Fr),im=tm(Gr),sm=tm(Or),am=tm(Nh),cm=tm(Ch),um=hn,lm="win32"===process.platform;Qh.ToolRunner=class extends om.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(lm)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(nm.EOL);for(;o>-1;)r(n.substring(0,o)),n=n.substring(o+nm.EOL.length),o=n.indexOf(nm.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return lm&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(lm&&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 rm(this,void 0,void 0,(function*(){return!cm.isRooted(this.toolPath)&&(this.toolPath.includes("/")||lm&&this.toolPath.includes("\\"))&&(this.toolPath=sm.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield am.which(this.toolPath,!0),new Promise(((e,t)=>rm(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)+nm.EOL);const n=new pm(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield cm.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const o=this._getSpawnFileName(),i=im.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)}}))))}))}},Qh.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 pm extends om.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(pm.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 fm=vn&&vn.__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]}),dm=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),hm=vn&&vn.__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)&&fm(t,e,r);return dm(t,e),t},mm=vn&&vn.__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(Jh,"__esModule",{value:!0});var vm=Jh.getExecOutput=Jh.exec=void 0;const ym=dn,gm=hm(Qh);var wm=Jh.exec=nt;vm=Jh.getExecOutput=function(e,t,r){var n,o;return mm(this,void 0,void 0,(function*(){let i="",s="";const a=new ym.StringDecoder("utf8"),c=new ym.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 Em={},_m=vn&&vn.__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]}),bm=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Om=vn&&vn.__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)&&_m(t,e,r);return bm(t,e),t},Rm=vn&&vn.__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(Em,"__esModule",{value:!0}),Em.RetryHelper=void 0;const Sm=Om(h());Em.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 Rm(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;Sm.info(n.message)}const o=this.getSleepAmount();Sm.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 Rm(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var Im=vn&&vn.__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=vn&&vn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),xm=vn&&vn.__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 Tm(t,e),t},Pm=vn&&vn.__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())}))},Am=vn&&vn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ah,"__esModule",{value:!0}),Ah.evaluateVersions=Ah.isExplicitVersion=Ah.findFromManifest=Ah.getManifestFromRepo=Ah.findAllVersions=Km=Ah.find=Ah.cacheFile=Ym=Ah.cacheDir=Ah.extractZip=Ah.extractXar=Ah.extractTar=Ah.extract7z=Wm=Ah.downloadTool=Ah.HTTPError=void 0;const Nm=xm(h()),Cm=xm(Nh),$m=xm(vr),Lm=xm(qh),Dm=xm(dr),km=xm(Or),Um=xm(yo),jm=xm(Hh),Fm=xm(qr),Mm=xm(Mr),Gm=Br,Bm=Am(Kh),Hm=Jh,qm=Em;class Vm extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}Ah.HTTPError=Vm;const zm="win32"===process.platform,Xm="darwin"===process.platform;var Wm=Ah.downloadTool=function(e,t,r,n){return Pm(this,void 0,void 0,(function*(){t=t||km.join(pt(),Bm.default()),yield Cm.mkdirP(km.dirname(t)),Nm.debug("Downloading "+e),Nm.debug("Destination "+t);const o=ft("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=ft("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new qm.RetryHelper(3,o,i);return yield s.execute((()=>Pm(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return Pm(this,void 0,void 0,(function*(){if($m.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new Um.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(Nm.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 Vm(i.message.statusCode);throw Nm.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=Mm.promisify(Fm.pipeline),a=ft("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,$m.createWriteStream(t)),Nm.debug("download complete"),c=!0,t}finally{if(!c){Nm.debug("download failed");try{yield Cm.rmRF(t)}catch(u){Nm.debug(`Failed to delete '${t}'. ${u.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof Vm&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))};Ah.extract7z=function(e,t,r){return Pm(this,void 0,void 0,(function*(){Gm.ok(zm,"extract7z() not supported on current OS"),Gm.ok(e,'parameter "file" is required'),t=yield it(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",Nm.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield Hm.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${km.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 Hm.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},Ah.extractTar=function(e,t,r="xz"){return Pm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield it(t),Nm.debug("Checking tar --version");let n="";yield Hm.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),Nm.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],Nm.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return zm&&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 Hm.exec("tar",i),t}))},Ah.extractXar=function(e,t,r=[]){return Pm(this,void 0,void 0,(function*(){let n;Gm.ok(Xm,"extractXar() not supported on current OS"),Gm.ok(e,'parameter "file" is required'),t=yield it(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),Nm.isDebug()&&n.push("-v");const o=yield Cm.which("xar",!0);var i;return yield Hm.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},Ah.extractZip=function(e,t){return Pm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield it(t),zm?yield function(e,t){return Pm(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(" ")];Nm.debug("Using pwsh at path: "+o),yield Hm.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);Nm.debug("Using powershell at path: "+t),yield Hm.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return Pm(this,void 0,void 0,(function*(){const r=yield Cm.which("unzip",!0),n=[e];Nm.isDebug()||n.unshift("-q"),n.unshift("-o"),yield Hm.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))};var Ym=Ah.cacheDir=function(e,t,r,n){return Pm(this,void 0,void 0,(function*(){if(r=jm.clean(r)||r,n=n||Dm.arch(),Nm.debug(`Caching tool ${t} ${r} ${n}`),Nm.debug("source dir: "+e),!$m.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield st(t,r,n);for(const t of $m.readdirSync(e)){const r=km.join(e,t);yield Cm.cp(r,o,{recursive:!0})}return at(t,r,n),o}))};Ah.cacheFile=function(e,t,r,n,o){return Pm(this,void 0,void 0,(function*(){if(n=jm.clean(n)||n,o=o||Dm.arch(),Nm.debug(`Caching tool ${r} ${n} ${o}`),Nm.debug("source file: "+e),!$m.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield st(r,n,o),s=km.join(i,t);return Nm.debug("destination file "+s),yield Cm.cp(e,s),at(r,n,o),i}))};var Km=Ah.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||Dm.arch(),ct(t)||(t=ut(ot(e,r),t));let n="";if(t){t=jm.clean(t)||"";const o=km.join(lt(),e,t,r);Nm.debug("checking cache: "+o),$m.existsSync(o)&&$m.existsSync(o+".complete")?(Nm.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):Nm.debug("not found")}return n};Ah.findAllVersions=ot,Ah.getManifestFromRepo=function(e,t,r,n="master"){return Pm(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new Um.HttpClient("tool-cache"),a={};r&&(Nm.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){Nm.debug("Invalid json")}}return o}))},Ah.findFromManifest=function(e,t,r,n=Dm.arch()){return Pm(this,void 0,void 0,(function*(){return yield Lm._findMatch(e,t,r,n)}))},Ah.isExplicitVersion=ct,Ah.evaluateVersions=ut;var Jm={};Object.defineProperty(Jm,"__esModule",{value:!0}),Jm.retryAsPromised=Jm.TimeoutError=void 0;let Qm=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};Jm.TimeoutError=Qm,Jm.retryAsPromised=dt;var Zm=Jm.default=dt;let ev;const tv=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||gr,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||wr,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||Er,e.mkdirSync=e.mkdirSync||r.mkdirSync||_r,t},rv=(e,t,r)=>{const n=Ir(e),o={...tv(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 rv(e,o,rv(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}}},nv=Object.assign((async(e,t,r)=>{const n=tv(t);n.recursive=!1;const o=Ir(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 nv(o,n).then((t=>nv(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:rv}),ov=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?ov(e,Ir(t),t):void 0))},iv=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?iv(e,Ir(t),t):void 0}},sv=(e,t)=>{const r=tv(t);if(r.recursive=!0,Ir(e)===e)return r.mkdirSync(e,r);const n=iv(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return rv(e,r);throw o}},av=Object.assign((async(e,t)=>{const r={...tv(t),recursive:!0};return Ir(e)===e?await r.mkdirAsync(e,r):ov(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return nv(e,r);throw t}))))}),{sync:sv}),cv=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=Cr(e),"win32"===cv){const t=/[*|"<>?:]/,{root:r}=$r(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},lv=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),pv=+lv[0]>10||10==+lv[0]&&+lv[1]>=12,fv=pv?e=>tv(e).mkdirSync===_r:()=>!1,dv=Object.assign(pv?e=>tv(e).mkdir===gr:()=>!1,{sync:fv}),hv=(e,t)=>{e=uv(e);const r=tv(t);return fv(r)?sv(e,r):rv(e,r)},mv=Object.assign((async(e,t)=>{e=uv(e);const r=tv(t);return dv(r)?av(e,r):nv(e,r)}),{mkdirpSync:hv,mkdirpNative:av,mkdirpNativeSync:sv,mkdirpManual:nv,mkdirpManualSync:rv,sync:hv,native:av,nativeSync:sv,manual:nv,manualSync:rv,useNative:dv,useNativeSync:fv}),vv=/v?(\d\S*)/,yv="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",gv={llvm:yv,clangtidy:yv,clangformat:yv,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"},wv={pip:"22.2.0",python:"3.7.9"},Ev={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"}},_v=Fl((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 vm(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Rr(r,"Scripts"),Rr(r,"Scripts","bin"),Rr(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var bv={};Object.defineProperty(bv,"__esModule",{value:!0});var Ov=bv.getUbuntuVersion=void 0;const Rv=Gr;Ov=bv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{Rv.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 Sv=Fl((async function(){try{if(De()){try{null===la.sync("lsb_release",{nothrow:!0})&&await Se([{name:"lsb-release"}])}catch{return Ct()}const e=await Ov();return 0===e.length?Ct():e}return null}catch(e){return v(""+e),null}}),{promise:!0}),Iv=Fl((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 mv(e),await mv(Rr(e,"trash")),await mv(Rr(e,"shared")),await mv(Rr(e,"venv")),e}),{promise:!0}),Tv=Fl((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,ly),await mv(e),e}),{promise:!0}),xv=Fl((async function(){const e=(await Rt(At("python",void 0,await Sv()),"",process.arch)).bin;if(void 0===e)throw Error("Python binary was not found");return e}),{promise:!0}),Pv=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"]]]),Av=Fl((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=+(e||nn.release()).split(".")[0];const[t,r]=Pv.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),Nv="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url)),Cv="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url));class $v extends Error{constructor(e){super(e),this.name="TimeoutError"}}class Lv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Dv=e=>void 0===globalThis.DOMException?new Lv(e):new DOMException(e),kv=e=>{const t=void 0===e.reason?Dv("This operation was aborted."):e.reason;return t instanceof Error?t:Dv(t)},Uv=h(),jv=Gr,Fv=vr,Mv=Or,Gv=ln,Bv=Gv.env["ProgramFiles(x86)"],Hv=[Gv.env["ProgramFiles(x86)"],Gv.env.ProgramFiles],qv=["Enterprise","Professional","Community","BuildTools"],Vv=["2022","2019","2017"],zv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Xv=Jt;const Wv=Bv+"\\Microsoft Visual Studio\\Installer";var Yv=Zt,Kv=function(e,t,r,n,o,i){if("win32"!=Gv.platform)return void Uv.info("This is not a Windows virtual environment, bye!");Gv.env.PATH+=Mv.delimiter+Wv;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=`"${Zt(i)}" ${a.join(" ")}`;Uv.debug("vcvars command-line: "+c);const u=(""+jv.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}Uv.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&(Uv.info("Setting "+e),er(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),Uv.exportVariable(e,t))}Uv.endGroup(),Uv.info("Configured Developer Command Prompt")};const Jv=12e5;var Qv=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(Qv||{});const Zv="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url)),ey="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url)),ty=Fl((async function(e,t,r){const[n,o]=await Promise.all([ir(e,t,r),sr()]);return await ny(r),n}),{promise:!0}),ry=Fl((async function(e){De()?e>10?await Se([{name:"libtinfo-dev"}]):await Se([{name:"libtinfo5"}]):Le()?await Fe("ncurses5-compat-libs",void 0,"yay"):$e()&&await je([{name:"ncurses-compat-libs"}])}),{promise:!0}),ny=Fl((async function(e){"linux"===process.platform&&await Vt(At("gcc",void 0,await Sv()),"",e,40)}),{promise:!0}),oy="string"==typeof __dirname?__dirname:Or.dirname(fn(import.meta.url));let iy,sy=!1;const ay={nala:async function(e,t,r){if(!De())return;if("string"==typeof iy)return{binDir:iy};const n=la.sync("nala",{nothrow:!0});if(null!==n)return iy=Ir(n),{binDir:iy};await Se([{name:"python3-apt"}]),iy="/usr/bin";try{const t=await Oe({name:"nala",version:e});if(void 0!==t)return await Se([{name:t}]),{binDir:iy}}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:iy}}catch(o){g("Failed to install nala-legacy: "+o)}return await async function(){const e=new Hd.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",mr(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Rr(mr(),"install-nala.sh"),r=await Kr(t,"utf8");await Jr(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:iy}},cmake:bt,ninja:Xt,python:Rt,vcpkg:async function(e,t,r){return sy&&null!==la.sync("vcpkg",{nothrow:!0})?{binDir:Ir(la.sync("vcpkg"))}:("linux"===process.platform&&(Le()?await Promise.all([Fe("curl"),Fe("zip"),Fe("unzip"),Fe("tar"),Fe("git"),Fe("pkg-config")]):$e()?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(Rr(t,Xe("bootstrap-vcpkg",".bat")))?y(`Vcpkg folder already exists at ${t}. Skipping the clone`):P("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Ir(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,ly),sy=!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(Le())throw Error("installing bazel on Arch linux is not supported yet");if($e())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 $t("conan",e)},meson:function(e,t,r){return $t("meson",e)},gcovr:function(e,t,r){return $t("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,ly),e}()}},llvm:or,gcc:Vt,choco:ke,brew:Pe,powershell:async function(e,t,r){try{return await Et("pwsh",e,cr,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,ly),{binDir:t}}case"darwin":return Ce("powershell",e,{cask:!0,overwrite:!1});case"linux":if(Le())return Fe("powershell-bin",e,"yay");if($e())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 Sv();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 Ce("ccache",e);case"linux":if(Le())return Fe("ccache",e);if($e())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 Ce("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(Rr(e,"doxygen.exe")))return await ie(e,ly),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await Ut(At("graphviz",void 0)),t}case"darwin":{const e=await Ce("doxygen",void 0);return Av()[0]>11&&await Ut(At("graphviz",void 0)),e}case"linux":{let o;if(""===e||Le()||$e())if(Le())o=await Fe("doxygen",e);else{if($e())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,Ft,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 Ut(At("graphviz",void 0,await Sv())),o}default:throw Error("Unsupported platform")}},graphviz:Ut,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,ly),e}()};case"darwin":return Ce("cppcheck",e);case"linux":if(Le())return Fe("cppcheck",e);if($e())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 ir(e,t,r)},clangformat:function(e,t,r){return ir(e,t,r,Qv.ClangFormat)},msvc:ar,vcvarsall:tr,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,Yt,t,r),a):(a=await Et("kcov",o,Wt,t,r),Le()?await Fe("binutils"):$e()?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 Ce("make",e);const t=Rr(Ne(),"opt/make/libexec/gnubin");return await ie(t,ly),{binDir:t}}case"linux":if(Le())return Fe("make",e);if($e())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,lr,t,r)},sevenzip:ht},cy=Object.keys(ay),uy=["compiler","architecture","timeout",...cy],ly={rcPath:ee("~/.cpprc"),guard:"cpp"};(async function(e){let t=Promise.resolve();yn.GITHUB_ACTIONS||(t=async function(){try{await Gd({pkg:Bd})}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:[...uy,"timeout"],default:Object.fromEntries(uy.map((e=>[e,pr(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=vp.create({autoloadLocales:!0});let c,u;vp.addLocale(yp),cp.addLocale(up);const l=await Sv();if(!function(e){const t=["llvm","clangtidy","clangformat"].filter((t=>void 0!==e[t])),r=t.filter((t=>!Nt(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,f=!1;for(const d of cy){if(yn.isCI&&0!==s.length){f=!0;break}const e=r[d];void 0!==e&&(c=Date.now(),p=await rr(d,e,l,n,o,i,s,6e4*Number.parseFloat(r.timeout??"20")),u=Date.now(),g("took "+(a.format(c,u)||"0 seconds")))}if(!f){const e=r.compiler;if(void 0!==e){const t=Date.now();await async function(e,t,r,n,o,i,s){try{const{compiler:a,version:c}=function(e){const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null!==Mp(e)||g(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}(e);switch(No.startGroup(`Installing ${a} ${c??""}`),a){case"llvm":case"clang":case"clang++":{const e=await or(At("llvm",c,t),Rr(r,"llvm"),n);await ne("GCOV","llvm-cov gcov",ly),o.push(fr("llvm",e));break}case"gcc":case"mingw":case"cygwin":case"msys":{const e=At("mingw"===a?"mingw":"gcc",c,t),s="mingw"===a?await async function(e,t,r){let n;switch(process.platform){case"win32":case"darwin":return Vt(e,t,r);case"linux":Le()?n=await Fe("mingw-w64-gcc",e):$e()?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,Rr(r,"gcc"),n):await Vt(e,Rr(r,"gcc"),n);i&&await ne("CPPFLAGS","",ly),await function(e){const t=Mp(e),r=null!==t?zp(t):e;return ne("GCOV",""!==r?"gcov-"+r:"gcov",ly)}(e),o.push(fr("gcc",s));break}case"cl":case"msvc":case"msbuild":case"vs":case"visualstudio":case"visualcpp":case"visualc++":{const e=await ar(At("msvc",c,t),Rr(r,"msvc"),n);i&&await ne("CPPFLAGS","",ly),o.push(fr("msvc",e));break}case"appleclang":case"applellvm":No.notice("Assuming apple-clang is already installed"),await Promise.all([ne("CC","clang",ly),ne("CXX","clang++",ly)]),o.push(fr("apple-clang",void 0));break;default:s.push("Unsupported compiler "+a)}}catch(a){m(a),s.push("Failed to install the "+e)}No.endGroup()}(e,l,o,n,i,p,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 Bl(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await Hl(e.rcPath,r.join("\n")),await G(e.rcPath)}}(ly),0===i.length&&0===s.length)return v("setup-cpp was called without any arguments. Nothing to do."),0;for(const d of i)console.log(`${d}`);for(const d of s)m(d);if(g("setup-cpp finished"),!yn.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{Od as a,No as b,vn as c,wm as d,Jh as e,g as f,vm as g,yn as h,Nh as i,e as j,Z as p,h as r,Hh as s,co as t,Kh as v,v as w}; //# sourceMappingURL=setup-cpp.mjs.map diff --git a/package-version.json b/package-version.json index cd815fd9..c1b8b9e8 100644 --- a/package-version.json +++ b/package-version.json @@ -1,4 +1,4 @@ { "name": "setup-cpp", - "version": "0.40.0" + "version": "0.41.0" } diff --git a/package.json b/package.json index 17b09628..b6c25990 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-cpp", - "version": "0.40.0", + "version": "0.41.0", "description": "Install all the tools required for building and testing C++/C projects.", "repository": "https://github.com/aminya/setup-cpp", "license": "Apache-2.0", diff --git a/packages/setup-brew/README.md b/packages/setup-brew/README.md index 6f0dd83b..3326fee9 100644 --- a/packages/setup-brew/README.md +++ b/packages/setup-brew/README.md @@ -37,9 +37,15 @@ The information about an installation result ### `getBrewBinDir` (function) +Get the path to the bin directory of brew + +**returns:** string + +### `getBrewDir` (function) + Get the path where brew is installed -**returns:** "/opt/homebrew/bin/" | "/usr/local/bin/" | "/home/linuxbrew/.linuxbrew/bin/" +**returns:** "/opt/homebrew" | "/usr/local" | "/home/linuxbrew/.linuxbrew" ### `BrewPackOptions` (type) diff --git a/packages/setup-brew/package.json b/packages/setup-brew/package.json index 1a5a8508..c6dc0fa8 100644 --- a/packages/setup-brew/package.json +++ b/packages/setup-brew/package.json @@ -1,6 +1,6 @@ { "name": "setup-brew", - "version": "1.0.0", + "version": "1.0.1", "description": "Setup brew and brew packages", "repository": "https://github.com/aminya/setup-cpp", "homepage": "https://github.com/aminya/setup-cpp/tree/master/packages/setup-brew",