From 020e177db8472cdc54899b4f15b846d4c1ab8e54 Mon Sep 17 00:00:00 2001 From: amanstep Date: Mon, 11 May 2026 20:05:41 +0530 Subject: [PATCH] fix: update release to main --- dist/index.js | 2 +- src/configs/tools_schema.json | 2 +- src/scripts/tools/ppa.sh | 2 +- src/utils.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index ddd1ccc..77894d0 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -(()=>{var e={6472:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o/dev/null 2>&1'+a}async function addINIValuesWindows(e){const t=await s.CSVArray(e);let a="\n";await s.asyncForEach(t,(async function(e){a+=await s.addLog("$tick",e,"Added to php.ini","win32")+"\n"}));return'Add-Content "$php_dir\\php.ini" "'+t.join("\n")+'"'+a}async function addINIValues(e,t,a=false){let n="\n";switch(a){case true:n+=await s.stepLog("Add php.ini values",t)+await s.suppressOutput(t)+"\n";break;case false:default:n+=await s.stepLog("Add php.ini values",t)+"\n";break}switch(t){case"win32":return n+await addINIValuesWindows(e);case"darwin":case"linux":return n+await addINIValuesUnix(e);default:return await s.log("Platform "+t+" is not supported",t,"error")}}},5469:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=issueCommand;t.info=info;t.error=error;t.setFailed=setFailed;t.getInput=getInput;const n=a(857);function toCommandValue(e){if(e instanceof Error){return e.toString()}return e}function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}function issueCommand(e,t,a){let i=`::${e}`;if(t&&Object.keys(t).length>0){i+=" ";const e=Object.entries(t).filter((([,e])=>e)).map((([e,t])=>`${e}=${escapeProperty(t)}`)).join(",");i+=e}i+=`::${escapeData(a)}`;process.stdout.write(i+n.EOL)}function info(e){process.stdout.write(e+n.EOL)}function error(e){issueCommand("error",{},e)}function setFailed(e){process.exitCode=1;error(e)}function getInput(e,t=false){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&!a){throw new Error(`Input required and not supplied: ${e}`)}return a.trim()}},9524:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fetch=fetch;const a=new Set([301,302,303,307,308]);async function fetch(e,t,n=5){const i={"User-Agent":`Mozilla/5.0 (${process.platform} ${process.arch}) setup-php`};if(t){i["Authorization"]="Bearer "+t}try{const t=await globalThis.fetch(e,{headers:i,redirect:n>0?"follow":"manual"});if(t.ok){const e=await t.text();return{data:e}}else if(a.has(t.status)&&n<=0){return{error:`${t.status}: Redirect error`}}else{return{error:`${t.status}: ${t.statusText}`}}}catch(e){return{error:`Fetch error: ${e.message}`}}}},8755:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{await run()})().catch((e=>{d.setFailed(e.message)}))},9075:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;os.compareVersions(t.version,e.version)));const i=a.find((e=>{if(e?.require?.php){return e?.require?.php.split("|").some((e=>e&&s.satisfies(t+".0",e)))}return false}));return i?i.version:null}return null}},7159:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{if(/^\d+\.\d+\.\d+(-|$)/.test(e))return e;const t=e.match(/^(\d+\.\d+\.\d+)([A-Za-z]+[0-9A-Za-z.]+)$/);return t?`${t[1]}-${t[2]}`:e};const t=e["version_prefix"]+e["version"];const a=`https://api.github.com/repos/${e["repository"]}/git/matching-refs/tags%2F${t}.`;const n=await d.readEnv("GITHUB_TOKEN")||await d.readEnv("COMPOSER_TOKEN");const i=await l.fetch(a,n);if(i.error||i.data==="[]"){e.error=i.error??`No version found with prefix ${t}.`;return e.version}else{const e=JSON.parse(i.data);const t=e.map((e=>(e.ref?.split("/").pop()??"").replace(/^v(?=\d)/,""))).filter((e=>e.length>0));const a=new Map;const n=t.map((e=>{const t=fixSemver(e);a.set(t,e);return t}));const o=n.toSorted(((e,t)=>{try{return p.compareVersions(t,e)}catch{return t.localeCompare(e,"en",{numeric:true,sensitivity:"base"})}}));return a.get(o[0])??o[0]}}async function getLatestVersion(e){if(!e.version&&e.fetch_latest==="false"){return"latest"}if(e.fetch_latest==="true"&&!e.repository){return"latest"}const t=await l.fetch(`${e.github}/${e.repository}/releases.atom`);if(t.data){const e=[...t.data.matchAll(/releases\/tag\/([a-zA-Z]*)?(\d+\.\d+\.\d+)"/g)].map((e=>e[2]));const a=e.toSorted(((e,t)=>e.localeCompare(t,undefined,{numeric:true})));return a.at(-1)||"latest"}return"latest"}async function getVersion(e,t){const a=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;const n=/^composer:(stable|preview|snapshot|[12])$/;const i=/[><=^~]+.*/;const o=/^\d+(\.\d+)?$/;t.version=e.replace(/v?(\d)/,"$1").replace(/\.x/,"");switch(true){case n.test(t.release):case a.test(t.version):case i.test(t.version)&&t.type==="composer":return t.version;case o.test(t.version)&&t.type==="composer":t.release=`${t.tool}:${t.version}.*`;return`${t.version}.*`;case!!t.repository&&o.test(t.version):return await getSemverVersion(t);default:return t.version.replace(/[><=^~]*/,"")}}async function getRelease(e,t){e=e.includes("/")?e.split("/")[1]:e;return e.includes(":")?[t.tool,e.split(":")[1]].join(":"):t.tool}async function filterList(e){const t=/^composer($|:.*)/;const a=/^composer:?($|preview$|snapshot$|v?\d+(\.\d+)?$|v?\d+\.\d+\.\d+[\w-]*$)/;const n=e.filter((e=>a.test(e)));let i="composer";e=e.filter((e=>!t.test(e)));switch(true){case n[0]==undefined:break;default:i=n.at(-1).replace(/v(\d\S*)/,"$1");break}e.unshift(i);return e}async function getUrl(e){const t=e.version??"latest";if(t==="latest"||t===""){return[e.domain,e.repository,e.prefix,"latest",e.verb,e.tool+e.extension].filter(Boolean).join("/")}else{return[e.domain,e.repository,e.prefix,e.verb,e.version_prefix+e.version,e.tool+e.extension].filter(Boolean).join("/")}}async function getPharUrl(e){if(e.version==="latest"){return e.domain+"/"+e.tool+".phar"}else{return e.domain+"/"+e.tool+"-"+e.version_prefix+e.version+".phar"}}async function addArchive(e){return await d.getCommand(e.os,"tool")+await d.joins(e.url,e.tool,e.version_parameter)}async function addPackage(e){const t=await d.getCommand(e.os,"composer_tool");const a=e.repository.split("/");const n=await d.joins(a[1],e.release,a[0]+"/",e.scope);return t+n}async function addBlackfirePlayer(e){switch(e.os){case"win32":return await d.addLog("$cross",e.tool,e.tool+" is not a windows tool","win32");default:if(e.version=="latest"){if(/5\.[5-6]|7\.0/.test(e.php_version)){e.version="1.9.3"}else if(/7\.[1-4]|8\.0/.test(e.php_version)){e.version="1.22.0"}}e.url=await getPharUrl(e);return addArchive(e)}}async function addCastor(e){e.tool="castor."+e.os.replace("win32","windows")+"-amd64";e.url=await getUrl(e);e.tool="castor";e.version_parameter=c.default.existsSync("castor.php")?e.version_parameter:"";return await addArchive(e)}async function addComposer(e){const t=e.version.replace("latest","stable");const a=e.github;const n=e.domain;const i="https://dl.cloudsmith.io";const o="https://artifacts.setup-php.com";const s=`composer-${e.php_version}-${t}.phar`;const r=`${a}/shivammathur/composer-cache/releases/latest/download/${s}`;const c=`${i}/public/shivammathur/composer-cache/raw/files/${s}`;const p=`${o}/composer/${s}`;const l=`${n}/download/latest-2.2.x/composer.phar`;const u=/^5\.[3-6]$|^7\.[0-1]$/.test(e.php_version);const m=`${n}/composer-${t}.phar`;const f=`${n}/download/${t}/composer.phar`;let x=`${r},${p},${c}`;let h=`${n}/composer.phar`;switch(true){case/^snapshot$/.test(t):h=u?l:h;break;case/^preview$|^2$/.test(t):h=u?l:m;break;case/^1$/.test(t):h=m;break;case/^\d+\.\d+\.\d+[\w-]*$/.test(e.version):x=`${a}/${e.repository}/releases/download/${e.version}/composer.phar`;h=f;break;default:h=u?l:m}const v=await d.readEnv("NO_TOOLS_CACHE")!=="true";e.url=v?`${x},${h}`:h;e.version_parameter=e.version;return await addArchive(e)}async function addDeployer(e){if(e.version==="latest"){e.url=e.domain+"/deployer.phar"}else{const t=await l.fetch("https://deployer.org/manifest.json");const a=JSON.parse(t.data);const n=Object.keys(a).find((t=>a[t].version===e.version));if(n){e.url=a[n].url}else{return await d.addLog("$cross","deployer","Version missing in deployer manifest",e.os)}}return await addArchive(e)}async function addDevTools(e){switch(e.os){case"linux":case"darwin":return"add_devtools "+e.tool;case"win32":return await d.addLog("$tick",e.tool,e.tool+" is not a windows tool","win32");default:return await d.log("Platform "+e.os+" is not supported",e.os,"error")}}async function addPECL(e){return await d.getCommand(e.os,"pecl")}async function addPhing(e){e.url=e.domain+"/get/phing-"+e.version+e.extension;if(e.version!="latest"){[e.prefix,e.verb]=["releases","download"];e.domain=e.github;e.extension="-"+e.version+e.extension;e.url+=","+await getUrl(e)}return await addArchive(e)}async function addPhive(e){switch(true){case/5\.[3-5]/.test(e.php_version):return await d.addLog("$cross","phive","Phive is not supported on PHP "+e.php_version,e.os);case/5\.6|7\.0/.test(e.php_version):e.version="0.12.1";break;case/7\.1/.test(e.php_version):e.version="0.13.5";break;case/7\.2/.test(e.php_version):e.version="0.14.5";break;case/7\.3|7\.4/.test(e.php_version):e.version="0.15.3";break;case/^latest$/.test(e.version):e.version=await getLatestVersion(e);break}e.extension="-"+e.version+e.extension;e.url=await getUrl(e);return await addArchive(e)}async function addPHPUnitTools(e){if(e.version==="latest"){e.version=await u.search(e.packagist,e.php_version)??"latest"}e.url=await getPharUrl(e);if(e.url.match(/-\d+/)){e.url+=","+e.url.replace(/-(\d+)\.\d+\.\d+/,"-$1")}return await addArchive(e)}async function addWPCLI(e){if(e.version==="latest"){e.uri="wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true";e.url=[e.domain,e.uri].join("/")}else{e.extension="-"+e.version+e.extension;e.url=await getUrl(e)}return await addArchive(e)}async function getData(e,t,a){const n=r.default.join(__dirname,"../src/configs/tools.json");const i=c.default.readFileSync(n,"utf8");const o=JSON.parse(i);e=e.replace(/\s+/g,"");const s=e.split(":");const p=s[0];const l=s[1];let u;if(Object.hasOwn(o,p)){u={...o[p],tool:p}}else{const e=Object.keys(o).find((e=>o[e].alias==p));if(e){u={...o[e],tool:e}}else if(p.includes("/")){u={tool:p.split("/")[1],repository:p,type:"composer"}}else{u={tool:p}}}const d="https://github.com";const m=u.domain??d;const f={tool:u.tool,version:"",url:"",os:a,php_version:t,github:d,domain:m,extension:u.extension??".phar",repository:u.repository??"",prefix:m===d?"releases":"",verb:m===d?"download":"",fetch_latest:u.fetch_latest??"false",scope:u.scope??"global",version_parameter:u.version_parameter!=null?JSON.stringify(u.version_parameter):"",version_prefix:u.version_prefix??"",release:"",packagist:u.packagist??u.repository??"",type:u.type,function:u.function,alias:u.alias};f.release=await getRelease(e,f);f.version=l?await getVersion(l,f):await getLatestVersion(f);f.url=await getUrl(f);return f}t.functionRecord={castor:addCastor,composer:addComposer,deployer:addDeployer,dev_tools:addDevTools,phive:addPhive,blackfire_player:addBlackfirePlayer,pecl:addPECL,phing:addPhing,phpunit:addPHPUnitTools,phpcpd:addPHPUnitTools,wp_cli:addWPCLI};async function addTools(e,a,n){let i="\n";if(e==="none"){return""}else{i+=await d.stepLog("Setup Tools",n)}const o=await filterList(await d.CSVArray(e));await d.asyncForEach(o,(async function(e){const o=await getData(e,a,n);i+="\n";switch(true){case o.error!==undefined:i+=await d.addLog("$cross",o.tool,o.error,o.os);break;case"phar"===o.type:i+=await addArchive(o);break;case"composer"===o.type:i+=await addPackage(o);break;case"custom-package"===o.type:i+=await d.customPackage(o.tool.split("-")[0],"tools",o.version,o.os);break;case"custom-function"===o.type:if(!o.function){i+=await d.addLog("$cross",o.tool,o.tool+" has no function defined. Please report this issue.",o.os)}else{i+=await t.functionRecord[o.function](o)}break;case/^none$/.test(o.tool):break;default:i+=await d.addLog("$cross",o.tool,"Tool "+o.tool+" is not supported",o.os);break}}));return i}},9277:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o1:return e.slice(0,3);default:return e+".0"}}}async function parseIniFile(e){switch(true){case/^(production|development|none)$/.test(e):return e;case/php\.ini-(production|development)$/.test(e):return e.split("-")[1];default:return"production"}}async function asyncForEach(e,t){for(const[a,n]of e.entries()){await t(n,a,e)}}async function color(e){switch(e){case"error":return"31";default:case"success":return"32";case"warning":return"33"}}async function log(e,t,a){switch(t){case"win32":return'printf "\\033['+await color(a)+";1m"+e+' \\033[0m"';case"linux":case"darwin":default:return'echo "\\033['+await color(a)+";1m"+e+'\\033[0m"'}}async function stepLog(e,t){switch(t){case"win32":return'Step-Log "'+e+'"';case"linux":case"darwin":return'step_log "'+e+'"';default:return await log("Platform "+t+" is not supported",t,"error")}}async function addLog(e,t,a,n){switch(n){case"win32":return'Add-Log "'+e+'" "'+t+'" "'+a+'"';case"linux":case"darwin":return'add_log "'+e+'" "'+t+'" "'+a+'"';default:return await log("Platform "+n+" is not supported",n,"error")}}async function extensionArray(e){switch(e){case"":case" ":return[];default:return[e.match(/(^|,\s?)none(\s?,|$)/)?"none":"",...e.split(",").map((function(e){e=e.trim().replace(/^\\\s*/,"");if(/.+-.+\/.+@.+/.test(e)){return e}return e.toLowerCase().replace(/^(:)?(php[-_]|none|zend )|(-[^-]*)-/,"$1$3")}))].filter(Boolean)}}async function CSVArray(e){switch(e){case"":case" ":return[];default:return e.split(/,(?=(?:(?:[^"']*["']){2})*[^"']*$)/).map((function(e){return e.trim().replace(/^["']|["']$|(?<==)["']/g,"").replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/,"='$1'").replace(/=(.*?)(=.*)/,"='$1$2'").replace(/:\s*["'](.*?)/g,":$1")})).filter(Boolean)}}async function getExtensionPrefix(e){switch(true){default:return"extension";case/xdebug([2-3])?$|opcache|ioncube|eaccelerator/.test(e):return"zend_extension"}}async function suppressOutput(e){switch(e){case"win32":return" >$null 2>&1";case"linux":case"darwin":return" >/dev/null 2>&1";default:return await log("Platform "+e+" is not supported",e,"error")}}async function getUnsupportedLog(e,t,a){return"\n"+await addLog("$cross",e,[e,"is not supported on PHP",t].join(" "),a)+"\n"}async function getCommand(e,t){switch(e){case"linux":case"darwin":return"add_"+t+" ";case"win32":return"Add-"+t.split("_").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join("")+" ";default:return await log("Platform "+e+" is not supported",e,"error")}}async function joins(...e){return[...e].join(" ")}async function scriptExtension(e){switch(e){case"win32":return".ps1";case"linux":case"darwin":return".sh";default:return await log("Platform "+e+" is not supported",e,"error")}}async function scriptTool(e){switch(e){case"win32":return"pwsh ";case"linux":case"darwin":return"bash ";default:return await log("Platform "+e+" is not supported",e,"error")}}async function customPackage(e,t,a,n){const i=e.replace(/\d+|(pdo|pecl)[_-]|[_-]db2/,"");const o=await scriptExtension(n);const s=c.join(__dirname,"../src/scripts/"+t+"/"+i+o);const r=await getCommand(n,i);return"\n. "+s+"\n"+r+a}async function parseExtensionSource(e,t){const a=/(\w+)-(\w+:\/\/.{1,253}(?:[.:][^:/\s]{2,63})+\/)?([\w.-]+)\/([\w.-]+)@(.+)/;const n=a.exec(e);n[2]=n[2]?n[2].slice(0,-1):"https://github.com";return await joins("\nadd_extension_from_source",...n.splice(1,n.length),t)}async function readPHPVersion(){const e=await getInput("php-version",false);if(e){return e}const t=await getInput("php-version-file",false)||".php-version";if(r.default.existsSync(t)){const e=r.default.readFileSync(t,"utf8");const a=e.match(/^(?:php\s)?(\d+\.\d+\.\d+)$/m);return a?a[1]:e.trim()}else if(t!==".php-version"){throw new Error(`Could not find '${t}' file.`)}const a=await readEnv("COMPOSER_PROJECT_DIR");const n=c.join(a,"composer.lock");if(r.default.existsSync(n)){const e=JSON.parse(r.default.readFileSync(n,"utf8"));if(e["platform-overrides"]&&e["platform-overrides"]["php"]){return e["platform-overrides"]["php"]}}const i=c.join(a,"composer.json");if(r.default.existsSync(i)){const e=JSON.parse(r.default.readFileSync(i,"utf8"));if(e["config"]&&e["config"]["platform"]&&e["config"]["platform"]["php"]){return e["config"]["platform"]["php"]}}return"latest"}async function setVariable(e,t,a){switch(a){case"win32":return"\n$"+e+" = "+t+"\n";case"linux":case"darwin":default:return"\n"+e+'="$('+t+')"\n'}}},5236:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{s+=p.write(e);if(u){u(e)}};const stdOutListener=e=>{o+=c.write(e);if(l){l(e)}};const d=Object.assign(Object.assign({},a===null||a===void 0?void 0:a.listeners),{stdout:stdOutListener,stderr:stdErrListener});const m=yield exec(e,t,Object.assign(Object.assign({},a),{listeners:d}));o+=c.end();s+=p.end();return{exitCode:m,stdout:o,stderr:s}}))}},6665:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o-1){const e=n.substring(0,i);a(e);n=n.substring(i+r.EOL.length);i=n.indexOf(r.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const a of this.args){t+=" ";t+=e.windowsVerbatimArguments?a:this._windowsQuoteCmdArg(a)}t+='"';return[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 a=false;for(const n of e){if(t.some((e=>e===n))){a=true;break}}if(!a){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return 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='"';let a=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(a&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){a=true;t+="\\"}else{a=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const a={};a.cwd=e.cwd;a.env=e.env;a["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){a.argv0=`"${t}"`}return a}exec(){return s(this,void 0,void 0,(function*(){if(!d.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield u.which(this.toolPath,true);return new Promise(((e,t)=>s(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 a=this._cloneExecOptions(this.options);if(!a.silent&&a.outStream){a.outStream.write(this._getCommandString(a)+r.EOL)}const n=new ExecState(a,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield d.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const i=this._getSpawnFileName();const o=p.spawn(i,this._getSpawnArgs(a),this._getSpawnOptions(this.options,i));let s="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!a.silent&&a.outStream){a.outStream.write(e)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(o.stderr){o.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!a.silent&&a.errStream&&a.outStream){const t=a.failOnStdErr?a.errStream:a.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));o.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));o.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((a,n)=>{if(s.length>0){this.emit("stdline",s)}if(c.length>0){this.emit("errline",c)}o.removeAllListeners();if(a){t(a)}else{e(n)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let a=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let o=0;o0){t.push(i);i=""}continue}append(s)}if(i.length>0){t.push(i.trim())}return t}class ExecState extends c.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=(0,m.setTimeout)(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`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._debug(t)}e._setResult()}}},5207:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;oe.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of a){e=i+o;n=undefined;try{n=yield(0,t.stat)(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const a=p.dirname(e);const n=p.basename(e).toUpperCase();for(const i of yield(0,t.readdir)(a)){if(n===i.toUpperCase()){e=p.join(a,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&process.getgid!==undefined&&e.gid===process.getgid()||(e.mode&64)>0&&process.getuid!==undefined&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}},4994:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield p.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}function mkdirP(e){return s(this,void 0,void 0,(function*(){(0,r.ok)(e,"a path argument must be provided");yield p.mkdir(e,{recursive:true})}))}function which(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(p.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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.`)}else{throw new Error(`Unable to locate executable file: ${e}. 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 t}const a=yield findInPath(e);if(a&&a.length>0){return a[0]}return""}))}function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(p.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(p.isRooted(e)){const a=yield p.tryGetExecutablePath(e,t);if(a){return[a]}return[]}if(e.includes(c.sep)){return[]}const a=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){a.push(e)}}}const n=[];for(const i of a){const a=yield p.tryGetExecutablePath(c.join(i,e),t);if(a){n.push(a)}}return n}))}function readCopyOptions(e){const t=e.force==null?true:e.force;const a=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:a,copySourceDirectory:n}}function cpDirRecursive(e,t,a,n){return s(this,void 0,void 0,(function*(){if(a>=255)return;a++;yield mkdirP(t);const i=yield p.readdir(e);for(const o of i){const i=`${e}/${o}`;const s=`${t}/${o}`;const r=yield p.lstat(i);if(r.isDirectory()){yield cpDirRecursive(i,s,a,n)}else{yield copyFile(i,s,n)}}yield p.chmod(t,(yield p.stat(e)).mode)}))}function copyFile(e,t,a){return s(this,void 0,void 0,(function*(){if((yield p.lstat(e)).isSymbolicLink()){try{yield p.lstat(t);yield p.unlink(t)}catch(e){if(e.code==="EPERM"){yield p.chmod(t,"0666");yield p.unlink(t)}}const a=yield p.readlink(e);yield p.symlink(a,t,p.IS_WINDOWS?"junction":null)}else if(!(yield p.exists(t))||a){yield p.copyFile(e,t)}}))}},1324:(e,t,a)=>{e.exports={parallel:a(3857),serial:a(1054),serialOrdered:a(3961)}},4818:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},8452:(e,t,a)=>{var n=a(9200);e.exports=async;function async(e){var t=false;n((function(){t=true}));return function async_callback(a,i){if(t){e(a,i)}else{n((function nextTick_callback(){e(a,i)}))}}}},9200:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},4902:(e,t,a)=>{var n=a(8452),i=a(4818);e.exports=iterate;function iterate(e,t,a,n){var o=a["keyedList"]?a["keyedList"][a.index]:a.index;a.jobs[o]=runJob(t,o,e[o],(function(e,t){if(!(o in a.jobs)){return}delete a.jobs[o];if(e){i(a)}else{a.results[o]=t}n(e,a.results)}))}function runJob(e,t,a,i){var o;if(e.length==2){o=e(a,n(i))}else{o=e(a,t,n(i))}return o}},1721:e=>{e.exports=state;function state(e,t){var a=!Array.isArray(e),n={index:0,keyedList:a||t?Object.keys(e):null,jobs:{},results:a?{}:[],size:a?Object.keys(e).length:e.length};if(t){n.keyedList.sort(a?t:function(a,n){return t(e[a],e[n])})}return n}},3351:(e,t,a)=>{var n=a(4818),i=a(8452);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;n(this);i(e)(null,this.results)}},3857:(e,t,a)=>{var n=a(4902),i=a(1721),o=a(3351);e.exports=parallel;function parallel(e,t,a){var s=i(e);while(s.index<(s["keyedList"]||e).length){n(e,t,s,(function(e,t){if(e){a(e,t);return}if(Object.keys(s.jobs).length===0){a(null,s.results);return}}));s.index++}return o.bind(s,a)}},1054:(e,t,a)=>{var n=a(3961);e.exports=serial;function serial(e,t,a){return n(e,t,null,a)}},3961:(e,t,a)=>{var n=a(4902),i=a(1721),o=a(3351);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,a,s){var r=i(e,a);n(e,t,r,(function iteratorHandler(a,i){if(a){s(a,i);return}r.index++;if(r.index<(r["keyedList"]||e).length){n(e,t,r,iteratorHandler);return}s(null,r.results)}));return o.bind(r,s)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},2639:(e,t,a)=>{"use strict";var n=a(7564);var i=a(3945);var o=a(8093);var s=a(1330);e.exports=s||n.call(o,i)},3945:e=>{"use strict";e.exports=Function.prototype.apply},8093:e=>{"use strict";e.exports=Function.prototype.call},8705:(e,t,a)=>{"use strict";var n=a(7564);var i=a(3314);var o=a(8093);var s=a(2639);e.exports=function callBindBasic(e){if(e.length<1||typeof e[0]!=="function"){throw new i("a function is required")}return s(n,o,e)}},1330:e=>{"use strict";e.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply},5630:(e,t,a)=>{var n=a(9023);var i=a(2203).Stream;var o=a(2710);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}n.inherits(CombinedStream,i);CombinedStream.create=function(e){var t=new this;e=e||{};for(var a in e){t[a]=e[a]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof o)){var a=o.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=a}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){i.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var a=e;this.write(a);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};CombinedStream.prototype.end=function(){this._reset();this.emit("end")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},2026:function(e,t){(function(e,a){true?a(t):0})(this,(function(e){"use strict";const t=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;const validateAndParse=e=>{if(typeof e!=="string"){throw new TypeError("Invalid argument expected string")}const a=e.match(t);if(!a){throw new Error(`Invalid argument not valid semver ('${e}' received)`)}a.shift();return a};const isWildcard=e=>e==="*"||e==="x"||e==="X";const tryParse=e=>{const t=parseInt(e,10);return isNaN(t)?e:t};const forceType=(e,t)=>typeof e!==typeof t?[String(e),String(t)]:[e,t];const compareStrings=(e,t)=>{if(isWildcard(e)||isWildcard(t))return 0;const[a,n]=forceType(tryParse(e),tryParse(t));if(a>n)return 1;if(a{for(let a=0;a{const a=validateAndParse(e);const n=validateAndParse(t);const i=a.pop();const o=n.pop();const s=compareSegments(a,n);if(s!==0)return s;if(i&&o){return compareSegments(i.split("."),o.split("."))}else if(i||o){return i?-1:1}return 0};const compare=(e,t,n)=>{assertValidOperator(n);const i=compareVersions(e,t);return a[n].includes(i)};const a={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};const n=Object.keys(a);const assertValidOperator=e=>{if(typeof e!=="string"){throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`)}if(n.indexOf(e)===-1){throw new Error(`Invalid operator, expected one of ${n.join("|")}`)}};const satisfies=(e,t)=>{t=t.replace(/([><=]+)\s+/g,"$1");if(t.includes("||")){return t.split("||").some((t=>satisfies(e,t)))}else if(t.includes(" - ")){const[a,n]=t.split(" - ",2);return satisfies(e,`>=${a} <=${n}`)}else if(t.includes(" ")){return t.trim().replace(/\s{2,}/g," ").split(" ").every((t=>satisfies(e,t)))}const a=t.match(/^([<>=~^]+)/);const n=a?a[1]:"=";if(n!=="^"&&n!=="~")return compare(e,t,n);const[i,o,s,,r]=validateAndParse(e);const[c,p,l,,u]=validateAndParse(t);const d=[i,o,s];const m=[c,p!==null&&p!==void 0?p:"x",l!==null&&l!==void 0?l:"x"];if(u){if(!r)return false;if(compareSegments(d,m)!==0)return false;if(compareSegments(r.split("."),u.split("."))===-1)return false}const f=m.findIndex((e=>e!=="0"))+1;const x=n==="~"?2:f>1?f:1;if(compareSegments(d.slice(0,x),m.slice(0,x))!==0)return false;if(compareSegments(d.slice(x),m.slice(x))===-1)return false;return true};const validate=e=>typeof e==="string"&&/^[v\d]/.test(e)&&t.test(e);const validateStrict=e=>typeof e==="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(e);e.compare=compare;e.compareVersions=compareVersions;e.satisfies=satisfies;e.validate=validate;e.validateStrict=validateStrict}))},6110:(e,t,a)=>{t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let e;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const a="color: "+this.color;t.splice(1,0,a,"color: inherit");let n=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}n++;if(e==="%c"){i=n}}));t.splice(i,0,a)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=a(897)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},897:(e,t,a)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=a(744);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let a=0;a{if(t==="%%"){return"%"}o++;const i=createDebug.formatters[n];if(typeof i==="function"){const n=e[o];t=i.call(a,n);e.splice(o,1);o--}return t}));createDebug.formatArgs.call(a,e);const s=a.log||createDebug.log;s.apply(a,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(a!==null){return a}if(n!==createDebug.namespaces){n=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{a=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const a=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);a.log=this.log;return a}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];const t=(typeof e==="string"?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t){if(e[0]==="-"){createDebug.skips.push(e.slice(1))}else{createDebug.names.push(e)}}}function matchesTemplate(e,t){let a=0;let n=0;let i=-1;let o=0;while(a"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){for(const t of createDebug.skips){if(matchesTemplate(e,t)){return false}}for(const t of createDebug.names){if(matchesTemplate(e,t)){return true}}return false}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},2830:(e,t,a)=>{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=a(6110)}else{e.exports=a(5108)}},5108:(e,t,a)=>{const n=a(2018);const i=a(9023);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=a(1450);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const a=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n)){n=true}else if(/^(no|off|false|disabled)$/i.test(n)){n=false}else if(n==="null"){n=null}else{n=Number(n)}e[a]=n;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:a,useColors:n}=this;if(n){const n=this.color;const i="[3"+(n<8?n:"8;5;"+n);const o=` ${i};1m${a} `;t[0]=o+t[0].split("\n").join("\n"+o);t.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+a+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const a=Object.keys(t.inspectOpts);for(let n=0;ne.trim())).join(" ")};o.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},2710:(e,t,a)=>{var n=a(2203).Stream;var i=a(9023);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}i.inherits(DelayedStream,n);DelayedStream.create=function(e,t){var a=new this;t=t||{};for(var n in t){a[n]=t[n]}a.source=e;var i=e.emit;e.emit=function(){a._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",(function(){}));if(a.pauseStream){e.pause()}return a};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=n.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},6669:(e,t,a)=>{"use strict";var n=a(8705);var i=a(3170);var o;try{o=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS"){throw e}}var s=!!o&&i&&i(Object.prototype,"__proto__");var r=Object;var c=r.getPrototypeOf;e.exports=s&&typeof s.get==="function"?n([s.get]):typeof c==="function"?function getDunder(e){return c(e==null?e:r(e))}:false},9094:e=>{"use strict";var t=Object.defineProperty||false;if(t){try{t({},"a",{value:1})}catch(e){t=false}}e.exports=t},3056:e=>{"use strict";e.exports=EvalError},1620:e=>{"use strict";e.exports=Error},4585:e=>{"use strict";e.exports=RangeError},6905:e=>{"use strict";e.exports=ReferenceError},105:e=>{"use strict";e.exports=SyntaxError},3314:e=>{"use strict";e.exports=TypeError},2578:e=>{"use strict";e.exports=URIError},5399:e=>{"use strict";e.exports=Object},8700:(e,t,a)=>{"use strict";var n=a(470);var i=n("%Object.defineProperty%",true);var o=a(5479)();var s=a(4076);var r=a(3314);var c=o?Symbol.toStringTag:null;e.exports=function setToStringTag(e,t){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force;var n=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof a!=="undefined"&&typeof a!=="boolean"||typeof n!=="undefined"&&typeof n!=="boolean"){throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans")}if(c&&(a||!s(e,c))){if(i){i(e,c,{configurable:!n,enumerable:false,value:t,writable:false})}else{e[c]=t}}}},4778:(e,t,a)=>{var n;e.exports=function(){if(!n){try{n=a(2830)("follow-redirects")}catch(e){}if(typeof n!=="function"){n=function(){}}}n.apply(null,arguments)}},1573:(e,t,a)=>{var n=a(7016);var i=n.URL;var o=a(8611);var s=a(5692);var r=a(2203).Writable;var c=a(2613);var p=a(4778);(function detectUnsupportedEnvironment(){var e=typeof process!=="undefined";var t=typeof window!=="undefined"&&typeof document!=="undefined";var a=isFunction(Error.captureStackTrace);if(!e&&(t||!a)){console.warn("The follow-redirects package should be excluded from browser builds.")}})();var l=false;try{c(new i(""))}catch(e){l=e.code==="ERR_INVALID_URL"}var u=["Authorization","Proxy-Authorization","Cookie"];var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"];var m=["abort","aborted","connect","error","socket","timeout"];var f=Object.create(null);m.forEach((function(e){f[e]=function(t,a,n){this._redirectable.emit(e,t,a,n)}}));var x=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError);var h=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var v=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",h);var b=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var g=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");var y=r.prototype.destroy||noop;function RedirectableRequest(e,t){r.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var a=this;this._onNativeResponse=function(e){try{a._processResponse(e)}catch(e){a.emit("error",e instanceof h?e:new h({cause:e}))}};this._headerFilter=new RegExp("^(?:"+u.concat(e.sensitiveHeaders).map(escapeRegex).join("|")+")$","i");this._performRequest()}RedirectableRequest.prototype=Object.create(r.prototype);RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest);this._currentRequest.abort();this.emit("abort")};RedirectableRequest.prototype.destroy=function(e){destroyRequest(this._currentRequest,e);y.call(this,e);return this};RedirectableRequest.prototype.write=function(e,t,a){if(this._ending){throw new g}if(!isString(e)&&!isBuffer(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(isFunction(t)){a=t;t=null}if(e.length===0){if(a){a()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,a)}else{this.emit("error",new b);this.abort()}};RedirectableRequest.prototype.end=function(e,t,a){if(isFunction(e)){a=e;e=t=null}else if(isFunction(t)){a=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,a)}else{var n=this;var i=this._currentRequest;this.write(e,t,(function(){n._ended=true;i.end(null,null,a)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){var a=this;function destroyOnTimeout(t){t.setTimeout(e);t.removeListener("timeout",t.destroy);t.addListener("timeout",t.destroy)}function startTimer(t){if(a._timeout){clearTimeout(a._timeout)}a._timeout=setTimeout((function(){a.emit("timeout");clearTimer()}),e);destroyOnTimeout(t)}function clearTimer(){if(a._timeout){clearTimeout(a._timeout);a._timeout=null}a.removeListener("abort",clearTimer);a.removeListener("error",clearTimer);a.removeListener("response",clearTimer);a.removeListener("close",clearTimer);if(t){a.removeListener("timeout",t)}if(!a.socket){a._currentRequest.removeListener("socket",startTimer)}}if(t){this.on("timeout",t)}if(this.socket){startTimer(this.socket)}else{this._currentRequest.once("socket",startTimer)}this.on("socket",destroyOnTimeout);this.on("abort",clearTimer);this.on("error",clearTimer);this.on("response",clearTimer);this.on("close",clearTimer);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,a){return this._currentRequest[e](t,a)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(!isArray(e.sensitiveHeaders)){e.sensitiveHeaders=[]}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){throw new TypeError("Unsupported protocol "+e)}if(this._options.agents){var a=e.slice(0,-1);this._options.agent=this._options.agents[a]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var o of m){i.on(o,f[o])}this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path;if(this._isRedirect){var s=0;var r=this;var c=this._requestBodyBuffers;(function writeNext(e){if(i===r._currentRequest){if(e){r.emit("error",e)}else if(s=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}destroyRequest(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){throw new v}var i;var o=this._options.beforeRedirect;if(o){i=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var s=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];removeMatchingHeaders(/^content-/i,this._options.headers)}var r=removeMatchingHeaders(/^host$/i,this._options.headers);var c=parseUrl(this._currentUrl);var l=r||c.host;var u=/^\w+:/.test(a)?this._currentUrl:n.format(Object.assign(c,{host:l}));var d=resolveUrl(a,u);p("redirecting to",d.href);this._isRedirect=true;spreadUrlObject(d,this._options);if(d.protocol!==c.protocol&&d.protocol!=="https:"||d.host!==l&&!isSubdomain(d.host,l)){removeMatchingHeaders(this._headerFilter,this._options.headers)}if(isFunction(o)){var m={headers:e.headers,statusCode:t};var f={url:u,method:s,headers:i};o(this._options,m,f);this._sanitizeOptions(this._options)}this._performRequest()};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var a={};Object.keys(e).forEach((function(n){var i=n+":";var o=a[i]=e[n];var s=t[n]=Object.create(o);function request(e,n,o){if(isURL(e)){e=spreadUrlObject(e)}else if(isString(e)){e=spreadUrlObject(parseUrl(e))}else{o=n;n=validateUrl(e);e={protocol:i}}if(isFunction(n)){o=n;n=null}n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n);n.nativeProtocols=a;if(!isString(n.host)&&!isString(n.hostname)){n.hostname="::1"}c.equal(n.protocol,i,"protocol mismatch");p("options",n);return new RedirectableRequest(n,o)}function get(e,t,a){var n=s.request(e,t,a);n.end();return n}Object.defineProperties(s,{request:{value:request,configurable:true,enumerable:true,writable:true},get:{value:get,configurable:true,enumerable:true,writable:true}})}));return t}function noop(){}function parseUrl(e){var t;if(l){t=new i(e)}else{t=validateUrl(n.parse(e));if(!isString(t.protocol)){throw new x({input:e})}}return t}function resolveUrl(e,t){return l?new i(e,t):parseUrl(n.resolve(t,e))}function validateUrl(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)){throw new x({input:e.href||e})}if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host)){throw new x({input:e.href||e})}return e}function spreadUrlObject(e,t){var a=t||{};for(var n of d){a[n]=e[n]}if(a.hostname.startsWith("[")){a.hostname=a.hostname.slice(1,-1)}if(a.port!==""){a.port=Number(a.port)}a.path=a.search?a.pathname+a.search:a.pathname;return a}function removeMatchingHeaders(e,t){var a;for(var n in t){if(e.test(n)){a=t[n];delete t[n]}}return a===null||typeof a==="undefined"?undefined:String(a).trim()}function createErrorType(e,t,a){function CustomError(a){if(isFunction(Error.captureStackTrace)){Error.captureStackTrace(this,this.constructor)}Object.assign(this,a||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}CustomError.prototype=new(a||Error);Object.defineProperties(CustomError.prototype,{constructor:{value:CustomError,enumerable:false},name:{value:"Error ["+e+"]",enumerable:false}});return CustomError}function destroyRequest(e,t){for(var a of m){e.removeListener(a,f[a])}e.on("error",noop);e.destroy(t)}function isSubdomain(e,t){c(isString(e)&&isString(t));var a=e.length-t.length-1;return a>0&&e[a]==="."&&e.endsWith(t)}function isArray(e){return e instanceof Array}function isString(e){return typeof e==="string"||e instanceof String}function isFunction(e){return typeof e==="function"}function isBuffer(e){return typeof e==="object"&&"length"in e}function isURL(e){return i&&e instanceof i}function escapeRegex(e){return e.replace(/[\]\\/()*+?.$]/g,"\\$&")}e.exports=wrap({http:o,https:s});e.exports.wrap=wrap},6454:(e,t,a)=>{"use strict";var n=a(5630);var i=a(9023);var o=a(6928);var s=a(8611);var r=a(5692);var c=a(7016).parse;var p=a(9896);var l=a(2203).Stream;var u=a(6982);var d=a(4096);var m=a(1324);var f=a(8700);var x=a(4076);var h=a(1835);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];n.call(this);e=e||{};for(var t in e){this[t]=e[t]}}i.inherits(FormData,n);FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,a){a=a||{};if(typeof a==="string"){a={filename:a}}var i=n.prototype.append.bind(this);if(typeof t==="number"||t==null){t=String(t)}if(Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,a);var s=this._multiPartFooter();i(o);i(t);i(s);this._trackLength(o,t,a)};FormData.prototype._trackLength=function(e,t,a){var n=0;if(a.knownLength!=null){n+=Number(a.knownLength)}else if(Buffer.isBuffer(t)){n=t.length}else if(typeof t==="string"){n=Buffer.byteLength(t)}this._valueLength+=n;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&x(t,"httpVersion"))&&!(t instanceof l)){return}if(!a.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(x(e,"fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{p.stat(e.path,(function(a,n){if(a){t(a);return}var i=n.size-(e.start?e.start:0);t(null,i)}))}}else if(x(e,"httpVersion")){t(null,Number(e.headers["content-length"]))}else if(x(e,"httpModule")){e.on("response",(function(a){e.pause();t(null,Number(a.headers["content-length"]))}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,a){if(typeof a.header==="string"){return a.header}var n=this._getContentDisposition(t,a);var i=this._getContentType(t,a);var o="";var s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};if(typeof a.header==="object"){h(s,a.header)}var r;for(var c in s){if(x(s,c)){r=s[c];if(r==null){continue}if(!Array.isArray(r)){r=[r]}if(r.length){o+=c+": "+r.join("; ")+FormData.LINE_BREAK}}}return"--"+this.getBoundary()+FormData.LINE_BREAK+o+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var a;if(typeof t.filepath==="string"){a=o.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e&&(e.name||e.path)){a=o.basename(t.filename||e&&(e.name||e.path))}else if(e&&e.readable&&x(e,"httpVersion")){a=o.basename(e.client._httpMessage.path||"")}if(a){return'filename="'+a+'"'}};FormData.prototype._getContentType=function(e,t){var a=t.contentType;if(!a&&e&&e.name){a=d.lookup(e.name)}if(!a&&e&&e.path){a=d.lookup(e.path)}if(!a&&e&&e.readable&&x(e,"httpVersion")){a=e.headers["content-type"]}if(!a&&(t.filepath||t.filename)){a=d.lookup(t.filepath||t.filename)}if(!a&&e&&typeof e==="object"){a=FormData.DEFAULT_CONTENT_TYPE}return a};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var a=this._streams.length===0;if(a){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(x(e,t)){a[t.toLowerCase()]=e[t]}}return a};FormData.prototype.setBoundary=function(e){if(typeof e!=="string"){throw new TypeError("FormData boundary must be a string")}this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var a=0,n=this._streams.length;a{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(a){e[a]=e[a]||t[a]}));return e}},9808:e=>{"use strict";var t="Function.prototype.bind called on incompatible ";var a=Object.prototype.toString;var n=Math.max;var i="[object Function]";var o=function concatty(e,t){var a=[];for(var n=0;n{"use strict";var n=a(9808);e.exports=Function.prototype.bind||n},470:(e,t,a)=>{"use strict";var n;var i=a(5399);var o=a(1620);var s=a(3056);var r=a(4585);var c=a(6905);var p=a(105);var l=a(3314);var u=a(2578);var d=a(5641);var m=a(6171);var f=a(7147);var x=a(1017);var h=a(6947);var v=a(2621);var b=a(156);var g=Function;var getEvalledConstructor=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(e){}};var y=a(3170);var w=a(9094);var throwTypeError=function(){throw new l};var _=y?function(){try{arguments.callee;return throwTypeError}catch(e){try{return y(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError;var E=a(3336)();var j=a(1967);var k=a(1311);var O=a(8681);var A=a(3945);var S=a(8093);var C={};var R=typeof Uint8Array==="undefined"||!j?n:j(Uint8Array);var P={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?n:ArrayBuffer,"%ArrayIteratorPrototype%":E&&j?j([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics==="undefined"?n:Atomics,"%BigInt%":typeof BigInt==="undefined"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":typeof Float16Array==="undefined"?n:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?n:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?n:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array==="undefined"?n:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?n:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&j?j(j([][Symbol.iterator]())):n,"%JSON%":typeof JSON==="object"?JSON:n,"%Map%":typeof Map==="undefined"?n:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!E||!j?n:j((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?n:Promise,"%Proxy%":typeof Proxy==="undefined"?n:Proxy,"%RangeError%":r,"%ReferenceError%":c,"%Reflect%":typeof Reflect==="undefined"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?n:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!E||!j?n:j((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&j?j(""[Symbol.iterator]()):n,"%Symbol%":E?Symbol:n,"%SyntaxError%":p,"%ThrowTypeError%":_,"%TypedArray%":R,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array==="undefined"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap==="undefined"?n:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?n:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?n:WeakSet,"%Function.prototype.call%":S,"%Function.prototype.apply%":A,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":k,"%Math.abs%":d,"%Math.floor%":m,"%Math.max%":f,"%Math.min%":x,"%Math.pow%":h,"%Math.round%":v,"%Math.sign%":b,"%Reflect.getPrototypeOf%":O};if(j){try{null.error}catch(e){var T=j(j(e));P["%Error.prototype%"]=T}}var D=function doEval(e){var t;if(e==="%AsyncFunction%"){t=getEvalledConstructor("async function () {}")}else if(e==="%GeneratorFunction%"){t=getEvalledConstructor("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){t=getEvalledConstructor("async function* () {}")}else if(e==="%AsyncGenerator%"){var a=doEval("%AsyncGeneratorFunction%");if(a){t=a.prototype}}else if(e==="%AsyncIteratorPrototype%"){var n=doEval("%AsyncGenerator%");if(n&&j){t=j(n.prototype)}}P[e]=t;return t};var F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var L=a(7564);var U=a(4076);var N=L.call(S,Array.prototype.concat);var I=L.call(A,Array.prototype.splice);var z=L.call(S,String.prototype.replace);var B=L.call(S,String.prototype.slice);var q=L.call(S,RegExp.prototype.exec);var $=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var M=/\\(\\)?/g;var H=function stringToPath(e){var t=B(e,0,1);var a=B(e,-1);if(t==="%"&&a!=="%"){throw new p("invalid intrinsic syntax, expected closing `%`")}else if(a==="%"&&t!=="%"){throw new p("invalid intrinsic syntax, expected opening `%`")}var n=[];z(e,$,(function(e,t,a,i){n[n.length]=a?z(i,M,"$1"):t||e}));return n};var V=function getBaseIntrinsic(e,t){var a=e;var n;if(U(F,a)){n=F[a];a="%"+n[0]+"%"}if(U(P,a)){var i=P[a];if(i===C){i=D(a)}if(typeof i==="undefined"&&!t){throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:n,name:a,value:i}}throw new p("intrinsic "+e+" does not exist!")};e.exports=function GetIntrinsic(e,t){if(typeof e!=="string"||e.length===0){throw new l("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof t!=="boolean"){throw new l('"allowMissing" argument must be a boolean')}if(q(/^%?[^%]*%?$/,e)===null){throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var a=H(e);var i=a.length>0?a[0]:"";var o=V("%"+i+"%",t);var s=o.name;var r=o.value;var c=false;var u=o.alias;if(u){i=u[0];I(a,N([0,1],u))}for(var d=1,m=true;d=a.length){var v=y(r,f);m=!!v;if(m&&"get"in v&&!("originalValue"in v.get)){r=v.get}else{r=r[f]}}else{m=U(r,f);r=r[f]}if(m&&!c){P[s]=r}}}return r}},1311:(e,t,a)=>{"use strict";var n=a(5399);e.exports=n.getPrototypeOf||null},8681:e=>{"use strict";e.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null},1967:(e,t,a)=>{"use strict";var n=a(8681);var i=a(1311);var o=a(6669);e.exports=n?function getProto(e){return n(e)}:i?function getProto(e){if(!e||typeof e!=="object"&&typeof e!=="function"){throw new TypeError("getProto: not an object")}return i(e)}:o?function getProto(e){return o(e)}:null},1174:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},3170:(e,t,a)=>{"use strict";var n=a(1174);if(n){try{n([],"length")}catch(e){n=null}}e.exports=n},3813:e=>{"use strict";e.exports=(e,t=process.argv)=>{const a=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(a+e);const i=t.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var i=a(1114);e.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return i()}},1114:e=>{"use strict";e.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var t=Symbol("test");var a=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(a)!=="[object Symbol]"){return false}var n=42;e[t]=n;for(var i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(e,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==n||s.enumerable!==true){return false}}return true}},5479:(e,t,a)=>{"use strict";var n=a(1114);e.exports=function hasToStringTagShams(){return n()&&!!Symbol.toStringTag}},4076:(e,t,a)=>{"use strict";var n=Function.prototype.call;var i=Object.prototype.hasOwnProperty;var o=a(7564);e.exports=o.call(n,i)},5641:e=>{"use strict";e.exports=Math.abs},6171:e=>{"use strict";e.exports=Math.floor},7044:e=>{"use strict";e.exports=Number.isNaN||function isNaN(e){return e!==e}},7147:e=>{"use strict";e.exports=Math.max},1017:e=>{"use strict";e.exports=Math.min},6947:e=>{"use strict";e.exports=Math.pow},2621:e=>{"use strict";e.exports=Math.round},156:(e,t,a)=>{"use strict";var n=a(7044);e.exports=function sign(e){if(n(e)||e===0){return e}return e<0?-1:+1}},9829:(e,t,a)=>{ +(()=>{var e={6472:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o/dev/null 2>&1'+a}async function addINIValuesWindows(e){const t=await s.CSVArray(e);let a="\n";await s.asyncForEach(t,(async function(e){a+=await s.addLog("$tick",e,"Added to php.ini","win32")+"\n"}));return'Add-Content "$php_dir\\php.ini" "'+t.join("\n")+'"'+a}async function addINIValues(e,t,a=false){let n="\n";switch(a){case true:n+=await s.stepLog("Add php.ini values",t)+await s.suppressOutput(t)+"\n";break;case false:default:n+=await s.stepLog("Add php.ini values",t)+"\n";break}switch(t){case"win32":return n+await addINIValuesWindows(e);case"darwin":case"linux":return n+await addINIValuesUnix(e);default:return await s.log("Platform "+t+" is not supported",t,"error")}}},5469:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=issueCommand;t.info=info;t.error=error;t.setFailed=setFailed;t.getInput=getInput;const n=a(857);function toCommandValue(e){if(e instanceof Error){return e.toString()}return e}function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}function issueCommand(e,t,a){let i=`::${e}`;if(t&&Object.keys(t).length>0){i+=" ";const e=Object.entries(t).filter((([,e])=>e)).map((([e,t])=>`${e}=${escapeProperty(t)}`)).join(",");i+=e}i+=`::${escapeData(a)}`;process.stdout.write(i+n.EOL)}function info(e){process.stdout.write(e+n.EOL)}function error(e){issueCommand("error",{},e)}function setFailed(e){process.exitCode=1;error(e)}function getInput(e,t=false){const a=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&!a){throw new Error(`Input required and not supplied: ${e}`)}return a.trim()}},9524:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.fetch=fetch;const a=new Set([301,302,303,307,308]);async function fetch(e,t,n=5){const i={"User-Agent":`Mozilla/5.0 (${process.platform} ${process.arch}) setup-php`};if(t){i["Authorization"]="Bearer "+t}try{const t=await globalThis.fetch(e,{headers:i,redirect:n>0?"follow":"manual"});if(t.ok){const e=await t.text();return{data:e}}else if(a.has(t.status)&&n<=0){return{error:`${t.status}: Redirect error`}}else{return{error:`${t.status}: ${t.statusText}`}}}catch(e){return{error:`Fetch error: ${e.message}`}}}},8755:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{await run()})().catch((e=>{d.setFailed(e.message)}))},9075:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;os.compareVersions(t.version,e.version)));const i=a.find((e=>{if(e?.require?.php){return e?.require?.php.split("|").some((e=>e&&s.satisfies(t+".0",e)))}return false}));return i?i.version:null}return null}},7159:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{if(/^\d+\.\d+\.\d+(-|$)/.test(e))return e;const t=e.match(/^(\d+\.\d+\.\d+)([A-Za-z]+[0-9A-Za-z.]+)$/);return t?`${t[1]}-${t[2]}`:e};const t=e["version_prefix"]+e["version"];const a=`https://api.github.com/repos/${e["repository"]}/git/matching-refs/tags%2F${t}.`;const n=await d.readEnv("GITHUB_TOKEN")||await d.readEnv("COMPOSER_TOKEN");const i=await l.fetch(a,n);if(i.error||i.data==="[]"){e.error=i.error??`No version found with prefix ${t}.`;return e.version}else{const e=JSON.parse(i.data);const t=e.map((e=>(e.ref?.split("/").pop()??"").replace(/^v(?=\d)/,""))).filter((e=>e.length>0));const a=new Map;const n=t.map((e=>{const t=fixSemver(e);a.set(t,e);return t}));const o=n.toSorted(((e,t)=>{try{return p.compareVersions(t,e)}catch{return t.localeCompare(e,"en",{numeric:true,sensitivity:"base"})}}));return a.get(o[0])??o[0]}}async function getLatestVersion(e){if(!e.version&&e.fetch_latest==="false"){return"latest"}if(e.fetch_latest==="true"&&!e.repository){return"latest"}const t=await l.fetch(`${e.github}/${e.repository}/releases.atom`);if(t.data){const e=[...t.data.matchAll(/releases\/tag\/([a-zA-Z]*)?(\d+\.\d+\.\d+)"/g)].map((e=>e[2]));const a=e.toSorted(((e,t)=>e.localeCompare(t,undefined,{numeric:true})));return a.at(-1)||"latest"}return"latest"}async function getVersion(e,t){const a=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;const n=/^composer:(stable|preview|snapshot|[12])$/;const i=/[><=^~]+.*/;const o=/^\d+(\.\d+)?$/;t.version=e.replace(/v?(\d)/,"$1").replace(/\.x/,"");switch(true){case n.test(t.release):case a.test(t.version):case i.test(t.version)&&t.type==="composer":return t.version;case o.test(t.version)&&t.type==="composer":t.release=`${t.tool}:${t.version}.*`;return`${t.version}.*`;case!!t.repository&&o.test(t.version):return await getSemverVersion(t);default:return t.version.replace(/[><=^~]*/,"")}}async function getRelease(e,t){e=e.includes("/")?e.split("/")[1]:e;return e.includes(":")?[t.tool,e.split(":")[1]].join(":"):t.tool}async function filterList(e){const t=/^composer($|:.*)/;const a=/^composer:?($|preview$|snapshot$|v?\d+(\.\d+)?$|v?\d+\.\d+\.\d+[\w-]*$)/;const n=e.filter((e=>a.test(e)));let i="composer";e=e.filter((e=>!t.test(e)));switch(true){case n[0]==undefined:break;default:i=n.at(-1).replace(/v(\d\S*)/,"$1");break}e.unshift(i);return e}async function getUrl(e){const t=e.version??"latest";if(t==="latest"||t===""){return[e.domain,e.repository,e.prefix,"latest",e.verb,e.tool+e.extension].filter(Boolean).join("/")}else{return[e.domain,e.repository,e.prefix,e.verb,e.version_prefix+e.version,e.tool+e.extension].filter(Boolean).join("/")}}async function getPharUrl(e){if(e.version==="latest"){return e.domain+"/"+e.tool+".phar"}else{return e.domain+"/"+e.tool+"-"+e.version_prefix+e.version+".phar"}}async function addArchive(e){return await d.getCommand(e.os,"tool")+await d.joins(e.url,e.tool,e.version_parameter)}async function addPackage(e){const t=await d.getCommand(e.os,"composer_tool");const a=e.repository.split("/");const n=await d.joins(a[1],e.release,a[0]+"/",e.scope);return t+n}async function addBlackfirePlayer(e){switch(e.os){case"win32":return await d.addLog("$cross",e.tool,e.tool+" is not a windows tool","win32");default:if(e.version=="latest"){if(/5\.[5-6]|7\.0/.test(e.php_version)){e.version="1.9.3"}else if(/7\.[1-4]|8\.0/.test(e.php_version)){e.version="1.22.0"}}e.url=await getPharUrl(e);return addArchive(e)}}async function addCastor(e){e.tool="castor."+e.os.replace("win32","windows")+"-amd64";e.url=await getUrl(e);e.tool="castor";e.version_parameter=c.default.existsSync("castor.php")?e.version_parameter:"";return await addArchive(e)}async function addComposer(e){const t=e.version.replace("latest","stable");const a=e.github;const n=e.domain;const i="https://dl.cloudsmith.io";const o="https://artifacts.setup-php.com";const s=`composer-${e.php_version}-${t}.phar`;const r=`${a}/shivammathur/composer-cache/releases/latest/download/${s}`;const c=`${i}/public/shivammathur/composer-cache/raw/files/${s}`;const p=`${o}/composer/${s}`;const l=`${n}/download/latest-2.2.x/composer.phar`;const u=/^5\.[3-6]$|^7\.[0-1]$/.test(e.php_version);const m=`${n}/composer-${t}.phar`;const f=`${n}/download/${t}/composer.phar`;let x=`${r},${p},${c}`;let h=`${n}/composer.phar`;switch(true){case/^snapshot$/.test(t):h=u?l:h;break;case/^preview$|^2$/.test(t):h=u?l:m;break;case/^1$/.test(t):h=m;break;case/^\d+\.\d+\.\d+[\w-]*$/.test(e.version):x=`${a}/${e.repository}/releases/download/${e.version}/composer.phar`;h=f;break;default:h=u?l:m}const v=await d.readEnv("NO_TOOLS_CACHE")!=="true";e.url=v?`${x},${h}`:h;e.version_parameter=e.version;return await addArchive(e)}async function addDeployer(e){if(e.version==="latest"){e.url=e.domain+"/deployer.phar"}else{const t=await l.fetch("https://deployer.org/manifest.json");const a=JSON.parse(t.data);const n=Object.keys(a).find((t=>a[t].version===e.version));if(n){e.url=a[n].url}else{return await d.addLog("$cross","deployer","Version missing in deployer manifest",e.os)}}return await addArchive(e)}async function addDevTools(e){switch(e.os){case"linux":case"darwin":return"add_devtools "+e.tool;case"win32":return await d.addLog("$tick",e.tool,e.tool+" is not a windows tool","win32");default:return await d.log("Platform "+e.os+" is not supported",e.os,"error")}}async function addPECL(e){return await d.getCommand(e.os,"pecl")}async function addPhing(e){e.url=e.domain+"/get/phing-"+e.version+e.extension;if(e.version!="latest"){[e.prefix,e.verb]=["releases","download"];e.domain=e.github;e.extension="-"+e.version+e.extension;e.url+=","+await getUrl(e)}return await addArchive(e)}async function addPhive(e){switch(true){case/5\.[3-5]/.test(e.php_version):return await d.addLog("$cross","phive","Phive is not supported on PHP "+e.php_version,e.os);case/5\.6|7\.0/.test(e.php_version):e.version="0.12.1";break;case/7\.1/.test(e.php_version):e.version="0.13.5";break;case/7\.2/.test(e.php_version):e.version="0.14.5";break;case/7\.3|7\.4/.test(e.php_version):e.version="0.15.3";break;case/^latest$/.test(e.version):e.version=await getLatestVersion(e);break}e.extension="-"+e.version+e.extension;e.url=await getUrl(e);return await addArchive(e)}async function addPHPUnitTools(e){if(e.version==="latest"){e.version=await u.search(e.packagist,e.php_version)??"latest"}e.url=await getPharUrl(e);if(e.url.match(/-\d+/)){e.url+=","+e.url.replace(/-(\d+)\.\d+\.\d+/,"-$1")}return await addArchive(e)}async function addWPCLI(e){if(e.version==="latest"){e.uri="wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true";e.url=[e.domain,e.uri].join("/")}else{e.extension="-"+e.version+e.extension;e.url=await getUrl(e)}return await addArchive(e)}async function getData(e,t,a){const n=r.default.join(__dirname,"../src/configs/tools.json");const i=c.default.readFileSync(n,"utf8");const o=JSON.parse(i);e=e.replace(/\s+/g,"");const s=e.split(":");const p=s[0];const l=s[1];let u;if(Object.hasOwn(o,p)){u={...o[p],tool:p}}else{const e=Object.keys(o).find((e=>o[e].alias==p));if(e){u={...o[e],tool:e}}else if(p.includes("/")){u={tool:p.split("/")[1],repository:p,type:"composer"}}else{u={tool:p}}}const d="https://github.com";const m=u.domain??d;const f={tool:u.tool,version:"",url:"",os:a,php_version:t,github:d,domain:m,extension:u.extension??".phar",repository:u.repository??"",prefix:m===d?"releases":"",verb:m===d?"download":"",fetch_latest:u.fetch_latest??"false",scope:u.scope??"global",version_parameter:u.version_parameter!=null?JSON.stringify(u.version_parameter):"",version_prefix:u.version_prefix??"",release:"",packagist:u.packagist??u.repository??"",type:u.type,function:u.function,alias:u.alias};f.release=await getRelease(e,f);f.version=l?await getVersion(l,f):await getLatestVersion(f);f.url=await getUrl(f);return f}t.functionRecord={castor:addCastor,composer:addComposer,deployer:addDeployer,dev_tools:addDevTools,phive:addPhive,blackfire_player:addBlackfirePlayer,pecl:addPECL,phing:addPhing,phpunit:addPHPUnitTools,phpcpd:addPHPUnitTools,wp_cli:addWPCLI};async function addTools(e,a,n){let i="\n";if(e==="none"){return""}else{i+=await d.stepLog("Setup Tools",n)}const o=await filterList(await d.CSVArray(e));await d.asyncForEach(o,(async function(e){const o=await getData(e,a,n);i+="\n";switch(true){case o.error!==undefined:i+=await d.addLog("$cross",o.tool,o.error,o.os);break;case"phar"===o.type:i+=await addArchive(o);break;case"composer"===o.type:i+=await addPackage(o);break;case"custom-package"===o.type:i+=await d.customPackage(o.tool.split("-")[0],"tools",o.version,o.os);break;case"custom-function"===o.type:if(!o.function){i+=await d.addLog("$cross",o.tool,o.tool+" has no function defined. Please report this issue.",o.os)}else{i+=await t.functionRecord[o.function](o)}break;case/^none$/.test(o.tool):break;default:i+=await d.addLog("$cross",o.tool,"Tool "+o.tool+" is not supported",o.os);break}}));return i}},9277:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o1:return e.slice(0,3);default:return e+".0"}}}async function parseIniFile(e){switch(true){case/^(production|development|none)$/.test(e):return e;case/php\.ini-(production|development)$/.test(e):return e.split("-")[1];default:return"production"}}async function asyncForEach(e,t){for(const[a,n]of e.entries()){await t(n,a,e)}}async function color(e){switch(e){case"error":return"31";default:case"success":return"32";case"warning":return"33"}}async function log(e,t,a){switch(t){case"win32":return'printf "\\033['+await color(a)+";1m"+e+' \\033[0m"';case"linux":case"darwin":default:return'echo "\\033['+await color(a)+";1m"+e+'\\033[0m"'}}async function stepLog(e,t){switch(t){case"win32":return'Step-Log "'+e+'"';case"linux":case"darwin":return'step_log "'+e+'"';default:return await log("Platform "+t+" is not supported",t,"error")}}async function addLog(e,t,a,n){switch(n){case"win32":return'Add-Log "'+e+'" "'+t+'" "'+a+'"';case"linux":case"darwin":return'add_log "'+e+'" "'+t+'" "'+a+'"';default:return await log("Platform "+n+" is not supported",n,"error")}}async function extensionArray(e){switch(e){case"":case" ":return[];default:return[e.match(/(^|,\s?)none(\s?,|$)/)?"none":"",...e.split(",").map((function(e){e=e.trim().replace(/^\\\s*/,"");if(/.+-.+\/.+@.+/.test(e)){return e}return e.toLowerCase().replace(/^(:)?(php[-_]|none|zend )|(-[^-]*)-/,"$1$3")}))].filter(Boolean)}}async function CSVArray(e){switch(e){case"":case" ":return[];default:return e.split(/,(?=(?:(?:[^"']*["']){2})*[^"']*$)/).map((function(e){return e.trim().replace(/^["']|["']$|(?<==)["']/g,"").replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/,"='$1'").replace(/=(.*?)(=.*)/,"='$1$2'").replace(/:\s*["'](.*?)/g,":$1")})).filter(Boolean)}}async function getExtensionPrefix(e){switch(true){default:return"extension";case/xdebug([2-3])?$|opcache|ioncube|eaccelerator/.test(e):return"zend_extension"}}async function suppressOutput(e){switch(e){case"win32":return" >$null 2>&1";case"linux":case"darwin":return" >/dev/null 2>&1";default:return await log("Platform "+e+" is not supported",e,"error")}}async function getUnsupportedLog(e,t,a){return"\n"+await addLog("$cross",e,[e,"is not supported on PHP",t].join(" "),a)+"\n"}async function getCommand(e,t){switch(e){case"linux":case"darwin":return"add_"+t+" ";case"win32":return"Add-"+t.split("_").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join("")+" ";default:return await log("Platform "+e+" is not supported",e,"error")}}async function joins(...e){return[...e].join(" ")}async function scriptExtension(e){switch(e){case"win32":return".ps1";case"linux":case"darwin":return".sh";default:return await log("Platform "+e+" is not supported",e,"error")}}async function scriptTool(e){switch(e){case"win32":return"pwsh ";case"linux":case"darwin":return"bash ";default:return await log("Platform "+e+" is not supported",e,"error")}}async function customPackage(e,t,a,n){const i=e.replace(/\d+|(pdo|pecl)[_-]|[_-]db2/,"");const o=await scriptExtension(n);const s=c.join(__dirname,"../src/scripts/"+t+"/"+i+o);const r=await getCommand(n,i);return"\n. "+s+"\n"+r+a}async function parseExtensionSource(e,t){const a=/(\w+)-(\w+:\/\/.{1,253}(?:[.:][^:/\s]{2,63})+\/)?([\w.-]+)\/([\w.-]+)@(.+)/;const n=a.exec(e);n[2]=n[2]?n[2].slice(0,-1):"https://github.com";return await joins("\nadd_extension_from_source",...n.splice(1,n.length),t)}async function readPHPVersion(){const e=await getInput("php-version",false);if(e){return e}const t=await getInput("php-version-file",false)||".php-version";if(r.default.existsSync(t)){const e=r.default.readFileSync(t,"utf8");const a=e.match(/^(?:php\s)?(\d+\.\d+\.\d+)$/m);return a?a[1]:e.trim()}else if(t!==".php-version"){throw new Error(`Could not find '${t}' file.`)}const a=await readEnv("COMPOSER_PROJECT_DIR");const n=c.join(a,"composer.lock");if(r.default.existsSync(n)){const e=JSON.parse(r.default.readFileSync(n,"utf8"));if(e["platform-overrides"]&&e["platform-overrides"]["php"]){return e["platform-overrides"]["php"]}}const i=c.join(a,"composer.json");if(r.default.existsSync(i)){const e=JSON.parse(r.default.readFileSync(i,"utf8"));if(e["config"]&&e["config"]["platform"]&&e["config"]["platform"]["php"]){return e["config"]["platform"]["php"]}}return"latest"}async function setVariable(e,t,a){switch(a){case"win32":return"\n$"+e+" = "+t+"\n";case"linux":case"darwin":default:return"\n"+e+'="$('+t+')"\n'}}},5236:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o{s+=p.write(e);if(u){u(e)}};const stdOutListener=e=>{o+=c.write(e);if(l){l(e)}};const d=Object.assign(Object.assign({},a===null||a===void 0?void 0:a.listeners),{stdout:stdOutListener,stderr:stdErrListener});const m=yield exec(e,t,Object.assign(Object.assign({},a),{listeners:d}));o+=c.end();s+=p.end();return{exitCode:m,stdout:o,stderr:s}}))}},6665:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o-1){const e=n.substring(0,i);a(e);n=n.substring(i+r.EOL.length);i=n.indexOf(r.EOL)}return n}catch(e){this._debug(`error processing line. Failed with error ${e}`);return""}}_getSpawnFileName(){if(f){if(this._isCmdFile()){return process.env["COMSPEC"]||"cmd.exe"}}return this.toolPath}_getSpawnArgs(e){if(f){if(this._isCmdFile()){let t=`/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;for(const a of this.args){t+=" ";t+=e.windowsVerbatimArguments?a:this._windowsQuoteCmdArg(a)}t+='"';return[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 a=false;for(const n of e){if(t.some((e=>e===n))){a=true;break}}if(!a){return e}let n='"';let i=true;for(let t=e.length;t>0;t--){n+=e[t-1];if(i&&e[t-1]==="\\"){n+="\\"}else if(e[t-1]==='"'){i=true;n+='"'}else{i=false}}n+='"';return 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='"';let a=true;for(let n=e.length;n>0;n--){t+=e[n-1];if(a&&e[n-1]==="\\"){t+="\\"}else if(e[n-1]==='"'){a=true;t+="\\"}else{a=false}}t+='"';return t.split("").reverse().join("")}_cloneExecOptions(e){e=e||{};const t={cwd:e.cwd||process.cwd(),env:e.env||process.env,silent:e.silent||false,windowsVerbatimArguments:e.windowsVerbatimArguments||false,failOnStdErr:e.failOnStdErr||false,ignoreReturnCode:e.ignoreReturnCode||false,delay:e.delay||1e4};t.outStream=e.outStream||process.stdout;t.errStream=e.errStream||process.stderr;return t}_getSpawnOptions(e,t){e=e||{};const a={};a.cwd=e.cwd;a.env=e.env;a["windowsVerbatimArguments"]=e.windowsVerbatimArguments||this._isCmdFile();if(e.windowsVerbatimArguments){a.argv0=`"${t}"`}return a}exec(){return s(this,void 0,void 0,(function*(){if(!d.isRooted(this.toolPath)&&(this.toolPath.includes("/")||f&&this.toolPath.includes("\\"))){this.toolPath=l.resolve(process.cwd(),this.options.cwd||process.cwd(),this.toolPath)}this.toolPath=yield u.which(this.toolPath,true);return new Promise(((e,t)=>s(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 a=this._cloneExecOptions(this.options);if(!a.silent&&a.outStream){a.outStream.write(this._getCommandString(a)+r.EOL)}const n=new ExecState(a,this.toolPath);n.on("debug",(e=>{this._debug(e)}));if(this.options.cwd&&!(yield d.exists(this.options.cwd))){return t(new Error(`The cwd: ${this.options.cwd} does not exist!`))}const i=this._getSpawnFileName();const o=p.spawn(i,this._getSpawnArgs(a),this._getSpawnOptions(this.options,i));let s="";if(o.stdout){o.stdout.on("data",(e=>{if(this.options.listeners&&this.options.listeners.stdout){this.options.listeners.stdout(e)}if(!a.silent&&a.outStream){a.outStream.write(e)}s=this._processLineBuffer(e,s,(e=>{if(this.options.listeners&&this.options.listeners.stdline){this.options.listeners.stdline(e)}}))}))}let c="";if(o.stderr){o.stderr.on("data",(e=>{n.processStderr=true;if(this.options.listeners&&this.options.listeners.stderr){this.options.listeners.stderr(e)}if(!a.silent&&a.errStream&&a.outStream){const t=a.failOnStdErr?a.errStream:a.outStream;t.write(e)}c=this._processLineBuffer(e,c,(e=>{if(this.options.listeners&&this.options.listeners.errline){this.options.listeners.errline(e)}}))}))}o.on("error",(e=>{n.processError=e.message;n.processExited=true;n.processClosed=true;n.CheckComplete()}));o.on("exit",(e=>{n.processExitCode=e;n.processExited=true;this._debug(`Exit code ${e} received from tool '${this.toolPath}'`);n.CheckComplete()}));o.on("close",(e=>{n.processExitCode=e;n.processExited=true;n.processClosed=true;this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);n.CheckComplete()}));n.on("done",((a,n)=>{if(s.length>0){this.emit("stdline",s)}if(c.length>0){this.emit("errline",c)}o.removeAllListeners();if(a){t(a)}else{e(n)}}));if(this.options.input){if(!o.stdin){throw new Error("child process missing stdin")}o.stdin.end(this.options.input)}}))))}))}}t.ToolRunner=ToolRunner;function argStringToArray(e){const t=[];let a=false;let n=false;let i="";function append(e){if(n&&e!=='"'){i+="\\"}i+=e;n=false}for(let o=0;o0){t.push(i);i=""}continue}append(s)}if(i.length>0){t.push(i.trim())}return t}class ExecState extends c.EventEmitter{constructor(e,t){super();this.processClosed=false;this.processError="";this.processExitCode=0;this.processExited=false;this.processStderr=false;this.delay=1e4;this.done=false;this.timeout=null;if(!t){throw new Error("toolPath must not be empty")}this.options=e;this.toolPath=t;if(e.delay){this.delay=e.delay}}CheckComplete(){if(this.done){return}if(this.processClosed){this._setResult()}else if(this.processExited){this.timeout=(0,m.setTimeout)(ExecState.HandleTimeout,this.delay,this)}}_debug(e){this.emit("debug",e)}_setResult(){let e;if(this.processExited){if(this.processError){e=new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`)}else if(this.processExitCode!==0&&!this.options.ignoreReturnCode){e=new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`)}else if(this.processStderr&&this.options.failOnStdErr){e=new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`)}}if(this.timeout){clearTimeout(this.timeout);this.timeout=null}this.done=true;this.emit("done",e,this.processExitCode)}static HandleTimeout(e){if(e.done){return}if(!e.processClosed&&e.processExited){const t=`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._debug(t)}e._setResult()}}},5207:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;oe.toUpperCase()===t))){return e}}else{if(isUnixExecutable(n)){return e}}}const i=e;for(const o of a){e=i+o;n=undefined;try{n=yield(0,t.stat)(e)}catch(t){if(t.code!=="ENOENT"){console.log(`Unexpected error attempting to determine if executable file exists '${e}': ${t}`)}}if(n&&n.isFile()){if(t.IS_WINDOWS){try{const a=p.dirname(e);const n=p.basename(e).toUpperCase();for(const i of yield(0,t.readdir)(a)){if(n===i.toUpperCase()){e=p.join(a,i);break}}}catch(t){console.log(`Unexpected error attempting to determine the actual case of the file '${e}': ${t}`)}return e}else{if(isUnixExecutable(n)){return e}}}}return""}))}function normalizeSeparators(e){e=e||"";if(t.IS_WINDOWS){e=e.replace(/\//g,"\\");return e.replace(/\\\\+/g,"\\")}return e.replace(/\/\/+/g,"/")}function isUnixExecutable(e){return(e.mode&1)>0||(e.mode&8)>0&&process.getgid!==undefined&&e.gid===process.getgid()||(e.mode&64)>0&&process.getuid!==undefined&&e.uid===process.getuid()}function getCmdPath(){var e;return(e=process.env["COMSPEC"])!==null&&e!==void 0?e:`cmd.exe`}},4994:function(e,t,a){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,a,n){if(n===undefined)n=a;var i=Object.getOwnPropertyDescriptor(t,a);if(!i||("get"in i?!t.__esModule:i.writable||i.configurable)){i={enumerable:true,get:function(){return t[a]}}}Object.defineProperty(e,n,i)}:function(e,t,a,n){if(n===undefined)n=a;e[n]=t[a]});var i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var o=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a))t[t.length]=a;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=ownKeys(e),o=0;o|]/.test(e)){throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows')}}try{yield p.rm(e,{force:true,maxRetries:3,recursive:true,retryDelay:300})}catch(e){throw new Error(`File was unable to be removed ${e}`)}}))}function mkdirP(e){return s(this,void 0,void 0,(function*(){(0,r.ok)(e,"a path argument must be provided");yield p.mkdir(e,{recursive:true})}))}function which(e,t){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}if(t){const t=yield which(e,false);if(!t){if(p.IS_WINDOWS){throw new Error(`Unable to locate executable file: ${e}. 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.`)}else{throw new Error(`Unable to locate executable file: ${e}. 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 t}const a=yield findInPath(e);if(a&&a.length>0){return a[0]}return""}))}function findInPath(e){return s(this,void 0,void 0,(function*(){if(!e){throw new Error("parameter 'tool' is required")}const t=[];if(p.IS_WINDOWS&&process.env["PATHEXT"]){for(const e of process.env["PATHEXT"].split(c.delimiter)){if(e){t.push(e)}}}if(p.isRooted(e)){const a=yield p.tryGetExecutablePath(e,t);if(a){return[a]}return[]}if(e.includes(c.sep)){return[]}const a=[];if(process.env.PATH){for(const e of process.env.PATH.split(c.delimiter)){if(e){a.push(e)}}}const n=[];for(const i of a){const a=yield p.tryGetExecutablePath(c.join(i,e),t);if(a){n.push(a)}}return n}))}function readCopyOptions(e){const t=e.force==null?true:e.force;const a=Boolean(e.recursive);const n=e.copySourceDirectory==null?true:Boolean(e.copySourceDirectory);return{force:t,recursive:a,copySourceDirectory:n}}function cpDirRecursive(e,t,a,n){return s(this,void 0,void 0,(function*(){if(a>=255)return;a++;yield mkdirP(t);const i=yield p.readdir(e);for(const o of i){const i=`${e}/${o}`;const s=`${t}/${o}`;const r=yield p.lstat(i);if(r.isDirectory()){yield cpDirRecursive(i,s,a,n)}else{yield copyFile(i,s,n)}}yield p.chmod(t,(yield p.stat(e)).mode)}))}function copyFile(e,t,a){return s(this,void 0,void 0,(function*(){if((yield p.lstat(e)).isSymbolicLink()){try{yield p.lstat(t);yield p.unlink(t)}catch(e){if(e.code==="EPERM"){yield p.chmod(t,"0666");yield p.unlink(t)}}const a=yield p.readlink(e);yield p.symlink(a,t,p.IS_WINDOWS?"junction":null)}else if(!(yield p.exists(t))||a){yield p.copyFile(e,t)}}))}},1324:(e,t,a)=>{e.exports={parallel:a(3857),serial:a(1054),serialOrdered:a(3961)}},4818:e=>{e.exports=abort;function abort(e){Object.keys(e.jobs).forEach(clean.bind(e));e.jobs={}}function clean(e){if(typeof this.jobs[e]=="function"){this.jobs[e]()}}},8452:(e,t,a)=>{var n=a(9200);e.exports=async;function async(e){var t=false;n((function(){t=true}));return function async_callback(a,i){if(t){e(a,i)}else{n((function nextTick_callback(){e(a,i)}))}}}},9200:e=>{e.exports=defer;function defer(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if(t){t(e)}else{setTimeout(e,0)}}},4902:(e,t,a)=>{var n=a(8452),i=a(4818);e.exports=iterate;function iterate(e,t,a,n){var o=a["keyedList"]?a["keyedList"][a.index]:a.index;a.jobs[o]=runJob(t,o,e[o],(function(e,t){if(!(o in a.jobs)){return}delete a.jobs[o];if(e){i(a)}else{a.results[o]=t}n(e,a.results)}))}function runJob(e,t,a,i){var o;if(e.length==2){o=e(a,n(i))}else{o=e(a,t,n(i))}return o}},1721:e=>{e.exports=state;function state(e,t){var a=!Array.isArray(e),n={index:0,keyedList:a||t?Object.keys(e):null,jobs:{},results:a?{}:[],size:a?Object.keys(e).length:e.length};if(t){n.keyedList.sort(a?t:function(a,n){return t(e[a],e[n])})}return n}},3351:(e,t,a)=>{var n=a(4818),i=a(8452);e.exports=terminator;function terminator(e){if(!Object.keys(this.jobs).length){return}this.index=this.size;n(this);i(e)(null,this.results)}},3857:(e,t,a)=>{var n=a(4902),i=a(1721),o=a(3351);e.exports=parallel;function parallel(e,t,a){var s=i(e);while(s.index<(s["keyedList"]||e).length){n(e,t,s,(function(e,t){if(e){a(e,t);return}if(Object.keys(s.jobs).length===0){a(null,s.results);return}}));s.index++}return o.bind(s,a)}},1054:(e,t,a)=>{var n=a(3961);e.exports=serial;function serial(e,t,a){return n(e,t,null,a)}},3961:(e,t,a)=>{var n=a(4902),i=a(1721),o=a(3351);e.exports=serialOrdered;e.exports.ascending=ascending;e.exports.descending=descending;function serialOrdered(e,t,a,s){var r=i(e,a);n(e,t,r,(function iteratorHandler(a,i){if(a){s(a,i);return}r.index++;if(r.index<(r["keyedList"]||e).length){n(e,t,r,iteratorHandler);return}s(null,r.results)}));return o.bind(r,s)}function ascending(e,t){return et?1:0}function descending(e,t){return-1*ascending(e,t)}},2639:(e,t,a)=>{"use strict";var n=a(7564);var i=a(3945);var o=a(8093);var s=a(1330);e.exports=s||n.call(o,i)},3945:e=>{"use strict";e.exports=Function.prototype.apply},8093:e=>{"use strict";e.exports=Function.prototype.call},8705:(e,t,a)=>{"use strict";var n=a(7564);var i=a(3314);var o=a(8093);var s=a(2639);e.exports=function callBindBasic(e){if(e.length<1||typeof e[0]!=="function"){throw new i("a function is required")}return s(n,o,e)}},1330:e=>{"use strict";e.exports=typeof Reflect!=="undefined"&&Reflect&&Reflect.apply},5630:(e,t,a)=>{var n=a(9023);var i=a(2203).Stream;var o=a(2710);e.exports=CombinedStream;function CombinedStream(){this.writable=false;this.readable=true;this.dataSize=0;this.maxDataSize=2*1024*1024;this.pauseStreams=true;this._released=false;this._streams=[];this._currentStream=null;this._insideLoop=false;this._pendingNext=false}n.inherits(CombinedStream,i);CombinedStream.create=function(e){var t=new this;e=e||{};for(var a in e){t[a]=e[a]}return t};CombinedStream.isStreamLike=function(e){return typeof e!=="function"&&typeof e!=="string"&&typeof e!=="boolean"&&typeof e!=="number"&&!Buffer.isBuffer(e)};CombinedStream.prototype.append=function(e){var t=CombinedStream.isStreamLike(e);if(t){if(!(e instanceof o)){var a=o.create(e,{maxDataSize:Infinity,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this));e=a}this._handleErrors(e);if(this.pauseStreams){e.pause()}}this._streams.push(e);return this};CombinedStream.prototype.pipe=function(e,t){i.prototype.pipe.call(this,e,t);this.resume();return e};CombinedStream.prototype._getNext=function(){this._currentStream=null;if(this._insideLoop){this._pendingNext=true;return}this._insideLoop=true;try{do{this._pendingNext=false;this._realGetNext()}while(this._pendingNext)}finally{this._insideLoop=false}};CombinedStream.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e=="undefined"){this.end();return}if(typeof e!=="function"){this._pipeNext(e);return}var t=e;t(function(e){var t=CombinedStream.isStreamLike(e);if(t){e.on("data",this._checkDataSize.bind(this));this._handleErrors(e)}this._pipeNext(e)}.bind(this))};CombinedStream.prototype._pipeNext=function(e){this._currentStream=e;var t=CombinedStream.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this));e.pipe(this,{end:false});return}var a=e;this.write(a);this._getNext()};CombinedStream.prototype._handleErrors=function(e){var t=this;e.on("error",(function(e){t._emitError(e)}))};CombinedStream.prototype.write=function(e){this.emit("data",e)};CombinedStream.prototype.pause=function(){if(!this.pauseStreams){return}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};CombinedStream.prototype.resume=function(){if(!this._released){this._released=true;this.writable=true;this._getNext()}if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function")this._currentStream.resume();this.emit("resume")};CombinedStream.prototype.end=function(){this._reset();this.emit("end")};CombinedStream.prototype.destroy=function(){this._reset();this.emit("close")};CombinedStream.prototype._reset=function(){this.writable=false;this._streams=[];this._currentStream=null};CombinedStream.prototype._checkDataSize=function(){this._updateDataSize();if(this.dataSize<=this.maxDataSize){return}var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))};CombinedStream.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach((function(t){if(!t.dataSize){return}e.dataSize+=t.dataSize}));if(this._currentStream&&this._currentStream.dataSize){this.dataSize+=this._currentStream.dataSize}};CombinedStream.prototype._emitError=function(e){this._reset();this.emit("error",e)}},2026:function(e,t){(function(e,a){true?a(t):0})(this,(function(e){"use strict";const t=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;const validateAndParse=e=>{if(typeof e!=="string"){throw new TypeError("Invalid argument expected string")}const a=e.match(t);if(!a){throw new Error(`Invalid argument not valid semver ('${e}' received)`)}a.shift();return a};const isWildcard=e=>e==="*"||e==="x"||e==="X";const tryParse=e=>{const t=parseInt(e,10);return isNaN(t)?e:t};const forceType=(e,t)=>typeof e!==typeof t?[String(e),String(t)]:[e,t];const compareStrings=(e,t)=>{if(isWildcard(e)||isWildcard(t))return 0;const[a,n]=forceType(tryParse(e),tryParse(t));if(a>n)return 1;if(a{for(let a=0;a{const a=validateAndParse(e);const n=validateAndParse(t);const i=a.pop();const o=n.pop();const s=compareSegments(a,n);if(s!==0)return s;if(i&&o){return compareSegments(i.split("."),o.split("."))}else if(i||o){return i?-1:1}return 0};const compare=(e,t,n)=>{assertValidOperator(n);const i=compareVersions(e,t);return a[n].includes(i)};const a={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};const n=Object.keys(a);const assertValidOperator=e=>{if(typeof e!=="string"){throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`)}if(n.indexOf(e)===-1){throw new Error(`Invalid operator, expected one of ${n.join("|")}`)}};const satisfies=(e,t)=>{t=t.replace(/([><=]+)\s+/g,"$1");if(t.includes("||")){return t.split("||").some((t=>satisfies(e,t)))}else if(t.includes(" - ")){const[a,n]=t.split(" - ",2);return satisfies(e,`>=${a} <=${n}`)}else if(t.includes(" ")){return t.trim().replace(/\s{2,}/g," ").split(" ").every((t=>satisfies(e,t)))}const a=t.match(/^([<>=~^]+)/);const n=a?a[1]:"=";if(n!=="^"&&n!=="~")return compare(e,t,n);const[i,o,s,,r]=validateAndParse(e);const[c,p,l,,u]=validateAndParse(t);const d=[i,o,s];const m=[c,p!==null&&p!==void 0?p:"x",l!==null&&l!==void 0?l:"x"];if(u){if(!r)return false;if(compareSegments(d,m)!==0)return false;if(compareSegments(r.split("."),u.split("."))===-1)return false}const f=m.findIndex((e=>e!=="0"))+1;const x=n==="~"?2:f>1?f:1;if(compareSegments(d.slice(0,x),m.slice(0,x))!==0)return false;if(compareSegments(d.slice(x),m.slice(x))===-1)return false;return true};const validate=e=>typeof e==="string"&&/^[v\d]/.test(e)&&t.test(e);const validateStrict=e=>typeof e==="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(e);e.compare=compare;e.compareVersions=compareVersions;e.satisfies=satisfies;e.validate=validate;e.validateStrict=validateStrict}))},6110:(e,t,a)=>{t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.storage=localstorage();t.destroy=(()=>{let e=false;return()=>{if(!e){e=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function useColors(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let e;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function formatArgs(t){t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff);if(!this.useColors){return}const a="color: "+this.color;t.splice(1,0,a,"color: inherit");let n=0;let i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{if(e==="%%"){return}n++;if(e==="%c"){i=n}}));t.splice(i,0,a)}t.log=console.debug||console.log||(()=>{});function save(e){try{if(e){t.storage.setItem("debug",e)}else{t.storage.removeItem("debug")}}catch(e){}}function load(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}if(!e&&typeof process!=="undefined"&&"env"in process){e=process.env.DEBUG}return e}function localstorage(){try{return localStorage}catch(e){}}e.exports=a(897)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},897:(e,t,a)=>{function setup(e){createDebug.debug=createDebug;createDebug.default=createDebug;createDebug.coerce=coerce;createDebug.disable=disable;createDebug.enable=enable;createDebug.enabled=enabled;createDebug.humanize=a(744);createDebug.destroy=destroy;Object.keys(e).forEach((t=>{createDebug[t]=e[t]}));createDebug.names=[];createDebug.skips=[];createDebug.formatters={};function selectColor(e){let t=0;for(let a=0;a{if(t==="%%"){return"%"}o++;const i=createDebug.formatters[n];if(typeof i==="function"){const n=e[o];t=i.call(a,n);e.splice(o,1);o--}return t}));createDebug.formatArgs.call(a,e);const s=a.log||createDebug.log;s.apply(a,e)}debug.namespace=e;debug.useColors=createDebug.useColors();debug.color=createDebug.selectColor(e);debug.extend=extend;debug.destroy=createDebug.destroy;Object.defineProperty(debug,"enabled",{enumerable:true,configurable:false,get:()=>{if(a!==null){return a}if(n!==createDebug.namespaces){n=createDebug.namespaces;i=createDebug.enabled(e)}return i},set:e=>{a=e}});if(typeof createDebug.init==="function"){createDebug.init(debug)}return debug}function extend(e,t){const a=createDebug(this.namespace+(typeof t==="undefined"?":":t)+e);a.log=this.log;return a}function enable(e){createDebug.save(e);createDebug.namespaces=e;createDebug.names=[];createDebug.skips=[];const t=(typeof e==="string"?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t){if(e[0]==="-"){createDebug.skips.push(e.slice(1))}else{createDebug.names.push(e)}}}function matchesTemplate(e,t){let a=0;let n=0;let i=-1;let o=0;while(a"-"+e))].join(",");createDebug.enable("");return e}function enabled(e){for(const t of createDebug.skips){if(matchesTemplate(e,t)){return false}}for(const t of createDebug.names){if(matchesTemplate(e,t)){return true}}return false}function coerce(e){if(e instanceof Error){return e.stack||e.message}return e}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}createDebug.enable(createDebug.load());return createDebug}e.exports=setup},2830:(e,t,a)=>{if(typeof process==="undefined"||process.type==="renderer"||process.browser===true||process.__nwjs){e.exports=a(6110)}else{e.exports=a(5108)}},5108:(e,t,a)=>{const n=a(2018);const i=a(9023);t.init=init;t.log=log;t.formatArgs=formatArgs;t.save=save;t.load=load;t.useColors=useColors;t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");t.colors=[6,2,3,4,5,1];try{const e=a(1450);if(e&&(e.stderr||e).level>=2){t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221]}}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const a=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let n=process.env[t];if(/^(yes|on|true|enabled)$/i.test(n)){n=true}else if(/^(no|off|false|disabled)$/i.test(n)){n=false}else if(n==="null"){n=null}else{n=Number(n)}e[a]=n;return e}),{});function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)}function formatArgs(t){const{namespace:a,useColors:n}=this;if(n){const n=this.color;const i="[3"+(n<8?n:"8;5;"+n);const o=` ${i};1m${a} `;t[0]=o+t[0].split("\n").join("\n"+o);t.push(i+"m+"+e.exports.humanize(this.diff)+"")}else{t[0]=getDate()+a+" "+t[0]}}function getDate(){if(t.inspectOpts.hideDate){return""}return(new Date).toISOString()+" "}function log(...e){return process.stderr.write(i.formatWithOptions(t.inspectOpts,...e)+"\n")}function save(e){if(e){process.env.DEBUG=e}else{delete process.env.DEBUG}}function load(){return process.env.DEBUG}function init(e){e.inspectOpts={};const a=Object.keys(t.inspectOpts);for(let n=0;ne.trim())).join(" ")};o.O=function(e){this.inspectOpts.colors=this.useColors;return i.inspect(e,this.inspectOpts)}},2710:(e,t,a)=>{var n=a(2203).Stream;var i=a(9023);e.exports=DelayedStream;function DelayedStream(){this.source=null;this.dataSize=0;this.maxDataSize=1024*1024;this.pauseStream=true;this._maxDataSizeExceeded=false;this._released=false;this._bufferedEvents=[]}i.inherits(DelayedStream,n);DelayedStream.create=function(e,t){var a=new this;t=t||{};for(var n in t){a[n]=t[n]}a.source=e;var i=e.emit;e.emit=function(){a._handleEmit(arguments);return i.apply(e,arguments)};e.on("error",(function(){}));if(a.pauseStream){e.pause()}return a};Object.defineProperty(DelayedStream.prototype,"readable",{configurable:true,enumerable:true,get:function(){return this.source.readable}});DelayedStream.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};DelayedStream.prototype.resume=function(){if(!this._released){this.release()}this.source.resume()};DelayedStream.prototype.pause=function(){this.source.pause()};DelayedStream.prototype.release=function(){this._released=true;this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this));this._bufferedEvents=[]};DelayedStream.prototype.pipe=function(){var e=n.prototype.pipe.apply(this,arguments);this.resume();return e};DelayedStream.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}if(e[0]==="data"){this.dataSize+=e[1].length;this._checkIfMaxDataSizeExceeded()}this._bufferedEvents.push(e)};DelayedStream.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded){return}if(this.dataSize<=this.maxDataSize){return}this._maxDataSizeExceeded=true;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}},6669:(e,t,a)=>{"use strict";var n=a(8705);var i=a(3170);var o;try{o=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS"){throw e}}var s=!!o&&i&&i(Object.prototype,"__proto__");var r=Object;var c=r.getPrototypeOf;e.exports=s&&typeof s.get==="function"?n([s.get]):typeof c==="function"?function getDunder(e){return c(e==null?e:r(e))}:false},9094:e=>{"use strict";var t=Object.defineProperty||false;if(t){try{t({},"a",{value:1})}catch(e){t=false}}e.exports=t},3056:e=>{"use strict";e.exports=EvalError},1620:e=>{"use strict";e.exports=Error},4585:e=>{"use strict";e.exports=RangeError},6905:e=>{"use strict";e.exports=ReferenceError},105:e=>{"use strict";e.exports=SyntaxError},3314:e=>{"use strict";e.exports=TypeError},2578:e=>{"use strict";e.exports=URIError},5399:e=>{"use strict";e.exports=Object},8700:(e,t,a)=>{"use strict";var n=a(470);var i=n("%Object.defineProperty%",true);var o=a(5479)();var s=a(4076);var r=a(3314);var c=o?Symbol.toStringTag:null;e.exports=function setToStringTag(e,t){var a=arguments.length>2&&!!arguments[2]&&arguments[2].force;var n=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof a!=="undefined"&&typeof a!=="boolean"||typeof n!=="undefined"&&typeof n!=="boolean"){throw new r("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans")}if(c&&(a||!s(e,c))){if(i){i(e,c,{configurable:!n,enumerable:false,value:t,writable:false})}else{e[c]=t}}}},4778:(e,t,a)=>{var n;e.exports=function(){if(!n){try{n=a(2830)("follow-redirects")}catch(e){}if(typeof n!=="function"){n=function(){}}}n.apply(null,arguments)}},1573:(e,t,a)=>{var n=a(7016);var i=n.URL;var o=a(8611);var s=a(5692);var r=a(2203).Writable;var c=a(2613);var p=a(4778);(function detectUnsupportedEnvironment(){var e=typeof process!=="undefined";var t=typeof window!=="undefined"&&typeof document!=="undefined";var a=isFunction(Error.captureStackTrace);if(!e&&(t||!a)){console.warn("The follow-redirects package should be excluded from browser builds.")}})();var l=false;try{c(new i(""))}catch(e){l=e.code==="ERR_INVALID_URL"}var u=["Authorization","Proxy-Authorization","Cookie"];var d=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"];var m=["abort","aborted","connect","error","socket","timeout"];var f=Object.create(null);m.forEach((function(e){f[e]=function(t,a,n){this._redirectable.emit(e,t,a,n)}}));var x=createErrorType("ERR_INVALID_URL","Invalid URL",TypeError);var h=createErrorType("ERR_FR_REDIRECTION_FAILURE","Redirected request failed");var v=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",h);var b=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit");var g=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");var y=r.prototype.destroy||noop;function RedirectableRequest(e,t){r.call(this);this._sanitizeOptions(e);this._options=e;this._ended=false;this._ending=false;this._redirectCount=0;this._redirects=[];this._requestBodyLength=0;this._requestBodyBuffers=[];if(t){this.on("response",t)}var a=this;this._onNativeResponse=function(e){try{a._processResponse(e)}catch(e){a.emit("error",e instanceof h?e:new h({cause:e}))}};this._headerFilter=new RegExp("^(?:"+u.concat(e.sensitiveHeaders).map(escapeRegex).join("|")+")$","i");this._performRequest()}RedirectableRequest.prototype=Object.create(r.prototype);RedirectableRequest.prototype.abort=function(){destroyRequest(this._currentRequest);this._currentRequest.abort();this.emit("abort")};RedirectableRequest.prototype.destroy=function(e){destroyRequest(this._currentRequest,e);y.call(this,e);return this};RedirectableRequest.prototype.write=function(e,t,a){if(this._ending){throw new g}if(!isString(e)&&!isBuffer(e)){throw new TypeError("data should be a string, Buffer or Uint8Array")}if(isFunction(t)){a=t;t=null}if(e.length===0){if(a){a()}return}if(this._requestBodyLength+e.length<=this._options.maxBodyLength){this._requestBodyLength+=e.length;this._requestBodyBuffers.push({data:e,encoding:t});this._currentRequest.write(e,t,a)}else{this.emit("error",new b);this.abort()}};RedirectableRequest.prototype.end=function(e,t,a){if(isFunction(e)){a=e;e=t=null}else if(isFunction(t)){a=t;t=null}if(!e){this._ended=this._ending=true;this._currentRequest.end(null,null,a)}else{var n=this;var i=this._currentRequest;this.write(e,t,(function(){n._ended=true;i.end(null,null,a)}));this._ending=true}};RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t;this._currentRequest.setHeader(e,t)};RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e];this._currentRequest.removeHeader(e)};RedirectableRequest.prototype.setTimeout=function(e,t){var a=this;function destroyOnTimeout(t){t.setTimeout(e);t.removeListener("timeout",t.destroy);t.addListener("timeout",t.destroy)}function startTimer(t){if(a._timeout){clearTimeout(a._timeout)}a._timeout=setTimeout((function(){a.emit("timeout");clearTimer()}),e);destroyOnTimeout(t)}function clearTimer(){if(a._timeout){clearTimeout(a._timeout);a._timeout=null}a.removeListener("abort",clearTimer);a.removeListener("error",clearTimer);a.removeListener("response",clearTimer);a.removeListener("close",clearTimer);if(t){a.removeListener("timeout",t)}if(!a.socket){a._currentRequest.removeListener("socket",startTimer)}}if(t){this.on("timeout",t)}if(this.socket){startTimer(this.socket)}else{this._currentRequest.once("socket",startTimer)}this.on("socket",destroyOnTimeout);this.on("abort",clearTimer);this.on("error",clearTimer);this.on("response",clearTimer);this.on("close",clearTimer);return this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,a){return this._currentRequest[e](t,a)}}));["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})}));RedirectableRequest.prototype._sanitizeOptions=function(e){if(!e.headers){e.headers={}}if(!isArray(e.sensitiveHeaders)){e.sensitiveHeaders=[]}if(e.host){if(!e.hostname){e.hostname=e.host}delete e.host}if(!e.pathname&&e.path){var t=e.path.indexOf("?");if(t<0){e.pathname=e.path}else{e.pathname=e.path.substring(0,t);e.search=e.path.substring(t)}}};RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol;var t=this._options.nativeProtocols[e];if(!t){throw new TypeError("Unsupported protocol "+e)}if(this._options.agents){var a=e.slice(0,-1);this._options.agent=this._options.agents[a]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var o of m){i.on(o,f[o])}this._currentUrl=/^\//.test(this._options.path)?n.format(this._options):this._options.path;if(this._isRedirect){var s=0;var r=this;var c=this._requestBodyBuffers;(function writeNext(e){if(i===r._currentRequest){if(e){r.emit("error",e)}else if(s=400){e.responseUrl=this._currentUrl;e.redirects=this._redirects;this.emit("response",e);this._requestBodyBuffers=[];return}destroyRequest(this._currentRequest);e.destroy();if(++this._redirectCount>this._options.maxRedirects){throw new v}var i;var o=this._options.beforeRedirect;if(o){i=Object.assign({Host:e.req.getHeader("host")},this._options.headers)}var s=this._options.method;if((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method)){this._options.method="GET";this._requestBodyBuffers=[];removeMatchingHeaders(/^content-/i,this._options.headers)}var r=removeMatchingHeaders(/^host$/i,this._options.headers);var c=parseUrl(this._currentUrl);var l=r||c.host;var u=/^\w+:/.test(a)?this._currentUrl:n.format(Object.assign(c,{host:l}));var d=resolveUrl(a,u);p("redirecting to",d.href);this._isRedirect=true;spreadUrlObject(d,this._options);if(d.protocol!==c.protocol&&d.protocol!=="https:"||d.host!==l&&!isSubdomain(d.host,l)){removeMatchingHeaders(this._headerFilter,this._options.headers)}if(isFunction(o)){var m={headers:e.headers,statusCode:t};var f={url:u,method:s,headers:i};o(this._options,m,f);this._sanitizeOptions(this._options)}this._performRequest()};function wrap(e){var t={maxRedirects:21,maxBodyLength:10*1024*1024};var a={};Object.keys(e).forEach((function(n){var i=n+":";var o=a[i]=e[n];var s=t[n]=Object.create(o);function request(e,n,o){if(isURL(e)){e=spreadUrlObject(e)}else if(isString(e)){e=spreadUrlObject(parseUrl(e))}else{o=n;n=validateUrl(e);e={protocol:i}}if(isFunction(n)){o=n;n=null}n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n);n.nativeProtocols=a;if(!isString(n.host)&&!isString(n.hostname)){n.hostname="::1"}c.equal(n.protocol,i,"protocol mismatch");p("options",n);return new RedirectableRequest(n,o)}function get(e,t,a){var n=s.request(e,t,a);n.end();return n}Object.defineProperties(s,{request:{value:request,configurable:true,enumerable:true,writable:true},get:{value:get,configurable:true,enumerable:true,writable:true}})}));return t}function noop(){}function parseUrl(e){var t;if(l){t=new i(e)}else{t=validateUrl(n.parse(e));if(!isString(t.protocol)){throw new x({input:e})}}return t}function resolveUrl(e,t){return l?new i(e,t):parseUrl(n.resolve(t,e))}function validateUrl(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname)){throw new x({input:e.href||e})}if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host)){throw new x({input:e.href||e})}return e}function spreadUrlObject(e,t){var a=t||{};for(var n of d){a[n]=e[n]}if(a.hostname.startsWith("[")){a.hostname=a.hostname.slice(1,-1)}if(a.port!==""){a.port=Number(a.port)}a.path=a.search?a.pathname+a.search:a.pathname;return a}function removeMatchingHeaders(e,t){var a;for(var n in t){if(e.test(n)){a=t[n];delete t[n]}}return a===null||typeof a==="undefined"?undefined:String(a).trim()}function createErrorType(e,t,a){function CustomError(a){if(isFunction(Error.captureStackTrace)){Error.captureStackTrace(this,this.constructor)}Object.assign(this,a||{});this.code=e;this.message=this.cause?t+": "+this.cause.message:t}CustomError.prototype=new(a||Error);Object.defineProperties(CustomError.prototype,{constructor:{value:CustomError,enumerable:false},name:{value:"Error ["+e+"]",enumerable:false}});return CustomError}function destroyRequest(e,t){for(var a of m){e.removeListener(a,f[a])}e.on("error",noop);e.destroy(t)}function isSubdomain(e,t){c(isString(e)&&isString(t));var a=e.length-t.length-1;return a>0&&e[a]==="."&&e.endsWith(t)}function isArray(e){return e instanceof Array}function isString(e){return typeof e==="string"||e instanceof String}function isFunction(e){return typeof e==="function"}function isBuffer(e){return typeof e==="object"&&"length"in e}function isURL(e){return i&&e instanceof i}function escapeRegex(e){return e.replace(/[\]\\/()*+?.$]/g,"\\$&")}e.exports=wrap({http:o,https:s});e.exports.wrap=wrap},6454:(e,t,a)=>{"use strict";var n=a(5630);var i=a(9023);var o=a(6928);var s=a(8611);var r=a(5692);var c=a(7016).parse;var p=a(9896);var l=a(2203).Stream;var u=a(6982);var d=a(4096);var m=a(1324);var f=a(8700);var x=a(4076);var h=a(1835);function FormData(e){if(!(this instanceof FormData)){return new FormData(e)}this._overheadLength=0;this._valueLength=0;this._valuesToMeasure=[];n.call(this);e=e||{};for(var t in e){this[t]=e[t]}}i.inherits(FormData,n);FormData.LINE_BREAK="\r\n";FormData.DEFAULT_CONTENT_TYPE="application/octet-stream";FormData.prototype.append=function(e,t,a){a=a||{};if(typeof a==="string"){a={filename:a}}var i=n.prototype.append.bind(this);if(typeof t==="number"||t==null){t=String(t)}if(Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,a);var s=this._multiPartFooter();i(o);i(t);i(s);this._trackLength(o,t,a)};FormData.prototype._trackLength=function(e,t,a){var n=0;if(a.knownLength!=null){n+=Number(a.knownLength)}else if(Buffer.isBuffer(t)){n=t.length}else if(typeof t==="string"){n=Buffer.byteLength(t)}this._valueLength+=n;this._overheadLength+=Buffer.byteLength(e)+FormData.LINE_BREAK.length;if(!t||!t.path&&!(t.readable&&x(t,"httpVersion"))&&!(t instanceof l)){return}if(!a.knownLength){this._valuesToMeasure.push(t)}};FormData.prototype._lengthRetriever=function(e,t){if(x(e,"fd")){if(e.end!=undefined&&e.end!=Infinity&&e.start!=undefined){t(null,e.end+1-(e.start?e.start:0))}else{p.stat(e.path,(function(a,n){if(a){t(a);return}var i=n.size-(e.start?e.start:0);t(null,i)}))}}else if(x(e,"httpVersion")){t(null,Number(e.headers["content-length"]))}else if(x(e,"httpModule")){e.on("response",(function(a){e.pause();t(null,Number(a.headers["content-length"]))}));e.resume()}else{t("Unknown stream")}};FormData.prototype._multiPartHeader=function(e,t,a){if(typeof a.header==="string"){return a.header}var n=this._getContentDisposition(t,a);var i=this._getContentType(t,a);var o="";var s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(n||[]),"Content-Type":[].concat(i||[])};if(typeof a.header==="object"){h(s,a.header)}var r;for(var c in s){if(x(s,c)){r=s[c];if(r==null){continue}if(!Array.isArray(r)){r=[r]}if(r.length){o+=c+": "+r.join("; ")+FormData.LINE_BREAK}}}return"--"+this.getBoundary()+FormData.LINE_BREAK+o+FormData.LINE_BREAK};FormData.prototype._getContentDisposition=function(e,t){var a;if(typeof t.filepath==="string"){a=o.normalize(t.filepath).replace(/\\/g,"/")}else if(t.filename||e&&(e.name||e.path)){a=o.basename(t.filename||e&&(e.name||e.path))}else if(e&&e.readable&&x(e,"httpVersion")){a=o.basename(e.client._httpMessage.path||"")}if(a){return'filename="'+a+'"'}};FormData.prototype._getContentType=function(e,t){var a=t.contentType;if(!a&&e&&e.name){a=d.lookup(e.name)}if(!a&&e&&e.path){a=d.lookup(e.path)}if(!a&&e&&e.readable&&x(e,"httpVersion")){a=e.headers["content-type"]}if(!a&&(t.filepath||t.filename)){a=d.lookup(t.filepath||t.filename)}if(!a&&e&&typeof e==="object"){a=FormData.DEFAULT_CONTENT_TYPE}return a};FormData.prototype._multiPartFooter=function(){return function(e){var t=FormData.LINE_BREAK;var a=this._streams.length===0;if(a){t+=this._lastBoundary()}e(t)}.bind(this)};FormData.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+FormData.LINE_BREAK};FormData.prototype.getHeaders=function(e){var t;var a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e){if(x(e,t)){a[t.toLowerCase()]=e[t]}}return a};FormData.prototype.setBoundary=function(e){if(typeof e!=="string"){throw new TypeError("FormData boundary must be a string")}this._boundary=e};FormData.prototype.getBoundary=function(){if(!this._boundary){this._generateBoundary()}return this._boundary};FormData.prototype.getBuffer=function(){var e=new Buffer.alloc(0);var t=this.getBoundary();for(var a=0,n=this._streams.length;a{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(a){e[a]=e[a]||t[a]}));return e}},9808:e=>{"use strict";var t="Function.prototype.bind called on incompatible ";var a=Object.prototype.toString;var n=Math.max;var i="[object Function]";var o=function concatty(e,t){var a=[];for(var n=0;n{"use strict";var n=a(9808);e.exports=Function.prototype.bind||n},470:(e,t,a)=>{"use strict";var n;var i=a(5399);var o=a(1620);var s=a(3056);var r=a(4585);var c=a(6905);var p=a(105);var l=a(3314);var u=a(2578);var d=a(5641);var m=a(6171);var f=a(7147);var x=a(1017);var h=a(6947);var v=a(2621);var b=a(156);var g=Function;var getEvalledConstructor=function(e){try{return g('"use strict"; return ('+e+").constructor;")()}catch(e){}};var y=a(3170);var w=a(9094);var throwTypeError=function(){throw new l};var _=y?function(){try{arguments.callee;return throwTypeError}catch(e){try{return y(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError;var E=a(3336)();var j=a(1967);var k=a(1311);var O=a(8681);var A=a(3945);var S=a(8093);var C={};var R=typeof Uint8Array==="undefined"||!j?n:j(Uint8Array);var P={__proto__:null,"%AggregateError%":typeof AggregateError==="undefined"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?n:ArrayBuffer,"%ArrayIteratorPrototype%":E&&j?j([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":C,"%AsyncGenerator%":C,"%AsyncGeneratorFunction%":C,"%AsyncIteratorPrototype%":C,"%Atomics%":typeof Atomics==="undefined"?n:Atomics,"%BigInt%":typeof BigInt==="undefined"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":typeof Float16Array==="undefined"?n:Float16Array,"%Float32Array%":typeof Float32Array==="undefined"?n:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?n:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":C,"%Int8Array%":typeof Int8Array==="undefined"?n:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?n:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&j?j(j([][Symbol.iterator]())):n,"%JSON%":typeof JSON==="object"?JSON:n,"%Map%":typeof Map==="undefined"?n:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!E||!j?n:j((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?n:Promise,"%Proxy%":typeof Proxy==="undefined"?n:Proxy,"%RangeError%":r,"%ReferenceError%":c,"%Reflect%":typeof Reflect==="undefined"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?n:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!E||!j?n:j((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&j?j(""[Symbol.iterator]()):n,"%Symbol%":E?Symbol:n,"%SyntaxError%":p,"%ThrowTypeError%":_,"%TypedArray%":R,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array==="undefined"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap==="undefined"?n:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?n:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?n:WeakSet,"%Function.prototype.call%":S,"%Function.prototype.apply%":A,"%Object.defineProperty%":w,"%Object.getPrototypeOf%":k,"%Math.abs%":d,"%Math.floor%":m,"%Math.max%":f,"%Math.min%":x,"%Math.pow%":h,"%Math.round%":v,"%Math.sign%":b,"%Reflect.getPrototypeOf%":O};if(j){try{null.error}catch(e){var T=j(j(e));P["%Error.prototype%"]=T}}var D=function doEval(e){var t;if(e==="%AsyncFunction%"){t=getEvalledConstructor("async function () {}")}else if(e==="%GeneratorFunction%"){t=getEvalledConstructor("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){t=getEvalledConstructor("async function* () {}")}else if(e==="%AsyncGenerator%"){var a=doEval("%AsyncGeneratorFunction%");if(a){t=a.prototype}}else if(e==="%AsyncIteratorPrototype%"){var n=doEval("%AsyncGenerator%");if(n&&j){t=j(n.prototype)}}P[e]=t;return t};var F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var L=a(7564);var U=a(4076);var N=L.call(S,Array.prototype.concat);var I=L.call(A,Array.prototype.splice);var z=L.call(S,String.prototype.replace);var B=L.call(S,String.prototype.slice);var q=L.call(S,RegExp.prototype.exec);var $=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var M=/\\(\\)?/g;var H=function stringToPath(e){var t=B(e,0,1);var a=B(e,-1);if(t==="%"&&a!=="%"){throw new p("invalid intrinsic syntax, expected closing `%`")}else if(a==="%"&&t!=="%"){throw new p("invalid intrinsic syntax, expected opening `%`")}var n=[];z(e,$,(function(e,t,a,i){n[n.length]=a?z(i,M,"$1"):t||e}));return n};var V=function getBaseIntrinsic(e,t){var a=e;var n;if(U(F,a)){n=F[a];a="%"+n[0]+"%"}if(U(P,a)){var i=P[a];if(i===C){i=D(a)}if(typeof i==="undefined"&&!t){throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:n,name:a,value:i}}throw new p("intrinsic "+e+" does not exist!")};e.exports=function GetIntrinsic(e,t){if(typeof e!=="string"||e.length===0){throw new l("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof t!=="boolean"){throw new l('"allowMissing" argument must be a boolean')}if(q(/^%?[^%]*%?$/,e)===null){throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var a=H(e);var i=a.length>0?a[0]:"";var o=V("%"+i+"%",t);var s=o.name;var r=o.value;var c=false;var u=o.alias;if(u){i=u[0];I(a,N([0,1],u))}for(var d=1,m=true;d=a.length){var v=y(r,f);m=!!v;if(m&&"get"in v&&!("originalValue"in v.get)){r=v.get}else{r=r[f]}}else{m=U(r,f);r=r[f]}if(m&&!c){P[s]=r}}}return r}},1311:(e,t,a)=>{"use strict";var n=a(5399);e.exports=n.getPrototypeOf||null},8681:e=>{"use strict";e.exports=typeof Reflect!=="undefined"&&Reflect.getPrototypeOf||null},1967:(e,t,a)=>{"use strict";var n=a(8681);var i=a(1311);var o=a(6669);e.exports=n?function getProto(e){return n(e)}:i?function getProto(e){if(!e||typeof e!=="object"&&typeof e!=="function"){throw new TypeError("getProto: not an object")}return i(e)}:o?function getProto(e){return o(e)}:null},1174:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},3170:(e,t,a)=>{"use strict";var n=a(1174);if(n){try{n([],"length")}catch(e){n=null}}e.exports=n},3813:e=>{"use strict";e.exports=(e,t=process.argv)=>{const a=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(a+e);const i=t.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var n=typeof Symbol!=="undefined"&&Symbol;var i=a(1114);e.exports=function hasNativeSymbols(){if(typeof n!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof n("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return i()}},1114:e=>{"use strict";e.exports=function hasSymbols(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var t=Symbol("test");var a=Object(t);if(typeof t==="string"){return false}if(Object.prototype.toString.call(t)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(a)!=="[object Symbol]"){return false}var n=42;e[t]=n;for(var i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t){return false}if(!Object.prototype.propertyIsEnumerable.call(e,t)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==n||s.enumerable!==true){return false}}return true}},5479:(e,t,a)=>{"use strict";var n=a(1114);e.exports=function hasToStringTagShams(){return n()&&!!Symbol.toStringTag}},4076:(e,t,a)=>{"use strict";var n=Function.prototype.call;var i=Object.prototype.hasOwnProperty;var o=a(7564);e.exports=o.call(n,i)},5641:e=>{"use strict";e.exports=Math.abs},6171:e=>{"use strict";e.exports=Math.floor},7044:e=>{"use strict";e.exports=Number.isNaN||function isNaN(e){return e!==e}},7147:e=>{"use strict";e.exports=Math.max},1017:e=>{"use strict";e.exports=Math.min},6947:e=>{"use strict";e.exports=Math.pow},2621:e=>{"use strict";e.exports=Math.round},156:(e,t,a)=>{"use strict";var n=a(7044);e.exports=function sign(e){if(n(e)||e===0){return e}return e<0?-1:+1}},9829:(e,t,a)=>{ /*! * mime-db * Copyright(c) 2014 Jonathan Ong diff --git a/src/configs/tools_schema.json b/src/configs/tools_schema.json index 8254d6a..a3b4fb7 100644 --- a/src/configs/tools_schema.json +++ b/src/configs/tools_schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://raw.githubusercontent.com/step-security/setup-php/release/src/configs/tools_schema.json", + "$id": "https://raw.githubusercontent.com/step-security/setup-php/main/src/configs/tools_schema.json", "type": "object", "title": "Tools", "default": {}, diff --git a/src/scripts/tools/ppa.sh b/src/scripts/tools/ppa.sh index 0a70b83..4b7c6dc 100644 --- a/src/scripts/tools/ppa.sh +++ b/src/scripts/tools/ppa.sh @@ -3,7 +3,7 @@ set_base_version_id() { [[ "$ID" =~ ubuntu|debian ]] && return; if ! [ -d "$dist_info_dir" ]; then sudo mkdir -p "$dist_info_dir" - get -q -n "$dist_info_dir"/os_releases.csv https://raw.githubusercontent.com/step-security/setup-php/release/src/configs/os_releases.csv + get -q -n "$dist_info_dir"/os_releases.csv https://raw.githubusercontent.com/step-security/setup-php/main/src/configs/os_releases.csv fi for base in ubuntu debian; do [[ "$ID_LIKE" =~ $base ]] && ID="$base" && VERSION_ID="$(grep -hr -m 1 "$VERSION_CODENAME" /usr/share/distro-info | cut -d ',' -f 1 | cut -d ' ' -f 1)" && break diff --git a/src/utils.ts b/src/utils.ts index 15bfb1f..a1e8777 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -50,7 +50,7 @@ export async function getInput( */ export async function getManifestURLS(): Promise { return [ - 'https://raw.githubusercontent.com/step-security/setup-php/release/src/configs/php-versions.json', + 'https://raw.githubusercontent.com/step-security/setup-php/main/src/configs/php-versions.json', 'https://setup-php.com/php-versions.json' ]; }