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

4 lines
268 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

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

#!/usr/bin/env node
"use strict";function e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}function t(e){return e&&e.__esModule&&{}.hasOwnProperty.call(e,"default")?e.default:e}function r(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}function n(e,t,r){const n=new an(e,t,r);process.stdout.write(""+n+on.EOL)}function o(e){const t="https:"===e.protocol;if(function(e){if(!e.hostname)return!1;if(function(e){const t=e.toLowerCase();return"localhost"===t||t.startsWith("127.")||t.startsWith("[::1]")||t.startsWith("[0:0:0:0:0:0:0:1]")}(e.hostname))return!0;const t=process.env.no_proxy||process.env.NO_PROXY||"";if(!t)return!1;let r;e.port?r=Number(e.port):"http:"===e.protocol?r=80:"https:"===e.protocol&&(r=443);const n=[e.hostname.toUpperCase()];"number"==typeof r&&n.push(`${n[0]}:${r}`);for(const 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 i(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=a(r,n,o),s=0,c=t.requests.length;c>s;++s){var l=t.requests[s];if(l.host===i.host&&l.port===i.port)return t.requests.splice(s,1),void l.request.onSocket(e)}e.destroy(),t.removeSocket(e)}))}function s(e,t){var r=this;i.prototype.createSocket.call(r,e,(function(n){var o=e.request.getHeader("host"),i=c({},r.options,{socket:n,servername:o?o.replace(/:.*$/,""):e.host}),s=_n.connect(0,i);r.sockets[r.sockets.indexOf(n)]=s,t(s)}))}function a(e,t,r){return"string"==typeof e?{host:e,port:t,localAddress:r}:e}function c(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 l(){return Bn||(Bn=1,function(e){var t=Wr&&Wr.__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=Ir,n=xr,{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}>`:`<${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}(Hn)),Hn}function u(e){return eo(this,void 0,void 0,(function*(){if(no.IS_WINDOWS&&/[*"<>|]/.test(e))throw Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');try{yield no.rm(e,{force:!0,maxRetries:3,recursive:!0,retryDelay:300})}catch(t){throw Error("File was unable to be removed "+t)}}))}function p(e){return eo(this,void 0,void 0,(function*(){to.ok(e,"a path argument must be provided"),yield no.mkdir(e,{recursive:!0})}))}function f(e){return eo(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'tool' is required");const t=[];if(no.IS_WINDOWS&&process.env.PATHEXT)for(const e of process.env.PATHEXT.split(ro.delimiter))e&&t.push(e);if(no.isRooted(e)){const r=yield no.tryGetExecutablePath(e,t);return r?[r]:[]}if(e.includes(ro.sep))return[];const r=[];if(process.env.PATH)for(const e of process.env.PATH.split(ro.delimiter))e&&r.push(e);const n=[];for(const o of r){const r=yield no.tryGetExecutablePath(ro.join(o,e),t);r&&n.push(r)}return n}))}function d(e,t,r,n){return eo(this,void 0,void 0,(function*(){if(r>=255)return;r++,yield p(t);const o=yield no.readdir(e);for(const i of o){const o=`${e}/${i}`,s=`${t}/${i}`;(yield no.lstat(o)).isDirectory()?yield d(o,s,r,n):yield h(o,s,n)}yield no.chmod(t,(yield no.stat(e)).mode)}))}function h(e,t,r){return eo(this,void 0,void 0,(function*(){if((yield no.lstat(e)).isSymbolicLink()){try{yield no.lstat(t),yield no.unlink(t)}catch(n){"EPERM"===n.code&&(yield no.chmod(t,"0666"),yield no.unlink(t))}const r=yield no.readlink(e);yield no.symlink(r,t,no.IS_WINDOWS?"junction":null)}else(yield no.exists(t))&&!r||(yield no.copyFile(e,t))}))}function m(){function e(e,t,r){return o(this,void 0,void 0,(function*(){const n=s.argStringToArray(e);if(0===n.length)throw Error("Parameter 'commandLine' cannot be null or empty.");const o=n[0];return t=n.slice(1).concat(t||[]),new s.ToolRunner(o,t,r).exec()}))}if(io)return Xn;io=1;var t=Wr&&Wr.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Wr&&Wr.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&Object.hasOwnProperty.call(e,o)&&t(n,e,o);return r(n,e),n},o=Wr&&Wr.__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(Xn,"__esModule",{value:!0}),Xn.getExecOutput=Xn.exec=void 0;const i=Dr,s=n(function(){if(oo)return Wn;oo=1;var e=Wr&&Wr.__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=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Wr&&Wr.__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},n=Wr&&Wr.__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.argStringToArray=Wn.ToolRunner=void 0;const o=r(Ir),i=r(Cr),s=r(kr),a=r(Pr),c=r(Yn),l=r(Kn),u=Ur,p="win32"===process.platform;Wn.ToolRunner=class extends i.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(p)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,i=n.indexOf(o.EOL);for(;i>-1;)r(n.substring(0,i)),n=n.substring(i+o.EOL.length),i=n.indexOf(o.EOL);return n}catch(n){return this._debug("error processing line. Failed with error "+n),""}}_getSpawnFileName(){return p&&this._isCmdFile()?process.env.COMSPEC||"cmd.exe":this.toolPath}_getSpawnArgs(e){if(p&&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 n(this,void 0,void 0,(function*(){return!l.isRooted(this.toolPath)&&(this.toolPath.includes("/")||p&&this.toolPath.includes("\\"))&&(this.toolPath=a.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)),this.toolPath=yield c.which(this.toolPath,!0),new Promise(((e,t)=>n(this,void 0,void 0,(function*(){this._debug("exec tool: "+this.toolPath),this._debug("arguments:");for(const e of this.args)this._debug(" "+e);const r=this._cloneExecOptions(this.options);!r.silent&&r.outStream&&r.outStream.write(this._getCommandString(r)+o.EOL);const n=new f(r,this.toolPath);if(n.on("debug",(e=>{this._debug(e)})),this.options.cwd&&!(yield l.exists(this.options.cwd)))return t(Error(`The cwd: ${this.options.cwd} does not exist!`));const i=this._getSpawnFileName(),a=s.spawn(i,this._getSpawnArgs(r),this._getSpawnOptions(this.options,i));let c="";a.stdout&&a.stdout.on("data",(e=>{this.options.listeners&&this.options.listeners.stdout&&this.options.listeners.stdout(e),!r.silent&&r.outStream&&r.outStream.write(e),c=this._processLineBuffer(e,c,(e=>{this.options.listeners&&this.options.listeners.stdline&&this.options.listeners.stdline(e)}))}));let u="";if(a.stderr&&a.stderr.on("data",(e=>{n.processStderr=!0,this.options.listeners&&this.options.listeners.stderr&&this.options.listeners.stderr(e),!r.silent&&r.errStream&&r.outStream&&(r.failOnStdErr?r.errStream:r.outStream).write(e),u=this._processLineBuffer(e,u,(e=>{this.options.listeners&&this.options.listeners.errline&&this.options.listeners.errline(e)}))})),a.on("error",(e=>{n.processError=e.message,n.processExited=!0,n.processClosed=!0,n.CheckComplete()})),a.on("exit",(e=>{n.processExitCode=e,n.processExited=!0,this._debug(`Exit code ${e} received from tool '${this.toolPath}'`),n.CheckComplete()})),a.on("close",(e=>{n.processExitCode=e,n.processExited=!0,n.processClosed=!0,this._debug(`STDIO streams have closed for tool '${this.toolPath}'`),n.CheckComplete()})),n.on("done",((r,n)=>{c.length>0&&this.emit("stdline",c),u.length>0&&this.emit("errline",u),a.removeAllListeners(),r?t(r):e(n)})),this.options.input){if(!a.stdin)throw Error("child process missing stdin");a.stdin.end(this.options.input)}}))))}))}},Wn.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 f extends i.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=u.setTimeout(f.HandleTimeout,this.delay,this)))}_debug(e){this.emit("debug",e)}_setResult(){let e;this.processExited&&(this.processError?e=Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`):0===this.processExitCode||this.options.ignoreReturnCode?this.processStderr&&this.options.failOnStdErr&&(e=Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)):e=Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)),this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.done=!0,this.emit("done",e,this.processExitCode)}static HandleTimeout(e){e.done||(!e.processClosed&&e.processExited&&e._debug(`The STDIO streams did not close within ${e.delay/1e3} seconds of the exit event from process '${e.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`),e._setResult())}}return Wn}());return Xn.exec=e,Xn.getExecOutput=function(t,r,n){var s,a;return o(this,void 0,void 0,(function*(){let o="",c="";const l=new i.StringDecoder("utf8"),u=new i.StringDecoder("utf8"),p=null===(s=null==n?void 0:n.listeners)||void 0===s?void 0:s.stdout,f=null===(a=null==n?void 0:n.listeners)||void 0===a?void 0:a.stderr,d=Object.assign(Object.assign({},null==n?void 0:n.listeners),{stdout:e=>{o+=l.write(e),p&&p(e)},stderr:e=>{c+=u.write(e),f&&f(e)}}),h=yield e(t,r,Object.assign(Object.assign({},n),{listeners:d}));return o+=l.end(),c+=u.end(),{exitCode:h,stdout:o,stderr:c}}))},Xn}function v(){return ao||(ao=1,function(e){function t(e,t){const r=process.env["INPUT_"+e.replace(/ /g,"_").toUpperCase()]||"";if(t&&t.required&&!r)throw Error("Input required and not supplied: "+e);return t&&!1===t.trimWhitespace?r:r.trim()}function r(e,t={}){(0,u.issueCommand)("error",(0,f.toCommandProperties)(t),e instanceof Error?""+e:e)}function n(e){(0,u.issue)("group",e)}function o(){(0,u.issue)("endgroup")}var i=Wr&&Wr.__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]}),s=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=Wr&&Wr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&i(t,e,r);return s(t,e),t},c=Wr&&Wr.__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.platform=e.toPlatformPath=e.toWin32Path=e.toPosixPath=e.markdownSummary=e.summary=e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const u=Zr,p=cn,f=en,d=a(Ir),h=a(Pr),y=function(){if(Fn)return vn;Fn=1;var e=Wr&&Wr.__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(vn,"__esModule",{value:!0}),vn.OidcClient=void 0;const t=Un,n=Mn,o=v();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)}`),(0,o.debug)("ID token url is "+e);const r=yield i.getCall(e);return(0,o.setSecret)(r),r}catch(r){throw Error("Error message: "+r.message)}}))}}return vn.OidcClient=i,vn}();var g,w;(w=g||(e.ExitCode=g={}))[w.Success=0]="Success",w[w.Failure=1]="Failure",e.exportVariable=function(e,t){const r=(0,f.toCommandValue)(t);if(process.env[e]=r,process.env.GITHUB_ENV)return(0,p.issueFileCommand)("ENV",(0,p.prepareKeyValueMessage)(e,t));(0,u.issueCommand)("set-env",{name:e},r)},e.setSecret=function(e){(0,u.issueCommand)("add-mask",{},e)},e.addPath=function(e){process.env.GITHUB_PATH?(0,p.issueFileCommand)("PATH",e):(0,u.issueCommand)("add-path",{},e),process.env.PATH=`${e}${h.delimiter}${process.env.PATH}`},e.getInput=t,e.getMultilineInput=function(e,r){const n=t(e,r).split("\n").filter((e=>""!==e));return r&&!1===r.trimWhitespace?n:n.map((e=>e.trim()))},e.getBooleanInput=function(e,r){const n=t(e,r);if(["true","True","TRUE"].includes(n))return!0;if(["false","False","FALSE"].includes(n))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\nSupport boolean input list: \`true | True | TRUE | false | False | FALSE\``)},e.setOutput=function(e,t){if(process.env.GITHUB_OUTPUT)return(0,p.issueFileCommand)("OUTPUT",(0,p.prepareKeyValueMessage)(e,t));process.stdout.write(d.EOL),(0,u.issueCommand)("set-output",{name:e},(0,f.toCommandValue)(t))},e.setCommandEcho=function(e){(0,u.issue)("echo",e?"on":"off")},e.setFailed=function(e){process.exitCode=g.Failure,r(e)},e.isDebug=function(){return"1"===process.env.RUNNER_DEBUG},e.debug=function(e){(0,u.issueCommand)("debug",{},e)},e.error=r,e.warning=function(e,t={}){(0,u.issueCommand)("warning",(0,f.toCommandProperties)(t),e instanceof Error?""+e:e)},e.notice=function(e,t={}){(0,u.issueCommand)("notice",(0,f.toCommandProperties)(t),e instanceof Error?""+e:e)},e.info=function(e){process.stdout.write(e+d.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(0,p.issueFileCommand)("STATE",(0,p.prepareKeyValueMessage)(e,t));(0,u.issueCommand)("save-state",{name:e},(0,f.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 y.OidcClient.getIDToken(e)}))};var _=l();Object.defineProperty(e,"summary",{enumerable:!0,get:function(){return _.summary}});var E=l();Object.defineProperty(e,"markdownSummary",{enumerable:!0,get:function(){return E.markdownSummary}});var b=function(){if(qn)return Vn;qn=1;var e=Wr&&Wr.__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]}),t=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=Wr&&Wr.__importStar||function(r){if(r&&r.__esModule)return r;var n={};if(null!=r)for(var o in r)"default"!==o&&{}.hasOwnProperty.call(r,o)&&e(n,r,o);return t(n,r),n};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.toPlatformPath=Vn.toWin32Path=Vn.toPosixPath=void 0;const n=r(Pr);return Vn.toPosixPath=function(e){return e.replace(/[\\]/g,"/")},Vn.toWin32Path=function(e){return e.replace(/[/]/g,"\\")},Vn.toPlatformPath=function(e){return e.replace(/[/\\]/g,n.sep)},Vn}();Object.defineProperty(e,"toPosixPath",{enumerable:!0,get:function(){return b.toPosixPath}}),Object.defineProperty(e,"toWin32Path",{enumerable:!0,get:function(){return b.toWin32Path}}),Object.defineProperty(e,"toPlatformPath",{enumerable:!0,get:function(){return b.toPlatformPath}}),e.platform=a((so||(so=1,function(e){var t=Wr&&Wr.__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=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Wr&&Wr.__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=Wr&&Wr.__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())}))},i=Wr&&Wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.getDetails=e.isLinux=e.isMacOS=e.isWindows=e.arch=e.platform=void 0;const s=i(Ir),a=n(m());e.platform=s.default.platform(),e.arch=s.default.arch(),e.isWindows="win32"===e.platform,e.isMacOS="darwin"===e.platform,e.isLinux="linux"===e.platform,e.getDetails=function(){return o(this,void 0,void 0,(function*(){return Object.assign(Object.assign({},yield o(void 0,void 0,void 0,e.isWindows?function*(){const{stdout:e}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"',void 0,{silent:!0}),{stdout:t}=yield a.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"',void 0,{silent:!0});return{name:t.trim(),version:e.trim()}}:e.isMacOS?function*(){var e,t,r,n;const{stdout:o}=yield a.getExecOutput("sw_vers",void 0,{silent:!0}),i=null!==(t=null===(e=o.match(/ProductVersion:\s*(.+)/))||void 0===e?void 0:e[1])&&void 0!==t?t:"";return{name:null!==(n=null===(r=o.match(/ProductName:\s*(.+)/))||void 0===r?void 0:r[1])&&void 0!==n?n:"",version:i}}:function*(){const{stdout:e}=yield a.getExecOutput("lsb_release",["-i","-r","-s"],{silent:!0}),[t,r]=e.trim().split("\n");return{name:t,version:r}})),{platform:e.platform,arch:e.arch,isWindows:e.isWindows,isMacOS:e.isMacOS,isLinux:e.isLinux})}))}}(zn)),zn))}(Qr)),Qr}function y(e){return uo?lo.error(e):console.log(`${e}`)}function g(e){return uo?lo.warning(e):console.log(`${e}`)}function w(e){return uo?lo.notice(e):console.log(`${e}`)}function _(e){return uo?lo.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)}))}))}vo(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}function b(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=No.sync(e.command,{path:r[$o({env:r})],pathExt:t?Po.delimiter:void 0})}catch(c){}finally{i&&process.chdir(n)}return s&&(s=Po.resolve(o?e.options.cwd:"",s)),s}function O(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 R(e,t){return qo&&1===e&&!t.file?O(t.original,"spawn"):null}function S(e,t,r){const n=Vo(e,t,r),o=Ho.spawn(n.command,n.args,n.options);return zo.hookChildProcess(o,n),o}function I(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 T(e){return null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function x(e){return T(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState}async function P(e,t){if(!e)throw Error("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=Vi(t);return await new Promise(((t,o)=>{const i=e=>{e&&n.getBufferedLength()<=Bi.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{await zi(e,n),t()}catch(r){i(r)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(new Xi)}))})),n.getBufferedValue()}function N(e,t,r){const n=ds(e,t,r),o=ss(e,t),i=as(e,t);let s;fs(i,n.options),(({timeout:e})=>{if(void 0!==e&&(!Number.isFinite(e)||0>e))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)})(n.options);try{s=kr.spawn(n.file,n.args,n.options)}catch(p){const e=new kr.ChildProcess,t=Promise.reject(ui({error:p,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1}));return rs(e,t),e}const a=(e=>new Promise(((t,r)=>{e.on("exit",((e,r)=>{t({exitCode:e,signal:r})})),e.on("error",(e=>{r(e)})),e.stdin&&e.stdin.on("error",(e=>{r(e)}))})))(s),c=((e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(0===t||void 0===t)return n;let o;const i=new Promise(((n,i)=>{o=setTimeout((()=>{((e,t,r)=>{e.kill(t),r(Object.assign(Error("Timed out"),{timedOut:!0,signal:t}))})(e,r,i)}),t)})),s=n.finally((()=>{clearTimeout(o)}));return Promise.race([i,s])})(s,n.options,a),l=(async(e,{cleanup:t,detached:r},n)=>{if(!t||r)return n;const o=Ai((()=>{e.kill()}));return n.finally((()=>{o()}))})(s,n.options,c);s.kill=Ci.bind(null,s.kill.bind(s)),s.cancel=Ui.bind(null,s,{isCanceled:!1});const u=ti((async()=>{const[{error:e,exitCode:t,signal:r,timedOut:a},c,u,p]=await(async({stdout:t,stderr:r,all:n},{encoding:o,buffer:i,maxBuffer:s},a)=>{const c=Zi(t,{encoding:o,buffer:i,maxBuffer:s}),l=Zi(r,{encoding:o,buffer:i,maxBuffer:s}),u=Zi(n,{encoding:o,buffer:i,maxBuffer:2*s});try{return await Promise.all([a,c,l,u])}catch(e){return Promise.all([{error:e,signal:e.signal,timedOut:e.timedOut},Qi(t,c),Qi(r,l),Qi(n,u)])}})(s,n.options,l),f=hs(n.options,c),d=hs(n.options,u),h=hs(n.options,p);if(e||0!==t||null!==r){const c=ui({error:e,exitCode:t,signal:r,stdout:f,stderr:d,all:h,command:o,escapedCommand:i,parsed:n,timedOut:a,isCanceled:!!n.options.signal&&n.options.signal.aborted,killed:s.killed});if(!n.options.reject)return c;throw c}return{command:o,escapedCommand:i,exitCode:0,stdout:f,stderr:d,all:h,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}));return((e,t)=>{const r=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Ji(e),xr.createReadStream(t)))(t);void 0!==r&&(T(r)?r.pipe(e.stdin):e.stdin.end(r))})(s,n.options),s.all=((e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;const r=Ki();return e.stdout&&r.add(e.stdout),e.stderr&&r.add(e.stderr),r})(s,n.options),(e=>{null!==e.stdout&&(e.pipeStdout=Fi.bind(void 0,e,"stdout")),null!==e.stderr&&(e.pipeStderr=Fi.bind(void 0,e,"stderr")),void 0!==e.all&&(e.pipeAll=Fi.bind(void 0,e,"all"))})(s),rs(s,u),s}function $(e,t,r){const n=ds(e,t,r),o=ss(e,t),i=as(e,t);fs(i,n.options);const s=(e=>{const t=(({input:e,inputFile:t})=>"string"!=typeof t?e:(Ji(e),xr.readFileSync(t)))(e);if(T(t))throw new TypeError("The `input` option cannot be a stream in sync mode");return t})(n.options);let a;try{a=kr.spawnSync(n.file,n.args,{...n.options,input:s})}catch(u){throw ui({error:u,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:n,timedOut:!1,isCanceled:!1,killed:!1})}const c=hs(n.options,a.stdout,a.error),l=hs(n.options,a.stderr,a.error);if(a.error||0!==a.status||null!==a.signal){const e=ui({stdout:c,stderr:l,error:a.error,signal:a.signal,exitCode:a.status,command:o,escapedCommand:i,parsed:n,timedOut:a.error&&"ETIMEDOUT"===a.error.code,isCanceled:!1,killed:null!==a.signal});if(!n.options.reject)return e;throw e}return{command:o,escapedCommand:i,exitCode:0,stdout:c,stderr:l,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function A(e,t=["-NoProfile","-NoLogo","-NonInteractive"],r={stdio:"inherit"}){return N(function(){if(void 0===ha){const e=da.sync("pwsh",{nothrow:!0});null!==e&&(ha=e);const t=da.sync("powershell",{nothrow:!0});null!==t&&(ha=t)}if(void 0===ha)throw Error("Could not find powershell");return ha}(),[...t,"-c",e],r)}function C(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function L(){return null!==da.sync("sudo",{nothrow:!0})}function D(){var e;return 0===(null==(e=process.getuid)?void 0:e.call(process))||!!process.env.CI}function k(){return D()&&L()}function j(e){return k()?"sudo "+e:e}function U(e,t=[],r=ya){return k()?function(e,t){const[r,...n]=ls(e);return $(r,n,t)}(M(e,t),r):$(e,G(t),r)}function F(e,t=[],r=ya){return k()?function(e,t){const[r,...n]=ls(e);return N(r,n,t)}(M(e,t),r):N(e,G(t),r)}function M(e,t){return"sudo "+G([e,...t]).join(" ")}function G(e){return e.map((e=>`'${e}'`))}function B(){return"win32"===process.platform?ga():D()}async function q(e){if(("linux"===process.platform||"darwin"===process.platform)&&k()&&void 0!==process.env.SUDO_USER){let t=xr.statSync(e).isDirectory();await F("chown",[...t?["-R"]:[],process.env.SUDO_USER,e],ya)}}function H(){if(lc)return cc;lc=1;var e=Wa,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols;return cc=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 V(){return Gc?Mc:(Gc=1,Mc=(jc?kc:(jc=1,kc=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}))()?globalThis:function(){if(Fc)return Uc;Fc=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 Uc=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 z(){if(Xc)return zc;Xc=1;var e=Vc?Hc:(Vc=1,Hc=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])});return zc=function(t){if(!e(t))throw new TypeError(t+" is not a symbol");return t}}function X(){return nl?rl:(nl=1,rl=function(){if(qc)return Bc;qc=1;var e=V(),t={object:!0,symbol:!0};return Bc=function(){var r=e.Symbol;return"function"==typeof r&&(r("test symbol"),!!t[typeof r.iterator]&&!!t[typeof r.toPrimitive]&&!!t[typeof r.toStringTag])}}()()?V().Symbol:function(){if(tl)return el;tl=1;var e,t,r,n=Ac,o=z(),i=V().Symbol,s=function(){if(Yc)return Wc;Yc=1;var e=Ac,t=Object.defineProperty,r=Object.prototype,n=(0,Object.create)(null);return Wc=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(Jc)return Kc;Jc=1;var e=Ac,t=V().Symbol;return Kc=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(Zc)return Qc;Zc=1;var e=Ac,t=z(),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)},el=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])),el}())}function W(){return dl?fl:(dl=1,fl=(Dc?Lc:(Dc=1,Lc=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(pl)return ul;pl=1;var e=X().iterator,t=function(){if(il)return ol;il=1;var e={}.toString,t=e.call(function(){return arguments}());return ol=function(r){return e.call(r)===t}}(),r=function(){if(al)return sl;al=1;var e={}.toString,t=/t/.test.bind(/^[object [A-Za-z0-9]*Function]$/);return sl=function(r){return"function"==typeof r&&t(e.call(r))}}(),n=qa,o=za,i=Wa,s=La,a=function(){if(ll)return cl;ll=1;var e={}.toString,t=e.call("");return cl=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 ul=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!==(E=f[e])){for(w=o(E).call(f),d&&(v=new d),_=w.next(),h=0;!_.done;)b=O?l.call(O,R,_.value,h):_.value,d?(u.value=b,p(v,h,u)):v[h]=b,_=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},ul}())}function Y(){if(Al)return $l;Al=1;var e=Nl?Pl:(Nl=1,Pl=(Il?Sl:(Il=1,Sl=function(){var e=Number.isNaN;return"function"==typeof e&&!e({})&&e(NaN)&&!e(34)}))()?Number.isNaN:xl?Tl:(xl=1,Tl=function(e){return e!=e})),t=qa,r=Wa,n=[].indexOf,o={}.hasOwnProperty,i=Math.abs,s=Math.floor;return $l=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},$l}function K(){if(Ml)return Fl;Ml=1;var e=za,t=tc,r=function(){}.call;return Fl=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},Fl}function J(){if(Bl)return Gl;Bl=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 Gl=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 Q(){return Xl?zl:(Xl=1,zl=function(e){return"function"==typeof e})}function Z(){function e(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}return ru||(ru=1,Cu.exports=e,Cu.exports.default=e),Cu.exports}function ee(){if(nu)return Au;nu=1;var e=K(),t=function(){if(Vl)return Hl;Vl=1;var e=[].forEach,t=Object.create;return Hl=function(r){var n=t(null);return e.call(arguments,(function(e){n[e]=!0})),n},Hl}(),r=function(){if(Jl)return Kl;Jl=1;var e=Wa,t=function(){if(Yl)return Wl;Yl=1;var e=Q();return Wl=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){throw new TypeError("Passed argument cannot be stringifed")}}}();return Kl=function(r){return t(e(r))}}(),n=function(){if(tu)return eu;tu=1;var e=function(){if(Zl)return Ql;Zl=1;var e=Q();return Ql=function(t){try{return t&&e(t.toString)?""+t:t+""}catch(r){return"<Non-coercible to string value>"}}}();return eu=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=Z(),i=J(),s=Object.create,a=t("then","then:finally","done","done:finally");return rc.promise=function(t,c){var l=s(null),u=s(null),p=s(null);if(!0===t)t=null;else if(t=r(t),!a[t])throw new TypeError("'"+n(t)+"' is not valid promise mode");c.on("set",(function(e,r,n){var s=!1;if(!o(n))return u[e]=n,void c.emit("setasync",e,1);l[e]=1,p[e]=n;var a=function(t){var r=l[e];if(s)throw Error("Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode)\nConsider to rely on 'then' or 'done' mode instead.");r&&(delete l[e],u[e]=t,c.emit("setasync",e,r))},f=function(){s=!0,l[e]&&(delete l[e],delete p[e],c.delete(e))},d=t;if(d||(d="then"),"then"===d){var h=function(){i(f)};"function"==typeof(n=n.then((function(e){i(a.bind(this,e))}),h)).finally&&n.finally(h)}else if("done"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");n.done(a,f)}else if("done:finally"===d){if("function"!=typeof n.done)throw Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if("function"!=typeof n.finally)throw Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");n.done(a),n.finally(f)}})),c.on("get",(function(e,t,r){var n;if(l[e])++l[e];else{var s=function(){c.emit("getasync",e,t,r)};o(n=p[e])?"function"==typeof n.done?n.done(s):n.then((function(){i(s)})):s()}})),c.on("delete",(function(e){if(delete p[e],l[e])delete l[e];else if(hasOwnProperty.call(u,e)){var t=u[e];delete u[e],c.emit("deleteasync",e,[t])}})),c.on("clear",(function(){var t=u;u=s(null),l=s(null),p=s(null),c.emit("clearasync",e(t,(function(e){return[e]})))}))},Au}async function te(e){try{return await xr.promises.access(e),!0}catch{return!1}}function re(e){const t=function(){if(k()&&"string"==typeof process.env.SUDO_USER&&""!==process.env.SUDO_USER)return"darwin"===process.platform?Pr.join("/Users/",process.env.SUDO_USER):Pr.join("/home/",process.env.SUDO_USER);{const e=Ir.homedir();if(""===e)return;return e}}();return void 0===t?e:e.replace(qu,t)}async function ne(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 te(e.rcPath)&&((await Vu(e.rcPath,"utf8")).includes(t)||(await Hu(e.rcPath,`\n${t}\n`),_(`Added ${t} to ${e.rcPath}`)))}async function oe(e,t){await te(t)&&((await Vu(t,"utf-8")).includes(e)||(await Hu(t,e),_(`${e} was added to ${t}`)))}async function ie(e,t,r={}){const n={escapeSpace:!1,overwrite:!0,rcPath:Xu,...r},o=function(e,t=!1){const r=t?Zu(e):e;return ip(r,'"',"\\")}(null!=t?t:"",n.escapeSpace);try{if(sp)try{if(!n.overwrite&&void 0!==process.env[e])return void _(`Environment variable ${e} is already defined. Skipping.`);lo.exportVariable(e,o)}catch(i){y(i),await se(e,o,n)}else await se(e,o,n)}catch(i){y(`${i}\nFailed to export environment variable ${e}=${o}. You should add it manually.`)}}async function se(e,t,r){const n=null!=t?t:"";switch(process.platform){case"win32":return r.overwrite||void 0===process.env[e]?(await A(`[Environment]::SetEnvironmentVariable('${e}', '${n}', "User")`),void _(`${e}='${n}' was set in the environment.`)):void _(`Environment variable ${e} is already defined. Skipping.`);case"linux":case"darwin":return await Wu(r),void(r.overwrite?(await ap(r.rcPath,`\nexport ${e}="${n}"\n`),_(`${e}="${n}" was added to "${r.rcPath}`)):(await ap(r.rcPath,`\nif [ -z "\${${e}}" ]; then export ${e}="${n}"; fi\n`),_(`if not defined ${e} then ${e}="${n}" was added to "${r.rcPath}`)))}process.env[e]=n}async function ae(e,t={}){const r={rcPath:Xu,...t};if(!function(e){var t,r;return!!up.some((t=>t.test(e)))&&(null!=(r=null==(t=process.env.PATH)?void 0:t.split(Pr.delimiter))?r:[]).includes(e)}(e)){process.env.PATH=`${e}${Pr.delimiter}${process.env.PATH}`;try{if(cp)try{lo.addPath(e)}catch(n){y(n),await ce(e,r)}else await ce(e,r)}catch(n){y(`${n}\nFailed to add ${e} to the percistent PATH. You should add it manually.`)}}}async function ce(e,t){switch(process.platform){case"win32":return await A(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),void _(`"${e}" was added to the PATH.`);case"linux":case"darwin":return await Wu(t),await lp(t.rcPath,`\nexport PATH="${e}:$PATH"\n`),void _(`"${e}" was added to "${t.rcPath}"`);default:return}}function le(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 ue(e){Array.isArray(e)||(e=[e]);for(const t of e){const{id:e,data:r}=t;Ep[e]=r}}function pe(e,t,r){const n=function(e){const t=Ep[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 yp.pluralize(r.locale,t,n[e]).replace("{0}",t)}function fe(){if(Ff)return Uf;Ff=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}}Uf=t;const r=new Bf,n=Np,o=de(),i=Ip,s=Gp,{safeRe:a,t:c,comparatorTrimReplace:l,tildeTrimReplace:u,caretTrimReplace:p}=Tp,{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:d}=Sp,h=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},y=(e,t)=>(i("comp",e,t),e=E(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,t))).join(" "),_=(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=(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 Uf}function de(){if(Gf)return Mf;Gf=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(">")))}}Mf=t;const r=Np,{safeRe:n,t:o}=Tp,i=$f,s=Ip,a=Gp,c=fe();return Mf}function he(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 me(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 ve(e){return null==e?[]:Array.isArray(e)?e:[e]}function ye(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 ge(e,t,r,n=40){Jd?await async function(e,t,r=40){await F("update-alternatives",["--install","/usr/bin/"+e,e,t,""+r])}(e,t,n):(await Wu(r),await Qd(r.rcPath,`\nif [ $UID -eq 0 ]; then update-alternatives --install /usr/bin/${e} ${e} ${t} ${n}; fi\n`))}function we(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 _e(){return null!==da.sync("nala",{nothrow:!0})}function Ee(){let e;return e=_e()?"nala":"apt-get",e}function be(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}async function Oe(e){try{const{stdout:t}=await N("dpkg",["-s",e],{env:we("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("Status: install ok installed")))}catch{return!1}}async function Re(e,t=Ee()){return(await Promise.all(e.map((e=>Se(e,t))))).filter((e=>void 0!==e))}async function Se(e,t=Ee()){const r=await async function(e,t,r){switch(await Ie(e,t,r)){case rh.NameDashVersion:return`${t}-${r}`;case rh.NameEqualsVersion:return`${t}=${r}`;case rh.Name:return void 0!==r&&""!==r&&g(`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 Oe(r)?void 0:r}async function Ie(e,t,r){if(void 0!==r&&""!==r){const{stdout:n}=await N("apt-cache",["search","--names-only",`^${be(t)}-${be(r)}$`],{env:we(e),stdio:"pipe"});if(""!==n.trim())return rh.NameDashVersion;try{const{stdout:n}=await N("apt-cache",["show",`${t}=${r}`],{env:we(e)});if(""===n.trim())return rh.NameEqualsVersion}catch{}}try{const{stdout:r}=await N("apt-cache",["show",t],{env:we(e),stdio:"pipe"});if(""!==r.trim())return rh.Name}catch{}return eh?rh.None:(th(e),Ie(e,t,r))}async function Te(e,t=!1){try{const n=Ee();for(const{name:t,version:r}of e)_(`Installing ${t} ${null!=r?r:""} via ${n}`);t&&th(n),await async function(e,t){const r=[...new Set(t.flatMap((e=>{var t;return null!=(t=e.repository)?t:[]})))];await Promise.all(r.map((t=>async function(e,t=Ee()){await oh(t),await async function(e){await Oe("software-properties-common")||U(e,["install","-y","--fix-broken","-o",Zd,"software-properties-common"],{...ya,env:we(e)})}(t),U("add-apt-repository",["-y","--no-update",e],{...ya,env:we(t)}),th.clear(),th(t)}(t,e))))}(n,e);const o=await Re(e,n);if(0===o.length)return _("All packages are already installed"),{binDir:"/usr/bin/"};await oh(n);try{await async function(e){await Promise.all(e.map((async e=>{var t;void 0!==e.key&&await(t=e.key,"keyUrl"in t?xe(t):async function({key:e,keyServer:t=ah,fileName:r,keyStorePath:n=ah}){try{Ne(r);const o=Pr.join(n,r);return await te(o)||(Pe(),await F("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+o,"--keyserver",t,"--recv-keys",e]),await F("chmod",["644",o])),o}catch(o){return void g(`Failed to add apt key via server ${t}: ${o}`)}}(t))})))}(e),U(n,["install","--fix-broken","-y",...o],{...ya,env:we(n)})}catch(r){if(!function(e){return"string"==typeof e.stderr}(r))throw r;ih.some((e=>"string"==typeof r.stderr&&r.stderr.includes(e)))&&(g(`Failed to install packages ${o}. Retrying...`),U(n,["install","--fix-broken","-y","-o",Zd,...o],{...ya,env:we(n)}))}return{binDir:"/usr/bin/"}}catch(r){throw Error("Failed to install apt packages: "+(r instanceof Error?`${r.message}\n${r.stack}`:r+""))}}async function xe({keyUrl:e,fileName:t,keyStorePath:r=sh}){try{Ne(t);const n=Pr.join(r,t);if(!(await te(n))){Pe(),await Te([{name:"ca-certificates"}]);const r=Pr.join(Ir.tmpdir(),t),o=new Kd.DownloaderHelper(e,Ir.tmpdir(),{fileName:t});o.on("error",(t=>{throw Error(`Failed to download ${e}: ${t}`)})),await o.start(),U("gpg",["--no-default-keyring","--keyring","gnupg-ring:"+n,"--import",r]),U("chmod",["644",n])}return n}catch(n){return void g(`Failed to add apt key via download ${e}: ${n}`)}}function Pe(){U("gpg",["-k"])}function Ne(e){if(!e.endsWith(".gpg"))throw Error("Key file name must end with .gpg: "+e)}async function $e(e={}){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeof ch)return{binDir:ch};const t=await da("brew",{nothrow:!0});if(null!==t)return ch=Pr.dirname(t),{binDir:ch};await Te([{name:"ca-certificates"}]);const r=new Kd.DownloaderHelper("https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh",Ir.tmpdir(),{fileName:"install-brew.sh"});return r.on("error",(e=>{throw Error("Failed to download the brew installer script: "+e)})),await r.start(),$("/bin/bash",[r.getDownloadPath()],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),ch=Ae(),await ae(ch,e.rcOptions),{binDir:ch}}function Ae(){return Pr.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 Le(e,t,r={}){const n={overwrite:!0,cask:!1,args:[],...r};_(`Installing ${e} ${null!=t?t:""} via brew`),lh&&null!==da.sync("brew",{nothrow:!0})||(await $e(),lh=!0);const o=Ae(),i=Pr.join(o,"brew"),s=["install",void 0!==t&&""!==t?`${e}@${t}`:e];return n.overwrite&&s.push("--overwrite"),n.cask&&s.push("--cask"),$(i,s,{stdio:"inherit"}),{binDir:o}}function De(){return"linux"===process.platform&&(void 0===Sh&&(Sh=null!==Rh.sync("dnf",{nothrow:!0})),Sh)}function ke(){return"linux"===process.platform&&(void 0===Ih&&(Ih=null!==Rh.sync("pacman",{nothrow:!0})),Ih)}function je(){return"linux"===process.platform&&(void 0===Th&&(Th=null!==Rh.sync("apt-get",{nothrow:!0})),Th)}async function Ue(e,t,r){var n;if("win32"!==process.platform)return;if("string"==typeof xh)return{binDir:xh};const o=Rh.sync("choco",{nothrow:!0});if(null!==o)return xh=Pr.dirname(o),{binDir:xh};let i="powershell.exe";const s=Rh.sync(process.env.SystemRoot+"\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",{nothrow:!0});null!==s&&(i=s),$(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 ae(a,fy);const c=Rh.sync("choco",{nothrow:!0});return xh=null!==c?Pr.dirname(c):(null!=(n=process.env.ChocolateyInstall)?n:"C:/ProgramData/chocolatey")+"/bin",await te(xh)?{binDir:xh}:void 0}async function Fe(e,t,r=[]){var n;_(`Installing ${e} ${null!=t?t:""} via chocolatey`),Ph&&null!==Rh.sync("choco",{nothrow:!0})||(await Ue(0,0,process),Ph=!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)$("choco",["install","-y",e,"--version="+t,...r],{env:i,extendEnv:!1,stdio:"inherit"});else try{$("choco",["install","-y",e,...r],{env:i,extendEnv:!1,stdio:"inherit"})}catch(a){if(!a.message.includes("exit code 3010"))throw a;_(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 ae(s,fy),{binDir:s}}async function Me(e){for(const{name:t,version:r}of e)_(`Installing ${t} ${null!=r?r:""} via dnf`);return U("dnf",["-y","install",...await Promise.all(e.map((e=>async function(e,t){if(void 0!==t&&""!==t){const{stdout:r}=await N("dnf",["search","-q",`${e}-${t}`]);if(""!==r.trim())return`${e}-${t}`;{const{stdout:r}=await N("dnf",["search","-q",`${e}${t}`]);if(""!==r.trim())return`${e}${t}`;g(`Failed to install ${e} ${t} via dnf, trying without version`)}}return e}(e.name,e.version))))]),{binDir:"/usr/bin/"}}async function Ge(e,t,r){_(`Installing ${e} ${null!=t?t:""} via pacman`);const n="pacman";"yay"===r&&function(){if(null===Rh.sync("yay",{nothrow:!0}))try{U("pacman",["-S","--noconfirm","base-devel","git"]);const e=Pr.join(Ir.tmpdir(),"yay");U("mkdir",["-p",e]),D()?(g("Creating a non-root user to build yay"),U("useradd",["-m","-G","wheel","builder"]),U("passwd",["-d","builder"]),U("chown",["-R","builder:builder",e]),U("bash",["-c",'echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers']),Ch=!0,$("su",["-","builder","-c","git clone https://aur.archlinux.org/yay.git "+e],{stdio:"inherit"}),$("su",["-","builder","-c",`cd ${e} && makepkg -si --noconfirm`],{stdio:"inherit"})):($("git",["clone","https://aur.archlinux.org/yay.git",e],{stdio:"inherit",cwd:Ir.tmpdir()}),$("makepkg",["-si","--noconfirm"],{stdio:"inherit",cwd:e})),$("rm",["-rf",e],{stdio:"inherit"})}catch(e){throw Error(`Failed to install yay: ${e}. Install yay manually and re-run the script.`)}}(),Nh||"yay"===r||(U(n,["-Sy","--noconfirm"]),Nh=!0),$h||"yay"===r||(U(n,["-S","--noconfirm","base-devel"]),$h=!0);const o=e=>"yay"===r?D()&&Ch?U("su",["-","builder","-c","yay -S --noconfirm "+e]):$(r,["-S","--noconfirm",e]):U(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 N(e,["-Si",t]);for(const e of n.matchAll(Ah))r.push(e[1])}catch(n){g(`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 _(`Failed to install ${e} ${t} via pacman, trying without version`),o(e)}else o(e);return{binDir:"/usr/bin/"}}function Be(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 qe(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function He(e,t=!0){return t?Pr.basename(e):Pr.basename(e,Pr.extname(e))}function Ve(e){return Pr.normalize(e).replace(RegExp(be(Pr.sep)+"$"),"")}function ze(e,t=".exe",r=""){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Xe(e,t){const r=Pr.extname(e),n=`${t}${Pr.basename(e,r)}${r}`;return Pr.join(Pr.dirname(e),n)}function We(e,t){const r=Pr.extname(e),n=`${Pr.basename(e,r)}${t}${r}`;return Pr.join(Pr.dirname(e),n)}function Ye(e,t=".cmd",r=".sh"){return"win32"===process.platform?`${e}${t}`:`${e}${r}`}function Ke(e){return"win32"===process.platform?e:"./"+e}function Je(e){const t=Pr.extname(e).length;return e.slice(0,-t)}function Qe(e,t){return Dh(e,t)}function Ze(e,t){const r=Pr.relative(t,e);return!(!r||".."===r||r.startsWith(".."+Pr.sep)||r===Pr.resolve(e))}function et(e,t){const r=[];t=t||Rm.arch();const n=Sm.join(st(),e);if(bm.existsSync(n)){const e=bm.readdirSync(n);for(const o of e)if(ot(o)){const e=Sm.join(n,o,t||"");bm.existsSync(e)&&bm.existsSync(e+".complete")&&r.push(o)}}return r}function tt(e){return gm(this,void 0,void 0,(function*(){return e||(e=Sm.join(at(),$m.default())),yield Em.mkdirP(e),e}))}function rt(e,t,r){return gm(this,void 0,void 0,(function*(){const n=Sm.join(st(),e,Tm.clean(t)||t,r||"");_m.debug("destination "+n);const o=n+".complete";return yield Em.rmRF(n),yield Em.rmRF(o),yield Em.mkdirP(n),n}))}function nt(e,t,r){const n=Sm.join(st(),e,Tm.clean(t)||t,r||"");bm.writeFileSync(n+".complete",""),_m.debug("finished caching tool")}function ot(e){const t=Tm.clean(e)||"";_m.debug("isExplicit: "+t);const r=null!=Tm.valid(t);return _m.debug("explicit? "+r),r}function it(e,t){let r="";_m.debug(`evaluating ${e.length} versions`);for(let n=(e=e.sort(((e,t)=>Tm.gt(e,t)?1:-1))).length-1;n>=0;n--){const o=e[n];if(Tm.satisfies(o,t)){r=o;break}}return _m.debug(r?"matched: "+r:"match not found"),r}function st(){const e=process.env.RUNNER_TOOL_CACHE||"";return Nm.ok(e,"Expected RUNNER_TOOL_CACHE to be defined"),e}function at(){const e=process.env.RUNNER_TEMP||"";return Nm.ok(e,"Expected RUNNER_TEMP to be defined"),e}function ct(e,t){const r=Wr[e];return void 0!==r?r:t}function lt(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 Um(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(){lt(e,r).then(t).catch(n)}),l)):lt(e,r).then(t).catch(n)}))}))}function ut(e,t,r){switch(process.platform){case"win32":return Fe("7zip",e);case"darwin":return Le("p7zip",e);case"linux":if(ke())return Ge("p7zip",e);if(De())return Me([{name:"p7zip",version:e},{name:"p7zip-plugins",version:e}]);if(je())return Te([{name:"p7zip-full",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}function pt(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||g(`Unknown archive type: ${t}. Defaulting to 7z`),4)}async function ft(e,t){return await N(await async function(){return void 0===Mm&&(null===Rh.sync("7z",{nothrow:!0})&&await ut("",0,process),Mm="7z"),Mm}(),["x",e,"-o"+t,"-y"],{stdio:"inherit"}),await q(t),t}function dt(e,t){return ft(e,t)}async function ht(e,t){return null!==Rh.sync("7z",{nothrow:!0})?ft(e,t):null!==Rh.sync("unzip",{nothrow:!0})?(await N("unzip",["-q",e,"-d",t],{stdio:"inherit"}),await q(t),t):ft(e,t)}async function mt(e,t,r=0,n=[]){await async function(e){switch(_("Installing tar extraction dependencies"),e){case 1:"linux"===process.platform&&(ke()?(await Ge("gzip"),await Ge("tar")):De()?await Me([{name:"gzip"},{name:"tar"}]):je()&&await Te([{name:"gzip"},{name:"tar"}]));break;case 2:"linux"===process.platform&&(ke()?(await Ge("xz"),await Ge("tar")):De()?await Me([{name:"xz"},{name:"tar"}]):je()&&await Te([{name:"xz-utils"},{name:"tar"}]));break;default:throw Error(`Unsupported archive type: ${e} for tar extraction`)}}(pt(e));try{await co(t)}catch{}try{await N("tar",["xf",e,"-C",t,"--strip-components="+r,...n],{stdio:"inherit"})}catch(o){"win32"===process.platform&&o.message.includes("Can't create '\\\\?\\C:")&&g(`Failed to extract symlink ${e} to ${t}. Ignoring this symlink.`)}return await q(t),t}async function vt(e,t,r,n,o){var i,s;_(`Installing ${e} ${t} ${o} via direct downloading`),process.env.RUNNER_TEMP=null!=(i=process.env.RUNNER_TEMP)?i:Ir.tmpdir(),process.env.RUNNER_TOOL_CACHE=null!=(s=process.env.RUNNER_TOOL_CACHE)?s:Pr.join(Ir.tmpdir(),"setup-cpp","hostedtoolcache");const{url:a,binRelativeDir:c,binFileName:l,extractedFolderName:u,extractFunction:p}=await r(t,process.platform,o);if(Gm)try{const r=exports.find_1(e,t);if(r){const n=Pr.join(r,u),o=Pr.join(n,c);if(await te(Pr.join(o,l)))return _(`${e} ${t} was found in the cache at ${o}.`),await ae(o,fy),{installDir:n,binDir:o}}}catch{}const f=Pr.join(n,u),d=Pr.join(f,c),h=Pr.join(d,l);return await async function(e,t,r,n,o,i,s,a){if((await Promise.all([te(e),te(t)])).includes(!1))try{const e=await async function(e,t,r){_(`Download ${e} ${t}`);const n=await Fm((()=>{var e;const t=Pr.join(null!=(e=process.env.RUNNER_TEMP)?e:Ir.tmpdir(),`${Date.now()}-${Pr.basename(r)}`);return exports.downloadTool_1(r,t)}),{name:r,max:4,backoffBase:2e3,report:e=>_(e)});return n}(r,n,o);_(`Extracting ${e} to ${i}`);const t=null!=s?s:function(e){switch(e){case 0:case 1:case 2:return mt;case 3:return ht;default:return ft}}(pt(o));await t(e,i)}catch(c){throw Error(`Failed to download ${r} ${n} ${a} from ${o}: ${c}`)}if(_(`Add ${e} to PATH`),await ae(e,fy),!(await te(t)))throw Error(`Failed to find the binary ${t} after extracting ${r} ${n} ${a}`);if("win32"!==process.platform)try{await _s(t,"755")}catch(c){g(`Failed to make ${t} executable: ${c}`)}}(d,h,e,t,a,n,p,o),await async function(e,t,r){Gm&&"string"==typeof process.env.RUNNER_TOOL_CACHE&&("true"!==Rr("cache-tools")&&"true"!==process.env.CACHE_TOOLS||await exports.cacheDir_1(e,t,r))}(n,e,t),{installDir:f,binDir:d}}function yt(e,t,r){var n;const o=null!=(n=jf(e))?n:e;switch(t){case"win32":{const t=Rf(o,"v3.19.6");let n;Xh.includes(r)?n=t?"win64-x64":"windows-x86_64":Wh.includes(r)?n=t?"win32-x86":"windows-i386":Yh.includes(r)?n="windows-arm64":(_(`Trying unsupported arch '${r}' for cmake on Windows`),n="windows-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:ze("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.zip`}}case"darwin":{const t=`cmake-${e}-${Rf(o,"v3.19.1")?"Darwin-x86_64":"macos-universal"}`;return{binRelativeDir:"CMake.app/Contents/bin/",binFileName:ze("cmake"),extractedFolderName:t,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${t}.tar.gz`}}case"linux":{const t=Rf(o,"v3.19.8");let n;Yh.includes(r)?n=t?"Linux-aarch64":"linux-aarch64":Xh.includes(r)?n=t?"Linux-x86_64":"linux-x86_64":(_(`Trying unsupported arch '${r}' for cmake on Linux`),n="linux-"+r);const i=`cmake-${e}-${n}`;return{binRelativeDir:"bin/",binFileName:ze("cmake"),extractedFolderName:i,url:`https://github.com/Kitware/CMake/releases/download/v${e}/${i}.tar.gz`}}default:throw Error(`Unsupported platform '${t}'`)}}function gt(e,t,r){return vt("cmake",e,yt,t,r)}async function wt(e,t,r=ov){const n=await async function(e,t=ov){var r,n;try{const o=await nv.getExecOutput(e,["--version"]),i=null==(r=(o.stdout||o.stderr||"").trim().match(t))?void 0:r[1];return null!=(n=jf(i))?n:void 0}catch(o){return void console.error(o)}}(e,r);return void 0!==n&&""!==t&&-1!==of(n,t)}function _t(e,t='"'){return e.includes(" ")?`${t}${e}${t}`:e}async function Et(e,t,r){const n=await async function(e,t,r){let n,o=await bt(t);if(void 0!==o){const e=Pr.dirname(o);n={bin:o,installDir:e,binDir:e}}else{if(uv)try{_("Installing python in GitHub Actions");const{setupActionsPython:i}=await Promise.resolve().then((()=>require("./assets/actions_python-BxmUCMXs.js")));if(await i(e,t,r),o=await bt(t),void 0===o)throw Error("Python binary could not be found");const s=Pr.dirname(o);n={bin:o,installDir:s,binDir:s}}catch(i){g(""+i)}void 0===n&&(n=await async function(e,t){let r;switch(process.platform){case"win32":{e?await Fe("python3",t,["--params=/InstallDir:"+e]):await Fe("python3",t);const n=await bt(e);if(void 0===n)throw Error("Python binary could not be found");const o=Pr.dirname(n);await ae(o,fy),r={installDir:o,binDir:o,bin:n};break}case"darwin":{r=await Le("python3",t);const e=await N("brew",["--prefix","python"],{stdio:"pipe"}),n=Pr.join(e.stdout,"libexec","bin");await ae(n,fy);break}case"linux":if(ke())r=await Ge("python",t);else if(De())r=await Me([{name:"python3",version:t}]);else{if(!je())throw Error("Unsupported linux distributions");r=await Te([{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 bt(t),void 0===o)throw Error("Python binary could not be found");n={bin:o,installDir:Pr.dirname(o),binDir:Pr.dirname(o)}}return n}(e,t,r);jr(void 0!==n.bin);const o=n.bin,i=await async function(e){const t=await Rt();return void 0===t?(_("pip was not found. Installing pip"),await async function(e){await It(e)||(await Dt("pip"),await It(e))}(e),Rt()):t}(o);if(void 0===i)throw Error("pip was not installed correctly");return await async function(e){try{if(!(await Lt(e)))try{await $t(e,"pipx",void 0,{upgrade:!0,usePipx:!1})}catch(t){if(null===Dt("pipx",!1))throw Error("pipx was not installed correctly "+t)}await N(e,["-m","pipx","ensurepath"],{stdio:"inherit"}),await async function(e){try{await $t(e,"venv",void 0,{upgrade:!1,usePipx:!1})}catch(t){g(`Failed to install venv: ${""+t}. Ignoring...`)}}(e)}catch(t){g(`Failed to install pipx: ${""+t}. Ignoring...`)}}(o),await async function(e){try{await $t(e,"setuptools",void 0,{upgrade:!0,isLibrary:!0,usePipx:!1}),await $t(e,"wheel",void 0,{upgrade:!1,isLibrary:!0,usePipx:!1})}catch(t){g(`Failed to install setuptools/wheel: ${""+t}. Ignoring...`)}}(o),n}async function bt(e){for(const t of["python","python3"]){const r=await Ot(t,e);if(void 0!==r)return r}if("win32"===process.platform){const e=Pr.parse(Ir.homedir()).root,t=(await Ns(e)).filter((e=>e.startsWith("Python")));for(const r of t)for(const t of["python3","python"]){const n=await Ot(t,Pr.join(e,r));if(void 0!==n)return n}}}async function Ot(e,t){var r;try{if(void 0!==t){const r=Pr.join(t,ze(e));if(await te(r)&&await wt(r,cv))return r}const n=null!=(r=await Rh(e,{nothrow:!0,all:!0}))?r:[];for(const e of n)if(await wt(e,cv))return e}catch{}}async function Rt(){for(const e of["pip3","pip"]){const t=await St(e);if(void 0!==t)return t}}async function St(e){var t;try{const r=null!=(t=await Rh(e,{nothrow:!0,all:!0}))?t:[];for(const e of r)if(await wt(e,av))return e}catch{}}async function It(e){try{return await N(e,["-m","ensurepip","-U","--upgrade"],{stdio:"inherit"}),!0}catch(t){_(""+t);try{return await N(e,["-m","pip","install","--upgrade","pip"],{stdio:"inherit"}),!0}catch(r){_(""+r)}}return!1}function Tt(e,t,r=null){var n;return xt(t)&&"linux"===process.platform&&null!==r&&e in lv?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,lv[e]):xt(t)&&e in sv?null!=(n=sv[e])?n:"":"true"===t?"":null!=t?t:""}function xt(e){return"true"===e||void 0===e}function Pt(){if(!("version"in Ir)||"function"!=typeof Ir.version)return null;const e=Ir.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 Nt(e,t,r={}){return $t(await async function(){return void 0!==gv||(gv=(await Et(Tt("python",void 0,await mv()),"",process.arch)).bin),gv}(),e,t,r)}async function $t(e,t,r,n={}){const{usePipx:o=!0,user:i=!0,upgrade:s=!1,isLibrary:a=!1}=n,c=o&&!a&&await Lt(e),l=c?"pipx":"pip",u=t.replace(/\[.*]/g,"").trim();if(!s){const t=c?await async function(e,t){try{const r=await N(e,["-m","pipx","list","--json"],{stdio:"ignore",reject:!1});if(0!==r.exitCode||"string"!=typeof r.stdout)return!1;const n=JSON.parse(r.stdout);if(t in n.venvs)return!0;for(const e of Object.values(n.venvs))if(e.metadata.main_package.package_or_url===t||e.metadata.main_package.package===t)return!0}catch{}return!1}(e,u):await async function(e,t){try{return 0===(await N(e,["-m","pip","-qq","show",t],{stdio:"ignore",reject:!1})).exitCode}catch{return!1}}(e,u);if(t)return{binDir:c?await At():await Ct(e,u)}}const p=await async function(e,t){return 0===(await N(e,["-m","pip","-qq","index","versions",t],{stdio:"ignore",reject:!1})).exitCode}(e,u);if(p)try{lo.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 vv(),u.PIPX_BIN_DIR=await yv()),$(e,["-m",l,...o,...a,n],{stdio:"inherit",env:u})}catch(f){if(lo.info(`Failed to install ${t} via ${l}: ${f instanceof Error?`${f.message}\n${f.stack}`:f+""}`),null===await Dt(t))throw Error(`Failed to install ${t} via ${l}: ${f}.`)}else if(null===await Dt(t))throw Error(`Failed to install ${t} as it was not found via ${l} or the system package manager`);return{binDir:c?await At():await Ct(e,u)}}function At(){return yv()}async function Ct(e,t){const r=await pv(e),n=await async function(e,t){const r=(await Promise.all(e.map((e=>te(Pr.join(e,ze(t))))))).findIndex((e=>e));if(-1!==r)return e[r];const n=Rh.sync(ze(t),{nothrow:!0});return null!==n?Pr.dirname(n):e[e.length-1]}(r,t);return await ae(n,fy),n}async function Lt(e){return 0===(await N(e,["-m","pipx","--help"],{stdio:"ignore",reject:!1})).exitCode}function Dt(e,t=!0){if("linux"===process.platform){if(lo.info(`Installing ${e} via the system package manager`),ke())return Ge(t?"python-"+e:e);if(De())return Me([{name:t?"python3-"+e:e}]);if(je())return Te([{name:t?"python3-"+e:e}])}else if("darwin"===process.platform)return Le(e);return null}function kt(e,t,r){return Nt("cmakelang[YAML]",e)}async function jt(e,t,r){switch(process.platform){case"win32":return await Fe("graphviz",e),async function(){if("win32"===process.platform){const e="C:/Program Files/Graphviz/bin";return await ae(e,fy),{binDir:e}}throw Error("Unsupported platform")}();case"darwin":return Le("graphviz",e);case"linux":if(ke())return Ge("graphviz",e);if(De())return Me([{name:"graphviz",version:e}]);if(je())return Te([{name:"graphviz",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}async function Ut(e,t){const{ArchiveHdi:r}=await Promise.resolve().then((()=>require("./assets/hdi-Bqz5zNw7.js"))),n=new r(e);await n.read((async e=>{await e.extract(Pr.join(t,e.path))}))}function Ft(e,t,r){switch(t){case"linux":{const t="doxygen-"+e;return{binRelativeDir:"bin/",binFileName:ze("doxygen"),extractedFolderName:t,url:`https://www.doxygen.nl/files/${t}.linux.bin.tar.gz`}}case"win32":{const t="doxygen-"+e;return{binRelativeDir:"",binFileName:ze("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:ze("doxygen"),extractedFolderName:t,extractFunction:Ut,url:`https://doxygen.nl/files/${t}.dmg`}}default:throw Error(`Unsupported platform '${t}'`)}}async function Mt(){if("darwin"===process.platform)try{const e=await nv.getExecOutput("xcrun --sdk macosx --show-sdk-path"),t=e.stdout||e.stderr;t?await ie("SDKROOT",t.trim(),fy):y("SDKROOT not set")}catch(e){y(e)}}async function Gt(){const e=Pr.join(Rv,"gcc_matcher.json");if(!(await te(e)))return g("the gcc_matcher.json file does not exist in the same folder as setup-cpp.js");_("::add-matcher::"+e)}async function Bt(e){const t=await $s(e,"utf-8");return JSON.parse(t)}function qt(e,t){var r;const n=Object.keys(e),o=new Map;if(void 0===t.filterMapTag)for(const c of n)o.set(c,c);else for(const c of n){const e=t.filterMapTag(c);void 0!==e&&o.set(e,c)}if(0===o.size)return;const i=null!=(r=t.versionSatisfies)?r:Vf,s=function(e){if(null===zp(e))try{const t=jf(e);if(null!==t){const r=/^[<=>^~]/.test(t.version)?t.version:"^"+t.version;return _(`Coerced version '${e}' to '${r}'`),r}}catch(t){}return e}(t.version),a=[];for(const[c,l]of o.entries())i(c,s)&&a.push(l);if(0!==a.length)for(const c of a){let r=e[c];if(void 0===r)continue;if(void 0!==t.filterName&&(r=r.filter(t.filterName)),0===r.length)continue;const n=Ht(c,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){let n;switch(process.platform){case"win32":"arm"!==r&&"arm64"!==r||(n=await Fe("gcc-arm-embedded",e));try{n=await vt("g++",e,zt,t,r)}catch(o){_(`Failed to download g++ binary. ${o}. Falling back to chocolatey.`),n=await async function(e,t){var r,n;let o;if(await Fe("mingw",e),"x64"===t&&await te("C:/tools/mingw64/bin")?(o="C:/tools/mingw64/bin",await ae(o,fy)):"ia32"===t&&await te("C:/tools/mingw32/bin")?(o="C:/tools/mingw32/bin",await ae(o,fy)):await te((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"linux":if(ke())n=await Ge("mingw-w64-gcc",e);else if(De())n=await Me([{name:"mingw64-gcc",version:e}]);else{if(!je())throw Error("Unsupported Linux distro for "+r);n=await Te([{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)}return void 0!==n&&await async function(e){const t=[];"win32"===process.platform&&t.push(ie("CC",ze(e+"/gcc"),fy),ie("CXX",ze(e+"/g++"),fy)),Ev&&await Gt(),await Promise.all(t)}(n.binDir),n}async function zt(e,t,r){var n;if("win32"!==t)throw Error(`Unsupported platform '${t}'`);const o=await Bt(Pr.join(bv,"github_brechtsanders_winlibs_mingw.json")),i=Xt(e),s=Wt(e),a=Yt(e),c=qt(o,{version:e,keywords:[null!=(n={x64:"x86_64",ia32:"i386"}[r])?n:r],filterName:e=>!(void 0!==i&&i!==Xt(e)||void 0!==s&&s!==Wt(e)||void 0!==a&&a!==Yt(e)),versionSatisfies:(e,t)=>{const r=jf(e);if(null===r)throw Error(`Invalid MinGW asset version: '${e}'`);return Vf(r,t)&&(void 0===i||i===Xt(e))&&(void 0===s||s===Wt(e))}});if(void 0===c)throw Error(`No asset found for version ${e} and arch ${r}`);return{binRelativeDir:"bin/",binFileName:ze("g++"),extractedFolderName:"mingw64",extractFunction:ft,url:`https://github.com/brechtsanders/winlibs_mingw/releases/download/${c.tag}/${c.name}`}}function Xt(e){const t=e.match(/(ucrt|msvcrt)/);return null!==t?t[1]:void 0}function Wt(e){const t=e.match(/(posix|mcf)/);return null!==t?t[1]:void 0}function Yt(e){const t=e.match(/(seh|dwarf)/);return null!==t?t[1]:void 0}async function Kt(e,t,r,n=40){let o;switch(process.platform){case"win32":o=await Vt(e,t,r);break;case"darwin":o=await Le("gcc",e);break;case"linux":"x64"===r?ke()?o=await Ge("gcc",e):De()?o=await Me([{name:"gcc",version:e},{name:"gcc-c++",version:e},{name:"libstdc++-devel"}]):je()&&(o=""===e?await Te([{name:"gcc"},{name:"g++"}]):await Te([{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"}}])):(_(`Install g++-multilib because gcc for ${r} was requested`),ke()?o=await Ge("gcc-multilib",e):je()&&(o=""===e?await Te([{name:"gcc-multilib"}]):await Te([{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;if("win32"===process.platform)return;const o=[];{let i=e;""===e&&(i=await async function(e,t){try{let r="gcc";if(await te(e+"/gcc"))r=e+"/gcc";else{const t=(await Ns(e)).sort(((e,t)=>{var r,n,o,i;return function(e,t){const r=jf(e),n=jf(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 N(r,["--version"],{stdio:"pipe"}),o=n.match(/gcc.* \(.*\) ([\d.]+)/);return null!==o?o[1]:(g("Failed to parse gcc version from: "+n),t)}catch(r){return y("Failed to get gcc version: "+r),t}}(t,i),_("Using gcc version "+i));const s=Qp(null!=(n=jf(i))?n:i);5>s?(o.push(ie("CC",`${t}/gcc-${i}`,fy),ie("CXX",`${t}/g++-${i}`,fy)),je()&&o.push(ge("cc",`${t}/gcc-${i}`,fy,r),ge("cxx",`${t}/g++-${i}`,fy,r),ge("gcc",`${t}/gcc-${i}`,fy,r),ge("g++",`${t}/g++-${i}`,fy,r))):(o.push(ie("CC",`${t}/gcc-${s}`,fy),ie("CXX",`${t}/g++-${s}`,fy)),je()&&o.push(ge("cc",`${t}/gcc-${s}`,fy,r),ge("cxx",`${t}/g++-${s}`,fy,r),ge("gcc",`${t}/gcc-${s}`,fy,r),ge("g++",`${t}/g++-${s}`,fy,r)))}o.push(Mt()),Ov&&await Gt(),await Promise.all(o)}(e,o.binDir,n),o}function Jt(e){const t=zp(e),r=null!==t?Qp(t):e;return ie("GCOV",""!==r?"gcov-"+r:"gcov",fy)}async function Qt(e,t,r){const{keywords:n,optionalKeywords:o}=function(e,t){const r=[],n=[];switch(e){case"linux":r.push("linux"),Xh.includes(t)?(n.push("64"),n.push("x86_64")):(_(`Using arch ${t} for infer`),r.push(t));break;case"darwin":r.push("osx"),Xh.includes(t)?n.push("x86_64"):Yh.includes(t)?n.push("arm64"):(_(`Using arch ${t} for infer`),r.push(t));break;default:_(`Using ${e} ${t} for infer`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(t,r),i=qt(await Bt(Pr.join(Sv,"github_facebook_infer.json")),{version:e,keywords:n,optionalKeywords:o,filterMapTag:e=>e.replace(/^v/,"")});if(void 0!==i)return{url:`https://github.com/facebook/infer/releases/download/${i.tag}/${i.name}`,extractedFolderName:""+Pr.basename(i.name,".tar.xz"),binRelativeDir:"bin",binFileName:ze("infer")};throw Error(`No asset found for version ${e} matching ${n} and ${o}`)}function Zt(e,t,r){const n=function(e,t){switch(e){case"win32":return Xh.includes(t)||Wh.includes(t)?"win":Yh.includes(t)?"winarm64":"win";case"darwin":return"mac";case"linux":return Xh.includes(t)||Wh.includes(t)?"linux":Yh.includes(t)?"linux-aarch64":"linux";default:throw Error(`Unsupported platform '${e}'`)}}(t,r);return{binRelativeDir:"",binFileName:ze("ninja"),extractedFolderName:"",url:`https://github.com/ninja-build/ninja/releases/download/v${e}/ninja-${n}.zip`}}function er(e,t,r){return vt("ninja",e,Zt,t,r)}function tr(e){return{url:`https://github.com/SimonKagstrom/kcov/releases/download/${e}/kcov-amd64.tar.gz`,extractedFolderName:"",binRelativeDir:"usr/local/bin",binFileName:ze("kcov")}}function rr(e){return{url:`https://github.com/SimonKagstrom/kcov/archive/refs/tags/${e}.tar.gz`,extractedFolderName:"",binRelativeDir:"build/src",binFileName:ze("kcov"),extractFunction:nr}}async function nr(e,t){const r=await mt(e,t,1),n=await async function(){let e=Rh.sync("cmake",{nothrow:!0});if(null===e){const{binDir:t}=await gt(Tt("cmake",void 0,await mv()),Pr.join(re("~"),"cmake"),"");e=Pr.join(t,"cmake")}return null===Rh.sync("ninja",{nothrow:!0})&&await er(Tt("ninja",void 0,await mv()),Pr.join(re("~"),"ninja"),""),e}();"linux"===process.platform&&(ke()?await Promise.all([Ge("libdwarf"),Ge("libcurl-openssl")]):De()?await Me([{name:"libdwarf-devel"},{name:"libcurl-devel"}]):je()&&await Te([{name:"libdw-dev"},{name:"libcurl4-openssl-dev"}]));try{if(null!==Rh.sync("patch",{nothrow:!0})){const e=Pr.join(Iv,"gcc13.patch");await N("patch",["-N","-p1","-i",e],{cwd:r,stdio:"inherit"})}else _("`patch` not found, skipping gcc13.patch, kcov may not build on gcc 13")}catch{}const o=Pr.join(r,"build");return await N(n,["-S",r,"-B",o,"-DCMAKE_BUILD_TYPE=Release","-G","Ninja"],{cwd:r,stdio:"inherit"}),await N(n,["--build",o,"--config","Release"],{cwd:r,stdio:"inherit"}),r}async function or(){"darwin"===process.platform&&(null!==await Rh("clang",{nothrow:!0})&&null!==await Rh("clang++",{nothrow:!0})&&(w("Assuming clang is an Apple Clang compiler"),await Promise.all([ie("CC","clang",fy),ie("CXX","clang++",fy)])),qr.error("Apple Clang automatic installation is not supported yet"))}function ir(e){return Object.values(Mv).includes(e)?e:e in Mv?Mv[e]:e}function sr(e){if(Object.keys(Mv).includes(e))return e;for(const[t,r]of Object.entries(Mv))if(r===e)return t;return e}function ar(e){const t=ir(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){$v.warning("vswhere failed: "+r)}return null}(0,r);if(n&&Cv.existsSync(n))return $v.info("Found with vswhere: "+n),n;$v.info("Not found with vswhere");const o=e?[sr(e)]:Fv;for(const i of jv)for(const e of o)for(const t of Uv)if(n=`${i}\\Microsoft Visual Studio\\${e}\\${t}\\VC\\Auxiliary\\Build\\vcvarsall.bat`,$v.info("Trying standard location: "+n),Cv.existsSync(n))return $v.info("Found standard location: "+n),n;if($v.info("Not found in standard locations"),n=kv+"\\Microsoft Visual C++ Build Tools\\vcbuildtools.bat",Cv.existsSync(n))return $v.info("Found VS 2015: "+n),n;throw $v.info("Not found in VS 2015 location: "+n),Error("Microsoft Visual Studio not found")}function cr(e){return-1!=["PATH","INCLUDE","LIB","LIBPATH"].indexOf(e.toUpperCase())}async function lr(e,t,r,n,o,i,s){void 0!==t&&await te(t)&&(_(`Adding ${t} to PATH`),await ie("VCTargetsPath",t,fy)),await Hv(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 ur(e,t,r,n,o,i,s,a=12e5){lo.startGroup(`Installing ${e} ${t}`);try{await function(e,t){const{milliseconds:r,fallback:n,message:o,customTimers:i={setTimeout:setTimeout,clearTimeout:clearTimeout}}=t;let s;const a=new Promise(((a,c)=>{if("number"!=typeof r||1!==Math.sign(r))throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(t.signal){const{signal:r}=t;r.aborted&&c(Nv(r));const n=()=>{c(Nv(r))};r.addEventListener("abort",n,{once:!0}),e.finally((()=>{r.removeEventListener("abort",n)}))}if(r===1/0)return void e.then(a,c);const l=new Tv;s=i.setTimeout.call(void 0,(()=>{if(n)try{a(n())}catch(t){c(t)}else"function"==typeof e.cancel&&e.cancel(),!1===o?a():o instanceof Error?c(o):(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=cy.includes(e);let a;if("vcvarsall"===e)await lr(Tt(e,t,r),void 0,n,void 0,void 0,!1,!1);else if("brew"===e)a=await $e({rcOptions:fy});else{const i=Pr.join(o,s?"llvm":e),c=Tt(e,t,r),l=ly[e];a=await l(c,i,n)}i.push(Sr(e,a))}(e,t,r,n,o,i),{milliseconds:a,message:`Timeout while installing ${e} ${t}. You can increase the timeout from options`})}catch(c){y(c),c instanceof Error&&void 0!==c.stack&&y(c.stack),s.push(e+" failed to install")}lo.endGroup()}async function pr(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":Xh.includes(t)?r.push("win64"):Wh.includes(t)?r.push("win32"):Yh.includes(t)?r.push("woa64"):(_(`Using arch ${t} for LLVM`),r.push(t));break;case"linux":if(r.push("linux"),je()){n.push("ubuntu");const e=await mv();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 De()&&n.push("rhel");Xh.includes(t)?r.push("x86_64"):Wh.includes(t)?r.push("x86"):Yh.includes(t)?r.push("aarch64"):Kh.includes(t)?r.push("armv7a"):Jh.includes(t)?r.push("powerpc64le"):Qh.includes(t)?r.push("sparc64"):(_(`Using arch ${t} for LLVM`),r.push(t));break;case"darwin":r.push("apple"),Xh.includes(t)?r.push("x86_64"):Yh.includes(t)?n.push("arm64"):(_(`Using arch ${t} for LLVM`),r.push(t));break;case"freebsd":r.push("freebsd"),Xh.includes(t)?r.push("amd64"):Wh.includes(t)?r.push("i386"):(_(`Using arch ${t} for LLVM`),r.push(t));break;default:_(`Using ${e} ${t} for LLVM`),r.push(e,t)}return{keywords:r,optionalKeywords:n}}(e,t),i=qt(await Bt(Pr.join(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=qt(await Bt(Pr.join(zv,"llvm_org_releases.json")),{version:r,keywords:n,optionalKeywords:o});if(void 0!==s)return`https://releases.llvm.org/${s.tag}/${s.name}`;throw Error(`No asset found for version ${r} matching ${n} and ${o}`)}(t,r,e);return _("Downloading LLVM from "+n),{url:n,extractedFolderName:"",binRelativeDir:"bin",binFileName:ze("clang"),extractFunction:"win32"===t?dt:(e,t)=>mt(e,t,1)}}async function fr(e,t,r){var n;const o=await Yv(e,t,r);return await async function(e,t){var r,n;const o=null!=(r=process.env.LD_LIBRARY_PATH)?r:"",i=null!=(n=process.env.DYLD_LIBRARY_PATH)?n:"",s=vr(t),a=[ie("CC",ze(e+"/bin/clang"),fy),ie("CXX",ze(e+"/bin/clang++"),fy),ie("LLVM_PATH",e,fy),ie("LD_LIBRARY_PATH",`${o}${Pr.delimiter}${e}/lib`,fy),ie("DYLD_LIBRARY_PATH",`${i}${Pr.delimiter}${e}/lib`,fy),ie("LLVM_LDFLAGS","-L"+_t(e+"/lib"),fy),ie("LLVM_CPPFLAGS","-I"+_t(e+"/include"),fy),await te(`${e}/lib/clang/${t}/include`)?ie("LLVM_CPATH",`${e}/lib/clang/${t}/include`,fy):await te(`${e}/lib/clang/${s}/include`)?ie("LLVM_CPATH",`${e}/lib/clang/${s}/include`,fy):Promise.resolve(),ie("LIBRARY_PATH",e+"/lib",fy),Mt()];if(je()){const t=60;a.push(ge("cc",e+"/bin/clang",fy,t),ge("cxx",e+"/bin/clang++",fy,t),ge("clang",e+"/bin/clang",fy),ge("clang++",e+"/bin/clang++",fy),ge("lld",e+"/bin/lld",fy),ge("ld.lld",e+"/bin/ld.lld",fy),ge("llvm-ar",e+"/bin/llvm-ar",fy))}await Promise.all(a)}(null!=(n=o.installDir)?n:t,e),o}function dr(e,t,r){return mr(e,t,r,Vv.ClangFormat)}function hr(e,t,r){return mr(e,t,r)}async function mr(e,t,r,n=Vv.All){const o=vr(e);try{if(je())return await async function(e,t=0){const r="/usr/lib/llvm-"+e;await Te([{name:"ca-certificates"}]);const n=new Kd.DownloaderHelper("https://apt.llvm.org/llvm.sh",Ir.tmpdir(),{fileName:"llvm.sh"});n.on("error",(e=>{throw Error("Failed to download the LLVM installer script: "+e)})),await n.start();const o=await $s(n.getDownloadPath(),"utf-8"),i=Pr.join(Ir.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 ${Zd} -y`)}(o),o=function(e,t,r){return 1===e?t.replace(/ -y \$PKG/g," -y clang-format-"+r):t}(n,o,r),o=await async function(e){let t=e.replace(/apt-get install -y/g,`apt-get install -o Dpkg::Options::="--force-overwrite" -o ${Zd} -y --fix-broken`);return await Promise.all(["libc++-$LLVM_VERSION-dev","libc++abi-$LLVM_VERSION-dev","libunwind-$LLVM_VERSION-dev"].map((async e=>{const r=e.replace("$LLVM_VERSION","*");await async function(e){try{const{stdout:t}=await N("dpkg",["-l",e],{env:we("apt-get"),stdio:"pipe"});return"string"==typeof t&&t.split("\n").some((e=>e.startsWith("ii")))}catch{return!1}}(r)&&(qr.info("Removing conflicting package "+r),t=t.replace(e,""))}))),t}(o),o=function(e){return _e()?e.replace(/apt-get/g,"nala"):e}(o),await Gs(t,o),[{name:"lsb-release"},{name:"wget"},{name:"software-properties-common"},{name:"gnupg"}]}(o,i,e,t);return await Te(s),await _s(i,"755"),await F("bash",[i,""+e,...0===t?["all"]:[]],{stdio:"inherit",shell:!0,timeout:12e5}),await ae(r+"/bin",fy),{installDir:""+r,binDir:r+"/bin",bin:r+"/bin/clang++"}}(o,n)}catch(s){_("Failed to install llvm via system package manager "+s)}const i=await vt("llvm",e,pr,t,r);return await Kv(o),i}function vr(e){const t=function(e){if(null===zp(e))try{const t=jf(e);if(null!==t)return _(`Coerced version '${e}' to '${t}'`),t.version}catch(t){}return e}(e);return Number.parseInt(t.split(".")[0],10)}async function yr(){if(Xv){const e=Pr.join(Wv,"llvm_matcher.json");if(!(await te(e)))return g("the llvm_matcher.json file does not exist in the same folder as setup-cpp.js");_("::add-matcher::"+e)}}async function gr(e,t,r,n,o,i){if("win32"!==process.platform)return;const s=Gv(e);_(`Checking if MSVC ${s} is already installed`);let a,c,l=!1;try{const e=qv(s);l=!0,_("Found the pre-installed version of MSVC at "+e)}catch{}if(!l)try{"14.0"===s?(a="14.0",await Fe("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 Fe("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 Fe("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 Fe("visualstudio2022buildtools","117.0.5.0",[]),c=void 0):y(`The given MSVC versions ${e} is not supported yet.`)}catch(u){y(u)}await lr(s,c,r,a,n,o,i),Qv&&await async function(){const e=Pr.join(Zv,"msvc_matcher.json");if(!(await te(e)))return g("the msvc_matcher.json file does not exist in the same folder as setup-cpp.js");_("::add-matcher::"+e)}()}async function wr(e,t,r){if("win32"===process.platform)return await Fe("opencppcoverage",e),{binDir:await async function(){const e="C:/Program Files/OpenCppCoverage";return await ae(e,fy),e}()}}function _r(e,t,r){return{url:Er(t,r,e),binRelativeDir:"",binFileName:ze("pwsh"),extractedFolderName:""}}function Er(e,t,r){var n;switch(e){case"win32":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/PowerShell-${r}-${["ia32","x86","i386","x32"].includes(t)?"win-x86":"win-x64"}.zip`;case"darwin":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${["arm","arm64"].includes(t)?"osx-arm64":"osx-x64"}.tar.gz`;case"linux":return`https://github.com/PowerShell/PowerShell/releases/download/v${r}/powershell-${r}-${null!=(n={arm64:"linux-arm64",arm:"linux-arm64",arm32:"linux-arm32",aarch64:"linux-arm64",x64:"linux-x64"}[t])?n:"linux-x64"}.tar.gz`;default:throw Error(`Unsupported platform '${e}'`)}}async function br(e,t,r){try{return await vt("pwsh",e,_r,t,r)}catch(n){return y(`Failed to setup pwsh via download: ${n}. Trying package managers...`),async function(e){switch(process.platform){case"win32":{await Fe("powershell-core",e);const t="C:/Program Files/PowerShell/7";return await ae(t,fy),{binDir:t}}case"darwin":return Le("powershell",e,{cask:!0,overwrite:!1});case"linux":if(ke())return Ge("powershell-bin",e,"yay");if(De())return await Me([{name:"curl"}]),U("/bin/bash",["-c","curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo"]),Me([{name:"powershell",version:e}]);if(je()){await Te([{name:"curl"}]);const t=await mv();return U("curl",["-LJO",`https://packages.microsoft.com/config/ubuntu/${t[0]}.0${t[1]}/packages-microsoft-prod.deb`]),U("dpkg",["-i","packages-microsoft-prod.deb"]),Te([{name:"powershell",version:e}],!0)}throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}}(e)}}function Or(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:ze("task"),extractedFolderName:"",url:`https://github.com/go-task/task/releases/download/v${e}/task_${n}_${o}.${i}`}}function Rr(e){const t=lo.getInput(e.toLowerCase());if("false"!==t&&""!==t)return t}function Sr(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 Ir=require("os"),Tr=require("crypto"),xr=require("fs"),Pr=require("path"),Nr=require("http"),$r=require("https");require("net");const Ar=require("tls"),Cr=require("events"),Lr=require("util"),Dr=require("string_decoder"),kr=require("child_process"),jr=require("assert"),Ur=require("timers"),Fr=require("buffer"),Mr=require("process"),Gr=require("stream"),Br=require("url"),qr=require("console");var Hr="undefined"!=typeof document?document.currentScript:null;const Vr=e(xr),zr=e(Nr),Xr=e($r);var Wr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Yr={};const Kr=[{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=Kr,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))}(Yr);const Jr=t(Yr);var Qr={},Zr={},en={};Object.defineProperty(en,"__esModule",{value:!0}),en.toCommandProperties=en.toCommandValue=void 0,en.toCommandValue=function(e){return null==e?"":"string"==typeof e||e instanceof String?e:JSON.stringify(e)},en.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 tn=Wr&&Wr.__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]}),rn=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),nn=Wr&&Wr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&tn(t,e,r);return rn(t,e),t};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.issue=Zr.issueCommand=void 0;const on=nn(Ir),sn=en;Zr.issueCommand=n,Zr.issue=function(e,t=""){n(e,{},t)};class an{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,(0,sn.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}`)}}var t;return e+="::"+function(e){return(0,sn.toCommandValue)(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}(this.message),e}}var cn={},ln=Wr&&Wr.__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]}),un=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),pn=Wr&&Wr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&ln(t,e,r);return un(t,e),t};Object.defineProperty(cn,"__esModule",{value:!0}),cn.prepareKeyValueMessage=cn.issueFileCommand=void 0;const fn=pn(Tr),dn=pn(xr),hn=pn(Ir),mn=en;cn.issueFileCommand=function(e,t){const r=process.env["GITHUB_"+e];if(!r)throw Error("Unable to find environment variable for file command "+e);if(!dn.existsSync(r))throw Error("Missing file at path: "+r);dn.appendFileSync(r,`${(0,mn.toCommandValue)(t)}${hn.EOL}`,{encoding:"utf8"})},cn.prepareKeyValueMessage=function(e,t){const r="ghadelimiter_"+fn.randomUUID(),n=(0,mn.toCommandValue)(t);if(e.includes(r))throw Error(`Unexpected input: name should not contain the delimiter "${r}"`);if(n.includes(r))throw Error(`Unexpected input: value should not contain the delimiter "${r}"`);return`${e}<<${r}${hn.EOL}${n}${hn.EOL}${r}`};var vn={};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 gn,wn={},_n=Ar,En=Nr,bn=$r,On=Cr,Rn=Lr;wn.httpOverHttp=function(e){var t=new i(e);return t.request=En.request,t},wn.httpsOverHttp=function(e){var t=new i(e);return t.request=En.request,t.createSocket=s,t.defaultPort=443,t},wn.httpOverHttps=function(e){var t=new i(e);return t.request=bn.request,t},wn.httpsOverHttps=function(e){var t=new i(e);return t.request=bn.request,t.createSocket=s,t.defaultPort=443,t},Rn.inherits(i,On.EventEmitter),i.prototype.addRequest=function(e,t,r,n){var o=this,i=c({request:e},o.options,a(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)},i.prototype.createSocket=function(e,t){function r(r,i,a){var c;return s.removeAllListeners(),i.removeAllListeners(),200!==r.statusCode?(gn("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?(gn("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)):(gn("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=i,t(i))}var n=this,o={};n.sockets.push(o);var i=c({},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")),gn("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(),gn("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()},i.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)}))}},gn=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(){},wn.debug=gn;var Sn,In,Tn,xn,Pn,Nn=wn;(In=Sn||(Sn={}))[In.OK=200]="OK",In[In.MultipleChoices=300]="MultipleChoices",In[In.MovedPermanently=301]="MovedPermanently",In[In.ResourceMoved=302]="ResourceMoved",In[In.SeeOther=303]="SeeOther",In[In.NotModified=304]="NotModified",In[In.UseProxy=305]="UseProxy",In[In.SwitchProxy=306]="SwitchProxy",In[In.TemporaryRedirect=307]="TemporaryRedirect",In[In.PermanentRedirect=308]="PermanentRedirect",In[In.BadRequest=400]="BadRequest",In[In.Unauthorized=401]="Unauthorized",In[In.PaymentRequired=402]="PaymentRequired",In[In.Forbidden=403]="Forbidden",In[In.NotFound=404]="NotFound",In[In.MethodNotAllowed=405]="MethodNotAllowed",In[In.NotAcceptable=406]="NotAcceptable",In[In.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",In[In.RequestTimeout=408]="RequestTimeout",In[In.Conflict=409]="Conflict",In[In.Gone=410]="Gone",In[In.TooManyRequests=429]="TooManyRequests",In[In.InternalServerError=500]="InternalServerError",In[In.NotImplemented=501]="NotImplemented",In[In.BadGateway=502]="BadGateway",In[In.ServiceUnavailable=503]="ServiceUnavailable",In[In.GatewayTimeout=504]="GatewayTimeout",(xn=Tn||(Tn={})).Accept="accept",xn.ContentType="content-type",(Pn||(Pn={})).ApplicationJson="application/json";const $n=[Sn.MovedPermanently,Sn.ResourceMoved,Sn.SeeOther,Sn.TemporaryRedirect,Sn.PermanentRedirect],An=[Sn.BadGateway,Sn.ServiceUnavailable,Sn.GatewayTimeout],Cn=["OPTIONS","GET","DELETE","HEAD"];class Ln extends Error{constructor(e,t){super(e),this.name="HttpClientError",this.statusCode=t,Object.setPrototypeOf(this,Ln.prototype)}statusCode;result}class Dn{constructor(e){this.message=e}message;async readBody(){return new Promise((async e=>{let t=Buffer.alloc(0);this.message.on("data",(e=>{t=Buffer.concat([t,e])})),this.message.on("end",(()=>{e(""+t)}))}))}async readBodyBuffer(){return new Promise((async e=>{const t=[];this.message.on("data",(e=>{t.push(e)})),this.message.on("end",(()=>{e(Buffer.concat(t))}))}))}}class kn{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[Tn.Accept]=this._getExistingOrDefaultHeader(t,Tn.Accept,Pn.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[Tn.Accept]=this._getExistingOrDefaultHeader(r,Tn.Accept,Pn.ApplicationJson),r[Tn.ContentType]=this._getExistingOrDefaultHeader(r,Tn.ContentType,Pn.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[Tn.Accept]=this._getExistingOrDefaultHeader(r,Tn.Accept,Pn.ApplicationJson),r[Tn.ContentType]=this._getExistingOrDefaultHeader(r,Tn.ContentType,Pn.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[Tn.Accept]=this._getExistingOrDefaultHeader(r,Tn.Accept,Pn.ApplicationJson),r[Tn.ContentType]=this._getExistingOrDefaultHeader(r,Tn.ContentType,Pn.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===Sn.Unauthorized){let e;for(const t of this.handlers)if(t.canHandleAuthentication(a)){e=t;break}return e?e.handleAuthentication(this,i,r):a}let t=this._maxRedirects;for(;a.message.statusCode&&$n.includes(a.message.statusCode)&&this._allowRedirects&&t>0;){const s=a.message.headers.location;if(!s)break;const c=new URL(s);if("https:"===o.protocol&&o.protocol!==c.protocol&&!this._allowRedirectDowngrade)throw Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.");if(await a.readBody(),c.hostname!==o.hostname)for(const e in n)"authorization"===e.toLowerCase()&&delete n[e];i=this._prepareRequest(e,c,n),a=await this.requestRaw(i,r),t--}if(!a.message.statusCode||!An.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 Dn(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=o(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?Xr:zr;const i=o?443:80;if(n.options={},n.options.host=n.parsedUrl.hostname,n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):i,n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||""),n.options.method=e,n.options.headers=this._mergeHeaders(r),null!=this.userAgent&&(n.options.headers["user-agent"]=this.userAgent),n.options.agent=this._getAgent(n.parsedUrl),this.handlers)for(const s of this.handlers)s.prepareRequest(n.options);return n}_mergeHeaders(e){return this.requestOptions&&this.requestOptions.headers?Object.assign({},jn(this.requestOptions.headers),jn(e||{})):jn(e||{})}_getExistingOrDefaultHeader(e,t,r){let n;return this.requestOptions&&this.requestOptions.headers&&(n=jn(this.requestOptions.headers)[t]),e[t]||n||r}_getAgent(e){let t;const r=o(e),n=r&&r.hostname;if(this._keepAlive&&n&&(t=this._proxyAgent),n||(t=this._agent),t)return t;const i="https:"===e.protocol;let s=100;if(this.requestOptions&&(s=this.requestOptions.maxSockets||zr.globalAgent.maxSockets),r&&r.hostname){const e={maxSockets:s,keepAlive:this._keepAlive,proxy:{...(r.username||r.password)&&{proxyAuth:`${r.username}:${r.password}`},host:r.hostname,port:r.port}};let n;const o="https:"===r.protocol;n=i?o?Nn.httpsOverHttps:Nn.httpsOverHttp:o?Nn.httpOverHttps:Nn.httpOverHttp,t=n(e),this._proxyAgent=t}if(!t){const e={keepAlive:this._keepAlive,maxSockets:s};t=i?new Xr.Agent(e):new zr.Agent(e),this._agent=t}return i&&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-BtRxTz9r.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===Sn.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 Ln(e,o);t.result=i.result,n(t)}else r(i)}))}}const jn=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{}),Un=r(Object.freeze(Object.defineProperty({__proto__:null,get Headers(){return Tn},HttpClient:kn,HttpClientError:Ln,HttpClientResponse:Dn,get HttpCodes(){return Sn},get MediaTypes(){return Pn},getProxyUrl:function(e){const t=o(new URL(e));return t?t.href:""},isHttps:function(e){return"https:"===new URL(e).protocol}},Symbol.toStringTag,{value:"Module"})));var Fn,Mn={},Gn=Wr&&Wr.__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.PersonalAccessTokenCredentialHandler=Mn.BearerCredentialHandler=Mn.BasicCredentialHandler=void 0,Mn.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 Gn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Mn.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 Gn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}},Mn.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 Gn(this,void 0,void 0,(function*(){throw Error("not implemented")}))}};var Bn,qn,Hn={},Vn={},zn={},Xn={},Wn={},Yn={},Kn={};!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=Wr&&Wr.__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=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=Wr&&Wr.__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=Wr&&Wr.__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(xr),c=i(Pr);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"}}(Kn);var Jn=Wr&&Wr.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),Qn=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zn=Wr&&Wr.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.hasOwnProperty.call(e,r)&&Jn(t,e,r);return Qn(t,e),t},eo=Wr&&Wr.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(t){i(t)}}function a(e){try{c(n.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.findInPath=Yn.which=co=Yn.mkdirP=Yn.rmRF=Yn.mv=Yn.cp=void 0;const to=jr,ro=Zn(Pr),no=Zn(Kn);Yn.cp=function(e,t,r={}){return eo(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 no.exists(t))?yield no.stat(t):null;if(s&&s.isFile()&&!n)return;const a=s&&s.isDirectory()&&i?ro.join(t,ro.basename(e)):t;if(!(yield no.exists(e)))throw Error("no such file or directory: "+e);if((yield no.stat(e)).isDirectory()){if(!o)throw Error(`Failed to copy. ${e} is a directory, but tried to copy without recursive flag.`);yield d(e,a,0,n)}else{if(""===ro.relative(e,a))throw Error(`'${a}' and '${e}' are the same file`);yield h(e,a,n)}}))},Yn.mv=function(e,t,r={}){return eo(this,void 0,void 0,(function*(){if(yield no.exists(t)){let n=!0;if((yield no.isDirectory(t))&&(t=ro.join(t,ro.basename(e)),n=yield no.exists(t)),n){if(null!=r.force&&!r.force)throw Error("Destination already exists");yield u(t)}}yield p(ro.dirname(t)),yield no.rename(e,t)}))},Yn.rmRF=u;var oo,io,so,ao,co=Yn.mkdirP=p;Yn.which=function e(t,r){return eo(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(no.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 f(t);return n&&n.length>0?n[0]:""}))},Yn.findInPath=f;var lo=v();const{GITHUB_ACTIONS:uo}=Jr;var po,fo,ho,mo,vo,yo={exports:{}};vo="win32"===process.platform||Wr.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(fo)return po;fo=1,po=t,t.sync=function(t,n){return e(r.statSync(t),t,n)};var r=xr;return po}():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(mo)return ho;mo=1,ho=e,e.sync=function(e,n){return t(r.statSync(e),n)};var r=xr;return ho}();var go=E;E.sync=function(e,t){try{return vo.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||"EACCES"===r.code)return!1;throw r}};const wo="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,_o=Pr,Eo=wo?";":":",bo=go,Oo=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),Ro=(e,t)=>{const r=t.colon||Eo,n=e.match(/\//)||wo&&e.match(/\\/)?[""]:[...wo?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],o=wo?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=wo?o.split(r):[""];return wo&&-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}=Ro(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=_o.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];bo(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 Io=So;So.sync=(e,t)=>{t=t||{};const{pathEnv:r,pathExt:n,pathExtExe:o}=Ro(e,t),i=[];for(let a=0;r.length>a;a++){const c=r[a],l=/^".*"$/.test(c)?c.slice(1,-1):c,u=_o.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(bo.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 To={exports:{}};const xo=(e={})=>{const t=e.env||process.env;return"win32"!==(e.platform||process.platform)?"PATH":Object.keys(t).reverse().find((e=>"PATH"===e.toUpperCase()))||"Path"};To.exports=xo,To.exports.default=xo;const Po=Pr,No=Io,$o=To.exports;var Ao={};const Co=/([()\][%!^"`<>&|;, *?])/g;Ao.command=function(e){return e.replace(Co,"^$1")},Ao.argument=function(e,t){return e=(e=`"${e=(e=(e=""+e).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1")}"`).replace(Co,"^$1"),t&&(e=e.replace(Co,"^$1")),e};const Lo=/^#!(.*)/,Do=xr,ko=Pr,jo=function(e){return b(e)||b(e,!0)},Uo=Ao,Fo=function(e){const t=Buffer.alloc(150);let r;try{r=Do.openSync(e,"r"),Do.readSync(r,t,0,150,0),Do.closeSync(r)}catch(n){}return((e="")=>{const t=e.match(Lo);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),o=r.split("/").pop();return"env"===o?n:n?`${o} ${n}`:o})(""+t)},Mo="win32"===process.platform,Go=/\.(?:com|exe)$/i,Bo=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i,qo="win32"===process.platform,Ho=kr,Vo=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(!Mo)return e;const t=function(e){e.file=jo(e);const t=e.file&&Fo(e.file);return t?(e.args.unshift(e.file),e.command=t,jo(e)):e.file}(e),r=!Go.test(t);if(e.options.forceShell||r){const r=Bo.test(t);e.command=ko.normalize(e.command),e.command=Uo.command(e.command),e.args=e.args.map((e=>Uo.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)},zo={hookChildProcess:function(e,t){if(!qo)return;const r=e.emit;e.emit=function(n,o){if("exit"===n){const n=R(o,t);if(n)return r.call(e,"error",n)}return r.apply(e,arguments)}},verifyENOENT:R,verifyENOENTSync:function(e,t){return qo&&1===e&&!t.file?O(t.original,"spawnSync"):null},notFoundError:O};yo.exports=S,yo.exports.spawn=S,yo.exports.sync=function(e,t,r){const n=Vo(e,t,r),o=Ho.spawnSync(n.command,n.args,n.options);return o.error=o.error||zo.verifyENOENTSync(o.status,n),o},yo.exports._parse=Vo,yo.exports._enoent=zo;const Xo=t(yo.exports),Wo=({env:e=Mr.env,...t}={})=>{const r=I({env:e={...e}});return t.path=e[r],e[r]=(({cwd:e=Mr.cwd(),path:t=Mr.env[I()],preferLocal:r=!0,execPath:n=Mr.execPath,addExecPath:o=!0}={})=>{const i=e instanceof URL?Br.fileURLToPath(e):e,s=Pr.resolve(i),a=[];return r&&((e,t)=>{let r;for(;r!==t;)e.push(Pr.join(t,"node_modules/.bin")),r=t,t=Pr.resolve(t,"..")})(a,s),o&&((e,t,r)=>{const n=t instanceof URL?Br.fileURLToPath(t):t;e.push(Pr.resolve(r,n,".."))})(a,n,s),[...a,t].join(Pr.delimiter)})(t),e},Yo=(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);!Ko(o,i)&&n||Object.defineProperty(e,r,i)},Ko=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)},Jo=(e,t)=>`/* Wrapped ${e}*/\n${t}`,Qo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Zo=Object.getOwnPropertyDescriptor(function(){}.toString,"name"),ei=new WeakMap,ti=(e,t={})=>{if("function"!=typeof e)throw new TypeError("Expected a function");let r,n=0;const o=e.displayName||e.name||"<anonymous>",i=function(...s){if(ei.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))Yo(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=Jo.bind(null,n,""+t);Object.defineProperty(o,"name",Zo),Object.defineProperty(e,"toString",{...Qo,value:o})})(e,t,n)}(i,e),ei.set(i,n),i};ti.callCount=e=>{if(!ei.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return ei.get(e)};const ri=(e,t)=>({name:"SIGRT"+(t+1),number:ni+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),ni=34,oi=[{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"}],ii=()=>{const e=Array.from({length:64-ni+1},ri);return[...oi,...e].map(si)},si=({name:e,number:t,description:r,action:n,forced:o=!1,standard:i})=>{const{signals:{[e]:s}}=Ir.constants,a=void 0!==s;return{name:e,number:a?s:t,description:r,supported:a,action:n,forced:o,standard:i}},ai=({name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s})=>[e,{name:e,number:t,description:r,supported:n,action:o,forced:i,standard:s}],ci=(()=>{const e=ii();return Object.fromEntries(e.map(ai))})(),li=(e,t)=>{const r=t.find((({name:t})=>Ir.constants.signals[t]===e));return void 0!==r?r:t.find((t=>t.number===e))};(()=>{const e=ii(),t=Array.from({length:65},((t,r)=>((e,t)=>{const r=li(e,t);if(void 0===r)return{};const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}})(r,e)));Object.assign({},...t)})();const ui=({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=Mr.cwd()}}})=>{const d=void 0===(o=null===o?void 0:o)?void 0:ci[o].description,h=(({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":void 0!==r?"failed with "+r:void 0!==n?`was killed with ${n} (${o})`:void 0!==i?"failed with exit code "+i:"failed")({timedOut:c,timeout:p,errorCode:n&&n.code,signal:o,signalDescription:d,exitCode:i=null===i?void 0:i,isCanceled:l}),m=`Command ${h}: ${s}`,v="[object Error]"==={}.toString.call(n),y=v?`${m}\n${n.message}`:m,g=[y,t,e].filter(Boolean).join("\n");return v?(n.originalMessage=n.message,n.message=g):n=Error(g),n.shortMessage=y,n.command=s,n.escapedCommand=a,n.exitCode=i,n.signal=o,n.signalDescription=d,n.stdout=e,n.stderr=t,n.cwd=f,void 0!==r&&(n.all=r),"bufferedData"in n&&delete n.bufferedData,n.failed=!0,n.timedOut=!!c,n.isCanceled=l,n.killed=u&&!c,n},pi=["stdin","stdout","stderr"];var fi,di={exports:{}},hi={exports:{}},mi=Wr.process;const vi=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(vi(mi)){var yi,gi=jr,wi=(fi||(fi=1,($i=hi).exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],"win32"!==process.platform&&$i.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),"linux"===process.platform&&$i.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),hi.exports),_i=/^win/i.test(mi.platform),Ei=Cr;"function"!=typeof Ei&&(Ei=Ei.EventEmitter),mi.__signal_exit_emitter__?yi=mi.__signal_exit_emitter__:((yi=mi.__signal_exit_emitter__=new Ei).count=0,yi.emitted={}),yi.infinite||(yi.setMaxListeners(1/0),yi.infinite=!0),di.exports=function(e,t){if(!vi(Wr.process))return function(){};gi.equal(typeof e,"function","a callback must be provided for exit handler"),!1===Si&&Ii();var r="exit";return t&&t.alwaysLast&&(r="afterexit"),yi.on(r,e),function(){yi.removeListener(r,e),0===yi.listeners("exit").length&&0===yi.listeners("afterexit").length&&bi()}};var bi=function(){Si&&vi(Wr.process)&&(Si=!1,wi.forEach((function(e){try{mi.removeListener(e,Ri[e])}catch(t){}})),mi.emit=Pi,mi.reallyExit=Ti,yi.count-=1)};di.exports.unload=bi;var Oi=function(e,t,r){yi.emitted[e]||(yi.emitted[e]=!0,yi.emit(e,t,r))},Ri={};wi.forEach((function(e){Ri[e]=function(){vi(Wr.process)&&mi.listeners(e).length===yi.count&&(bi(),Oi("exit",null,e),Oi("afterexit",null,e),_i&&"SIGHUP"===e&&(e="SIGINT"),mi.kill(mi.pid,e))}})),di.exports.signals=function(){return wi};var Si=!1,Ii=function(){!Si&&vi(Wr.process)&&(Si=!0,yi.count+=1,wi=wi.filter((function(e){try{return mi.on(e,Ri[e]),!0}catch(t){return!1}})),mi.emit=Ni,mi.reallyExit=xi)};di.exports.load=Ii;var Ti=mi.reallyExit,xi=function(e){vi(Wr.process)&&(mi.exitCode=e||0,Oi("exit",mi.exitCode,null),Oi("afterexit",mi.exitCode,null),Ti.call(mi,mi.exitCode))},Pi=mi.emit,Ni=function(e,t){if("exit"===e&&vi(Wr.process)){void 0!==t&&(mi.exitCode=t);var r=Pi.apply(this,arguments);return Oi("exit",mi.exitCode,null),Oi("afterexit",mi.exitCode,null),r}return Pi.apply(this,arguments)}}else di.exports=function(){return function(){}};var $i;const Ai=t(di.exports),Ci=(e,t="SIGTERM",r={})=>{const n=e(t);return Li(e,t,r,n),n},Li=(e,t,r,n)=>{if(!Di(t,r,n))return;const o=ji(r),i=setTimeout((()=>{e("SIGKILL")}),o);i.unref&&i.unref()},Di=(e,{forceKillAfterTimeout:t},r)=>ki(e)&&!1!==t&&r,ki=e=>e===Ir.constants.signals.SIGTERM||"string"==typeof e&&"SIGTERM"===e.toUpperCase(),ji=({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},Ui=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Fi=(e,t,r)=>{if("string"==typeof r)return e[t].pipe(xr.createWriteStream(r)),e;if(x(r))return e[t].pipe(r),e;if(!(e=>e instanceof kr.ChildProcess&&"function"==typeof e.then)(r))throw new TypeError("The second argument must be a string, a stream or an Execa child process.");if(!x(r.stdin))throw new TypeError("The target child process's stdin must be available.");return e[t].pipe(r.stdin),r};var Mi={exports:{}};const{PassThrough:Gi}=Gr,{constants:Bi}=Fr,qi=Gr,{promisify:Hi}=Lr,Vi=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 Gi({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},zi=Hi(qi.pipeline);class Xi extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}Mi.exports=P,Mi.exports.buffer=(e,t)=>P(e,{...t,encoding:"buffer"}),Mi.exports.array=(e,t)=>P(e,{...t,array:!0}),Mi.exports.MaxBufferError=Xi;const Wi=t(Mi.exports),{PassThrough:Yi}=Gr,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 Yi({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.")},Qi=async(e,t)=>{if(e&&void 0!==t){e.destroy();try{return await t}catch(r){return r.bufferedData}}},Zi=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(e&&r)return t?Wi(e,{encoding:t,maxBuffer:n}):Wi.buffer(e,{maxBuffer:n})},es=(async()=>{})().constructor.prototype,ts=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(es,e)])),rs=(e,t)=>{for(const[r,n]of ts){const o="function"==typeof t?(...e)=>Reflect.apply(n.value,t(),e):n.value.bind(t);Reflect.defineProperty(e,r,{...n,value:o})}},ns=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],os=/^[\w.-]+$/,is=/"/g,ss=(e,t)=>ns(e,t).join(" "),as=(e,t)=>ns(e,t).map((e=>(e=>"string"!=typeof e||os.test(e)?e:`"${e.replace(is,'\\"')}"`)(e))).join(" "),cs=/ +/g,ls=e=>{const t=[];for(const r of e.trim().split(cs)){const e=t[t.length-1];e&&e.endsWith("\\")?t[t.length-1]=`${e.slice(0,-1)} ${r}`:t.push(r)}return t},us=Lr.debuglog("execa").enabled,ps=(e,t)=>(e+"").padStart(t,"0"),fs=(e,{verbose:t})=>{t&&Mr.stderr.write(`[${(()=>{const e=new Date;return`${ps(e.getHours(),2)}:${ps(e.getMinutes(),2)}:${ps(e.getSeconds(),2)}.${ps(e.getMilliseconds(),3)}`})()}] ${e}\n`)},ds=(e,t,r={})=>{const n=Xo._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||Mr.cwd(),execPath:Mr.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:us,...r}).env=(({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...Mr.env,...e}:e;return r?Wo({env:i,cwd:n,execPath:o}):i})(r),r.stdio=(e=>{if(!e)return;const{stdio:t}=e;if(void 0===t)return pi.map((t=>e[t]));if((e=>pi.some((t=>void 0!==e[t])))(e))throw Error("It's not possible to provide `stdio` in combination with one of "+pi.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,pi.length)},((e,r)=>t[r]))})(r),"win32"===Mr.platform&&"cmd"===Pr.basename(e,".exe")&&t.unshift("/q"),{file:e,args:t,options:r,parsed:n}},hs=(e,t,r)=>"string"==typeof t||Fr.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 ms={},vs={};const ys=Vr.promises,{access:gs,appendFile:ws,chmod:_s,chown:Es,copyFile:bs,lchmod:Os,lchown:Rs,link:Ss,lstat:Is,mkdir:Ts,mkdtemp:xs,open:Ps,readdir:Ns,readFile:$s,readlink:As,realpath:Cs,rename:Ls,rmdir:Ds,stat:ks,symlink:js,truncate:Us,unlink:Fs,utimes:Ms,writeFile:Gs}=Vr.promises,Bs="rm"in Vr.promises?Vr.promises.rm:Lr.promisify(Vr.unlink),qs=r(Object.freeze(Object.defineProperty({__proto__:null,access:gs,appendFile:ws,chmod:_s,chown:Es,copyFile:bs,default:ys,lchmod:Os,lchown:Rs,link:Ss,lstat:Is,mkdir:Ts,mkdtemp:xs,open:Ps,readFile:$s,readdir:Ns,readlink:As,realpath:Cs,rename:Ls,rm:Bs,rmdir:Ds,stat:ks,symlink:js,truncate:Us,unlink:Fs,utimes:Ms,writeFile:Gs},Symbol.toStringTag,{value:"Module"})));Object.defineProperty(vs,"__esModule",{value:!0}),vs.sync=vs.isexe=void 0;const Hs=xr,Vs=qs;vs.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return zs(await(0,Vs.stat)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},vs.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return zs((0,Hs.statSync)(e),t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const zs=(e,t)=>e.isFile()&&Xs(e,t),Xs=(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 Ws={};Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.sync=Ws.isexe=void 0;const Ys=xr,Ks=qs;Ws.isexe=async(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Js(await(0,Ks.stat)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}},Ws.sync=(e,t={})=>{const{ignoreErrors:r=!1}=t;try{return Js((0,Ys.statSync)(e),e,t)}catch(n){if(r||"EACCES"===n.code)return!1;throw n}};const Js=(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=Wr&&Wr.__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=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=Wr&&Wr.__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=Wr&&Wr.__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(vs);e.posix=i;const s=n(Ws);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}(ms);const{isexe:Zs,sync:ea}=ms,{join:ta,delimiter:ra,sep:na,posix:oa}=Pr,ia="win32"===process.platform,sa=RegExp(`[${oa.sep}${na===oa.sep?"":na}]`.replace(/(\\)/g,"\\$1")),aa=RegExp("^\\."+sa.source),ca=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),la=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=ra})=>{const o=e.match(sa)?[""]:[...ia?[process.cwd()]:[],...(t||"").split(n)];if(ia){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:[""]}},ua=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&aa.test(t)?t.slice(0,2):"")+ta(r,t)},pa=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=la(e,t),i=[];for(const s of r){const r=ua(s,e);for(const e of n){const n=r+e;if(await Zs(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 ca(e)};var fa=pa;pa.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=la(e,t),i=[];for(const s of r){const r=ua(s,e);for(const e of n){const n=r+e;if(ea(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 ca(e)};const da=t(fa);let ha;var ma,va={};C(va,"hasSudo",(()=>L)),C(va,"isRoot",(()=>D)),C(va,"isSudo",(()=>k)),C(va,"prependSudo",(()=>j)),C(va,"defaultExecOptions",(()=>ya)),C(va,"execRootSync",(()=>U)),C(va,"execRoot",(()=>F));let ya={stdio:"inherit",shell:!0};C(ma={},"isAdminWindows",(()=>ga)),C(ma,"isAdminPosix",(()=>wa)),C(ma,"isAdmin",(()=>B));let ga=async function(){var e;if("win32"!==process.platform)return!1;try{return await N("fsutil",["dirty","query",null!=(e=process.env.systemdrive)?e:""]),!0}catch(t){return"ENOENT"===t.code&&async function(){try{return await N("fltmc"),!0}catch{return!1}}()}},wa=D;C({},"grantUserWriteAccess",(()=>q));var _a,Ea,ba,Oa,Ra,Sa,Ia,Ta,xa,Pa,Na,$a,Aa,Ca,La=function(e){return null!=e},Da=La,ka=[].forEach,ja=Object.create,Ua=function(e){var t=ja(null);return ka.call(arguments,(function(e){Da(e)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(e),t)})),t},Fa="function"==typeof(ba=Math.sign)&&1===ba(10)&&-1===ba(-20)?Math.sign:Ea?_a:(Ea=1,_a=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}),Ma=Math.abs,Ga=Math.floor,Ba=Math.max,qa=function(e){return Ba(0,function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?Fa(e)*Ga(Ma(e)):e}(e))},Ha=qa,Va=function(e,t,r){var n;return isNaN(e)?0>(n=t)?1:r&&n?n-1:n:!1!==e&&Ha(e)},za=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e},Xa=La,Wa=function(e){if(!Xa(e))throw new TypeError("Cannot use null or undefined");return e},Ya=za,Ka=Wa,Ja=function(){}.bind,Qa=function(){}.call,Za=Object.keys,ec={}.propertyIsEnumerable,tc=(Oa="forEach",function(e,t){var r,n=arguments[2],o=arguments[3];return e=Object(Ka(e)),Ya(t),r=Za(e),o&&r.sort("function"==typeof o?Ja.call(o,e):void 0),"function"!=typeof Oa&&(Oa=r[Oa]),Qa.call(Oa,r,(function(r,o){return ec.call(e,r)?Qa.call(t,n,e[r],r,e,o):undefined}))}),rc={},nc={exports:{}},oc="function"==typeof(Ca=Object.assign)&&(Ca(Aa={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),Aa.foo+Aa.bar+Aa.trzy==="razdwatrzy")?Object.assign:function(){if($a)return Na;$a=1;var e=Pa?xa:(Pa=1,xa=(Sa?Ra:(Sa=1,Ra=function(){try{return!0}catch(e){return!1}}))()?Object.keys:function(){if(Ta)return Ia;Ta=1;var e=La,t=Object.keys;return Ia=function(r){return t(e(r)?Object(r):r)}}()),t=Wa,r=Math.max;return Na=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},Na}(),ic=La,sc={function:!0,object:!0},ac=function(e){return ic(e)&&sc[typeof e]||!1};!function(e){var t=oc,r=ac,n=La,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}}(nc);var cc,lc,uc,pc,fc=nc.exports,dc={exports:{}},hc=qa;try{Object.defineProperty((function(e,t){return t}),"length",{configurable:!0,writable:!1,enumerable:!1,value:1})}catch(dy){}pc=H(),uc=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); };")}}(),dc.exports=function(e,t){var r;if(t=hc(t),e.length===t)return e;r=uc(t)(e);try{pc(r,e)}catch(dy){}return r};var mc,vc,yc=dc.exports,gc={exports:{}},wc=function(e){return null!=e},_c=wc,Ec={object:!0,function:!0,undefined:!0},bc=function(e){if(!function(e){return!!_c(e)&&hasOwnProperty.call(Ec,typeof e)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}},Oc=/^\s*class[\s{/}]/,Rc=function(){}.toString,Sc="razdwatrzy",Ic="function"==typeof Sc.contains&&!0===Sc.contains("dwa")&&!1===Sc.contains("foo")?"".contains:function(){if(vc)return mc;vc=1;var e="".indexOf;return mc=function(t){return e.call(this,t,arguments[1])>-1}}(),Tc=wc,xc=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!bc(e)}(e)&&!Oc.test(Rc.call(e))},Pc=oc,Nc=Ua,$c=Ic;(gc.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],Tc(e)?(r=$c.call(e,"c"),n=$c.call(e,"e"),o=$c.call(e,"w")):(r=o=!0,n=!1),s={value:t,configurable:r,enumerable:n,writable:o},i?Pc(Nc(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],Tc(t)?xc(t)?Tc(r)?xc(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,Tc(e)?(n=$c.call(e,"c"),o=$c.call(e,"e")):(n=!0,o=!1),s={get:t,set:r,configurable:n,enumerable:o},i?Pc(Nc(i),s):s};var Ac=gc.exports,Cc={exports:{}};!function(e,t){var r,n,o,i,s,a,c,l=Ac,u=za,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}(Cc,Cc.exports);var 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,al,cl,ll,ul,pl,fl,dl,hl,ml=Cc.exports,vl=W(),yl=Array.isArray,gl=La,wl=za,_l=[].slice;hl=function(e){return this.map((function(t,r){return t?t(e[r]):e[r]})).concat(_l.call(e,this.length))};var El,bl,Ol,Rl,Sl,Il,Tl,xl,Pl,Nl,$l,Al,Cl,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,su,au,cu,lu,uu,pu,fu,du,hu=za,mu=fc,vu=yc,yu=Ac,gu=ml.methods,wu=function(e){return(t=e,e=yl(t)?t:vl(t)).forEach((function(e){gl(e)&&wl(e)})),hl.bind(e);var t},_u=function(){}.apply,Eu=function(){}.call,bu=Object.create,Ou=Object.defineProperties,Ru=gu.on,Su=gu.emit,Iu=za,Tu=tc,xu=rc,Pu=function(e,t,r){var n,o,i,s,a,c,l,u,p,f,d,h,m,v,y,g=bu(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:hu(e.get)},void 0!==e.set?(t.set=hu(e.set),e.delete&&(t.delete=hu(e.delete)),e.clear&&(t.clear=hu(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=wu(r.resolvers)),v=i?vu((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?Eu.call(e,this,a[0]):_u.call(e,this,a),null===r){if(null!==(r=i(a)))throw mu("Circular invocation","CIRCULAR_INVOCATION");r=s(a)}else if(hasOwnProperty.call(g,r))throw mu("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?_u.call(e,this,arguments):Eu.call(e,this),hasOwnProperty.call(g,"data"))throw mu("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?Eu.call(e,this,i[0]):_u.call(e,this,i),hasOwnProperty.call(g,o))throw mu("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=bu(null),n.emit("clear",e)},on:function(e,t){return"get"===e?d=!0:"set"===e?h=!0:"delete"===e&&(m=!0),Ru.call(this,e,t)},emit:Su,updateEnv:function(){e=n.original}},l=i?vu((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=vu((function(){var e,r=arguments;return 0===t?g.data:(y&&(r=y(r)),e=i?i(r):r[0]+"",g[e])})),p=vu((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))})),Ou(v,{__memoized__:yu(!0),delete:yu(l),clear:yu(n.clear),_get:yu(u),_has:yu(p)}),n},Nu=Va,$u={},Au={},Cu={exports:{}},Lu={},Du={},ku={},ju={},Uu=Ua,Fu=Va,Mu=function e(t){var r,n,o;if(Iu(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=Nu(r.length,t.length,r.async&&xu.async),o=Pu(t,n,r),Tu(xu,(function(e,t){r[t]&&e(r[t],o,r)})),e.__profiler__&&e.__profiler__(o),o.updateEnv(),o.memoized)},Gu=function(e){var t,r=Uu(arguments[1]);return r.normalizer||0!==(t=r.length=Fu(r.length,e.length,r.async))&&(r.primitive?!1===t?r.normalizer=(bl||(bl=1,El=function(e){var t,r,n=e.length;if(!n)return"";for(t=e[r=0]+"";--n;)t+=""+e[++r];return t}),El):t>1&&(r.normalizer=(Rl||(Rl=1,Ol=function(e){return e?function(t){for(var r=t[0]+"",n=0,o=e;--o;)r+=""+t[++n];return r}:function(){return""}}),Ol)(t)):r.normalizer=!1===t?function(){if(Ll)return Cl;Ll=1;var e=Y(),t=Object.create;return Cl=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)}}},Cl}()():1===t?function(){if(kl)return Dl;kl=1;var e=Y();return Dl=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(Ul)return jl;Ul=1;var e=Y(),t=Object.create;return jl=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)}}},jl}()(t)),r.async&&function(){if(ql)return $u;ql=1;var e=W(),t=K(),r=H(),n=yc,o=J(),i=[].slice,s=function(){}.apply,a=Object.create;rc.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(dy){}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&&ee(),r.dispose&&function(){if(ou)return Lu;ou=1;var e=za,t=tc,r=rc,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(lu)return Du;lu=1;var e=W(),t=tc,r=J(),n=Z(),o=function(){if(cu)return au;cu=1;var e=qa,t=su?iu:(su=1,iu=2147483647);return au=function(r){if((r=e(r))>t)throw new TypeError(r+" exceeds maximum possible timeout");return r}}(),i=rc,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(Number(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(fu)return ku;fu=1;var e=qa,t=function(){if(pu)return uu;pu=1;var e=qa,t=Object.create,r={}.hasOwnProperty;return uu=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=rc;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(du)return ju;du=1;var e=Ac,t=rc,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}))})}}(),Mu(e,r)};const Bu=t(Gu),qu=/^~(?=$|\/|\\)/,{appendFile:Hu,readFile:Vu,writeFile:zu}=xr.promises,Xu=re("~/.bashrc"),Wu=Bu((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([ne(e),oe(t,re("~/.bashrc")),oe(t,re("~/.profile"))])}catch(r){g(`Failed to add ${t} to .profile or .bashrc. You should add it manually: ${r}`)}}),{promise:!0}),Yu=Ir,Ku="win32"!==Yu.platform(),Ju=Yu.release(),Qu=/(\d+\.\d+)\.(\d+)/,Zu=t((function(e){return Ku?e.replace(/(\s+)/g,"\\$1"):((e="",t="")=>/1\d+\.\d+/.test(e)&&Number(t)>=17134.1184)(...Qu.exec(Ju).splice(1))?e:e.replace(/(\s+)/g,"%20")}));var ep,tp,rp,np,op={exports:{}};rp=function(){if(tp)return ep;tp=1;var e=/[|\\{}()[\]^$+*?.]/g;return ep=function(t){if("string"!=typeof t)throw new TypeError("Expected a string");return t.replace(e,"\\$&")}}(),np=function(e){return e.split("").reverse().join("")},op.exports=function(e,t,r){var n;return null==t&&(t="'"),null==r&&(r="\\"),"string"!=typeof e?e:(n=RegExp("(["+rp(t)+"])(?!"+rp(r)+")","g"),np(np(e).replace(n,"$1"+r)))};const ip=t(op.exports),{GITHUB_ACTIONS:sp}=Jr,{appendFile:ap}=xr.promises,{GITHUB_ACTIONS:cp}=Jr,{appendFile:lp}=xr.promises,up=[/\/usr\/bin\/?/,/\/usr\/local\/bin\/?/];var pp={exports:{}},fp={exports:{}}.exports=!("undefined"==typeof process||!process.versions||!process.versions.node);!function(e){function t(e){Array.isArray(e)||(e=[e]);for(const t of e)i[t.id]=t}function r(e,t,r){if(n(e),!r||"object"!=typeof r)throw Error("List of variants should be specified as a valid object");return r[i[e].handler(t)]||void 0}function n(r){if(!function(e){return!!i[e]}(r)){if(!o)throw Error(`Locale: ${r} is not registered with numerous. You need to manually register it before use`);!function(r){try{t((0,e.require)(`${__dirname}/../locales/${r}.js`))}catch(n){throw Error("Failed to require locale: "+r)}}(r)}}const o=fp,i={};e.exports={create:function(e){return n(e),{pluralize:(t,n)=>r(e,t,n)}},registerLocale:t,pluralize:r}}(pp);const dp=t(pp.exports);var hp={id:"en",handler:function(e){const t=Number(e),r=Math.floor(Math.abs(e)),n=(""+e).replace(/^[^.]*\.?/,"").length;if(isNaN(t))throw Error("n is not a number");return 1===r&&0===n?"one":"other"}};const mp=t(hp);var vp={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{le(__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}}()}(vp);const yp=vp.exports,gp=fp,wp=[["years",290304e5],["months",24192e5],["weeks",6048e5],["days",864e5],["hours",36e5],["minutes",6e4],["seconds",1e3]],_p={locale:"en",span:2,delimiter:", ",unitType:"long",unitTypeLookupOrder:["long","short","narrow"],autoloadLocales:!0},Ep={},bp=t({create:function(e){return e=Object.assign({},_p,e||{}),{format:function(t,r,n){return function(e,t,r){if(function(e,t){const{autoload:r}=t;if(!Ep[e]){if(!gp||!r)throw Error(`Missing locale: ${e}, you must load it manually before using it`);!function(e){try{ue(le(`../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 wp.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(pe(e,t,r)),o.length>=r.span)break}return o.join(r.delimiter)}(t,r,n=Object.assign({},e,n||{}))}}},addLocale:ue,defaultConfig:_p}),Op=t({id:"en",data:{long:{years:{one:"{0} year",other:"{0} years"},months:{one:"{0} month",other:"{0} months"},weeks:{one:"{0} week",other:"{0} weeks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hour",other:"{0} hours"},minutes:{one:"{0} minute",other:"{0} minutes"},seconds:{one:"{0} second",other:"{0} seconds"}},narrow:{years:{one:"{0}y",other:"{0}y"},months:{one:"{0}m",other:"{0}m"},weeks:{one:"{0}w",other:"{0}w"},days:{one:"{0}d",other:"{0}d"},hours:{one:"{0}h",other:"{0}h"},minutes:{one:"{0}m",other:"{0}m"},seconds:{one:"{0}s",other:"{0}s"}},short:{years:{one:"{0} yr",other:"{0} yrs"},months:{one:"{0} mth",other:"{0} mths"},weeks:{one:"{0} wk",other:"{0} wks"},days:{one:"{0} day",other:"{0} days"},hours:{one:"{0} hr",other:"{0} hr"},minutes:{one:"{0} min",other:"{0} min"},seconds:{one:"{0} sec",other:"{0} sec"}}}});var Rp={exports:{}},Sp={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Ip="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:o}=Sp,i=Ip,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*$")}(Rp,Rp.exports);var Tp=Rp.exports;const xp=Object.freeze({loose:!0}),Pp=Object.freeze({});var Np=e=>e?"object"!=typeof e?xp:e:Pp;const $p=/^[0-9]+$/,Ap=(e,t)=>{const r=$p.test(e),n=$p.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:t>e?-1:1};var Cp={compareIdentifiers:Ap,rcompareIdentifiers:(e,t)=>Ap(t,e)};const Lp=Ip,{MAX_LENGTH:Dp,MAX_SAFE_INTEGER:kp}=Sp,{safeRe:jp,t:Up}=Tp,Fp=Np,{compareIdentifiers:Mp}=Cp;var Gp=class e{constructor(t,r){if(r=Fp(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>Dp)throw new TypeError(`version is longer than ${Dp} characters`);Lp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?jp[Up.LOOSE]:jp[Up.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>kp||0>this.major)throw new TypeError("Invalid major version");if(this.minor>kp||0>this.minor)throw new TypeError("Invalid minor version");if(this.patch>kp||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&&kp>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(Lp("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)),Mp(this.major,t.major)||Mp(this.minor,t.minor)||Mp(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(Lp("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 Mp(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(Lp("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 Mp(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=Number(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===Mp(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 Bp=Gp;var qp=(e,t,r=!1)=>{if(e instanceof Bp)return e;try{return new Bp(e,t)}catch(n){if(!r)return null;throw n}};const Hp=qp;var Vp=(e,t)=>{const r=Hp(e,t);return r?r.version:null};const zp=t(Vp),Xp=qp;const Wp=Gp;const Yp=qp;const Kp=Gp;var Jp=(e,t)=>new Kp(e,t).major;const Qp=t(Jp),Zp=Gp;const ef=Gp;const tf=qp;const rf=Gp;var nf=(e,t,r)=>new rf(e,r).compare(new rf(t,r));const of=t(nf),sf=nf;const af=nf;const cf=Gp;var lf=(e,t,r)=>{const n=new cf(e,r),o=new cf(t,r);return n.compare(o)||n.compareBuild(o)};const uf=lf;const pf=lf;const ff=nf;var df=(e,t,r)=>ff(e,t,r)>0;const hf=nf;var mf=(e,t,r)=>0>hf(e,t,r);const vf=nf;var yf=(e,t,r)=>0===vf(e,t,r);const gf=nf;var wf=(e,t,r)=>0!==gf(e,t,r);const _f=nf;var Ef=(e,t,r)=>_f(e,t,r)>=0;const bf=nf;var Of=(e,t,r)=>0>=bf(e,t,r);const Rf=t(Of),Sf=yf,If=wf,Tf=df,xf=Ef,Pf=mf,Nf=Of;var $f=(e,t,r,n)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return Sf(e,r,n);case"!=":return If(e,r,n);case">":return Tf(e,r,n);case">=":return xf(e,r,n);case"<":return Pf(e,r,n);case"<=":return Nf(e,r,n);default:throw new TypeError("Invalid operator: "+t)}};const Af=Gp,Cf=qp,{safeRe:Lf,t:Df}=Tp;var kf=(e,t)=>{if(e instanceof Af)return e;if("number"==typeof e&&(e+=""),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?Lf[Df.COERCERTLFULL]:Lf[Df.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?Lf[Df.COERCEFULL]:Lf[Df.COERCE]);return null===r?null:Cf(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}${t.includePrerelease&&r[5]?"-"+r[5]:""}${t.includePrerelease&&r[6]?"+"+r[6]:""}`,t)};const jf=t(kf);var Uf,Ff,Mf,Gf,Bf=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 qf=fe();var Hf=(e,t,r)=>{try{t=new qf(t,r)}catch(n){return!1}return t.test(e)};const Vf=t(Hf),zf=fe();const Xf=Gp,Wf=fe();const Yf=Gp,Kf=fe();const Jf=Gp,Qf=fe(),Zf=df;const ed=fe();const td=Gp,rd=de(),{ANY:nd}=rd,od=fe(),id=Hf,sd=df,ad=mf,cd=Of,ld=Ef;var ud=(e,t,r,n)=>{let o,i,s,a,c;switch(e=new td(e,n),t=new od(t,n),r){case">":o=sd,i=cd,s=ad,a=">",c=">=";break;case"<":o=ad,i=ld,s=sd,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(id(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===nd&&(e=new rd(">=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 pd=ud;const fd=ud;const dd=fe();const hd=Hf,md=nf,vd=fe(),yd=de(),{ANY:gd}=yd,wd=Hf,_d=nf,Ed=[new yd(">=0.0.0-0")],bd=[new yd(">=0.0.0")],Od=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===gd){if(1===t.length&&t[0].semver===gd)return!0;e=r.includePrerelease?Ed:bd}if(1===t.length&&t[0].semver===gd){if(r.includePrerelease)return!0;t=bd}const n=new Set;let o,i,s,a,c,l,u;for(const d of e)">"===d.operator||">="===d.operator?o=Rd(o,d,r):"<"===d.operator||"<="===d.operator?i=Sd(i,d,r):n.add(d.semver);if(n.size>1)return null;if(o&&i){if(s=_d(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&&!wd(d,o+"",r))return null;if(i&&!wd(d,i+"",r))return null;for(const e of t)if(!wd(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=Rd(o,d,r),a===d&&a!==o)return!1}else if(">="===o.operator&&!wd(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=Sd(i,d,r),c===d&&c!==i)return!1}else if("<="===i.operator&&!wd(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)},Rd=(e,t,r)=>{if(!e)return t;const n=_d(e.semver,t.semver,r);return n>0?e:0>n||">"===t.operator&&">="===e.operator?t:e},Sd=(e,t,r)=>{if(!e)return t;const n=_d(e.semver,t.semver,r);return 0>n?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};const Id=Tp,Td=Sp,xd=Gp,Pd=Cp;var Nd={parse:qp,valid:Vp,clean:(e,t)=>{const r=Xp(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},inc:(e,t,r,n,o)=>{"string"==typeof r&&(o=n,n=r,r=void 0);try{return new Wp(e instanceof Wp?e.version:e,r).inc(t,n,o).version}catch(i){return null}},diff:(e,t)=>{const r=Yp(e,null,!0),n=Yp(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:Jp,minor:(e,t)=>new Zp(e,t).minor,patch:(e,t)=>new ef(e,t).patch,prerelease:(e,t)=>{const r=tf(e,t);return r&&r.prerelease.length?r.prerelease:null},compare:nf,rcompare:(e,t,r)=>sf(t,e,r),compareLoose:(e,t)=>af(e,t,!0),compareBuild:lf,sort:(e,t)=>e.sort(((e,r)=>uf(e,r,t))),rsort:(e,t)=>e.sort(((e,r)=>pf(r,e,t))),gt:df,lt:mf,eq:yf,neq:wf,gte:Ef,lte:Of,cmp:$f,coerce:kf,Comparator:de(),Range:fe(),satisfies:Hf,toComparators:(e,t)=>new zf(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 Wf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&-1!==o.compare(e)||(n=e,o=new Xf(n,r)))})),n},minSatisfying:(e,t,r)=>{let n=null,o=null,i=null;try{i=new Kf(t,r)}catch(s){return null}return e.forEach((e=>{i.test(e)&&(n&&1!==o.compare(e)||(n=e,o=new Yf(n,r)))})),n},minVersion:(e,t)=>{e=new Qf(e,t);let r=new Jf("0.0.0");if(e.test(r))return r;if(r=new Jf("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 Jf(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 ed(e,t).range||"*"}catch(r){return null}},outside:ud,gtr:(e,t,r)=>pd(e,t,">",r),ltr:(e,t,r)=>fd(e,t,"<",r),intersects:(e,t,r)=>(e=new dd(e,r),t=new dd(t,r),e.intersects(t,r)),simplifyRange:(e,t,r)=>{const n=[];let o=null,i=null;const s=e.sort(((e,t)=>md(e,t,r)));for(const l of s)hd(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 vd(e,r),t=new vd(t,r);let n=!1;e:for(const o of e.set){for(const e of t.set){const t=Od(o,e,r);if(n=n||null!==t,t)continue e}if(n)return!1}return!0},SemVer:xd,re:Id.re,src:Id.src,tokens:Id.t,SEMVER_SPEC_VERSION:Td.SEMVER_SPEC_VERSION,RELEASE_TYPES:Td.RELEASE_TYPES,compareIdentifiers:Pd.compareIdentifiers,rcompareIdentifiers:Pd.rcompareIdentifiers},$d=Nd,Ad=Ir,Cd=Pr,Ld=xr,Dd=$r,kd=Mr.env.npm_package_json,jd=Mr.env.npm_config_user_agent,Ud=!(!jd||!jd.startsWith("npm")),Fd=!(!kd||!kd.endsWith("package.json")),Md=Ud||Fd,Gd=!(!jd||!jd.startsWith("yarn")),Bd=Md||Gd,qd=Ad.homedir(),Hd=process.env.XDG_CONFIG_HOME||Cd.join(qd,".config","simple-update-notifier"),Vd=function(e){return Cd.join(Hd,"".concat(e.replace("@","").replace("/","__"),".json"))},zd=function(e,t){return he(void 0,0,void 0,(function(){var r;return me(this,(function(n){return r="https://registry.npmjs.org/-/package/".concat(e,"/dist-tags"),[2,new Promise((function(e,n){Dd.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)}))}))]}))}))},Xd=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 he(void 0,0,void 0,(function(){var r,o;return me(this,(function(c){switch(c.label){case 0:return Ld.existsSync(Hd)||Ld.mkdirSync(Hd,{recursive:!0}),r=function(t){var r=Vd(t);try{if(!Ld.existsSync(r))return;return JSON.parse(Ld.readFileSync(r,"utf8")).lastUpdateCheck}catch(e){return}}(t.name),s||!r||r<(new Date).getTime()-n?[4,zd(t.name,i)]:[3,2];case 1:return o=c.sent(),l=Vd(t.name),Ld.writeFileSync(l,JSON.stringify({lastUpdateCheck:(new Date).getTime()})),$d.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 Wd=t((function(e){return he(void 0,0,void 0,(function(){var t,r;return me(this,(function(n){switch(n.label){case 0:if(!e.alwaysRun&&(!process.stdout.isTTY||Bd&&!e.shouldNotifyInNpmScript))return e.debug&&console.error("Opting out of running simpleUpdateNotifier()"),[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Xd(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]}}))}))})),Yd={name:"setup-cpp",version:"0.44.0"};var Kd={};!function(e){function t(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(e,"__esModule",{value:!0}),e.DownloaderHelper=e.DH_STATES=void 0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){function e(e,t){for(var r,n=0;t.length>n;n++)(r=t[n]).enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=t(xr),s=Br,a=t(Pr),c=t(Nr),l=t($r),u=Cr,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)}(Kd);const{GITHUB_ACTIONS:Jd}=Jr,{appendFile:Qd}=xr.promises,Zd="Dpkg::Lock::Timeout=300";let eh=!1;const th=Bu((function(e=Ee()){U(e,"nala"!==e?["update","-y","-o",Zd]:["update","-o",Zd],{...ya,env:we(e)}),eh=!0}));var rh,nh;(nh=rh||(rh={}))[nh.NameDashVersion=0]="NameDashVersion",nh[nh.NameEqualsVersion=1]="NameEqualsVersion",nh[nh.Name=2]="Name",nh[nh.None=3]="None";const oh=Bu((async function(e){th(e);const t=await Re([{name:"ca-certificates"},{name:"gnupg"},{name:"apt-utils"}],e);0!==t.length&&U(e,["install","-y","--fix-broken","-o",Zd,...t],{...ya,env:we(e)})}),{promise:!0}),ih=["E: Could not get lock","dpkg: error processing archive","dpkg: error: dpkg status database is locked by another process"],sh="/etc/apt/trusted.gpg.d",ah="keyserver.ubuntu.com";let ch,lh=!1;const{isexe:uh,sync:ph}=ms,{join:fh,delimiter:dh,sep:hh,posix:mh}=Pr,vh="win32"===process.platform,yh=RegExp(`[${mh.sep}${hh===mh.sep?"":hh}]`.replace(/(\\)/g,"\\$1")),gh=RegExp("^\\."+yh.source),wh=e=>Object.assign(Error("not found: "+e),{code:"ENOENT"}),_h=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=dh})=>{const o=e.match(yh)?[""]:[...vh?[process.cwd()]:[],...(t||"").split(n)];if(vh){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:[""]}},Eh=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&gh.test(t)?t.slice(0,2):"")+fh(r,t)},bh=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=_h(e,t),i=[];for(const s of r){const r=Eh(s,e);for(const e of n){const n=r+e;if(await uh(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 wh(e)};var Oh=bh;bh.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:o}=_h(e,t),i=[];for(const s of r){const r=Eh(s,e);for(const e of n){const n=r+e;if(ph(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 wh(e)};const Rh=t(Oh);let Sh,Ih,Th,xh,Ph=!1,Nh=!1,$h=!1;const Ah=/Version\s*:\s*(.*)/g;let Ch=!1;var Lh=Pr;const Dh=t((function(e,t){if("string"!=typeof e)return e;if(0===e.length)return e;var r,n=Lh.basename(e,Lh.extname(e))+t,o=Lh.join(Lh.dirname(e),n);return(r=e.slice(0,2))==="."+Lh.sep||"./"===r?"."+Lh.sep+o:o}));var kh={},jh={};qe(jh,"name",(()=>He));var Uh={};qe(Uh,"normalizeTrim",(()=>Ve));var Fh={};qe(Fh,"addExeExt",(()=>ze));var Mh={};qe(Mh,"addNamePrefix",(()=>Xe));var Gh={};qe(Gh,"addNameSuffix",(()=>We));var Bh={};qe(Bh,"addShExt",(()=>Ye));var qh={};qe(qh,"addShRelativePrefix",(()=>Ke));var Hh={};qe(Hh,"removeExt",(()=>Je));var Vh={};qe(Vh,"replaceExt",(()=>Qe));var zh={};qe(zh,"isPathInside",(()=>Ze)),Be(kh,jh),Be(kh,Uh),Be(kh,Fh),Be(kh,Mh),Be(kh,Gh),Be(kh,Bh),Be(kh,qh),Be(kh,Hh),Be(kh,Vh),Be(kh,zh);const Xh=["x64","amd64","x86_64","win64","64","amd64_x86"],Wh=["x86","i386","ia32","win32","32","x32"],Yh=["aarch64","arm64","woa64","arm"],Kh=["armv7","armv7a"],Jh=["powerpc64le","ppc64le"],Qh=["sparc64"];var Zh={},em={exports:{}},tm={exports:{}};!function(e,t){function r(e){N[e]=$++}function n(e){for(var t=0;C.length>t;t++){var r=C[t][0],n=C[t][1];e=e.split(r+"*").join(r+"{0,"+n+"}").split(r+"+").join(r+"{1,"+n+"}")}return e}function o(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof i)return e;if("string"!=typeof e)return null;if(e.length>R)return null;if(!(t.loose?x[N.LOOSE]:x[N.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[N.LOOSE]:x[N.FULL]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>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,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(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(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=tm.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=[],N=t.tokens={},$=0,A="[a-zA-Z0-9-]",C=[["\\s",1],["\\d",R],[A,I]];r("NUMERICIDENTIFIER"),P[N.NUMERICIDENTIFIER]="0|[1-9]\\d*",r("NUMERICIDENTIFIERLOOSE"),P[N.NUMERICIDENTIFIERLOOSE]="\\d+",r("NONNUMERICIDENTIFIER"),P[N.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+A+"*",r("MAINVERSION"),P[N.MAINVERSION]="("+P[N.NUMERICIDENTIFIER]+")\\.("+P[N.NUMERICIDENTIFIER]+")\\.("+P[N.NUMERICIDENTIFIER]+")",r("MAINVERSIONLOOSE"),P[N.MAINVERSIONLOOSE]="("+P[N.NUMERICIDENTIFIERLOOSE]+")\\.("+P[N.NUMERICIDENTIFIERLOOSE]+")\\.("+P[N.NUMERICIDENTIFIERLOOSE]+")",r("PRERELEASEIDENTIFIER"),P[N.PRERELEASEIDENTIFIER]="(?:"+P[N.NUMERICIDENTIFIER]+"|"+P[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASEIDENTIFIERLOOSE"),P[N.PRERELEASEIDENTIFIERLOOSE]="(?:"+P[N.NUMERICIDENTIFIERLOOSE]+"|"+P[N.NONNUMERICIDENTIFIER]+")",r("PRERELEASE"),P[N.PRERELEASE]="(?:-("+P[N.PRERELEASEIDENTIFIER]+"(?:\\."+P[N.PRERELEASEIDENTIFIER]+")*))",r("PRERELEASELOOSE"),P[N.PRERELEASELOOSE]="(?:-?("+P[N.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+P[N.PRERELEASEIDENTIFIERLOOSE]+")*))",r("BUILDIDENTIFIER"),P[N.BUILDIDENTIFIER]=A+"+",r("BUILD"),P[N.BUILD]="(?:\\+("+P[N.BUILDIDENTIFIER]+"(?:\\."+P[N.BUILDIDENTIFIER]+")*))",r("FULL"),r("FULLPLAIN"),P[N.FULLPLAIN]="v?"+P[N.MAINVERSION]+P[N.PRERELEASE]+"?"+P[N.BUILD]+"?",P[N.FULL]="^"+P[N.FULLPLAIN]+"$",r("LOOSEPLAIN"),P[N.LOOSEPLAIN]="[v=\\s]*"+P[N.MAINVERSIONLOOSE]+P[N.PRERELEASELOOSE]+"?"+P[N.BUILD]+"?",r("LOOSE"),P[N.LOOSE]="^"+P[N.LOOSEPLAIN]+"$",r("GTLT"),P[N.GTLT]="((?:<|>)?=?)",r("XRANGEIDENTIFIERLOOSE"),P[N.XRANGEIDENTIFIERLOOSE]=P[N.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",r("XRANGEIDENTIFIER"),P[N.XRANGEIDENTIFIER]=P[N.NUMERICIDENTIFIER]+"|x|X|\\*",r("XRANGEPLAIN"),P[N.XRANGEPLAIN]="[v=\\s]*("+P[N.XRANGEIDENTIFIER]+")(?:\\.("+P[N.XRANGEIDENTIFIER]+")(?:\\.("+P[N.XRANGEIDENTIFIER]+")(?:"+P[N.PRERELEASE]+")?"+P[N.BUILD]+"?)?)?",r("XRANGEPLAINLOOSE"),P[N.XRANGEPLAINLOOSE]="[v=\\s]*("+P[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[N.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+P[N.XRANGEIDENTIFIERLOOSE]+")(?:"+P[N.PRERELEASELOOSE]+")?"+P[N.BUILD]+"?)?)?",r("XRANGE"),P[N.XRANGE]="^"+P[N.GTLT]+"\\s*"+P[N.XRANGEPLAIN]+"$",r("XRANGELOOSE"),P[N.XRANGELOOSE]="^"+P[N.GTLT]+"\\s*"+P[N.XRANGEPLAINLOOSE]+"$",r("COERCE"),P[N.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",r("COERCERTL"),T[N.COERCERTL]=RegExp(P[N.COERCE],"g"),x[N.COERCERTL]=RegExp(n(P[N.COERCE]),"g"),r("LONETILDE"),P[N.LONETILDE]="(?:~>?)",r("TILDETRIM"),P[N.TILDETRIM]="(\\s*)"+P[N.LONETILDE]+"\\s+",T[N.TILDETRIM]=RegExp(P[N.TILDETRIM],"g"),x[N.TILDETRIM]=RegExp(n(P[N.TILDETRIM]),"g"),r("TILDE"),P[N.TILDE]="^"+P[N.LONETILDE]+P[N.XRANGEPLAIN]+"$",r("TILDELOOSE"),P[N.TILDELOOSE]="^"+P[N.LONETILDE]+P[N.XRANGEPLAINLOOSE]+"$",r("LONECARET"),P[N.LONECARET]="(?:\\^)",r("CARETTRIM"),P[N.CARETTRIM]="(\\s*)"+P[N.LONECARET]+"\\s+",T[N.CARETTRIM]=RegExp(P[N.CARETTRIM],"g"),x[N.CARETTRIM]=RegExp(n(P[N.CARETTRIM]),"g"),r("CARET"),P[N.CARET]="^"+P[N.LONECARET]+P[N.XRANGEPLAIN]+"$",r("CARETLOOSE"),P[N.CARETLOOSE]="^"+P[N.LONECARET]+P[N.XRANGEPLAINLOOSE]+"$",r("COMPARATORLOOSE"),P[N.COMPARATORLOOSE]="^"+P[N.GTLT]+"\\s*("+P[N.LOOSEPLAIN]+")$|^$",r("COMPARATOR"),P[N.COMPARATOR]="^"+P[N.GTLT]+"\\s*("+P[N.FULLPLAIN]+")$|^$",r("COMPARATORTRIM"),P[N.COMPARATORTRIM]="(\\s*)"+P[N.GTLT]+"\\s*("+P[N.LOOSEPLAIN]+"|"+P[N.XRANGEPLAIN]+")",T[N.COMPARATORTRIM]=RegExp(P[N.COMPARATORTRIM],"g"),x[N.COMPARATORTRIM]=RegExp(n(P[N.COMPARATORTRIM]),"g"),r("HYPHENRANGE"),P[N.HYPHENRANGE]="^\\s*("+P[N.XRANGEPLAIN]+")\\s+-\\s+("+P[N.XRANGEPLAIN]+")\\s*$",r("HYPHENRANGELOOSE"),P[N.HYPHENRANGELOOSE]="^\\s*("+P[N.XRANGEPLAINLOOSE]+")\\s+-\\s+("+P[N.XRANGEPLAINLOOSE]+")\\s*$",r("STAR"),P[N.STAR]="(<|>)?=?\\s*\\*";for(var L=0;$>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[N.COMPARATORLOOSE]:x[N.COMPARATOR]);if(!t)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==t[1]?t[1]:"","="===this.operator&&(this.operator=""),this.semver=t[2]?new 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),E(this.value,r,t));if(""===e.operator)return""===e.value||(r=new v(this.value,t),E(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[N.HYPHENRANGELOOSE]:x[N.HYPHENRANGE],w),O("hyphen replace",e),e=e.replace(x[N.COMPARATORTRIM],"$1$2$3"),O("comparator trim",e,x[N.COMPARATORTRIM]),e=(e=(e=e.replace(x[N.TILDETRIM],"$1~")).replace(x[N.CARETTRIM],"$1^")).split(/\s+/).join(" ");var r=t?x[N.COMPARATORLOOSE]:x[N.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[N.CARETLOOSE]:x[N.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[N.TILDELOOSE]:x[N.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[N.XRANGELOOSE]:x[N.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[N.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(_(this.set[t],e,this.options))return!0;return!1},t.satisfies=E,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[N.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&n.index+n[0].length===r.index+r[0].length||(r=n),x[N.COERCERTL].lastIndex=n.index+n[1].length+n[2].length;x[N.COERCERTL].lastIndex=-1}else r=e.match(x[N.COERCE]);return null===r?null:o(r[2]+"."+(r[3]||"0")+"."+(r[4]||"0"),t)}}(0,tm.exports);var rm=tm.exports;!function(e,t){var r=Wr&&Wr.__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=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=Wr&&Wr.__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=Wr&&Wr.__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(rm),a=v(),c=Ir,l=kr,u=xr;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}}(em,em.exports);for(var nm=em.exports,om=Tr,im=[],sm=0;256>sm;++sm)im[sm]=(sm+256).toString(16).substr(1);var am=function(){return om.randomBytes(16)},cm=function(e,t){var r=t||0;return""+im[e[r++]]+im[e[r++]]+im[e[r++]]+im[e[r++]]+"-"+im[e[r++]]+im[e[r++]]+"-"+im[e[r++]]+im[e[r++]]+"-"+im[e[r++]]+im[e[r++]]+"-"+im[e[r++]]+im[e[r++]]+im[e[r++]]+im[e[r++]]+im[e[r++]]+im[e[r++]]},lm={},um=Wr&&Wr.__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]}),pm=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),fm=Wr&&Wr.__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)&&um(t,e,r);return pm(t,e),t},dm=Wr&&Wr.__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(lm,"__esModule",{value:!0}),lm.RetryHelper=void 0;const hm=fm(v());lm.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 dm(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;hm.info(n.message)}const o=this.getSleepAmount();hm.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 dm(this,void 0,void 0,(function*(){return new Promise((t=>setTimeout(t,1e3*e)))}))}};var mm=Wr&&Wr.__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]}),vm=Wr&&Wr.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ym=Wr&&Wr.__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)&&mm(t,e,r);return vm(t,e),t},gm=Wr&&Wr.__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())}))},wm=Wr&&Wr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.evaluateVersions=Zh.isExplicitVersion=exports.findFromManifest_1=Zh.findFromManifest=exports.getManifestFromRepo_1=Zh.getManifestFromRepo=Zh.findAllVersions=exports.find_1=Zh.find=Zh.cacheFile=exports.cacheDir_1=Zh.cacheDir=exports.extractZip_1=Zh.extractZip=Zh.extractXar=exports.extractTar_1=Zh.extractTar=Zh.extract7z=exports.downloadTool_1=Zh.downloadTool=exports.HTTPError_1=Zh.HTTPError=void 0;const _m=ym(v()),Em=ym(Yn),bm=ym(xr),Om=ym(nm),Rm=ym(Ir),Sm=ym(Pr),Im=ym(Un),Tm=ym(rm),xm=ym(Gr),Pm=ym(Lr),Nm=jr,$m=wm((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||am)();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||cm(o)})),Am=m(),Cm=lm;class Lm extends Error{constructor(e){super("Unexpected HTTP response: "+e),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}}exports.HTTPError_1=Zh.HTTPError=Lm;const Dm="win32"===process.platform,km="darwin"===process.platform;exports.downloadTool_1=Zh.downloadTool=function(e,t,r,n){return gm(this,void 0,void 0,(function*(){t=t||Sm.join(at(),$m.default()),yield Em.mkdirP(Sm.dirname(t)),_m.debug("Downloading "+e),_m.debug("Destination "+t);const o=ct("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),i=ct("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20),s=new Cm.RetryHelper(3,o,i);return yield s.execute((()=>gm(this,void 0,void 0,(function*(){return yield function(e,t,r,n){return gm(this,void 0,void 0,(function*(){if(bm.existsSync(t))throw Error(`Destination file path ${t} already exists`);const o=new Im.HttpClient("actions/tool-cache",[],{allowRetries:!1});r&&(_m.debug("set auth"),void 0===n&&(n={}),n.authorization=r);const i=yield o.get(e,n);if(200!==i.message.statusCode){const t=new Lm(i.message.statusCode);throw _m.debug(`Failed to download from "${e}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),t}const s=Pm.promisify(xm.pipeline),a=ct("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",(()=>i.message))();let c=!1;try{return yield s(a,bm.createWriteStream(t)),_m.debug("download complete"),c=!0,t}finally{if(!c){_m.debug("download failed");try{yield Em.rmRF(t)}catch(l){_m.debug(`Failed to delete '${t}'. ${l.message}`)}}}}))}(e,t||"",r,n)}))),(e=>!(e instanceof Lm&&e.httpStatusCode&&500>e.httpStatusCode&&408!==e.httpStatusCode&&429!==e.httpStatusCode)))}))},Zh.extract7z=function(e,t,r){return gm(this,void 0,void 0,(function*(){Nm.ok(Dm,"extract7z() not supported on current OS"),Nm.ok(e,'parameter "file" is required'),t=yield tt(t);const n=process.cwd();if(process.chdir(t),r)try{const t=["x",_m.isDebug()?"-bb1":"-bb0","-bd","-sccUTF-8",e],n={silent:!0};yield Am.exec(`"${r}"`,t,n)}finally{process.chdir(n)}else{const r=["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${Sm.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 Em.which("powershell",!0);yield Am.exec(`"${e}"`,r,o)}finally{process.chdir(n)}}return t}))},exports.extractTar_1=Zh.extractTar=function(e,t,r="xz"){return gm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");t=yield tt(t),_m.debug("Checking tar --version");let n="";yield Am.exec("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:e=>n+=""+e,stderr:e=>n+=""+e}}),_m.debug(n.trim());const o=n.toUpperCase().includes("GNU TAR");let i;i=r instanceof Array?r:[r],_m.isDebug()&&!r.includes("v")&&i.push("-v");let s=t,a=e;return Dm&&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 Am.exec("tar",i),t}))},Zh.extractXar=function(e,t,r=[]){return gm(this,void 0,void 0,(function*(){let n;Nm.ok(km,"extractXar() not supported on current OS"),Nm.ok(e,'parameter "file" is required'),t=yield tt(t),n=r instanceof Array?r:[r],n.push("-x","-C",t,"-f",e),_m.isDebug()&&n.push("-v");const o=yield Em.which("xar",!0);var i;return yield Am.exec(`"${o}"`,(i=n,Array.from(new Set(i)))),t}))},exports.extractZip_1=Zh.extractZip=function(e,t){return gm(this,void 0,void 0,(function*(){if(!e)throw Error("parameter 'file' is required");return t=yield tt(t),Dm?yield function(e,t){return gm(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 Em.which("pwsh",!1);if(o){const e=["-NoLogo","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",["$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;",`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${r}', '${n}', $true) }`,`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${r}' -DestinationPath '${n}' -Force } else { throw $_ } } ;`].join(" ")];_m.debug("Using pwsh at path: "+o),yield Am.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 Em.which("powershell",!0);_m.debug("Using powershell at path: "+t),yield Am.exec(`"${t}"`,e)}}))}(e,t):yield function(e,t){return gm(this,void 0,void 0,(function*(){const r=yield Em.which("unzip",!0),n=[e];_m.isDebug()||n.unshift("-q"),n.unshift("-o"),yield Am.exec(`"${r}"`,n,{cwd:t})}))}(e,t),t}))},exports.cacheDir_1=Zh.cacheDir=function(e,t,r,n){return gm(this,void 0,void 0,(function*(){if(r=Tm.clean(r)||r,n=n||Rm.arch(),_m.debug(`Caching tool ${t} ${r} ${n}`),_m.debug("source dir: "+e),!bm.statSync(e).isDirectory())throw Error("sourceDir is not a directory");const o=yield rt(t,r,n);for(const t of bm.readdirSync(e)){const r=Sm.join(e,t);yield Em.cp(r,o,{recursive:!0})}return nt(t,r,n),o}))},Zh.cacheFile=function(e,t,r,n,o){return gm(this,void 0,void 0,(function*(){if(n=Tm.clean(n)||n,o=o||Rm.arch(),_m.debug(`Caching tool ${r} ${n} ${o}`),_m.debug("source file: "+e),!bm.statSync(e).isFile())throw Error("sourceFile is not a file");const i=yield rt(r,n,o),s=Sm.join(i,t);return _m.debug("destination file "+s),yield Em.cp(e,s),nt(r,n,o),i}))},exports.find_1=Zh.find=function(e,t,r){if(!e)throw Error("toolName parameter is required");if(!t)throw Error("versionSpec parameter is required");r=r||Rm.arch(),ot(t)||(t=it(et(e,r),t));let n="";if(t){t=Tm.clean(t)||"";const o=Sm.join(st(),e,t,r);_m.debug("checking cache: "+o),bm.existsSync(o)&&bm.existsSync(o+".complete")?(_m.debug(`Found tool in cache ${e} ${t} ${r}`),n=o):_m.debug("not found")}return n},Zh.findAllVersions=et,exports.getManifestFromRepo_1=Zh.getManifestFromRepo=function(e,t,r,n="master"){return gm(this,void 0,void 0,(function*(){let o=[];const i=`https://api.github.com/repos/${e}/${t}/git/trees/${n}`,s=new Im.HttpClient("tool-cache"),a={};r&&(_m.debug("set auth"),a.authorization=r);const c=yield s.getJson(i,a);if(!c.result)return o;let l="";for(const e of c.result.tree)if("versions-manifest.json"===e.path){l=e.url;break}a.accept="application/vnd.github.VERSION.raw";let u=yield(yield s.get(l,a)).readBody();if(u){u=u.replace(/^\uFEFF/,"");try{o=JSON.parse(u)}catch(p){_m.debug("Invalid json")}}return o}))},exports.findFromManifest_1=Zh.findFromManifest=function(e,t,r,n=Rm.arch()){return gm(this,void 0,void 0,(function*(){return yield Om._findMatch(e,t,r,n)}))},Zh.isExplicitVersion=ot,Zh.evaluateVersions=it;var jm={};Object.defineProperty(jm,"__esModule",{value:!0}),jm.retryAsPromised=jm.TimeoutError=void 0;let Um=class extends Error{constructor(e,t){super(e),this.name="TimeoutError",this.previous=t}};jm.TimeoutError=Um,jm.retryAsPromised=lt;var Fm=jm.default=lt;let Mm;const{GITHUB_ACTIONS:Gm}=Jr,Bm=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||xr.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||xr.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||xr.statSync,e.mkdirSync=e.mkdirSync||r.mkdirSync||xr.mkdirSync,t},qm=(e,t,r)=>{const n=Pr.dirname(e),o={...Bm(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 qm(e,o,qm(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}}},Hm=Object.assign((async(e,t,r)=>{const n=Bm(t);n.recursive=!1;const o=Pr.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 Hm(o,n).then((t=>Hm(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:qm}),Vm=async(e,t,r)=>{if(r!==t)return e.statAsync(t).then((e=>e.isDirectory()?r:void 0),(r=>r&&"ENOENT"===r.code?Vm(e,Pr.dirname(t),t):void 0))},zm=(e,t,r)=>{if(r!==t)try{return e.statSync(t).isDirectory()?r:void 0}catch(n){return n&&"ENOENT"===n.code?zm(e,Pr.dirname(t),t):void 0}},Xm=(e,t)=>{const r=Bm(t);if(r.recursive=!0,Pr.dirname(e)===e)return r.mkdirSync(e,r);const n=zm(r,e);try{return r.mkdirSync(e,r),n}catch(o){if(o&&"ENOENT"===o.code)return qm(e,r);throw o}},Wm=Object.assign((async(e,t)=>{const r={...Bm(t),recursive:!0};return Pr.dirname(e)===e?await r.mkdirAsync(e,r):Vm(r,e).then((t=>r.mkdirAsync(e,r).then((e=>t||e)).catch((t=>{if(t&&"ENOENT"===t.code)return Hm(e,r);throw t}))))}),{sync:Xm}),Ym=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,Km=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=Pr.resolve(e),"win32"===Ym){const t=/[*|"<>?:]/,{root:r}=Pr.parse(e);if(t.test(e.substring(r.length)))throw Object.assign(Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e},Jm=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),Qm=+Jm[0]>10||10==+Jm[0]&&+Jm[1]>=12,Zm=Qm?e=>Bm(e).mkdirSync===xr.mkdirSync:()=>!1,ev=Object.assign(Qm?e=>Bm(e).mkdir===xr.mkdir:()=>!1,{sync:Zm}),tv=(e,t)=>{e=Km(e);const r=Bm(t);return Zm(r)?Xm(e,r):qm(e,r)},rv=Object.assign((async(e,t)=>{e=Km(e);const r=Bm(t);return ev(r)?Wm(e,r):Hm(e,r)}),{mkdirpSync:tv,mkdirpNative:Wm,mkdirpNativeSync:Xm,mkdirpManual:Hm,mkdirpManualSync:qm,sync:tv,native:Wm,nativeSync:Xm,manual:Hm,manualSync:qm,useNative:ev,useNativeSync:Zm});var nv=m();const ov=/v?(\d\S*)/,iv="darwin"===process.platform&&"x64"===process.arch?"15.0.7":"18.1.8",sv={llvm:iv,clang:iv,"clang++":iv,"clang-tidy":iv,clangtidy:iv,"clang-format":iv,clangformat:iv,ninja:"1.12.1",cmake:"3.30.4",meson:"1.5.2",kcov:"42",task:"3.39.2",doxygen:ke()?"1.12.0-2":"1.12.0",gcc:"win32"===process.platform?"14.2.0posix-18.1.8-12.0.0-ucrt-r1":"",powershell:"7.4.5"},av="22.2.0",cv="3.7.9",lv={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"}},{GITHUB_ACTIONS:uv}=Jr,pv=Bu((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 nv.getExecOutput(e+' -c "import sys;print(sys.base_exec_prefix);"')).stdout.trim();return t.push(Pr.join(r,"Scripts"),Pr.join(r,"Scripts","bin"),Pr.join(r,"bin")),function(e){return[...new Set(e)]}(t)}),{promise:!0});var fv={};Object.defineProperty(fv,"__esModule",{value:!0});var dv=fv.getUbuntuVersion=void 0;const hv=kr;dv=fv.getUbuntuVersion=async function(){if("linux"!==process.platform)return[];const e=await(t="lsb_release",r=["-a"],new Promise(((e,n)=>{hv.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 mv=Bu((async function(){try{if(je()){try{null===Rh.sync("lsb_release",{nothrow:!0})&&await Te([{name:"lsb-release"}])}catch{return Pt()}const e=await dv();return 0===e.length?Pt():e}return null}catch(e){return g(""+e),null}}),{promise:!0}),vv=Bu((async function(){let e=process.env.PIPX_HOME;if(void 0!==e)return e;const t=re("~/.local/pipx");if(await te(t))return t;switch(process.platform){case"win32":e=re("~/AppData/Local/pipx");break;case"darwin":e=re("~/Library/Application Support/pipx");break;default:e=re("~/.local/share/pipx")}return await rv(e),await rv(Pr.join(e,"trash")),await rv(Pr.join(e,"shared")),await rv(Pr.join(e,"venv")),e}),{promise:!0}),yv=Bu((async function(){if(void 0!==process.env.PIPX_BIN_DIR)return process.env.PIPX_BIN_DIR;const e=re("~/.local/bin");return await ae(e,fy),await rv(e),e}),{promise:!0});let gv;const wv=new Map([[24,["Sequoia","15"]],[23,["Sonoma","14"]],[22,["Ventura","13"]],[21,["Monterey","12"]],[20,["Big Sur","11"]],[19,["Catalina","10.15"]],[18,["Mojave","10.14"]],[17,["High Sierra","10.13"]],[16,["Sierra","10.12"]],[15,["El Capitan","10.11"]],[14,["Yosemite","10.10"]],[13,["Mavericks","10.9"]],[12,["Mountain Lion","10.8"]],[11,["Lion","10.7"]],[10,["Snow Leopard","10.6"]],[9,["Leopard","10.5"]],[8,["Tiger","10.4"]],[7,["Panther","10.3"]],[6,["Jaguar","10.2"]],[5,["Puma","10.1"]]]),_v=Bu((function(){if("darwin"!==process.platform)return[];const{version:e}=function(e){e=Number((e||Ir.release()).split(".")[0]);const[t,r]=wv.get(e)||["Unknown",""];return{name:t,version:r}}();return e.split(".").map((e=>Number.parseInt(e,10)))})),{GITHUB_ACTIONS:Ev}=Jr,bv="string"==typeof __dirname?__dirname:Pr.dirname(Br.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Hr&&"SCRIPT"===Hr.tagName.toUpperCase()&&Hr.src||new URL("setup-cpp.js",document.baseURI).href)),{GITHUB_ACTIONS:Ov}=Jr,Rv="string"==typeof __dirname?__dirname:Pr.dirname(Br.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Hr&&"SCRIPT"===Hr.tagName.toUpperCase()&&Hr.src||new URL("setup-cpp.js",document.baseURI).href)),Sv="string"==typeof __dirname?__dirname:Pr.dirname(Br.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Hr&&"SCRIPT"===Hr.tagName.toUpperCase()&&Hr.src||new URL("setup-cpp.js",document.baseURI).href)),Iv="string"==typeof __dirname?__dirname:Pr.dirname(Br.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Hr&&"SCRIPT"===Hr.tagName.toUpperCase()&&Hr.src||new URL("setup-cpp.js",document.baseURI).href));class Tv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class xv extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const Pv=e=>void 0===globalThis.DOMException?new xv(e):new DOMException(e),Nv=e=>{const t=void 0===e.reason?Pv("This operation was aborted."):e.reason;return t instanceof Error?t:Pv(t)},$v=v(),Av=kr,Cv=xr,Lv=Pr,Dv=Mr,kv=Dv.env["ProgramFiles(x86)"],jv=[Dv.env["ProgramFiles(x86)"],Dv.env.ProgramFiles],Uv=["Enterprise","Professional","Community","BuildTools"],Fv=["2022","2019","2017"],Mv={2022:"17.0",2019:"16.0",2017:"15.0",2015:"14.0",2013:"12.0"};var Gv=ir;const Bv=kv+"\\Microsoft Visual Studio\\Installer";var qv=ar,Hv=function(e,t,r,n,o,i){if("win32"!=Dv.platform)return void $v.info("This is not a Windows virtual environment, bye!");Dv.env.PATH+=Lv.delimiter+Bv;let s={win32:"x86",win64:"x64",x86_64:"x64","x86-64":"x64"};e.toLowerCase()in s&&(e=s[e.toLowerCase()]);var a=[e];n&&!0===JSON.parse(n)&&a.push("uwp"),t&&a.push(t),r&&a.push("-vcvars_ver="+r),o&&!0===JSON.parse(o)&&a.push("-vcvars_spectre_libs=spectre");const c=`"${ar(i)}" ${a.join(" ")}`;$v.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}$v.startGroup("Environment variables");for(let m of f){if(!m.includes("="))continue;let[e,t]=m.split("=");t!==h[e]&&($v.info("Setting "+e),cr(e)&&(t=t.split(";").filter((function(e,t,r){return r.indexOf(e)===t})).join(";")),$v.exportVariable(e,t))}$v.endGroup(),$v.info("Configured Developer Command Prompt")},Vv=(e=>(e[e.All=0]="All",e[e.ClangFormat=1]="ClangFormat",e[e.Core=2]="Core",e))(Vv||{});const zv="string"==typeof __dirname?__dirname:Pr.dirname(Br.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Hr&&"SCRIPT"===Hr.tagName.toUpperCase()&&Hr.src||new URL("setup-cpp.js",document.baseURI).href)),{GITHUB_ACTIONS:Xv}=Jr,Wv="string"==typeof __dirname?__dirname:Pr.dirname(Br.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Hr&&"SCRIPT"===Hr.tagName.toUpperCase()&&Hr.src||new URL("setup-cpp.js",document.baseURI).href)),Yv=Bu((async function(e,t,r){const[n,o]=await Promise.all([mr(e,t,r),yr()]);return await Jv(r),n}),{promise:!0}),Kv=Bu((async function(e){if(je())if(e>10)await Te([{name:"libtinfo-dev"}]);else try{await Te([{name:"libtinfo5"}])}catch(t){_(`Failed to install libtinfo5 ${t}\nManually installing the package`);const e=`libtinfo5_6.3-2ubuntu0.1_${Xh.includes(process.arch)?"amd64":Yh.includes(process.arch)?"arm64":process.arch}.deb`,r="http://launchpadlibrarian.net/666971015/"+e,n=new Kd.DownloaderHelper(r,Ir.tmpdir(),{fileName:e});n.on("error",(e=>{throw Error(`Failed to download ${r}: ${e}`)})),await n.start(),U("dpkg",["-i",Pr.join(Ir.tmpdir(),e)])}else ke()?await Ge("ncurses5-compat-libs",void 0,"yay"):De()&&await Me([{name:"ncurses-compat-libs"}])}),{promise:!0}),Jv=Bu((async function(e){"linux"===process.platform&&await Kt(Tt("gcc",void 0,await mv()),"",e,40)}),{promise:!0}),{GITHUB_ACTIONS:Qv}=Jr,Zv="string"==typeof __dirname?__dirname:Pr.dirname(Br.fileURLToPath("undefined"==typeof document?require("url").pathToFileURL(__filename).href:Hr&&"SCRIPT"===Hr.tagName.toUpperCase()&&Hr.src||new URL("setup-cpp.js",document.baseURI).href));let ey,ty=!1;const ry={llvm:fr,clang:fr,"clang++":fr},ny={gcc:Kt,"g++":Kt},oy={mingw:Vt},iy={msvc:gr,cl:gr,msbuild:gr,visualstudio:gr},sy={appleclang:or,applellvm:or,"apple-clang":or,"apple-llvm":or},ay={cmakelang:kt,"cmake-lint":kt,"cmake-format":kt,cmakelint:kt,cmakeformat:kt},cy=["llvm","clang","clang++","clang-tidy","clang-format","clangtidy","clangformat"],ly={nala:async function(e,t,r){if(!je())return;if("string"==typeof ey)return{binDir:ey};const n=Rh.sync("nala",{nothrow:!0});if(null!==n)return ey=Pr.dirname(n),{binDir:ey};await Te([{name:"python3-apt"}]),ey="/usr/bin";try{const t=await Se({name:"nala",version:e});if(void 0!==t)return await Te([{name:t}]),{binDir:ey}}catch(o){_("Failed to install nala: "+o)}try{const e=await Se({name:"nala-legacy"});if(void 0!==e)return await Te([{name:e}],!0),{binDir:ey}}catch(o){_("Failed to install nala-legacy: "+o)}return await async function(){const e=new Kd.DownloaderHelper("https://gitlab.com/volian/volian-archive/-/raw/main/install-nala.sh",Ir.tmpdir(),{fileName:"install-nala.sh"});e.on("error",(e=>{throw Error("Failed to download install-nala.sh: "+e)})),await e.start();const t=Pr.join(Ir.tmpdir(),"install-nala.sh"),r=await $s(t,"utf8");await Gs(t,r.replace(/sudo/g,"")),await Te([{name:"wget"}]);try{U("bash",[t])}catch(o){y("Failed to install nala via installer: "+o),U("apt",["install","-y","-t","nala","nala"])}}(),{binDir:ey}},brew:$e,choco:Ue,python:Et,powershell:br,pwsh:br,...ry,...ny,...oy,...iy,...sy,...ay,cmake:gt,ninja:er,vcpkg:async function(e,t,r){return ty&&null!==Rh.sync("vcpkg",{nothrow:!0})?{binDir:Pr.dirname(Rh.sync("vcpkg"))}:("linux"===process.platform&&(ke()?await Promise.all([Ge("curl"),Ge("zip"),Ge("unzip"),Ge("tar"),Ge("git"),Ge("pkg-config")]):De()?await Me([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}]):je()&&await Te([{name:"curl"},{name:"zip"},{name:"unzip"},{name:"tar"},{name:"git"},{name:"pkg-config"}])),await te(Pr.join(t,Ye("bootstrap-vcpkg",".bat")))?w(`Vcpkg folder already exists at ${t}. Skipping the clone`):$("git",["clone","https://github.com/microsoft/vcpkg"],{cwd:Pr.dirname(t),stdio:"inherit"}),""!==e&&"true"!==e&&(_("Checking out vcpkg version "+e),$("git",["checkout",e],{cwd:t,stdio:"inherit"})),$(Ye(Ke("bootstrap-vcpkg"),".bat"),{cwd:t,shell:!0,stdio:"inherit"}),await q(t),await ae(t,fy),ty=!0,{binDir:t})},bazel:async function(e,t,r){switch(process.platform){case"win32":return Fe("bazelisk",e);case"darwin":return Le("bazelisk",e);case"linux":if(ke())throw Error("installing bazel on Arch linux is not supported yet");if(De())return await Me([{name:"dnf-plugins-core"}]),U("dnf",["copr","enable","vbatts/bazel"]),Me([{name:"bazel4"}]);if(je())return U("bash",["-c",`echo "deb [arch=amd64 signed-by=${await xe({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`]),Te([{name:"bazel",version:e}],!0);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},conan:function(e,t,r){return Nt("conan",e)},meson:function(e,t,r){return Nt("meson",e)},gcovr:function(e,t,r){return Nt("gcovr",e)},opencppcoverage:wr,OpenCppCoverage:wr,ccache:function(e,t,r){switch(process.platform){case"win32":return Fe("ccache",e);case"darwin":return Le("ccache",e);case"linux":if(ke())return Ge("ccache",e);if(De())return Me([{name:"ccache",version:e}]);if(je())return Te([{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 Fe("sccache",e);case"linux":case"darwin":return Le("sccache",e);default:throw Error("Unsupported platform")}},doxygen:async function(e,t,r){switch(process.platform){case"win32":{await Fm((()=>Fe("doxygen.install",e)),{name:"doxygen.install",max:4,backoffBase:2e3,report:e=>_(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 te(Pr.join(e,"doxygen.exe")))return await ae(e,fy),e;throw Error("Failed to find doxygen binary")}throw Error("Unsupported platform")}()};return await jt(Tt("graphviz",void 0)),t}case"darwin":{const e=await Le("doxygen",void 0);return _v()[0]>11&&await jt(Tt("graphviz",void 0)),e}case"linux":{let o;if(""===e||ke()||De())if(ke())o=await Ge("doxygen",e);else{if(De())return Me([{name:"doxygen",version:e}]);if(!je())throw Error("Unsupported linux distributions");o=await Te([{name:"doxygen",version:e}])}else{if(!je())throw Error("Unsupported linux distributions");try{o=await vt("doxygen",e,Ft,t,r);try{await Te([{name:"libclang-cpp9"}])}catch(n){_("Failed to download libclang-cpp9 that might be needed for running doxygen. "+n)}}catch(n){w(`Failed to download doxygen binary. ${n}. Falling back to apt-get.`),o=await Te([{name:"doxygen"}])}}return await jt(Tt("graphviz",void 0,await mv())),o}default:throw Error("Unsupported platform")}},graphviz:jt,cppcheck:async function(e,t,r){switch(process.platform){case"win32":return await Fe("cppcheck",e),{binDir:await async function(){const e="C:/Program Files/Cppcheck";return await ae(e,fy),e}()};case"darwin":return Le("cppcheck",e);case"linux":if(ke())return Ge("cppcheck",e);if(De())return Me([{name:"ccache",version:e}]);if(je())return Te([{name:"cppcheck",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},cpplint:function(e,t,r){return Nt("cpplint",e)},flawfinder:function(e,t,r){return Nt("flawfinder",e)},lizard:function(e,t,r){return Nt("lizard",e)},infer:function(e,t,r){return vt("infer",e,Qt,t,r)},"clang-tidy":hr,clangtidy:hr,"clang-format":dr,clangformat:dr,vcvarsall:lr,kcov:async function(e,t,r){if("linux"!==process.platform)return void _("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 vt("kcov",o,rr,t,r),a):(a=await vt("kcov",o,tr,t,r),ke()?await Ge("binutils"):De()?await Me([{name:"binutils"}]):je()&&await Te([{name:"libbinutils"}]),a)},make:async function(e,t,r){switch(process.platform){case"win32":return Fe("make",e);case"darwin":{await Le("make",e);const t=Pr.join(Ce(),"opt/make/libexec/gnubin");return await ae(t,fy),{binDir:t}}case"linux":if(ke())return Ge("make",e);if(De())return Me([{name:"make",version:e}]);if(je())return Te([{name:"make",version:e}]);throw Error("Unsupported linux distribution");default:throw Error("Unsupported platform")}},task:function(e,t,r){return vt("task",e,Or,t,r)},sevenzip:ut,"7zip":ut,"7z":ut},uy=Object.keys(ly),py=["compiler","architecture","timeout",...uy],fy={rcPath:re("~/.cpprc"),guard:"cpp"};(async function(e){var t,r,n;let o=Promise.resolve();Yr.GITHUB_ACTIONS||(o=async function(){try{await Wd({pkg:Yd})}catch(e){g("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=ve(t.string),t.boolean=ve(t.boolean),f)for(r in t.alias)for(n=t.alias[r]=ve(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);ye(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:[...py,"timeout"],default:Object.fromEntries(py.map((e=>[e,Rr(e)]))),alias:{h:"help"},boolean:"help"})}(e);i.help&&(_('\nsetup-cpp [options]\nsetup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true\n\nInstall all the tools required for building and testing C++/C projects.\n\n--architecture\t the cpu architecture to install the tools for. By default it uses the current CPU architecture.\n--timeout\t the timeout for the installation of each tool in minutes. By default it is 10 minutes.\n--compiler\t the <compiler> to install.\n \t You can specify the version instead of specifying just the name e.g: --compiler \'llvm-13.0.0\'\n--$tool_name\t pass "true" or pass the <version> you would like to install for this tool. e.g. --conan true or --conan "1.42.1"\n\nAll the available tools:\n'),console.table({"compiler and analyzer":{tools:"--llvm, --gcc, --msvc, --apple-clang, --vcvarsall"},"build system":{tools:"--cmake, --ninja, --meson, --make, --task, --bazel"},"package manager":{tools:"--vcpkg, --conan, --choco, --brew, --nala"},"analyzer/linter":{tools:"--clang-tidy, --clang-format, --cppcheck, --cpplint, --flawfinder, --lizard, --infer, , --cmakelang, --cmake-lint, --cmake-format"},cache:{tools:"--ccache, --sccache"},documentation:{tools:"--doxygen, --graphviz"},coverage:{tools:"--gcovr, --opencppcoverage, --kcov"},other:{tools:"--python, --powershell, --sevenzip"}},["tools"]));const s=null!=(t=i.architecture)?t:process.arch,a=null!=(r=process.env.SETUP_CPP_DIR)?r:re("~"),c=[],l=[],u=bp.create({autoloadLocales:!0});let p,f;bp.addLocale(Op),dp.addLocale(mp);const d=await mv(),h=void 0!==i.compiler?function(e){try{const t=e.split("-"),r=t[0];if(1 in t){const e=t[1];return null===zp(e)&&_(`Invalid semver version ${e} used for the compiler.`),{compiler:r,version:e}}return{compiler:r,version:void 0}}catch(t){return y(`Failed to parse the compiler info ${e}: ${t}`),{compiler:e,version:void 0}}}(i.compiler):void 0;if(!function(e,t,r){var n,o;const i=void 0!==r&&t.includes(r.compiler),s=(i?t:t.filter((e=>"compiler"!==e))).filter((t=>void 0!==e[t])),a=s.filter((t=>!xt(i&&"compiler"===t&&void 0!==r?r.version:e[t]))),c=0!==a.length?i&&"compiler"===a[0]&&void 0!==r?null!=(n=r.version)?n:"true":null!=(o=e[a[0]])?o:"true":"true";if(a.some((t=>i&&"compiler"===t&&void 0!==r?e.compiler!==`${r.compiler}-${c}`:e[t]!==c)))return!1;for(const l of s)e[l]=i&&"compiler"===l&&void 0!==r?`${r.compiler}-${c}`:c;return!0}(i,[...cy,"compiler"],h))return y("The same version must be used for llvm, clang-format and clang-tidy"),1;ke()&&"string"==typeof i.cppcheck&&"string"==typeof i.gcovr&&(_("installing python-pygments to avoid conflicts with cppcheck and gcovr on Arch linux"),await Ge("python-pygments"));let m=!1;for(const v of uy){if(Yr.isCI&&0!==l.length){m=!0;break}const e=i[v];void 0!==e&&(p=Date.now(),await ur(v,e,d,s,a,c,l,60*Number.parseFloat(null!=(n=i.timeout)?n:"20")*1e3),f=Date.now(),_("took "+(u.format(p,f)||"0 seconds")))}if(!m&&void 0!==h){const e=Date.now();await async function(e,t,r,n,o,i,s){let a;try{if(lo.startGroup(`Installing ${e} ${null!=t?t:""}`),e in ry)a=await fr(Tt("llvm",t,r),Pr.join(n,"llvm"),o),await ie("GCOV","llvm-cov gcov",fy);else if(e in ny){const e=Tt("gcc",t,r);a=await Kt(e,Pr.join(n,"gcc"),o),await Jt(e)}else if(e in oy){const e=Tt("mingw",t,r);a=await Vt(e,Pr.join(n,"gcc"),o),await Jt(e)}else e in iy?a=await gr(Tt("msvc",t,r),Pr.join(n,"msvc"),o):e in sy?await or():(a=null,s.push("Unsupported compiler "+e))}catch(c){y(c),s.push(`Failed to install the ${e} ${t}`)}null!==a&&i.push(Sr(e,a)),lo.endGroup()}(h.compiler,h.version,d,a,s,c,l);const t=Date.now();_("took "+(u.format(e,t)||"0 seconds"))}if(await async function(e){if(await te(e.rcPath)){const t=(await Vu(e.rcPath,"utf-8")).split("\n"),r=[...new Set(t.reverse())].reverse();await zu(e.rcPath,r.join("\n")),await q(e.rcPath)}}(fy),0===c.length&&0===l.length)return g("setup-cpp was called without any arguments. Nothing to do."),0;for(const v of c)console.log(`${v}`);for(const v of l)y(v);if(_("setup-cpp finished"),!Yr.GITHUB_ACTIONS)switch(process.platform){case"win32":g("Run `RefreshEnv.cmd` or restart your shell to update the environment.");break;case"linux":case"darwin":g("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=>{y("main() panicked!"),y(e),process.exitCode=1})),exports.HttpClient=kn,exports.ciInfo=Jr,exports.commonjsGlobal=Wr,exports.coreExports=lo,exports.execExports=nv,exports.getAugmentedNamespace=r,exports.getDefaultExportFromCjs=t,exports.info=_,exports.pathExists=te,exports.semver=Nd,exports.warning=g;
//# sourceMappingURL=setup-cpp.js.map