functione(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}functiont(e){returne&&e.__esModule?e.default:e}functionr(e,t,n){if("function"==typeoft&&(n=t,t={}),!n){if("function"!=typeofPromise)thrownewTypeError("callback not provided");returnnewPromise(((n,o)=>{r(e,t||{},((e,t)=>{e?o(e):n(t)}))}))}_t(e,t||{},((e,r)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}functionn(e,r,n){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeofPt)return{binDir:Pt};consto=t(Et).sync("brew",{nothrow:!0});returnnull!==o?(Pt=(0,bt.dirname)(o),{binDir:Pt}):((0,ct.execFileSync)('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"',{stdio:"inherit"}),Pt="/usr/local/bin/",{binDir:Pt})}functiono(e){returne&&e.__esModule?e.default:e}functioni(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}functions(e,t,r){if("function"==typeoft&&(r=t,t={}),!r){if("function"!=typeofPromise)thrownewTypeError("callback not provided");returnnewPromise(((r,n)=>{s(e,t||{},((e,t)=>{e?n(e):r(t)}))}))}Mt(e,t||{},((e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}functiona(e,t){constr=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(e){}lets;try{s=jt.sync(e.command,{path:r[Wt({env:r})],pathExt:t?Qe.delimiter:void0})}catch(e){}finally{i&&process.chdir(n)}returns&&(s=(0,Qe.resolve)(o?e.options.cwd:"",s)),s}functionc(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args})}functionl(e,t){returnsr&&1===e&&!t.file?c(t.original,"spawn"):null}functionu(e,t,r){constn=Xt(e,t,r),o=(0,ct.spawn)(n.command,n.args,n.options);returnir.hookChildProcess(o,n),o}asyncfunctiond(e,t){if(!e)throwError("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=rn(t);returnawaitnewPromise(((t,o)=>{consti=e=>{e&&n.getBufferedLength()<=on.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{awaitan(e,n),t()}catch(e){i(e)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(newcn)}))})),n.getBufferedValue()}functionp(){returnnull!==o(jt).sync("sudo",{nothrow:!0})}functionh(){vare;return0===(null===(e=process.getuid)||void0===e?void0:e.call(process))||!!process.env.CI}functionf(){returnh()&&p()}functionm(e){returnf()?"sudo "+e:e}functiong(e,t=[],r={stdio:"inherit",shell:!0}){returnf()?o(qt).commandSync("sudo "+[e,...t].map((e=>`'${e}'`)).join(" "),r):o(qt).sync(e,t,r)}functionv(e,t=[],r={stdio:"inherit",shell:!0}){returnf()?o(qt).command("sudo "+[e,...t].map((e=>`'${e}'`)).join(" "),r):o(qt)(e,t,r)}functiony(){return"win32"===process.platform?Nn():h()}functionx(e){returnf()&&"string"==typeofprocess.env.SUDO_USER?"darwin"===process.platform?(0,Qe.join)("/Users/",process.env.SUDO_USER,e):(0,Qe.join)("/home/",process.env.SUDO_USER,e):t(jn)("~/"+e)}functionw(e,t){constr=e.options.env||process.env,n=process.cwd(),o=null!=e.options.cwd,i=o&&void0!==process.chdir&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch(e){}lets;try{s=Et.sync(e.command,{path:r[zn({env:r})],pathExt:t?Qe.delimiter:void0})}catch(e){}finally{i&&process.chdir(n)}returns&&(s=Qe.resolve(o?e.options.cwd:"",s)),s}functionb(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args})}functionE(e,t){returnro&&1===e&&!t.file?b(t.original,"spawn"):null}functionS(e,t,r){constn=Hn(e,t,r),o=ct.spawn(n.command,n.args,n.options);returnto.hookChildProcess(o,n),o}asyncfunctionO(e,t){if(!e)throwError("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=ei(t);returnawaitnewPromise(((t,o)=>{consti=e=>{e&&n.getBufferedLength()<=ri.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{awaitoi(e,n),t()}catch(e){i(e)}})(),n.on("data",((