@visulima/vis 1.0.0-alpha.22 → 1.0.0-alpha.23

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.
Files changed (137) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/LICENSE.md +132 -2
  3. package/README.md +1 -1
  4. package/dashboard/dist/index.html +152 -0
  5. package/dist/bin.js +1 -1
  6. package/dist/binx.js +3 -0
  7. package/dist/config/index.d.ts +20 -33
  8. package/dist/config/index.js +1 -1
  9. package/dist/packem_chunks/bin.js +373 -367
  10. package/dist/packem_chunks/bloom-status.js +2 -2
  11. package/dist/packem_chunks/bloom-sync.js +2 -2
  12. package/dist/packem_chunks/config.js +12 -12
  13. package/dist/packem_chunks/doctor-probe.js +2 -2
  14. package/dist/packem_chunks/fix.js +3 -3
  15. package/dist/packem_chunks/handler.js +1 -1
  16. package/dist/packem_chunks/handler10.js +1 -1
  17. package/dist/packem_chunks/handler11.js +1 -1
  18. package/dist/packem_chunks/handler12.js +3 -3
  19. package/dist/packem_chunks/handler13.js +1 -1
  20. package/dist/packem_chunks/handler14.js +10 -10
  21. package/dist/packem_chunks/handler15.js +2 -2
  22. package/dist/packem_chunks/handler16.js +1 -1
  23. package/dist/packem_chunks/handler17.js +1 -1
  24. package/dist/packem_chunks/handler18.js +1 -1
  25. package/dist/packem_chunks/handler19.js +1 -1
  26. package/dist/packem_chunks/handler2.js +1 -1
  27. package/dist/packem_chunks/handler20.js +1 -1
  28. package/dist/packem_chunks/handler21.js +2 -2
  29. package/dist/packem_chunks/handler22.js +2 -2
  30. package/dist/packem_chunks/handler23.js +2 -2
  31. package/dist/packem_chunks/handler24.js +1 -18
  32. package/dist/packem_chunks/handler25.js +1 -1
  33. package/dist/packem_chunks/handler26.js +5 -1
  34. package/dist/packem_chunks/handler27.js +1 -5
  35. package/dist/packem_chunks/handler28.js +3 -1
  36. package/dist/packem_chunks/handler29.js +1 -3
  37. package/dist/packem_chunks/handler3.js +1 -1
  38. package/dist/packem_chunks/handler30.js +7 -1
  39. package/dist/packem_chunks/handler31.js +32 -6
  40. package/dist/packem_chunks/handler32.js +3 -33
  41. package/dist/packem_chunks/handler33.js +1 -3
  42. package/dist/packem_chunks/handler34.js +26 -1
  43. package/dist/packem_chunks/handler35.js +5 -26
  44. package/dist/packem_chunks/handler36.js +22 -5
  45. package/dist/packem_chunks/handler37.js +60 -21
  46. package/dist/packem_chunks/handler38.js +6 -428
  47. package/dist/packem_chunks/handler39.js +708 -61
  48. package/dist/packem_chunks/handler4.js +1 -1
  49. package/dist/packem_chunks/handler40.js +24 -6
  50. package/dist/packem_chunks/handler41.js +237 -166
  51. package/dist/packem_chunks/handler42.js +153 -24
  52. package/dist/packem_chunks/handler43.js +10 -153
  53. package/dist/packem_chunks/handler44.js +25 -10
  54. package/dist/packem_chunks/handler45.js +24 -25
  55. package/dist/packem_chunks/handler46.js +3 -24
  56. package/dist/packem_chunks/handler47.js +27 -3
  57. package/dist/packem_chunks/handler48.js +168 -21
  58. package/dist/packem_chunks/handler49.js +33 -173
  59. package/dist/packem_chunks/handler5.js +6 -6
  60. package/dist/packem_chunks/handler6.js +1 -1
  61. package/dist/packem_chunks/handler7.js +1 -1
  62. package/dist/packem_chunks/handler8.js +1 -1
  63. package/dist/packem_chunks/handler9.js +1 -1
  64. package/dist/packem_chunks/heal-accept.js +4 -4
  65. package/dist/packem_chunks/heal.js +1 -1
  66. package/dist/packem_chunks/help-command.js +2 -2
  67. package/dist/packem_chunks/index.js +2 -2
  68. package/dist/packem_chunks/keys-refresh.js +1 -1
  69. package/dist/packem_chunks/list.js +2 -2
  70. package/dist/packem_chunks/loader.js +2 -2
  71. package/dist/packem_chunks/loader2.js +1 -1
  72. package/dist/packem_chunks/prune.js +1 -1
  73. package/dist/packem_chunks/run.js +1 -1
  74. package/dist/packem_chunks/status.js +2 -2
  75. package/dist/packem_chunks/sync.js +2 -2
  76. package/dist/packem_chunks/sync2.js +2 -2
  77. package/dist/packem_chunks/tripwire.js +2 -2
  78. package/dist/packem_chunks/verify-lockfile.js +2 -2
  79. package/dist/packem_shared/{advisories-DS8JEB_g.js → advisories-U1QKY_tg.js} +1 -1
  80. package/dist/packem_shared/{ai-analysis-DGBZYlxF.js → ai-analysis-B8pDCOuT.js} +2 -2
  81. package/dist/packem_shared/ai-fix-DiGSrGKv.js +43 -0
  82. package/dist/packem_shared/anolilab-text-CAM_E6uK.js +13 -0
  83. package/dist/packem_shared/applyDefaults-KxZkvlp3.js +1 -0
  84. package/dist/packem_shared/build-scripts-3E2pmscY.js +1 -0
  85. package/dist/packem_shared/{cyclonedx-CO7-Y1B1.js → cyclonedx-B293T7R0.js} +3 -3
  86. package/dist/packem_shared/dependency-scan-BbtivycX.js +1 -0
  87. package/dist/packem_shared/docker-BhBBfWfc.js +60 -0
  88. package/dist/packem_shared/failure-log-B0Uh-65U.js +2 -0
  89. package/dist/packem_shared/index-C1w1GXdS.js +1 -0
  90. package/dist/packem_shared/index-CZX_II5N.js +29 -0
  91. package/dist/packem_shared/index.server-B7ETiT4C.js +2 -0
  92. package/dist/packem_shared/{lifecycle-boYwVQSE.js → lifecycle-wRE7ymVc.js} +2 -2
  93. package/dist/packem_shared/{lockfile-C5DYMHVq.js → lockfile-CQLFNyVa.js} +1 -1
  94. package/dist/packem_shared/manifests-Z3spBpxv.js +1 -0
  95. package/dist/packem_shared/{min-release-age-D462DvYM.js → min-release-age-Cz6HbF-I.js} +2 -2
  96. package/dist/packem_shared/native-config-sync-BOeuyrBj.js +21 -0
  97. package/dist/packem_shared/{osv-bloom-QSAn2Dcw.js → osv-bloom-CyCDpXBl.js} +2 -2
  98. package/dist/packem_shared/pm-runner-CVliR6Ie.js +1 -0
  99. package/dist/packem_shared/provenance-BcldGs02.js +1 -0
  100. package/dist/packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js +1 -0
  101. package/dist/packem_shared/registry-keys-pemEkRM9.js +1 -0
  102. package/dist/packem_shared/{resolve-explicit-BgFQHUEP.js → resolve-explicit-2G-2HWtR.js} +3 -3
  103. package/dist/packem_shared/runtime-check-DgXsKCsv.js +1 -0
  104. package/dist/packem_shared/s1ngularity-Boxkax0D.js +1 -0
  105. package/dist/packem_shared/scan-progress-EbvmIh4i.js +2 -0
  106. package/dist/packem_shared/{selectors-B2ISH581.js → selectors-BE2BCnTR.js} +1 -1
  107. package/dist/packem_shared/{signatures-b-jJYoZd.js → signatures-SO-fyExV.js} +1 -1
  108. package/dist/packem_shared/toolchain-Jx2lkAYy.js +5 -0
  109. package/dist/packem_shared/typosquats-CioMnpnb.js +1 -0
  110. package/dist/packem_shared/verify-C8EAHql6.js +1 -0
  111. package/dist/packem_shared/{vis-update-app-Bnu1EIgE.js → vis-update-app-BWA1kA1q.js} +1 -1
  112. package/index.js +26 -26
  113. package/package.json +23 -12
  114. package/schemas/vis-config.schema.json +61 -12
  115. package/dist/packem_chunks/handler50.js +0 -34
  116. package/dist/packem_shared/ai-cache-BjlXWJtl.js +0 -1
  117. package/dist/packem_shared/ai-fix-BhcTrkuW.js +0 -43
  118. package/dist/packem_shared/applyDefaults-BOVDw1jD.js +0 -1
  119. package/dist/packem_shared/build-scripts-DsWMSWDs.js +0 -1
  120. package/dist/packem_shared/cache-directory-DQak1Vjc.js +0 -1
  121. package/dist/packem_shared/dependency-scan-DPHTzA5r.js +0 -1
  122. package/dist/packem_shared/docker-lk0-5Z-i.js +0 -60
  123. package/dist/packem_shared/failure-log-DF7nrFIs.js +0 -2
  124. package/dist/packem_shared/flakiness-DKCOYwN7.js +0 -1
  125. package/dist/packem_shared/index-B4gpNmrG.js +0 -1
  126. package/dist/packem_shared/manifests-B0fMp872.js +0 -1
  127. package/dist/packem_shared/native-config-sync-B0_ef78M.js +0 -21
  128. package/dist/packem_shared/provenance-smHa8efI.js +0 -1
  129. package/dist/packem_shared/registry-keys-3qaVog76.js +0 -1
  130. package/dist/packem_shared/run-summary-utils-DIJV_dUD.js +0 -1
  131. package/dist/packem_shared/runtime-check-DrMx4Q9L.js +0 -1
  132. package/dist/packem_shared/s1ngularity-CwSBPB3I.js +0 -1
  133. package/dist/packem_shared/scan-progress-CMynp3eA.js +0 -2
  134. package/dist/packem_shared/toolchain-OH1PXwbZ.js +0 -5
  135. package/dist/packem_shared/typosquats-CJ4o1l7U.js +0 -1
  136. package/dist/packem_shared/verify-CQbzknur.js +0 -1
  137. package/dist/packem_shared/xxh3-DrAUNq4n.js +0 -1
