UNPKG

@syncify/ansi

Version:

ANSI Colors, Symbols and TUI related terminal enchancements for Syncify.

54 lines (52 loc) 65.5 kB
var xr=Object.create;var Ne=Object.defineProperty;var yr=Object.getOwnPropertyDescriptor;var wr=Object.getOwnPropertyNames;var Tr=Object.getPrototypeOf,$r=Object.prototype.hasOwnProperty;var Sr=(e,t)=>()=>(e&&(t=e(e=0)),t);var kr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vr=(e,t)=>{for(var r in t)Ne(e,r,{get:t[r],enumerable:!0})},Or=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wr(t))!$r.call(e,i)&&i!==r&&Ne(e,i,{get:()=>t[i],enumerable:!(n=yr(t,i))||n.enumerable});return e};var Pr=(e,t,r)=>(r=e!=null?xr(Tr(e)):{},Or(t||!e||!e.__esModule?Ne(r,"default",{value:e,enumerable:!0}):r,e));var l=Sr(()=>{});var At=kr((oi,Bt)=>{l();var pt,Me,_e,{defineProperty:Ir,setPrototypeOf:Et,create:Lr,keys:Rr}=Object,N="",{round:W,max:Nr}=Math,ht=e=>{let t=/([a-f\d]{3,6})/i.exec(e)?.[1],r=t?.length,n=parseInt(6^r?3^r?"0":t[0]+t[0]+t[1]+t[1]+t[2]+t[2]:t,16);return[n>>16&255,n>>8&255,255&n]},ft=(e,t,r)=>e^t||t^r?16+36*W(e/51)+6*W(t/51)+W(r/51):8>e?16:e>248?231:W(24*(e-8)/247)+232,je=e=>{let t,r,n,i,u;return 8>e?30+e:16>e?e-8+90:(232>e?(u=(e-=16)%36,t=(e/36|0)/5,r=(u/6|0)/5,n=u%6/5):t=r=n=(10*(e-232)+8)/255,i=2*Nr(t,r,n),i?30+(W(n)<<2|W(r)<<1|W(t))+(2^i?0:60):30)},Mr=(()=>{let e=f=>n.some(g=>f.test(g)),t=globalThis,r=t.process??{},n=r.argv??[],i=r.env??{},u=-1;try{pt=","+Rr(i).join(",")}catch{i={},u=0}let s="FORCE_COLOR",D={false:0,0:0,1:1,2:2,3:3}[i[s]]??-1,a=s in i&&D||e(/^--color=?(true|always)?$/);return a&&(u=D),~u||(u=((f,g,p)=>(Me=f.TERM,{"24bit":3,truecolor:3,ansi256:2,ansi:1}[f.COLORTERM]||(f.CI?/,GITHUB/.test(pt)?3:1:g&&Me!=="dumb"?p?3:/-256/.test(Me)?2:1:0)))(i,!!i.PM2_HOME||i.NEXT_RUNTIME?.includes("edge")||!!r.stdout?.isTTY,r.platform==="win32")),!D||i.NO_COLOR||e(/^--(no-color|color=(false|never))$/)?0:t.window?.chrome||a&&!u?3:u})(),gt={open:N,close:N},J=39,X=49,dt={},Ct=({p:e},{open:t,close:r})=>{let n=(s,...D)=>{if(!s){if(t&&t===r)return t;if((s??N)===N)return N}let a,f=s.raw?String.raw({raw:s},...D):N+s,g=n.p,p=g.o,E=g.c;if(f.includes("\x1B"))for(;g;g=g.p){let{open:m,close:x}=g,c=x.length,A=N,y=0;if(c)for(;~(a=f.indexOf(x,y));y=a+c)A+=f.slice(y,a)+m;f=A+f.slice(y)}return p+(f.includes(` `)?f.replace(/(\r?\n)/g,E+"$1"+p):f)+E},i=t,u=r;return e&&(i=e.o+t,u=r+e.c),Et(n,_e),n.p={open:t,close:r,o:i,c:u,p:e},n.open=i,n.close=u,n},mt=function(e=Mr){let t={Ansis:mt,isSupported:()=>r,strip:c=>c.replace(/[›][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,N),extend(c){for(let A in c){let y=c[A],R=(typeof y)[0],ie=R==="s"?a(...ht(y)):y;dt[A]=R==="f"?{get(){return(...K)=>Ct(this,y(...K))}}:{get(){let K=Ct(this,ie);return Ir(this,A,{value:K}),K}}}return _e=Lr({},dt),Et(t,_e),t}},r=e>0,n=(c,A)=>r?{open:`\x1B[${c}m`,close:`\x1B[${A}m`}:gt,i=c=>A=>c(...ht(A)),u=(c,A)=>(y,R,ie)=>n(`${c}8;2;${y};${R};${ie}`,A),s=(c,A)=>(y,R,ie)=>n(((K,Ar,br)=>je(ft(K,Ar,br)))(y,R,ie)+c,A),D=c=>(A,y,R)=>c(ft(A,y,R)),a=u(3,J),f=u(4,X),g=c=>n("38;5;"+c,J),p=c=>n("48;5;"+c,X);e===2?(a=D(g),f=D(p)):e===1&&(a=s(0,J),f=s(10,X),g=c=>n(je(c),J),p=c=>n(je(c)+10,X));let E,m={fg:g,bg:p,rgb:a,bgRgb:f,hex:i(a),bgHex:i(f),visible:gt,reset:n(0,0),bold:n(1,22),dim:n(2,22),italic:n(3,23),underline:n(4,24),inverse:n(7,27),hidden:n(8,28),strikethrough:n(9,29)},x="Bright";return"black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map((c,A)=>{E="bg"+c[0].toUpperCase()+c.slice(1),8>A?(m[c+x]=n(90+A,J),m[E+x]=n(100+A,X)):A=60,m[c]=n(30+A,J),m[E]=n(40+A,X)}),t.extend(m)},We=new mt;Bt.exports=We,We.default=We});l();l();l();l();var Ge=Pr(At(),1),ue=Ge.default,{Ansis:jr,fg:ai,bg:Fi,rgb:ci,bgRgb:pi,hex:hi,bgHex:fi,reset:gi,inverse:di,hidden:Ci,visible:Ei,bold:Ue,dim:mi,italic:Bi,underline:Ai,strikethrough:bi,black:xi,red:yi,green:wi,yellow:Ti,blue:$i,magenta:Si,cyan:ki,white:vi,gray:Oi,redBright:Pi,greenBright:Ii,yellowBright:Li,blueBright:Ri,magentaBright:Ni,cyanBright:Mi,whiteBright:ji,bgBlack:Wi,bgRed:_i,bgGreen:Gi,bgYellow:Ui,bgBlue:Hi,bgMagenta:zi,bgCyan:Vi,bgWhite:Yi,bgGray:qi,bgRedBright:Ki,bgGreenBright:Ji,bgYellowBright:Xi,bgBlueBright:Zi,bgMagentaBright:Qi,bgCyanBright:eu,bgWhiteBright:tu}=Ge.default;l();var su="\x1B[H\x1B[2J",Du="\x1B[2J\x1B[3J\x1B[H\x1Bc";ue.extend({brown:"#c19a6b",pink:"#ff75d1",teal:"#91EBC2",lightGray:"#2a2a2e",midGray:"#2a2929",orange:"#FFAB40",lavender:"#BECAFF",neonTeal:"#03E4DC",neonGreen:"#56ef83",neonCyan:"#69d5fd",neonRouge:"#FF8095",neonMagenta:"#7b68ee"});var{cyan:ou,red:S,green:lu,yellow:T,magenta:au,blue:Fu,white:He,gray:F,dim:cu,cyanBright:pu,redBright:k,greenBright:hu,yellowBright:P,magentaBright:fu,blueBright:gu,whiteBright:I,strip:_,underline:Ee,bold:$,reset:me,strikethrough:du,lightGray:h,midGray:Cu,pink:bt,brown:Eu,teal:mu,orange:Bu,lavender:Au,neonGreen:se,neonCyan:bu,neonRouge:xt,neonMagenta:yt,neonTeal:wt}=ue;var $u=`${Ue.open+T.open}!${T.close+Ue.close}`,Su=`${F.open}\u1D20${F.close}`,ku=`${F.open}|${F.close}`,vu=`${F.open}#${F.close}`,Ou=`${F.open}+${F.close}`,Pu=`${F.open}\xB5${F.close}`,Iu=`${F.open}-${F.close}`,Lu=`${F.open},${F.close}`,Ru=`${se.open}\u2713${se.close}`,Tt=`${k.open}\u2715${k.close}`,M=`${F.open}:${F.close}`,Z=`${F.open}\u2794${F.close}`,$t=`${F.open}\xBB${F.close}`,Nu=`${F.open}\u27A4${F.close}`,Mu=`${F.open}\u2942${F.close}`,Be=`${F.open}~${F.close}`,St=`${F.open}\u2014${F.close}`,kt=`${F.open}(${F.close}`,vt=`${F.open})${F.close}`,Ot=`${F.open}{${F.close}`,Pt=`${F.open}}${F.close}`,It=`${F.open}[${F.close}`,Lt=`${F.open}]${F.close}`,Rt=`${F.open}<${F.close}`,Nt=`${F.open}>${F.close}`;function Ae(e){return Buffer.isBuffer(e)?e.toString():Array.isArray(e)||typeof e=="object"?JSON.stringify(e):typeof e=="boolean"||typeof e=="number"?`${e}`:typeof e=="string"?e:String(e)}function Mt(e,t=null){let r=0;if(Array.isArray(e))for(let n of e)t?n[t].length>r&&(r=n[t].length):n.length>r&&(r=n.length);else for(let n in e)n.length>r&&(r=n.length);return r=r+1,function(i){let u=typeof i=="string"?r-i.length:r-i;return u<1?" ":" ".repeat(u)}}function ze(){let e=new Date,t=e.getHours(),r=e.getMinutes(),n=e.getSeconds();return(t<10?`0${t}`:t)+M+(r<10?`0${r}`:r)+M+(n<10?`0${n}`:n)}function De(e,{onlyFirst:t=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"],n=e.match(new RegExp(r.join("|"),t?void 0:"g"));return n!==null?n:!1}l();var G=" ",Hu=" ",oe=` `,zu=` `,be="";l();import{execFileSync as Wr}from"node:child_process";import{dirname as _r,join as Gr}from"node:path";import{env as le,platform as jt,stderr as ae,stdout as Fe}from"node:process";import{fileURLToPath as Ur}from"node:url";function xe(e,t,r){return Wr(e,t,{encoding:"utf8",shell:r,stdio:["ignore","pipe","ignore"]}).trim()}function Wt(e,t){let r=_r(Ur(import.meta.url));return xe(Gr(r,e),[],t).split(/\r?\n/)}function j(e,t){let r=Number.parseInt(e,10);return{wrap:r>85?85:r,cols:Number.parseInt(e,10),rows:Number.parseInt(t,10)}}function ce(){if(Fe&&Fe.columns&&Fe.rows)return j(Fe.columns,Fe.rows);if(ae&&ae.columns&&ae.rows)return j(ae.columns,ae.rows);if(le.COLUMNS&&le.LINES)return j(le.COLUMNS,le.LINES);if(jt==="win32")try{let e=Wt("vendor/windows/term-size.exe",!1);if(e.length===2)return j(e[0],e[1])}catch{}else{if(jt==="darwin")try{let e=Wt("vendor/macos/term-size",!0);if(e.length===2)return j(e[0],e[1])}catch{}try{let e=xe("resize",["-u"]).match(/\d+/g);if(e.length===2)return j(e[0],e[1])}catch{}if(le.TERM)try{let e=xe("tput",["cols"]),t=xe("tput",["lines"]);if(e&&t)return j(e,t)}catch{}}return j(80,24)}l();var o={open:`${h.open}\u250C\u2500${h.close} `,stub:`${h.open}\u251C${h.close} `,dash:`${h.open}\u251C\u2500${h.close} `,trim:`${h.open}\u2502${h.close}`,line:`${h.open}\u2502${h.close} `,next:` ${h.open}\u2502${h.close}`,newline:` ${h.open}\u2502${h.close} ${h.open}\u2502${h.close} `,after:`${h.open}\u2502${h.close} `,wrap:` ${h.open}\u2502${h.close} `,base:`${h.open}\u2514\u2500${h.close} `,red:`${S.dim.open}\u2502${S.dim.close} `,redTrim:`${S.dim.open}\u2502${S.dim.close}`,redDash:`${S.dim.open}\u251C\u2500${S.dim.close} `,redStub:`${S.dim.open}\u251C${S.dim.close} `,yellow:`${T.dim.open}\u2502${T.dim.close} `,yellowTrim:`${T.dim.open}\u2502${T.dim.close}`,yellowDash:`${T.dim.open}\u251C\u2500${T.dim.close} `,yellowStub:`${T.dim.open}\u251C${T.dim.close} `,indent:{edge:`${h.open}\u251C\u2500\u2500\u252C\u2500${h.close} `,fall:`${h.open}\u251C\u2500\u2500\u2510${h.close} `,line:`${h.open}\u2502 \u2502${h.close} `,stub:`${h.open}\u2502 \u251C${h.close} `,dash:`${h.open}\u2502 \u251C\u2500${h.close} `,base:`${h.open}\u2502 \u2514\u2500${h.close} `}};l();import{Console as ii}from"node:console";import mr from"node:process";l();import lr from"node:process";l();var ge={};vr(ge,{beep:()=>gn,clearScreen:()=>cn,clearTerminal:()=>pn,cursorBackward:()=>Jr,cursorDown:()=>qr,cursorForward:()=>Kr,cursorGetPosition:()=>Qr,cursorHide:()=>rn,cursorLeft:()=>Ut,cursorMove:()=>Yr,cursorNextLine:()=>en,cursorPrevLine:()=>tn,cursorRestorePosition:()=>Zr,cursorSavePosition:()=>Xr,cursorShow:()=>nn,cursorTo:()=>Vr,cursorUp:()=>Gt,enterAlternativeScreen:()=>hn,eraseDown:()=>on,eraseEndLine:()=>sn,eraseLine:()=>Ht,eraseLines:()=>un,eraseScreen:()=>Ve,eraseStartLine:()=>Dn,eraseUp:()=>ln,exitAlternativeScreen:()=>fn,iTerm:()=>En,image:()=>Cn,link:()=>dn,scrollDown:()=>Fn,scrollUp:()=>an});l();import Ye from"node:process";l();var ye=globalThis.window?.document!==void 0,ns=globalThis.process?.versions?.node!==void 0,is=globalThis.process?.versions?.bun!==void 0,us=globalThis.Deno?.version?.deno!==void 0,ss=globalThis.process?.versions?.electron!==void 0,Ds=globalThis.navigator?.userAgent?.includes("jsdom")===!0,os=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,ls=typeof DedicatedWorkerGlobalScope<"u"&&globalThis instanceof DedicatedWorkerGlobalScope,as=typeof SharedWorkerGlobalScope<"u"&&globalThis instanceof SharedWorkerGlobalScope,Fs=typeof ServiceWorkerGlobalScope<"u"&&globalThis instanceof ServiceWorkerGlobalScope,pe=globalThis.navigator?.userAgentData?.platform,cs=pe==="macOS"||globalThis.navigator?.platform==="MacIntel"||globalThis.navigator?.userAgent?.includes(" Mac ")===!0||globalThis.process?.platform==="darwin",ps=pe==="Windows"||globalThis.navigator?.platform==="Win32"||globalThis.process?.platform==="win32",hs=pe==="Linux"||globalThis.navigator?.platform?.startsWith("Linux")===!0||globalThis.navigator?.userAgent?.includes(" Linux ")===!0||globalThis.process?.platform==="linux",fs=pe==="iOS"||globalThis.navigator?.platform==="MacIntel"&&globalThis.navigator?.maxTouchPoints>1||/iPad|iPhone|iPod/.test(globalThis.navigator?.platform),gs=pe==="Android"||globalThis.navigator?.platform==="Android"||globalThis.navigator?.userAgent?.includes(" Android ")===!0||globalThis.process?.platform==="android";var B="\x1B[",fe="\x1B]",Q="\x07",he=";",_t=!ye&&Ye.env.TERM_PROGRAM==="Apple_Terminal",Hr=!ye&&Ye.platform==="win32",zr=ye?()=>{throw new Error("`process.cwd()` only works in Node.js, not the browser.")}:Ye.cwd,Vr=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof t!="number"?B+(e+1)+"G":B+(t+1)+he+(e+1)+"H"},Yr=(e,t)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let r="";return e<0?r+=B+-e+"D":e>0&&(r+=B+e+"C"),t<0?r+=B+-t+"A":t>0&&(r+=B+t+"B"),r},Gt=(e=1)=>B+e+"A",qr=(e=1)=>B+e+"B",Kr=(e=1)=>B+e+"C",Jr=(e=1)=>B+e+"D",Ut=B+"G",Xr=_t?"\x1B7":B+"s",Zr=_t?"\x1B8":B+"u",Qr=B+"6n",en=B+"E",tn=B+"F",rn=B+"?25l",nn=B+"?25h",un=e=>{let t="";for(let r=0;r<e;r++)t+=Ht+(r<e-1?Gt():"");return e&&(t+=Ut),t},sn=B+"K",Dn=B+"1K",Ht=B+"2K",on=B+"J",ln=B+"1J",Ve=B+"2J",an=B+"S",Fn=B+"T",cn="\x1Bc",pn=Hr?`${Ve}${B}0f`:`${Ve}${B}3J${B}H`,hn=B+"?1049h",fn=B+"?1049l",gn=Q,dn=(e,t)=>[fe,"8",he,he,t,Q,e,fe,"8",he,he,Q].join(""),Cn=(e,t={})=>{let r=`${fe}1337;File=inline=1`;return t.width&&(r+=`;width=${t.width}`),t.height&&(r+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+Buffer.from(e).toString("base64")+Q},En={setCwd:(e=zr())=>`${fe}50;CurrentDir=${e}${Q}`,annotation(e,t={}){let r=`${fe}1337;`,n=t.x!==void 0,i=t.y!==void 0;if((n||i)&&!(n&&i&&t.length!==void 0))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replaceAll("|",""),r+=t.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",t.length>0?r+=(n?[e,t.length,t.x,t.y]:[t.length,e]).join("|"):r+=e,r+Q}};l();import Jt from"node:process";l();import Se from"node:process";l();l();var mn=(e,t,r,n)=>{if(r==="length"||r==="prototype"||r==="arguments"||r==="caller")return;let i=Object.getOwnPropertyDescriptor(e,r),u=Object.getOwnPropertyDescriptor(t,r);!Bn(i,u)&&n||Object.defineProperty(e,r,u)},Bn=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},An=(e,t)=>{let r=Object.getPrototypeOf(t);r!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,r)},bn=(e,t)=>`/* Wrapped ${e}*/ ${t}`,xn=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),yn=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),wn=(e,t,r)=>{let n=r===""?"":`with ${r.trim()}() `,i=bn.bind(null,n,t.toString());Object.defineProperty(i,"name",yn);let{writable:u,enumerable:s,configurable:D}=xn;Object.defineProperty(e,"toString",{value:i,writable:u,enumerable:s,configurable:D})};function qe(e,t,{ignoreNonConfigurable:r=!1}={}){let{name:n}=e;for(let i of Reflect.ownKeys(t))mn(e,t,i,r);return An(e,t),wn(e,t,n),e}var we=new WeakMap,zt=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let r,n=0,i=e.displayName||e.name||"<anonymous>",u=function(...s){if(we.set(u,++n),n===1)r=e.apply(this,s),e=void 0;else if(t.throw===!0)throw new Error(`Function \`${i}\` can only be called once`);return r};return qe(u,e),we.set(u,n),u};zt.callCount=e=>{if(!we.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return we.get(e)};var Vt=zt;l();l();var U=[];U.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&U.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&U.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var Te=e=>!!e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function",Ke=Symbol.for("signal-exit emitter"),Je=globalThis,Tn=Object.defineProperty.bind(Object),Xe=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(Je[Ke])return Je[Ke];Tn(Je,Ke,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,r){this.listeners[t].push(r)}removeListener(t,r){let n=this.listeners[t],i=n.indexOf(r);i!==-1&&(i===0&&n.length===1?n.length=0:n.splice(i,1))}emit(t,r,n){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(let u of this.listeners[t])i=u(r,n)===!0||i;return t==="exit"&&(i=this.emit("afterExit",r,n)||i),i}},$e=class{},$n=e=>({onExit(t,r){return e.onExit(t,r)},load(){return e.load()},unload(){return e.unload()}}),Ze=class extends $e{onExit(){return()=>{}}load(){}unload(){}},Qe=class extends $e{#s=et.platform==="win32"?"SIGINT":"SIGHUP";#t=new Xe;#e;#i;#u;#n={};#r=!1;constructor(t){super(),this.#e=t,this.#n={};for(let r of U)this.#n[r]=()=>{let n=this.#e.listeners(r),{count:i}=this.#t,u=t;if(typeof u.__signal_exit_emitter__=="object"&&typeof u.__signal_exit_emitter__.count=="number"&&(i+=u.__signal_exit_emitter__.count),n.length===i){this.unload();let s=this.#t.emit("exit",null,r),D=r==="SIGHUP"?this.#s:r;s||t.kill(t.pid,D)}};this.#u=t.reallyExit,this.#i=t.emit}onExit(t,r){if(!Te(this.#e))return()=>{};this.#r===!1&&this.load();let n=r?.alwaysLast?"afterExit":"exit";return this.#t.on(n,t),()=>{this.#t.removeListener(n,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#r){this.#r=!0,this.#t.count+=1;for(let t of U)try{let r=this.#n[t];r&&this.#e.on(t,r)}catch{}this.#e.emit=(t,...r)=>this.#o(t,...r),this.#e.reallyExit=t=>this.#D(t)}}unload(){this.#r&&(this.#r=!1,U.forEach(t=>{let r=this.#n[t];if(!r)throw new Error("Listener not defined for signal: "+t);try{this.#e.removeListener(t,r)}catch{}}),this.#e.emit=this.#i,this.#e.reallyExit=this.#u,this.#t.count-=1)}#D(t){return Te(this.#e)?(this.#e.exitCode=t||0,this.#t.emit("exit",this.#e.exitCode,null),this.#u.call(this.#e,this.#e.exitCode)):0}#o(t,...r){let n=this.#i;if(t==="exit"&&Te(this.#e)){typeof r[0]=="number"&&(this.#e.exitCode=r[0]);let i=n.call(this.#e,t,...r);return this.#t.emit("exit",this.#e.exitCode,null),i}else return n.call(this.#e,t,...r)}},et=globalThis.process,{onExit:Yt,load:Ps,unload:Is}=$n(Te(et)?new Qe(et):new Ze);var qt=Se.stderr.isTTY?Se.stderr:Se.stdout.isTTY?Se.stdout:void 0,Sn=qt?Vt(()=>{Yt(()=>{qt.write("\x1B[?25h")},{alwaysLast:!0})}):()=>{},Kt=Sn;var ke=!1,ee={};ee.show=(e=Jt.stderr)=>{e.isTTY&&(ke=!1,e.write("\x1B[?25h"))};ee.hide=(e=Jt.stderr)=>{e.isTTY&&(Kt(),ke=!0,e.write("\x1B[?25l"))};ee.toggle=(e,t)=>{e!==void 0&&(ke=e),ke?ee.show(t):ee.hide(t)};var tt=ee;l();l();l();l();function rt({onlyFirst:e=!1}={}){let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}var kn=rt();function H(e){if(typeof e!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(kn,"")}l();l();function Xt(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}function Zt(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function Qt(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}function vn(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}function ve(e,{ambiguousAsWide:t=!1}={}){return vn(e),Zt(e)||Qt(e)||t&&Xt(e)?2:1}l();var er=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var On=new Intl.Segmenter,Pn=new RegExp("^\\p{Default_Ignorable_Code_Point}$","u");function z(e,t={}){if(typeof e!="string"||e.length===0)return 0;let{ambiguousIsNarrow:r=!0,countAnsiEscapeCodes:n=!1}=t;if(n||(e=H(e)),e.length===0)return 0;let i=0,u={ambiguousAsWide:!r};for(let{segment:s}of On.segment(e)){let D=s.codePointAt(0);if(!(D<=31||D>=127&&D<=159)&&!(D>=8203&&D<=8207||D===65279)&&!(D>=768&&D<=879||D>=6832&&D<=6911||D>=7616&&D<=7679||D>=8400&&D<=8447||D>=65056&&D<=65071)&&!(D>=55296&&D<=57343)&&!(D>=65024&&D<=65039)&&!Pn.test(s)){if(er().test(s)){i+=2;continue}i+=ve(D,u)}}return i}l();var tr=(e=0)=>t=>`\x1B[${t+e}m`,rr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,nr=(e=0)=>(t,r,n)=>`\x1B[${38+e};2;${t};${r};${n}m`,b={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},aD=Object.keys(b.modifier),In=Object.keys(b.color),Ln=Object.keys(b.bgColor),FD=[...In,...Ln];function Rn(){let e=new Map;for(let[t,r]of Object.entries(b)){for(let[n,i]of Object.entries(r))b[n]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[n]=b[n],e.set(i[0],i[1]);Object.defineProperty(b,t,{value:r,enumerable:!1})}return Object.defineProperty(b,"codes",{value:e,enumerable:!1}),b.color.close="\x1B[39m",b.bgColor.close="\x1B[49m",b.color.ansi=tr(),b.color.ansi256=rr(),b.color.ansi16m=nr(),b.bgColor.ansi=tr(10),b.bgColor.ansi256=rr(10),b.bgColor.ansi16m=nr(10),Object.defineProperties(b,{rgbToAnsi256:{value:(t,r,n)=>t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5),enumerable:!1},hexToRgb:{value:t=>{let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[n]=r;n.length===3&&(n=[...n].map(u=>u+u).join(""));let i=Number.parseInt(n,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>b.rgbToAnsi256(...b.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value:t=>{if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,n,i;if(t>=232)r=((t-232)*10+8)/255,n=r,i=r;else{t-=16;let D=t%36;r=Math.floor(t/36)/5,n=Math.floor(D/6)/5,i=D%6/5}let u=Math.max(r,n,i)*2;if(u===0)return 30;let s=30+(Math.round(i)<<2|Math.round(n)<<1|Math.round(r));return u===2&&(s+=60),s},enumerable:!1},rgbToAnsi:{value:(t,r,n)=>b.ansi256ToAnsi(b.rgbToAnsi256(t,r,n)),enumerable:!1},hexToAnsi:{value:t=>b.ansi256ToAnsi(b.hexToAnsi256(t)),enumerable:!1}}),b}var Nn=Rn(),O=Nn;var Pe=new Set(["\x1B","\x9B"]),Mn=39,it="\x07",sr="[",jn="]",Dr="m",Oe=`${jn}8;;`,ir=e=>`${Pe.values().next().value}${sr}${e}${Dr}`,ur=e=>`${Pe.values().next().value}${Oe}${e}${it}`,Wn=e=>e.split(" ").map(t=>z(t)),nt=(e,t,r)=>{let n=[...t],i=!1,u=!1,s=z(H(e.at(-1)));for(let[D,a]of n.entries()){let f=z(a);if(s+f<=r?e[e.length-1]+=a:(e.push(a),s=0),Pe.has(a)&&(i=!0,u=n.slice(D+1,D+1+Oe.length).join("")===Oe),i){u?a===it&&(i=!1,u=!1):a===Dr&&(i=!1);continue}s+=f,s===r&&D<n.length-1&&(e.push(""),s=0)}!s&&e.at(-1).length>0&&e.length>1&&(e[e.length-2]+=e.pop())},_n=e=>{let t=e.split(" "),r=t.length;for(;r>0&&!(z(t[r-1])>0);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},Gn=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let n="",i,u,s=Wn(e),D=[""];for(let[p,E]of e.split(" ").entries()){r.trim!==!1&&(D[D.length-1]=D.at(-1).trimStart());let m=z(D.at(-1));if(p!==0&&(m>=t&&(r.wordWrap===!1||r.trim===!1)&&(D.push(""),m=0),(m>0||r.trim===!1)&&(D[D.length-1]+=" ",m++)),r.hard&&s[p]>t){let x=t-m,c=1+Math.floor((s[p]-x-1)/t);Math.floor((s[p]-1)/t)<c&&D.push(""),nt(D,E,t);continue}if(m+s[p]>t&&m>0&&s[p]>0){if(r.wordWrap===!1&&m<t){nt(D,E,t);continue}D.push("")}if(m+s[p]>t&&r.wordWrap===!1){nt(D,E,t);continue}D[D.length-1]+=E}r.trim!==!1&&(D=D.map(p=>_n(p)));let a=D.join(` `),f=[...a],g=0;for(let[p,E]of f.entries()){if(n+=E,Pe.has(E)){let{groups:x}=new RegExp(`(?:\\${sr}(?<code>\\d+)m|\\${Oe}(?<uri>.*)${it})`).exec(a.slice(g))||{groups:{}};if(x.code!==void 0){let c=Number.parseFloat(x.code);i=c===Mn?void 0:c}else x.uri!==void 0&&(u=x.uri.length===0?void 0:x.uri)}let m=O.codes.get(Number(i));f[p+1]===` `?(u&&(n+=ur("")),i&&m&&(n+=ir(m))):E===` `&&(i&&m&&(n+=ir(i)),u&&(n+=ur(u))),g+=E.length}return n};function L(e,t,r){return String(e).normalize().replaceAll(`\r `,` `).split(` `).map(n=>Gn(n,t,r)).join(` `)}l();l();function ut(e){return Number.isInteger(e)?ve(e)===2:!1}var Un=new Set([27,155]),Hn="0".codePointAt(0),zn="9".codePointAt(0),Dt=new Set,st=new Map;for(let[e,t]of O.codes)Dt.add(O.color.ansi(t)),st.set(O.color.ansi(e),O.color.ansi(t));function Vn(e){if(Dt.has(e))return e;if(st.has(e))return st.get(e);e=e.slice(2),e.includes(";")&&(e=e[0]+"0");let t=O.codes.get(Number.parseInt(e,10));return t?O.color.ansi(t):O.reset.open}function Yn(e){for(let t=0;t<e.length;t++){let r=e.codePointAt(t);if(r>=Hn&&r<=zn)return t}return-1}function qn(e,t){e=e.slice(t,t+19);let r=Yn(e);if(r!==-1){let n=e.indexOf("m",r);return n===-1&&(n=e.length),e.slice(0,n+1)}}function Kn(e,t=Number.POSITIVE_INFINITY){let r=[],n=0,i=0;for(;n<e.length;){let u=e.codePointAt(n);if(Un.has(u)){let a=qn(e,n);if(a){r.push({type:"ansi",code:a,endCode:Vn(a)}),n+=a.length;continue}}let s=ut(u),D=String.fromCodePoint(u);if(r.push({type:"character",value:D,isFullWidth:s}),n+=D.length,i+=s?2:D.length,i>=t)break}return r}function or(e){let t=[];for(let r of e)r.code===O.reset.open?t=[]:Dt.has(r.code)?t=t.filter(n=>n.endCode!==r.code):(t=t.filter(n=>n.endCode!==r.endCode),t.push(r));return t}function Jn(e){return or(e).map(({endCode:n})=>n).reverse().join("")}function ot(e,t,r){let n=Kn(e,r),i=[],u=0,s="",D=!1;for(let a of n){if(r!==void 0&&u>=r)break;a.type==="ansi"?(i.push(a),D&&(s+=a.code)):(!D&&u>=t&&(D=!0,i=or(i),s=i.map(({code:f})=>f).join("")),D&&(s+=a.value),u+=a.isFullWidth?2:a.value.length)}return s+=Jn(i),s}var Xn=24,lt=({columns:e=80})=>e,Zn=(e,t)=>{let r=e.rows??Xn,n=t.split(` `),i=Math.max(0,n.length-r);return i?ot(t,H(n.slice(0,i).join(` `)).length+1):t};function Ie(e,{showCursor:t=!1}={}){let r=0,n=lt(e),i="",u=()=>{i="",n=lt(e),r=0},s=(...D)=>{t||tt.hide();let a=Zn(e,D.join(" ")+` `),f=lt(e);a===i&&n===f||(i=a,n=f,a=L(a,f,{trim:!1,hard:!0,wordWrap:!1}),e.write(ge.eraseLines(r)+a),r=a.split(` `).length)};return s.clear=()=>{e.write(ge.eraseLines(r)),u()},s.done=()=>{u(),t||tt.show()},s}var Qn=Ie(lr.stdout),V=Qn,OD=Ie(lr.stderr);import{glue as v}from"@syncify/glue";l();l();import{glue as te}from"@syncify/glue";l();import{homedir as ei}from"node:os";function ti(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ar=/\s+at.*[(\s](.*)\)?/,Fr=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/;function cr(e,{pretty:t=!1,basePath:r,pathFilter:n}={}){let i=r&&new RegExp(`(file://)?${ti(r.replace(/\\/g,"/"))}/?`,"g"),u=t?ei().replace(/\\/g,"/"):"";if(typeof e=="string")return e.replace(/\\/g,"/").split(` `).filter(s=>{let D=s.match(ar);if(D===null||!D[1])return!0;let a=D[1];return a.includes(".app/Contents/Resources/electron.asar")||a.includes(".app/Contents/Resources/default_app.asar")||a.includes("node_modules/electron/dist/resources/electron.asar")||a.includes("node_modules/electron/dist/resources/default_app.asar")?!1:n?!Fr.test(a)&&n(a):!Fr.test(a)}).filter(s=>s.trim()!=="").map(s=>(i&&(s=s.replace(i,"")),t&&(s=s.replace(ar,(D,a)=>D.replace(a,a.replace(u,"~")))),s)).join(` `)}var pr=9,Le=" ",ri=pr+Le.length,ni=/\d+[μmsec]{1,3}$/;function re(e,...t){let r=De(e)?_(e).trim():e.trim(),n=r.length>pr?Le:" ".repeat(ri-r.length),i=/^(error|invalid|failed|rejected)$/.test(r)?Tt:$t,u=r+Le+n+i+Le,s=t.length;if(s>0){if(s===1)return te.ws(u,t[0]);if(s===2)return ni.test(_(t[1]))?te.ws(u,t[0],at(t[1])):te.ws(u,t[0],Z,t[1]);if(s===3)return te.ws(u,t[0],Z,t[1],at(t[2]));if(s===4)return te.ws(u,t[0],Z,t[1],Z,t[2],at(t[3]))}return u}function at(e){return e?Be+" "+me.gray(e):""}function qD(e,t,{spaced:r=!1}={}){let n=r?" ":"";switch(e){case"AN":return Rt+n+t+n+Nt;case"CB":return Ot+n+t+n+Pt;case"PR":return kt+n+t+n+vt;case"SB":return It+n+t+n+Lt}}var de=Object.create(null);de.warning=T(` ${Be} Type ${$("w")} and press ${$("enter")} to view all warning/s`);de.error=S(` ${Be} Type ${$("v")} and press ${$("enter")} to view all error/s`);de.stack=F(`Type ${$("s")} and press ${$("enter")} to view stack trace`);de.bulk=F(`Type ${$("i")} and press ${$("enter")} to inspect bulk file/s`);var KD=(e=void 0,t=!0)=>{e===void 0&&(e=ce().wrap);let r=h.open+"\u251C"+"\u2500".repeat(e-10)+h.close;return t?o.trim+` `+r+` `+o.trim:r};function hr(e,t=!0){return o.open+me.gray(t?`${e} ~ ${ze()}`:e)}var fr=(...e)=>{let t={color:null,line:o.line},r="",n;for(Array.isArray(e[0])?(typeof e[1]=="object"&&Object.assign(t,e[1]),n=e[0]):(typeof e[e.length-1]=="object"&&Object.assign(t,e.pop()),n=e);n.length!==0;){let i=n.shift();if(/^\n+$/.test(i)){let u=i.split(` `).length-1;for(let s=0;s<u;s++)r+=t.line+` `}else i=i.trim(),i.length>0?r+=t.line+(t.color?t.color(i):i)+` `:r+=t.line+` `}return r.slice(0,-1)},ne=(...e)=>{let t={color:null,line:o.line,firstLineTree:!0},r=ce().wrap-5,n,i="";Array.isArray(e[0])?(typeof e[1]=="object"&&Object.assign(t,e[1]),n=L(te.ws(e[0]),r,{hard:!0}).split(` `)):(typeof e[e.length-1]=="object"&&Object.assign(t,e.pop()),n=L(e.join(" "),r,{hard:!0}).split(` `));for(let u=0,s=n.length;u<s;u++){let D=n[u],a=u===0&&t.firstLineTree===!1?"":t.line;i+=a+(D.length>0?t.color?t.color(D):D:"")+` `}return i.trimEnd()},Ce=e=>o.trim+` `+o.line+e+` `+o.trim,JD=e=>o.redTrim+` `+o.red+S(e)+` `+o.redTrim;function XD(e){return o.yellowTrim+` `+o.yellow+T(e)+` `+o.yellowTrim}function gr(e){return o.line+e}function ZD(e){return o.red+e}function QD(e){return o.yellow+e}function eo(e){return o.trim+` `+o.line+e}function to(e){return o.line+e+` `+o.line}function dr(e){return o.dash+e}function Cr(e,t=!0){return o.base+me.gray(t?`${e} ~ ${ze()}`:e)+` `}function ro(e){return o.indent.line+e}function no(e){return o.indent.dash+e}function io(e){return o.indent.base+e+` `+o.trim}function uo(e=0,t=0,r=I){return o.line+r($(e)+" of "+$(t))}function Er(e){let t=Mt(e.entries),r=Ft({type:e.type||"error",tree:"tree"in e?e.tree:!0}).Newline();if(typeof e.stack=="string"){let u=e.cleanStack?cr(e.stack,{pretty:!0}):e.stack;/TypeError/.test(u.trimStart())&&(u=u.slice(u.indexOf(` `)+1).replace(/^ +/gm,Z+G)),r.Multiline(F(u)).Newline()}let n="",i="";"line"in e.entries&&(n=`:${typeof e.entries.line=="number"?e.entries.line:_(e.entries.line)}`),n!==""&&"column"in e.entries&&(i=`:${typeof e.entries.column=="number"?e.entries.column:_(e.entries.column)}`);for(let u in e.entries){if(e.entries[u]===void 0)continue;let s,D=u==="failed";if(typeof e.entries[u]=="number"){if(isNaN(e.entries[u]))continue;s=xt(Ae(e.entries[u]))}else D||(s=Ae(e.entries[u]));if(s.length===0)continue;let a=e.type==="warning"?P(u):k(u);if(u==="source"||u==="output"||u==="input"||u==="file")r.Line(`${a}${M} ${t(u)}${Ee(s+n+i)}`,F);else if(D)if(Array.isArray(e.entries[u]))for(let f of e.entries[u])r.Line(`${a}${M} ${t(u)}${Ee(f)}`,F);else r.Line(`${a}${M} ${t(u)}${Ee(e.entries[u])}`,F);else r.Line(`${a}${M} ${t(u)}${s}`,F)}return e.stack===!0&&r.Newline().Line(de.stack),r.toString()}function Re(){let e,t=!1,r="",n=!0,{loaders:i}=Re,u={label:"",line:!0,color:null,style:"spinning",action:null},s=function(a,f){let g={...u};typeof a=="object"?g=Object.assign(g,a):typeof a=="string"&&(g.label=a,typeof f=="object"&&(g=Object.assign(g,f))),t=!0,n=g.line;let p,E=0,m,x=0;g.action!==null?(g.style="arrows",p="color"in g.action?g.action.color:se,m=i.arrows.frames,x=m.length):(p=typeof g.color=="function"?g.color:bt,r=g.label,m=i[g.style].frames,x=m.length),V.done(),e=setInterval(()=>{if(!t)return;let c;if(g.action!==null){let A=$(g.action.before)+" "+m[E=++E%x]+" "+g.action.after;c=p(r!==""?re(r,A):A)}else c=p(m[E=++E%x]+" "+r);V(g.line?Ce(c):c)},i[g.style].interval)};return s.update=function(D){r=D},s.stop=function(D){t!==!1&&(t=!1,D?(V(n?Ce(D):D),V.done()):V.clear(),clearInterval(e),e=void 0,r="")},Object.defineProperty(s,"active",{get(){return t}}),s}Re.loaders={dots:{interval:100,frames:[".","..","...","...."]},arrows:{interval:120,frames:["\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B8"]},brielle:{interval:80,frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]},spinning:{interval:80,frames:["\u25D0","\u25D3","\u25D1","\u25D2"]}};var Y=class e extends ii{static get stdout(){return mr.stdout}static get stderr(){return mr.stderr}static update=Ie(e.stdout);constructor(){super(e.stdout,e.stderr)}write(t){e.stdout.write(t)}info(t,r=I){e.stdout.write(gr(r(t.trim()))+` `)}dash(t,r=I){e.stdout.write(dr(r(t))+` `)}error(t){e.stderr.write(o.red+k(t.trim())+` `)}warn(t){e.stderr.write(o.yellow+P(t.trim())+` `)}header(t,r=I){return e.stdout.write(Ce(r(t.trim()))+` `),this}wrap(...t){let r=typeof t[t.length-1]=="function"?t.pop():F;return e.stdout.write(ne(t,{color:r,firstLineTree:!1})+` `),this}tree(t){return e.stdout.write((t==="red"?o.redTrim:t==="yellow"?o.yellowTrim:o.trim)+` `),this}break(){return e.stdout.write(` `),this}},q=class e{static store=new Map;spin={active:!1,index:NaN,label:be,color:yt,style:"spinning",interval:null,stopOn:"clear"};id=null;type="info";track=new Map;line;trim;dash;tree={enable:!0,switch:!1};stack;lamdas=new Map;writes=0;data;get update(){return Y.update}constructor(t){typeof t=="object"?(this.id="id"in t?t.id:null,this.tree.enable="tree"in t?t.tree:!0,this.type="type"in t?t.type:"info",this.stack="stack"in t?t.stack:[],this.tree.enable?this.ty