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)}))}))}Nt(e,t||{},((e,r)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)}))}functionn(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=Rt.sync(e.command,{path:r[Ut({env:r})],pathExt:t?it.delimiter:void0})}catch(e){}finally{i&&process.chdir(n)}returns&&(s=it.resolve(o?e.options.cwd:"",s)),s}functiono(e,t){returnObject.assign(Error(`${t}${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t}${e.command}`,path:e.command,spawnargs:e.args})}functioni(e,t){returnKt&&1===e&&!t.file?o(t.original,"spawn"):null}functions(e,t,r){constn=Pt(e,t,r),o=ft.spawn(n.command,n.args,n.options);returnYt.hookChildProcess(o,n),o}asyncfunctiona(e,t){if(!e)throwError("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=Xr(t);returnawaitnewPromise(((t,o)=>{consti=e=>{e&&n.getBufferedLength()<=Yr.MAX_LENGTH&&(e.bufferedData=n.getBufferedValue()),o(e)};(async()=>{try{awaitZr(e,n),t()}catch(e){i(e)}})(),n.on("data",(()=>{n.getBufferedLength()>r&&i(newJr)}))})),n.getBufferedValue()}asyncfunctionc(e,r,n){if(!["darwin","linux"].includes(process.platform))return;if("string"==typeofUn)return{binDir:Un};consto=t(On).sync("brew",{nothrow:!0});if(null!==o)returnUn=(0,_n.dirname)(o),{binDir:Un};consti=t(it).join((0,ot.tmpdir)(),"setup_cpp","brew");await(0,Dn.mkdirP)(i),t(Ct).sync("curl",["-LJO","https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh"],{cwd:i});consts=(0,it.join)(i,"install.sh");return"linux"===process.platform&&(0,st.readFileSync)(s,"utf-8").replace("#!/bin/bash",""),t(Ct).sync("/bin/bash",[s],{stdio:"inherit",env:{NONINTERACTIVE:"1"}}),Un="/usr/local/bin/",{binDir:Un}}functionl(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}functionu(){returnnull!==t(Rt).sync("sudo",{nothrow:!0})}functiond(){return0===process.getuid?.()||!!process.env.CI}functionp(){returnd()&&u()}functionh(e){returnp()?"sudo "+e:e}functionf(e,r=[],n={stdio:"inherit",shell:!0}){returnp()?t(Ct).commandSync("sudo "+[e,...r].map((e=>`'${e}'`)).join(" "),n):t(Ct).sync(e,r,n)}functionm(e,r=[],n={stdio:"inherit",shell:!0}){returnp()?t(Ct).command("sudo "+[e,...r].map((e=>`'${e}'`)).join(" "),n):t(Ct)(e,r,n)}functiong(){return"win32"===process.platform?Gn():d()}functionv(e){returne&&e.__esModule?e.default:e}functiony(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}functionx(e,t,r){if("function"==typeoft&&(r=t,t={}),!r){if("function"!=typeofPromise)thrownewTypeError("callback not provided");returnnewPromise(((r,n)=>{x(e,t||{},((e,t)=>{e?n(e):r(t)}))}))}eo(e,t||{},((e,n)=>{e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}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=Zn.sync(e.command,{path:r[lo({env:r})],pathExt:t?it.delimiter:void0})}catch(e){}finally{i&&process.chdir(n)}returns&&(s=(0,it.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){returnEo&&1===e&&!t.file?b(t.original,"spawn"):null}functionS(e,t,r){constn=co(e,t,r),o=(0,ft.spawn)(n.command,n.args,n.options);returnbo.hookChildProcess(o,n),o}asyncfunctionO(e,t){if(!e)throwError("Expected a stream");t={maxBuffer:1/0,...t};const{maxBuffer:r}=t,n=yi(t);returnawaitnewPromise(((t,o)=>{consti=e=>{e&&n.getBufferedLength()<=wi.MAX_LENGTH&&(e.bufferedData=n.get