@visulima/vis 4.0.0 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/catalog.js +1 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler72.js +1 -1
- package/dist/packem_chunks/handler78.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_shared/{affected-selection-BmUh3_Qp.js → affected-selection-DLrq50Mz.js} +1 -1
- package/dist/packem_shared/{bin-D-Es9mva.js → bin-As0Wq5ZN.js} +1 -1
- package/dist/packem_shared/{index-BvYJA7e5.js → index-CcVv0V1y.js} +1 -1
- package/dist/packem_shared/{package-version-B_KfpWKC.js → package-version-BFsJ8iyZ.js} +1 -1
- package/dist/packem_shared/{project-name-filter-D6uEN2ot.js → project-name-filter-DdXd3P3a.js} +1 -1
- package/dist/packem_shared/{vis-user-error-By2ZNeEA.js → vis-user-error-DJvfOpBX.js} +1 -1
- package/index.js +26 -26
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r,x as o,d as i,r as n,i as s}from"../packem_shared/vis-user-error-
|
|
1
|
+
import{a as r,x as o,d as i,r as n,i as s}from"../packem_shared/vis-user-error-DJvfOpBX.js";import{e as t}from"../packem_shared/index-CcVv0V1y.js";import{g as d}from"../packem_shared/package-version-BFsJ8iyZ.js";const g=async()=>{const e=r("vis",{packageName:"vis",packageVersion:d()}),a=process.argv.includes("--debug")||!!process.env.DEBUG;e.addPlugin(o({concise:s,detailed:a,exitOnError:!1})),e.addGlobalOption({description:"Target JS runtime: node (default) or bun. Overrides VIS_RUNTIME; falls back to lockfile detection.",name:"runtime",type:String}),e.addCommand(t),e.addCommand(i),await n(e)};export{g as runExecCli};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as Cf}from"node:module";import{n as jf,b as R,d as Tf,a as If,x as Af,r as Bf,i as Pf}from"../packem_shared/vis-user-error-By2ZNeEA.js";import{k as gl,e as m,h as ar,m as it,z as J,v as eo,l as At,a as as,b as Nf,U as un}from"../packem_shared/index-DHD8wb6Z.js";import{N as ml,p as de}from"../packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js";import{u as k,y as v,X as W,m as O,S as Df,U as Xo,V as Ee,W as Lf,Y as Mf,Z as Ue,_ as _f,$ as Ff,a0 as Vf,a1 as Wf,a2 as Hf,a3 as Uf,a4 as Gf,a5 as zf,z as yl,F as Ye,d as Jf,a6 as qf,j as Zo,i as Kf,x as Yf,p as cr,D as Qo,R as Xf,c as Zf,h as Qf,a7 as lr,a8 as dr,a9 as eh,aa as th}from"./catalog.js";import{parseStacktrace as nh}from"@visulima/error/stacktrace";import{i as ut}from"../packem_shared/index-BjdW45xX.js";import{y as $}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{U as ye,h as mt}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";import{findVisConfigFile as _t,loadVisConfig as ta}from"./CONFIG_FILES.js";import{S as lh}from"../packem_shared/index-BisalDCf.js";import{T as dh}from"../packem_shared/target-merge-B4No-LHM.js";import{s as uh}from"../packem_shared/bin-D-Es9mva.js";import{X as xi,j as Le,b as Bn,q as et,F as rn,T as ph,t as ii,J as fh}from"../packem_shared/index.server-BAjDJSEu.js";import{s as pr}from"../packem_shared/index-B4AjSxHU.js";import{g as Ws}from"../packem_shared/package-version-B_KfpWKC.js";import{l as yt,k as na,ad as yh,ae as xl,g as vh,d as vt,af as fr,ag as bh,$ as Kn,c as Wn,ah as $l}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{d as sa}from"../packem_shared/pm-runner-d93_73O6.js";import{m as wh}from"./ts-loader.js";import{getMainWorktreeRoot as kh,Cache as Hs,readLastRunSummary as El,getLastRunSummaryPath as hr,parseCacheSize as Sh,digestFile as Cl}from"@visulima/task-runner";import{e as Ih}from"../packem_shared/index-BvYJA7e5.js";let Rf;const Of=e=>(Rf??=Cf(import.meta.url))(e),Sn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ce=e=>{if(typeof Sn<"u"&&Sn.versions&&Sn.versions.node){const[t,n]=Sn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Sn.getBuiltinModule(e)}return Of(e)},{createRequire:Ne}=Ce("node:module"),{spawnSync:ot,execSync:vl,execFileSync:sh,execFile:ih}=Ce("node:child_process"),{writeFileSync:ce,existsSync:ur,renameSync:bl,readFileSync:wl,readdirSync:we,statSync:Bt,rmSync:pn,copyFileSync:rh,unlinkSync:gt,mkdirSync:oh,cpSync:ah,watch:ch}=Ce("node:fs"),{dirname:kl,delimiter:ea,resolve:Vs}=Ce("node:path"),{createInterface:Sl}=Ce("node:readline"),{homedir:hh,platform:gh,tmpdir:mh}=Ce("node:os"),{readFile:Rl,readdir:cs,stat:mn,realpath:ia,rm:to,mkdtemp:xh,mkdir:$h}=Ce("node:fs/promises"),{isIP:Eh}=Ce("node:net"),{createServer:Ch,STATUS_CODES:Rh}=Ce("node:http"),{Http2ServerRequest:on,constants:Oh}=Ce("node:http2"),{Readable:ra}=Ce("node:stream"),{randomUUID:jh}=Ce("node:crypto"),{fileURLToPath:Th}=Ce("node:url"),Ah=["pnpm-lock.yaml","package-lock.json","npm-shrinkwrap.json","yarn.lock","bun.lock","bun.lockb"];let Bh;const Ph=e=>(Bh??=Ne(import.meta.url))(e),xn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ol=e=>{if(typeof xn<"u"&&xn.versions&&xn.versions.node){const[t,n]=xn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return xn.getBuiltinModule(e)}return Ph(e)},{execFileSync:Nh}=Ol("node:child_process"),{existsSync:oa,readFileSync:Dh}=Ol("node:fs"),Lh=[...Ah],aa=new Set(["bun","npm","pnpm","yarn"]),jl=e=>{const t=ml(Dh(e,"utf8"));return typeof t?.packageManager=="string"?t.packageManager:void 0},Mh=e=>{let t;if(Lh.forEach(s=>{!t&&oa(m(e,s))&&(t=m(e,s))}),t)return t;const n=m(e,"package.json");if(oa(n)&&jl(n)!==void 0)return n},_h=e=>{if(!e)throw new ar("Could not find a package manager");if(e.endsWith("package.json")){const t=jl(e);if(t){const n=["npm","yarn","pnpm","bun"].find(s=>t.startsWith(s));if(n)return{packageManager:n,path:it(e)}}}if(e.endsWith("yarn.lock"))return{packageManager:"yarn",path:it(e)};if(e.endsWith("package-lock.json")||e.endsWith("npm-shrinkwrap.json"))return{packageManager:"npm",path:it(e)};if(e.endsWith("pnpm-lock.yaml"))return{packageManager:"pnpm",path:it(e)};if(e.endsWith("bun.lock")||e.endsWith("bun.lockb"))return{packageManager:"bun",path:it(e)};throw new ar("Could not find a package manager")},Fh=e=>{const t=gl(Mh,{...e&&{cwd:e}});return _h(t)},r4=e=>{if(!aa.has(e))throw new Error(`Unsupported package manager "${e}". Expected one of: ${[...aa].join(", ")}.`);return Nh(e,["--version"]).toString("utf8").trim()};let Vh;const Wh=e=>(Vh??=Ne(import.meta.url))(e),$n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hh=e=>{if(typeof $n<"u"&&$n.versions&&$n.versions.node){const[t,n]=$n.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return $n.getBuiltinModule(e)}return Wh(e)},{existsSync:ca,readFileSync:Uh}=Hh("node:fs"),Gh=e=>{let t;try{t=ml(e)}catch{return!1}if(!t||typeof t!="object"||Array.isArray(t))return!1;const{workspaces:n}=t;return typeof n=="object"&&n!==null},Tl=e=>{const t=gl(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const s=de(t);if(s&&typeof s=="object"&&!Array.isArray(s)){const i=s;if(i.useWorkspaces||i.packages)return{path:it(t),strategy:"lerna"}}}const n=t?.endsWith("turbo.json");try{const{packageManager:s,path:i}=Fh(e);if(["npm","yarn"].includes(s)){const r=m(i,"package.json");if(ca(r)){const o=Uh(m(i,"package.json"),"utf8");if(Gh(o))return{path:i,strategy:n?"turbo":s}}}else if(s==="pnpm"){const r=m(i,"pnpm-workspace.yaml");if(ca(r))return{path:i,strategy:n?"turbo":"pnpm"}}}catch(s){if(!(s instanceof ar))throw s}throw new Error(`No monorepo root could be found upwards from the directory ${String(e??process.cwd())} using lerna, yarn, pnpm, or npm as indicators.`)};function Il(e,t,n,s){let i,r,o;r=n,o=s;const a=lh(t,r,o??i);ye(e,a,i)}const G=(e,t)=>async()=>({default:(await e())[t]}),zh=new Set(["--cwd"]),Jh=new Set(["--help","--version","-h","-V"]),qh=e=>{const t=[];for(let n=0;n<e.length;n+=1){const s=e[n];if(s!==void 0){if(Jh.has(s))return!1;if(s.startsWith("-")){const i=s.indexOf("="),r=i===-1?s:s.slice(0,i);if(zh.has(r)&&i===-1){const o=e[n+1];o!==void 0&&!o.startsWith("-")&&(n+=1)}continue}t.push(s)}}return t.length===1&&t[0]==="migrate"},Kh=e=>{if(e.length===0)return!1;for(const t of e){const n=t.codePointAt(0)??0;return!(n<=127||n<=255)}return!1};let Yh=class{buffer="";timer;onFlush;timeout;constructor({onFlush:t,timeout:n}){this.onFlush=t,this.timeout=n}add(t){this.buffer+=t,this.timer!==void 0&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.flush()},this.timeout)}flush(){if(this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer.length>0){const t=this.buffer;this.buffer="",this.onFlush(t)}}destroy(){this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer=""}};const Xh={disambiguateEscapeCodes:1,reportAllKeysAsEscapeCodes:8,reportAlternateKeys:4,reportAssociatedText:16,reportEventTypes:2};function la(e){let t=0;for(const n of e)t|=Xh[n];return t}const Xe={alt:2,capsLock:64,ctrl:4,hyper:16,meta:32,numLock:128,shift:1,super:8},Zh="\x1B",ue="\x1B[",Qh=";",da=`${ue}?1049h`,ua=`${ue}?1049l`,Al=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,eg=/^(?:msys|cygwin)$/,Bl=process,gr=Bl?.env??{};!Al&&gr.TERM_PROGRAM;const tg=!Al&&(Bl?.platform==="win32"||gr.OSTYPE!==void 0&&eg.test(gr.OSTYPE)),ng=(e=1)=>`${ue}${String(e)}B`,Yn=`${ue}?25l`,sg=`${ue}G`,ig=(e=1)=>`${ue}${String(e)}G`,rg=(e=1)=>`${ue}${String(e)}E`,Xn=`${ue}?25h`,ri=(e,t)=>t===void 0?ig(e+1):`${ue}${String(t+1)}${Qh}${String(e+1)}H`,Us=(e=1)=>`${ue}${String(e)}A`;var og=(e=>(e[e.Default=0]="Default",e[e.BlinkingBlock=1]="BlinkingBlock",e[e.SteadyBlock=2]="SteadyBlock",e[e.BlinkingUnderline=3]="BlinkingUnderline",e[e.SteadyUnderline=4]="SteadyUnderline",e[e.BlinkingBar=5]="BlinkingBar",e[e.SteadyBar=6]="SteadyBar",e))(og||{});const ag=e=>`${ue}${String(e)} q`;var an=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireScreen=2]="EntireScreen",e[e.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",e))(an||{});const Hn=e=>{const t=e>=0&&e<=3?e:0;return`${ue}${t===0?"":String(t)}J`};var Pl=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireLine=2]="EntireLine",e))(Pl||{});const no=e=>{const t=e>=0&&e<=2?e:0;return`${ue}${t===0?"":String(t)}K`},cg=no(2),lg=no(0),Zn=e=>{if(e<=0)return"";let t="";for(let n=0;n<e;n+=1)t+=cg,n<e-1&&(t+=Us());return t+=sg,t};ri(0,0)+Hn(an.ToEnd);`${no(Pl.EntireLine)}${ue}`;const dg=`${ue}H${Hn(an.EntireScreen)}`;tg?`${Hn(an.EntireScreen)}${ue}`:`${Hn(an.EntireScreen)}${Hn(an.EntireScreenAndScrollback)}${ue}${Zh}`;let ug=class{code;isDecMode=!0;constructor(t){this.code=t}};const Nl=(e,...t)=>{if(t.length===0)return"";const n=e?"l":"h";if(t.length===1){const o=t[0];let a=ue;return o.isDecMode&&(a+="?"),a+String(o.code)+n}const s=t.filter(o=>!o.isDecMode).map(o=>o.code),i=t.filter(o=>o.isDecMode).map(o=>o.code);let r="";return s.length>0&&(r+=`${ue}${s.join(";")}${n}`),i.length>0&&(r+=`${ue}?${i.join(";")}${n}`),r};var pg=(e=>(e[e.NotRecognized=0]="NotRecognized",e[e.Set=1]="Set",e[e.Reset=2]="Reset",e[e.PermanentlySet=3]="PermanentlySet",e[e.PermanentlyReset=4]="PermanentlyReset",e))(pg||{});const Dl=e=>new ug(e),Ll=(...e)=>Nl(!1,...e),Ml=(...e)=>Nl(!0,...e),_l=Dl(2004),fg={aliceblue:"f0f8ff",antiquewhite:"faebd7",antiquewhite1:"ffefdb",antiquewhite2:"eedfcc",antiquewhite3:"cdc0b0",antiquewhite4:"8b8378",aqua:"00ffff",aquamarine:"7fffd4",aquamarine1:"7fffd4",aquamarine2:"76eec6",aquamarine3:"66cdaa",aquamarine4:"458b74",azure:"f0ffff",azure1:"f0ffff",azure2:"e0eeee",azure3:"c1cdcd",azure4:"838b8b",beige:"f5f5dc",bisque:"ffe4c4",bisque1:"ffe4c4",bisque2:"eed5b7",bisque3:"cdb79e",bisque4:"8b7d6b",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blue1:"0000ff",blue2:"0000ee",blue3:"0000cd",blue4:"00008b",blueviolet:"8a2be2",brown:"a52a2a",brown1:"ff4040",brown2:"ee3b3b",brown3:"cd3333",brown4:"8b2323",burlywood:"deb887",burlywood1:"ffd39b",burlywood2:"eec591",burlywood3:"cdaa7d",burlywood4:"8b7355",cadetblue:"5f9ea0",cadetblue1:"98f5ff",cadetblue2:"8ee5ee",cadetblue3:"7ac5cd",cadetblue4:"53868b",chartreuse:"7fff00",chartreuse1:"7fff00",chartreuse2:"76ee00",chartreuse3:"66cd00",chartreuse4:"458b00",chocolate:"d2691e",chocolate1:"ff7f24",chocolate2:"ee7621",chocolate3:"cd661d",chocolate4:"8b4513",coral:"ff7f50",coral1:"ff7256",coral2:"ee6a50",coral3:"cd5b45",coral4:"8b3e2f",cornflowerblue:"6495ed",cornsilk:"fff8dc",cornsilk1:"fff8dc",cornsilk2:"eee8cd",cornsilk3:"cdc8b1",cornsilk4:"8b8878",crimson:"dc143c",cyan:"00ffff",cyan1:"00ffff",cyan2:"00eeee",cyan3:"00cdcd",cyan4:"008b8b",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgoldenrod1:"ffb90f",darkgoldenrod2:"eead0e",darkgoldenrod3:"cd950c",darkgoldenrod4:"8b6508",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkolivegreen1:"caff70",darkolivegreen2:"bcee68",darkolivegreen3:"a2cd5a",darkolivegreen4:"6e8b3d",darkorange:"ff8c00",darkorange1:"ff7f00",darkorange2:"ee7600",darkorange3:"cd6600",darkorange4:"8b4500",darkorchid:"9932cc",darkorchid1:"bf3eff",darkorchid2:"b23aee",darkorchid3:"9a32cd",darkorchid4:"68228b",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkseagreen1:"c1ffc1",darkseagreen2:"b4eeb4",darkseagreen3:"9bcd9b",darkseagreen4:"698b69",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategray1:"97ffff",darkslategray2:"8deeee",darkslategray3:"79cdcd",darkslategray4:"528b8b",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deeppink1:"ff1493",deeppink2:"ee1289",deeppink3:"cd1076",deeppink4:"8b0a50",deepskyblue:"00bfff",deepskyblue1:"00bfff",deepskyblue2:"00b2ee",deepskyblue3:"009acd",deepskyblue4:"00688b",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",dodgerblue1:"1e90ff",dodgerblue2:"1c86ee",dodgerblue3:"1874cd",dodgerblue4:"104e8b",firebrick:"b22222",firebrick1:"ff3030",firebrick2:"ee2c2c",firebrick3:"cd2626",firebrick4:"8b1a1a",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",gold1:"ffd700",gold2:"eec900",gold3:"cdad00",gold4:"8b7500",goldenrod:"daa520",goldenrod1:"ffc125",goldenrod2:"eeb422",goldenrod3:"cd9b1d",goldenrod4:"8b6914",gray:"bebebe",gray0:"000000",gray1:"030303",gray2:"050505",gray3:"080808",gray4:"0a0a0a",gray5:"0d0d0d",gray6:"0f0f0f",gray7:"121212",gray8:"141414",gray9:"171717",gray10:"1a1a1a",gray11:"1c1c1c",gray12:"1f1f1f",gray13:"212121",gray14:"242424",gray15:"262626",gray16:"292929",gray17:"2b2b2b",gray18:"2e2e2e",gray19:"303030",gray20:"333333",gray21:"363636",gray22:"383838",gray23:"3b3b3b",gray24:"3d3d3d",gray25:"404040",gray26:"424242",gray27:"454545",gray28:"474747",gray29:"4a4a4a",gray30:"4d4d4d",gray31:"4f4f4f",gray32:"525252",gray33:"545454",gray34:"575757",gray35:"595959",gray36:"5c5c5c",gray37:"5e5e5e",gray38:"616161",gray39:"636363",gray40:"666666",gray41:"696969",gray42:"6b6b6b",gray43:"6e6e6e",gray44:"707070",gray45:"737373",gray46:"757575",gray47:"787878",gray48:"7a7a7a",gray49:"7d7d7d",gray50:"7f7f7f",gray51:"828282",gray52:"858585",gray53:"878787",gray54:"8a8a8a",gray55:"8c8c8c",gray56:"8f8f8f",gray57:"919191",gray58:"949494",gray59:"969696",gray60:"999999",gray61:"9c9c9c",gray62:"9e9e9e",gray63:"a1a1a1",gray64:"a3a3a3",gray65:"a6a6a6",gray66:"a8a8a8",gray67:"ababab",gray68:"adadad",gray69:"b0b0b0",gray70:"b3b3b3",gray71:"b5b5b5",gray72:"b8b8b8",gray73:"bababa",gray74:"bdbdbd",gray75:"bfbfbf",gray76:"c2c2c2",gray77:"c4c4c4",gray78:"c7c7c7",gray79:"c9c9c9",gray80:"cccccc",gray81:"cfcfcf",gray82:"d1d1d1",gray83:"d4d4d4",gray84:"d6d6d6",gray85:"d9d9d9",gray86:"dbdbdb",gray87:"dedede",gray88:"e0e0e0",gray89:"e3e3e3",gray90:"e5e5e5",gray91:"e8e8e8",gray92:"ebebeb",gray93:"ededed",gray94:"f0f0f0",gray95:"f2f2f2",gray96:"f5f5f5",gray97:"f7f7f7",gray98:"fafafa",gray99:"fcfcfc",gray100:"ffffff",green:"00ff00",green1:"00ff00",green2:"00ee00",green3:"00cd00",green4:"008b00",greenyellow:"adff2f",grey:"bebebe",grey0:"000000",grey1:"030303",grey2:"050505",grey3:"080808",grey4:"0a0a0a",grey5:"0d0d0d",grey6:"0f0f0f",grey7:"121212",grey8:"141414",grey9:"171717",grey10:"1a1a1a",grey11:"1c1c1c",grey12:"1f1f1f",grey13:"212121",grey14:"242424",grey15:"262626",grey16:"292929",grey17:"2b2b2b",grey18:"2e2e2e",grey19:"303030",grey20:"333333",grey21:"363636",grey22:"383838",grey23:"3b3b3b",grey24:"3d3d3d",grey25:"404040",grey26:"424242",grey27:"454545",grey28:"474747",grey29:"4a4a4a",grey30:"4d4d4d",grey31:"4f4f4f",grey32:"525252",grey33:"545454",grey34:"575757",grey35:"595959",grey36:"5c5c5c",grey37:"5e5e5e",grey38:"616161",grey39:"636363",grey40:"666666",grey41:"696969",grey42:"6b6b6b",grey43:"6e6e6e",grey44:"707070",grey45:"737373",grey46:"757575",grey47:"787878",grey48:"7a7a7a",grey49:"7d7d7d",grey50:"7f7f7f",grey51:"828282",grey52:"858585",grey53:"878787",grey54:"8a8a8a",grey55:"8c8c8c",grey56:"8f8f8f",grey57:"919191",grey58:"949494",grey59:"969696",grey60:"999999",grey61:"9c9c9c",grey62:"9e9e9e",grey63:"a1a1a1",grey64:"a3a3a3",grey65:"a6a6a6",grey66:"a8a8a8",grey67:"ababab",grey68:"adadad",grey69:"b0b0b0",grey70:"b3b3b3",grey71:"b5b5b5",grey72:"b8b8b8",grey73:"bababa",grey74:"bdbdbd",grey75:"bfbfbf",grey76:"c2c2c2",grey77:"c4c4c4",grey78:"c7c7c7",grey79:"c9c9c9",grey80:"cccccc",grey81:"cfcfcf",grey82:"d1d1d1",grey83:"d4d4d4",grey84:"d6d6d6",grey85:"d9d9d9",grey86:"dbdbdb",grey87:"dedede",grey88:"e0e0e0",grey89:"e3e3e3",grey90:"e5e5e5",grey91:"e8e8e8",grey92:"ebebeb",grey93:"ededed",grey94:"f0f0f0",grey95:"f2f2f2",grey96:"f5f5f5",grey97:"f7f7f7",grey98:"fafafa",grey99:"fcfcfc",grey100:"ffffff",honeydew:"f0fff0",honeydew1:"f0fff0",honeydew2:"e0eee0",honeydew3:"c1cdc1",honeydew4:"838b83",hotpink:"ff69b4",hotpink1:"ff6eb4",hotpink2:"ee6aa7",hotpink3:"cd6090",hotpink4:"8b3a62",indianred:"cd5c5c",indianred1:"ff6a6a",indianred2:"ee6363",indianred3:"cd5555",indianred4:"8b3a3a",indigo:"4b0082",ivory:"fffff0",ivory1:"fffff0",ivory2:"eeeee0",ivory3:"cdcdc1",ivory4:"8b8b83",khaki:"f0e68c",khaki1:"fff68f",khaki2:"eee685",khaki3:"cdc673",khaki4:"8b864e",lavender:"e6e6fa",lavenderblush:"fff0f5",lavenderblush1:"fff0f5",lavenderblush2:"eee0e5",lavenderblush3:"cdc1c5",lavenderblush4:"8b8386",lawngreen:"7cfc00",lemonchiffon:"fffacd",lemonchiffon1:"fffacd",lemonchiffon2:"eee9bf",lemonchiffon3:"cdc9a5",lemonchiffon4:"8b8970",lightblue:"add8e6",lightblue1:"bfefff",lightblue2:"b2dfee",lightblue3:"9ac0cd",lightblue4:"68838b",lightcoral:"f08080",lightcyan:"e0ffff",lightcyan1:"e0ffff",lightcyan2:"d1eeee",lightcyan3:"b4cdcd",lightcyan4:"7a8b8b",lightgoldenrod:"eedd82",lightgoldenrod1:"ffec8b",lightgoldenrod2:"eedc82",lightgoldenrod3:"cdbe70",lightgoldenrod4:"8b814c",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightpink1:"ffaeb9",lightpink2:"eea2ad",lightpink3:"cd8c95",lightpink4:"8b5f65",lightsalmon:"ffa07a",lightsalmon1:"ffa07a",lightsalmon2:"ee9572",lightsalmon3:"cd8162",lightsalmon4:"8b5742",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightskyblue1:"b0e2ff",lightskyblue2:"a4d3ee",lightskyblue3:"8db6cd",lightskyblue4:"607b8b",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightsteelblue1:"cae1ff",lightsteelblue2:"bcd2ee",lightsteelblue3:"a2b5cd",lightsteelblue4:"6e7b8b",lightyellow:"ffffe0",lightyellow1:"ffffe0",lightyellow2:"eeeed1",lightyellow3:"cdcdb4",lightyellow4:"8b8b7a",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",magenta1:"ff00ff",magenta2:"ee00ee",magenta3:"cd00cd",magenta4:"8b008b",maroon:"b03060",maroon1:"ff34b3",maroon2:"ee30a7",maroon3:"cd2990",maroon4:"8b1c62",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumorchid1:"e066ff",mediumorchid2:"d15fee",mediumorchid3:"b452cd",mediumorchid4:"7a378b",mediumpurple:"9370db",mediumpurple1:"ab82ff",mediumpurple2:"9f79ee",mediumpurple3:"8968cd",mediumpurple4:"5d478b",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",mistyrose1:"ffe4e1",mistyrose2:"eed5d2",mistyrose3:"cdb7b5",mistyrose4:"8b7d7b",moccasin:"ffe4b5",navajowhite:"ffdead",navajowhite1:"ffdead",navajowhite2:"eecfa1",navajowhite3:"cdb38b",navajowhite4:"8b795e",navy:"000080",navyblue:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",olivedrab1:"c0ff3e",olivedrab2:"b3ee3a",olivedrab3:"9acd32",olivedrab4:"698b22",orange:"ffa500",orange1:"ffa500",orange2:"ee9a00",orange3:"cd8500",orange4:"8b5a00",orangered:"ff4500",orangered1:"ff4500",orangered2:"ee4000",orangered3:"cd3700",orangered4:"8b2500",orchid:"da70d6",orchid1:"ff83fa",orchid2:"ee7ae9",orchid3:"cd69c9",orchid4:"8b4789",palegoldenrod:"eee8aa",palegreen:"98fb98",palegreen1:"9aff9a",palegreen2:"90ee90",palegreen3:"7ccd7c",palegreen4:"548b54",paleturquoise:"afeeee",paleturquoise1:"bbffff",paleturquoise2:"aeeeee",paleturquoise3:"96cdcd",paleturquoise4:"668b8b",palevioletred:"db7093",palevioletred1:"ff82ab",palevioletred2:"ee799f",palevioletred3:"cd6889",palevioletred4:"8b475d",papayawhip:"ffefd5",peachpuff:"ffdab9",peachpuff1:"ffdab9",peachpuff2:"eecbad",peachpuff3:"cdaf95",peachpuff4:"8b7765",peru:"cd853f",pink:"ffc0cb",pink1:"ffb5c5",pink2:"eea9b8",pink3:"cd919e",pink4:"8b636c",plum:"dda0dd",plum1:"ffbbff",plum2:"eeaeee",plum3:"cd96cd",plum4:"8b668b",powderblue:"b0e0e6",purple:"a020f0",purple1:"9b30ff",purple2:"912cee",purple3:"7d26cd",purple4:"551a8b",rebeccapurple:"663399",red:"ff0000",red1:"ff0000",red2:"ee0000",red3:"cd0000",red4:"8b0000",rosybrown:"bc8f8f",rosybrown1:"ffc1c1",rosybrown2:"eeb4b4",rosybrown3:"cd9b9b",rosybrown4:"8b6969",royalblue:"4169e1",royalblue1:"4876ff",royalblue2:"436eee",royalblue3:"3a5fcd",royalblue4:"27408b",saddlebrown:"8b4513",salmon:"fa8072",salmon1:"ff8c69",salmon2:"ee8262",salmon3:"cd7054",salmon4:"8b4c39",sandybrown:"f4a460",seagreen:"2e8b57",seagreen1:"54ff9f",seagreen2:"4eee94",seagreen3:"43cd80",seagreen4:"2e8b57",seashell:"fff5ee",seashell1:"fff5ee",seashell2:"eee5de",seashell3:"cdc5bf",seashell4:"8b8682",sienna:"a0522d",sienna1:"ff8247",sienna2:"ee7942",sienna3:"cd6839",sienna4:"8b4726",silver:"c0c0c0",skyblue:"87ceeb",skyblue1:"87ceff",skyblue2:"7ec0ee",skyblue3:"6ca6cd",skyblue4:"4a708b",slateblue:"6a5acd",slateblue1:"836fff",slateblue2:"7a67ee",slateblue3:"6959cd",slateblue4:"473c8b",slategray:"708090",slategray1:"c6e2ff",slategray2:"b9d3ee",slategray3:"9fb6cd",slategray4:"6c7b8b",slategrey:"708090",snow:"fffafa",snow1:"fffafa",snow2:"eee9e9",snow3:"cdc9c9",snow4:"8b8989",springgreen:"00ff7f",springgreen1:"00ff7f",springgreen2:"00ee76",springgreen3:"00cd66",springgreen4:"008b45",steelblue:"4682b4",steelblue1:"63b8ff",steelblue2:"5cacee",steelblue3:"4f94cd",steelblue4:"36648b",tan:"d2b48c",tan1:"ffa54f",tan2:"ee9a49",tan3:"cd853f",tan4:"8b5a2b",teal:"008080",thistle:"d8bfd8",thistle1:"ffe1ff",thistle2:"eed2ee",thistle3:"cdb5cd",thistle4:"8b7b8b",tomato:"ff6347",tomato1:"ff6347",tomato2:"ee5c42",tomato3:"cd4f39",tomato4:"8b3626",turquoise:"40e0d0",turquoise1:"00f5ff",turquoise2:"00e5ee",turquoise3:"00c5cd",turquoise4:"00868b",violet:"ee82ee",violetred:"d02090",violetred1:"ff3e96",violetred2:"ee3a8c",violetred3:"cd3278",violetred4:"8b2252",webgray:"808080",webgreen:"008000",webgrey:"808080",webmaroon:"800000",webpurple:"800080",wheat:"f5deb3",wheat1:"ffe7ba",wheat2:"eed8ae",wheat3:"cdba96",wheat4:"8b7e66",white:"ffffff",whitesmoke:"f5f5f5",x11gray:"bebebe",x11green:"00ff00",x11grey:"bebebe",x11maroon:"b03060",x11purple:"a020f0",yellow:"ffff00",yellow1:"ffff00",yellow2:"eeee00",yellow3:"cdcd00",yellow4:"8b8b00",yellowgreen:"9acd32"},hg=e=>{const t=fg[e.toLowerCase().replaceAll(" ","")];return t===void 0?void 0:`#${t}`},gg=/^rgba?:([\da-f]{1,4})\/([\da-f]{1,4})\/([\da-f]{1,4})(?:\/[\da-f]{1,4})?$/i,mg=/^#((?:[\da-f]{3}){1,4})$/i,Ut=e=>{const t=16**e.length-1;return Math.round(Number.parseInt(e,16)/t*255)},yg=e=>{const t=e.trim(),n=gg.exec(t);if(n)return{b:Ut(n[3]),g:Ut(n[2]),r:Ut(n[1])};const s=t.startsWith("#")?t:hg(t);if(s===void 0)return;const i=mg.exec(s);if(!i)return;const r=i[1],o=r.length/3;return{b:Ut(r.slice(o*2)),g:Ut(r.slice(o,o*2)),r:Ut(r.slice(0,o))}},Fl=k.createContext({renderThrottleMs:0,subscribe(){return{startTime:0,unsubscribe(){}}}});Fl.displayName="InternalAnimationContext";const so=k.createContext({exit(){},suspendTerminal:(()=>Promise.resolve(void 0)),async waitUntilRenderFlush(){}});so.displayName="InternalAppContext";const Vl=k.createContext({setCursorPosition(){}});Vl.displayName="InternalCursorContext";let vg;const bg=e=>(vg??=Ne(import.meta.url))(e),qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wg=e=>{if(typeof qt<"u"&&qt.versions&&qt.versions.node){const[t,n]=qt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return qt.getBuiltinModule(e)}return bg(e)},{existsSync:kg,readFileSync:Sg}=wg("node:fs"),{cwd:xg}=qt,$g=(e,t=2)=>e.replace(/^\t+/gm,n=>" ".repeat(n.length*t)),Eg=(e,t)=>{const n=[],s=e-t,i=e+t;for(let r=s;r<=i;r++)n.push(r);return n},Cg=(e,t,n={})=>{var s;if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");const i=$g(e).split(/\r?\n/);if(!(t>i.length))return Eg(t,(s=n.around)!==null&&s!==void 0?s:3).filter(r=>i[r-1]!==void 0).map(r=>({line:r,value:i[r-1]}))},$i=e=>{if(!e)return e;const t=xg();return e.replace(`file://${t}/`,"").replace(`${t}/`,"")};function Rg({error:e}){const t=nh(e),n=new Map,s=t.map(c=>{const l=!c.methodName&&!c.file?`raw:${c.raw}`:`${$i(c.file)??""}:${c.line}:${c.column}:${c.methodName??""}`,d=n.get(l)??0;return n.set(l,d+1),{key:`${l}#${d}`,trace:c}}),i=t[0],r=$i(i?.file);let o,a=0;if(r&&i?.line&&kg(r)){const c=Sg(r,"utf8");if(o=Cg(c,i.line),o)for(const{line:l}of o)a=Math.max(a,String(l).length)}return v.jsxs(W,{flexDirection:"column",padding:1,children:[v.jsxs(W,{children:[v.jsxs(O,{backgroundColor:"red",color:"white",children:[" ","ERROR"," "]}),v.jsxs(O,{children:[" ",e.message]})]}),i&&r?v.jsx(W,{marginTop:1,children:v.jsxs(O,{dimColor:!0,children:[r,":",i.line,":",i.column]})}):null,i&&o?v.jsx(W,{flexDirection:"column",marginTop:1,children:o.map(({line:c,value:l})=>v.jsxs(W,{children:[v.jsx(W,{width:a+1,children:v.jsxs(O,{"aria-label":c===i.line?`Line ${c}, error`:`Line ${c}`,backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,dimColor:c!==i.line,children:[String(c).padStart(a," "),":"]})}),v.jsx(O,{backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,children:` ${l}`})]},`excerpt-${c}`))}):null,t.length>0?v.jsx(W,{flexDirection:"column",marginTop:1,children:s.map(({key:c,trace:l})=>{const d=$i(l.file)??"";return!l.methodName&&!l.file?v.jsxs(W,{children:[v.jsx(O,{dimColor:!0,children:"- "}),v.jsx(O,{bold:!0,dimColor:!0,children:l.raw})]},c):v.jsxs(W,{children:[v.jsx(O,{dimColor:!0,children:"- "}),v.jsx(O,{bold:!0,dimColor:!0,children:l.methodName??"<anonymous>"}),v.jsxs(O,{"aria-label":`at ${d} line ${l.line} column ${l.column}`,color:"gray",dimColor:!0,children:[" ","(",d,":",l.line,":",l.column,")"]})]},c)})}):null]})}let Og=class extends k.PureComponent{static displayName="InternalErrorBoundary";static getDerivedStateFromError(t){return{error:t}}state={error:void 0};componentDidCatch(t){this.props.onError(t)}render(){return this.state.error?v.jsx(Rg,{error:this.state.error}):this.props.children}};const io=k.createContext({activate(){},activeId:void 0,add(){},deactivate(){},disableFocus(){},enableFocus(){},focus(){},focusNext(){},focusPrevious(){},remove(){}});io.displayName="InternalFocusContext";const jg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Wl,Wl=jg,Hl=k.createContext({stderr:Wl.stderr,write(){}});Hl.displayName="InternalStderrContext";let Tg;const Ig=e=>(Tg??=Ne(import.meta.url))(e),Kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Ul,Ag=e=>{if(typeof Kt<"u"&&Kt.versions&&Kt.versions.node){const[t,n]=Kt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Kt.getBuiltinModule(e)}return Ig(e)},{EventEmitter:Bg}=Ag("node:events"),Ul=Kt,oi=k.createContext({internal_eventEmitter:new Bg,internal_exitOnCtrlC:!0,isRawModeSupported:!1,setBracketedPasteMode(){},setRawMode(){},stdin:Ul.stdin});oi.displayName="InternalStdinContext";const Pg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Gl,Gl=Pg,ro=k.createContext({stdout:Gl.stdout,write(){}});ro.displayName="InternalStdoutContext";const Ng={bar:6,"blinking-bar":5,"blinking-block":1,"blinking-underline":3,block:2,default:0,underline:4},pa=e=>ag(Ng[e]),fa=(e,t)=>e?.x!==t?.x||e?.y!==t?.y,ai=(e,t)=>{if(!t)return"";const n=e-t.y;return(n>0?Us(n):"")+ri(t.x)+Xn},zl=(e,t)=>{if(!t)return"";const n=e-1-t.y;return(n>0?ng(n):"")+ri(0)},Dg=e=>{const t=e.cursorWasShown?Yn:"",n=zl(e.previousLineCount,e.previousCursorPosition),s=ai(e.visibleLineCount,e.cursorPosition);return t+n+s},ha=(e,t,n)=>e?Yn+zl(t,n):"";let Lg;const Mg=e=>(Lg??=Ne(import.meta.url))(e),En=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ci=e=>{if(typeof En<"u"&&En.versions&&En.versions.node){const[t,n]=En.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return En.getBuiltinModule(e)}return Mg(e)},{existsSync:ga}=ci("node:fs"),{createRequire:_g}=ci("node:module"),{dirname:ma,join:bs}=ci("node:path"),{fileURLToPath:Fg}=ci("node:url"),Vg=12,Wg=e=>{const t=_g(e),n=ma(Fg(e));let s=n;for(let i=0;i<Vg;i+=1){if(ga(bs(s,"package.json"))&&ga(bs(s,"index.js")))return t(bs(s,"index.js"));const r=ma(s);if(r===s)break;s=r}return t(bs(n,"..","index.js"))},ws=new WeakMap,Hg=async(e,t)=>(await e,t()),Jl=(e,t)=>{const n=ws.get(e),s=n===void 0?t():Hg(n,t);let i;return i=(async()=>{try{await s}catch{}ws.get(e)===i&&ws.delete(e)})(),ws.set(e,i),s};let Ug=class{constructor(t,n){this.target=t,this.contentRect=n}target;contentRect};function Gg(e,t,n=!1){const s=e.resizeObservers&&e.resizeObservers.size>0;if((s||n)&&e.yogaNode){const i=Math.round(e.yogaNode.getComputedWidth()),r=Math.round(e.yogaNode.getComputedHeight());if(!Number.isNaN(i)&&!Number.isNaN(r)){const o=e.internal_lastMeasuredSize;if((o?.width!==i||o.height!==r)&&(e.internal_lastMeasuredSize={height:r,width:i},s)){const a=new Ug(e,{height:r,width:i});for(const c of e.resizeObservers)t.has(c)||t.set(c,[]),t.get(c).push(a)}}}}let zg;const Jg=e=>(zg??=Ne(import.meta.url))(e),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:at,oo=e=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[t,n]=Yt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Yt.getBuiltinModule(e)}return Jg(e)},at=Yt,{execFileSync:qg}=oo("node:child_process"),Pn=oo("node:fs"),Kg=oo("node:tty"),ql=80,Kl=24,mr=(e,t,{shell:n,env:s}={})=>qg(e,t,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:n,env:s}).trim(),Bs=(e,t)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(t,10)}),Yl=(e,t)=>{const{columns:n,rows:s}=Bs(e,t);if(!(Number.isNaN(n)||Number.isNaN(s))&&!(n===ql&&s===Kl))return{columns:n,rows:s}},Yg=()=>{if(at.platform!=="linux")return!0;try{const e=Pn.readFileSync("/proc/self/stat","utf8"),t=e.lastIndexOf(") ");if(t===-1)return!1;const n=e.slice(t+2).trim().split(/\s+/),s=Number.parseInt(n[2],10),i=Number.parseInt(n[5],10);return Number.isNaN(s)||Number.isNaN(i)||i<=0?!1:s===i}catch{return!1}};function Xg(){const{env:e,stdout:t,stderr:n}=at;if(t?.columns&&t?.rows)return Bs(t.columns,t.rows);if(n?.columns&&n?.rows)return Bs(n.columns,n.rows);if(e.COLUMNS&&e.LINES)return Bs(e.COLUMNS,e.LINES);const s={columns:ql,rows:Kl};return at.platform==="win32"?Ei()??s:at.platform==="darwin"?ya()??Ei()??s:ya()??Ei()??Zg()??s}const ya=()=>{try{const e=at.platform==="darwin"?Pn.constants.O_EVTONLY|Pn.constants.O_NONBLOCK:Pn.constants.O_NONBLOCK,{columns:t,rows:n}=Kg.WriteStream(Pn.openSync("/dev/tty",e));return{columns:t,rows:n}}catch{}},Ei=()=>{try{const e=mr("tput",["cols"],{env:{TERM:"dumb",...at.env}}),t=mr("tput",["lines"],{env:{TERM:"dumb",...at.env}});if(e&&t)return Yl(e,t)}catch{}},Zg=()=>{try{if(!Yg())return;const e=mr("resize",["-u"]).match(/\d+/g);if(e.length===2)return Yl(e[0],e[1])}catch{}},tt=e=>{const{columns:t,rows:n}=e;if(t&&n)return{columns:t,rows:n};const s=Xg();return{columns:t||s.columns||80,rows:n||s.rows||24}};let Qg;const em=e=>(Qg??=Ne(import.meta.url))(e),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,li=e=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[t,n]=Xt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xt.getBuiltinModule(e)}return em(e)},Te=Xt,{env:Ci}=Te,{PassThrough:va,Stream:tm}=li("node:stream"),{Buffer:ba}=li("node:buffer"),{Console:nm}=li("node:console"),{EventEmitter:sm}=li("node:events"),wa=e=>e in Ci&&Ci[e]!=="0"&&Ci[e]!=="false",Xl=wa("CI")||wa("CONTINUOUS_INTEGRATION"),ka=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];let Ri={};const im=e=>{const t=new va,n=new va;t.write=i=>{e("stdout",i)},n.write=i=>{e("stderr",i)};const s=new console.Console(t,n);for(const i of ka)Ri[i]=console[i],console[i]=s[i];return()=>{for(const i of ka)console[i]=Ri[i];Ri={}}},cn=[];cn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&cn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&cn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Ps=e=>!!e&&!0&&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",Oi=Symbol.for("signal-exit emitter"),ji=globalThis,rm=Object.defineProperty.bind(Object);class om{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ji[Oi])return ji[Oi];rm(ji,Oi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){const s=this.listeners[t],i=s.indexOf(n);i!==-1&&(i===0&&s.length===1?s.length=0:s.splice(i,1))}emit(t,n,s){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(const r of this.listeners[t])i=r(n,s)===!0||i;return t==="exit"&&(i=this.emit("afterExit",n,s)||i),i}}let Zl=class{};const am=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});class cm extends Zl{onExit(){return()=>{}}load(){}unload(){}}class lm extends Zl{#e=yr.platform==="win32"?"SIGINT":"SIGHUP";#t=new om;#n;#r;#s;#i={};#o=!1;constructor(t){super(),this.#n=t,this.#i={};for(const n of cn)this.#i[n]=()=>{const s=this.#n.listeners(n);let{count:i}=this.#t;const r=t;if(typeof r.__signal_exit_emitter__=="object"&&typeof r.__signal_exit_emitter__.count=="number"&&(i+=r.__signal_exit_emitter__.count),s.length===i){this.unload();const o=this.#t.emit("exit",null,n),a=n==="SIGHUP"?this.#e:n;o||t.kill(t.pid,a)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,n){if(!Ps(this.#n))return()=>{};this.#o===!1&&this.load();const s=n?.alwaysLast?"afterExit":"exit";return this.#t.on(s,t),()=>{this.#t.removeListener(s,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const t of cn)try{const n=this.#i[t];n&&this.#n.on(t,n)}catch{}this.#n.emit=(t,...n)=>this.#c(t,...n),this.#n.reallyExit=t=>this.#a(t)}}unload(){this.#o&&(this.#o=!1,cn.forEach(t=>{const n=this.#i[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#n.removeListener(t,n)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#a(t){return Ps(this.#n)?(this.#n.exitCode=t||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#c(t,...n){const s=this.#r;if(t==="exit"&&Ps(this.#n)){typeof n[0]=="number"&&(this.#n.exitCode=n[0]);const i=s.call(this.#n,t,...n);return this.#t.emit("exit",this.#n.exitCode,null),i}else return s.call(this.#n,t,...n)}}const yr=globalThis.process,{onExit:dm}=am(Ps(yr)?new lm(yr):new cm),Gs="\x1B",Ql="\x1B[200~",Sa="\x1B[201~",um=e=>e>=48&&e<=63,pm=e=>e>=32&&e<=47,ed=e=>e>=64&&e<=126,fm=(e,t,n)=>{const s=t+n+1;let i=s;for(;i<e.length;i++){const r=e.codePointAt(i);if(r===void 0)return"pending";if(!(um(r)||pm(r))&&!(r===91&&i===s))return ed(r)?{nextIndex:i+1,sequence:e.slice(t,i+1)}:void 0}return"pending"},hm=(e,t,n)=>{const s=t+n+2;if(s>e.length)return"pending";const i=e.codePointAt(s-1);if(!(i===void 0||!ed(i)))return{nextIndex:s,sequence:e.slice(t,s)}},xa=(e,t,n)=>{const s=e[t+n];if(s===void 0)return"pending";if(s==="[")return fm(e,t,n);if(s==="O")return hm(e,t,n)},gm=(e,t)=>{const n=e.codePointAt(t+1),s=n!==void 0&&n>65535?2:1,i=t+1+s;return{nextIndex:i,sequence:e.slice(t,i)}},mm=(e,t)=>{if(t===e.length-1)return"pending";if(e[t+1]===Gs){if(t+2>=e.length)return"pending";const s=xa(e,t,2);return s==="pending"?"pending":s||{nextIndex:t+2,sequence:e.slice(t,t+2)}}const n=xa(e,t,1);return n==="pending"?"pending":n||gm(e,t)},$a=(e,t)=>{let n=0;for(let s=0;s<e.length;s++){const i=e[s];(i===""||i==="\b")&&(s>n&&t.push(e.slice(n,s)),t.push(i),n=s+1)}n<e.length&&t.push(e.slice(n))},ym=e=>{const t=[];let n=0;const s=i=>({events:t,pending:e.slice(i)});for(;n<e.length;){const i=e.indexOf(Gs,n);if(i===-1)return $a(e.slice(n),t),{events:t,pending:""};i>n&&$a(e.slice(n,i),t);const r=mm(e,i);if(r==="pending")return s(i);if(r.sequence===Ql){const o=r.nextIndex,a=e.indexOf(Sa,o);if(a===-1)return s(i);t.push({paste:e.slice(o,a)}),n=a+Sa.length;continue}t.push(r.sequence),n=r.nextIndex}return{events:t,pending:""}},vm=()=>{let e="";return{flushPendingEscape(){if(!e.startsWith(Gs))return;const t=e;return e="",t},hasPendingEscape(){return e.startsWith(Gs)&&!e.startsWith(Ql)&&e!=="\x1B[200"},push(t){const n=ym(e+t);return e=n.pending,n.events},reset(){e=""}}},bm=" ",wm="\x1B[Z",km="\x1B",Ea=Ll(_l),Ti=Ml(_l),td=({children:e,exitOnCtrlC:t,interactive:n,onExit:s,onRegisterInputControl:i,onSuspendTerminal:r,onWaitUntilRenderFlush:o,renderThrottleMs:a,setCursorPosition:c,stderr:l,stdin:d,stdout:u,writeToStderr:p,writeToStdout:f})=>{const[h,g]=k.useState(!0),[y,x]=k.useState(void 0),[,b]=k.useState([]),S=k.useRef(0),C=k.useRef([]),N=k.useRef(new Map),T=k.useRef(void 0),D=k.useRef(0),F=k.useRef(!1),V=k.useRef(0),[Z]=k.useState(()=>{const L=new sm;return L.setMaxListeners(1/0),L}),re=k.useRef(void 0),te=k.useRef(void 0);te.current??=vm();const ne=k.useRef(void 0),ie=k.useRef(!1),M=20,w=k.useCallback(()=>{ne.current&&(clearTimeout(ne.current),ne.current=void 0)},[]),A=k.useCallback(()=>{T.current&&(clearTimeout(T.current),T.current=void 0)},[]),U=k.useCallback(()=>{if(A(),N.current.size===0)return;let L=Number.POSITIVE_INFINITY;for(const X of N.current.values())L=Math.min(L,X.nextDueTime);const Q=Math.max(0,L-performance.now());T.current=setTimeout(()=>{T.current=void 0;const X=performance.now(),pe=[...N.current.values()];for(const $e of pe){if(X<$e.nextDueTime)continue;$e.callback(X);const $f=X-$e.startTime,Ef=Math.floor($f/$e.interval)+1;$e.nextDueTime=$e.startTime+Ef*$e.interval}U()},Q)},[A]),I=k.useCallback((L,Q)=>{const X=performance.now();return N.current.set(L,{callback:L,interval:Q,nextDueTime:X+Q,startTime:X}),U(),{startTime:X,unsubscribe(){if(N.current.delete(L),N.current.size===0){A();return}U()}}},[A,U]);k.useEffect(()=>()=>{A()},[A]);const B=d.isTTY,j=k.useCallback(()=>{re.current&&(d.removeListener("readable",re.current),re.current=void 0)},[d]),_=k.useCallback(()=>{te.current?.reset(),w(),j()},[w,j]),H=k.useCallback(()=>{F.current=!1,d.setRawMode(!1),d.unref(),D.current=0,_()},[d,_]),z=k.useCallback(L=>{B&&(D.current>0||F.current)&&H(),s(L)},[B,H,s]),Y=k.useCallback(L=>{if(L.includes("")&&t){z();return}L===km&&h&&x(Q=>{if(!Q)return Q})},[t,z,h]),P=k.useCallback(L=>{Y(L),Z.emit("input",L)},[Y,Z]),K=k.useCallback(()=>{w(),ne.current=setTimeout(()=>{ne.current=void 0;const L=te.current.flushPendingEscape();L&&P(L)},M)},[w,P]),ae=k.useCallback(()=>{w();let L;for(;(L=d.read())!==null;){const Q=te.current.push(L);for(const X of Q)if(typeof X=="string")P(X);else{if(Z.listenerCount("paste")===0){ie.current||(ie.current=!0,p(`Warning: useInput() received bracketed paste because no usePaste() handler is active. This fallback is deprecated and will be removed in the next major version. Migrate paste handling to usePaste().
|
|
1
|
+
import{createRequire as Cf}from"node:module";import{n as jf,b as R,d as Tf,a as If,x as Af,r as Bf,i as Pf}from"../packem_shared/vis-user-error-DJvfOpBX.js";import{k as gl,e as m,h as ar,m as it,z as J,v as eo,l as At,a as as,b as Nf,U as un}from"../packem_shared/index-DHD8wb6Z.js";import{N as ml,p as de}from"../packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js";import{u as k,y as v,X as W,m as O,S as Df,U as Xo,V as Ee,W as Lf,Y as Mf,Z as Ue,_ as _f,$ as Ff,a0 as Vf,a1 as Wf,a2 as Hf,a3 as Uf,a4 as Gf,a5 as zf,z as yl,F as Ye,d as Jf,a6 as qf,j as Zo,i as Kf,x as Yf,p as cr,D as Qo,R as Xf,c as Zf,h as Qf,a7 as lr,a8 as dr,a9 as eh,aa as th}from"./catalog.js";import{parseStacktrace as nh}from"@visulima/error/stacktrace";import{i as ut}from"../packem_shared/index-BjdW45xX.js";import{y as $}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{U as ye,h as mt}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";import{findVisConfigFile as _t,loadVisConfig as ta}from"./CONFIG_FILES.js";import{S as lh}from"../packem_shared/index-BisalDCf.js";import{T as dh}from"../packem_shared/target-merge-B4No-LHM.js";import{s as uh}from"../packem_shared/bin-As0Wq5ZN.js";import{X as xi,j as Le,b as Bn,q as et,F as rn,T as ph,t as ii,J as fh}from"../packem_shared/index.server-BAjDJSEu.js";import{s as pr}from"../packem_shared/index-B4AjSxHU.js";import{g as Ws}from"../packem_shared/package-version-BFsJ8iyZ.js";import{l as yt,k as na,ad as yh,ae as xl,g as vh,d as vt,af as fr,ag as bh,$ as Kn,c as Wn,ah as $l}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{d as sa}from"../packem_shared/pm-runner-d93_73O6.js";import{m as wh}from"./ts-loader.js";import{getMainWorktreeRoot as kh,Cache as Hs,readLastRunSummary as El,getLastRunSummaryPath as hr,parseCacheSize as Sh,digestFile as Cl}from"@visulima/task-runner";import{e as Ih}from"../packem_shared/index-CcVv0V1y.js";let Rf;const Of=e=>(Rf??=Cf(import.meta.url))(e),Sn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ce=e=>{if(typeof Sn<"u"&&Sn.versions&&Sn.versions.node){const[t,n]=Sn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Sn.getBuiltinModule(e)}return Of(e)},{createRequire:Ne}=Ce("node:module"),{spawnSync:ot,execSync:vl,execFileSync:sh,execFile:ih}=Ce("node:child_process"),{writeFileSync:ce,existsSync:ur,renameSync:bl,readFileSync:wl,readdirSync:we,statSync:Bt,rmSync:pn,copyFileSync:rh,unlinkSync:gt,mkdirSync:oh,cpSync:ah,watch:ch}=Ce("node:fs"),{dirname:kl,delimiter:ea,resolve:Vs}=Ce("node:path"),{createInterface:Sl}=Ce("node:readline"),{homedir:hh,platform:gh,tmpdir:mh}=Ce("node:os"),{readFile:Rl,readdir:cs,stat:mn,realpath:ia,rm:to,mkdtemp:xh,mkdir:$h}=Ce("node:fs/promises"),{isIP:Eh}=Ce("node:net"),{createServer:Ch,STATUS_CODES:Rh}=Ce("node:http"),{Http2ServerRequest:on,constants:Oh}=Ce("node:http2"),{Readable:ra}=Ce("node:stream"),{randomUUID:jh}=Ce("node:crypto"),{fileURLToPath:Th}=Ce("node:url"),Ah=["pnpm-lock.yaml","package-lock.json","npm-shrinkwrap.json","yarn.lock","bun.lock","bun.lockb"];let Bh;const Ph=e=>(Bh??=Ne(import.meta.url))(e),xn=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ol=e=>{if(typeof xn<"u"&&xn.versions&&xn.versions.node){const[t,n]=xn.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return xn.getBuiltinModule(e)}return Ph(e)},{execFileSync:Nh}=Ol("node:child_process"),{existsSync:oa,readFileSync:Dh}=Ol("node:fs"),Lh=[...Ah],aa=new Set(["bun","npm","pnpm","yarn"]),jl=e=>{const t=ml(Dh(e,"utf8"));return typeof t?.packageManager=="string"?t.packageManager:void 0},Mh=e=>{let t;if(Lh.forEach(s=>{!t&&oa(m(e,s))&&(t=m(e,s))}),t)return t;const n=m(e,"package.json");if(oa(n)&&jl(n)!==void 0)return n},_h=e=>{if(!e)throw new ar("Could not find a package manager");if(e.endsWith("package.json")){const t=jl(e);if(t){const n=["npm","yarn","pnpm","bun"].find(s=>t.startsWith(s));if(n)return{packageManager:n,path:it(e)}}}if(e.endsWith("yarn.lock"))return{packageManager:"yarn",path:it(e)};if(e.endsWith("package-lock.json")||e.endsWith("npm-shrinkwrap.json"))return{packageManager:"npm",path:it(e)};if(e.endsWith("pnpm-lock.yaml"))return{packageManager:"pnpm",path:it(e)};if(e.endsWith("bun.lock")||e.endsWith("bun.lockb"))return{packageManager:"bun",path:it(e)};throw new ar("Could not find a package manager")},Fh=e=>{const t=gl(Mh,{...e&&{cwd:e}});return _h(t)},r4=e=>{if(!aa.has(e))throw new Error(`Unsupported package manager "${e}". Expected one of: ${[...aa].join(", ")}.`);return Nh(e,["--version"]).toString("utf8").trim()};let Vh;const Wh=e=>(Vh??=Ne(import.meta.url))(e),$n=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Hh=e=>{if(typeof $n<"u"&&$n.versions&&$n.versions.node){const[t,n]=$n.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return $n.getBuiltinModule(e)}return Wh(e)},{existsSync:ca,readFileSync:Uh}=Hh("node:fs"),Gh=e=>{let t;try{t=ml(e)}catch{return!1}if(!t||typeof t!="object"||Array.isArray(t))return!1;const{workspaces:n}=t;return typeof n=="object"&&n!==null},Tl=e=>{const t=gl(["lerna.json","turbo.json"],{type:"file",...e&&{cwd:e}});if(t?.endsWith("lerna.json")){const s=de(t);if(s&&typeof s=="object"&&!Array.isArray(s)){const i=s;if(i.useWorkspaces||i.packages)return{path:it(t),strategy:"lerna"}}}const n=t?.endsWith("turbo.json");try{const{packageManager:s,path:i}=Fh(e);if(["npm","yarn"].includes(s)){const r=m(i,"package.json");if(ca(r)){const o=Uh(m(i,"package.json"),"utf8");if(Gh(o))return{path:i,strategy:n?"turbo":s}}}else if(s==="pnpm"){const r=m(i,"pnpm-workspace.yaml");if(ca(r))return{path:i,strategy:n?"turbo":"pnpm"}}}catch(s){if(!(s instanceof ar))throw s}throw new Error(`No monorepo root could be found upwards from the directory ${String(e??process.cwd())} using lerna, yarn, pnpm, or npm as indicators.`)};function Il(e,t,n,s){let i,r,o;r=n,o=s;const a=lh(t,r,o??i);ye(e,a,i)}const G=(e,t)=>async()=>({default:(await e())[t]}),zh=new Set(["--cwd"]),Jh=new Set(["--help","--version","-h","-V"]),qh=e=>{const t=[];for(let n=0;n<e.length;n+=1){const s=e[n];if(s!==void 0){if(Jh.has(s))return!1;if(s.startsWith("-")){const i=s.indexOf("="),r=i===-1?s:s.slice(0,i);if(zh.has(r)&&i===-1){const o=e[n+1];o!==void 0&&!o.startsWith("-")&&(n+=1)}continue}t.push(s)}}return t.length===1&&t[0]==="migrate"},Kh=e=>{if(e.length===0)return!1;for(const t of e){const n=t.codePointAt(0)??0;return!(n<=127||n<=255)}return!1};let Yh=class{buffer="";timer;onFlush;timeout;constructor({onFlush:t,timeout:n}){this.onFlush=t,this.timeout=n}add(t){this.buffer+=t,this.timer!==void 0&&clearTimeout(this.timer),this.timer=setTimeout(()=>{this.flush()},this.timeout)}flush(){if(this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer.length>0){const t=this.buffer;this.buffer="",this.onFlush(t)}}destroy(){this.timer!==void 0&&(clearTimeout(this.timer),this.timer=void 0),this.buffer=""}};const Xh={disambiguateEscapeCodes:1,reportAllKeysAsEscapeCodes:8,reportAlternateKeys:4,reportAssociatedText:16,reportEventTypes:2};function la(e){let t=0;for(const n of e)t|=Xh[n];return t}const Xe={alt:2,capsLock:64,ctrl:4,hyper:16,meta:32,numLock:128,shift:1,super:8},Zh="\x1B",ue="\x1B[",Qh=";",da=`${ue}?1049h`,ua=`${ue}?1049l`,Al=typeof globalThis<"u"&&typeof globalThis.window=="object"&&globalThis.window.document!==void 0,eg=/^(?:msys|cygwin)$/,Bl=process,gr=Bl?.env??{};!Al&&gr.TERM_PROGRAM;const tg=!Al&&(Bl?.platform==="win32"||gr.OSTYPE!==void 0&&eg.test(gr.OSTYPE)),ng=(e=1)=>`${ue}${String(e)}B`,Yn=`${ue}?25l`,sg=`${ue}G`,ig=(e=1)=>`${ue}${String(e)}G`,rg=(e=1)=>`${ue}${String(e)}E`,Xn=`${ue}?25h`,ri=(e,t)=>t===void 0?ig(e+1):`${ue}${String(t+1)}${Qh}${String(e+1)}H`,Us=(e=1)=>`${ue}${String(e)}A`;var og=(e=>(e[e.Default=0]="Default",e[e.BlinkingBlock=1]="BlinkingBlock",e[e.SteadyBlock=2]="SteadyBlock",e[e.BlinkingUnderline=3]="BlinkingUnderline",e[e.SteadyUnderline=4]="SteadyUnderline",e[e.BlinkingBar=5]="BlinkingBar",e[e.SteadyBar=6]="SteadyBar",e))(og||{});const ag=e=>`${ue}${String(e)} q`;var an=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireScreen=2]="EntireScreen",e[e.EntireScreenAndScrollback=3]="EntireScreenAndScrollback",e))(an||{});const Hn=e=>{const t=e>=0&&e<=3?e:0;return`${ue}${t===0?"":String(t)}J`};var Pl=(e=>(e[e.ToEnd=0]="ToEnd",e[e.ToBeginning=1]="ToBeginning",e[e.EntireLine=2]="EntireLine",e))(Pl||{});const no=e=>{const t=e>=0&&e<=2?e:0;return`${ue}${t===0?"":String(t)}K`},cg=no(2),lg=no(0),Zn=e=>{if(e<=0)return"";let t="";for(let n=0;n<e;n+=1)t+=cg,n<e-1&&(t+=Us());return t+=sg,t};ri(0,0)+Hn(an.ToEnd);`${no(Pl.EntireLine)}${ue}`;const dg=`${ue}H${Hn(an.EntireScreen)}`;tg?`${Hn(an.EntireScreen)}${ue}`:`${Hn(an.EntireScreen)}${Hn(an.EntireScreenAndScrollback)}${ue}${Zh}`;let ug=class{code;isDecMode=!0;constructor(t){this.code=t}};const Nl=(e,...t)=>{if(t.length===0)return"";const n=e?"l":"h";if(t.length===1){const o=t[0];let a=ue;return o.isDecMode&&(a+="?"),a+String(o.code)+n}const s=t.filter(o=>!o.isDecMode).map(o=>o.code),i=t.filter(o=>o.isDecMode).map(o=>o.code);let r="";return s.length>0&&(r+=`${ue}${s.join(";")}${n}`),i.length>0&&(r+=`${ue}?${i.join(";")}${n}`),r};var pg=(e=>(e[e.NotRecognized=0]="NotRecognized",e[e.Set=1]="Set",e[e.Reset=2]="Reset",e[e.PermanentlySet=3]="PermanentlySet",e[e.PermanentlyReset=4]="PermanentlyReset",e))(pg||{});const Dl=e=>new ug(e),Ll=(...e)=>Nl(!1,...e),Ml=(...e)=>Nl(!0,...e),_l=Dl(2004),fg={aliceblue:"f0f8ff",antiquewhite:"faebd7",antiquewhite1:"ffefdb",antiquewhite2:"eedfcc",antiquewhite3:"cdc0b0",antiquewhite4:"8b8378",aqua:"00ffff",aquamarine:"7fffd4",aquamarine1:"7fffd4",aquamarine2:"76eec6",aquamarine3:"66cdaa",aquamarine4:"458b74",azure:"f0ffff",azure1:"f0ffff",azure2:"e0eeee",azure3:"c1cdcd",azure4:"838b8b",beige:"f5f5dc",bisque:"ffe4c4",bisque1:"ffe4c4",bisque2:"eed5b7",bisque3:"cdb79e",bisque4:"8b7d6b",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blue1:"0000ff",blue2:"0000ee",blue3:"0000cd",blue4:"00008b",blueviolet:"8a2be2",brown:"a52a2a",brown1:"ff4040",brown2:"ee3b3b",brown3:"cd3333",brown4:"8b2323",burlywood:"deb887",burlywood1:"ffd39b",burlywood2:"eec591",burlywood3:"cdaa7d",burlywood4:"8b7355",cadetblue:"5f9ea0",cadetblue1:"98f5ff",cadetblue2:"8ee5ee",cadetblue3:"7ac5cd",cadetblue4:"53868b",chartreuse:"7fff00",chartreuse1:"7fff00",chartreuse2:"76ee00",chartreuse3:"66cd00",chartreuse4:"458b00",chocolate:"d2691e",chocolate1:"ff7f24",chocolate2:"ee7621",chocolate3:"cd661d",chocolate4:"8b4513",coral:"ff7f50",coral1:"ff7256",coral2:"ee6a50",coral3:"cd5b45",coral4:"8b3e2f",cornflowerblue:"6495ed",cornsilk:"fff8dc",cornsilk1:"fff8dc",cornsilk2:"eee8cd",cornsilk3:"cdc8b1",cornsilk4:"8b8878",crimson:"dc143c",cyan:"00ffff",cyan1:"00ffff",cyan2:"00eeee",cyan3:"00cdcd",cyan4:"008b8b",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgoldenrod1:"ffb90f",darkgoldenrod2:"eead0e",darkgoldenrod3:"cd950c",darkgoldenrod4:"8b6508",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkolivegreen1:"caff70",darkolivegreen2:"bcee68",darkolivegreen3:"a2cd5a",darkolivegreen4:"6e8b3d",darkorange:"ff8c00",darkorange1:"ff7f00",darkorange2:"ee7600",darkorange3:"cd6600",darkorange4:"8b4500",darkorchid:"9932cc",darkorchid1:"bf3eff",darkorchid2:"b23aee",darkorchid3:"9a32cd",darkorchid4:"68228b",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkseagreen1:"c1ffc1",darkseagreen2:"b4eeb4",darkseagreen3:"9bcd9b",darkseagreen4:"698b69",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategray1:"97ffff",darkslategray2:"8deeee",darkslategray3:"79cdcd",darkslategray4:"528b8b",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deeppink1:"ff1493",deeppink2:"ee1289",deeppink3:"cd1076",deeppink4:"8b0a50",deepskyblue:"00bfff",deepskyblue1:"00bfff",deepskyblue2:"00b2ee",deepskyblue3:"009acd",deepskyblue4:"00688b",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",dodgerblue1:"1e90ff",dodgerblue2:"1c86ee",dodgerblue3:"1874cd",dodgerblue4:"104e8b",firebrick:"b22222",firebrick1:"ff3030",firebrick2:"ee2c2c",firebrick3:"cd2626",firebrick4:"8b1a1a",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",gold1:"ffd700",gold2:"eec900",gold3:"cdad00",gold4:"8b7500",goldenrod:"daa520",goldenrod1:"ffc125",goldenrod2:"eeb422",goldenrod3:"cd9b1d",goldenrod4:"8b6914",gray:"bebebe",gray0:"000000",gray1:"030303",gray2:"050505",gray3:"080808",gray4:"0a0a0a",gray5:"0d0d0d",gray6:"0f0f0f",gray7:"121212",gray8:"141414",gray9:"171717",gray10:"1a1a1a",gray11:"1c1c1c",gray12:"1f1f1f",gray13:"212121",gray14:"242424",gray15:"262626",gray16:"292929",gray17:"2b2b2b",gray18:"2e2e2e",gray19:"303030",gray20:"333333",gray21:"363636",gray22:"383838",gray23:"3b3b3b",gray24:"3d3d3d",gray25:"404040",gray26:"424242",gray27:"454545",gray28:"474747",gray29:"4a4a4a",gray30:"4d4d4d",gray31:"4f4f4f",gray32:"525252",gray33:"545454",gray34:"575757",gray35:"595959",gray36:"5c5c5c",gray37:"5e5e5e",gray38:"616161",gray39:"636363",gray40:"666666",gray41:"696969",gray42:"6b6b6b",gray43:"6e6e6e",gray44:"707070",gray45:"737373",gray46:"757575",gray47:"787878",gray48:"7a7a7a",gray49:"7d7d7d",gray50:"7f7f7f",gray51:"828282",gray52:"858585",gray53:"878787",gray54:"8a8a8a",gray55:"8c8c8c",gray56:"8f8f8f",gray57:"919191",gray58:"949494",gray59:"969696",gray60:"999999",gray61:"9c9c9c",gray62:"9e9e9e",gray63:"a1a1a1",gray64:"a3a3a3",gray65:"a6a6a6",gray66:"a8a8a8",gray67:"ababab",gray68:"adadad",gray69:"b0b0b0",gray70:"b3b3b3",gray71:"b5b5b5",gray72:"b8b8b8",gray73:"bababa",gray74:"bdbdbd",gray75:"bfbfbf",gray76:"c2c2c2",gray77:"c4c4c4",gray78:"c7c7c7",gray79:"c9c9c9",gray80:"cccccc",gray81:"cfcfcf",gray82:"d1d1d1",gray83:"d4d4d4",gray84:"d6d6d6",gray85:"d9d9d9",gray86:"dbdbdb",gray87:"dedede",gray88:"e0e0e0",gray89:"e3e3e3",gray90:"e5e5e5",gray91:"e8e8e8",gray92:"ebebeb",gray93:"ededed",gray94:"f0f0f0",gray95:"f2f2f2",gray96:"f5f5f5",gray97:"f7f7f7",gray98:"fafafa",gray99:"fcfcfc",gray100:"ffffff",green:"00ff00",green1:"00ff00",green2:"00ee00",green3:"00cd00",green4:"008b00",greenyellow:"adff2f",grey:"bebebe",grey0:"000000",grey1:"030303",grey2:"050505",grey3:"080808",grey4:"0a0a0a",grey5:"0d0d0d",grey6:"0f0f0f",grey7:"121212",grey8:"141414",grey9:"171717",grey10:"1a1a1a",grey11:"1c1c1c",grey12:"1f1f1f",grey13:"212121",grey14:"242424",grey15:"262626",grey16:"292929",grey17:"2b2b2b",grey18:"2e2e2e",grey19:"303030",grey20:"333333",grey21:"363636",grey22:"383838",grey23:"3b3b3b",grey24:"3d3d3d",grey25:"404040",grey26:"424242",grey27:"454545",grey28:"474747",grey29:"4a4a4a",grey30:"4d4d4d",grey31:"4f4f4f",grey32:"525252",grey33:"545454",grey34:"575757",grey35:"595959",grey36:"5c5c5c",grey37:"5e5e5e",grey38:"616161",grey39:"636363",grey40:"666666",grey41:"696969",grey42:"6b6b6b",grey43:"6e6e6e",grey44:"707070",grey45:"737373",grey46:"757575",grey47:"787878",grey48:"7a7a7a",grey49:"7d7d7d",grey50:"7f7f7f",grey51:"828282",grey52:"858585",grey53:"878787",grey54:"8a8a8a",grey55:"8c8c8c",grey56:"8f8f8f",grey57:"919191",grey58:"949494",grey59:"969696",grey60:"999999",grey61:"9c9c9c",grey62:"9e9e9e",grey63:"a1a1a1",grey64:"a3a3a3",grey65:"a6a6a6",grey66:"a8a8a8",grey67:"ababab",grey68:"adadad",grey69:"b0b0b0",grey70:"b3b3b3",grey71:"b5b5b5",grey72:"b8b8b8",grey73:"bababa",grey74:"bdbdbd",grey75:"bfbfbf",grey76:"c2c2c2",grey77:"c4c4c4",grey78:"c7c7c7",grey79:"c9c9c9",grey80:"cccccc",grey81:"cfcfcf",grey82:"d1d1d1",grey83:"d4d4d4",grey84:"d6d6d6",grey85:"d9d9d9",grey86:"dbdbdb",grey87:"dedede",grey88:"e0e0e0",grey89:"e3e3e3",grey90:"e5e5e5",grey91:"e8e8e8",grey92:"ebebeb",grey93:"ededed",grey94:"f0f0f0",grey95:"f2f2f2",grey96:"f5f5f5",grey97:"f7f7f7",grey98:"fafafa",grey99:"fcfcfc",grey100:"ffffff",honeydew:"f0fff0",honeydew1:"f0fff0",honeydew2:"e0eee0",honeydew3:"c1cdc1",honeydew4:"838b83",hotpink:"ff69b4",hotpink1:"ff6eb4",hotpink2:"ee6aa7",hotpink3:"cd6090",hotpink4:"8b3a62",indianred:"cd5c5c",indianred1:"ff6a6a",indianred2:"ee6363",indianred3:"cd5555",indianred4:"8b3a3a",indigo:"4b0082",ivory:"fffff0",ivory1:"fffff0",ivory2:"eeeee0",ivory3:"cdcdc1",ivory4:"8b8b83",khaki:"f0e68c",khaki1:"fff68f",khaki2:"eee685",khaki3:"cdc673",khaki4:"8b864e",lavender:"e6e6fa",lavenderblush:"fff0f5",lavenderblush1:"fff0f5",lavenderblush2:"eee0e5",lavenderblush3:"cdc1c5",lavenderblush4:"8b8386",lawngreen:"7cfc00",lemonchiffon:"fffacd",lemonchiffon1:"fffacd",lemonchiffon2:"eee9bf",lemonchiffon3:"cdc9a5",lemonchiffon4:"8b8970",lightblue:"add8e6",lightblue1:"bfefff",lightblue2:"b2dfee",lightblue3:"9ac0cd",lightblue4:"68838b",lightcoral:"f08080",lightcyan:"e0ffff",lightcyan1:"e0ffff",lightcyan2:"d1eeee",lightcyan3:"b4cdcd",lightcyan4:"7a8b8b",lightgoldenrod:"eedd82",lightgoldenrod1:"ffec8b",lightgoldenrod2:"eedc82",lightgoldenrod3:"cdbe70",lightgoldenrod4:"8b814c",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightpink1:"ffaeb9",lightpink2:"eea2ad",lightpink3:"cd8c95",lightpink4:"8b5f65",lightsalmon:"ffa07a",lightsalmon1:"ffa07a",lightsalmon2:"ee9572",lightsalmon3:"cd8162",lightsalmon4:"8b5742",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightskyblue1:"b0e2ff",lightskyblue2:"a4d3ee",lightskyblue3:"8db6cd",lightskyblue4:"607b8b",lightslateblue:"8470ff",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightsteelblue1:"cae1ff",lightsteelblue2:"bcd2ee",lightsteelblue3:"a2b5cd",lightsteelblue4:"6e7b8b",lightyellow:"ffffe0",lightyellow1:"ffffe0",lightyellow2:"eeeed1",lightyellow3:"cdcdb4",lightyellow4:"8b8b7a",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",magenta1:"ff00ff",magenta2:"ee00ee",magenta3:"cd00cd",magenta4:"8b008b",maroon:"b03060",maroon1:"ff34b3",maroon2:"ee30a7",maroon3:"cd2990",maroon4:"8b1c62",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumorchid1:"e066ff",mediumorchid2:"d15fee",mediumorchid3:"b452cd",mediumorchid4:"7a378b",mediumpurple:"9370db",mediumpurple1:"ab82ff",mediumpurple2:"9f79ee",mediumpurple3:"8968cd",mediumpurple4:"5d478b",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",mistyrose1:"ffe4e1",mistyrose2:"eed5d2",mistyrose3:"cdb7b5",mistyrose4:"8b7d7b",moccasin:"ffe4b5",navajowhite:"ffdead",navajowhite1:"ffdead",navajowhite2:"eecfa1",navajowhite3:"cdb38b",navajowhite4:"8b795e",navy:"000080",navyblue:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",olivedrab1:"c0ff3e",olivedrab2:"b3ee3a",olivedrab3:"9acd32",olivedrab4:"698b22",orange:"ffa500",orange1:"ffa500",orange2:"ee9a00",orange3:"cd8500",orange4:"8b5a00",orangered:"ff4500",orangered1:"ff4500",orangered2:"ee4000",orangered3:"cd3700",orangered4:"8b2500",orchid:"da70d6",orchid1:"ff83fa",orchid2:"ee7ae9",orchid3:"cd69c9",orchid4:"8b4789",palegoldenrod:"eee8aa",palegreen:"98fb98",palegreen1:"9aff9a",palegreen2:"90ee90",palegreen3:"7ccd7c",palegreen4:"548b54",paleturquoise:"afeeee",paleturquoise1:"bbffff",paleturquoise2:"aeeeee",paleturquoise3:"96cdcd",paleturquoise4:"668b8b",palevioletred:"db7093",palevioletred1:"ff82ab",palevioletred2:"ee799f",palevioletred3:"cd6889",palevioletred4:"8b475d",papayawhip:"ffefd5",peachpuff:"ffdab9",peachpuff1:"ffdab9",peachpuff2:"eecbad",peachpuff3:"cdaf95",peachpuff4:"8b7765",peru:"cd853f",pink:"ffc0cb",pink1:"ffb5c5",pink2:"eea9b8",pink3:"cd919e",pink4:"8b636c",plum:"dda0dd",plum1:"ffbbff",plum2:"eeaeee",plum3:"cd96cd",plum4:"8b668b",powderblue:"b0e0e6",purple:"a020f0",purple1:"9b30ff",purple2:"912cee",purple3:"7d26cd",purple4:"551a8b",rebeccapurple:"663399",red:"ff0000",red1:"ff0000",red2:"ee0000",red3:"cd0000",red4:"8b0000",rosybrown:"bc8f8f",rosybrown1:"ffc1c1",rosybrown2:"eeb4b4",rosybrown3:"cd9b9b",rosybrown4:"8b6969",royalblue:"4169e1",royalblue1:"4876ff",royalblue2:"436eee",royalblue3:"3a5fcd",royalblue4:"27408b",saddlebrown:"8b4513",salmon:"fa8072",salmon1:"ff8c69",salmon2:"ee8262",salmon3:"cd7054",salmon4:"8b4c39",sandybrown:"f4a460",seagreen:"2e8b57",seagreen1:"54ff9f",seagreen2:"4eee94",seagreen3:"43cd80",seagreen4:"2e8b57",seashell:"fff5ee",seashell1:"fff5ee",seashell2:"eee5de",seashell3:"cdc5bf",seashell4:"8b8682",sienna:"a0522d",sienna1:"ff8247",sienna2:"ee7942",sienna3:"cd6839",sienna4:"8b4726",silver:"c0c0c0",skyblue:"87ceeb",skyblue1:"87ceff",skyblue2:"7ec0ee",skyblue3:"6ca6cd",skyblue4:"4a708b",slateblue:"6a5acd",slateblue1:"836fff",slateblue2:"7a67ee",slateblue3:"6959cd",slateblue4:"473c8b",slategray:"708090",slategray1:"c6e2ff",slategray2:"b9d3ee",slategray3:"9fb6cd",slategray4:"6c7b8b",slategrey:"708090",snow:"fffafa",snow1:"fffafa",snow2:"eee9e9",snow3:"cdc9c9",snow4:"8b8989",springgreen:"00ff7f",springgreen1:"00ff7f",springgreen2:"00ee76",springgreen3:"00cd66",springgreen4:"008b45",steelblue:"4682b4",steelblue1:"63b8ff",steelblue2:"5cacee",steelblue3:"4f94cd",steelblue4:"36648b",tan:"d2b48c",tan1:"ffa54f",tan2:"ee9a49",tan3:"cd853f",tan4:"8b5a2b",teal:"008080",thistle:"d8bfd8",thistle1:"ffe1ff",thistle2:"eed2ee",thistle3:"cdb5cd",thistle4:"8b7b8b",tomato:"ff6347",tomato1:"ff6347",tomato2:"ee5c42",tomato3:"cd4f39",tomato4:"8b3626",turquoise:"40e0d0",turquoise1:"00f5ff",turquoise2:"00e5ee",turquoise3:"00c5cd",turquoise4:"00868b",violet:"ee82ee",violetred:"d02090",violetred1:"ff3e96",violetred2:"ee3a8c",violetred3:"cd3278",violetred4:"8b2252",webgray:"808080",webgreen:"008000",webgrey:"808080",webmaroon:"800000",webpurple:"800080",wheat:"f5deb3",wheat1:"ffe7ba",wheat2:"eed8ae",wheat3:"cdba96",wheat4:"8b7e66",white:"ffffff",whitesmoke:"f5f5f5",x11gray:"bebebe",x11green:"00ff00",x11grey:"bebebe",x11maroon:"b03060",x11purple:"a020f0",yellow:"ffff00",yellow1:"ffff00",yellow2:"eeee00",yellow3:"cdcd00",yellow4:"8b8b00",yellowgreen:"9acd32"},hg=e=>{const t=fg[e.toLowerCase().replaceAll(" ","")];return t===void 0?void 0:`#${t}`},gg=/^rgba?:([\da-f]{1,4})\/([\da-f]{1,4})\/([\da-f]{1,4})(?:\/[\da-f]{1,4})?$/i,mg=/^#((?:[\da-f]{3}){1,4})$/i,Ut=e=>{const t=16**e.length-1;return Math.round(Number.parseInt(e,16)/t*255)},yg=e=>{const t=e.trim(),n=gg.exec(t);if(n)return{b:Ut(n[3]),g:Ut(n[2]),r:Ut(n[1])};const s=t.startsWith("#")?t:hg(t);if(s===void 0)return;const i=mg.exec(s);if(!i)return;const r=i[1],o=r.length/3;return{b:Ut(r.slice(o*2)),g:Ut(r.slice(o,o*2)),r:Ut(r.slice(0,o))}},Fl=k.createContext({renderThrottleMs:0,subscribe(){return{startTime:0,unsubscribe(){}}}});Fl.displayName="InternalAnimationContext";const so=k.createContext({exit(){},suspendTerminal:(()=>Promise.resolve(void 0)),async waitUntilRenderFlush(){}});so.displayName="InternalAppContext";const Vl=k.createContext({setCursorPosition(){}});Vl.displayName="InternalCursorContext";let vg;const bg=e=>(vg??=Ne(import.meta.url))(e),qt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wg=e=>{if(typeof qt<"u"&&qt.versions&&qt.versions.node){const[t,n]=qt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return qt.getBuiltinModule(e)}return bg(e)},{existsSync:kg,readFileSync:Sg}=wg("node:fs"),{cwd:xg}=qt,$g=(e,t=2)=>e.replace(/^\t+/gm,n=>" ".repeat(n.length*t)),Eg=(e,t)=>{const n=[],s=e-t,i=e+t;for(let r=s;r<=i;r++)n.push(r);return n},Cg=(e,t,n={})=>{var s;if(typeof e!="string")throw new TypeError("Source code is missing.");if(!t||t<1)throw new TypeError("Line number must start from `1`.");const i=$g(e).split(/\r?\n/);if(!(t>i.length))return Eg(t,(s=n.around)!==null&&s!==void 0?s:3).filter(r=>i[r-1]!==void 0).map(r=>({line:r,value:i[r-1]}))},$i=e=>{if(!e)return e;const t=xg();return e.replace(`file://${t}/`,"").replace(`${t}/`,"")};function Rg({error:e}){const t=nh(e),n=new Map,s=t.map(c=>{const l=!c.methodName&&!c.file?`raw:${c.raw}`:`${$i(c.file)??""}:${c.line}:${c.column}:${c.methodName??""}`,d=n.get(l)??0;return n.set(l,d+1),{key:`${l}#${d}`,trace:c}}),i=t[0],r=$i(i?.file);let o,a=0;if(r&&i?.line&&kg(r)){const c=Sg(r,"utf8");if(o=Cg(c,i.line),o)for(const{line:l}of o)a=Math.max(a,String(l).length)}return v.jsxs(W,{flexDirection:"column",padding:1,children:[v.jsxs(W,{children:[v.jsxs(O,{backgroundColor:"red",color:"white",children:[" ","ERROR"," "]}),v.jsxs(O,{children:[" ",e.message]})]}),i&&r?v.jsx(W,{marginTop:1,children:v.jsxs(O,{dimColor:!0,children:[r,":",i.line,":",i.column]})}):null,i&&o?v.jsx(W,{flexDirection:"column",marginTop:1,children:o.map(({line:c,value:l})=>v.jsxs(W,{children:[v.jsx(W,{width:a+1,children:v.jsxs(O,{"aria-label":c===i.line?`Line ${c}, error`:`Line ${c}`,backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,dimColor:c!==i.line,children:[String(c).padStart(a," "),":"]})}),v.jsx(O,{backgroundColor:c===i.line?"red":void 0,color:c===i.line?"white":void 0,children:` ${l}`})]},`excerpt-${c}`))}):null,t.length>0?v.jsx(W,{flexDirection:"column",marginTop:1,children:s.map(({key:c,trace:l})=>{const d=$i(l.file)??"";return!l.methodName&&!l.file?v.jsxs(W,{children:[v.jsx(O,{dimColor:!0,children:"- "}),v.jsx(O,{bold:!0,dimColor:!0,children:l.raw})]},c):v.jsxs(W,{children:[v.jsx(O,{dimColor:!0,children:"- "}),v.jsx(O,{bold:!0,dimColor:!0,children:l.methodName??"<anonymous>"}),v.jsxs(O,{"aria-label":`at ${d} line ${l.line} column ${l.column}`,color:"gray",dimColor:!0,children:[" ","(",d,":",l.line,":",l.column,")"]})]},c)})}):null]})}let Og=class extends k.PureComponent{static displayName="InternalErrorBoundary";static getDerivedStateFromError(t){return{error:t}}state={error:void 0};componentDidCatch(t){this.props.onError(t)}render(){return this.state.error?v.jsx(Rg,{error:this.state.error}):this.props.children}};const io=k.createContext({activate(){},activeId:void 0,add(){},deactivate(){},disableFocus(){},enableFocus(){},focus(){},focusNext(){},focusPrevious(){},remove(){}});io.displayName="InternalFocusContext";const jg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Wl,Wl=jg,Hl=k.createContext({stderr:Wl.stderr,write(){}});Hl.displayName="InternalStderrContext";let Tg;const Ig=e=>(Tg??=Ne(import.meta.url))(e),Kt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Ul,Ag=e=>{if(typeof Kt<"u"&&Kt.versions&&Kt.versions.node){const[t,n]=Kt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Kt.getBuiltinModule(e)}return Ig(e)},{EventEmitter:Bg}=Ag("node:events"),Ul=Kt,oi=k.createContext({internal_eventEmitter:new Bg,internal_exitOnCtrlC:!0,isRawModeSupported:!1,setBracketedPasteMode(){},setRawMode(){},stdin:Ul.stdin});oi.displayName="InternalStdinContext";const Pg=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:Gl,Gl=Pg,ro=k.createContext({stdout:Gl.stdout,write(){}});ro.displayName="InternalStdoutContext";const Ng={bar:6,"blinking-bar":5,"blinking-block":1,"blinking-underline":3,block:2,default:0,underline:4},pa=e=>ag(Ng[e]),fa=(e,t)=>e?.x!==t?.x||e?.y!==t?.y,ai=(e,t)=>{if(!t)return"";const n=e-t.y;return(n>0?Us(n):"")+ri(t.x)+Xn},zl=(e,t)=>{if(!t)return"";const n=e-1-t.y;return(n>0?ng(n):"")+ri(0)},Dg=e=>{const t=e.cursorWasShown?Yn:"",n=zl(e.previousLineCount,e.previousCursorPosition),s=ai(e.visibleLineCount,e.cursorPosition);return t+n+s},ha=(e,t,n)=>e?Yn+zl(t,n):"";let Lg;const Mg=e=>(Lg??=Ne(import.meta.url))(e),En=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ci=e=>{if(typeof En<"u"&&En.versions&&En.versions.node){const[t,n]=En.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return En.getBuiltinModule(e)}return Mg(e)},{existsSync:ga}=ci("node:fs"),{createRequire:_g}=ci("node:module"),{dirname:ma,join:bs}=ci("node:path"),{fileURLToPath:Fg}=ci("node:url"),Vg=12,Wg=e=>{const t=_g(e),n=ma(Fg(e));let s=n;for(let i=0;i<Vg;i+=1){if(ga(bs(s,"package.json"))&&ga(bs(s,"index.js")))return t(bs(s,"index.js"));const r=ma(s);if(r===s)break;s=r}return t(bs(n,"..","index.js"))},ws=new WeakMap,Hg=async(e,t)=>(await e,t()),Jl=(e,t)=>{const n=ws.get(e),s=n===void 0?t():Hg(n,t);let i;return i=(async()=>{try{await s}catch{}ws.get(e)===i&&ws.delete(e)})(),ws.set(e,i),s};let Ug=class{constructor(t,n){this.target=t,this.contentRect=n}target;contentRect};function Gg(e,t,n=!1){const s=e.resizeObservers&&e.resizeObservers.size>0;if((s||n)&&e.yogaNode){const i=Math.round(e.yogaNode.getComputedWidth()),r=Math.round(e.yogaNode.getComputedHeight());if(!Number.isNaN(i)&&!Number.isNaN(r)){const o=e.internal_lastMeasuredSize;if((o?.width!==i||o.height!==r)&&(e.internal_lastMeasuredSize={height:r,width:i},s)){const a=new Ug(e,{height:r,width:i});for(const c of e.resizeObservers)t.has(c)||t.set(c,[]),t.get(c).push(a)}}}}let zg;const Jg=e=>(zg??=Ne(import.meta.url))(e),Yt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:at,oo=e=>{if(typeof Yt<"u"&&Yt.versions&&Yt.versions.node){const[t,n]=Yt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Yt.getBuiltinModule(e)}return Jg(e)},at=Yt,{execFileSync:qg}=oo("node:child_process"),Pn=oo("node:fs"),Kg=oo("node:tty"),ql=80,Kl=24,mr=(e,t,{shell:n,env:s}={})=>qg(e,t,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:n,env:s}).trim(),Bs=(e,t)=>({columns:Number.parseInt(e,10),rows:Number.parseInt(t,10)}),Yl=(e,t)=>{const{columns:n,rows:s}=Bs(e,t);if(!(Number.isNaN(n)||Number.isNaN(s))&&!(n===ql&&s===Kl))return{columns:n,rows:s}},Yg=()=>{if(at.platform!=="linux")return!0;try{const e=Pn.readFileSync("/proc/self/stat","utf8"),t=e.lastIndexOf(") ");if(t===-1)return!1;const n=e.slice(t+2).trim().split(/\s+/),s=Number.parseInt(n[2],10),i=Number.parseInt(n[5],10);return Number.isNaN(s)||Number.isNaN(i)||i<=0?!1:s===i}catch{return!1}};function Xg(){const{env:e,stdout:t,stderr:n}=at;if(t?.columns&&t?.rows)return Bs(t.columns,t.rows);if(n?.columns&&n?.rows)return Bs(n.columns,n.rows);if(e.COLUMNS&&e.LINES)return Bs(e.COLUMNS,e.LINES);const s={columns:ql,rows:Kl};return at.platform==="win32"?Ei()??s:at.platform==="darwin"?ya()??Ei()??s:ya()??Ei()??Zg()??s}const ya=()=>{try{const e=at.platform==="darwin"?Pn.constants.O_EVTONLY|Pn.constants.O_NONBLOCK:Pn.constants.O_NONBLOCK,{columns:t,rows:n}=Kg.WriteStream(Pn.openSync("/dev/tty",e));return{columns:t,rows:n}}catch{}},Ei=()=>{try{const e=mr("tput",["cols"],{env:{TERM:"dumb",...at.env}}),t=mr("tput",["lines"],{env:{TERM:"dumb",...at.env}});if(e&&t)return Yl(e,t)}catch{}},Zg=()=>{try{if(!Yg())return;const e=mr("resize",["-u"]).match(/\d+/g);if(e.length===2)return Yl(e[0],e[1])}catch{}},tt=e=>{const{columns:t,rows:n}=e;if(t&&n)return{columns:t,rows:n};const s=Xg();return{columns:t||s.columns||80,rows:n||s.rows||24}};let Qg;const em=e=>(Qg??=Ne(import.meta.url))(e),Xt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,li=e=>{if(typeof Xt<"u"&&Xt.versions&&Xt.versions.node){const[t,n]=Xt.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xt.getBuiltinModule(e)}return em(e)},Te=Xt,{env:Ci}=Te,{PassThrough:va,Stream:tm}=li("node:stream"),{Buffer:ba}=li("node:buffer"),{Console:nm}=li("node:console"),{EventEmitter:sm}=li("node:events"),wa=e=>e in Ci&&Ci[e]!=="0"&&Ci[e]!=="false",Xl=wa("CI")||wa("CONTINUOUS_INTEGRATION"),ka=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];let Ri={};const im=e=>{const t=new va,n=new va;t.write=i=>{e("stdout",i)},n.write=i=>{e("stderr",i)};const s=new console.Console(t,n);for(const i of ka)Ri[i]=console[i],console[i]=s[i];return()=>{for(const i of ka)console[i]=Ri[i];Ri={}}},cn=[];cn.push("SIGHUP","SIGINT","SIGTERM");process.platform!=="win32"&&cn.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&cn.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");const Ps=e=>!!e&&!0&&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",Oi=Symbol.for("signal-exit emitter"),ji=globalThis,rm=Object.defineProperty.bind(Object);class om{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(ji[Oi])return ji[Oi];rm(ji,Oi,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(t,n){this.listeners[t].push(n)}removeListener(t,n){const s=this.listeners[t],i=s.indexOf(n);i!==-1&&(i===0&&s.length===1?s.length=0:s.splice(i,1))}emit(t,n,s){if(this.emitted[t])return!1;this.emitted[t]=!0;let i=!1;for(const r of this.listeners[t])i=r(n,s)===!0||i;return t==="exit"&&(i=this.emit("afterExit",n,s)||i),i}}let Zl=class{};const am=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});class cm extends Zl{onExit(){return()=>{}}load(){}unload(){}}class lm extends Zl{#e=yr.platform==="win32"?"SIGINT":"SIGHUP";#t=new om;#n;#r;#s;#i={};#o=!1;constructor(t){super(),this.#n=t,this.#i={};for(const n of cn)this.#i[n]=()=>{const s=this.#n.listeners(n);let{count:i}=this.#t;const r=t;if(typeof r.__signal_exit_emitter__=="object"&&typeof r.__signal_exit_emitter__.count=="number"&&(i+=r.__signal_exit_emitter__.count),s.length===i){this.unload();const o=this.#t.emit("exit",null,n),a=n==="SIGHUP"?this.#e:n;o||t.kill(t.pid,a)}};this.#s=t.reallyExit,this.#r=t.emit}onExit(t,n){if(!Ps(this.#n))return()=>{};this.#o===!1&&this.load();const s=n?.alwaysLast?"afterExit":"exit";return this.#t.on(s,t),()=>{this.#t.removeListener(s,t),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(const t of cn)try{const n=this.#i[t];n&&this.#n.on(t,n)}catch{}this.#n.emit=(t,...n)=>this.#c(t,...n),this.#n.reallyExit=t=>this.#a(t)}}unload(){this.#o&&(this.#o=!1,cn.forEach(t=>{const n=this.#i[t];if(!n)throw new Error("Listener not defined for signal: "+t);try{this.#n.removeListener(t,n)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#s,this.#t.count-=1)}#a(t){return Ps(this.#n)?(this.#n.exitCode=t||0,this.#t.emit("exit",this.#n.exitCode,null),this.#s.call(this.#n,this.#n.exitCode)):0}#c(t,...n){const s=this.#r;if(t==="exit"&&Ps(this.#n)){typeof n[0]=="number"&&(this.#n.exitCode=n[0]);const i=s.call(this.#n,t,...n);return this.#t.emit("exit",this.#n.exitCode,null),i}else return s.call(this.#n,t,...n)}}const yr=globalThis.process,{onExit:dm}=am(Ps(yr)?new lm(yr):new cm),Gs="\x1B",Ql="\x1B[200~",Sa="\x1B[201~",um=e=>e>=48&&e<=63,pm=e=>e>=32&&e<=47,ed=e=>e>=64&&e<=126,fm=(e,t,n)=>{const s=t+n+1;let i=s;for(;i<e.length;i++){const r=e.codePointAt(i);if(r===void 0)return"pending";if(!(um(r)||pm(r))&&!(r===91&&i===s))return ed(r)?{nextIndex:i+1,sequence:e.slice(t,i+1)}:void 0}return"pending"},hm=(e,t,n)=>{const s=t+n+2;if(s>e.length)return"pending";const i=e.codePointAt(s-1);if(!(i===void 0||!ed(i)))return{nextIndex:s,sequence:e.slice(t,s)}},xa=(e,t,n)=>{const s=e[t+n];if(s===void 0)return"pending";if(s==="[")return fm(e,t,n);if(s==="O")return hm(e,t,n)},gm=(e,t)=>{const n=e.codePointAt(t+1),s=n!==void 0&&n>65535?2:1,i=t+1+s;return{nextIndex:i,sequence:e.slice(t,i)}},mm=(e,t)=>{if(t===e.length-1)return"pending";if(e[t+1]===Gs){if(t+2>=e.length)return"pending";const s=xa(e,t,2);return s==="pending"?"pending":s||{nextIndex:t+2,sequence:e.slice(t,t+2)}}const n=xa(e,t,1);return n==="pending"?"pending":n||gm(e,t)},$a=(e,t)=>{let n=0;for(let s=0;s<e.length;s++){const i=e[s];(i===""||i==="\b")&&(s>n&&t.push(e.slice(n,s)),t.push(i),n=s+1)}n<e.length&&t.push(e.slice(n))},ym=e=>{const t=[];let n=0;const s=i=>({events:t,pending:e.slice(i)});for(;n<e.length;){const i=e.indexOf(Gs,n);if(i===-1)return $a(e.slice(n),t),{events:t,pending:""};i>n&&$a(e.slice(n,i),t);const r=mm(e,i);if(r==="pending")return s(i);if(r.sequence===Ql){const o=r.nextIndex,a=e.indexOf(Sa,o);if(a===-1)return s(i);t.push({paste:e.slice(o,a)}),n=a+Sa.length;continue}t.push(r.sequence),n=r.nextIndex}return{events:t,pending:""}},vm=()=>{let e="";return{flushPendingEscape(){if(!e.startsWith(Gs))return;const t=e;return e="",t},hasPendingEscape(){return e.startsWith(Gs)&&!e.startsWith(Ql)&&e!=="\x1B[200"},push(t){const n=ym(e+t);return e=n.pending,n.events},reset(){e=""}}},bm=" ",wm="\x1B[Z",km="\x1B",Ea=Ll(_l),Ti=Ml(_l),td=({children:e,exitOnCtrlC:t,interactive:n,onExit:s,onRegisterInputControl:i,onSuspendTerminal:r,onWaitUntilRenderFlush:o,renderThrottleMs:a,setCursorPosition:c,stderr:l,stdin:d,stdout:u,writeToStderr:p,writeToStdout:f})=>{const[h,g]=k.useState(!0),[y,x]=k.useState(void 0),[,b]=k.useState([]),S=k.useRef(0),C=k.useRef([]),N=k.useRef(new Map),T=k.useRef(void 0),D=k.useRef(0),F=k.useRef(!1),V=k.useRef(0),[Z]=k.useState(()=>{const L=new sm;return L.setMaxListeners(1/0),L}),re=k.useRef(void 0),te=k.useRef(void 0);te.current??=vm();const ne=k.useRef(void 0),ie=k.useRef(!1),M=20,w=k.useCallback(()=>{ne.current&&(clearTimeout(ne.current),ne.current=void 0)},[]),A=k.useCallback(()=>{T.current&&(clearTimeout(T.current),T.current=void 0)},[]),U=k.useCallback(()=>{if(A(),N.current.size===0)return;let L=Number.POSITIVE_INFINITY;for(const X of N.current.values())L=Math.min(L,X.nextDueTime);const Q=Math.max(0,L-performance.now());T.current=setTimeout(()=>{T.current=void 0;const X=performance.now(),pe=[...N.current.values()];for(const $e of pe){if(X<$e.nextDueTime)continue;$e.callback(X);const $f=X-$e.startTime,Ef=Math.floor($f/$e.interval)+1;$e.nextDueTime=$e.startTime+Ef*$e.interval}U()},Q)},[A]),I=k.useCallback((L,Q)=>{const X=performance.now();return N.current.set(L,{callback:L,interval:Q,nextDueTime:X+Q,startTime:X}),U(),{startTime:X,unsubscribe(){if(N.current.delete(L),N.current.size===0){A();return}U()}}},[A,U]);k.useEffect(()=>()=>{A()},[A]);const B=d.isTTY,j=k.useCallback(()=>{re.current&&(d.removeListener("readable",re.current),re.current=void 0)},[d]),_=k.useCallback(()=>{te.current?.reset(),w(),j()},[w,j]),H=k.useCallback(()=>{F.current=!1,d.setRawMode(!1),d.unref(),D.current=0,_()},[d,_]),z=k.useCallback(L=>{B&&(D.current>0||F.current)&&H(),s(L)},[B,H,s]),Y=k.useCallback(L=>{if(L.includes("")&&t){z();return}L===km&&h&&x(Q=>{if(!Q)return Q})},[t,z,h]),P=k.useCallback(L=>{Y(L),Z.emit("input",L)},[Y,Z]),K=k.useCallback(()=>{w(),ne.current=setTimeout(()=>{ne.current=void 0;const L=te.current.flushPendingEscape();L&&P(L)},M)},[w,P]),ae=k.useCallback(()=>{w();let L;for(;(L=d.read())!==null;){const Q=te.current.push(L);for(const X of Q)if(typeof X=="string")P(X);else{if(Z.listenerCount("paste")===0){ie.current||(ie.current=!0,p(`Warning: useInput() received bracketed paste because no usePaste() handler is active. This fallback is deprecated and will be removed in the next major version. Migrate paste handling to usePaste().
|
|
2
2
|
`)),P(X.paste);continue}Z.emit("paste",X.paste)}}te.current.hasPendingEscape()&&K()},[d,P,w,K,p,Z]),le=k.useCallback(()=>{re.current||(re.current=ae,d.addListener("readable",ae))},[d,ae]),ge=k.useCallback(L=>{if(!B)throw d===Te.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|
3
3
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
|
|
4
4
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(d.setEncoding("utf8"),L){if(D.current===0){const Q=F.current;F.current=!1,Q||(d.ref(),d.setRawMode(!0)),le()}D.current++;return}D.current!==0&&--D.current===0&&(_(),F.current=!0,queueMicrotask(()=>{F.current&&H()}))},[B,d,le,_,H]),Se=k.useCallback(L=>{if(u.isTTY){if(L){V.current===0&&u.write(Ea),V.current++;return}V.current!==0&&--V.current===0&&u.write(Ti)}},[u]),xe=k.useRef({bracketedPaste:!1,rawMode:!1}),kt=k.useCallback(()=>{const L=B&&(D.current>0||F.current),Q=V.current>0;xe.current={bracketedPaste:Q,rawMode:L},Q&&u.isTTY&&u.write(Ti),L&&(F.current=!1,_(),d.setRawMode(!1),d.unref())},[B,u,d,_]),Vo=k.useCallback(()=>{const{bracketedPaste:L,rawMode:Q}=xe.current;Q&&(d.ref(),d.setRawMode(!0),d.setEncoding("utf8"),le()),L&&u.isTTY&&u.write(Ea)},[d,u,le]);k.useEffect(()=>{i(kt,Vo)},[i,kt,Vo]);const Wo=k.useCallback((L,Q)=>{const X=L.findIndex(pe=>pe.id===Q);for(let pe=X+1;pe<L.length;pe++){const $e=L[pe];if($e?.isActive)return $e.id}},[]),Ho=k.useCallback((L,Q)=>{const X=L.findIndex(pe=>pe.id===Q);for(let pe=X-1;pe>=0;pe--){const $e=L[pe];if($e?.isActive)return $e.id}},[]),ys=k.useCallback(()=>{const L=C.current;x(Q=>{const X=L.find(pe=>pe.isActive)?.id;return Wo(L,Q)??X})},[Wo]),vs=k.useCallback(()=>{const L=C.current;x(Q=>{const X=L.findLast(pe=>pe.isActive)?.id;return Ho(L,Q)??X})},[Ho]);k.useEffect(()=>{const L=X=>{!h||S.current===0||(X===bm&&ys(),X===wm&&vs())};Z.on("input",L);const Q=Z;return()=>{Q.off("input",L)}},[h,ys,vs,Z]);const Uo=k.useCallback(()=>{g(!0)},[]),Go=k.useCallback(()=>{g(!1)},[]),zo=k.useCallback(L=>{C.current.some(Q=>Q?.id===L)&&x(L)},[]),Jo=k.useCallback((L,{autoFocus:Q})=>{const X=[...C.current,{id:L,isActive:!0}];S.current=X.length,C.current=X,b(X),Q&&x(pe=>pe||L)},[]),qo=k.useCallback(L=>{x(X=>{if(X!==L)return X});const Q=C.current.filter(X=>X.id!==L);S.current=Q.length,C.current=Q,b(Q)},[]),Ko=k.useCallback(L=>{const Q=C.current.map(X=>X.id!==L?X:{id:L,isActive:!0});C.current=Q,b(Q)},[]),Yo=k.useCallback(L=>{x(X=>{if(X!==L)return X});const Q=C.current.map(X=>X.id!==L?X:{id:L,isActive:!1});C.current=Q,b(Q)},[]);k.useEffect(()=>()=>{const L=!u.destroyed&&!u.writableEnded;n&&L&&u.write(Xn),B&&(D.current>0||F.current)&&H(),V.current>0&&(u.isTTY&&L&&u.write(Ti),V.current=0)},[u,B,H,n]);const yf=k.useMemo(()=>({exit:z,suspendTerminal:r,waitUntilRenderFlush:o}),[z,r,o]),vf=k.useMemo(()=>({internal_eventEmitter:Z,internal_exitOnCtrlC:t,isRawModeSupported:B,setBracketedPasteMode:Se,setRawMode:ge,stdin:d}),[d,ge,Se,B,t,Z]),bf=k.useMemo(()=>({stdout:u,write:f}),[u,f]),wf=k.useMemo(()=>({stderr:l,write:p}),[l,p]),kf=k.useMemo(()=>({setCursorPosition:c}),[c]),Sf=k.useMemo(()=>({activate:Ko,activeId:y,add:Jo,deactivate:Yo,disableFocus:Go,enableFocus:Uo,focus:zo,focusNext:ys,focusPrevious:vs,remove:qo}),[y,Jo,qo,Ko,Yo,Uo,Go,ys,vs,zo]),xf=k.useMemo(()=>({renderThrottleMs:a,subscribe:I}),[I,a]);return v.jsx(so.Provider,{value:yf,children:v.jsx(oi.Provider,{value:vf,children:v.jsx(ro.Provider,{value:bf,children:v.jsx(Hl.Provider,{value:wf,children:v.jsx(io.Provider,{value:Sf,children:v.jsx(Fl.Provider,{value:xf,children:v.jsx(Vl.Provider,{value:kf,children:v.jsx(Og,{onError:z,children:e})})})})})})})})};td.displayName="InternalApp";const Sm=(e,t,n)=>{if(n<=0||!e.yogaNode)return"";const{yogaNode:s}=e,i=s.getComputedBorder(Ue.EDGE_LEFT),r=s.getComputedBorder(Ue.EDGE_RIGHT),o=s.getComputedBorder(Ue.EDGE_TOP),a=s.getComputedPadding(Ue.EDGE_LEFT),c=s.getComputedPadding(Ue.EDGE_RIGHT),l=s.getComputedPadding(Ue.EDGE_TOP),d=Math.round(s.getComputedWidth()-i-r-a-c);if(d<=0)return"";const u=new Gf({height:n,width:d}),p=-(e.internal_scrollState?.scrollLeft??0)-i-a,f=-t-o-l;for(const h of e.childNodes)zf(h,u,{absoluteOffsetX:p,absoluteOffsetY:f,offsetX:p,offsetY:f,skipStaticElements:!1});return u.get().output},vr=new WeakMap,Gt=e=>e??"default",xm=()=>{let e,t;return{consumeDelta:()=>{if(Gt(t)===Gt(e))return"";const n=Gt(t);return e=t,pa(n)},consumeRestoreOnDone:()=>{const n=Gt(e)!=="default";return e=void 0,t=void 0,n?pa("default"):""},isDirty:()=>Gt(t)!==Gt(e),setPending:n=>{t=n}}},Qn=(e,t)=>t.endsWith(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createTaskGraph as $}from"@visulima/task-runner";import{d as b,b as O}from"./catalog.js";import{f as P}from"../packem_shared/project-name-filter-
|
|
1
|
+
import{createTaskGraph as $}from"@visulima/task-runner";import{d as b,b as O}from"./catalog.js";import{f as P}from"../packem_shared/project-name-filter-DdXd3P3a.js";import{r as S,f as E,a as G}from"../packem_shared/selectors-B7lSFz7l.js";const T=(l,s,t)=>{const a=[],e=new Set,n=(r,u)=>{if(e.has(r))return;e.add(r);const m=s[r]??[];for(const d of m)n(d,u+1);const o=t[r],h=" ".repeat(u);a.push(`${h}${r}${o?.cache===!1?" (no-cache)":""}`)};for(const r of l)n(r,0);return a},x=(l,s,t)=>({roots:l,tasks:Object.fromEntries(Object.entries(t).map(([a,e])=>[a,{cache:e.cache,dependsOn:s[a]??[],outputs:e.outputs,parallelism:e.parallelism,projectRoot:e.projectRoot,target:e.target}]))}),C=async({argument:l,logger:s,options:t,process:a,visConfig:e,workspaceRoot:n})=>{const r=l[0];if(!r)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!n)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:u,packageJsons:m,workspace:o}=b(n,e),h=O(n,o,m),d=await S(r,o,a.cwd,n),{target:f}=d;let i=d.projects;t.projects!==void 0&&(i=P(i,String(t.projects),Object.keys(o.projects))),t.query&&(i=E(i,o,t.query)),i=G(i,o,t.tag);const k=i.filter(p=>o.projects[p]?.targets?.[f]!==void 0);if(k.length===0){s.info(`No projects have a "${f}" target.`);return}const y=k.map(p=>{const g=o.projects[p],j=g.targets?.[f],v={project:p,target:f};return{cache:j?.cache,id:`${p}:${f}`,outputs:j?.outputs??[],overrides:{command:j?.command},parallelism:j?.parallelism,projectRoot:g.root,target:v}}),c=$(y,{projectGraph:h,targetDefaults:u.tasks,workspace:o});if(t.json){s.info(JSON.stringify(x(c.roots,c.dependencies,c.tasks),null,2));return}const w=T(c.roots,c.dependencies,c.tasks);s.info(`Execution plan (${Object.keys(c.tasks).length} task(s), ${c.roots.length} root(s)):`),s.info("");for(const p of w)s.info(p)};export{C as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{createRequire as u}from"node:module";import{g as m}from"../packem_shared/package-version-
|
|
1
|
+
import{createRequire as u}from"node:module";import{g as m}from"../packem_shared/package-version-BFsJ8iyZ.js";let a;const f=t=>(a??=u(import.meta.url))(t),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=t=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,s]=r.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return r.getBuiltinModule(t)}return f(t)},{execSync:l,spawnSync:p}=d("node:child_process"),y=async({argument:t,logger:e,options:s})=>{const o=t?.[0];e.info("info: checking for updates...");const i=m();let n;try{const c=l("npm view @visulima/vis version",{encoding:"utf8"}).trim();n=o??c}catch{throw new Error("Failed to query npm registry. Check your network connection.")}if(i===n&&!s.force){e.info(`
|
|
2
2
|
✓ Already up to date (${i})`);return}if(s.check){i===n?e.info(`✓ Already up to date (${i})`):e.info(`info: found @visulima/vis@${n} (current: ${i})`);return}if(e.info(`info: found @visulima/vis@${n} (current: ${i})`),e.info("info: installing..."),p("npm",["install","-g",`@visulima/vis@${n}`],{encoding:"utf8",stdio:"inherit"}).status!==0)throw new Error("Failed to update. Try running with sudo or fix npm permissions.");e.info(`
|
|
3
3
|
✓ Updated @visulima/vis from ${i} → ${n}`)};export{y as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{d as h,b as j}from"./catalog.js";import{V as n}from"../packem_shared/vis-user-error-
|
|
1
|
+
import{d as h,b as j}from"./catalog.js";import{V as n}from"../packem_shared/vis-user-error-DJvfOpBX.js";import{s as k}from"../packem_shared/affected-selection-DLrq50Mz.js";import{f as P,a as y}from"../packem_shared/selectors-B7lSFz7l.js";const b=(r,e)=>{if(r.length>0)return[...r];const s=e.indexOf("affected",2);return s===-1?[]:e.slice(s+1)},G=async({argument:r,options:e,process:s,rawArgv:u,runtime:g,visConfig:d,workspaceRoot:f})=>{if(!r[0])throw new n("Missing target. Usage: vis affected <target>");if(!f)throw new n("Could not determine workspace root. Run this command inside a monorepo.");if(e.sparseCheckout){const o=f,{packageJsons:p,workspace:t}=h(o,d),l=j(o,t,p),w=await k({base:e.base,downstream:e.downstream,head:e.head,uncommitted:e.uncommitted,upstream:e.upstream},{projectGraph:l,projects:t.projects,workspaceRoot:o},{defaultBase:d?.defaultBase});let c=P(w.affectedProjects,t,e.query);c=y(c,t,e.tag);const i=[...new Set(c.map(m=>t.projects[m]?.root??m))].sort();process.stdout.write(i.length>0?`${i.join(`
|
|
2
2
|
`)}
|
|
3
3
|
`:"");return}const a=b(u??[],s?.argv??[]);if(a.length===0)throw new n("Missing target. Usage: vis affected <target>");await g.runCommand("run",{argv:a.includes("--affected")?a:[...a,"--affected"]})};export{G as default,b as forwardedArgv};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as q,b as J,p as f,O as G,c as T,d as O}from"./cli-main.js";import{l as H,r as K,t as m,c as Q,k as W,R as c,E as X,m as y,n as P,o as Z,s as _}from"./catalog.js";import{i as ee}from"../packem_shared/index-BjdW45xX.js";import{v as te,r as se,f as re}from"../packem_shared/ai-analysis-DSQQDFU9.js";import{V as ae}from"../packem_shared/vis-user-error-
|
|
1
|
+
import{a as q,b as J,p as f,O as G,c as T,d as O}from"./cli-main.js";import{l as H,r as K,t as m,c as Q,k as W,R as c,E as X,m as y,n as P,o as Z,s as _}from"./catalog.js";import{i as ee}from"../packem_shared/index-BjdW45xX.js";import{v as te,r as se,f as re}from"../packem_shared/ai-analysis-DSQQDFU9.js";import{V as ae}from"../packem_shared/vis-user-error-DJvfOpBX.js";import{d as ne}from"../packem_shared/pm-runner-d93_73O6.js";import{s as oe}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{U as ce,V as ie,C as j}from"../packem_shared/vis-update-app-DNeU8RBQ.js";const we=async({argument:$,logger:s,options:e,visConfig:o,workspaceRoot:C})=>{if(!C)throw new Error("Could not determine workspace root. Run this command inside a monorepo.");const d=C;if(e.sync&&!e.securityConfig)throw new ae("--sync requires --security-config. Run `vis check --security-config --sync`.");if(e.securityConfig){const t=ne(d);if(q(o??{},t.name),e.sync&&t.name==="pnpm"){const r=J(o??{});if(r.length>0){f.info(`
|
|
2
2
|
Settings that would sync to pnpm-workspace.yaml:`);for(const S of r)f.success(` ${S}`)}else f.info("No security settings to sync.")}else e.sync&&t.name!=="pnpm"&&(f.info(`--sync is only available for pnpm projects. Your project uses ${t.name}.`),f.info("vis enforces security settings at the vis layer for non-pnpm projects."));if(!e.security&&!$?.length)return}const{packageManager:N}=G(d),U=H(d),i=o?.update??{},h=K(d,N,{dev:e.dev,includeInternal:e["include-internal"],peer:e.peer,prod:e.prod});if(h.size===0){s.info("No catalogs found.");return}const k=e.target??i.target??"latest";if(!["latest","minor","patch"].includes(k))throw new Error(`Invalid target "${k}". Use: latest, minor, or patch.`);const D={exclude:[...m(e.exclude),...m(i.exclude)],ignore:m(i.ignore),include:[...m(e.include),...m(i.include),...$],includeLocked:!!e.includeLocked,includePrerelease:e.prerelease||i.prerelease||!1,security:e.security!==!1,target:k};let x=0;for(const t of h.values())x+=t.size;const w=!!process.stdout.isTTY&&!ee;let l;const I=w?(t,r)=>{l?l.rerender(c.createElement(j,{current:t,total:r})):l=O(c.createElement(j,{current:t,total:r}),{interactive:!0,patchConsole:!1})}:(t,r)=>{s.info(`Checking ${String(t)}/${String(r)} dependencies...`)};w||s.info(`Checking ${String(x)} catalog dependencies against npm registry...
|
|
3
3
|
`);const g=new Set;T("socket")&&g.add("socket"),T("depsDev")&&g.add("deps-dev");const v=o?.security?.policies?.score?.minimum,M=Q(o?.security,{disabled:g,minimumScore:v}),{failed:E,outdated:n}=await W(h,D,U,I,d,M,o?.security?.acceptedRisks);if(l&&(l.clear(),l.unmount()),E.length>0&&s.warn(`Failed to fetch: ${E.join(", ")}`),n.length===0){s.info("All catalog dependencies are up to date.");return}const R=e.format??i.format??"table",V=te(e.aiType??"impact"),u=e.ai?await se(n,s,o?.ai,V):void 0;if(w&&R==="table"){const t=new ce(n,u??null),r=o?.tui?.autoExit??!1,S=r===!0?3:typeof r=="number"?r:0;await O(c.createElement(ie,{autoExitSeconds:S,isDryRun:!0,store:t}),{alternateScreen:!0,exitOnCtrlC:!1,interactive:!0,patchConsole:!0}).waitUntilExit();const B=process.stdout.columns||80;process.stdout.write(`
|
|
4
4
|
`);for(const a of n){const Y=a.vulnerabilities?.length||a.socketReport&&a.socketReport.alerts.length>0,b=!!a.acceptedRisk,z=Y?b?"✓":"⚠":"✓",F=b?"gray":a.updateType==="major"?"red":a.updateType==="minor"?"yellow":"green",p=a.socketReport?.score.overall,L=p===void 0?"":` [${String(Math.round(p*100))}%]`,A=p===void 0?void 0:oe(p);process.stdout.write(`${X(c.createElement(y,null," ",c.createElement(y,{color:F},z),` ${a.packageName} ${a.currentRange} → ${a.newRange}`,c.createElement(y,{dimColor:!0},` ${a.updateType}`),A?c.createElement(y,{color:A},L):null),{columns:B})}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as ae}from"node:module";import{e as h,z as O}from"../packem_shared/index-DHD8wb6Z.js";import{V as J}from"../packem_shared/vis-user-error-
|
|
1
|
+
import{createRequire as ae}from"node:module";import{e as h,z as O}from"../packem_shared/index-DHD8wb6Z.js";import{V as J}from"../packem_shared/vis-user-error-DJvfOpBX.js";import{ab as z,ac as he,ad as X,ae as R,af as me,ag as pe,ah as ke,ai as $e,aj as j,ak as we,al as Y,am as Q,an as Z,ao as ee,ap as te}from"./cli-main.js";import{y as b}from"../packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{m as Ee}from"./ts-loader.js";import{L as ye}from"../packem_shared/index-BisalDCf.js";import{F as ve}from"./catalog.js";import{allKnownTags as Se,tagsFromPaths as Re,NATIVE_BINDING_VERSION as G}from"#native";import{h as ne}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let ce;const fe=e=>(ce??=ae(import.meta.url))(e),x=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,F=e=>{if(typeof x<"u"&&x.versions&&x.versions.node){const[t,n]=x.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return x.getBuiltinModule(e)}return fe(e)},{readdirSync:q,statSync:M,readFileSync:I,existsSync:T,writeFileSync:y,unlinkSync:le,rmSync:ue,chmodSync:de}=F("node:fs"),{cwd:A}=x,{createInterface:ge}=F("node:readline"),{spawnSync:E}=F("node:child_process"),{basename:be}=F("node:path"),_e=/^# ([^:\s]\S*)(?::\s+(.+))?$/,xe=e=>{const t=[],n=e.split(`
|
|
2
2
|
`);let s;for(const o of n){if(o.startsWith("#!")||o.startsWith("# Generated by")||o.startsWith("# NOTE:")||o==="set -e"||o==="")continue;const i=_e.exec(o);if(i){s&&t.push(s),s={command:"",id:i[1]??"",...i[2]?{name:i[2]}:{}};continue}s?s.command=s.command.length>0?`${s.command}
|
|
3
3
|
${o}`:o:s={command:o,id:"(custom)"}}return s&&t.push(s),t},Ae=(e,t)=>{const n=h(e,t),s=[],o=new Set(z);if(b(n))for(const i of q(n)){if(i.startsWith(".")||i==="_"||!o.has(i))continue;const r=h(n,i);if(!M(r).isFile())continue;const c=O(r),a=xe(c);s.push({blocks:a,rawLineCount:c.split(`
|
|
4
4
|
`).length,stage:i})}return s.sort((i,r)=>i.stage.localeCompare(r.stage)),{hooksDirectory:t,stages:s}},Ie=e=>{const t=[];if(e.stages.length===0)return t.push(`No hooks installed in ${e.hooksDirectory}/.`),t;t.push(`Hooks in ${e.hooksDirectory}/:`);for(const n of e.stages)if(t.push("",`${n.stage} (${n.rawLineCount} lines)`),n.blocks.length===0)t.push(" (empty)");else for(const s of n.blocks){const o=s.name?`${s.id} — ${s.name}`:s.id;t.push(` - ${o}`);const i=s.command.split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as rr}from"node:module";import{e as ue,m as Ss,$ as or,a as cr,z as ar}from"../packem_shared/index-DHD8wb6Z.js";import{expandAffected as lr,getChangedFiles as dr,buildEnhancedPath as ur,enforceProjectConstraints as fr,expandTokensInString as zt,parsePartition as hr,TaskScheduler as pr,createTaskGraph as mr,reverseTaskGraph as gr,resolveTurboEnvCompat as wr,CompositeLifeCycle as Yt,defaultTaskRunner as Kt,TerminalBuffer as yt,runConcurrently as tt,createLogReporter as vr,generateRunSummary as Xt,writeRunSummary as yr,readLastRunSummary as xr,getLastRunSummaryPath as jr,writeChromeTrace as kr}from"@visulima/task-runner";import{i as Ye}from"../packem_shared/index-BjdW45xX.js";import{U as Ts,W as br,T as Sr,v as Jt,X as Tr,Y as $r,d as Ir,Z as Cr,ar as Er,as as Rr,at as Pr,au as Mr,k as Fr,av as Or}from"./cli-main.js";import{u as U,y as n,X as g,m as a,E as me,R as J,w as Ar,d as Lr,b as Dr,Q as Br}from"./catalog.js";import{V as Ke}from"../packem_shared/vis-user-error-By2ZNeEA.js";import{d as _r,r as Nr}from"../packem_shared/lockfile-DVFySxTS.js";import{y as $s}from"../packem_shared/index-BisalDCf.js";import{F as Yr}from"../packem_shared/failure-log-DE_MJCzB.js";import{r as Kr}from"../packem_shared/command-runtime-CiLVo4ED.js";import{r as Xr}from"../packem_shared/toolchain-DY11tPCw.js";import{i as Jr,r as Qr,s as Zr,a as en,b as tn,c as sn,d as rn,e as nn,H as on,f as cn}from"../packem_shared/lifecycle-DW8KRF5d.js";import{s as an}from"../packem_shared/affected-selection-BmUh3_Qp.js";import{c as Zt,p as ln,a as dn,b as un,r as fn,f as hn,s as pn}from"../packem_shared/project-name-filter-D6uEN2ot.js";import{p as mn,r as gn,f as wn,a as vn}from"../packem_shared/selectors-B7lSFz7l.js";import{r as at,l as jt,d as yn,s as xn,m as jn,a as kn}from"../packem_shared/target-options-d_rIrLyq.js";import{T as Is,C as Cs,D as lt,E as Es}from"../packem_shared/symbols-BXDZ_sKt.js";import{q as In,j as Cn,X as ht,F as ts}from"../packem_shared/index.server-BAjDJSEu.js";import{parseStacktrace as En,codeFrame as Rn}from"@visulima/error";import{originalPositionFor as Pn,sourceContentFor as Mn,loadSourceMap as Fn}from"@visulima/source-map";import{l as Rs}from"../packem_shared/spinner-BM_0Bj6x.js";import{R as Bn,c as st}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{c as ss,a as _n,s as rs}from"../packem_shared/watch-Dswvj6Zp.js";import gt from"./index.js";import{U as Ps}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let nr;const ir=s=>(nr??=rr(import.meta.url))(s),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pe=s=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[e,t]=ze.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ze.getBuiltinModule(s)}return ir(s)},{existsSync:De,mkdirSync:Gr,writeFileSync:xt,readFileSync:We,openSync:Wr,statSync:Qt,readSync:Hr,closeSync:qr,mkdtempSync:Vr}=Pe("node:fs"),{createInterface:Ur,emitKeypressEvents:zr}=Pe("node:readline"),{isAbsolute:bn,resolve:es,dirname:Sn,relative:Tn}=Pe("node:path"),{fileURLToPath:$n}=Pe("node:url"),{createHash:On}=Pe("node:crypto"),{mkdir:An,appendFile:dt}=Pe("node:fs/promises"),{platform:Ln,homedir:kt,tmpdir:Dn}=Pe("node:os"),{spawn:Nn}=Pe("node:child_process"),Gn=27,Wn={95:"apc",80:"dcs",94:"pm",88:"sos"},Hn={159:"apc",144:"dcs",158:"pm",152:"sos"},Ms=s=>s===155||s===157||s===144||s===152||s===158||s===159,Fs=(s,e)=>{for(let t=e;t<s.length;t+=1){const r=s.codePointAt(t);if(r>=64&&r<=126)return t}return-1},rt=(s,e,t)=>{for(let r=e;r<s.length;r+=1){const c=s.codePointAt(r);if(c===156||t&&c===7)return r;if(c===27&&s.codePointAt(r+1)===92)return r+1}return-1},qn=(s,e)=>{const t=s.codePointAt(e+1);if(t===91){const r=Fs(s,e+2);return r===-1?void 0:{end:r,kind:"csi"}}if(t===93){const r=rt(s,e+2,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===80||t===88||t===94||t===95){const r=rt(s,e+2,!1),c=Wn[t];return r===-1?void 0:{end:r,kind:c}}return t===void 0?void 0:{end:e+1,kind:"escape"}},Vn=(s,e)=>{const t=s.codePointAt(e);if(t===155){const r=Fs(s,e+1);return r===-1?void 0:{end:r,kind:"csi"}}if(t===157){const r=rt(s,e+1,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===144||t===152||t===158||t===159){const r=rt(s,e+1,!1),c=Hn[t];return r===-1?void 0:{end:r,kind:c}}},Un=s=>{if(s.includes(String.fromCodePoint(27)))return!0;for(let e=0;e<s.length;e+=1)if(Ms(s.codePointAt(e)))return!0;return!1},zn=s=>{if(!Un(s))return s;let e="",t=0,r=0;const{length:c}=s;for(;r<c;){const o=s.codePointAt(r);let i;if(o===Gn)i=qn(s,r);else if(Ms(o))i=Vn(s,r);else{r+=1;continue}const d=i===void 0?c-1:i.end;e+=s.slice(t,r),t=d+1,r=d+1}return e+=s.slice(t),e},Yn=(s,e,t,r,c,o,i,d,u,p,f,h,l,b)=>{const T={d:r,h:c,m:o,mo:e,ms:d,s:i,w:t,y:s};return T.future=u,T.past=p,T.decimal=f,h!==void 0&&(T.unitMap=h),T.groupSeparator=l,T.placeholderSeparator=b,T},Kn={d:"d",day:"d",days:"d",h:"h",hour:"h",hours:"h",hr:"h",hrs:"h",m:"m",millisecond:"ms",milliseconds:"ms",min:"m",mins:"m",minute:"m",minutes:"m",mo:"mo",month:"mo",months:"mo",ms:"ms",s:"s",sec:"s",second:"s",seconds:"s",secs:"s",w:"w",week:"w",weeks:"w",y:"y",year:"y",years:"y",yr:"y",yrs:"y"},Xn=Yn(s=>`year${s===1?"":"s"}`,s=>`month${s===1?"":"s"}`,s=>`week${s===1?"":"s"}`,s=>`day${s===1?"":"s"}`,s=>`hour${s===1?"":"s"}`,s=>`minute${s===1?"":"s"}`,s=>`second${s===1?"":"s"}`,s=>`millisecond${s===1?"":"s"}`,"in %s","%s ago",".",Kn,",","_"),ns=new WeakSet,Jn=s=>{if(ns.has(s))return;const e=["y","mo","w","d","h","m","s","ms"];for(const r of e)if(!Object.hasOwn(s,r))throw new TypeError(`Missing required property: ${r}`);if(s.future!==void 0&&typeof s.future!="string")throw new TypeError("Properties future and past must be of type string");if(s.past!==void 0&&typeof s.past!="string")throw new TypeError("Properties future and past must be of type string");const t=["y","mo","w","d","h","m","s","ms"];for(const r of t)if(typeof s[r]!="string"&&typeof s[r]!="function")throw new TypeError(`Property ${r} must be of type string or function`);if(s.decimal&&typeof s.decimal!="string")throw new TypeError("Property decimal must be of type string");if(s.delimiter&&typeof s.delimiter!="string")throw new TypeError("Property delimiter must be of type string");if(s._digitReplacements&&!Array.isArray(s._digitReplacements))throw new TypeError("Property _digitReplacements must be an array");if(s._numberFirst&&typeof s._numberFirst!="boolean")throw new TypeError("Property _numberFirst must be of type boolean");if(s.unitMap&&typeof s.unitMap!="object")throw new TypeError("Property unitMap must be an object");if(s.unitMap&&Object.values(s.unitMap).some(r=>typeof r!="string"))throw new TypeError("All values in unitMap must be of type string");ns.add(s)},Os=(s,e)=>{if(!Number.isFinite(s)||e<0||Number.isInteger(s))return s;const t=10**e,r=Number((s*t).toPrecision(15));return Math.trunc(r)/t},is=({unitCount:s,unitName:e},t,r)=>{let{spacer:c}=r;const{maxDecimalPoints:o}=r;let i=".";r.decimal!==void 0?i=r.decimal:t.decimal!==void 0&&(i=t.decimal);let d;"digitReplacements"in r?d=r.digitReplacements:"_digitReplacements"in t&&(d=t._digitReplacements);let u,p=s;o!==void 0&&(p=Os(s,o));const f=p.toString();if(!t._hideCountIf2||s!==2)if(d){u="";for(const b of f)u+=b==="."?i:d[b]}else u=f.replace(".",i);else u="";const h=t[e];let l=h;return typeof h=="function"&&(l=h(s)),t._hideCountIf2&&s===2&&(c=""),t._numberFirst?l+c+u:u+c+l},Qn=(s,e)=>{const{units:t}=e;if(t.length===0)return[];const{unitMeasures:r}=e,c=e.largest??Number.POSITIVE_INFINITY,o={};let i,d,u,p=s;for(d=0;d<t.length;d++){i=t[d];const h=r[i];u=d===t.length-1?p/h:Math.floor(p/h),o[i]=u,p-=u*h}if(e.round){let h=c;for(d=0;d<t.length;d++)if(i=t[d],u=o[i],u!==0&&(h--,h===0)){for(let l=d+1;l<t.length;l++){const b=t[l],T=o[b];o[i]=(o[i]??0)+T*r[b]/r[i],o[b]=0}break}for(d=t.length-1;d>=0;d--){if(i=t[d],u=o[i],u===0)continue;const l=Math.round(u);if(o[i]=l,d===0)break;const b=t[d-1],T=r[b],N=Math.floor(l*r[i]/T);if(N)o[b]=(o[b]??0)+N,o[i]=0;else break}}const f=[];for(d=0;d<t.length&&f.length<c;d++){if(i=t[d],u=o[i],u&&!e.round&&f.length===c-1){let h,l=0;for(h=d+1,t.length;h<t.length;h++){const b=t[h];l+=o[b]*(e.unitMeasures[b]/e.unitMeasures[i])}u+=l,e.maxDecimalPoints!==void 0&&(u=Os(u,e.maxDecimalPoints))}u&&f.push({unitCount:u,unitName:i})}return f},Zn=(s,e,t)=>{const{language:r,units:c}=e;if(s.length===0){const h=c.at(-1);return is({unitCount:0,unitName:h},r,e)}const{conjunction:o,serialComma:i}=e;let d=", ";e.delimiter!==void 0?d=e.delimiter:r.delimiter!==void 0&&(d=r.delimiter);let u="";e.timeAdverb&&t!==0&&(u=r.future??"",t<0&&(u=r.past??""));const p=s.map(h=>is(h,r,e));let f;return!o||s.length===1?f=p.join(d):s.length===2?f=p.join(o):f=p.slice(0,-1).join(d)+(i?",":"")+o+(p.at(-1)??""),u&&(f=u.replace("%s",f)),f},ei=(s,e)=>{if(Number.isNaN(s))throw new TypeError("Expected a valid number");if(typeof s!="number")throw new TypeError("Expected a number for milliseconds input");const t={conjunction:"",language:Xn,round:!1,serialComma:!0,spacer:" ",timeAdverb:!1,unitMeasures:{d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},units:["w","d","h","m","s"],...e};Jn(t.language);const r=Math.abs(s),c=Qn(r,t);return Zn(c,t,s)},be="@voidzero-dev/vite-task-client",bt="@visulima/task-runner-client",nt=`npm:${bt}@^1`,As=ue(".vis",".vite-client-override-declined"),it="pnpm-workspace.yaml",ti=["dependencies","devDependencies","optionalDependencies","peerDependencies"],Ls=s=>{try{return JSON.parse(We(s,"utf8"))}catch{return}},si=s=>{const e=ue(s,it);if(De(e))try{return $s(We(e,"utf8")).toJS()?.overrides}catch{return}},ri=s=>s==="pnpm"||s==="aube"?"pnpm.overrides":s==="yarn"?"resolutions":"overrides",ni=s=>{const e=ue(s,it);try{const t=$s(We(e,"utf8"));return t.setIn(["overrides",be],nt),xt(e,t.toString()),!0}catch{return!1}},os=s=>s!==void 0&&ti.some(e=>s[e]?.[be]!==void 0),ii=(s,e)=>s!==void 0&&(s.pnpm?.overrides?.[be]!==void 0||s.overrides?.[be]!==void 0||s.resolutions?.[be]!==void 0)||e?.[be]!==void 0,oi=(s,e=[])=>{const t=Ls(ue(s,"package.json")),r=De(ue(s,"node_modules","@voidzero-dev","vite-task-client"));return{alreadyOverridden:ii(t,si(s)),declined:De(ue(s,As)),manager:_r(s)?.manager,present:os(t)||r||e.some(c=>os(c))}},ci=s=>{try{const e=ue(s,As);Gr(Ss(e),{recursive:!0}),xt(e,`Declined adding the ${be} → ${bt} override.
|
|
1
|
+
import{createRequire as rr}from"node:module";import{e as ue,m as Ss,$ as or,a as cr,z as ar}from"../packem_shared/index-DHD8wb6Z.js";import{expandAffected as lr,getChangedFiles as dr,buildEnhancedPath as ur,enforceProjectConstraints as fr,expandTokensInString as zt,parsePartition as hr,TaskScheduler as pr,createTaskGraph as mr,reverseTaskGraph as gr,resolveTurboEnvCompat as wr,CompositeLifeCycle as Yt,defaultTaskRunner as Kt,TerminalBuffer as yt,runConcurrently as tt,createLogReporter as vr,generateRunSummary as Xt,writeRunSummary as yr,readLastRunSummary as xr,getLastRunSummaryPath as jr,writeChromeTrace as kr}from"@visulima/task-runner";import{i as Ye}from"../packem_shared/index-BjdW45xX.js";import{U as Ts,W as br,T as Sr,v as Jt,X as Tr,Y as $r,d as Ir,Z as Cr,ar as Er,as as Rr,at as Pr,au as Mr,k as Fr,av as Or}from"./cli-main.js";import{u as U,y as n,X as g,m as a,E as me,R as J,w as Ar,d as Lr,b as Dr,Q as Br}from"./catalog.js";import{V as Ke}from"../packem_shared/vis-user-error-DJvfOpBX.js";import{d as _r,r as Nr}from"../packem_shared/lockfile-DVFySxTS.js";import{y as $s}from"../packem_shared/index-BisalDCf.js";import{F as Yr}from"../packem_shared/failure-log-DE_MJCzB.js";import{r as Kr}from"../packem_shared/command-runtime-CiLVo4ED.js";import{r as Xr}from"../packem_shared/toolchain-DY11tPCw.js";import{i as Jr,r as Qr,s as Zr,a as en,b as tn,c as sn,d as rn,e as nn,H as on,f as cn}from"../packem_shared/lifecycle-DW8KRF5d.js";import{s as an}from"../packem_shared/affected-selection-DLrq50Mz.js";import{c as Zt,p as ln,a as dn,b as un,r as fn,f as hn,s as pn}from"../packem_shared/project-name-filter-DdXd3P3a.js";import{p as mn,r as gn,f as wn,a as vn}from"../packem_shared/selectors-B7lSFz7l.js";import{r as at,l as jt,d as yn,s as xn,m as jn,a as kn}from"../packem_shared/target-options-d_rIrLyq.js";import{T as Is,C as Cs,D as lt,E as Es}from"../packem_shared/symbols-BXDZ_sKt.js";import{q as In,j as Cn,X as ht,F as ts}from"../packem_shared/index.server-BAjDJSEu.js";import{parseStacktrace as En,codeFrame as Rn}from"@visulima/error";import{originalPositionFor as Pn,sourceContentFor as Mn,loadSourceMap as Fn}from"@visulima/source-map";import{l as Rs}from"../packem_shared/spinner-BM_0Bj6x.js";import{R as Bn,c as st}from"../packem_shared/formatBytes-BHAzNIrn-Bkk_uRS-.js";import{c as ss,a as _n,s as rs}from"../packem_shared/watch-Dswvj6Zp.js";import gt from"./index.js";import{U as Ps}from"../packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let nr;const ir=s=>(nr??=rr(import.meta.url))(s),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Pe=s=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[e,t]=ze.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ze.getBuiltinModule(s)}return ir(s)},{existsSync:De,mkdirSync:Gr,writeFileSync:xt,readFileSync:We,openSync:Wr,statSync:Qt,readSync:Hr,closeSync:qr,mkdtempSync:Vr}=Pe("node:fs"),{createInterface:Ur,emitKeypressEvents:zr}=Pe("node:readline"),{isAbsolute:bn,resolve:es,dirname:Sn,relative:Tn}=Pe("node:path"),{fileURLToPath:$n}=Pe("node:url"),{createHash:On}=Pe("node:crypto"),{mkdir:An,appendFile:dt}=Pe("node:fs/promises"),{platform:Ln,homedir:kt,tmpdir:Dn}=Pe("node:os"),{spawn:Nn}=Pe("node:child_process"),Gn=27,Wn={95:"apc",80:"dcs",94:"pm",88:"sos"},Hn={159:"apc",144:"dcs",158:"pm",152:"sos"},Ms=s=>s===155||s===157||s===144||s===152||s===158||s===159,Fs=(s,e)=>{for(let t=e;t<s.length;t+=1){const r=s.codePointAt(t);if(r>=64&&r<=126)return t}return-1},rt=(s,e,t)=>{for(let r=e;r<s.length;r+=1){const c=s.codePointAt(r);if(c===156||t&&c===7)return r;if(c===27&&s.codePointAt(r+1)===92)return r+1}return-1},qn=(s,e)=>{const t=s.codePointAt(e+1);if(t===91){const r=Fs(s,e+2);return r===-1?void 0:{end:r,kind:"csi"}}if(t===93){const r=rt(s,e+2,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===80||t===88||t===94||t===95){const r=rt(s,e+2,!1),c=Wn[t];return r===-1?void 0:{end:r,kind:c}}return t===void 0?void 0:{end:e+1,kind:"escape"}},Vn=(s,e)=>{const t=s.codePointAt(e);if(t===155){const r=Fs(s,e+1);return r===-1?void 0:{end:r,kind:"csi"}}if(t===157){const r=rt(s,e+1,!0);return r===-1?void 0:{end:r,kind:"osc"}}if(t===144||t===152||t===158||t===159){const r=rt(s,e+1,!1),c=Hn[t];return r===-1?void 0:{end:r,kind:c}}},Un=s=>{if(s.includes(String.fromCodePoint(27)))return!0;for(let e=0;e<s.length;e+=1)if(Ms(s.codePointAt(e)))return!0;return!1},zn=s=>{if(!Un(s))return s;let e="",t=0,r=0;const{length:c}=s;for(;r<c;){const o=s.codePointAt(r);let i;if(o===Gn)i=qn(s,r);else if(Ms(o))i=Vn(s,r);else{r+=1;continue}const d=i===void 0?c-1:i.end;e+=s.slice(t,r),t=d+1,r=d+1}return e+=s.slice(t),e},Yn=(s,e,t,r,c,o,i,d,u,p,f,h,l,b)=>{const T={d:r,h:c,m:o,mo:e,ms:d,s:i,w:t,y:s};return T.future=u,T.past=p,T.decimal=f,h!==void 0&&(T.unitMap=h),T.groupSeparator=l,T.placeholderSeparator=b,T},Kn={d:"d",day:"d",days:"d",h:"h",hour:"h",hours:"h",hr:"h",hrs:"h",m:"m",millisecond:"ms",milliseconds:"ms",min:"m",mins:"m",minute:"m",minutes:"m",mo:"mo",month:"mo",months:"mo",ms:"ms",s:"s",sec:"s",second:"s",seconds:"s",secs:"s",w:"w",week:"w",weeks:"w",y:"y",year:"y",years:"y",yr:"y",yrs:"y"},Xn=Yn(s=>`year${s===1?"":"s"}`,s=>`month${s===1?"":"s"}`,s=>`week${s===1?"":"s"}`,s=>`day${s===1?"":"s"}`,s=>`hour${s===1?"":"s"}`,s=>`minute${s===1?"":"s"}`,s=>`second${s===1?"":"s"}`,s=>`millisecond${s===1?"":"s"}`,"in %s","%s ago",".",Kn,",","_"),ns=new WeakSet,Jn=s=>{if(ns.has(s))return;const e=["y","mo","w","d","h","m","s","ms"];for(const r of e)if(!Object.hasOwn(s,r))throw new TypeError(`Missing required property: ${r}`);if(s.future!==void 0&&typeof s.future!="string")throw new TypeError("Properties future and past must be of type string");if(s.past!==void 0&&typeof s.past!="string")throw new TypeError("Properties future and past must be of type string");const t=["y","mo","w","d","h","m","s","ms"];for(const r of t)if(typeof s[r]!="string"&&typeof s[r]!="function")throw new TypeError(`Property ${r} must be of type string or function`);if(s.decimal&&typeof s.decimal!="string")throw new TypeError("Property decimal must be of type string");if(s.delimiter&&typeof s.delimiter!="string")throw new TypeError("Property delimiter must be of type string");if(s._digitReplacements&&!Array.isArray(s._digitReplacements))throw new TypeError("Property _digitReplacements must be an array");if(s._numberFirst&&typeof s._numberFirst!="boolean")throw new TypeError("Property _numberFirst must be of type boolean");if(s.unitMap&&typeof s.unitMap!="object")throw new TypeError("Property unitMap must be an object");if(s.unitMap&&Object.values(s.unitMap).some(r=>typeof r!="string"))throw new TypeError("All values in unitMap must be of type string");ns.add(s)},Os=(s,e)=>{if(!Number.isFinite(s)||e<0||Number.isInteger(s))return s;const t=10**e,r=Number((s*t).toPrecision(15));return Math.trunc(r)/t},is=({unitCount:s,unitName:e},t,r)=>{let{spacer:c}=r;const{maxDecimalPoints:o}=r;let i=".";r.decimal!==void 0?i=r.decimal:t.decimal!==void 0&&(i=t.decimal);let d;"digitReplacements"in r?d=r.digitReplacements:"_digitReplacements"in t&&(d=t._digitReplacements);let u,p=s;o!==void 0&&(p=Os(s,o));const f=p.toString();if(!t._hideCountIf2||s!==2)if(d){u="";for(const b of f)u+=b==="."?i:d[b]}else u=f.replace(".",i);else u="";const h=t[e];let l=h;return typeof h=="function"&&(l=h(s)),t._hideCountIf2&&s===2&&(c=""),t._numberFirst?l+c+u:u+c+l},Qn=(s,e)=>{const{units:t}=e;if(t.length===0)return[];const{unitMeasures:r}=e,c=e.largest??Number.POSITIVE_INFINITY,o={};let i,d,u,p=s;for(d=0;d<t.length;d++){i=t[d];const h=r[i];u=d===t.length-1?p/h:Math.floor(p/h),o[i]=u,p-=u*h}if(e.round){let h=c;for(d=0;d<t.length;d++)if(i=t[d],u=o[i],u!==0&&(h--,h===0)){for(let l=d+1;l<t.length;l++){const b=t[l],T=o[b];o[i]=(o[i]??0)+T*r[b]/r[i],o[b]=0}break}for(d=t.length-1;d>=0;d--){if(i=t[d],u=o[i],u===0)continue;const l=Math.round(u);if(o[i]=l,d===0)break;const b=t[d-1],T=r[b],N=Math.floor(l*r[i]/T);if(N)o[b]=(o[b]??0)+N,o[i]=0;else break}}const f=[];for(d=0;d<t.length&&f.length<c;d++){if(i=t[d],u=o[i],u&&!e.round&&f.length===c-1){let h,l=0;for(h=d+1,t.length;h<t.length;h++){const b=t[h];l+=o[b]*(e.unitMeasures[b]/e.unitMeasures[i])}u+=l,e.maxDecimalPoints!==void 0&&(u=Os(u,e.maxDecimalPoints))}u&&f.push({unitCount:u,unitName:i})}return f},Zn=(s,e,t)=>{const{language:r,units:c}=e;if(s.length===0){const h=c.at(-1);return is({unitCount:0,unitName:h},r,e)}const{conjunction:o,serialComma:i}=e;let d=", ";e.delimiter!==void 0?d=e.delimiter:r.delimiter!==void 0&&(d=r.delimiter);let u="";e.timeAdverb&&t!==0&&(u=r.future??"",t<0&&(u=r.past??""));const p=s.map(h=>is(h,r,e));let f;return!o||s.length===1?f=p.join(d):s.length===2?f=p.join(o):f=p.slice(0,-1).join(d)+(i?",":"")+o+(p.at(-1)??""),u&&(f=u.replace("%s",f)),f},ei=(s,e)=>{if(Number.isNaN(s))throw new TypeError("Expected a valid number");if(typeof s!="number")throw new TypeError("Expected a number for milliseconds input");const t={conjunction:"",language:Xn,round:!1,serialComma:!0,spacer:" ",timeAdverb:!1,unitMeasures:{d:864e5,h:36e5,m:6e4,mo:2629746e3,ms:1,s:1e3,w:6048e5,y:31556952e3},units:["w","d","h","m","s"],...e};Jn(t.language);const r=Math.abs(s),c=Qn(r,t);return Zn(c,t,s)},be="@voidzero-dev/vite-task-client",bt="@visulima/task-runner-client",nt=`npm:${bt}@^1`,As=ue(".vis",".vite-client-override-declined"),it="pnpm-workspace.yaml",ti=["dependencies","devDependencies","optionalDependencies","peerDependencies"],Ls=s=>{try{return JSON.parse(We(s,"utf8"))}catch{return}},si=s=>{const e=ue(s,it);if(De(e))try{return $s(We(e,"utf8")).toJS()?.overrides}catch{return}},ri=s=>s==="pnpm"||s==="aube"?"pnpm.overrides":s==="yarn"?"resolutions":"overrides",ni=s=>{const e=ue(s,it);try{const t=$s(We(e,"utf8"));return t.setIn(["overrides",be],nt),xt(e,t.toString()),!0}catch{return!1}},os=s=>s!==void 0&&ti.some(e=>s[e]?.[be]!==void 0),ii=(s,e)=>s!==void 0&&(s.pnpm?.overrides?.[be]!==void 0||s.overrides?.[be]!==void 0||s.resolutions?.[be]!==void 0)||e?.[be]!==void 0,oi=(s,e=[])=>{const t=Ls(ue(s,"package.json")),r=De(ue(s,"node_modules","@voidzero-dev","vite-task-client"));return{alreadyOverridden:ii(t,si(s)),declined:De(ue(s,As)),manager:_r(s)?.manager,present:os(t)||r||e.some(c=>os(c))}},ci=s=>{try{const e=ue(s,As);Gr(Ss(e),{recursive:!0}),xt(e,`Declined adding the ${be} → ${bt} override.
|
|
2
2
|
Delete this file to be asked again.
|
|
3
3
|
`)}catch{}},ai=(s,e="npm")=>{const t=`${e} install`;if((e==="pnpm"||e==="aube")&&De(ue(s,it))&&ni(s))return{file:it,installCommand:t};const r=ue(s,"package.json"),c=Ls(r);if(!c)return;const o=ri(e);o==="pnpm.overrides"?(c.pnpm??={},c.pnpm.overrides??={},c.pnpm.overrides[be]=nt):(c[o]??={},c[o][be]=nt);try{xt(r,`${JSON.stringify(c,void 0,4)}
|
|
4
4
|
`)}catch{return}return{file:"package.json",installCommand:t}},li=async(s,e)=>{const t=oi(s,e.projectManifests);if(!t.present||t.alreadyOverridden||t.declined)return!1;const r=Ur({input:process.stdin,output:process.stdout});try{e.logger.info(`Detected ${be}. Its cache hints no-op under @visulima/task-runner unless aliased to ${bt} (a drop-in replacement).`);const c=await new Promise(i=>{r.question("Add the override now? [y/N] ",i)});if(!/^y(?:es)?$/i.test(c.trim()))return ci(s),e.logger.info("Skipped. Delete .vis/.vite-client-override-declined to be asked again."),!1;const o=ai(s,t.manager);return o===void 0?(e.logger.warn("Could not write the override automatically — add it manually (see @visulima/task-runner-client README)."),!1):(e.logger.info(`Added "${be}": "${nt}" to ${o.file}. Run \`${o.installCommand}\` to apply it.`),!0)}finally{r.close()}},di=({interactive:s,taskPty:e,workspacePty:t})=>e===!0?!0:e===!1?!1:s&&t!==!1,ui=s=>s.split(",").map(e=>e.trim()).filter(e=>e!==""),fi=(s,e,t)=>{const r=new Set,c=[];if(s===void 0||s.trim()==="")return{skipTaskIds:r,unmatchedPatterns:c};const o=[...t],i=new Set(o),d=new Map;for(const u of o){const p=u.lastIndexOf(":");if(p===-1)continue;const f=u.slice(p+1),h=d.get(f);h===void 0?d.set(f,[u]):h.push(u)}for(const u of ui(s)){if(u.startsWith("~:"))throw new Error(`--skip-cache does not support the closest-project selector "~:" (received "${u}"). Use \`pkg:target\`, \`:target\`, or \`#tag:target\`.`);if(i.has(u)){r.add(u);continue}const p=mn(u);if(!p){c.push(u);continue}let f=!1;switch(p.kind){case"all":{const h=d.get(p.target)??[];for(const l of h)r.add(l),f=!0;break}case"project":{const h=p.projects?.[0];if(h!==void 0){const l=`${h}:${p.target}`;i.has(l)&&(r.add(l),f=!0)}break}case"tag":{const{tag:h}=p;if(h!==void 0){const l=d.get(p.target)??[];for(const b of l){const T=b.slice(0,b.lastIndexOf(":"));e.projects[T]?.tags?.includes(h)===!0&&(r.add(b),f=!0)}}break}}f||c.push(u)}return{skipTaskIds:r,unmatchedPatterns:c}},hi=/\$(?:\{([A-Z_]\w*)(:-[^}]*)?\}|([A-Z_]\w*))/gi,pi=new Set(["0","!","#","$","*","-","?","@","_"]),mi=s=>{const e=new Map;for(const t of s.matchAll(hi)){const r=t[1],c=t[3],o=t[2],i=r??c;if(i===void 0||pi.has(i))continue;const d=o!==void 0,u=e.get(i);u===void 0?e.set(i,d):u&&!d&&e.set(i,!1)}return[...e.entries()].map(([t,r])=>({hasDefault:r,name:t}))},gi=s=>{const{command:e,processEnv:t,taskEnv:r,taskId:c}=s,o=mi(e);if(o.length===0)return;const i=[];for(const{hasDefault:d,name:u}of o){if(d)continue;const p=r[u],f=t[u];p===void 0&&f===void 0&&i.push(u)}if(i.length!==0)return{missing:i.toSorted(),taskId:c}},wi=s=>{const e=s.missing.map(t=>`$${t}`).join(", ");return`Strict env: ${s.taskId} references unset variable${s.missing.length===1?"":"s"} ${e}. Set ${s.missing.length===1?"it":"them"} in the task env, an envFile, or the parent shell — or opt out with options.strictEnv: false.`},vi=64*1024,cs=256,yi=new RegExp("[\x1B]\\[[0-?]*[ -/]*[@-~]","g"),pt=s=>s.replaceAll(yi,"").replaceAll("\r","");class as{#e=[];#r=new Set;#s=new Map;#n=new Map;constructor(e=[]){for(const t of e)this.#n.set(t,{id:t,status:"pending",tailLines:[]});this.#e=[...e],this.#i()}getSnapshot=()=>this.#s;subscribe=e=>(this.#r.add(e),()=>{this.#r.delete(e)});getIds(){return this.#e}getState(e){return this.#n.get(e)}getDockState(){let e=!1,t=!1;for(const r of this.#n.values())r.status==="crashed"||r.status==="failed"?e=!0:(r.status==="pending"||r.status==="starting")&&(t=!0);return e?"crash":t?"boot":"ready"}registerService(e){this.#n.has(e)||(this.#n.set(e,{id:e,status:"pending",tailLines:[]}),this.#e=[...this.#e,e],this.#o())}markStarting(e){this.#t(e,t=>({...t,errorMessage:void 0,startedAt:t.startedAt??Date.now(),status:"starting"}))}markStarted(e,t){this.#t(e,r=>({...r,startedAt:r.startedAt??Date.now(),status:r.status==="ready"?"ready":"starting"}))}markReady(e,t){this.#t(e,r=>({...r,errorMessage:void 0,port:t.port,readyAt:Date.now(),status:"ready"}))}markFailed(e,t,r){const c=r?.message;this.#t(e,o=>({...o,errorMessage:pt(c??t),status:"failed"}))}markCrashed(e,t){const r=t.slice(-cs).map(c=>pt(c));this.#t(e,c=>({...c,errorMessage:r.length>0?r[r.length-1]:"process exited",status:"crashed",tailLines:r}))}appendLog(e,t){const r=t.split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{createRequire as At}from"node:module";import{w as It,$ as Wt,e as kt,j as C,P as b,q as x,J as N,b as L}from"../packem_shared/index.server-BAjDJSEu.js";import{u as dt,c as B,e as Mt}from"../packem_shared/vis-user-error-
|
|
1
|
+
import{createRequire as At}from"node:module";import{w as It,$ as Wt,e as kt,j as C,P as b,q as x,J as N,b as L}from"../packem_shared/index.server-BAjDJSEu.js";import{u as dt,c as B,e as Mt}from"../packem_shared/vis-user-error-DJvfOpBX.js";import{N as R,a as _}from"../packem_shared/Table-DyORjLji-CC9cYgCG.js";import{b as jt}from"../packem_shared/package-version-BFsJ8iyZ.js";let Ot;const xt=t=>(Ot??=At(import.meta.url))(t),E=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Et=t=>{if(typeof E<"u"&&E.versions&&E.versions.node){const[e,n]=E.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return E.getBuiltinModule(t)}return xt(t)},{createRequire:Bt}=Et("node:module"),Ct=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,z=t=>{let[,e]=Ct.exec(t)??[];const n=e?e.length:0;if(n===3){const s=e.charAt(0),o=e.charAt(1),i=e.charAt(2);e=s+s+o+o+i+i}else if(n!==6)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`[@visulima/colorize] Invalid hex color "${t}"; expected a 3- or 6-digit hex string (e.g. "#96C" or "#E0115F"). Falling back to black.`),[0,0,0];const r=Number.parseInt(e,16);return[r>>16&255,r>>8&255,r&255]},ut=(t,e,n)=>t===e&&e===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/51)+6*Math.round(e/51)+Math.round(n/51),H=t=>{let e,n,r;if(t<8)return 30+t;if(t<16)return 90+(t-8);if(t>=232)e=n=r=((t-232)*10+8)/255;else{t-=16;const i=t%36;e=Math.floor(t/36)/5,n=Math.floor(i/6)/5,r=i%6/5}const s=Math.max(e,n,r)*2;if(s===0)return 30;const o=30+(Math.round(r)<<2|Math.round(n)<<1|Math.round(e));return s===2?o+60:o},Z=(t,e,n)=>H(ut(t,e,n));function Rt({onlyFirst:t=!1}={}){const e="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,t?void 0:"g")}const S=(t,e,n)=>e>t?e:Math.min(t,n),m=39,f=49,X=10,tt={close:"",open:""},ht=t=>{const e=t>0?(l,u)=>({close:`\x1B[${String(u)}m`,open:`\x1B[${String(l)}m`}):()=>tt,n=l=>(u,p,g)=>l(ut(Number(u),Number(p),Number(g))),r=l=>u=>{const[p,g,w]=z(u);return l(p,g,w)};let s=l=>e(`38;5;${String(l)}`,m),o=l=>e(`48;5;${String(l)}`,f),i=(l,u,p)=>e(`38;2;${String(l)};${String(u)};${String(p)}`,m),a=(l,u,p)=>e(`48;2;${String(l)};${String(u)};${String(p)}`,f);t===1?(s=l=>e(H(Number(l)),m),o=l=>e(H(Number(l))+X,f),i=(l,u,p)=>e(Z(Number(l),Number(u),Number(p)),m),a=(l,u,p)=>e(Z(Number(l),Number(u),Number(p))+X,f)):t===2&&(i=n(s),a=n(o));const d={bold:e(1,22),dim:e(2,22),hidden:e(8,28),inverse:e(7,27),italic:e(3,23),overline:e(53,55),reset:e(0,0),strike:e(9,29),strikethrough:e(9,29),underline:e(4,24),underlineCurly:e("4:3",24),underlineDashed:e("4:5",24),underlineDotted:e("4:4",24),underlineDouble:e("4:2",24),visible:tt},c={bgBlack:e(40,f),bgBlackBright:e(100,f),bgBlue:e(44,f),bgBlueBright:e(104,f),bgCyan:e(46,f),bgCyanBright:e(106,f),bgGray:e(100,f),bgGreen:e(42,f),bgGreenBright:e(102,f),bgGrey:e(100,f),bgMagenta:e(45,f),bgMagentaBright:e(105,f),bgRed:e(41,f),bgRedBright:e(101,f),bgWhite:e(47,f),bgWhiteBright:e(107,f),bgYellow:e(43,f),bgYellowBright:e(103,f),black:e(30,m),blackBright:e(90,m),blue:e(34,m),blueBright:e(94,m),cyan:e(36,m),cyanBright:e(96,m),gray:e(90,m),green:e(32,m),greenBright:e(92,m),grey:e(90,m),magenta:e(35,m),magentaBright:e(95,m),red:e(31,m),redBright:e(91,m),white:e(37,m),whiteBright:e(97,m),yellow:e(33,m),yellowBright:e(93,m)},h={bg:l=>o(S(l,0,255)),bgHex:r(a),bgRgb:(l,u,p)=>a(S(l,0,255),S(u,0,255),S(p,0,255)),fg:l=>s(S(l,0,255)),hex:r(i),rgb:(l,u,p)=>i(S(l,0,255),S(u,0,255),S(p,0,255))};return{baseColors:c,baseStyles:d,styleMethods:h}},pt=It();Wt();ht(pt);const _t=(t,e,n)=>{if(e==="")return t;let r=t.indexOf(e);if(r<0)return t;const s=e.length;let o=0,i="";for(;~r;)i+=t.slice(o,r)+n,o=r+s,r=t.indexOf(e,o);return i+t.slice(o)},Pt=(t,e,n)=>{if(t==null||t==="")return"";let r;if(t.raw===void 0?r=String(t):r=String.raw(t,...e),r.includes("\x1B"))for(let s=n;s;s=s.props)r=_t(r,s.close,s.open);return r.includes(`
|
|
2
2
|
`)&&(r=r.replace(/(\r*\n)/g,`${n.closeStack}$1${n.openStack}`)),n.openStack+r+n.closeStack},Tt=function(t){const e=t?.level??pt,{baseColors:n,baseStyles:r,styleMethods:s}=ht(e),o={};let i=null;const a=({props:c},{close:h,open:l})=>{const u=(c?.openStack??"")+l,p=h+(c?.closeStack??""),g=(w,...y)=>Pt(w,y,g.props);return Object.setPrototypeOf(g,i),g.props={close:h,closeStack:p,open:l,openStack:u,props:c},g.open=u,g.close=p,g},d=c=>String(c);d.strip=c=>c.replaceAll(Rt(),"");for(const c in n)o[c]={get(){const h=a(this,n[c]);return Object.defineProperty(this,c,{value:h}),h}};for(const c in r)o[c]={get(){const h=a(this,r[c]);return Object.defineProperty(this,c,{value:h}),h}};for(const c in s)o[c]={get(){return(...h)=>a(this,s[c](...h))}};return o.ansi256=o.fg,o.bgAnsi256=o.bg,i=Object.defineProperties({},o),Object.setPrototypeOf(d,i),d},Lt=t=>(e,...n)=>{if(!Array.isArray(e)||!Array.isArray(e.raw))throw new TypeError("A tagged template literal must be provided");const r=[e.raw[0]];for(let s=1;s<e.raw.length;s+=1)r.push(String(n[s-1]).replaceAll(/[{}\\]/g,String.raw`\$&`),String(e.raw[s]));return t(r.join(""))},Ft=new Map([["0","\0"],["\\","\\"],["a","\x07"],["b","\b"],["e","\x1B"],["f","\f"],["n",`
|
|
3
3
|
`],["r","\r"],["t"," "],["v","\v"]]),mt=t=>{const e=t.startsWith("u"),n=t[1]==="{";return e&&!n&&t.length===5||t.startsWith("x")&&t.length===3?String.fromCodePoint(Number.parseInt(t.slice(1),16)):e&&n?String.fromCodePoint(Number.parseInt(t.slice(2,-1),16)):Ft.get(t)??t},Dt=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|\{(~)?(#?[\w:]+(?:\([^)]*\))?(?:\.#?[\w:]+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n))|(\})|((?:.|[\r\n\f])+?)/gi,et=/(?:^|\.)(?:(\w+)(?:\(([^)]*)\))?|#(?=[:a-f\d]{2,})([a-f\d]{6})?(?::([a-f\d]{6}))?)/gi,Vt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,qt=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,Ut=/\s*,\s*/,Gt=(t,e)=>{const n=[],r=e.trim().split(Ut);let s;for(const o of r){const i=Number(o);if(!Number.isNaN(i))n.push(i);else if(s=Vt.exec(o))n.push(s[2].replaceAll(qt,(a,d,c)=>d?mt(d):c));else throw new Error(`Invalid template style argument: ${o} (in style '${t}')`)}return n},zt=t=>{et.lastIndex=0;const e=[];let n;for(;(n=et.exec(t))!==null;){const r=n[1];n[2]?e.push([r,...Gt(r,n[2])]):n[3]||n[4]?(n[3]&&e.push(["rgb",...z(n[3])]),n[4]&&e.push(["bgRgb",...z(n[4])])):e.push([r])}return e},nt=(t,e)=>{const n={};for(const s of e)for(const o of s.styles)n[o[0]]=s.inverse?void 0:o.slice(1);let r=t;for(const[s,o]of Object.entries(n))if(Array.isArray(o)){if(!(s in r))throw new Error(`Unknown style: ${s}`);r=o.length>0?r[s](...o):r[s]}return r},Ht=t=>e=>{const n=[],r=[];let s=[];if(e.replaceAll(Dt,(o,i,a,d,c,h)=>{if(i)s.push(mt(i));else if(d){const l=s.join("");s=[],r.push(n.length===0?l:nt(t,n)(l)),n.push({inverse:a,styles:zt(d)})}else if(c){if(n.length===0)throw new Error("Found extraneous } in template literal");r.push(nt(t,n)(s.join(""))),s=[],n.pop()}else s.push(h)}),r.push(s.join("")),n.length>0)throw new Error(`template literal is missing ${String(n.length)} closing bracket${n.length===1?"":"s"} (\`}\`)`);return r.join("")},Yt=new Tt,Jt=Ht(Yt),Kt=Lt(Jt);let Qt;const Zt=t=>(Qt??=Bt(import.meta.url))(t),O=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:A,F=t=>{if(typeof O<"u"&&O.versions&&O.versions.node){const[e,n]=O.versions.node.split(".").map(Number);if(e>22||e===22&&n>=3||e===20&&n>=16)return O.getBuiltinModule(t)}return Zt(t)},A=O,{execFileSync:Xt}=F("node:child_process"),W=F("node:fs"),te=F("node:tty"),ee=F("node:os"),ne=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],re=12288,oe=65510,ie=[12288,12288,65281,65376,65504,65510],se=8361,ae=65518,le=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],ce=32,de=10630,ue=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],he=4352,pe=262141,ft=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],k=(t,e)=>{let n=0,r=Math.floor(t.length/2)-1;for(;n<=r;){const s=Math.floor((n+r)/2),o=s*2;if(e<t[o])r=s-1;else if(e>t[o+1])n=s+1;else return!0}return!1},rt=19968,[me,fe]=ge(ft);function ge(t){let e=t[0],n=t[1];for(let r=0;r<t.length;r+=2){const s=t[r],o=t[r+1];if(rt>=s&&rt<=o)return[s,o];o-s>n-e&&(e=s,n=o)}return[e,n]}const we=t=>t<161||t>1114109?!1:k(ne,t),be=t=>t<re||t>oe?!1:k(ie,t),ye=t=>t<se||t>ae?!1:k(le,t),$e=t=>t<ce||t>de?!1:k(ue,t),Ne=t=>t>=me&&t<=fe?!0:t<he||t>pe?!1:k(ft,t);function ve(t){return we(t)?"ambiguous":be(t)?"fullwidth":ye(t)?"halfwidth":$e(t)?"narrow":Ne(t)?"wide":"neutral"}function Se(t){if(!Number.isSafeInteger(t))throw new TypeError(`Expected a code point, got \`${typeof t}\`.`)}function gt(t){return Se(t),ve(t)}const ot=new Map,Ae=t=>[t.ambiguousIsNarrow?1:0,t.control,t.fullWidth,t.regular,t.wide].join("|"),Oe=t=>{const e=Ae(t.width);let n=ot.get(e);return n||(n=new Map,ot.set(e,n)),n},M=new RegExp(dt.source,"y"),U=new RegExp(Mt.source,"uy"),j=/(?:[\u0020-\u007E\u00A0-\u00FF](?!\uFE0F)){1,1000}/y,wt=t=>t>=32&&t<=126?"latin":t===8203||t===8204||t===8205||t===8288?"zero":t<=31||t>=127&&t<=159?"control":t>=160&&t<=255||t>=9472&&t<=9599?"latin":t>=4352&&t<=4607||t>=11904&&t<=40959||t>=44032&&t<=55215||t>=63744&&t<=64255||t>=65280&&t<=65519&&!(t>=65377&&t<=65439)||t>=12352&&t<=12543?"wide":t===8230?"latin":"other",xe=(t,e)=>{const n=Oe(e),r=Math.floor(t/65536),s=t%65536;let o=n.get(r);if(o||(o=new Map,n.set(r,o)),o.has(s))return o.get(s);let i;switch(wt(t)){case"control":{i=e.width.control;break}case"latin":{i=e.width.regular;break}case"wide":{i=e.width.wide;break}case"zero":{i=0;break}default:switch(gt(t)){case"ambiguous":{i=e.width.ambiguousIsNarrow?e.width.regular:e.width.wide;break}case"fullwidth":{i=e.width.fullWidth;break}case"wide":{i=e.width.wide;break}default:i=e.width.regular}}return o.set(s,i),i},Ee=t=>t>=768&&t<=879||t>=6832&&t<=6911||t>=7616&&t<=7679||t>=8400&&t<=8447||t>=65056&&t<=65071||t>=917760&&t<=917999||t>=65024&&t<=65039||t>=3633&&t<=3642||t>=3655&&t<=3662||t>=3761&&t<=3769||t>=3771&&t<=3772||t>=3784&&t<=3789||t>=2304&&t<=2307||t>=2362&&t<=2383||t>=2385&&t<=2391||t>=2402&&t<=2403||t>=2433&&t<=2435||t>=2492&&t<=2500||t>=2509&&t<=2509||t>=2561&&t<=2563||t>=2620&&t<=2637||t>=1611&&t<=1631||t>=1648&&t<=1648||t>=1750&&t<=1773||t>=2276&&t<=2302||t>=1425&&t<=1469||t>=1471&&t<=1471||t>=1473&&t<=1474||t>=1476&&t<=1477||t>=1479&&t<=1479||t>=3893&&t<=3893||t>=3895&&t<=3895||t>=3897&&t<=3897||t>=3953&&t<=3966||t>=3968&&t<=3972||t>=3974&&t<=3975?!0:t>=768&&t<=777||t>=803&&t<=803,Y=(t,e={})=>{if(!t||t.length===0)return{ellipsed:!1,index:0,truncated:!1,width:0};const n={truncation:{countAnsiEscapeCodes:e.countAnsiEscapeCodes??!1,ellipsis:e.ellipsis??"",ellipsisWidth:e.ellipsisWidth??(e.ellipsis?Y(e.ellipsis,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width:0),limit:e.limit??Number.POSITIVE_INFINITY},width:{ambiguousIsNarrow:e.ambiguousIsNarrow??!1,ansi:e.ansiWidth??0,control:e.controlWidth??0,emoji:e.emojiWidth??2,fullWidth:e.fullWidth??2,halfWidth:e.halfWidth??1,regular:e.regularWidth??1,tab:e.tabWidth??8,wide:e.wideWidth??2}},r=Math.max(0,n.truncation.limit-n.truncation.ellipsisWidth),{length:s}=t,o=s>1e4;let i=0,a=0,d=s,c=!1;const h=t.includes("\x1B")||t.includes("");for(;i<s;){if(h&&(t[i]==="\x1B"||t[i]==="")){if(t.startsWith("\x1B]8;;",i)){const y="\x1B]8;;\x07",v=y.length,D=t.indexOf("\x07",i+5);if(D!==-1){const V=t.indexOf(y,D+1);if(V!==-1){const vt=V+v,St=t.slice(D+1,V).replace(dt,""),Q=Y(St,{ambiguousIsNarrow:n.width.ambiguousIsNarrow,ansiWidth:n.width.ansi,controlWidth:n.width.control,countAnsiEscapeCodes:!1,ellipsis:n.truncation.ellipsis,ellipsisWidth:n.truncation.ellipsisWidth,emojiWidth:n.width.emoji,fullWidth:n.width.fullWidth,halfWidth:n.width.halfWidth,limit:Math.max(0,r-a),regularWidth:n.width.regular,tabWidth:n.width.tab,wideWidth:n.width.wide}),q=Q.width;if(Q.truncated)c=!0,d=Math.min(d,i);else if(a+q>r&&(d=Math.min(d,i),c=!0,a+q>n.truncation.limit))break;if(a+=q,i=vt,c&&a>=n.truncation.limit)break;continue}}}if(M.lastIndex=i,M.test(t)){const y=M.lastIndex-i,v=n.truncation.countAnsiEscapeCodes?y:n.width.ansi;if(a+v>r&&(d=Math.min(d,i),a+v>n.truncation.limit)){c=!0;break}a+=v,i=M.lastIndex;continue}}const p=t.codePointAt(i);if(p===8203||p===65279||p>=8288&&p<=8292){i+=1;continue}if(p===9){if(a+n.width.tab>r&&(d=Math.min(d,i),a+n.width.tab>n.truncation.limit)){c=!0;break}a+=n.width.tab,i+=1;continue}if(j.lastIndex=i,j.test(t)){const y=(j.lastIndex-i)*n.width.regular;if(a+y>r){const v=n.width.regular>0?Math.floor((r-a)/n.width.regular):0;if(d=Math.min(d,i+v),a+y>n.truncation.limit){c=!0;break}}a+=y,i=j.lastIndex;continue}if((p<=31||p>=127&&p<=159)&&(B.lastIndex=i,B.test(t))){const y=(B.lastIndex-i)*n.width.control;if(a+y>r){const v=n.width.control>0?Math.floor((r-a)/n.width.control):0;if(d=Math.min(d,i+v),a+y>n.truncation.limit){c=!0;break}}a+=y,i=B.lastIndex;continue}if(U.lastIndex=i,U.test(t)){if(a+n.width.emoji>r&&(d=Math.min(d,i),a+n.width.emoji>n.truncation.limit)){c=!0;break}a+=n.width.emoji,i=U.lastIndex;continue}const g=t.codePointAt(i)??0;if(Ee(g)){i+=g>65535?2:1;continue}let w;if(o)w=xe(g,n);else switch(wt(g)){case"control":{w=n.width.control;break}case"latin":{w=n.width.regular;break}case"wide":{w=n.width.wide;break}case"zero":{w=0;break}default:switch(gt(g)){case"ambiguous":{w=n.width.ambiguousIsNarrow?n.width.regular:n.width.wide;break}case"fullwidth":{w=n.width.fullWidth;break}case"wide":{w=n.width.wide;break}default:w=n.width.regular}}if(a+w>r&&(d=Math.min(d,i),a+w>n.truncation.limit)){c=!0;break}a+=w,i+=g>65535?2:1}let l=a,u=!1;return c&&n.truncation.limit>=n.truncation.ellipsisWidth&&(l=n.truncation.limit,u=!0),{ellipsed:u,index:c?d:s,truncated:c,width:l}},Ie=(t,e={})=>Y(t,{...e,ellipsis:"",ellipsisWidth:0,limit:Number.POSITIVE_INFINITY}).width,bt=80,yt=24,J=(t,e,{shell:n,env:r}={})=>Xt(t,e,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:500,shell:n,env:r}).trim(),P=(t,e)=>({columns:Number.parseInt(t,10),rows:Number.parseInt(e,10)}),$t=(t,e)=>{const{columns:n,rows:r}=P(t,e);if(!(Number.isNaN(n)||Number.isNaN(r))&&!(n===bt&&r===yt))return{columns:n,rows:r}},We=()=>{if(A.platform!=="linux")return!0;try{const t=W.readFileSync("/proc/self/stat","utf8"),e=t.lastIndexOf(") ");if(e===-1)return!1;const n=t.slice(e+2).trim().split(/\s+/),r=Number.parseInt(n[2],10),s=Number.parseInt(n[5],10);return Number.isNaN(r)||Number.isNaN(s)||s<=0?!1:r===s}catch{return!1}};function ke(){const{env:t,stdout:e,stderr:n}=A;if(e?.columns&&e?.rows)return P(e.columns,e.rows);if(n?.columns&&n?.rows)return P(n.columns,n.rows);if(t.COLUMNS&&t.LINES)return P(t.COLUMNS,t.LINES);const r={columns:bt,rows:yt};return A.platform==="win32"?G()??r:A.platform==="darwin"?it()??G()??r:it()??G()??Be()??r}const it=()=>{try{const t=A.platform==="darwin"?W.constants.O_EVTONLY|W.constants.O_NONBLOCK:W.constants.O_NONBLOCK,{columns:e,rows:n}=te.WriteStream(W.openSync("/dev/tty",t));return{columns:e,rows:n}}catch{}},G=()=>{try{const t=J("tput",["cols"],{env:{TERM:"dumb",...A.env}}),e=J("tput",["lines"],{env:{TERM:"dumb",...A.env}});if(t&&e)return $t(t,e)}catch{}},Be=()=>{try{if(!We())return;const t=J("resize",["-u"]).match(/\d+/g);if(t.length===2)return $t(t[0],t[1])}catch{}},I=new Map,Me=500,$=t=>{if(!t||t==="")return"";const e=I.get(t);if(e!==void 0)return e;let n;try{n=Kt(Object.assign([],{raw:[t]}))}catch{n=t}if(I.size>=Me){const r=I.keys().next().value;r!==void 0&&I.delete(r)}return I.set(t,n),n},T=()=>{const t=jt().CEREBRO_TERMINAL_WIDTH;if(t===void 0)return;const e=Number.parseInt(t,10);if(!(Number.isNaN(e)||e<=0))return e};class Nt{lines;constructor(){this.lines=[]}add(e){this.lines.push(e)}toString(){return this.lines.join(ee.EOL)}header(e){this.add(C(e)),this.lines.push("")}}const je=t=>t!==void 0&&t>0?t:ke().columns,Ce=(t,e,n,r)=>{if(t.length===0||t.some(c=>c.length!==2))return;let s=0;for(const c of t){const h=c[0];if(h===void 0)continue;const l=Ie(h);l>s&&(s=l)}if(s===0)return;const o=n+r,i=s+o,a=20+o;if(i+a>e)return;const d=e-i;return[i,d]};class Re extends Nt{constructor(e){if(super(),e.header&&this.header($(e.header)),e.content){if(e.raw)if(Array.isArray(e.content)&&e.content.every(n=>typeof n=="string"))e.content.forEach(n=>{Array.isArray(n)?n.forEach(r=>{this.add($(r))}):this.add($(n))});else if(typeof e.content=="string")this.add($(e.content));else throw new TypeError("Invalid raw content, must be a string or array of strings.");else this.add(this.getContentLines(e.content));this.add("")}}getContentLines(e){if(typeof e=="string"){const n=R({showHeader:!1,style:{border:_,paddingLeft:4,paddingRight:1},terminalWidth:T(),truncateOverflow:!1,wordWrap:!0});return n.addRow([$(e)]),n.toString()}if(Array.isArray(e)&&e.every(n=>typeof n=="string"||Array.isArray(n)&&n.every(r=>typeof r=="string"))){const n=je(T()),r=a=>Array.isArray(a)?a.map(d=>$(d)):[$(a)],s=e.map(a=>r(a)),o=Ce(s,n,4,1),i=R({columnWidths:o,showHeader:!1,style:{border:_,paddingLeft:4,paddingRight:1},terminalWidth:n,truncateOverflow:!1,wordWrap:!0});return s.forEach(a=>{o!==void 0&&a.length===2?i.addRow([{content:a[0],wordWrap:!1},a[1]]):i.addRow(a)}),i.toString()}if(typeof e=="object"){const n=e;if(!n.options||!n.data)throw new Error(`Must have an "options" or "data" property
|
|
4
4
|
${JSON.stringify(e)}`);const r=R({showHeader:!1,style:{border:_,paddingLeft:4,paddingRight:1},terminalWidth:T(),truncateOverflow:!1,wordWrap:!0});return n.data.forEach(s=>{Array.isArray(s)?r.addRow(s.map(o=>$(o))):r.addRow([$(s)])}),r.toString()}throw new Error(`invalid input - 'content' must be a string, array of strings or a object:
|
package/dist/packem_shared/{affected-selection-BmUh3_Qp.js → affected-selection-DLrq50Mz.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as C}from"node:module";import{getAffectedProjects as S}from"@visulima/task-runner";import{i as W}from"./index-BjdW45xX.js";import{V as j}from"./vis-user-error-
|
|
1
|
+
import{createRequire as C}from"node:module";import{getAffectedProjects as S}from"@visulima/task-runner";import{i as W}from"./index-BjdW45xX.js";import{V as j}from"./vis-user-error-DJvfOpBX.js";import{r as A}from"./affected-shas-Dd0P7fGD.js";let T;const $=e=>(T??=C(import.meta.url))(e),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=e=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[t,s]=f.versions.node.split(".").map(Number);if(t>22||t===22&&s>=3||t===20&&s>=16)return f.getBuiltinModule(e)}return $(e)},{spawnSync:I}=R("node:child_process"),v=new Set(["deep","direct","none"]),B=e=>{const t=[],s=e.split("\0");for(let n=0;n<s.length;n++){const o=s[n];if(!o||o.length<4)continue;const p=o.slice(0,2),d=o.slice(3);if(d&&t.push(d),p.includes("R")||p.includes("C")){n+=1;const c=s[n];c&&t.push(c)}}return t},P=e=>{const t=I("git",["status","--porcelain","-z"],{cwd:e,encoding:"utf8"});return t.error||t.status!==0||typeof t.stdout!="string"?[]:B(t.stdout)},D=async(e,t,s={})=>{const n=e.downstream??"deep",o=e.upstream??"none";if(!v.has(n))throw new j(`Invalid --downstream value: "${n}". Must be "none", "direct", or "deep".`);if(!v.has(o))throw new j(`Invalid --upstream value: "${o}". Must be "none", "direct", or "deep".`);const{projectGraph:p,projects:d,workspaceRoot:c}=t,u=[];let{base:m}=e,{head:r}=e;if(!m||!r){const l=A({defaultBase:s.defaultBase,workspaceRoot:c});m=m||l.base,r=r||l.head,u.push(`Resolved affected refs from ${l.provider} (${l.notes.join("; ")})`)}const k=s.runningInCi??W,h=r==="HEAD"||r==="",b=e.uncommitted??(!k&&h);let a=[];if(b)if(h){const g=(s.readWorkingTreeChanges??P)(c),y=Object.values(d).map(i=>i.root?.replace(/\/$/,"")).filter(i=>!!i&&i!==".");a=g.filter(i=>y.some(_=>i===_||i.startsWith(`${_}/`)));const w=g.length-a.length;a.length>0&&u.push(`including ${a.length} uncommitted working-tree file(s)`),w>0&&u.push(`ignoring ${w} uncommitted path(s) outside any project (untracked scratch would otherwise mark every project affected)`)}else u.push(`ignoring --uncommitted: --head=${r} pins the comparison to a commit, not the working tree`);return{...await S({additionalChangedFiles:a,base:m,downstream:n,head:r,projectGraph:p,projects:d,upstream:o,workspaceRoot:c}),notes:u,uncommittedFileCount:a.length}};export{D as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as v}from"node:module";import{t as T}from"./compile-cache-DoMHRsRZ.js";import{l as w,i as R,a as j,b as M,c as m,g as S}from"./package-version-
|
|
1
|
+
import{createRequire as v}from"node:module";import{t as T}from"./compile-cache-DoMHRsRZ.js";import{l as w,i as R,a as j,b as M,c as m,g as S}from"./package-version-BFsJ8iyZ.js";import{i as $}from"./index-BjdW45xX.js";let _;const x=s=>(_??=v(import.meta.url))(s),t=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=s=>{if(typeof t<"u"&&t.versions&&t.versions.node){const[e,o]=t.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return t.getBuiltinModule(s)}return x(s)},{createRequire:y}=b("node:module");let N;const O=s=>(N??=y(import.meta.url))(s),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,f=s=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[e,o]=r.versions.node.split(".").map(Number);if(e>22||e===22&&o>=3||e===20&&o>=16)return r.getBuiltinModule(s)}return O(s)},{execFileSync:C}=f("node:child_process"),{totalmem:I}=f("node:os"),q=/--max-old-space-size=(\d+)/,z=/--max-semi-space-size=(\d+)/,E=s=>Math.floor(I()/1024/1024*s),P=s=>s<=512?4:s<=1024?8:s<=2048?16:s<=4096?32:s<=8192?64:Math.floor(Math.log2(s))*8,d=(s,e)=>{for(const o of e){const n=s.exec(o);if(n)return Number.parseInt(n[1],10)}},B=s=>{const o=[...w()],n=[...R()],a=d(q,o),p=d(z,o);if(a!==void 0&&p!==void 0)return;const l=a??E(.75),g=p??P(l),c=[];if(a===void 0&&c.push(`--max-old-space-size=${String(l)}`),p===void 0&&c.push(`--max-semi-space-size=${String(g)}`),c.length!==0)try{C(j(),[...c,...o,...n.slice(1)],{env:M(),stdio:"inherit"}),m(0)}catch(h){const u=h.status;m(typeof u=="number"?u:1)}},V=()=>{process.env.VIS_VERSION=S()},H=s=>{!process.stdout.isTTY||$||process.env.TERM==="dumb"||process.stdout.write(`\x1B]0;${s}\x07`)},L=new Set(["","--help","--version","-h","-v","completion","dlx","exec","x"]),i=process.argv[2]??"";!L.has(i)&&!process.argv.includes("--help")&&!process.argv.includes("-h")&&B();process.argv.includes("--no-color")&&(process.env.NO_COLOR="1",process.env.FORCE_COLOR="0");V();T();(async()=>{if(i==="__pm-shim"){const{dispatchShim:e}=await import("../packem_chunks/dispatch.js");e(process.argv[3]??"",process.argv.slice(4));return}if(i==="x"){const{runLeanX:e}=await import("../packem_chunks/lean.js");await e(process.argv.slice(3));return}if(i==="exec"||i==="dlx"){const{runExecCli:e}=await import("../packem_chunks/cli-exec.js");await e();return}const{runCli:s}=await import("../packem_chunks/cli-main.js").then(e=>e.ax);await s()})();export{H as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./vis-user-error-
|
|
1
|
+
import{b as e}from"./vis-user-error-DJvfOpBX.js";const o={filter:{alias:"F",description:"Filter packages by name pattern",multiple:!0,type:String},parallel:{defaultValue:!1,description:"Run concurrently without topological ordering",type:Boolean},recursive:{alias:"r",defaultValue:!1,description:"Run in every workspace package",type:Boolean},reverse:{defaultValue:!1,description:"Reverse topological execution order",type:Boolean},"shell-mode":{alias:"c",defaultValue:!1,description:"Execute within shell environment",type:Boolean},"workspace-root":{alias:"w",defaultValue:!1,description:"Run on workspace root only",type:Boolean}},l=e({argument:{description:"Command to execute followed by arguments",name:"command",type:String},description:"Execute a local node_modules/.bin command (no remote fallback)",examples:[["vis exec eslint .","Run local eslint"],["vis exec tsc --noEmit","Run local TypeScript check"],["vis exec -r -- eslint .","Run in all workspace packages"],["vis exec -c 'echo $PATH'","Shell mode"]],group:"Run & Execute",loader:()=>import("../packem_chunks/handler.js"),name:"exec",options:o});export{l as e};
|