@@ -1,2 +1,2 @@
1
- var l=Object.defineProperty;var a=(e,r)=>l(e,"name",{value:r,configurable:!0});import{p as i,e as m,E as f,I as u}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-QSAn2Dcw.js";var d=Object.defineProperty,n=a((e,r)=>d(e,"name",{value:r,configurable:!0}),"s");const c=n(e=>{if(!e)return"never";const r=Date.parse(e);if(Number.isNaN(r))return e;const t=Date.now()-r;if(t<0)return e;const o=Math.floor(t/6e4);if(o<1)return"just now";if(o<60)return`${o}m ago`;const s=Math.floor(o/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),g=n(e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`,"formatBytes"),p=n(async({options:e,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,e.cacheDir);if(e.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
2
- `);return}if(i.info(`Cache: ${t.cacheDir}`),!t.present){i.warn(`No osv-bloom filter yet. Run ${m("vis advisories bloom sync")} to populate.`);return}if(t.manifest){const{manifest:o}=t;i.info(`Built: ${o.builtAtRfc3339} (${c(o.builtAtRfc3339)})`),i.info(`Fetch: ${t.fetchedAtIso??f("—")} (${c(t.fetchedAtIso)})`),i.info(`Filter: ${u(g(o.bloomByteLen))} m=${o.bloomMBits.toLocaleString()} bits k=${String(o.bloomKHashes)}`),i.info(`Set: ${o.entryCount.toLocaleString()} entries from ${o.advisoryCount.toLocaleString()} advisories (target FPR ${o.targetFpr})`),i.info(f(`Digest: ${o.setDigestSha256}`))}else i.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},"execute"),w=p;export{w as advisoriesBloomStatusExecute};
1
+ var m=Object.defineProperty;var a=(o,r)=>m(o,"name",{value:r,configurable:!0});import{e as l,E as f,I as u}from"../packem_shared/index.server-B7ETiT4C.js";import{p as i}from"./bin.js";import{g as $}from"../packem_shared/osv-bloom-CyCDpXBl.js";var d=Object.defineProperty,n=a((o,r)=>d(o,"name",{value:r,configurable:!0}),"s");const c=n(o=>{if(!o)return"never";const r=Date.parse(o);if(Number.isNaN(r))return o;const t=Date.now()-r;if(t<0)return o;const e=Math.floor(t/6e4);if(e<1)return"just now";if(e<60)return`${e}m ago`;const s=Math.floor(e/60);return s<24?`${s}h ago`:`${Math.floor(s/24)}d ago`},"formatRelative"),p=n(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),g=n(async({options:o,workspaceRoot:r})=>{if(!r)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const t=await $(r,o.cacheDir);if(o.format==="json"){process.stdout.write(`${JSON.stringify(t,void 0,2)}
2
+ `);return}if(i.info(`Cache: ${t.cacheDir}`),!t.present){i.warn(`No osv-bloom filter yet. Run ${l("vis advisories bloom sync")} to populate.`);return}if(t.manifest){const{manifest:e}=t;i.info(`Built: ${e.builtAtRfc3339} (${c(e.builtAtRfc3339)})`),i.info(`Fetch: ${t.fetchedAtIso??f("—")} (${c(t.fetchedAtIso)})`),i.info(`Filter: ${u(p(e.bloomByteLen))} m=${e.bloomMBits.toLocaleString()} bits k=${String(e.bloomKHashes)}`),i.info(`Set: ${e.entryCount.toLocaleString()} entries from ${e.advisoryCount.toLocaleString()} advisories (target FPR ${e.targetFpr})`),i.info(f(`Digest: ${e.setDigestSha256}`))}else i.warn("filter.bin present but manifest.json missing — `vis advisories bloom sync` will rewrite the cache.")},"execute"),y=g;export{y as advisoriesBloomStatusExecute};
@@ -1,2 +1,2 @@
1
- var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{p as n,E as d}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-CMynp3eA.js";import{s as y,D as h}from"../packem_shared/osv-bloom-QSAn2Dcw.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",u=w(t),m=o.source??u.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:u.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:m,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:m,upToDate:e?.upToDate??!1},void 0,2)}
2
- `):e&&(n.info(d(`Cache: ${e.cacheDir}`)),n.info(d(`Built: ${e.manifest.builtAtRfc3339}`)),r||n.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),r&&(process.exitCode=1)},"execute"),S=B;export{S as advisoriesBloomSyncExecute};
1
+ var D=Object.defineProperty;var f=(o,t)=>D(o,"name",{value:t,configurable:!0});import{E as d}from"../packem_shared/index.server-B7ETiT4C.js";import{p as n}from"./bin.js";import{s as b}from"../packem_shared/scan-progress-EbvmIh4i.js";import{s as y,D as h}from"../packem_shared/osv-bloom-CyCDpXBl.js";var v=Object.defineProperty,a=f((o,t)=>v(o,"name",{value:t,configurable:!0}),"s");const w=a(o=>o?.security?.audit?.advisories?.bloom??{},"readBloomConfig"),p=a(o=>o>=1e3?`${(o/1e3).toFixed(1)}s`:`${Math.round(o)}ms`,"formatDuration"),$=a(o=>o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`,"formatBytes"),B=a(async({options:o,visConfig:t,workspaceRoot:c})=>{if(!c)throw new Error("Could not determine workspace root. Run this command inside a workspace.");const l=o.format==="json",m=w(t),u=o.source??m.source??h,s=b([{id:"bloom",label:"Sync osv-bloom prefilter"}],{live:!l});let e,r;try{s.start("bloom");const i=Date.now();e=await y({allowedHosts:m.allowedHosts,cacheDir:o.cacheDir,force:!!o.force,source:u,workspaceRoot:c}),e.upToDate?s.finish("bloom","ok",`up to date · ${p(Date.now()-i)}`):s.finish("bloom","ok",`${e.manifest.entryCount.toLocaleString()} entries · ${$(e.bytesOnDisk)} · ${p(e.durationMs)}`)}catch(i){r=i instanceof Error?i.message:String(i),s.finish("bloom","error",r)}finally{s.stop()}l?process.stdout.write(`${JSON.stringify({bytesOnDisk:e?.bytesOnDisk??0,cacheDir:e?.cacheDir??null,durationMs:e?.durationMs??0,error:r??null,manifest:e?.manifest??null,source:u,upToDate:e?.upToDate??!1},void 0,2)}
2
+ `):e&&(n.info(d(`Cache: ${e.cacheDir}`)),n.info(d(`Built: ${e.manifest.builtAtRfc3339}`)),r||n.success(e.upToDate?"osv-bloom prefilter up to date.":"osv-bloom prefilter synced.")),r&&(process.exitCode=1)},"execute"),x=B;export{x as advisoriesBloomSyncExecute};
@@ -1,19 +1,19 @@
1
- var Jo=Object.defineProperty;var h=(e,t)=>Jo(e,"name",{value:t,configurable:!0});import{createRequire as Ho}from"node:module";import{createJiti as Hn}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const Xo=Ho(import.meta.url),et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ln=h(e=>{if(typeof et<"u"&&et.versions&&et.versions.node){const[t,r]=et.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return et.getBuiltinModule(e)}return Xo(e)},"__cjs_getBuiltinModule"),{createHash:Kn}=ln("node:crypto"),{readdirSync:Jn,readFileSync:Qo,copyFileSync:Yo,unlinkSync:es}=ln("node:fs"),{createRequire:le}=ln("node:module");var ts=Object.defineProperty,X=h((e,t)=>ts(e,"name",{value:t,configurable:!0}),"O$4"),rs=Object.defineProperty,_=X((e,t)=>rs(e,"name",{value:t,configurable:!0}),"h");const ns=le(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Xn=_(e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,r]=je.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return je.getBuiltinModule(e)}return ns(e)},"__cjs_getBuiltinModule"),{existsSync:Oe}=Xn("node:fs"),{env:Pe,cwd:Qn}=je,{createRequire:Ae}=Xn("node:module"),Yn=0,ke=2,eo=Symbol("findUpStop");var os=Object.defineProperty,ss=_((e,t)=>os(e,"name",{value:t,configurable:!0}),"t$4"),is=Object.defineProperty,as=ss((e,t)=>is(e,"name",{value:t,configurable:!0}),"t"),cs=Object.defineProperty,us=as((e,t)=>cs(e,"name",{value:t,configurable:!0}),"n");const fn=us(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var ls=Object.defineProperty,fs=_((e,t)=>ls(e,"name",{value:t,configurable:!0}),"i$4"),ps=Object.defineProperty,ds=fs((e,t)=>ps(e,"name",{value:t,configurable:!0}),"r"),gs=Object.defineProperty,ms=ds((e,t)=>gs(e,"name",{value:t,configurable:!0}),"i");const Pn=ms(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var hs=Object.defineProperty,ys=_((e,t)=>hs(e,"name",{value:t,configurable:!0}),"i$3"),bs=Object.defineProperty,to=ys((e,t)=>bs(e,"name",{value:t,configurable:!0}),"s");const vs=Ae(import.meta.url),tt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$s=to(e=>{if(typeof tt<"u"&&tt.versions&&tt.versions.node){const[t,r]=tt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return tt.getBuiltinModule(e)}return vs(e)},"__cjs_getBuiltinModule"),{lstatSync:kn,mkdirSync:xs}=$s("node:fs");var ws=Object.defineProperty,js=to((e,t)=>ws(e,"name",{value:t,configurable:!0}),"o");const Os=js(e=>{fn(e);try{const t=kn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{xs(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=kn(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Pn(r))}'`,{cause:t})}},"ensureDirSync");var Ps=Object.defineProperty,ks=_((e,t)=>Ps(e,"name",{value:t,configurable:!0}),"$e"),Es=Object.defineProperty,pn=ks((e,t)=>Es(e,"name",{value:t,configurable:!0}),"W"),Ts=Object.defineProperty,b=pn((e,t)=>Ts(e,"name",{value:t,configurable:!0}),"u$1");let En=b(()=>{var e=(()=>{var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=b((n,o)=>{for(var i in o)t(n,i,{get:o[i],enumerable:!0})},"ne"),d=b((n,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(n,a)&&a!==i&&t(n,a,{get:b(()=>o[a],"get"),enumerable:!(c=r(o,a))||c.enumerable});return n},"ae"),m=b(n=>d(t({},"__esModule",{value:!0}),n),"oe"),$={};l($,{zeptomatch:b(()=>Ye,"zeptomatch")});var O=b(n=>{const o=new Set,i=[n];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,y=f.length;p<y;p++)i.push(f[p])}return Array.from(o)},"M"),j=b(n=>{let o="";const i=O(n);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),x=b((n,o,i)=>{const c=i.get(n);if(c!==void 0)return c;const a=n.partial??o;let f="";if(n.regex&&(f+=a?"(?:$|":"",f+=n.regex.source),n.children?.length){const p=E(n.children.map(y=>x(y,o,i)).filter(Boolean));if(p?.length){const y=n.children.some(K=>!K.regex||!(K.partial??o)),P=p.length>1||a&&(!f.length||y);f+=P?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=P?")":""}}return n.regex&&(f+=a?")":""),i.set(n,f),f},"O"),C=b((n,o)=>{const i=new Map,c=O(n);for(let a=c.length-1;a>=0;a--){const f=x(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=b(n=>Array.from(new Set(n)),"ue"),k=b((n,o,i)=>k.compile(n,i).test(o),"R");k.compile=(n,o)=>{const i=o?.partial??!1,c=C(n,i),a=j(n);return new RegExp(`^(?:${c})$`,a)};var V=k,Z=b((n,o)=>{const i=V.compile(n,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),ae=Z,ze=b(n=>{const o=n.map(c=>c.source).join("|")||"$^",i=n[0]?.flags;return new RegExp(o,i)},"ve"),Me=ze,re=b(n=>Array.isArray(n),"j"),B=b(n=>typeof n=="function","_"),Ne=b(n=>n.length===0,"he"),Be=(()=>{const{toString:n}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(n.call(i))})(),It=b(n=>typeof n=="number","de"),Ft=b(n=>typeof n=="object"&&n!==null,"xe"),Wt=b(n=>n instanceof RegExp,"me"),Lt=(()=>{const n=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>n.test(o.source)})(),Ut=(()=>{const n=/^[a-zA-Z0-9_-]+$/;return o=>n.test(o.source)&&!o.flags.includes("i")})(),Re=b(n=>typeof n=="string","A"),z=b(n=>n===void 0,"f"),qt=b(n=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=n(i);return o.set(i,a),a}},"ye"),De=b((n,o,i={})=>{const c={cache:{},input:n,index:0,indexBacktrackMax:0,options:i,output:[]},a=M(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===n.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),g=b((n,o)=>re(n)?Vt(n,o):Re(n)?Ie(n,o):Zt(n,o),"i"),Vt=b((n,o)=>{const i={};for(const c of n){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!z(o)&&!c.options.silent){const y=a.slice(f,p),P=B(o)?o(y,a,`${f}`):o;z(P)||c.output.push(P)}c.index=p}return!0}},"we"),Zt=b((n,o)=>{if(Ut(n))return Ie(n.source,o);{const i=n.source,c=n.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return Lt(n)&&B(o)&&!Be(o)?Gt(a,o):Kt(a,o)}},"$e"),Gt=b((n,o)=>i=>{const c=i.index,a=i.input;n.lastIndex=c;const f=n.exec(a);if(f){const p=n.lastIndex;if(!i.options.silent){const y=o(...f,a,`${c}`);z(y)||i.output.push(y)}return i.index=p,!0}else return!1},"Ee"),Kt=b((n,o)=>i=>{const c=i.index,a=i.input;if(n.lastIndex=c,n.test(a)){const f=n.lastIndex;if(!z(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;z(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ie=b((n,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(n,c)){if(!z(o)&&!i.options.silent){const f=B(o)?o(n,a,`${c}`):o;z(f)||i.output.push(f)}return i.index+=n.length,!0}else return!1},"F"),de=b((n,o,i,c)=>{const a=M(n),f=o>1;return me(ge(We(p=>{let y=0;for(;y<i;){const P=p.index;if(!a(p)||(y+=1,p.index===P))break}return y>=o},f),c))},"k"),Fe=b((n,o)=>de(n,0,1,o),"L"),ne=b((n,o)=>de(n,0,1/0,o),"$"),Jt=b((n,o)=>de(n,1,1/0,o),"Re"),L=b((n,o)=>{const i=n.map(M);return me(ge(We(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),S=b((n,o)=>{const i=n.map(M);return me(ge(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),We=b((n,o=!0,i=!1)=>{const c=M(n);return o?a=>{const f=a.index,p=a.output.length,y=c(a);return!y&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!y||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),y}:c},"q"),ge=b((n,o)=>{const i=M(n);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return z(p)||c.output.push(p),!0}else return!1}:i},"B"),me=(()=>{let n=0;return o=>{const i=M(o),c=n+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,y=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),P=y.queue;if(p<=y.indexMax){const J=y.store||(y.store=new Map);if(P.length){for(let q=0,Yr=P.length;q<Yr;q+=2){const en=P[q*2],tn=P[q*2+1];J.set(en,tn)}P.length=0}const A=J.get(p);if(A===!1)return!1;if(It(A))return a.index=A,!0;if(A)return a.index=A.index,A.output?.length&&a.output.push(...A.output),!0}const K=a.output.length,Qr=i(a);if(y.indexMax=Math.max(y.indexMax,p),Qr){const J=a.index,A=a.output.length;if(A>K){const q=a.output.slice(K,A);P.push(p,{index:J,output:q})}else P.push(p,J);return!0}else return P.push(p,!1),!1}}})(),Le=b(n=>{let o;return i=>(o||(o=M(n())),o(i))},"G"),M=qt(n=>{if(B(n))return Ne(n)?Le(n):n;if(Re(n)||Wt(n))return g(n);if(re(n))return L(n);if(Ft(n))return S(Object.values(n));throw new Error("Invalid rule")}),R=b(n=>n,"d"),Ht=b(n=>typeof n=="string","ke"),Xt=b(n=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const y=n(c,a);return f.set(c,y),y}},"Be"),Qt=b(n=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=n(c,a))}},"Pe"),Yt=g(/\\./,R),er=g(/./,R),tr=g(/\*\*\*+/,"*"),rr=g(/([^/{[(!])\*\*/,(n,o)=>`${o}*`),nr=g(/(^|.)\*\*(?=[^*/)\]}])/,(n,o)=>`${o}*`),or=ne(S([Yt,tr,rr,nr,er])),sr=or,ir=b(n=>De(n,sr,{memoization:!1}).join(""),"Ie"),ar=ir,Ue="abcdefghijklmnopqrstuvwxyz",cr=b(n=>{let o="";for(;n>0;){const i=(n-1)%26;o=Ue[i]+o,n=Math.floor((n-1)/26)}return o},"Le"),qe=b(n=>{let o=0;for(let i=0,c=n.length;i<c;i++)o=o*26+Ue.indexOf(n[i])+1;return o},"V"),he=b((n,o)=>{if(o<n)return he(o,n);const i=[];for(;n<=o;)i.push(n++);return i},"b"),ur=b((n,o,i)=>he(n,o).map(c=>String(c).padStart(i,"0")),"qe"),Ve=b((n,o)=>he(qe(n),qe(o)).map(cr),"W"),w=b(n=>({partial:!1,regex:new RegExp(n,"s"),children:[]}),"c"),G=b(n=>({children:n}),"y"),U=(()=>{const n=b((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)n(a[f],i,c)},"e");return o=>{if(!o.length)return G([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];n(a,f,c)}return o[0]}})(),N=b(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),lr=g(/\\./,w),fr=g(/[$.*+?^(){}[\]\|]/,n=>w(`\\${n}`)),pr=g(/[\\\/]/,N),dr=g(/[^$.*+?^(){}[\]\|\\\/]+/,w),gr=g(/^(?:!!)*!(.*)$/,(n,o)=>w(`(?!^${Ye.compile(o).source}$).*?`)),mr=g(/^(!!)+/),hr=S([gr,mr]),yr=g(/\/(\*\*\/)+/,()=>G([U([N(),w(".+?"),N()]),N()])),br=g(/^(\*\*\/)+/,()=>G([w("^"),U([w(".*?"),N()])])),vr=g(/\/(\*\*)$/,()=>G([U([N(),w(".*?")]),w("$")])),$r=g(/\*\*/,()=>w(".*?")),Ze=S([yr,br,vr,$r]),xr=g(/\*\/(?!\*\*\/|\*$)/,()=>U([w("[^\\\\/]*?"),N()])),wr=g(/\*/,()=>w("[^\\\\/]*")),Ge=S([xr,wr]),Ke=g("?",()=>w("[^\\\\/]")),jr=g("[",R),Or=g("]",R),Pr=g(/[!^]/,"^\\\\/"),kr=g(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),Er=g(/\\./,R),Tr=g(/[$.*+?^(){}[\|]/,n=>`\\${n}`),Sr=g(/[\\\/]/,"\\\\/"),Ar=g(/[^$.*+?^(){}[\]\|\\\/]+/,R),_r=S([Er,Tr,Sr,kr,Ar]),Je=L([jr,Fe(Pr),ne(_r),Or],n=>w(n.join(""))),Cr=g("{","(?:"),zr=g("}",")"),Mr=g(/(\d+)\.\.(\d+)/,(n,o,i)=>ur(+o,+i,Math.min(o.length,i.length)).join("|")),Nr=g(/([a-z]+)\.\.([a-z]+)/,(n,o,i)=>Ve(o,i).join("|")),Br=g(/([A-Z]+)\.\.([A-Z]+)/,(n,o,i)=>Ve(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),Rr=S([Mr,Nr,Br]),He=L([Cr,Rr,zr],n=>w(n.join(""))),Dr=g("{"),Ir=g("}"),Fr=g(","),Wr=g(/\\./,w),Lr=g(/[$.*+?^(){[\]\|]/,n=>w(`\\${n}`)),Ur=g(/[\\\/]/,N),qr=g(/[^$.*+?^(){}[\]\|\\\/,]+/,w),Vr=Le(()=>Qe),Zr=g("",()=>w("(?:)")),Gr=Jt(S([Ze,Ge,Ke,Je,He,Vr,Wr,Lr,Ur,qr]),U),Xe=S([Gr,Zr]),Qe=L([Dr,Fe(L([Xe,ne(L([Fr,Xe]))])),Ir],G),Kr=ne(S([hr,Ze,Ge,Ke,Je,He,Qe,lr,fr,pr,dr]),U),Jr=Kr,Hr=b(n=>De(n,Jr,{memoization:!1})[0],"kr"),Xr=Hr,ye=b((n,o,i)=>ye.compile(n,i).test(o),"N");ye.compile=(()=>{const n=Qt((i,c)=>ae(Xr(ar(i)),c)),o=Xt((i,c)=>Me(i.map(a=>n(a,c))));return(i,c)=>Ht(i)?n(i,c):o(i,c)})();var Ye=ye;return m($)})();return e.default||e},"_lazyMatch"),rn;const Ss=b((e,t)=>(rn||(rn=En(),En=null),rn(e,t)),"default");var As=Object.defineProperty,_s=pn((e,t)=>As(e,"name",{value:t,configurable:!0}),"t$1");const Cs=/^[A-Z]:\//i,Q=_s((e="")=>e&&e.replaceAll("\\","/").replace(Cs,t=>t.toUpperCase()),"normalizeWindowsPath");var zs=Object.defineProperty,F=pn((e,t)=>zs(e,"name",{value:t,configurable:!0}),"r");const Ms=/^[/\\]{2}/,Ns=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,ro=/^[A-Z]:$/i,Tn=/^\/([A-Z]:)?$/i,Bs=/.(\.[^./]+)$/,Rs=/^[/\\]|^[a-z]:[/\\]/i,Ds=/\/$/,Is=F(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),no=F((e,t)=>{let r="",s=0,u=-1,l=0,d;for(let m=0;m<=e.length;++m){if(m<e.length)d=e[m];else{if(d==="/")break;d="/"}if(d==="/"){if(!(u===m-1||l===1))if(l===2){if(r.length<2||s!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const $=r.lastIndexOf("/");$===-1?(r="",s=0):(r=r.slice(0,$),s=r.length-1-r.lastIndexOf("/")),u=m,l=0;continue}else if(r.length>0){r="",s=0,u=m,l=0;continue}}t&&(r+=r.length>0?"/..":"..",s=2)}else r.length>0?r+=`/${e.slice(u+1,m)}`:r=e.slice(u+1,m),s=m-u-1;u=m,l=0}else d==="."&&l!==-1?++l:l=-1}return r},"normalizeString"),be=F(e=>Ns.test(e),"isAbsolute"),oo=F(function(e){if(e.length===0)return".";e=Q(e);const t=Ms.exec(e),r=be(e),s=e.at(-1)==="/";return e=no(e,!r),e.length===0?r?"/":s?"./":".":(s&&(e+="/"),ro.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!be(e)?`/${e}`:e)},"normalize"),H=F((...e)=>{let t="";for(const r of e)if(r)if(t.length>0){const s=t.at(-1)==="/",u=r[0]==="/";s&&u?t+=r.slice(1):t+=s||u?r:`/${r}`}else t+=r;return oo(t)},"join"),oe=F(function(...e){e=e.map(s=>Q(s));let t="",r=!1;for(let s=e.length-1;s>=-1&&!r;s--){const u=s>=0?e[s]:Is();!u||u.length===0||(t=`${u}/${t}`,r=be(u))}return t=no(t,!r),r&&!be(t)?`/${t}`:t.length>0?t:"."},"resolve");F(function(e){return Q(e)},"toNamespacedPath");const so=F(function(e){return Bs.exec(Q(e))?.[1]??""},"extname");F(function(e,t){const r=oe(e).replace(Tn,"$1").split("/"),s=oe(t).replace(Tn,"$1").split("/");if(s[0][1]===":"&&r[0][1]===":"&&r[0]!==s[0])return s.join("/");const u=[...r];for(const l of u){if(s[0]!==l)break;r.shift(),s.shift()}return[...r.map(()=>".."),...s].join("/")},"relative");const mt=F(e=>{const t=Q(e).replace(Ds,"").split("/").slice(0,-1);return t.length===1&&ro.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(be(e)?"/":".")},"dirname");F(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return Q(e.root?oe(...t):t.join("/"))},"format");const Fs=F((e,t)=>{const r=Q(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),io=F(function(e){const t=Rs.exec(e)?.[0]?.replaceAll("\\","/")??"",r=Fs(e),s=so(r);return{base:r,dir:mt(e),ext:s,name:r.slice(0,r.length-s.length),root:t}},"parse");F((e,t)=>Ss(t,oo(e)),"matchesGlob");var Ws=Object.defineProperty,$e=_((e,t)=>Ws(e,"name",{value:t,configurable:!0}),"n$2"),Ls=Object.defineProperty,se=$e((e,t)=>Ls(e,"name",{value:t,configurable:!0}),"a");const Us=Ae(import.meta.url),rt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qs=se(e=>{if(typeof rt<"u"&&rt.versions&&rt.versions.node){const[t,r]=rt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return rt.getBuiltinModule(e)}return Us(e)},"__cjs_getBuiltinModule"),{fileURLToPath:Vs}=qs("node:url");var Zs=Object.defineProperty,Ee=se((e,t)=>Zs(e,"name",{value:t,configurable:!0}),"t$1");function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(_e,"ue");X(_e,"de");_(_e,"m$4");$e(_e,"d");se(_e,"getDefaultExportFromCjs");Ee(_e,"getDefaultExportFromCjs");function ht(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(ht,"me");X(ht,"je");_(ht,"h");$e(ht,"O");se(ht,"getDefaultExportFromNamespaceIfPresent");Ee(ht,"getDefaultExportFromNamespaceIfPresent");function yt(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}h(yt,"he");X(yt,"Oe");_(yt,"x");$e(yt,"P");se(yt,"getDefaultExportFromNamespaceIfNotNamed");Ee(yt,"getDefaultExportFromNamespaceIfNotNamed");function bt(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=Ee(se($e(_(X(h(function s(){var u=!1;try{u=this instanceof s}catch{}return u?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"c"),"c"),"a"),"s"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var u=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,u.get?u:{enumerable:!0,get:Ee(function(){return e[s]},"get")})}),r}h(bt,"ye$1");X(bt,"Pe");_(bt,"y$2");$e(bt,"_");se(bt,"getAugmentedNamespace");Ee(bt,"getAugmentedNamespace");var Sn,An;function vt(){return An||(An=1,Sn=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Sn}h(vt,"be$1");X(vt,"_e");_(vt,"w$1");$e(vt,"k");se(vt,"requireBinaryExtensions");var Gs=vt();const Ks=_e(Gs);var Js=Object.defineProperty,Y=se((e,t)=>Js(e,"name",{value:t,configurable:!0}),"r");const Hs=new Set(Ks),Xs=new Set(["/","\\",void 0]),_n=Symbol.for("pathe:normalizedAlias"),Qs=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Ys=Y((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),Ot=Y((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),ao=Y(e=>{if(e[_n])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[s])=>Ys(r,s)));for(const r in t)for(const s in t)s===r||r.startsWith(s)||t[r].startsWith(s)&&Xs.has(t[r][s.length])&&(t[r]=t[s]+t[r].slice(s.length));return Object.defineProperty(t,_n,{enumerable:!1,value:!0}),t},"normalizeAliases");Y((e,t)=>{e=Q(e),t=ao(t);for(const[r,s]of Object.entries(t)){if(!e.startsWith(r))continue;const u=Ot(r)?r.slice(0,-1):r;if(Ot(e[u.length]))return H(s,e.slice(r.length))}return e},"resolveAlias");Y(e=>Qs.exec(e)?.[2],"filename");Y((e,t)=>{e=Q(e),t=ao(t);for(const[r,s]of Object.entries(t).toReversed()){if(!e.startsWith(s))continue;const u=Ot(s)?s.slice(0,-1):s;if(Ot(e[u.length]))return H(r,e.slice(s.length))}return e},"reverseResolveAlias");const ei=/^(?:\.?\.[/\\]|\.\.\B)/,ti=/^(?:msys|cygwin)$/;Y(e=>ei.test(e)||e==="..","isRelative");Y(e=>Hs.has(so(e).slice(1).toLowerCase()),"isBinaryPath");const Te=Y(e=>Q(e instanceof URL?Vs(e):e),"toPath");Y(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:ti.test(e)},"isWindows");var ri=Object.defineProperty,ni=_((e,t)=>ri(e,"name",{value:t,configurable:!0}),"p"),oi=Object.defineProperty,co=ni((e,t)=>oi(e,"name",{value:t,configurable:!0}),"a");const si=Ae(import.meta.url),nt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=co(e=>{if(typeof nt<"u"&&nt.versions&&nt.versions.node){const[t,r]=nt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return nt.getBuiltinModule(e)}return si(e)},"__cjs_getBuiltinModule"),{stat:ii,lstat:ai}=uo("node:fs/promises"),{fileURLToPath:ci}=uo("node:url");var ui=Object.defineProperty,Cn=co((e,t)=>ui(e,"name",{value:t,configurable:!0}),"n");const li=Cn(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Te(t.cwd):process.cwd();let s=oe(r);const{root:u}=io(s),l=Te(t.stopAt??u),d=oe(s,l),m=t.type??"file",$=Cn(async function(j){return typeof e=="function"?[await e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?ii:ai;for(;s&&s!==d&&s!==u;){const j=await $(s);for(let x of j){if(x===eo)return;if(x===void 0)continue;Buffer.isBuffer(x)?x=x.toString():x instanceof URL&&(x=ci(x));const C=be(x)?x:oe(s,x);try{const E=await O(C);if(m==="file"&&E.isFile()||m==="directory"&&E.isDirectory())return C}catch{}}s=mt(s)}},"findUp");var fi=Object.defineProperty,pi=_((e,t)=>fi(e,"name",{value:t,configurable:!0}),"u$3"),di=Object.defineProperty,lo=pi((e,t)=>di(e,"name",{value:t,configurable:!0}),"i");const gi=Ae(import.meta.url),ot=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fo=lo(e=>{if(typeof ot<"u"&&ot.versions&&ot.versions.node){const[t,r]=ot.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ot.getBuiltinModule(e)}return gi(e)},"__cjs_getBuiltinModule"),{statSync:mi,lstatSync:hi}=fo("node:fs"),{fileURLToPath:yi}=fo("node:url");var bi=Object.defineProperty,zn=lo((e,t)=>bi(e,"name",{value:t,configurable:!0}),"o");const vi=zn((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const r=t.cwd?Te(t.cwd):process.cwd();let s=oe(r);const{root:u}=io(s),l=Te(t.stopAt??u),d=oe(s,l),m=t.type??"file",$=zn(function(j){return typeof e=="function"?[e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?mi:hi;for(;s&&s!==d&&s!==u;){for(let j of $(s)){if(j===eo)return;if(j===void 0)continue;Buffer.isBuffer(j)?j=j.toString():j instanceof URL&&(j=yi(j));const x=be(j)?j:oe(s,j);try{const C=O(x);if(m==="file"&&C.isFile()||m==="directory"&&C.isDirectory())return x}catch{}}s=mt(s)}},"findUpSync");var $i=Object.defineProperty,po=_((e,t)=>$i(e,"name",{value:t,configurable:!0}),"t$2"),xi=Object.defineProperty,dn=po((e,t)=>xi(e,"name",{value:t,configurable:!0}),"s");const wi=Ae(import.meta.url),st=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ji=dn(e=>{if(typeof st<"u"&&st.versions&&st.versions.node){const[t,r]=st.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return st.getBuiltinModule(e)}return wi(e)},"__cjs_getBuiltinModule"),{access:Oi}=ji("node:fs/promises");var Pi=Object.defineProperty,ki=dn((e,t)=>Pi(e,"name",{value:t,configurable:!0}),"o");async function ce(e,t=Yn){fn(e),e=Te(e);try{return await Oi(e,t),!0}catch{return!1}}h(ce,"D$3");X(ce,"G");_(ce,"i$1");po(ce,"d");dn(ce,"m");ki(ce,"isAccessible");var Ei=Object.defineProperty,go=_((e,t)=>Ei(e,"name",{value:t,configurable:!0}),"t$1"),Ti=Object.defineProperty,gn=go((e,t)=>Ti(e,"name",{value:t,configurable:!0}),"t");const Si=Ae(import.meta.url),it=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ai=gn(e=>{if(typeof it<"u"&&it.versions&&it.versions.node){const[t,r]=it.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return it.getBuiltinModule(e)}return Si(e)},"__cjs_getBuiltinModule"),{accessSync:_i}=Ai("node:fs");var Ci=Object.defineProperty,zi=gn((e,t)=>Ci(e,"name",{value:t,configurable:!0}),"o");function ue(e,t=Yn){fn(e),e=Te(e);try{return _i(e,t),!0}catch{return!1}}h(ue,"I$2");X(ue,"V");_(ue,"i");go(ue,"d");gn(ue,"m");zi(ue,"isAccessibleSync");var Mi=Object.defineProperty,mo=_((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"o"),Ni=Object.defineProperty,ho=mo((e,t)=>Ni(e,"name",{value:t,configurable:!0}),"o"),Bi=Object.defineProperty,Ri=ho((e,t)=>Bi(e,"name",{value:t,configurable:!0}),"o");class yo extends Error{static{h(this,"$t")}static{X(this,"wt")}static{_(this,"s")}static{mo(this,"u")}static{ho(this,"n")}static{Ri(this,"NotFoundError")}constructor(t){super(`ENOENT: ${t}`)}get code(){return"ENOENT"}set code(t){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(t){throw new Error("Cannot overwrite name of NotFoundError")}}var Di=Object.defineProperty,mn=_((e,t)=>Di(e,"name",{value:t,configurable:!0}),"u");const Pt=mn((e,t)=>(t?.create&&Os(e),e),"useDirectory");mn(async(e,t)=>{if(Pe.CACHE_DIR&&!["0","1","false","true"].includes(Pe.CACHE_DIR))return Pt(H(Pe.CACHE_DIR,e),t);const r=await li("package.json",{cwd:t?.cwd??Qn(),type:"file"});if(!r){if(t?.throwError)throw new yo("No such file or directory found.");return}const s=H(mt(r),"node_modules"),u=H(s,".cache"),l=H(u,e);if(!(Oe(l)&&!await ce(l,ke))&&!(Oe(u)&&!await ce(u,ke))&&!(Oe(s)&&!await ce(s,ke)))return Pt(l,t)},"findCacheDirectory");const Ii=mn((e,t)=>{if(Pe.CACHE_DIR&&!["0","1","false","true"].includes(Pe.CACHE_DIR))return Pt(H(Pe.CACHE_DIR,e),t);const r=vi("package.json",{cwd:t?.cwd??Qn(),type:"file"});if(!r){if(t?.throwError)throw new yo("No such file or directory found.");return}const s=H(mt(r),"node_modules"),u=H(s,".cache"),l=H(u,e);if(!(Oe(l)&&!ue(l,ke))&&!(Oe(u)&&!ue(u,ke))&&!(Oe(s)&&!ue(s,ke)))return Pt(l,t)},"findCacheDirectorySync"),bo=Ii,an=0,vo=4,wl=Symbol("findUpStop"),jl=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g;var Fi=Object.defineProperty,Wi=h((e,t)=>Fi(e,"name",{value:t,configurable:!0}),"t$a"),Li=Object.defineProperty,Ui=Wi((e,t)=>Li(e,"name",{value:t,configurable:!0}),"t"),qi=Object.defineProperty,Vi=Ui((e,t)=>qi(e,"name",{value:t,configurable:!0}),"n");const Et=Vi(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var Zi=Object.defineProperty,Gi=h((e,t)=>Zi(e,"name",{value:t,configurable:!0}),"i$a"),Ki=Object.defineProperty,Ji=Gi((e,t)=>Ki(e,"name",{value:t,configurable:!0}),"r"),Hi=Object.defineProperty,Xi=Ji((e,t)=>Hi(e,"name",{value:t,configurable:!0}),"i");const Mn=Xi(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Qi=Object.defineProperty,Yi=h((e,t)=>Qi(e,"name",{value:t,configurable:!0}),"i$9"),ea=Object.defineProperty,$o=Yi((e,t)=>ea(e,"name",{value:t,configurable:!0}),"s");const ta=le(import.meta.url),at=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ra=$o(e=>{if(typeof at<"u"&&at.versions&&at.versions.node){const[t,r]=at.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return at.getBuiltinModule(e)}return ta(e)},"__cjs_getBuiltinModule"),{lstatSync:Nn,mkdirSync:na}=ra("node:fs");var oa=Object.defineProperty,sa=$o((e,t)=>oa(e,"name",{value:t,configurable:!0}),"o");const Tt=sa(e=>{Et(e);try{const t=Nn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Mn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{na(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const r=Nn(e);if(!r.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Mn(r))}'`,{cause:t})}},"ensureDirSync");var ia=Object.defineProperty,aa=h((e,t)=>ia(e,"name",{value:t,configurable:!0}),"$e"),ca=Object.defineProperty,hn=aa((e,t)=>ca(e,"name",{value:t,configurable:!0}),"W"),ua=Object.defineProperty,v=hn((e,t)=>ua(e,"name",{value:t,configurable:!0}),"u$1");let Bn=v(()=>{var e=(()=>{var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=v((n,o)=>{for(var i in o)t(n,i,{get:o[i],enumerable:!0})},"ne"),d=v((n,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(n,a)&&a!==i&&t(n,a,{get:v(()=>o[a],"get"),enumerable:!(c=r(o,a))||c.enumerable});return n},"ae"),m=v(n=>d(t({},"__esModule",{value:!0}),n),"oe"),$={};l($,{zeptomatch:v(()=>Ye,"zeptomatch")});var O=v(n=>{const o=new Set,i=[n];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,y=f.length;p<y;p++)i.push(f[p])}return Array.from(o)},"M"),j=v(n=>{let o="";const i=O(n);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),x=v((n,o,i)=>{const c=i.get(n);if(c!==void 0)return c;const a=n.partial??o;let f="";if(n.regex&&(f+=a?"(?:$|":"",f+=n.regex.source),n.children?.length){const p=E(n.children.map(y=>x(y,o,i)).filter(Boolean));if(p?.length){const y=n.children.some(K=>!K.regex||!(K.partial??o)),P=p.length>1||a&&(!f.length||y);f+=P?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=P?")":""}}return n.regex&&(f+=a?")":""),i.set(n,f),f},"O"),C=v((n,o)=>{const i=new Map,c=O(n);for(let a=c.length-1;a>=0;a--){const f=x(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=v(n=>Array.from(new Set(n)),"ue"),k=v((n,o,i)=>k.compile(n,i).test(o),"R");k.compile=(n,o)=>{const i=o?.partial??!1,c=C(n,i),a=j(n);return new RegExp(`^(?:${c})$`,a)};var V=k,Z=v((n,o)=>{const i=V.compile(n,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),ae=Z,ze=v(n=>{const o=n.map(c=>c.source).join("|")||"$^",i=n[0]?.flags;return new RegExp(o,i)},"ve"),Me=ze,re=v(n=>Array.isArray(n),"j"),B=v(n=>typeof n=="function","_"),Ne=v(n=>n.length===0,"he"),Be=(()=>{const{toString:n}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(n.call(i))})(),It=v(n=>typeof n=="number","de"),Ft=v(n=>typeof n=="object"&&n!==null,"xe"),Wt=v(n=>n instanceof RegExp,"me"),Lt=(()=>{const n=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>n.test(o.source)})(),Ut=(()=>{const n=/^[a-zA-Z0-9_-]+$/;return o=>n.test(o.source)&&!o.flags.includes("i")})(),Re=v(n=>typeof n=="string","A"),z=v(n=>n===void 0,"f"),qt=v(n=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=n(i);return o.set(i,a),a}},"ye"),De=v((n,o,i={})=>{const c={cache:{},input:n,index:0,indexBacktrackMax:0,options:i,output:[]},a=M(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===n.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),g=v((n,o)=>re(n)?Vt(n,o):Re(n)?Ie(n,o):Zt(n,o),"i"),Vt=v((n,o)=>{const i={};for(const c of n){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!z(o)&&!c.options.silent){const y=a.slice(f,p),P=B(o)?o(y,a,`${f}`):o;z(P)||c.output.push(P)}c.index=p}return!0}},"we"),Zt=v((n,o)=>{if(Ut(n))return Ie(n.source,o);{const i=n.source,c=n.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return Lt(n)&&B(o)&&!Be(o)?Gt(a,o):Kt(a,o)}},"$e"),Gt=v((n,o)=>i=>{const c=i.index,a=i.input;n.lastIndex=c;const f=n.exec(a);if(f){const p=n.lastIndex;if(!i.options.silent){const y=o(...f,a,`${c}`);z(y)||i.output.push(y)}return i.index=p,!0}else return!1},"Ee"),Kt=v((n,o)=>i=>{const c=i.index,a=i.input;if(n.lastIndex=c,n.test(a)){const f=n.lastIndex;if(!z(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;z(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ie=v((n,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(n,c)){if(!z(o)&&!i.options.silent){const f=B(o)?o(n,a,`${c}`):o;z(f)||i.output.push(f)}return i.index+=n.length,!0}else return!1},"F"),de=v((n,o,i,c)=>{const a=M(n),f=o>1;return me(ge(We(p=>{let y=0;for(;y<i;){const P=p.index;if(!a(p)||(y+=1,p.index===P))break}return y>=o},f),c))},"k"),Fe=v((n,o)=>de(n,0,1,o),"L"),ne=v((n,o)=>de(n,0,1/0,o),"$"),Jt=v((n,o)=>de(n,1,1/0,o),"Re"),L=v((n,o)=>{const i=n.map(M);return me(ge(We(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),S=v((n,o)=>{const i=n.map(M);return me(ge(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),We=v((n,o=!0,i=!1)=>{const c=M(n);return o?a=>{const f=a.index,p=a.output.length,y=c(a);return!y&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!y||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),y}:c},"q"),ge=v((n,o)=>{const i=M(n);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return z(p)||c.output.push(p),!0}else return!1}:i},"B"),me=(()=>{let n=0;return o=>{const i=M(o),c=n+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,y=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),P=y.queue;if(p<=y.indexMax){const J=y.store||(y.store=new Map);if(P.length){for(let q=0,Yr=P.length;q<Yr;q+=2){const en=P[q*2],tn=P[q*2+1];J.set(en,tn)}P.length=0}const A=J.get(p);if(A===!1)return!1;if(It(A))return a.index=A,!0;if(A)return a.index=A.index,A.output?.length&&a.output.push(...A.output),!0}const K=a.output.length,Qr=i(a);if(y.indexMax=Math.max(y.indexMax,p),Qr){const J=a.index,A=a.output.length;if(A>K){const q=a.output.slice(K,A);P.push(p,{index:J,output:q})}else P.push(p,J);return!0}else return P.push(p,!1),!1}}})(),Le=v(n=>{let o;return i=>(o||(o=M(n())),o(i))},"G"),M=qt(n=>{if(B(n))return Ne(n)?Le(n):n;if(Re(n)||Wt(n))return g(n);if(re(n))return L(n);if(Ft(n))return S(Object.values(n));throw new Error("Invalid rule")}),R=v(n=>n,"d"),Ht=v(n=>typeof n=="string","ke"),Xt=v(n=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const y=n(c,a);return f.set(c,y),y}},"Be"),Qt=v(n=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=n(c,a))}},"Pe"),Yt=g(/\\./,R),er=g(/./,R),tr=g(/\*\*\*+/,"*"),rr=g(/([^/{[(!])\*\*/,(n,o)=>`${o}*`),nr=g(/(^|.)\*\*(?=[^*/)\]}])/,(n,o)=>`${o}*`),or=ne(S([Yt,tr,rr,nr,er])),sr=or,ir=v(n=>De(n,sr,{memoization:!1}).join(""),"Ie"),ar=ir,Ue="abcdefghijklmnopqrstuvwxyz",cr=v(n=>{let o="";for(;n>0;){const i=(n-1)%26;o=Ue[i]+o,n=Math.floor((n-1)/26)}return o},"Le"),qe=v(n=>{let o=0;for(let i=0,c=n.length;i<c;i++)o=o*26+Ue.indexOf(n[i])+1;return o},"V"),he=v((n,o)=>{if(o<n)return he(o,n);const i=[];for(;n<=o;)i.push(n++);return i},"b"),ur=v((n,o,i)=>he(n,o).map(c=>String(c).padStart(i,"0")),"qe"),Ve=v((n,o)=>he(qe(n),qe(o)).map(cr),"W"),w=v(n=>({partial:!1,regex:new RegExp(n,"s"),children:[]}),"c"),G=v(n=>({children:n}),"y"),U=(()=>{const n=v((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)n(a[f],i,c)},"e");return o=>{if(!o.length)return G([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];n(a,f,c)}return o[0]}})(),N=v(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),lr=g(/\\./,w),fr=g(/[$.*+?^(){}[\]\|]/,n=>w(`\\${n}`)),pr=g(/[\\\/]/,N),dr=g(/[^$.*+?^(){}[\]\|\\\/]+/,w),gr=g(/^(?:!!)*!(.*)$/,(n,o)=>w(`(?!^${Ye.compile(o).source}$).*?`)),mr=g(/^(!!)+/),hr=S([gr,mr]),yr=g(/\/(\*\*\/)+/,()=>G([U([N(),w(".+?"),N()]),N()])),br=g(/^(\*\*\/)+/,()=>G([w("^"),U([w(".*?"),N()])])),vr=g(/\/(\*\*)$/,()=>G([U([N(),w(".*?")]),w("$")])),$r=g(/\*\*/,()=>w(".*?")),Ze=S([yr,br,vr,$r]),xr=g(/\*\/(?!\*\*\/|\*$)/,()=>U([w("[^\\\\/]*?"),N()])),wr=g(/\*/,()=>w("[^\\\\/]*")),Ge=S([xr,wr]),Ke=g("?",()=>w("[^\\\\/]")),jr=g("[",R),Or=g("]",R),Pr=g(/[!^]/,"^\\\\/"),kr=g(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),Er=g(/\\./,R),Tr=g(/[$.*+?^(){}[\|]/,n=>`\\${n}`),Sr=g(/[\\\/]/,"\\\\/"),Ar=g(/[^$.*+?^(){}[\]\|\\\/]+/,R),_r=S([Er,Tr,Sr,kr,Ar]),Je=L([jr,Fe(Pr),ne(_r),Or],n=>w(n.join(""))),Cr=g("{","(?:"),zr=g("}",")"),Mr=g(/(\d+)\.\.(\d+)/,(n,o,i)=>ur(+o,+i,Math.min(o.length,i.length)).join("|")),Nr=g(/([a-z]+)\.\.([a-z]+)/,(n,o,i)=>Ve(o,i).join("|")),Br=g(/([A-Z]+)\.\.([A-Z]+)/,(n,o,i)=>Ve(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),Rr=S([Mr,Nr,Br]),He=L([Cr,Rr,zr],n=>w(n.join(""))),Dr=g("{"),Ir=g("}"),Fr=g(","),Wr=g(/\\./,w),Lr=g(/[$.*+?^(){[\]\|]/,n=>w(`\\${n}`)),Ur=g(/[\\\/]/,N),qr=g(/[^$.*+?^(){}[\]\|\\\/,]+/,w),Vr=Le(()=>Qe),Zr=g("",()=>w("(?:)")),Gr=Jt(S([Ze,Ge,Ke,Je,He,Vr,Wr,Lr,Ur,qr]),U),Xe=S([Gr,Zr]),Qe=L([Dr,Fe(L([Xe,ne(L([Fr,Xe]))])),Ir],G),Kr=ne(S([hr,Ze,Ge,Ke,Je,He,Qe,lr,fr,pr,dr]),U),Jr=Kr,Hr=v(n=>De(n,Jr,{memoization:!1})[0],"kr"),Xr=Hr,ye=v((n,o,i)=>ye.compile(n,i).test(o),"N");ye.compile=(()=>{const n=Qt((i,c)=>ae(Xr(ar(i)),c)),o=Xt((i,c)=>Me(i.map(a=>n(a,c))));return(i,c)=>Ht(i)?n(i,c):o(i,c)})();var Ye=ye;return m($)})();return e.default||e},"_lazyMatch"),nn;const la=v((e,t)=>(nn||(nn=Bn(),Bn=null),nn(e,t)),"default");var fa=Object.defineProperty,pa=hn((e,t)=>fa(e,"name",{value:t,configurable:!0}),"t$1");const da=/^[A-Z]:\//i,ee=pa((e="")=>e&&e.replaceAll("\\","/").replace(da,t=>t.toUpperCase()),"normalizeWindowsPath");var ga=Object.defineProperty,W=hn((e,t)=>ga(e,"name",{value:t,configurable:!0}),"r");const ma=/^[/\\]{2}/,ha=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,xo=/^[A-Z]:$/i,Rn=/^\/([A-Z]:)?$/i,ya=/.(\.[^./]+)$/,ba=/^[/\\]|^[a-z]:[/\\]/i,va=/\/$/,$a=/^win/i,xa=W(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Ol="/",Pl=$a.test(globalThis.process?.platform??"")?";":":",wo=W((e,t)=>{let r="",s=0,u=-1,l=0,d;for(let m=0;m<=e.length;++m){if(m<e.length)d=e[m];else{if(d==="/")break;d="/"}if(d==="/"){if(!(u===m-1||l===1))if(l===2){if(r.length<2||s!==2||!r.endsWith(".")||r.at(-2)!=="."){if(r.length>2){const $=r.lastIndexOf("/");$===-1?(r="",s=0):(r=r.slice(0,$),s=r.length-1-r.lastIndexOf("/")),u=m,l=0;continue}else if(r.length>0){r="",s=0,u=m,l=0;continue}}t&&(r+=r.length>0?"/..":"..",s=2)}else r.length>0?r+=`/${e.slice(u+1,m)}`:r=e.slice(u+1,m),s=m-u-1;u=m,l=0}else d==="."&&l!==-1?++l:l=-1}return r},"normalizeString"),ve=W(e=>ha.test(e),"isAbsolute"),jo=W(function(e){if(e.length===0)return".";e=ee(e);const t=ma.exec(e),r=ve(e),s=e.at(-1)==="/";return e=wo(e,!r),e.length===0?r?"/":s?"./":".":(s&&(e+="/"),xo.test(e)&&(e+="/"),t?r?`//${e}`:`//./${e}`:r&&!ve(e)?`/${e}`:e)},"normalize"),D=W((...e)=>{let t="";for(const r of e)if(r)if(t.length>0){const s=t.at(-1)==="/",u=r[0]==="/";s&&u?t+=r.slice(1):t+=s||u?r:`/${r}`}else t+=r;return jo(t)},"join"),cn=W(function(...e){e=e.map(s=>ee(s));let t="",r=!1;for(let s=e.length-1;s>=-1&&!r;s--){const u=s>=0?e[s]:xa();!u||u.length===0||(t=`${u}/${t}`,r=ve(u))}return t=wo(t,!r),r&&!ve(t)?`/${t}`:t.length>0?t:"."},"resolve");W(function(e){return ee(e)},"toNamespacedPath");const Oo=W(function(e){return ya.exec(ee(e))?.[1]??""},"extname"),kl=W(function(e,t){const r=cn(e).replace(Rn,"$1").split("/"),s=cn(t).replace(Rn,"$1").split("/");if(s[0][1]===":"&&r[0][1]===":"&&r[0]!==s[0])return s.join("/");const u=[...r];for(const l of u){if(s[0]!==l)break;r.shift(),s.shift()}return[...r.map(()=>".."),...s].join("/")},"relative"),Ce=W(e=>{const t=ee(e).replace(va,"").split("/").slice(0,-1);return t.length===1&&xo.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(ve(e)?"/":".")},"dirname");W(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return ee(e.root?cn(...t):t.join("/"))},"format");const wa=W((e,t)=>{const r=ee(e).split("/").pop();return t&&r.endsWith(t)?r.slice(0,-t.length):r},"basename"),El=W(function(e){const t=ba.exec(e)?.[0]?.replaceAll("\\","/")??"",r=wa(e),s=Oo(r);return{base:r,dir:Ce(e),ext:s,name:r.slice(0,r.length-s.length),root:t}},"parse");W((e,t)=>la(t,jo(e)),"matchesGlob");var ja=Object.defineProperty,xe=h((e,t)=>ja(e,"name",{value:t,configurable:!0}),"n$5"),Oa=Object.defineProperty,ie=xe((e,t)=>Oa(e,"name",{value:t,configurable:!0}),"a");const Pa=le(import.meta.url),ct=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ka=ie(e=>{if(typeof ct<"u"&&ct.versions&&ct.versions.node){const[t,r]=ct.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ct.getBuiltinModule(e)}return Pa(e)},"__cjs_getBuiltinModule"),{fileURLToPath:Ea}=ka("node:url");var Ta=Object.defineProperty,Se=ie((e,t)=>Ta(e,"name",{value:t,configurable:!0}),"t$1");function St(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(St,"m$4");xe(St,"d");ie(St,"getDefaultExportFromCjs");Se(St,"getDefaultExportFromCjs");function yn(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}h(yn,"h$3");xe(yn,"O");ie(yn,"getDefaultExportFromNamespaceIfPresent");Se(yn,"getDefaultExportFromNamespaceIfPresent");function bn(e){return e&&Object.prototype.hasOwnProperty.call(e,"default")&&Object.keys(e).length===1?e.default:e}h(bn,"x$3");xe(bn,"P");ie(bn,"getDefaultExportFromNamespaceIfNotNamed");Se(bn,"getDefaultExportFromNamespaceIfNotNamed");function vn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var r=Se(ie(xe(h(function s(){var u=!1;try{u=this instanceof s}catch{}return u?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)},"a"),"s"),"a"),"a");r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var u=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,u.get?u:{enumerable:!0,get:Se(function(){return e[s]},"get")})}),r}h(vn,"y$4");xe(vn,"_");ie(vn,"getAugmentedNamespace");Se(vn,"getAugmentedNamespace");var Dn,In;function $n(){return In||(In=1,Dn=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),Dn}h($n,"w$3");xe($n,"k");ie($n,"requireBinaryExtensions");var Sa=$n();const Aa=St(Sa);var _a=Object.defineProperty,te=ie((e,t)=>_a(e,"name",{value:t,configurable:!0}),"r");const Ca=new Set(Aa),za=new Set(["/","\\",void 0]),Fn=Symbol.for("pathe:normalizedAlias"),Ma=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,Na=te((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),kt=te((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),Po=te(e=>{if(e[Fn])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([r],[s])=>Na(r,s)));for(const r in t)for(const s in t)s===r||r.startsWith(s)||t[r].startsWith(s)&&za.has(t[r][s.length])&&(t[r]=t[s]+t[r].slice(s.length));return Object.defineProperty(t,Fn,{enumerable:!1,value:!0}),t},"normalizeAliases");te((e,t)=>{e=ee(e),t=Po(t);for(const[r,s]of Object.entries(t)){if(!e.startsWith(r))continue;const u=kt(r)?r.slice(0,-1):r;if(kt(e[u.length]))return D(s,e.slice(r.length))}return e},"resolveAlias");te(e=>Ma.exec(e)?.[2],"filename");te((e,t)=>{e=ee(e),t=Po(t);for(const[r,s]of Object.entries(t).toReversed()){if(!e.startsWith(s))continue;const u=kt(s)?s.slice(0,-1):s;if(kt(e[u.length]))return D(r,e.slice(s.length))}return e},"reverseResolveAlias");const Ba=/^(?:\.?\.[/\\]|\.\.\B)/,Ra=/^(?:msys|cygwin)$/;te(e=>Ba.test(e)||e==="..","isRelative");te(e=>Ca.has(Oo(e).slice(1).toLowerCase()),"isBinaryPath");const At=te(e=>ee(e instanceof URL?Ea(e):e),"toPath");te(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:Ra.test(e)},"isWindows");var Da=Object.defineProperty,ko=h((e,t)=>Da(e,"name",{value:t,configurable:!0}),"t$8"),Ia=Object.defineProperty,xn=ko((e,t)=>Ia(e,"name",{value:t,configurable:!0}),"t");const Fa=le(import.meta.url),ut=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wa=xn(e=>{if(typeof ut<"u"&&ut.versions&&ut.versions.node){const[t,r]=ut.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ut.getBuiltinModule(e)}return Fa(e)},"__cjs_getBuiltinModule"),{accessSync:La}=Wa("node:fs");var Ua=Object.defineProperty,qa=xn((e,t)=>Ua(e,"name",{value:t,configurable:!0}),"o");function I(e,t=an){Et(e),e=At(e);try{return La(e,t),!0}catch{return!1}}h(I,"i$7");ko(I,"d");xn(I,"m");qa(I,"isAccessibleSync");var Va=Object.defineProperty,Eo=h((e,t)=>Va(e,"name",{value:t,configurable:!0}),"t$7"),Za=Object.defineProperty,To=Eo((e,t)=>Za(e,"name",{value:t,configurable:!0}),"t"),Ga=Object.defineProperty,Ka=To((e,t)=>Ga(e,"name",{value:t,configurable:!0}),"o");let Wn=class extends Error{static{h(this,"c")}static{Eo(this,"i")}static{To(this,"n")}static{Ka(this,"PermissionError")}constructor(t){super(`EPERM: Operation not permitted, ${t}`)}get code(){return"EPERM"}set code(t){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(t){throw new Error("Cannot overwrite name of PermissionError")}};var Ja=Object.defineProperty,Ha=h((e,t)=>Ja(e,"name",{value:t,configurable:!0}),"a$5"),Xa=Object.defineProperty,So=Ha((e,t)=>Xa(e,"name",{value:t,configurable:!0}),"i");const Qa=le(import.meta.url),lt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ao=So(e=>{if(typeof lt<"u"&&lt.versions&&lt.versions.node){const[t,r]=lt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return lt.getBuiltinModule(e)}return Qa(e)},"__cjs_getBuiltinModule"),{readFileSync:Ya}=Ao("node:fs"),{unzipSync:ec,brotliDecompressSync:tc}=Ao("node:zlib");var rc=Object.defineProperty,_o=So((e,t)=>rc(e,"name",{value:t,configurable:!0}),"r");const nc={brotli:tc,gzip:ec,none:_o(e=>e,"none")},oc=_o((e,t)=>{if(Et(e),e=At(e),!I(e))throw new Wn(`unable to read the non-accessible file: ${e}`);if(!I(e,vo))throw new Wn(`invalid access to read file at: ${e}`);const{buffer:r,compression:s,encoding:u,flag:l}=t??{},d=Ya(e,l?{encoding:u,flag:l}:{encoding:u}),m=nc[s??"none"],$=m(d);return r?$:$.toString()},"readFileSync");var sc=Object.defineProperty,ic=h((e,t)=>sc(e,"name",{value:t,configurable:!0}),"x$2"),ac=Object.defineProperty,Co=ic((e,t)=>ac(e,"name",{value:t,configurable:!0}),"$"),cc=Object.defineProperty,uc=Co((e,t)=>cc(e,"name",{value:t,configurable:!0}),"A"),lc=Object.defineProperty,wn=uc((e,t)=>lc(e,"name",{value:t,configurable:!0}),"$"),fc=Object.defineProperty,pc=wn((e,t)=>fc(e,"name",{value:t,configurable:!0}),"r$1");const dc=pc(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
- `),"normalizeLF"),gc=globalThis.process??Object.create(null),Ln={versions:{}},Un=new Proxy(gc,{get(e,t){if(t in e)return e[t];if(t in Ln)return Ln[t]}});var mc=Object.defineProperty,hc=wn((e,t)=>mc(e,"name",{value:t,configurable:!0}),"b");const yc=hc((e,t,r,s)=>{const u={column:0,line:-1,...e.start},l={...u,...e.end},d=u.line,m=u.column,$=l.line,O=l.column;let j=Math.max(d-(r+1),0),x=Math.min(t.length,$+s);d===-1&&(j=0),$===-1&&(x=t.length);const C=$-d,E={};if(C)for(let k=0;k<=C;k++){const V=k+d;if(!m)E[V]=!0;else if(k===0){const Z=t[V-1]?.length;E[V]=[m,(Z??0)-m+1]}else if(k===C)E[V]=[0,O];else{const Z=t[V-k]?.length;E[V]=[0,Z]}}else m===O?E[d]=m?[m,0]:!0:E[d]=[m,(O??0)-(m??0)];return{end:x,markerLines:E,start:j}},"getMarkerLines");var bc=Object.defineProperty,jt=wn((e,t)=>bc(e,"name",{value:t,configurable:!0}),"t");const vc=Un.platform==="win32"&&!Un.env?.WT_SESSION?">":"❯",$c=jt((e,t,r)=>{const s={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...r,color:{gutter:jt(k=>k,"gutter"),marker:jt(k=>k,"marker"),message:jt(k=>k,"message"),...r?.color}},u=typeof t.start.column=="number";let l=dc(e).split(`
3
- `);typeof s.tabWidth=="number"&&(l=l.map(k=>k.replaceAll(" "," ".repeat(s.tabWidth))));const{end:d,markerLines:m,start:$}=yc(t,l,s.linesAbove,s.linesBelow),O=String(d).length,{gutter:j,marker:x,message:C}=s.color;let E=l.slice($,d).map((k,V)=>{const Z=$+1+V,ae=m[Z],ze=` ${String(Z)}`.slice(-O),Me=!m[Z+1],re=` ${ze}${s.showGutter?" |":""}`;if(ae){let B="";if(Array.isArray(ae)){const Ne=k.replaceAll(/[^\t]/g," ").slice(0,Math.max(ae[0]-1,0)),Be=ae[1]||1;B=[`
4
- `,s.prefix+j(re.replaceAll(/\d/g," "))," ",Ne,x("^").repeat(Be)].join(""),Me&&s.message&&(B+=` ${C(s.message)}`)}return[s.prefix+x(vc),j(re),k.length>0?` ${k}`:"",B].join("")}return`${s.prefix} ${j(re)}${k.length>0?` ${k}`:""}`}).join(`
1
+ var yo=Object.defineProperty;var x=(e,t)=>yo(e,"name",{value:t,configurable:!0});import{createRequire as bo}from"node:module";import{f as jn,$ as jo,U as On,i as J,_ as Qr,K as rt,s as Oo,M as L,a as kn}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{createJiti as Pn}from"jiti";import"../packem_shared/otelPlugin-CJR2T_lk.js";import"../packem_shared/definePlugin-CWm4Dv_t.js";const vo=bo(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Lr=x(e=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[t,n]=Le.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Le.getBuiltinModule(e)}return vo(e)},"__cjs_getBuiltinModule"),{createHash:xn}=Lr("node:crypto"),{readdirSync:wn,readFileSync:$o,copyFileSync:xo,unlinkSync:wo}=Lr("node:fs"),{createRequire:tt}=Lr("node:module");var ko=Object.defineProperty,ve=x((e,t)=>ko(e,"name",{value:t,configurable:!0}),"K$2"),Po=Object.defineProperty,M=ve((e,t)=>Po(e,"name",{value:t,configurable:!0}),"E");const Eo=tt(import.meta.url),ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,En=M(e=>{if(typeof ge<"u"&&ge.versions&&ge.versions.node){const[t,n]=ge.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return ge.getBuiltinModule(e)}return Eo(e)},"__cjs_getBuiltinModule"),{existsSync:he}=En("node:fs"),{env:me,cwd:Tn}=ge,{createRequire:$e}=En("node:module"),An=0,ye=2,Sn=Symbol("findUpStop");var To=Object.defineProperty,Ao=M((e,t)=>To(e,"name",{value:t,configurable:!0}),"t$4"),So=Object.defineProperty,Co=Ao((e,t)=>So(e,"name",{value:t,configurable:!0}),"t"),Mo=Object.defineProperty,_o=Co((e,t)=>Mo(e,"name",{value:t,configurable:!0}),"n");const Vr=_o(e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},"assertValidFileOrDirectoryPath");var zo=Object.defineProperty,No=M((e,t)=>zo(e,"name",{value:t,configurable:!0}),"i$4"),Bo=Object.defineProperty,Ro=No((e,t)=>Bo(e,"name",{value:t,configurable:!0}),"r"),Io=Object.defineProperty,Do=Ro((e,t)=>Io(e,"name",{value:t,configurable:!0}),"i");const en=Do(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Fo=Object.defineProperty,Wo=M((e,t)=>Fo(e,"name",{value:t,configurable:!0}),"i$3"),Lo=Object.defineProperty,Cn=Wo((e,t)=>Lo(e,"name",{value:t,configurable:!0}),"s");const Vo=$e(import.meta.url),Ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Uo=Cn(e=>{if(typeof Ve<"u"&&Ve.versions&&Ve.versions.node){const[t,n]=Ve.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ve.getBuiltinModule(e)}return Vo(e)},"__cjs_getBuiltinModule"),{lstatSync:tn,mkdirSync:qo}=Uo("node:fs");var Zo=Object.defineProperty,Go=Cn((e,t)=>Zo(e,"name",{value:t,configurable:!0}),"o");const Ko=Go(e=>{Vr(e);try{const t=tn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(en(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{qo(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=tn(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(en(n))}'`,{cause:t})}},"ensureDirSync");var Jo=Object.defineProperty,m=M((e,t)=>Jo(e,"name",{value:t,configurable:!0}),"s$6");let rn=m(()=>{var e=(()=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=m((r,o)=>{for(var i in o)t(r,i,{get:o[i],enumerable:!0})},"ne"),g=m((r,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(r,a)&&a!==i&&t(r,a,{get:m(()=>o[a],"get"),enumerable:!(c=n(o,a))||c.enumerable});return r},"ae"),h=m(r=>g(t({},"__esModule",{value:!0}),r),"oe"),$={};l($,{zeptomatch:m(()=>We,"zeptomatch")});var O=m(r=>{const o=new Set,i=[r];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,y=f.length;p<y;p++)i.push(f[p])}return Array.from(o)},"M"),j=m(r=>{let o="";const i=O(r);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),v=m((r,o,i)=>{const c=i.get(r);if(c!==void 0)return c;const a=r.partial??o;let f="";if(r.regex&&(f+=a?"(?:$|":"",f+=r.regex.source),r.children?.length){const p=E(r.children.map(y=>v(y,o,i)).filter(Boolean));if(p?.length){const y=r.children.some(G=>!G.regex||!(G.partial??o)),k=p.length>1||a&&(!f.length||y);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),C=m((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=v(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=m(r=>Array.from(new Set(r)),"ue"),P=m((r,o,i)=>P.compile(r,i).test(o),"R");P.compile=(r,o)=>{const i=o?.partial??!1,c=C(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var U=P,q=m((r,o)=>{const i=U.compile(r,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),ee=q,xe=m(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),we=xe,X=m(r=>Array.isArray(r),"j"),B=m(r=>typeof r=="function","_"),je=m(r=>r.length===0,"he"),Oe=(()=>{const{toString:r}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(r.call(i))})(),$t=m(r=>typeof r=="number","de"),xt=m(r=>typeof r=="object"&&r!==null,"xe"),wt=m(r=>r instanceof RegExp,"me"),jt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),Ot=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),ke=m(r=>typeof r=="string","A"),_=m(r=>r===void 0,"f"),kt=m(r=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=r(i);return o.set(i,a),a}},"ye"),Pe=m((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=z(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===r.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),d=m((r,o)=>X(r)?Pt(r,o):ke(r)?Ee(r,o):Et(r,o),"i"),Pt=m((r,o)=>{const i={};for(const c of r){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!_(o)&&!c.options.silent){const y=a.slice(f,p),k=B(o)?o(y,a,`${f}`):o;_(k)||c.output.push(k)}c.index=p}return!0}},"we"),Et=m((r,o)=>{if(Ot(r))return Ee(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return jt(r)&&B(o)&&!Oe(o)?Tt(a,o):At(a,o)}},"$e"),Tt=m((r,o)=>i=>{const c=i.index,a=i.input;r.lastIndex=c;const f=r.exec(a);if(f){const p=r.lastIndex;if(!i.options.silent){const y=o(...f,a,`${c}`);_(y)||i.output.push(y)}return i.index=p,!0}else return!1},"Ee"),At=m((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!_(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;_(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ee=m((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!_(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;_(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ie=m((r,o,i,c)=>{const a=z(r),f=o>1;return ce(ae(Ae(p=>{let y=0;for(;y<i;){const k=p.index;if(!a(p)||(y+=1,p.index===k))break}return y>=o},f),c))},"k"),Te=m((r,o)=>ie(r,0,1,o),"L"),Y=m((r,o)=>ie(r,0,1/0,o),"$"),St=m((r,o)=>ie(r,1,1/0,o),"Re"),D=m((r,o)=>{const i=r.map(z);return ce(ae(Ae(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),A=m((r,o)=>{const i=r.map(z);return ce(ae(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),Ae=m((r,o=!0,i=!1)=>{const c=z(r);return o?a=>{const f=a.index,p=a.output.length,y=c(a);return!y&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!y||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),y}:c},"q"),ae=m((r,o)=>{const i=z(r);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return _(p)||c.output.push(p),!0}else return!1}:i},"B"),ce=(()=>{let r=0;return o=>{const i=z(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,y=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=y.queue;if(p<=y.indexMax){const K=y.store||(y.store=new Map);if(k.length){for(let W=0,zr=k.length;W<zr;W+=2){const Nr=k[W*2],Br=k[W*2+1];K.set(Nr,Br)}k.length=0}const S=K.get(p);if(S===!1)return!1;if($t(S))return a.index=S,!0;if(S)return a.index=S.index,S.output?.length&&a.output.push(...S.output),!0}const G=a.output.length,_r=i(a);if(y.indexMax=Math.max(y.indexMax,p),_r){const K=a.index,S=a.output.length;if(S>G){const W=a.output.slice(G,S);k.push(p,{index:K,output:W})}else k.push(p,K);return!0}else return k.push(p,!1),!1}}})(),Se=m(r=>{let o;return i=>(o||(o=z(r())),o(i))},"G"),z=kt(r=>{if(B(r))return je(r)?Se(r):r;if(ke(r)||wt(r))return d(r);if(X(r))return D(r);if(xt(r))return A(Object.values(r));throw new Error("Invalid rule")}),R=m(r=>r,"d"),Ct=m(r=>typeof r=="string","ke"),Mt=m(r=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const y=r(c,a);return f.set(c,y),y}},"Be"),_t=m(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),zt=d(/\\./,R),Nt=d(/./,R),Bt=d(/\*\*\*+/,"*"),Rt=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),It=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),Dt=Y(A([zt,Bt,Rt,It,Nt])),Ft=Dt,Wt=m(r=>Pe(r,Ft,{memoization:!1}).join(""),"Ie"),Lt=Wt,Ce="abcdefghijklmnopqrstuvwxyz",Vt=m(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=Ce[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Me=m(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+Ce.indexOf(r[i])+1;return o},"V"),ue=m((r,o)=>{if(o<r)return ue(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),Ut=m((r,o,i)=>ue(r,o).map(c=>String(c).padStart(i,"0")),"qe"),_e=m((r,o)=>ue(Me(r),Me(o)).map(Vt),"W"),w=m(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),Z=m(r=>({children:r}),"y"),F=(()=>{const r=m((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)r(a[f],i,c)},"e");return o=>{if(!o.length)return Z([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];r(a,f,c)}return o[0]}})(),N=m(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),qt=d(/\\./,w),Zt=d(/[$.*+?^(){}[\]\|]/,r=>w(`\\${r}`)),Gt=d(/[\\\/]/,N),Kt=d(/[^$.*+?^(){}[\]\|\\\/]+/,w),Jt=d(/^(?:!!)*!(.*)$/,(r,o)=>w(`(?!^${We.compile(o).source}$).*?`)),Ht=d(/^(!!)+/),Xt=A([Jt,Ht]),Yt=d(/\/(\*\*\/)+/,()=>Z([F([N(),w(".+?"),N()]),N()])),Qt=d(/^(\*\*\/)+/,()=>Z([w("^"),F([w(".*?"),N()])])),er=d(/\/(\*\*)$/,()=>Z([F([N(),w(".*?")]),w("$")])),tr=d(/\*\*/,()=>w(".*?")),ze=A([Yt,Qt,er,tr]),rr=d(/\*\/(?!\*\*\/|\*$)/,()=>F([w("[^\\\\/]*?"),N()])),nr=d(/\*/,()=>w("[^\\\\/]*")),Ne=A([rr,nr]),Be=d("?",()=>w("[^\\\\/]")),or=d("[",R),sr=d("]",R),ir=d(/[!^]/,"^\\\\/"),ar=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),cr=d(/\\./,R),ur=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),lr=d(/[\\\/]/,"\\\\/"),fr=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),pr=A([cr,ur,lr,ar,fr]),Re=D([or,Te(ir),Y(pr),sr],r=>w(r.join(""))),dr=d("{","(?:"),gr=d("}",")"),hr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>Ut(+o,+i,Math.min(o.length,i.length)).join("|")),mr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>_e(o,i).join("|")),yr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>_e(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),br=A([hr,mr,yr]),Ie=D([dr,br,gr],r=>w(r.join(""))),vr=d("{"),$r=d("}"),xr=d(","),wr=d(/\\./,w),jr=d(/[$.*+?^(){[\]\|]/,r=>w(`\\${r}`)),Or=d(/[\\\/]/,N),kr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,w),Pr=Se(()=>Fe),Er=d("",()=>w("(?:)")),Tr=St(A([ze,Ne,Be,Re,Ie,Pr,wr,jr,Or,kr]),F),De=A([Tr,Er]),Fe=D([vr,Te(D([De,Y(D([xr,De]))])),$r],Z),Ar=Y(A([Xt,ze,Ne,Be,Re,Ie,Fe,qt,Zt,Gt,Kt]),F),Sr=Ar,Cr=m(r=>Pe(r,Sr,{memoization:!1})[0],"kr"),Mr=Cr,le=m((r,o,i)=>le.compile(r,i).test(o),"N");le.compile=(()=>{const r=_t((i,c)=>ee(Mr(Lt(i)),c)),o=Mt((i,c)=>we(i.map(a=>r(a,c))));return(i,c)=>Ct(i)?r(i,c):o(i,c)})();var We=le;return h($)})();return e.default||e},"_lazyMatch"),Rr;const Ho=m((e,t)=>(Rr||(Rr=rn(),rn=null),Rr(e,t)),"zeptomatch"),Xo=/^[A-Z]:\//i,H=m((e="")=>e&&e.replaceAll("\\","/").replace(Xo,t=>t.toUpperCase()),"normalizeWindowsPath"),Yo=/^[/\\]{2}/,Qo=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Mn=/^[A-Z]:$/i,nn=/^\/([A-Z]:)?$/i,es=/.(\.[^./]+)$/,ts=/^[/\\]|^[a-z]:[/\\]/i,rs=/\/$/,ns=m(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),_n=m((e,t)=>{let n="",s=0,u=-1,l=0,g;for(let h=0;h<=e.length;++h){if(h<e.length)g=e[h];else{if(g==="/")break;g="/"}if(g==="/"){if(!(u===h-1||l===1))if(l===2){if(n.length<2||s!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const $=n.lastIndexOf("/");$===-1?(n="",s=0):(n=n.slice(0,$),s=n.length-1-n.lastIndexOf("/")),u=h,l=0;continue}else if(n.length>0){n="",s=0,u=h,l=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(u+1,h)}`:n=e.slice(u+1,h),s=h-u-1;u=h,l=0}else g==="."&&l!==-1?++l:l=-1}return n},"normalizeString"),fe=m(e=>Qo.test(e),"isAbsolute"),zn=m(function(e){if(e.length===0)return".";e=H(e);const t=Yo.exec(e),n=fe(e),s=e.at(-1)==="/";return e=_n(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),Mn.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!fe(e)?`/${e}`:e)},"normalize"),Nn=m((...e)=>{let t="";for(const n of e)if(n)if(t.length>0){const s=t.at(-1)==="/",u=n[0]==="/";s&&u?t+=n.slice(1):t+=s||u?n:`/${n}`}else t+=n;return zn(t)},"join"),Q=m(function(...e){e=e.map(s=>H(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:ns();!u||u.length===0||(t=`${u}/${t}`,n=fe(u))}return t=_n(t,!n),n&&!fe(t)?`/${t}`:t.length>0?t:"."},"resolve");m(function(e){return H(e)},"toNamespacedPath");const Bn=m(function(e){return es.exec(H(e))?.[1]??""},"extname");m(function(e,t){const n=Q(e).replace(nn,"$1").split("/"),s=Q(t).replace(nn,"$1").split("/");if(s[0][1]===":"&&n[0][1]===":"&&n[0]!==s[0])return s.join("/");const u=[...n];for(const l of u){if(s[0]!==l)break;n.shift(),s.shift()}return[...n.map(()=>".."),...s].join("/")},"relative");const Ur=m(e=>{const t=H(e).replace(rs,"").split("/").slice(0,-1);return t.length===1&&Mn.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(fe(e)?"/":".")},"dirname");m(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return H(e.root?Q(...t):t.join("/"))},"format");const os=m((e,t)=>{const n=H(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename"),Rn=m(function(e){const t=ts.exec(e)?.[0]?.replaceAll("\\","/")??"",n=os(e),s=Bn(n);return{base:n,dir:Ur(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");m((e,t)=>Ho(t,zn(e)),"matchesGlob");var ss=Object.defineProperty,V=M((e,t)=>ss(e,"name",{value:t,configurable:!0}),"i$2");const is=$e(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,as=V(e=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[t,n]=Ue.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ue.getBuiltinModule(e)}return is(e)},"__cjs_getBuiltinModule"),{fileURLToPath:cs}=as("node:url");function ut(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}x(ut,"dn");ve(ut,"Nr");M(ut,"w$1");V(ut,"getDefaultExportFromCjs");var on,sn;function lt(){return sn||(sn=1,on=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),on}x(lt,"gn");ve(lt,"Dr");M(lt,"y$2");V(lt,"requireBinaryExtensions");var us=lt();const ls=ut(us),fs=new Set(ls),ps=new Set(["/","\\",void 0]),an=Symbol.for("pathe:normalizedAlias"),ds=/(^|[/\\])([^/\\]+?)(?=(?:\.[^.]+)?$)/,gs=V((e,t)=>t.split("/").length-e.split("/").length,"compareAliases"),at=V((e="/")=>{const t=e.at(-1);return t==="/"||t==="\\"},"hasTrailingSlash"),In=V(e=>{if(e[an])return e;const t=Object.fromEntries(Object.entries(e).toSorted(([n],[s])=>gs(n,s)));for(const n in t)for(const s in t)s===n||n.startsWith(s)||t[n].startsWith(s)&&ps.has(t[n][s.length])&&(t[n]=t[s]+t[n].slice(s.length));return Object.defineProperty(t,an,{enumerable:!1,value:!0}),t},"normalizeAliases");V((e,t)=>{e=H(e),t=In(t);for(const[n,s]of Object.entries(t)){if(!e.startsWith(n))continue;const u=at(n)?n.slice(0,-1):n;if(at(e[u.length]))return Nn(s,e.slice(n.length))}return e},"resolveAlias");V(e=>ds.exec(e)?.[2],"filename");V((e,t)=>{e=H(e),t=In(t);for(const[n,s]of Object.entries(t).toReversed()){if(!e.startsWith(s))continue;const u=at(s)?s.slice(0,-1):s;if(at(e[u.length]))return Nn(n,e.slice(s.length))}return e},"reverseResolveAlias");const hs=/^(?:\.?\.[/\\]|\.\.\B)/,ms=/^(?:msys|cygwin)$/;V(e=>hs.test(e)||e==="..","isRelative");V(e=>fs.has(Bn(e).slice(1).toLowerCase()),"isBinaryPath");const be=V(e=>H(e instanceof URL?cs(e):e),"toPath");V(()=>{if(!globalThis.process)return!1;if(globalThis.process.platform==="win32"||globalThis.process.platform==="cygwin")return!0;const e=globalThis.process.env.OSTYPE;return typeof e!="string"?!1:ms.test(e)},"isWindows");var ys=Object.defineProperty,bs=M((e,t)=>ys(e,"name",{value:t,configurable:!0}),"p"),vs=Object.defineProperty,Dn=bs((e,t)=>vs(e,"name",{value:t,configurable:!0}),"a");const $s=$e(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fn=Dn(e=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[t,n]=qe.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return qe.getBuiltinModule(e)}return $s(e)},"__cjs_getBuiltinModule"),{stat:xs,lstat:ws}=Fn("node:fs/promises"),{fileURLToPath:js}=Fn("node:url");var Os=Object.defineProperty,cn=Dn((e,t)=>Os(e,"name",{value:t,configurable:!0}),"n");const ks=cn(async(e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=t.cwd?be(t.cwd):process.cwd();let s=Q(n);const{root:u}=Rn(s),l=be(t.stopAt??u),g=Q(s,l),h=t.type??"file",$=cn(async function(j){return typeof e=="function"?[await e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?xs:ws;for(;s&&s!==g&&s!==u;){const j=await $(s);for(let v of j){if(v===Sn)return;if(v===void 0)continue;Buffer.isBuffer(v)?v=v.toString():v instanceof URL&&(v=js(v));const C=fe(v)?v:Q(s,v);try{const E=await O(C);if(h==="file"&&E.isFile()||h==="directory"&&E.isDirectory())return C}catch{}}s=Ur(s)}},"findUp");var Ps=Object.defineProperty,Es=M((e,t)=>Ps(e,"name",{value:t,configurable:!0}),"u$3"),Ts=Object.defineProperty,Wn=Es((e,t)=>Ts(e,"name",{value:t,configurable:!0}),"i");const As=$e(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ln=Wn(e=>{if(typeof Ze<"u"&&Ze.versions&&Ze.versions.node){const[t,n]=Ze.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ze.getBuiltinModule(e)}return As(e)},"__cjs_getBuiltinModule"),{statSync:Ss,lstatSync:Cs}=Ln("node:fs"),{fileURLToPath:Ms}=Ln("node:url");var _s=Object.defineProperty,un=Wn((e,t)=>_s(e,"name",{value:t,configurable:!0}),"o");const zs=un((e,t={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=t.cwd?be(t.cwd):process.cwd();let s=Q(n);const{root:u}=Rn(s),l=be(t.stopAt??u),g=Q(s,l),h=t.type??"file",$=un(function(j){return typeof e=="function"?[e(j)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]},"getMatchers");t.allowSymlinks??=!0;const O=t.allowSymlinks?Ss:Cs;for(;s&&s!==g&&s!==u;){for(let j of $(s)){if(j===Sn)return;if(j===void 0)continue;Buffer.isBuffer(j)?j=j.toString():j instanceof URL&&(j=Ms(j));const v=fe(j)?j:Q(s,j);try{const C=O(v);if(h==="file"&&C.isFile()||h==="directory"&&C.isDirectory())return v}catch{}}s=Ur(s)}},"findUpSync");var Ns=Object.defineProperty,Vn=M((e,t)=>Ns(e,"name",{value:t,configurable:!0}),"t$2"),Bs=Object.defineProperty,qr=Vn((e,t)=>Bs(e,"name",{value:t,configurable:!0}),"s");const Rs=$e(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Is=qr(e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,n]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ge.getBuiltinModule(e)}return Rs(e)},"__cjs_getBuiltinModule"),{access:Ds}=Is("node:fs/promises");var Fs=Object.defineProperty,Ws=qr((e,t)=>Fs(e,"name",{value:t,configurable:!0}),"o");async function re(e,t=An){Vr(e),e=be(e);try{return await Ds(e,t),!0}catch{return!1}}x(re,"Q$2");ve(re,"se");M(re,"i$1");Vn(re,"d");qr(re,"m");Ws(re,"isAccessible");var Ls=Object.defineProperty,Un=M((e,t)=>Ls(e,"name",{value:t,configurable:!0}),"t$1"),Vs=Object.defineProperty,Zr=Un((e,t)=>Vs(e,"name",{value:t,configurable:!0}),"t");const Us=$e(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,qs=Zr(e=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[t,n]=Ke.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Ke.getBuiltinModule(e)}return Us(e)},"__cjs_getBuiltinModule"),{accessSync:Zs}=qs("node:fs");var Gs=Object.defineProperty,Ks=Zr((e,t)=>Gs(e,"name",{value:t,configurable:!0}),"o");function ne(e,t=An){Vr(e),e=be(e);try{return Zs(e,t),!0}catch{return!1}}x(ne,"ee$1");ve(ne,"ie");M(ne,"i");Un(ne,"d");Zr(ne,"m");Ks(ne,"isAccessibleSync");var Js=Object.defineProperty,qn=M((e,t)=>Js(e,"name",{value:t,configurable:!0}),"o"),Hs=Object.defineProperty,Zn=qn((e,t)=>Hs(e,"name",{value:t,configurable:!0}),"o"),Xs=Object.defineProperty,Ys=Zn((e,t)=>Xs(e,"name",{value:t,configurable:!0}),"o");let Gn=class extends Error{static{x(this,"Jn")}static{ve(this,"Xr")}static{M(this,"s")}static{qn(this,"u")}static{Zn(this,"n")}static{Ys(this,"NotFoundError")}constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}};var Qs=Object.defineProperty,ei=M((e,t)=>Qs(e,"name",{value:t,configurable:!0}),"$e"),ti=Object.defineProperty,Gr=ei((e,t)=>ti(e,"name",{value:t,configurable:!0}),"W"),ri=Object.defineProperty,b=Gr((e,t)=>ri(e,"name",{value:t,configurable:!0}),"u$1");let ln=b(()=>{var e=(()=>{var t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=b((r,o)=>{for(var i in o)t(r,i,{get:o[i],enumerable:!0})},"ne"),g=b((r,o,i,c)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of s(o))!u.call(r,a)&&a!==i&&t(r,a,{get:b(()=>o[a],"get"),enumerable:!(c=n(o,a))||c.enumerable});return r},"ae"),h=b(r=>g(t({},"__esModule",{value:!0}),r),"oe"),$={};l($,{zeptomatch:b(()=>We,"zeptomatch")});var O=b(r=>{const o=new Set,i=[r];for(let c=0;c<i.length;c++){const a=i[c];if(o.has(a))continue;o.add(a);const{children:f}=a;if(f?.length)for(let p=0,y=f.length;p<y;p++)i.push(f[p])}return Array.from(o)},"M"),j=b(r=>{let o="";const i=O(r);for(let c=0,a=i.length;c<a;c++){const f=i[c];if(!f.regex)continue;const p=f.regex.flags;if(o||(o=p),o!==p)throw new Error(`Inconsistent RegExp flags used: "${o}" and "${p}"`)}return o},"se"),v=b((r,o,i)=>{const c=i.get(r);if(c!==void 0)return c;const a=r.partial??o;let f="";if(r.regex&&(f+=a?"(?:$|":"",f+=r.regex.source),r.children?.length){const p=E(r.children.map(y=>v(y,o,i)).filter(Boolean));if(p?.length){const y=r.children.some(G=>!G.regex||!(G.partial??o)),k=p.length>1||a&&(!f.length||y);f+=k?a?"(?:$|":"(?:":"",f+=p.join("|"),f+=k?")":""}}return r.regex&&(f+=a?")":""),i.set(r,f),f},"O"),C=b((r,o)=>{const i=new Map,c=O(r);for(let a=c.length-1;a>=0;a--){const f=v(c[a],o,i);if(!(a>0))return f}return""},"ie"),E=b(r=>Array.from(new Set(r)),"ue"),P=b((r,o,i)=>P.compile(r,i).test(o),"R");P.compile=(r,o)=>{const i=o?.partial??!1,c=C(r,i),a=j(r);return new RegExp(`^(?:${c})$`,a)};var U=P,q=b((r,o)=>{const i=U.compile(r,o),c=`${i.source.slice(0,-1)}[\\\\/]?$`,a=i.flags;return new RegExp(c,a)},"le"),ee=q,xe=b(r=>{const o=r.map(c=>c.source).join("|")||"$^",i=r[0]?.flags;return new RegExp(o,i)},"ve"),we=xe,X=b(r=>Array.isArray(r),"j"),B=b(r=>typeof r=="function","_"),je=b(r=>r.length===0,"he"),Oe=(()=>{const{toString:r}=Function.prototype,o=/(?:^\(\s*(?:[^,.()]|\.(?!\.\.))*\s*\)\s*=>|^\s*[a-zA-Z$_][a-zA-Z0-9$_]*\s*=>)/;return i=>(i.length===0||i.length===1)&&o.test(r.call(i))})(),$t=b(r=>typeof r=="number","de"),xt=b(r=>typeof r=="object"&&r!==null,"xe"),wt=b(r=>r instanceof RegExp,"me"),jt=(()=>{const r=/\\\(|\((?!\?(?::|=|!|<=|<!))/;return o=>r.test(o.source)})(),Ot=(()=>{const r=/^[a-zA-Z0-9_-]+$/;return o=>r.test(o.source)&&!o.flags.includes("i")})(),ke=b(r=>typeof r=="string","A"),_=b(r=>r===void 0,"f"),kt=b(r=>{const o=new Map;return i=>{const c=o.get(i);if(c!==void 0)return c;const a=r(i);return o.set(i,a),a}},"ye"),Pe=b((r,o,i={})=>{const c={cache:{},input:r,index:0,indexBacktrackMax:0,options:i,output:[]},a=z(o)(c),f=Math.max(c.index,c.indexBacktrackMax);if(a&&c.index===r.length)return c.output;throw new Error(`Failed to parse at index ${f}`)},"I"),d=b((r,o)=>X(r)?Pt(r,o):ke(r)?Ee(r,o):Et(r,o),"i"),Pt=b((r,o)=>{const i={};for(const c of r){if(c.length!==1)throw new Error(`Invalid character: "${c}"`);const a=c.charCodeAt(0);i[a]=!0}return c=>{const a=c.input;let f=c.index,p=f;for(;p<a.length&&a.charCodeAt(p)in i;)p+=1;if(p>f){if(!_(o)&&!c.options.silent){const y=a.slice(f,p),k=B(o)?o(y,a,`${f}`):o;_(k)||c.output.push(k)}c.index=p}return!0}},"we"),Et=b((r,o)=>{if(Ot(r))return Ee(r.source,o);{const i=r.source,c=r.flags.replace(/y|$/,"y"),a=new RegExp(i,c);return jt(r)&&B(o)&&!Oe(o)?Tt(a,o):At(a,o)}},"$e"),Tt=b((r,o)=>i=>{const c=i.index,a=i.input;r.lastIndex=c;const f=r.exec(a);if(f){const p=r.lastIndex;if(!i.options.silent){const y=o(...f,a,`${c}`);_(y)||i.output.push(y)}return i.index=p,!0}else return!1},"Ee"),At=b((r,o)=>i=>{const c=i.index,a=i.input;if(r.lastIndex=c,r.test(a)){const f=r.lastIndex;if(!_(o)&&!i.options.silent){const p=B(o)?o(a.slice(c,f),a,`${c}`):o;_(p)||i.output.push(p)}return i.index=f,!0}else return!1},"Ce"),Ee=b((r,o)=>i=>{const c=i.index,a=i.input;if(a.startsWith(r,c)){if(!_(o)&&!i.options.silent){const f=B(o)?o(r,a,`${c}`):o;_(f)||i.output.push(f)}return i.index+=r.length,!0}else return!1},"F"),ie=b((r,o,i,c)=>{const a=z(r),f=o>1;return ce(ae(Ae(p=>{let y=0;for(;y<i;){const k=p.index;if(!a(p)||(y+=1,p.index===k))break}return y>=o},f),c))},"k"),Te=b((r,o)=>ie(r,0,1,o),"L"),Y=b((r,o)=>ie(r,0,1/0,o),"$"),St=b((r,o)=>ie(r,1,1/0,o),"Re"),D=b((r,o)=>{const i=r.map(z);return ce(ae(Ae(c=>{for(let a=0,f=i.length;a<f;a++)if(!i[a](c))return!1;return!0}),o))},"x"),A=b((r,o)=>{const i=r.map(z);return ce(ae(c=>{for(let a=0,f=i.length;a<f;a++)if(i[a](c))return!0;return!1},o))},"p"),Ae=b((r,o=!0,i=!1)=>{const c=z(r);return o?a=>{const f=a.index,p=a.output.length,y=c(a);return!y&&!i&&(a.indexBacktrackMax=Math.max(a.indexBacktrackMax,a.index)),(!y||i)&&(a.index=f,a.output.length!==p&&(a.output.length=p)),y}:c},"q"),ae=b((r,o)=>{const i=z(r);return o?c=>{if(c.options.silent)return i(c);const a=c.output.length;if(i(c)){const f=c.output.splice(a,1/0),p=o(f);return _(p)||c.output.push(p),!0}else return!1}:i},"B"),ce=(()=>{let r=0;return o=>{const i=z(o),c=r+=1;return a=>{var f;if(a.options.memoization===!1)return i(a);const p=a.index,y=(f=a.cache)[c]||(f[c]={indexMax:-1,queue:[]}),k=y.queue;if(p<=y.indexMax){const K=y.store||(y.store=new Map);if(k.length){for(let W=0,zr=k.length;W<zr;W+=2){const Nr=k[W*2],Br=k[W*2+1];K.set(Nr,Br)}k.length=0}const S=K.get(p);if(S===!1)return!1;if($t(S))return a.index=S,!0;if(S)return a.index=S.index,S.output?.length&&a.output.push(...S.output),!0}const G=a.output.length,_r=i(a);if(y.indexMax=Math.max(y.indexMax,p),_r){const K=a.index,S=a.output.length;if(S>G){const W=a.output.slice(G,S);k.push(p,{index:K,output:W})}else k.push(p,K);return!0}else return k.push(p,!1),!1}}})(),Se=b(r=>{let o;return i=>(o||(o=z(r())),o(i))},"G"),z=kt(r=>{if(B(r))return je(r)?Se(r):r;if(ke(r)||wt(r))return d(r);if(X(r))return D(r);if(xt(r))return A(Object.values(r));throw new Error("Invalid rule")}),R=b(r=>r,"d"),Ct=b(r=>typeof r=="string","ke"),Mt=b(r=>{const o=new WeakMap,i=new WeakMap;return(c,a)=>{const f=a?.partial?i:o,p=f.get(c);if(p!==void 0)return p;const y=r(c,a);return f.set(c,y),y}},"Be"),_t=b(r=>{const o={},i={};return(c,a)=>{const f=a?.partial?i:o;return f[c]??(f[c]=r(c,a))}},"Pe"),zt=d(/\\./,R),Nt=d(/./,R),Bt=d(/\*\*\*+/,"*"),Rt=d(/([^/{[(!])\*\*/,(r,o)=>`${o}*`),It=d(/(^|.)\*\*(?=[^*/)\]}])/,(r,o)=>`${o}*`),Dt=Y(A([zt,Bt,Rt,It,Nt])),Ft=Dt,Wt=b(r=>Pe(r,Ft,{memoization:!1}).join(""),"Ie"),Lt=Wt,Ce="abcdefghijklmnopqrstuvwxyz",Vt=b(r=>{let o="";for(;r>0;){const i=(r-1)%26;o=Ce[i]+o,r=Math.floor((r-1)/26)}return o},"Le"),Me=b(r=>{let o=0;for(let i=0,c=r.length;i<c;i++)o=o*26+Ce.indexOf(r[i])+1;return o},"V"),ue=b((r,o)=>{if(o<r)return ue(o,r);const i=[];for(;r<=o;)i.push(r++);return i},"b"),Ut=b((r,o,i)=>ue(r,o).map(c=>String(c).padStart(i,"0")),"qe"),_e=b((r,o)=>ue(Me(r),Me(o)).map(Vt),"W"),w=b(r=>({partial:!1,regex:new RegExp(r,"s"),children:[]}),"c"),Z=b(r=>({children:r}),"y"),F=(()=>{const r=b((o,i,c)=>{if(c.has(o))return;c.add(o);const{children:a}=o;if(!a.length)a.push(i);else for(let f=0,p=a.length;f<p;f++)r(a[f],i,c)},"e");return o=>{if(!o.length)return Z([]);for(let i=o.length-1;i>=1;i--){const c=new Set,a=o[i-1],f=o[i];r(a,f,c)}return o[0]}})(),N=b(()=>({regex:new RegExp("[\\\\/]","s"),children:[]}),"g"),qt=d(/\\./,w),Zt=d(/[$.*+?^(){}[\]\|]/,r=>w(`\\${r}`)),Gt=d(/[\\\/]/,N),Kt=d(/[^$.*+?^(){}[\]\|\\\/]+/,w),Jt=d(/^(?:!!)*!(.*)$/,(r,o)=>w(`(?!^${We.compile(o).source}$).*?`)),Ht=d(/^(!!)+/),Xt=A([Jt,Ht]),Yt=d(/\/(\*\*\/)+/,()=>Z([F([N(),w(".+?"),N()]),N()])),Qt=d(/^(\*\*\/)+/,()=>Z([w("^"),F([w(".*?"),N()])])),er=d(/\/(\*\*)$/,()=>Z([F([N(),w(".*?")]),w("$")])),tr=d(/\*\*/,()=>w(".*?")),ze=A([Yt,Qt,er,tr]),rr=d(/\*\/(?!\*\*\/|\*$)/,()=>F([w("[^\\\\/]*?"),N()])),nr=d(/\*/,()=>w("[^\\\\/]*")),Ne=A([rr,nr]),Be=d("?",()=>w("[^\\\\/]")),or=d("[",R),sr=d("]",R),ir=d(/[!^]/,"^\\\\/"),ar=d(/[a-z]-[a-z]|[0-9]-[0-9]/i,R),cr=d(/\\./,R),ur=d(/[$.*+?^(){}[\|]/,r=>`\\${r}`),lr=d(/[\\\/]/,"\\\\/"),fr=d(/[^$.*+?^(){}[\]\|\\\/]+/,R),pr=A([cr,ur,lr,ar,fr]),Re=D([or,Te(ir),Y(pr),sr],r=>w(r.join(""))),dr=d("{","(?:"),gr=d("}",")"),hr=d(/(\d+)\.\.(\d+)/,(r,o,i)=>Ut(+o,+i,Math.min(o.length,i.length)).join("|")),mr=d(/([a-z]+)\.\.([a-z]+)/,(r,o,i)=>_e(o,i).join("|")),yr=d(/([A-Z]+)\.\.([A-Z]+)/,(r,o,i)=>_e(o.toLowerCase(),i.toLowerCase()).join("|").toUpperCase()),br=A([hr,mr,yr]),Ie=D([dr,br,gr],r=>w(r.join(""))),vr=d("{"),$r=d("}"),xr=d(","),wr=d(/\\./,w),jr=d(/[$.*+?^(){[\]\|]/,r=>w(`\\${r}`)),Or=d(/[\\\/]/,N),kr=d(/[^$.*+?^(){}[\]\|\\\/,]+/,w),Pr=Se(()=>Fe),Er=d("",()=>w("(?:)")),Tr=St(A([ze,Ne,Be,Re,Ie,Pr,wr,jr,Or,kr]),F),De=A([Tr,Er]),Fe=D([vr,Te(D([De,Y(D([xr,De]))])),$r],Z),Ar=Y(A([Xt,ze,Ne,Be,Re,Ie,Fe,qt,Zt,Gt,Kt]),F),Sr=Ar,Cr=b(r=>Pe(r,Sr,{memoization:!1})[0],"kr"),Mr=Cr,le=b((r,o,i)=>le.compile(r,i).test(o),"N");le.compile=(()=>{const r=_t((i,c)=>ee(Mr(Lt(i)),c)),o=Mt((i,c)=>we(i.map(a=>r(a,c))));return(i,c)=>Ct(i)?r(i,c):o(i,c)})();var We=le;return h($)})();return e.default||e},"_lazyMatch"),Ir;const ni=b((e,t)=>(Ir||(Ir=ln(),ln=null),Ir(e,t)),"default");var oi=Object.defineProperty,si=Gr((e,t)=>oi(e,"name",{value:t,configurable:!0}),"t$1");const ii=/^[A-Z]:\//i,pe=si((e="")=>e&&e.replaceAll("\\","/").replace(ii,t=>t.toUpperCase()),"normalizeWindowsPath");var ai=Object.defineProperty,I=Gr((e,t)=>ai(e,"name",{value:t,configurable:!0}),"r");const ci=/^[/\\]{2}/,ui=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Kn=/^[A-Z]:$/i,fn=/^\/([A-Z]:)?$/i,li=/.(\.[^./]+)$/,fi=/^[/\\]|^[a-z]:[/\\]/i,pi=/\/$/,di=I(()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/","cwd"),Jn=I((e,t)=>{let n="",s=0,u=-1,l=0,g;for(let h=0;h<=e.length;++h){if(h<e.length)g=e[h];else{if(g==="/")break;g="/"}if(g==="/"){if(!(u===h-1||l===1))if(l===2){if(n.length<2||s!==2||!n.endsWith(".")||n.at(-2)!=="."){if(n.length>2){const $=n.lastIndexOf("/");$===-1?(n="",s=0):(n=n.slice(0,$),s=n.length-1-n.lastIndexOf("/")),u=h,l=0;continue}else if(n.length>0){n="",s=0,u=h,l=0;continue}}t&&(n+=n.length>0?"/..":"..",s=2)}else n.length>0?n+=`/${e.slice(u+1,h)}`:n=e.slice(u+1,h),s=h-u-1;u=h,l=0}else g==="."&&l!==-1?++l:l=-1}return n},"normalizeString"),Ye=I(e=>ui.test(e),"isAbsolute"),Hn=I(function(e){if(e.length===0)return".";e=pe(e);const t=ci.exec(e),n=Ye(e),s=e.at(-1)==="/";return e=Jn(e,!n),e.length===0?n?"/":s?"./":".":(s&&(e+="/"),Kn.test(e)&&(e+="/"),t?n?`//${e}`:`//./${e}`:n&&!Ye(e)?`/${e}`:e)},"normalize"),te=I((...e)=>{let t="";for(const n of e)if(n)if(t.length>0){const s=t.at(-1)==="/",u=n[0]==="/";s&&u?t+=n.slice(1):t+=s||u?n:`/${n}`}else t+=n;return Hn(t)},"join"),Wr=I(function(...e){e=e.map(s=>pe(s));let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const u=s>=0?e[s]:di();!u||u.length===0||(t=`${u}/${t}`,n=Ye(u))}return t=Jn(t,!n),n&&!Ye(t)?`/${t}`:t.length>0?t:"."},"resolve");I(function(e){return pe(e)},"toNamespacedPath");const gi=I(function(e){return li.exec(pe(e))?.[1]??""},"extname");I(function(e,t){const n=Wr(e).replace(fn,"$1").split("/"),s=Wr(t).replace(fn,"$1").split("/");if(s[0][1]===":"&&n[0][1]===":"&&n[0]!==s[0])return s.join("/");const u=[...n];for(const l of u){if(s[0]!==l)break;n.shift(),s.shift()}return[...n.map(()=>".."),...s].join("/")},"relative");const Kr=I(e=>{const t=pe(e).replace(pi,"").split("/").slice(0,-1);return t.length===1&&Kn.test(t[0])&&(t[0]=`${t[0]}/`),t.join("/")||(Ye(e)?"/":".")},"dirname");I(function(e){const t=[e.root,e.dir,e.base??e.name+e.ext].filter(Boolean);return pe(e.root?Wr(...t):t.join("/"))},"format");const hi=I((e,t)=>{const n=pe(e).split("/").pop();return t&&n.endsWith(t)?n.slice(0,-t.length):n},"basename");I(function(e){const t=fi.exec(e)?.[0]?.replaceAll("\\","/")??"",n=hi(e),s=gi(n);return{base:n,dir:Kr(e),ext:s,name:n.slice(0,n.length-s.length),root:t}},"parse");I((e,t)=>ni(t,Hn(e)),"matchesGlob");var mi=Object.defineProperty,Jr=M((e,t)=>mi(e,"name",{value:t,configurable:!0}),"u");const ct=Jr((e,t)=>(t?.create&&Ko(e),e),"useDirectory");Jr(async(e,t)=>{if(me.CACHE_DIR&&!["0","1","false","true"].includes(me.CACHE_DIR))return ct(te(me.CACHE_DIR,e),t);const n=await ks("package.json",{cwd:t?.cwd??Tn(),type:"file"});if(!n){if(t?.throwError)throw new Gn("No such file or directory found.");return}const s=te(Kr(n),"node_modules"),u=te(s,".cache"),l=te(u,e);if(!(he(l)&&!await re(l,ye))&&!(he(u)&&!await re(u,ye))&&!(he(s)&&!await re(s,ye)))return ct(l,t)},"findCacheDirectory");const yi=Jr((e,t)=>{if(me.CACHE_DIR&&!["0","1","false","true"].includes(me.CACHE_DIR))return ct(te(me.CACHE_DIR,e),t);const n=zs("package.json",{cwd:t?.cwd??Tn(),type:"file"});if(!n){if(t?.throwError)throw new Gn("No such file or directory found.");return}const s=te(Kr(n),"node_modules"),u=te(s,".cache"),l=te(u,e);if(!(he(l)&&!ne(l,ye))&&!(he(u)&&!ne(u,ye))&&!(he(s)&&!ne(s,ye)))return ct(l,t)},"findCacheDirectorySync"),Xn=yi;var bi=Object.defineProperty,vi=x((e,t)=>bi(e,"name",{value:t,configurable:!0}),"i$7"),$i=Object.defineProperty,xi=vi((e,t)=>$i(e,"name",{value:t,configurable:!0}),"r"),wi=Object.defineProperty,ji=xi((e,t)=>wi(e,"name",{value:t,configurable:!0}),"i");const pn=ji(e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},"getFileInfoType");var Oi=Object.defineProperty,ki=x((e,t)=>Oi(e,"name",{value:t,configurable:!0}),"i$6"),Pi=Object.defineProperty,Yn=ki((e,t)=>Pi(e,"name",{value:t,configurable:!0}),"s");const Ei=tt(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ti=Yn(e=>{if(typeof Je<"u"&&Je.versions&&Je.versions.node){const[t,n]=Je.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Je.getBuiltinModule(e)}return Ei(e)},"__cjs_getBuiltinModule"),{lstatSync:dn,mkdirSync:Ai}=Ti("node:fs");var Si=Object.defineProperty,Ci=Yn((e,t)=>Si(e,"name",{value:t,configurable:!0}),"o");const ft=Ci(e=>{jn(e);try{const t=dn(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pn(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{Ai(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const n=dn(e);if(!n.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(pn(n))}'`,{cause:t})}},"ensureDirSync");var Mi=Object.defineProperty,_i=x((e,t)=>Mi(e,"name",{value:t,configurable:!0}),"x$2"),zi=Object.defineProperty,Qn=_i((e,t)=>zi(e,"name",{value:t,configurable:!0}),"$"),Ni=Object.defineProperty,Bi=Qn((e,t)=>Ni(e,"name",{value:t,configurable:!0}),"A"),Ri=Object.defineProperty,Hr=Bi((e,t)=>Ri(e,"name",{value:t,configurable:!0}),"$"),Ii=Object.defineProperty,Di=Hr((e,t)=>Ii(e,"name",{value:t,configurable:!0}),"r$1");const Fi=Di(e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
2
+ `),"normalizeLF"),Wi=globalThis.process??Object.create(null),gn={versions:{}},hn=new Proxy(Wi,{get(e,t){if(t in e)return e[t];if(t in gn)return gn[t]}});var Li=Object.defineProperty,Vi=Hr((e,t)=>Li(e,"name",{value:t,configurable:!0}),"b");const Ui=Vi((e,t,n,s)=>{const u={column:0,line:-1,...e.start},l={...u,...e.end},g=u.line,h=u.column,$=l.line,O=l.column;let j=Math.max(g-(n+1),0),v=Math.min(t.length,$+s);g===-1&&(j=0),$===-1&&(v=t.length);const C=$-g,E={};if(C)for(let P=0;P<=C;P++){const U=P+g;if(!h)E[U]=!0;else if(P===0){const q=t[U-1]?.length;E[U]=[h,(q??0)-h+1]}else if(P===C)E[U]=[0,O];else{const q=t[U-P]?.length;E[U]=[0,q]}}else h===O?E[g]=h?[h,0]:!0:E[g]=[h,(O??0)-(h??0)];return{end:v,markerLines:E,start:j}},"getMarkerLines");var qi=Object.defineProperty,it=Hr((e,t)=>qi(e,"name",{value:t,configurable:!0}),"t");const Zi=hn.platform==="win32"&&!hn.env?.WT_SESSION?">":"❯",Gi=it((e,t,n)=>{const s={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...n,color:{gutter:it(P=>P,"gutter"),marker:it(P=>P,"marker"),message:it(P=>P,"message"),...n?.color}},u=typeof t.start.column=="number";let l=Fi(e).split(`
3
+ `);typeof s.tabWidth=="number"&&(l=l.map(P=>P.replaceAll(" "," ".repeat(s.tabWidth))));const{end:g,markerLines:h,start:$}=Ui(t,l,s.linesAbove,s.linesBelow),O=String(g).length,{gutter:j,marker:v,message:C}=s.color;let E=l.slice($,g).map((P,U)=>{const q=$+1+U,ee=h[q],xe=` ${String(q)}`.slice(-O),we=!h[q+1],X=` ${xe}${s.showGutter?" |":""}`;if(ee){let B="";if(Array.isArray(ee)){const je=P.replaceAll(/[^\t]/g," ").slice(0,Math.max(ee[0]-1,0)),Oe=ee[1]||1;B=[`
4
+ `,s.prefix+j(X.replaceAll(/\d/g," "))," ",je,v("^").repeat(Oe)].join(""),we&&s.message&&(B+=` ${C(s.message)}`)}return[s.prefix+v(Zi),j(X),P.length>0?` ${P}`:"",B].join("")}return`${s.prefix} ${j(X)}${P.length>0?` ${P}`:""}`}).join(`
5
5
  `);return s.message&&!u&&(E=`${s.prefix+" ".repeat(O+1)+s.message}
6
- ${E}`),E},"codeFrame");var xc=Object.defineProperty,wc=Co((e,t)=>xc(e,"name",{value:t,configurable:!0}),"s"),jc=Object.defineProperty,Oc=wc((e,t)=>jc(e,"name",{value:t,configurable:!0}),"o"),Pc=Object.defineProperty,jn=Oc((e,t)=>Pc(e,"name",{value:t,configurable:!0}),"l");const qn=jn((e,t)=>{let r=0,s=t.length-2;for(;r<s;){const u=r+(s-r>>1);if(e<t[u])s=u-1;else if(e>=t[u+1])r=u+1;else{r=u;break}}return r},"binarySearch"),kc=/\n|\r(?!\n)/,Ec=jn(e=>e.split(kc).reduce((t,r)=>(t.push(t.at(-1)+r.length+1),t),[0]),"getLineStartIndexes"),Tc=jn((e,t,r)=>{const s=r?.skipChecks??!1;if(!s&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!s&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const l=Ec(e),d=qn(t,l);return{column:t-l[d]+1,line:d+1}}const u=qn(t,e);return{column:t-e[u]+1,line:u+1}},"indexToLineColumn");var Sc=Object.defineProperty,zo=h((e,t)=>Sc(e,"name",{value:t,configurable:!0}),"t$6"),Ac=Object.defineProperty,Mo=zo((e,t)=>Ac(e,"name",{value:t,configurable:!0}),"t"),_c=Object.defineProperty,Cc=Mo((e,t)=>_c(e,"name",{value:t,configurable:!0}),"i");let zc=class extends Error{static{h(this,"m")}static{zo(this,"m")}static{Mo(this,"t")}static{Cc(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
6
+ ${E}`),E},"codeFrame");var Ki=Object.defineProperty,Ji=Qn((e,t)=>Ki(e,"name",{value:t,configurable:!0}),"s"),Hi=Object.defineProperty,Xi=Ji((e,t)=>Hi(e,"name",{value:t,configurable:!0}),"o"),Yi=Object.defineProperty,Xr=Xi((e,t)=>Yi(e,"name",{value:t,configurable:!0}),"l");const mn=Xr((e,t)=>{let n=0,s=t.length-2;for(;n<s;){const u=n+(s-n>>1);if(e<t[u])s=u-1;else if(e>=t[u+1])n=u+1;else{n=u;break}}return n},"binarySearch"),Qi=/\n|\r(?!\n)/,ea=Xr(e=>e.split(Qi).reduce((t,n)=>(t.push(t.at(-1)+n.length+1),t),[0]),"getLineStartIndexes"),ta=Xr((e,t,n)=>{const s=n?.skipChecks??!1;if(!s&&(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0))return{column:0,line:0};if(!s&&(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1)))return{column:0,line:0};if(typeof e=="string"){const l=ea(e),g=mn(t,l);return{column:t-l[g]+1,line:g+1}}const u=mn(t,e);return{column:t-e[u]+1,line:u+1}},"indexToLineColumn");var ra=Object.defineProperty,eo=x((e,t)=>ra(e,"name",{value:t,configurable:!0}),"t$6"),na=Object.defineProperty,to=eo((e,t)=>na(e,"name",{value:t,configurable:!0}),"t"),oa=Object.defineProperty,sa=to((e,t)=>oa(e,"name",{value:t,configurable:!0}),"i");let ia=class extends Error{static{x(this,"m")}static{eo(this,"m")}static{to(this,"t")}static{sa(this,"JSONError")}fileName;codeFrame;name="JSONError";#e;constructor(t){super(),this.#e=t}get message(){return`${this.#e}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
7
7
 
8
8
  ${this.codeFrame}
9
- `:""}`}set message(t){this.#e=t}};var Mc=Object.defineProperty,No=h((e,t)=>Mc(e,"name",{value:t,configurable:!0}),"u$3"),Nc=Object.defineProperty,Bo=No((e,t)=>Nc(e,"name",{value:t,configurable:!0}),"s"),Bc=Object.defineProperty,$t=Bo((e,t)=>Bc(e,"name",{value:t,configurable:!0}),"a");const Rc=$t(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),Dc=$t((e,t,r)=>$c(e,{start:t},{tabWidth:!1,...r}),"generateCodeFrame"),Ic=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,Fc=$t((e,t)=>{const r=Ic.exec(t);if(!r)return;const[,s,u,l]=r;if(u&&l)return{column:Number(l),line:Number(u)};let d=Number(s);return d===e.length&&(d=e.length-1),Tc(e,d)},"getErrorLocation"),Wc=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,Lc=$t(e=>e.replace(Wc,(t,r,s)=>`"${s}"(${Rc(s)})`),"addCodePointToUnexpectedToken");function _t(e,t,r,s){typeof t=="string"&&(typeof r=="object"&&(s=r),r=t,t=void 0);let u;try{return JSON.parse(e,t)}catch(m){u=m.message}let l;e?(l=Fc(e,u),u=Lc(u)):u+=" while parsing empty string";const d=new zc(u);throw d.fileName=r,l&&(d.codeFrame=Dc(e,l,s)),d}h(_t,"d$5");No(_t,"w");Bo(_t,"E");$t(_t,"parseJson");var Uc=Object.defineProperty,Ro=h((e,t)=>Uc(e,"name",{value:t,configurable:!0}),"t$5"),qc=Object.defineProperty,Do=Ro((e,t)=>qc(e,"name",{value:t,configurable:!0}),"t"),Vc=Object.defineProperty,Zc=Do((e,t)=>Vc(e,"name",{value:t,configurable:!0}),"r");function xt(e,t,r){typeof t=="object"&&(r=t,t=void 0);const s=oc(e,{buffer:!0,encoding:void 0});let u=new TextDecoder().decode(s);const{beforeParse:l,color:d}=r??{};return typeof l=="function"&&(u=l(u)),_t(u,t,At(e),{color:d})}h(xt,"n$3");Ro(xt,"s");Do(xt,"J");Zc(xt,"readJsonSync");var Gc=Object.defineProperty,Kc=h((e,t)=>Gc(e,"name",{value:t,configurable:!0}),"a$3"),Jc=Object.defineProperty,Hc=Kc((e,t)=>Jc(e,"name",{value:t,configurable:!0}),"t"),Xc=Object.defineProperty,Qc=Hc((e,t)=>Xc(e,"name",{value:t,configurable:!0}),"e");const Yc=Qc(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");var eu=Object.defineProperty,tu=h((e,t)=>eu(e,"name",{value:t,configurable:!0}),"t$3"),ru=Object.defineProperty,nu=tu((e,t)=>ru(e,"name",{value:t,configurable:!0}),"r"),ou=Object.defineProperty,su=nu((e,t)=>ou(e,"name",{value:t,configurable:!0}),"f");const iu=new TextEncoder,au=su(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return iu.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");var cu=Object.defineProperty,uu=h((e,t)=>cu(e,"name",{value:t,configurable:!0}),"m"),lu=Object.defineProperty,Io=uu((e,t)=>lu(e,"name",{value:t,configurable:!0}),"s");const fu=le(import.meta.url),ft=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pu=Io(e=>{if(typeof ft<"u"&&ft.versions&&ft.versions.node){const[t,r]=ft.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return ft.getBuiltinModule(e)}return fu(e)},"__cjs_getBuiltinModule"),{mkdirSync:du,writeFileSync:gu,statSync:mu,renameSync:Vn,chownSync:hu,chmodSync:yu,unlinkSync:bu}=pu("node:fs");var vu=Object.defineProperty,$u=Io((e,t)=>vu(e,"name",{value:t,configurable:!0}),"f");const xu=$u((e,t,r)=>{r={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...r},Et(e),Yc(t),e=At(e);const s=`${e}.tmp`;try{const u=I(e,an);if(!u&&r.recursive){const d=Ce(e);I(d,an)||du(d,{recursive:!0})}let l;if(gu(s,au(t),{encoding:r.encoding,flag:r.flag}),u&&!r.overwrite&&(l=mu(e),r.chown??={gid:l.gid,uid:l.uid},Vn(e,`${e}.bak`)),r.chown)try{hu(s,r.chown.uid,r.chown.gid)}catch{}yu(s,l&&!r.mode?l.mode:r.mode??438),Vn(s,e)}catch(u){throw new Error(`Failed to write file at: ${e} - ${u.message}`,{cause:u})}finally{I(s)&&bu(`${e}.tmp`)}},"writeFileSync");var wu=Object.defineProperty,fe=h((e,t)=>wu(e,"name",{value:t,configurable:!0}),"i$2"),ju=Object.defineProperty,pe=fe((e,t)=>ju(e,"name",{value:t,configurable:!0}),"s"),Ou=Object.defineProperty,we=pe((e,t)=>Ou(e,"name",{value:t,configurable:!0}),"i");const Pu=/^(?:( )+|\t+)/,wt="space";function dt(e,t,r){return e&&t===wt&&r===1}h(dt,"d$3");fe(dt,"g");pe(dt,"I");we(dt,"shouldIgnoreSingleSpace");function gt(e,t){const r=new Map;let s=0,u,l;for(const d of e.split(/\n/g)){if(!d)continue;const m=d.match(Pu);if(m===null)s=0,u="";else{const $=m[0].length,O=m[1]?wt:"tab";if(dt(t,O,$))continue;O!==u&&(s=0),u=O;let j=1,x=0;const C=$-s;if(s=$,C===0)j=0,x=1;else{const k=Math.abs(C);if(dt(t,O,k))continue;l=Ct(O,k)}const E=r.get(l);r.set(l,E===void 0?[1,0]:[E[0]+j,E[1]+x])}}return r}h(gt,"p");fe(gt,"y");pe(gt,"h");we(gt,"makeIndentsMap");function Ct(e,t){return(e===wt?"s":"t")+String(t)}h(Ct,"b$1");fe(Ct,"v");pe(Ct,"m");we(Ct,"encodeIndentsKey");function zt(e){const t=e[0]==="s"?wt:"tab",r=Number(e.slice(1));return{type:t,amount:r}}h(zt,"v");fe(zt,"M");pe(zt,"_");we(zt,"decodeIndentsKey");function Mt(e){let t,r=0,s=0;for(const[u,[l,d]]of e)(l>r||l===r&&d>s)&&(r=l,s=d,t=u);return t}h(Mt,"I");fe(Mt,"S");pe(Mt,"k");we(Mt,"getMostUsedKey");function Nt(e,t){return(e===wt?" ":" ").repeat(t)}h(Nt,"h$1");fe(Nt,"k");pe(Nt,"D");we(Nt,"makeIndentString");function Bt(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=gt(e,!0);t.size===0&&(t=gt(e,!1));const r=Mt(t);let s,u=0,l="";return r!==void 0&&({type:s,amount:u}=zt(r),l=Nt(s,u)),{amount:u,type:s,indent:l}}h(Bt,"M");fe(Bt,"x");pe(Bt,"C");we(Bt,"detectIndent");var ku=Object.defineProperty,Eu=h((e,t)=>ku(e,"name",{value:t,configurable:!0}),"a$1"),Tu=Object.defineProperty,Fo=Eu((e,t)=>Tu(e,"name",{value:t,configurable:!0}),"i");const Su=le(import.meta.url),pt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Au=Fo(e=>{if(typeof pt<"u"&&pt.versions&&pt.versions.node){const[t,r]=pt.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return pt.getBuiltinModule(e)}return Su(e)},"__cjs_getBuiltinModule"),{readFileSync:_u}=Au("node:fs");var Cu=Object.defineProperty,zu=Fo((e,t)=>Cu(e,"name",{value:t,configurable:!0}),"r");const Wo=zu((e,t,r={})=>{const{detectIndent:s,indent:u,replacer:l,stringify:d=JSON.stringify,...m}={indent:" ",...r};let $=u,O=`
10
- `;if(I(e,vo))try{const x=_u(e,"utf8");if(s){const{indent:C}=Bt(x);$=C}O=x.endsWith(`
9
+ `:""}`}set message(t){this.#e=t}};var aa=Object.defineProperty,ro=x((e,t)=>aa(e,"name",{value:t,configurable:!0}),"u$3"),ca=Object.defineProperty,no=ro((e,t)=>ca(e,"name",{value:t,configurable:!0}),"s"),ua=Object.defineProperty,nt=no((e,t)=>ua(e,"name",{value:t,configurable:!0}),"a");const la=nt(e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,"getCodePoint"),fa=nt((e,t,n)=>Gi(e,{start:t},{tabWidth:!1,...n}),"generateCodeFrame"),pa=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,da=nt((e,t)=>{const n=pa.exec(t);if(!n)return;const[,s,u,l]=n;if(u&&l)return{column:Number(l),line:Number(u)};let g=Number(s);return g===e.length&&(g=e.length-1),ta(e,g)},"getErrorLocation"),ga=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,ha=nt(e=>e.replace(ga,(t,n,s)=>`"${s}"(${la(s)})`),"addCodePointToUnexpectedToken");function pt(e,t,n,s){typeof t=="string"&&(typeof n=="object"&&(s=n),n=t,t=void 0);let u;try{return JSON.parse(e,t)}catch(h){u=h.message}let l;e?(l=da(e,u),u=ha(u)):u+=" while parsing empty string";const g=new ia(u);throw g.fileName=n,l&&(g.codeFrame=fa(e,l,s)),g}x(pt,"d$5");ro(pt,"w");no(pt,"E");nt(pt,"parseJson");var ma=Object.defineProperty,oo=x((e,t)=>ma(e,"name",{value:t,configurable:!0}),"t$5"),ya=Object.defineProperty,so=oo((e,t)=>ya(e,"name",{value:t,configurable:!0}),"t"),ba=Object.defineProperty,va=so((e,t)=>ba(e,"name",{value:t,configurable:!0}),"r");function ot(e,t,n){typeof t=="object"&&(n=t,t=void 0);const s=jo(e,{buffer:!0,encoding:void 0});let u=new TextDecoder().decode(s);const{beforeParse:l,color:g}=n??{};return typeof l=="function"&&(u=l(u)),pt(u,t,On(e),{color:g})}x(ot,"n$3");oo(ot,"s");so(ot,"J");va(ot,"readJsonSync");var $a=Object.defineProperty,xa=x((e,t)=>$a(e,"name",{value:t,configurable:!0}),"a$3"),wa=Object.defineProperty,ja=xa((e,t)=>wa(e,"name",{value:t,configurable:!0}),"t"),Oa=Object.defineProperty,ka=ja((e,t)=>Oa(e,"name",{value:t,configurable:!0}),"e");const Pa=ka(e=>{if(typeof e!="string"&&!(e instanceof ArrayBuffer)&&!ArrayBuffer.isView(e))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")},"assertValidFileContents");var Ea=Object.defineProperty,Ta=x((e,t)=>Ea(e,"name",{value:t,configurable:!0}),"t$3"),Aa=Object.defineProperty,Sa=Ta((e,t)=>Aa(e,"name",{value:t,configurable:!0}),"r"),Ca=Object.defineProperty,Ma=Sa((e,t)=>Ca(e,"name",{value:t,configurable:!0}),"f");const _a=new TextEncoder,za=Ma(e=>{if(e instanceof Uint8Array)return e;if(typeof e=="string")return _a.encode(e);if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e)){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")},"toUint8Array");var Na=Object.defineProperty,Ba=x((e,t)=>Na(e,"name",{value:t,configurable:!0}),"m$1"),Ra=Object.defineProperty,io=Ba((e,t)=>Ra(e,"name",{value:t,configurable:!0}),"s");const Ia=tt(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Da=io(e=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[t,n]=He.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return He.getBuiltinModule(e)}return Ia(e)},"__cjs_getBuiltinModule"),{mkdirSync:Fa,writeFileSync:Wa,statSync:La,renameSync:yn,chownSync:Va,chmodSync:Ua,unlinkSync:qa}=Da("node:fs");var Za=Object.defineProperty,Ga=io((e,t)=>Za(e,"name",{value:t,configurable:!0}),"f");const Ka=Ga((e,t,n)=>{n={encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...n},jn(e),Pa(t),e=On(e);const s=`${e}.tmp`;try{const u=J(e,Qr);if(!u&&n.recursive){const g=rt(e);J(g,Qr)||Fa(g,{recursive:!0})}let l;if(Wa(s,za(t),{encoding:n.encoding,flag:n.flag}),u&&!n.overwrite&&(l=La(e),n.chown??={gid:l.gid,uid:l.uid},yn(e,`${e}.bak`)),n.chown)try{Va(s,n.chown.uid,n.chown.gid)}catch{}Ua(s,l&&!n.mode?l.mode:n.mode??438),yn(s,e)}catch(u){throw new Error(`Failed to write file at: ${e} - ${u.message}`,{cause:u})}finally{J(s)&&qa(`${e}.tmp`)}},"writeFileSync");var Ja=Object.defineProperty,oe=x((e,t)=>Ja(e,"name",{value:t,configurable:!0}),"i$2"),Ha=Object.defineProperty,se=oe((e,t)=>Ha(e,"name",{value:t,configurable:!0}),"s"),Xa=Object.defineProperty,de=se((e,t)=>Xa(e,"name",{value:t,configurable:!0}),"i");const Ya=/^(?:( )+|\t+)/,st="space";function Qe(e,t,n){return e&&t===st&&n===1}x(Qe,"d$3");oe(Qe,"g");se(Qe,"I");de(Qe,"shouldIgnoreSingleSpace");function et(e,t){const n=new Map;let s=0,u,l;for(const g of e.split(/\n/g)){if(!g)continue;const h=g.match(Ya);if(h===null)s=0,u="";else{const $=h[0].length,O=h[1]?st:"tab";if(Qe(t,O,$))continue;O!==u&&(s=0),u=O;let j=1,v=0;const C=$-s;if(s=$,C===0)j=0,v=1;else{const P=Math.abs(C);if(Qe(t,O,P))continue;l=dt(O,P)}const E=n.get(l);n.set(l,E===void 0?[1,0]:[E[0]+j,E[1]+v])}}return n}x(et,"p");oe(et,"y");se(et,"h");de(et,"makeIndentsMap");function dt(e,t){return(e===st?"s":"t")+String(t)}x(dt,"b$1");oe(dt,"v");se(dt,"m");de(dt,"encodeIndentsKey");function gt(e){const t=e[0]==="s"?st:"tab",n=Number(e.slice(1));return{type:t,amount:n}}x(gt,"v");oe(gt,"M");se(gt,"_");de(gt,"decodeIndentsKey");function ht(e){let t,n=0,s=0;for(const[u,[l,g]]of e)(l>n||l===n&&g>s)&&(n=l,s=g,t=u);return t}x(ht,"I");oe(ht,"S");se(ht,"k");de(ht,"getMostUsedKey");function mt(e,t){return(e===st?" ":" ").repeat(t)}x(mt,"h$1");oe(mt,"k");se(mt,"D");de(mt,"makeIndentString");function yt(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=et(e,!0);t.size===0&&(t=et(e,!1));const n=ht(t);let s,u=0,l="";return n!==void 0&&({type:s,amount:u}=gt(n),l=mt(s,u)),{amount:u,type:s,indent:l}}x(yt,"M");oe(yt,"x");se(yt,"C");de(yt,"detectIndent");var Qa=Object.defineProperty,ec=x((e,t)=>Qa(e,"name",{value:t,configurable:!0}),"a$1"),tc=Object.defineProperty,ao=ec((e,t)=>tc(e,"name",{value:t,configurable:!0}),"i");const rc=tt(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nc=ao(e=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[t,n]=Xe.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return Xe.getBuiltinModule(e)}return rc(e)},"__cjs_getBuiltinModule"),{readFileSync:oc}=nc("node:fs");var sc=Object.defineProperty,ic=ao((e,t)=>sc(e,"name",{value:t,configurable:!0}),"r");const co=ic((e,t,n={})=>{const{detectIndent:s,indent:u,replacer:l,stringify:g=JSON.stringify,...h}={indent:" ",...n};let $=u,O=`
10
+ `;if(J(e,Oo))try{const v=oc(e,"utf8");if(s){const{indent:C}=yt(v);$=C}O=v.endsWith(`
11
11
  `)?`
12
- `:""}catch(x){if(x.code!=="ENOENT")throw x}const j=d(t,l,$);xu(e,`${j}${O}`,m)},"writeJsonSync");var Mu=Object.defineProperty,Nu=h((e,t)=>Mu(e,"name",{value:t,configurable:!0}),"s$1");class Rt extends Error{static{h(this,"VisConfigError")}static{Nu(this,"VisConfigError")}chain;constructor(t,r,s){super(t,s),this.name=this.constructor.name,this.chain=r}}var Bu=Object.defineProperty,Ru=h((e,t)=>Bu(e,"name",{value:t,configurable:!0}),"e");class Du extends Rt{static{h(this,"VisConfigCycleError")}static{Ru(this,"VisConfigCycleError")}constructor(t,r){const s=[...r,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${s}`,r)}}var Iu=Object.defineProperty,Fu=h((e,t)=>Iu(e,"name",{value:t,configurable:!0}),"s");class Lo extends Rt{static{h(this,"VisConfigDeprecatedKeyError")}static{Fu(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,r,s){const u=[`${t} uses removed keys.`,""];for(const l of s){const d=l.location?` (at ${l.location})`:"";u.push(` • ${l.name}${d} → renamed to \`${l.renamedTo}\``);for(const m of l.children??[])u.push(` ↳ ${m.name} → renamed to \`${m.renamedTo}\``)}u.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(u.join(`
13
- `),r),this.filePath=t,this.removedKeys=s}}var Wu=Object.defineProperty,Lu=h((e,t)=>Wu(e,"name",{value:t,configurable:!0}),"t$1");class Zn extends Rt{static{h(this,"VisConfigLoadError")}static{Lu(this,"VisConfigLoadError")}constructor(t,r,s){const u=s instanceof Error?s.message:String(s),l=r.length>0?`
14
- Chain: ${r.join(" → ")}`:"";super(`Failed to load ${t}: ${u}${l}`,r,{cause:s})}}var Uu=Object.defineProperty,Uo=h((e,t)=>Uu(e,"name",{value:t,configurable:!0}),"t");const qu=Uo(e=>e.join(" → "),"formatChain");class on extends Rt{static{h(this,"VisConfigNotFoundError")}static{Uo(this,"VisConfigNotFoundError")}constructor(t,r,s){const u=r.length>0?r[r.length-1]:"<unknown>",l=s.length>0?`
12
+ `:""}catch(v){if(v.code!=="ENOENT")throw v}const j=g(t,l,$);Ka(e,`${j}${O}`,h)},"writeJsonSync");var ac=Object.defineProperty,cc=x((e,t)=>ac(e,"name",{value:t,configurable:!0}),"s$1");class bt extends Error{static{x(this,"VisConfigError")}static{cc(this,"VisConfigError")}chain;constructor(t,n,s){super(t,s),this.name=this.constructor.name,this.chain=n}}var uc=Object.defineProperty,lc=x((e,t)=>uc(e,"name",{value:t,configurable:!0}),"e");class fc extends bt{static{x(this,"VisConfigCycleError")}static{lc(this,"VisConfigCycleError")}constructor(t,n){const s=[...n,`${t} (re-enters)`].join(" → ");super(`Config cycle: ${s}`,n)}}var pc=Object.defineProperty,dc=x((e,t)=>pc(e,"name",{value:t,configurable:!0}),"s");class uo extends bt{static{x(this,"VisConfigDeprecatedKeyError")}static{dc(this,"VisConfigDeprecatedKeyError")}filePath;removedKeys;constructor(t,n,s){const u=[`${t} uses removed keys.`,""];for(const l of s){const g=l.location?` (at ${l.location})`:"";u.push(` • ${l.name}${g} → renamed to \`${l.renamedTo}\``);for(const h of l.children??[])u.push(` ↳ ${h.name} → renamed to \`${h.renamedTo}\``)}u.push("","Run `vis migrate self` to auto-rewrite the config (use --dry-run to preview)."),super(u.join(`
13
+ `),n),this.filePath=t,this.removedKeys=s}}var gc=Object.defineProperty,hc=x((e,t)=>gc(e,"name",{value:t,configurable:!0}),"t$1");class bn extends bt{static{x(this,"VisConfigLoadError")}static{hc(this,"VisConfigLoadError")}constructor(t,n,s){const u=s instanceof Error?s.message:String(s),l=n.length>0?`
14
+ Chain: ${n.join(" → ")}`:"";super(`Failed to load ${t}: ${u}${l}`,n,{cause:s})}}var mc=Object.defineProperty,lo=x((e,t)=>mc(e,"name",{value:t,configurable:!0}),"t");const yc=lo(e=>e.join(" → "),"formatChain");class Dr extends bt{static{x(this,"VisConfigNotFoundError")}static{lo(this,"VisConfigNotFoundError")}constructor(t,n,s){const u=n.length>0?n[n.length-1]:"<unknown>",l=s.length>0?`
15
15
  Tried:
16
16
  ${s.join(`
17
17
  `)}`:"";super(`Cannot resolve "${t}" extended from ${u}.${l}
18
- Chain: ${qu(r)}`,r)}}var Vu=Object.defineProperty,qo=h((e,t)=>Vu(e,"name",{value:t,configurable:!0}),"i$1");const Gn="@inherit",Zu=["aliases","dependsOn","inputs","outputs"],Gu=qo((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Gn))return[...t];const r=[];for(const s of t){if(s===Gn){e!==void 0&&r.push(...e);continue}r.push(s)}return r},"mergeArrayWithInherit"),Ku=qo((e,t)=>{const r={...e,...t};for(const s of Zu){const u=e?.[s],l=t?.[s],d=Gu(u,l);d===void 0?delete r[s]:r[s]=d}return r},"mergeTargetWithInherit");var Ju=Object.defineProperty,Dt=h((e,t)=>Ju(e,"name",{value:t,configurable:!0}),"o");const Hu=Dt(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:r}=e,s=[];if(Array.isArray(r))for(const[u,l]of r.entries())l&&typeof l=="object"&&(Object.hasOwn(l,"scope")&&s.push({location:`taskDefaults[${u}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(l,"targets")&&s.push({location:`taskDefaults[${u}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:s.length>0?s:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[r,s]of e.scopedTasks.entries())s&&typeof s=="object"&&(Object.hasOwn(s,"scope")&&t.push({location:`scopedTasks[${r}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(s,"targets")&&t.push({location:`scopedTasks[${r}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),Xu=Dt(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),Qu=Dt((e,t,r)=>{if(!r||typeof r!="object")return;const s=Hu(r);if(s.length>0)throw new Lo(e,t,s)},"assertNoDeprecatedConfigKeys"),Yu=Dt((e,t,r)=>{if(!r||typeof r!="object")return;const s=Xu(r);if(s.length>0)throw new Lo(e,t,s)},"assertNoDeprecatedTaskKeys");var el=Object.defineProperty,T=h((e,t)=>el(e,"name",{value:t,configurable:!0}),"r");const Vo=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],tl=new Set(Vo),Zo=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],rl=new Set(Zo),Al=2880,sn={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},nl=T(e=>{if(!e)return{...sn};const t=sn.policies??{},r=e.policies??{},s={...t,...r};for(const u of Object.keys(t)){const l=t[u],d=r[u];l!==void 0&&d!==void 0&&(s[u]={...l,...d})}return{...sn,...e,policies:s}},"mergeSecurityDefaults"),un=T(e=>({...e,security:nl(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),ol=T(e=>{let t;try{t=Jn(e)}catch{return}const r=new Set(t.filter(s=>tl.has(s)));for(const s of Vo)if(r.has(s))return D(e,s)},"findVisConfigFile"),sl=T(e=>{let t;try{t=Jn(e)}catch{return}const r=new Set(t.filter(s=>rl.has(s)));for(const s of Zo)if(r.has(s))return D(e,s)},"findVisTaskConfigFile"),On=T(e=>Kn("sha256").update(Qo(e)).digest("hex"),"hashFileContents"),il=T(e=>{const t=Kn("sha256"),r=[...e].sort();for(const s of r)t.update(s),t.update(":"),t.update(On(s)),t.update(`
19
- `);return t.digest("hex")},"hashConfigChain"),al=T(e=>{const t=D(e,"node_modules");if(I(t)){const s=D(t,".cache","vis");return Tt(s),D(s,"vis-config-cache.json")}const r=bo("vis",{create:!0,cwd:e});return r?D(r,"vis-config-cache.json"):void 0},"getConfigCachePath"),cl=T((e,t)=>{if(I(e))try{const r=xt(e);if(r.hash===t)return r.config}catch{}},"readConfigCache"),ul=T((e,t,r)=>{try{Tt(Ce(e)),Wo(e,{config:r,hash:t})}catch{}},"writeConfigCache"),ll=T(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),fl=T((e,t,r)=>{if(ve(e))throw new on(e,[...r,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const s=[];if(e.startsWith("./")||e.startsWith("../")){const u=Ce(t),l=D(u,e);if(s.push(l),I(l))return l;throw new on(e,[...r,t],s)}try{return le(t).resolve(e)}catch{throw s.push(`require.resolve("${e}") from ${t}`),new on(e,[...r,t],s)}},"resolveExtendsSpecifier"),Go=T(async(e,t,r)=>{const s=On(t),u=t.slice(t.lastIndexOf(".")),l=D(Ce(t),`.vis-config-tmp-${s}${u}`);Yo(t,l);let d;try{d=await e.import(l,{default:!0,try:!0})??{}}catch(m){throw new Zn(t,r,m)}finally{try{es(l)}catch{}}try{return(typeof d=="function"?await d()??{}:d)??{}}catch(m){throw new Zn(t,r,m)}},"loadRawConfig"),pl=T((e,t)=>{const r={...e,...t};if(e.tasks||t.tasks){const s=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),u={};for(const l of s)u[l]=Ku(e.tasks?.[l],t.tasks?.[l]);r.tasks=u}if((e.scopedTasks||t.scopedTasks)&&(r.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(r.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(r.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const s=e.security?.policies??{},u=t.security?.policies??{},l={...s,...u};for(const d of Object.keys(s)){const m=s[d],$=u[d];m!==void 0&&$!==void 0&&(l[d]={...m,...$})}r.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:l}}return(e.update||t.update)&&(r.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(r.taskRunner={...e.taskRunner,...t.taskRunner}),delete r.extends,r},"mergeVisConfigs"),Ko=T(async(e,t,r,s,u,l)=>{if(s.has(t))throw new Du(t,r);if(!u.has(t)){s.add(t);try{const d=await Go(e,t,r);Qu(t,r,d);const m=ll(d.extends);for(const $ of m){const O=fl($,t,r);await Ko(e,O,[...r,t],s,u,l)}u.set(t,d),l.push(t)}finally{s.delete(t)}}},"resolveConfigChain"),_l=T(async(e,t)=>{let r;if(t?.explicitConfigPath){const x=ve(t.explicitConfigPath)?t.explicitConfigPath:D(e,t.explicitConfigPath);if(!I(x))throw new Error(`Cannot find config file at ${x}`);r=x}else r=ol(e);if(!r)return un({});const s=Hn(e,{fsCache:!1,moduleCache:!1}),u=new Set,l=new Map,d=[];await Ko(s,r,[],u,l,d);const m=il(d),$=al(e);if($){const x=cl($,m);if(x)return x}let O={};for(const x of d)O=pl(O,l.get(x));const j=un(O);return $&&ul($,m,j),j},"loadVisConfig"),dl=T(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),gl=T((e,t)=>{const r=D(e,"node_modules"),s=dl(t);if(I(r)){const l=D(r,".cache","vis","task-configs");return Tt(l),D(l,`${s}.json`)}const u=bo("vis",{create:!0,cwd:e});return u?D(u,"task-configs",`${s}.json`):void 0},"getVisTaskCachePath"),ml=T((e,t)=>{if(I(e))try{const r=xt(e);if(r.hash===t)return r.config}catch{}},"readVisTaskCache"),hl=T((e,t,r)=>{try{Tt(Ce(e)),Wo(e,{config:r,hash:t})}catch{}},"writeVisTaskCache"),Cl=T(async(e,t,r)=>{const s=sl(t);if(!s)return;const u=On(s),l=gl(e,r);if(l){const O=ml(l,u);if(O)return O}const d=Hn(t,{fsCache:!1,moduleCache:!1}),m=await Go(d,s,[]);Yu(s,[],m);const $=m;return l&&hl(l,u,$),$},"loadVisTaskConfig"),zl=T(e=>e,"defineTaskConfig"),Ml=T(e=>un(e),"defineConfig");export{oc as $,Ku as A,xu as B,cn as C,bo as D,sl as G,Al as H,Ce as K,jo as L,D as M,ve as O,wa as Q,At as U,Zo as V,an as _,zl as a,Tt as b,Ml as c,Pl as d,_l as e,Ol as f,El as g,Vo as h,I as i,ol as j,Et as k,sn as l,Mn as m,xt as n,jl as o,wl as p,Wn as q,Cl as r,vo as s,_t as t,Yc as u,au as v,Wo as w,Bt as x,un as y,kl as z};
18
+ Chain: ${yc(n)}`,n)}}var bc=Object.defineProperty,fo=x((e,t)=>bc(e,"name",{value:t,configurable:!0}),"i$1");const vn="@inherit",vc=["aliases","dependsOn","inputs","outputs"],$c=fo((e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(vn))return[...t];const n=[];for(const s of t){if(s===vn){e!==void 0&&n.push(...e);continue}n.push(s)}return n},"mergeArrayWithInherit"),xc=fo((e,t)=>{const n={...e,...t};for(const s of vc){const u=e?.[s],l=t?.[s],g=$c(u,l);g===void 0?delete n[s]:n[s]=g}return n},"mergeTargetWithInherit");var wc=Object.defineProperty,vt=x((e,t)=>wc(e,"name",{value:t,configurable:!0}),"o");const jc=vt(e=>{const t=[];if(Object.hasOwn(e,"targetDefaults")&&t.push({name:"targetDefaults",renamedTo:"tasks"}),Object.hasOwn(e,"taskRunnerOptions")&&t.push({name:"taskRunnerOptions",renamedTo:"taskRunner"}),Object.hasOwn(e,"taskDefaults")){const{taskDefaults:n}=e,s=[];if(Array.isArray(n))for(const[u,l]of n.entries())l&&typeof l=="object"&&(Object.hasOwn(l,"scope")&&s.push({location:`taskDefaults[${u}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(l,"targets")&&s.push({location:`taskDefaults[${u}].targets`,name:"targets",renamedTo:"tasks"}));t.push({children:s.length>0?s:void 0,name:"taskDefaults",renamedTo:"scopedTasks"})}else if(Array.isArray(e.scopedTasks))for(const[n,s]of e.scopedTasks.entries())s&&typeof s=="object"&&(Object.hasOwn(s,"scope")&&t.push({location:`scopedTasks[${n}].scope`,name:"scope",renamedTo:"match"}),Object.hasOwn(s,"targets")&&t.push({location:`scopedTasks[${n}].targets`,name:"targets",renamedTo:"tasks"}));return t},"detectDeprecatedConfigKeys"),Oc=vt(e=>Object.hasOwn(e,"targets")&&!Object.hasOwn(e,"tasks")?[{name:"targets",renamedTo:"tasks"}]:[],"detectDeprecatedTaskKeys"),kc=vt((e,t,n)=>{if(!n||typeof n!="object")return;const s=jc(n);if(s.length>0)throw new uo(e,t,s)},"assertNoDeprecatedConfigKeys"),Pc=vt((e,t,n)=>{if(!n||typeof n!="object")return;const s=Oc(n);if(s.length>0)throw new uo(e,t,s)},"assertNoDeprecatedTaskKeys");var Ec=Object.defineProperty,T=x((e,t)=>Ec(e,"name",{value:t,configurable:!0}),"r");const po=["vis.config.ts","vis.config.mts","vis.config.cts","vis.config.js","vis.config.mjs","vis.config.cjs"],Tc=new Set(po),go=["vis.task.ts","vis.task.mts","vis.task.cts","vis.task.js","vis.task.mjs","vis.task.cjs"],Ac=new Set(go),Xc=2880,Fr={blockExoticSubdeps:!0,policies:{installScripts:{strict:!0},publisherChange:{ignoreAfter:43200,mode:"no-downgrade"}}},Sc=T(e=>{if(!e)return{...Fr};const t=Fr.policies??{},n=e.policies??{},s={...t,...n};for(const u of Object.keys(t)){const l=t[u],g=n[u];l!==void 0&&g!==void 0&&(s[u]={...l,...g})}return{...Fr,...e,policies:s}},"mergeSecurityDefaults"),$n=T(e=>({...e,security:Sc(e.security),update:{security:!0,target:"minor",...e.update}}),"applyDefaults"),Cc=T(e=>{let t;try{t=wn(e)}catch{return}const n=new Set(t.filter(s=>Tc.has(s)));for(const s of po)if(n.has(s))return L(e,s)},"findVisConfigFile"),Mc=T(e=>{let t;try{t=wn(e)}catch{return}const n=new Set(t.filter(s=>Ac.has(s)));for(const s of go)if(n.has(s))return L(e,s)},"findVisTaskConfigFile"),Yr=T(e=>xn("sha256").update($o(e)).digest("hex"),"hashFileContents"),_c=T(e=>{const t=xn("sha256"),n=[...e].sort();for(const s of n)t.update(s),t.update(":"),t.update(Yr(s)),t.update(`
19
+ `);return t.digest("hex")},"hashConfigChain"),zc=T(e=>{const t=L(e,"node_modules");if(J(t)){const s=L(t,".cache","vis");return ft(s),L(s,"vis-config-cache.json")}const n=Xn("vis",{create:!0,cwd:e});return n?L(n,"vis-config-cache.json"):void 0},"getConfigCachePath"),Nc=T((e,t)=>{if(J(e))try{const n=ot(e);if(n.hash===t)return n.config}catch{}},"readConfigCache"),Bc=T((e,t,n)=>{try{ft(rt(e)),co(e,{config:n,hash:t})}catch{}},"writeConfigCache"),Rc=T(e=>e===void 0?[]:Array.isArray(e)?e:[e],"normalizeExtends"),Ic=T((e,t,n)=>{if(kn(e))throw new Dr(e,[...n,t],["Absolute paths in `extends` are not supported. Use a relative path or an npm package name."]);const s=[];if(e.startsWith("./")||e.startsWith("../")){const u=rt(t),l=L(u,e);if(s.push(l),J(l))return l;throw new Dr(e,[...n,t],s)}try{return tt(t).resolve(e)}catch{throw s.push(`require.resolve("${e}") from ${t}`),new Dr(e,[...n,t],s)}},"resolveExtendsSpecifier"),ho=T(async(e,t,n)=>{const s=Yr(t),u=t.slice(t.lastIndexOf(".")),l=L(rt(t),`.vis-config-tmp-${s}${u}`);xo(t,l);let g;try{g=await e.import(l,{default:!0,try:!0})??{}}catch(h){throw new bn(t,n,h)}finally{try{wo(l)}catch{}}try{return(typeof g=="function"?await g()??{}:g)??{}}catch(h){throw new bn(t,n,h)}},"loadRawConfig"),Dc=T((e,t)=>{const n={...e,...t};if(e.tasks||t.tasks){const s=new Set([...Object.keys(e.tasks??{}),...Object.keys(t.tasks??{})]),u={};for(const l of s)u[l]=xc(e.tasks?.[l],t.tasks?.[l]);n.tasks=u}if((e.scopedTasks||t.scopedTasks)&&(n.scopedTasks=[...e.scopedTasks??[],...t.scopedTasks??[]]),(e.fileGroups||t.fileGroups)&&(n.fileGroups={...e.fileGroups,...t.fileGroups}),(e.taskGroups||t.taskGroups)&&(n.taskGroups={...e.taskGroups,...t.taskGroups}),e.security||t.security){const s=e.security?.policies??{},u=t.security?.policies??{},l={...s,...u};for(const g of Object.keys(s)){const h=s[g],$=u[g];h!==void 0&&$!==void 0&&(l[g]={...h,...$})}n.security={...e.security,...t.security,acceptedRisks:{...e.security?.acceptedRisks,...t.security?.acceptedRisks},policies:l}}return(e.update||t.update)&&(n.update={...e.update,...t.update}),(e.taskRunner||t.taskRunner)&&(n.taskRunner={...e.taskRunner,...t.taskRunner}),delete n.extends,n},"mergeVisConfigs"),mo=T(async(e,t,n,s,u,l)=>{if(s.has(t))throw new fc(t,n);if(!u.has(t)){s.add(t);try{const g=await ho(e,t,n);kc(t,n,g);const h=Rc(g.extends);for(const $ of h){const O=Ic($,t,n);await mo(e,O,[...n,t],s,u,l)}u.set(t,g),l.push(t)}finally{s.delete(t)}}},"resolveConfigChain"),Yc=T(async(e,t)=>{let n;if(t?.explicitConfigPath){const v=kn(t.explicitConfigPath)?t.explicitConfigPath:L(e,t.explicitConfigPath);if(!J(v))throw new Error(`Cannot find config file at ${v}`);n=v}else n=Cc(e);if(!n)return $n({});const s=Pn(e,{fsCache:!1,moduleCache:!1}),u=new Set,l=new Map,g=[];await mo(s,n,[],u,l,g);const h=_c(g),$=zc(e);if($){const v=Nc($,h);if(v)return v}let O={};for(const v of g)O=Dc(O,l.get(v));const j=$n(O);return $&&Bc($,h,j),j},"loadVisConfig"),Fc=T(e=>e.replaceAll(/[^\w.-]+/g,"_"),"sanitizeProjectName"),Wc=T((e,t)=>{const n=L(e,"node_modules"),s=Fc(t);if(J(n)){const l=L(n,".cache","vis","task-configs");return ft(l),L(l,`${s}.json`)}const u=Xn("vis",{create:!0,cwd:e});return u?L(u,"task-configs",`${s}.json`):void 0},"getVisTaskCachePath"),Lc=T((e,t)=>{if(J(e))try{const n=ot(e);if(n.hash===t)return n.config}catch{}},"readVisTaskCache"),Vc=T((e,t,n)=>{try{ft(rt(e)),co(e,{config:n,hash:t})}catch{}},"writeVisTaskCache"),Qc=T(async(e,t,n)=>{const s=Mc(t);if(!s)return;const u=Yr(s),l=Wc(e,n);if(l){const O=Lc(l,u);if(O)return O}const g=Pn(t,{fsCache:!1,moduleCache:!1}),h=await ho(g,s,[]);Pc(s,[],h);const $=h;return l&&Vc(l,u,$),$},"loadVisTaskConfig"),eu=T(e=>e,"defineTaskConfig"),tu=T(e=>e,"defineConfig");export{Ka as B,Mc as G,Xc as H,Xn as K,yt as M,go as V,eu as a,ft as b,tu as c,pn as d,Yc as e,pt as f,za as g,po as h,xc as i,Cc as j,Fr as l,$n as m,ot as n,Qc as r,Pa as s,co as w};
@@ -1,2 +1,2 @@
1
- var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{I as g,a as l,j as b,E as n,q as d,e as m,p as f}from"./bin.js";import{ReapiRemoteCache as k,resolveTurboEnvCompat as $}from"@visulima/task-runner";var w=Object.defineProperty,s=p((e,t)=>w(e,"name",{value:t,configurable:!0}),"s");const y=s((e,t)=>t==="http"||t==="reapi"?t:e.startsWith("grpc://")||e.startsWith("grpcs://")?"reapi":"http","inferBackend"),S=s(async(e,t)=>{const o=Date.now(),a=new AbortController,r=setTimeout(()=>{a.abort()},t);try{const i=await fetch(e,{method:"HEAD",signal:a.signal});return{backend:"http",durationMs:Date.now()-o,httpStatus:i.status,ok:!0,url:e}}catch(i){return{backend:"http",durationMs:Date.now()-o,error:i instanceof Error?i.message:String(i),ok:!1,url:e}}finally{clearTimeout(r)}},"probeHttp"),C=s(async(e,t)=>{const o=Date.now(),a=new k({...e,timeout:t});try{return{backend:"reapi",capabilities:await a.probeCapabilities(),durationMs:Date.now()-o,ok:!0,url:e.url}}catch(r){return{backend:"reapi",durationMs:Date.now()-o,error:r instanceof Error?r.message:String(r),ok:!1,url:e.url}}finally{try{await a.close()}catch{}}},"probeReapi"),D=s(e=>{const t=[],o=e.ok?g("OK"):l("FAIL");if(t.push(`${b("Remote cache")} ${o}`),t.push(` ${n("URL:")} ${d(e.url)}`),t.push(` ${n("Backend:")} ${e.backend}`),t.push(` ${n("Latency:")} ${String(e.durationMs)}ms`),e.httpStatus!==void 0&&t.push(` ${n("Status:")} ${String(e.httpStatus)}`),e.capabilities){const a=e.capabilities.digestFunctions.length>0?e.capabilities.digestFunctions.join(", "):m("(none advertised)");t.push(` ${n("Digests:")} ${a}`),t.push(` ${n("Batch:")} ${String(e.capabilities.maxBatchTotalSizeBytes)} bytes`)}return e.error&&t.push(` ${n("Error:")} ${l(e.error)}`),t.join(`
2
- `)},"formatTable"),x=s(async({logger:e,options:t,visConfig:o})=>{const a=$((o??{}).taskRunner?.remoteCache),r=t.url??a?.url,i=t.format??"table",u=t.timeout??5e3;if(!r){f.error("No remote cache configured. Set taskRunner.remoteCache.url in vis.config.ts, pass --url=..., or export TURBO_API."),process.exitCode=1;return}const c=y(r,t.backend)==="reapi"?await C({...a??{url:r},backend:"reapi",url:r},u):await S(r,u);i==="json"?e.log(JSON.stringify(c,null,2)):e.log(D(c)),c.ok||(process.exitCode=1)},"cacheDoctorExecute");export{x as cacheDoctorExecute};
1
+ var h=Object.defineProperty;var p=(e,t)=>h(e,"name",{value:t,configurable:!0});import{I as g,T as l,j as m,E as n,q as b,e as d}from"../packem_shared/index.server-B7ETiT4C.js";import{ReapiRemoteCache as f,resolveTurboEnvCompat as k}from"@visulima/task-runner";import{p as $}from"./bin.js";var w=Object.defineProperty,s=p((e,t)=>w(e,"name",{value:t,configurable:!0}),"s");const y=s((e,t)=>t==="http"||t==="reapi"?t:e.startsWith("grpc://")||e.startsWith("grpcs://")?"reapi":"http","inferBackend"),S=s(async(e,t)=>{const o=Date.now(),a=new AbortController,r=setTimeout(()=>{a.abort()},t);try{const i=await fetch(e,{method:"HEAD",signal:a.signal});return{backend:"http",durationMs:Date.now()-o,httpStatus:i.status,ok:!0,url:e}}catch(i){return{backend:"http",durationMs:Date.now()-o,error:i instanceof Error?i.message:String(i),ok:!1,url:e}}finally{clearTimeout(r)}},"probeHttp"),C=s(async(e,t)=>{const o=Date.now(),a=new f({...e,timeout:t});try{return{backend:"reapi",capabilities:await a.probeCapabilities(),durationMs:Date.now()-o,ok:!0,url:e.url}}catch(r){return{backend:"reapi",durationMs:Date.now()-o,error:r instanceof Error?r.message:String(r),ok:!1,url:e.url}}finally{try{await a.close()}catch{}}},"probeReapi"),D=s(e=>{const t=[],o=e.ok?g("OK"):l("FAIL");if(t.push(`${m("Remote cache")} ${o}`),t.push(` ${n("URL:")} ${b(e.url)}`),t.push(` ${n("Backend:")} ${e.backend}`),t.push(` ${n("Latency:")} ${String(e.durationMs)}ms`),e.httpStatus!==void 0&&t.push(` ${n("Status:")} ${String(e.httpStatus)}`),e.capabilities){const a=e.capabilities.digestFunctions.length>0?e.capabilities.digestFunctions.join(", "):d("(none advertised)");t.push(` ${n("Digests:")} ${a}`),t.push(` ${n("Batch:")} ${String(e.capabilities.maxBatchTotalSizeBytes)} bytes`)}return e.error&&t.push(` ${n("Error:")} ${l(e.error)}`),t.join(`
2
+ `)},"formatTable"),T=s(async({logger:e,options:t,visConfig:o})=>{const a=k((o??{}).taskRunner?.remoteCache),r=t.url??a?.url,i=t.format??"table",u=t.timeout??5e3;if(!r){$.error("No remote cache configured. Set taskRunner.remoteCache.url in vis.config.ts, pass --url=..., or export TURBO_API."),process.exitCode=1;return}const c=y(r,t.backend)==="reapi"?await C({...a??{url:r},backend:"reapi",url:r},u):await S(r,u);i==="json"?e.log(JSON.stringify(c,null,2)):e.log(D(c)),c.ok||(process.exitCode=1)},"cacheDoctorExecute");export{T as cacheDoctorExecute};
@@ -1,11 +1,11 @@
1
- var T=Object.defineProperty;var v=(e,t)=>T(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,a as j,I,p}from"./bin.js";import{z as _}from"./config.js";import{r as W,a as B,b as L,c as w}from"../packem_shared/ai-fix-BhcTrkuW.js";import{l as N}from"../packem_shared/failure-log-DF7nrFIs.js";const A=q(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=v(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[t,r]=m.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return m.getBuiltinModule(e)}return A(e)},"__cjs_getBuiltinModule"),{createInterface:z}=J("node:readline");var M=Object.defineProperty,l=v((e,t)=>M(e,"name",{value:t,configurable:!0}),"c");const U={"ambiguous-match":"ambiguous match",applied:"applied",error:"error","missing-file":"missing file","no-match":"no match","outside-workspace":"outside workspace"},S=l((e,t,r)=>{const o=W(e,t,r),s=_(e,o);return s===""||s.startsWith("..")?o:s},"formatDisplayPath"),E=l((e,t,r)=>{const o=[$(`Fix proposal (${e.provider}, confidence: ${e.confidence})`),"",e.explanation||P("<no explanation>")];if(e.cannotFix)return o.push(""),o.push(R(`Cannot fix automatically: ${e.cannotFix}`)),o.join(`
1
+ var O=Object.defineProperty;var v=(e,t)=>O(e,"name",{value:t,configurable:!0});import{createRequire as q}from"node:module";import{j as $,E as P,e as R,q as D,T as j,I}from"../packem_shared/index.server-B7ETiT4C.js";import{z as _}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{r as W,a as B,b as L,c as w}from"../packem_shared/ai-fix-DiGSrGKv.js";import{p}from"./bin.js";import{l as N}from"../packem_shared/failure-log-B0Uh-65U.js";const A=q(import.meta.url),m=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,J=v(e=>{if(typeof m<"u"&&m.versions&&m.versions.node){const[t,r]=m.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return m.getBuiltinModule(e)}return A(e)},"__cjs_getBuiltinModule"),{createInterface:z}=J("node:readline");var M=Object.defineProperty,l=v((e,t)=>M(e,"name",{value:t,configurable:!0}),"c");const U={"ambiguous-match":"ambiguous match",applied:"applied",error:"error","missing-file":"missing file","no-match":"no match","outside-workspace":"outside workspace"},S=l((e,t,r)=>{const o=W(e,t,r),s=_(e,o);return s===""||s.startsWith("..")?o:s},"formatDisplayPath"),E=l((e,t,r)=>{const o=[$(`Fix proposal (${e.provider}, confidence: ${e.confidence})`),"",e.explanation||P("<no explanation>")];if(e.cannotFix)return o.push(""),o.push(R(`Cannot fix automatically: ${e.cannotFix}`)),o.join(`
2
2
  `);if(e.patches.length===0)return o.push(""),o.push(R("No patches were proposed.")),o.join(`
3
3
  `);o.push(""),o.push($(`Patches (${String(e.patches.length)}):`));for(const[s,i]of e.patches.entries()){const a=S(t,r,i.file);o.push(""),o.push(D(`[${String(s+1)}] ${a}`)),i.reason&&o.push(P(` reason: ${i.reason}`));for(const c of i.oldString.split(`
4
4
  `))o.push(j(` - ${c}`));for(const c of i.newString.split(`
5
5
  `))o.push(I(` + ${c}`))}return o.join(`
6
6
  `)},"formatProposalText"),C=l((e,t,r)=>{const o=[];for(const s of e){const i=s.absolutePath?_(t,s.absolutePath)||s.absolutePath:S(t,r,s.patch.file),a=U[s.status];s.status==="applied"?o.push(I(` ✓ ${i}: ${a}`)):o.push(j(` ✗ ${i}: ${a}${s.error?` (${s.error})`:""}`))}return o.join(`
7
- `)},"formatPatchResultsText"),x=l(e=>{let t=0,r=0;for(const o of e)o.status==="applied"?t+=1:r+=1;return{applied:t,failed:r}},"summarizePatchResults"),G=l(e=>new Promise(t=>{const r=z({input:process.stdin,output:process.stderr});r.question(`${e} (y/N) `,o=>{r.close();const s=o.trim().toLowerCase();t(s==="y"||s==="yes")})}),"confirmPrompt"),H=l(e=>e??process.cwd(),"resolveWorkspaceRoot"),tt=l(async({argument:e,logger:t,options:r,visConfig:o,workspaceRoot:s})=>{const i=e[0],a=H(s),c=(r.format??"text")==="json";if(!i){if(c){const f=N(a);process.stdout.write(`${JSON.stringify({availableTasks:f,error:"No task ID specified"},void 0,2)}
7
+ `)},"formatPatchResultsText"),x=l(e=>{let t=0,r=0;for(const o of e)o.status==="applied"?t+=1:r+=1;return{applied:t,failed:r}},"summarizePatchResults"),G=l(e=>new Promise(t=>{const r=z({input:process.stdin,output:process.stderr});r.question(`${e} (y/N) `,o=>{r.close();const s=o.trim().toLowerCase();t(s==="y"||s==="yes")})}),"confirmPrompt"),H=l(e=>e??process.cwd(),"resolveWorkspaceRoot"),et=l(async({argument:e,logger:t,options:r,visConfig:o,workspaceRoot:s})=>{const i=e[0],a=H(s),c=(r.format??"text")==="json";if(!i){if(c){const f=N(a);process.stdout.write(`${JSON.stringify({availableTasks:f,error:"No task ID specified"},void 0,2)}
8
8
  `)}else{p.error("No task ID specified. Usage: vis ai fix <project>:<target>");const f=N(a);if(f.length>0){p.info("Tasks with captured failure logs:");for(const h of f)p.info(` - ${h}`)}else p.notice("No failure logs found. Re-run a failing task with `vis run` to capture logs.")}process.exitCode=1;return}const n=await B(a,i,{runId:r.run});if(!n){c?process.stdout.write(`${JSON.stringify({error:"No failure log or run summary found",taskId:i},void 0,2)}
9
9
  `):(p.error(`No failure log or run summary found for task "${i}".`),p.notice("Re-run the task with `vis run` so its terminal output and run metadata are captured.")),process.exitCode=1;return}n.terminalOutputCaptured||p.warn(`No captured terminal output for "${i}". Re-run with \`vis run\` for a better fix proposal.`);const F=o?.ai,u=await L(n,t,{cache:r.cache!==!1,config:F});if(!u){c&&process.stdout.write(`${JSON.stringify({error:"AI fix proposal failed or no provider available",taskId:i},void 0,2)}
10
10
  `),process.exitCode=1;return}const g=r.apply===!0;if(c){const f=g?void 0:await w(a,n.cwd,u,{dryRun:!0}),h=g?await w(a,n.cwd,u):void 0;if(process.stdout.write(`${JSON.stringify({appliedResults:h,dryRunResults:f,failureContext:{cwd:n.cwd,hash:n.hash,runId:n.runId,taskId:n.taskId,terminalOutputCaptured:n.terminalOutputCaptured},proposal:u},void 0,2)}
11
- `),g&&h){const{failed:O}=x(h);O>0&&(process.exitCode=1)}return}if(t.info(E(u,a,n.cwd)),u.cannotFix||u.patches.length===0)return;const k=await w(a,n.cwd,u,{dryRun:!0}),y=x(k);if(t.info(""),t.info($("Patch validation:")),t.info(C(k,a,n.cwd)),!g){t.info(""),p.info("Re-run with --apply to write these patches to disk.");return}if(y.applied===0){p.error("No patches can be applied (every patch failed validation)."),process.exitCode=1;return}if(r.yes!==!0&&(t.info(""),!await G(`Apply ${String(y.applied)} patch${y.applied===1?"":"es"} to disk?`))){p.notice("Aborted. Nothing written.");return}const b=await w(a,n.cwd,u),d=x(b);t.info(""),t.info($("Apply results:")),t.info(C(b,a,n.cwd)),t.info(""),d.failed===0?p.success(`Applied ${String(d.applied)} patch${d.applied===1?"":"es"}.`):(p.warn(`${String(d.applied)} applied, ${String(d.failed)} failed.`),process.exitCode=1)},"aiFix");export{tt as aiFix};
11
+ `),g&&h){const{failed:T}=x(h);T>0&&(process.exitCode=1)}return}if(t.info(E(u,a,n.cwd)),u.cannotFix||u.patches.length===0)return;const k=await w(a,n.cwd,u,{dryRun:!0}),y=x(k);if(t.info(""),t.info($("Patch validation:")),t.info(C(k,a,n.cwd)),!g){t.info(""),p.info("Re-run with --apply to write these patches to disk.");return}if(y.applied===0){p.error("No patches can be applied (every patch failed validation)."),process.exitCode=1;return}if(r.yes!==!0&&(t.info(""),!await G(`Apply ${String(y.applied)} patch${y.applied===1?"":"es"} to disk?`))){p.notice("Aborted. Nothing written.");return}const b=await w(a,n.cwd,u),d=x(b);t.info(""),t.info($("Apply results:")),t.info(C(b,a,n.cwd)),t.info(""),d.failed===0?p.success(`Applied ${String(d.applied)} patch${d.applied===1?"":"es"}.`):(p.warn(`${String(d.applied)} applied, ${String(d.failed)} failed.`),process.exitCode=1)},"aiFix");export{et as aiFix};
@@ -1 +1 @@
1
- var $=Object.defineProperty;var w=(t,e)=>$(t,"name",{value:e,configurable:!0});import{createTaskGraph as b}from"@visulima/task-runner";import{C as E,O as R}from"./bin.js";import{r as C,f as x}from"../packem_shared/selectors-B2ISH581.js";var G=Object.defineProperty,d=w((t,e)=>G(t,"name",{value:e,configurable:!0}),"u");const J=d((t,e,n)=>{const c=[],o=new Set,l=d((r,f)=>{if(o.has(r))return;o.add(r);const s=e[r]??[];for(const i of s)l(i,f+1);const m=n[r],u=" ".repeat(f);c.push(`${u}${r}${m?.cache===!1?" (no-cache)":""}`)},"walk");for(const r of t)l(r,0);return c},"renderPlan"),P=d((t,e,n)=>({roots:t,tasks:Object.fromEntries(Object.entries(n).map(([c,o])=>[c,{cache:o.cache,dependsOn:e[c]??[],outputs:o.outputs,parallelism:o.parallelism,projectRoot:o.projectRoot,target:o.target}]))}),"toJson"),B=d(async({argument:t,logger:e,options:n,visConfig:c,workspaceRoot:o})=>{const l=t[0];if(!l)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!o)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:r,packageJsons:f,workspace:s}=E(o,c),m=R(o,s,f),u=await C(l,s,process.cwd(),o),{target:i}=u;let h=u.projects;n.query&&(h=x(h,s,n.query));const j=h.filter(p=>s.projects[p]?.targets?.[i]!==void 0);if(j.length===0){e.info(`No projects have a "${i}" target.`);return}const v=j.map(p=>{const k=s.projects[p],g=k.targets?.[i],O={project:p,target:i};return{cache:g?.cache,id:`${p}:${i}`,outputs:g?.outputs??[],overrides:{command:g?.command},parallelism:g?.parallelism,projectRoot:k.root,target:O}}),a=b(v,{projectGraph:m,targetDefaults:r.tasks,workspace:s});if(n.json){e.info(JSON.stringify(P(a.roots,a.dependencies,a.tasks),null,2));return}const y=J(a.roots,a.dependencies,a.tasks);e.info(`Execution plan (${Object.keys(a.tasks).length} task(s), ${a.roots.length} root(s)):`),e.info("");for(const p of y)e.info(p)},"execute");export{B as default};
1
+ var $=Object.defineProperty;var w=(t,e)=>$(t,"name",{value:e,configurable:!0});import{createTaskGraph as b}from"@visulima/task-runner";import{C as E,O as R}from"./bin.js";import{r as C,f as x}from"../packem_shared/selectors-BE2BCnTR.js";var G=Object.defineProperty,d=w((t,e)=>G(t,"name",{value:e,configurable:!0}),"u");const J=d((t,e,n)=>{const c=[],o=new Set,l=d((r,f)=>{if(o.has(r))return;o.add(r);const s=e[r]??[];for(const i of s)l(i,f+1);const m=n[r],u=" ".repeat(f);c.push(`${u}${r}${m?.cache===!1?" (no-cache)":""}`)},"walk");for(const r of t)l(r,0);return c},"renderPlan"),P=d((t,e,n)=>({roots:t,tasks:Object.fromEntries(Object.entries(n).map(([c,o])=>[c,{cache:o.cache,dependsOn:e[c]??[],outputs:o.outputs,parallelism:o.parallelism,projectRoot:o.projectRoot,target:o.target}]))}),"toJson"),B=d(async({argument:t,logger:e,options:n,visConfig:c,workspaceRoot:o})=>{const l=t[0];if(!l)throw new Error("Missing selector. Usage: vis action-graph <selector>");if(!o)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{config:r,packageJsons:f,workspace:s}=E(o,c),m=R(o,s,f),u=await C(l,s,process.cwd(),o),{target:i}=u;let h=u.projects;n.query&&(h=x(h,s,n.query));const j=h.filter(p=>s.projects[p]?.targets?.[i]!==void 0);if(j.length===0){e.info(`No projects have a "${i}" target.`);return}const v=j.map(p=>{const k=s.projects[p],g=k.targets?.[i],O={project:p,target:i};return{cache:g?.cache,id:`${p}:${i}`,outputs:g?.outputs??[],overrides:{command:g?.command},parallelism:g?.parallelism,projectRoot:k.root,target:O}}),a=b(v,{projectGraph:m,targetDefaults:r.tasks,workspace:s});if(n.json){e.info(JSON.stringify(P(a.roots,a.dependencies,a.tasks),null,2));return}const y=J(a.roots,a.dependencies,a.tasks);e.info(`Execution plan (${Object.keys(a.tasks).length} task(s), ${a.roots.length} root(s)):`),e.info("");for(const p of y)e.info(p)},"execute");export{B as default};
@@ -1,2 +1,2 @@
1
- var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"./config.js";import{C as v,O as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-lk0-5Z-i.js";var C=Object.defineProperty,m=d((t,o)=>C(t,"name",{value:o,configurable:!0}),"f");const M=m(async({argument:t,logger:o,options:s,visConfig:w,workspaceRoot:e})=>{const n=t[0];if(!n)throw new Error("Missing subcommand. Usage: vis docker <scaffold|prune>");if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:k,workspace:c}=v(e,w);if(n==="scaffold"){const a=h(e,c,k),r=s.focus;if(!r)throw new Error("Missing --focus. Pass one or more project names, comma-separated.");const f=r.split(",").map(i=>i.trim()).filter(Boolean);if(f.length===0)throw new Error("--focus resolved to an empty list. Provide at least one project name.");const u=l(e,s.out??".vis/docker"),{projects:p}=j({focus:f,includeSources:!!s.includeSources,log:m(i=>{o.info(i)},"log"),outDir:u,projectGraph:a,pruneLockfile:s.pruneLockfile!==!1,workspace:c,workspaceRoot:e});o.info(`Scaffolded ${p.length} project(s) into ${u}`),o.info(`Focus closure: ${p.toSorted().join(", ")}`);return}if(n==="prune"){const a=l(e,s.context??".vis/docker"),{removed:r}=x({contextRoot:a,workspace:c,workspaceRoot:e});o.info(`Pruned ${r.length} unfocused project(s)`),r.length>0&&o.debug?.(r.join(`
1
+ var g=Object.defineProperty;var d=(t,o)=>g(t,"name",{value:o,configurable:!0});import{M as l}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{C as v,O as h}from"./bin.js";import{s as j,p as x}from"../packem_shared/docker-BhBBfWfc.js";var C=Object.defineProperty,m=d((t,o)=>C(t,"name",{value:o,configurable:!0}),"f");const M=m(async({argument:t,logger:o,options:s,visConfig:w,workspaceRoot:e})=>{const n=t[0];if(!n)throw new Error("Missing subcommand. Usage: vis docker <scaffold|prune>");if(!e)throw new Error("Could not determine workspace root. Run inside a monorepo.");const{packageJsons:k,workspace:c}=v(e,w);if(n==="scaffold"){const a=h(e,c,k),r=s.focus;if(!r)throw new Error("Missing --focus. Pass one or more project names, comma-separated.");const f=r.split(",").map(i=>i.trim()).filter(Boolean);if(f.length===0)throw new Error("--focus resolved to an empty list. Provide at least one project name.");const u=l(e,s.out??".vis/docker"),{projects:p}=j({focus:f,includeSources:!!s.includeSources,log:m(i=>{o.info(i)},"log"),outDir:u,projectGraph:a,pruneLockfile:s.pruneLockfile!==!1,workspace:c,workspaceRoot:e});o.info(`Scaffolded ${p.length} project(s) into ${u}`),o.info(`Focus closure: ${p.toSorted().join(", ")}`);return}if(n==="prune"){const a=l(e,s.context??".vis/docker"),{removed:r}=x({contextRoot:a,workspace:c,workspaceRoot:e});o.info(`Pruned ${r.length} unfocused project(s)`),r.length>0&&o.debug?.(r.join(`
2
2
  `));return}throw new Error(`Unknown subcommand: "${n}". Expected scaffold or prune.`)},"execute");export{M as default};
@@ -1 +1 @@
1
- var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{g,B as m}from"./bin.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const b=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??process.cwd(),p=g(l,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),c=m(p,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},l,r);c!==0&&(process.exitCode=c)},"execute");export{b as default};
1
+ var d=Object.defineProperty;var n=(o,r)=>d(o,"name",{value:r,configurable:!0});import{I as m,W as g}from"../packem_shared/pm-runner-CVliR6Ie.js";import{o as u}from"../packem_shared/utils-DrNg0XTR.js";var v=Object.defineProperty,k=n((o,r)=>v(o,"name",{value:r,configurable:!0}),"t");const b=k(async({argument:o,logger:r,options:e,visConfig:s,workspaceRoot:t})=>{const a=o;if(!a||a.length===0)throw new Error("No command specified. Usage: vis exec <command> [args...]");const[i,...f]=a,l=t??process.cwd(),p=m(l,{configBackend:s?.install?.backend,configCorepack:s?.install?.corepack}),c=g(p,{args:f,command:i,filter:u(e.filter),parallel:e.parallel||!1,recursive:e.recursive||!1,reverse:e.reverse||!1,shellMode:e.shellMode||!1,workspaceRoot:e.workspaceRoot||!1},l,r);c!==0&&(process.exitCode=c)},"execute");export{b as default};
@@ -1,5 +1,5 @@
1
- var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as r,i as u,$ as p,B as $}from"./config.js";import{J as j}from"./bin.js";const b=_(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{rmSync:y}=d("node:fs"),{homedir:n}=d("node:os"),{createInterface:w}=d("node:readline");var T=Object.defineProperty,m=a((e,i)=>T(e,"name",{value:i,configurable:!0}),"l");const f=j(),h=[r(n(),".zshrc"),r(n(),".zshenv"),r(n(),".bashrc"),r(n(),".bash_profile"),r(n(),".profile"),r(n(),".config","fish","config.fish")],M=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
1
+ var g=Object.defineProperty;var a=(e,i)=>g(e,"name",{value:i,configurable:!0});import{createRequire as _}from"node:module";import{M as n,i as u,$ as p}from"../packem_shared/readFileSync-CGmzMUF2-D6rUjGDn.js";import{B as $}from"./config.js";import{j}from"./bin.js";const b=_(import.meta.url),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=a(e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[i,s]=c.versions.node.split(".").map(Number);if(i>22||i===22&&s>=3||i===20&&s>=16)return c.getBuiltinModule(e)}return b(e)},"__cjs_getBuiltinModule"),{rmSync:y}=d("node:fs"),{homedir:r}=d("node:os"),{createInterface:w}=d("node:readline");var T=Object.defineProperty,m=a((e,i)=>T(e,"name",{value:i,configurable:!0}),"l");const f=j(),h=[n(r(),".zshrc"),n(r(),".zshenv"),n(r(),".bashrc"),n(r(),".bash_profile"),n(r(),".profile"),n(r(),".config","fish","config.fish")],M=m(e=>{const i=[];for(const s of h)if(u(s))try{const l=p(s).split(`
2
2
  `),o=l.filter(t=>!t.includes(".vis/bin")&&!t.includes("VIS_HOME")&&!t.includes("# vis "));o.length!==l.length&&($(s,o.join(`
3
- `)),i.push(s))}catch{e.warn(`warning: could not clean ${s}`)}return i},"cleanShellProfiles"),B=m(async({logger:e,options:i})=>{if(!u(f)){e.info("vis is not installed (no ~/.vis directory found).");return}e.info("This will remove:"),e.info(` ${f}/`);const s=h.filter(o=>u(o)&&p(o).includes(".vis"));for(const o of s)e.info(` Lines in ${o}`);if(!i.yes){if(!process.stdin.isTTY)throw new Error("Non-interactive terminal. Use --yes to confirm.");const o=w({input:process.stdin,output:process.stdout}),t=await new Promise(v=>{o.question(`
3
+ `)),i.push(s))}catch{e.warn(`warning: could not clean ${s}`)}return i},"cleanShellProfiles"),R=m(async({logger:e,options:i})=>{if(!u(f)){e.info("vis is not installed (no ~/.vis directory found).");return}e.info("This will remove:"),e.info(` ${f}/`);const s=h.filter(o=>u(o)&&p(o).includes(".vis"));for(const o of s)e.info(` Lines in ${o}`);if(!i.yes){if(!process.stdin.isTTY)throw new Error("Non-interactive terminal. Use --yes to confirm.");const o=w({input:process.stdin,output:process.stdout}),t=await new Promise(v=>{o.question(`
4
4
  Type "uninstall" to confirm: `,v)});if(o.close(),t.trim()!=="uninstall"){e.info("Aborted.");return}}const l=M(e);for(const o of l)e.info(`Cleaned ${o}`);try{y(f,{force:!0,recursive:!0}),e.info(`
5
- ✓ Removed ${f}`)}catch(o){throw new Error(`Failed to remove ${f}: ${o instanceof Error?o.message:String(o)}`,{cause:o})}e.info("✓ vis has been uninstalled.")},"execute");export{B as default};
5
+ ✓ Removed ${f}`)}catch(o){throw new Error(`Failed to remove ${f}: ${o instanceof Error?o.message:String(o)}`,{cause:o})}e.info("✓ vis has been uninstalled.")},"execute");export{R as default};