functione(e,t,r,s){Object.defineProperty(e,t,{get:r,set:s,enumerable:!0,configurable:!0})}functiont(e){returne&&e.__esModule?e.default:e}functionr(e,t,s){if("function"==typeoft&&(s=t,t={}),!s){if("function"!=typeofPromise)thrownewTypeError("callback not provided");returnnewPromise(((s,i)=>{r(e,t||{},((e,t)=>{e?i(e):s(t)}))}))}Be(e,t||{},((e,r)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),s(e,r)}))}functions(e,r,s){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeofWe)return{binDir:We};consti=t(Ge).sync("brew",{nothrow:!0});returnnull!==i?(We=be.dirname(i),{binDir:We}):(Re.execFileSync('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),We="/usr/local/bin/",{binDir:We})}functioni(e,t){constr=e.options.env||process.env,s=process.cwd(),i=null!=e.options.cwd,n=i&&void0!==process.chdir&&!process.chdir.disabled;if(n)try{process.chdir(e.options.cwd)}catch(e){}leto;try{o=Ge.sync(e.command,{path:r[et({env:r})],pathExt:t?be.delimiter:void0})}catch(e){}finally{n&&process.chdir(s)}returno&&(o=be.resolve(i?e.options.cwd:"",o)),o}functionn(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args})}functiono(e,t){returnut&&1===e&&!t.file?n(t.original,"spawn"):null}functiona(e,t,r){consts=Qe(e,t,r),i=Re.spawn(s.command,s.args,s.options);returnlt.hookChildProcess(i,s),i}asyncfunctionc(e,t){if(!e)throwError("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,s=ar(t);returnawaitnewPromise(((t,i)=>{constn=e=>{e&&s.getBufferedLength()<=lr.MAX_LENGTH&&(e.bufferedData=s.getBufferedValue()),i(e)};(async()=>{try{awaitdr(e,s),t()}catch(e){n(e)}})(),s.on("data",(()=>{s.getBufferedLength()>r&&n(newpr)}))})),s.getBufferedValue()}functionl(){vare;returnvoid0!==Lr||(Lr=(!!process.env.CI||0===(null===(e=process.getuid)||void0===e?void0:e.call(process)))&&null!==t(Ge).sync("sudo",{nothrow:!0})),Lr}functionu(e,r,s){returnl()?t(Ke).commandSync("sudo "+[e,...r].map((e=>`'${e}'`)).join(" "),{shell:!0,cwd:s,stdio:"inherit"}):t(Ke).sync(e,r,{stdio:"inherit"})}functiond(e){returnl()&&"string"==typeofprocess.env.SUDO_USER?"darwin"===process.platform?be.join("/Users/",process.env.SUDO_USER,e):be.join("/home/",process.env.SUDO_USER,e):t(Dr)("~/"+e)}functionp(e,r=["-NoProfile","-NoLogo","-NonInteractive"]){returnt(Ke)((()=>{if(void0===Ur){conste=t(Ge).sync("pwsh",{nothrow:!0});null!==e&&(Ur=e);constr=t(Ge).sync("powershell",{nothrow:!0});null!==r&&(Ur=r)}if(void0===Ur)throwError("Could not find powershell");returnUr})(),[...r,"-c",e],{stdio:"inherit"})}asyncfunctionh(e,r,s=!1){consti=s?void0===(n=r)?"":t(Gr)(n):r;varn;try{if(Fr.isGitHubCI())try{Ue.exportVariable(e,i)}catch(t){jr.error(t),awaitm(e,i)}elseawaitm(e,i)}catch(t){jr.error(t),Ue.setFailed(`Failed to export environment variable ${e}=${i}. You should add it manually.`)}}asyncfunctionf(e){process.env.PATH=`${e}${be.delimiter}${process.env.PATH}`;try{if(Fr.isGitHubCI())try{Ue.addPath(e)}catch(t){jr.error(t),awaitg(e)}elseawaitg(e)}catch(t){jr.error(t),Ue.setFailed(`Failed to add ${e} to the percistent PATH. You should add it manually.`)}}asyncfunctionm(e,t){constr=null!=t?t:"";switch(process.platform){case"win32":returnawaitp(`[Environment]::SetEnvironmentVariable('${e}', '${r}', "User")`),voidUe.info(`${e}='${r}' was set in the environment.`);case"linux":case"darwin":returnv(),Ee.appendFileSync(qr,`\nexport ${e}="${r}"\n`),voidUe.info(`${e}="${r}" was added to "${qr}`)}process.env[e]=r}asyncfunctiong(e){switch(process.platform){case"win32":returnawaitp(`$USER_PATH=([Environment]::GetEnvironmentVariable("PATH", "User")); [Environment]::SetEnvironmentVariable("PATH", "${e};$USER_PATH", "User")`),voidUe.info(e+" was added to the PATH.");case"linux":case"darwin":returnv(),Ee.appendFileSync(qr,`\nexport PATH=${e}:$PATH\n`),voidUe.info(`${e} was added to "${qr}"`);default:return}}functionv(){if(Vr)return;conste="exportSOUR