@visulima/vis 6.0.0 → 6.1.0

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 (159) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/LICENSE.md +89 -152
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +1 -1
  5. package/dist/packem_chunks/CONFIG_FILES.js +4 -4
  6. package/dist/packem_chunks/bloom-status.js +1 -1
  7. package/dist/packem_chunks/bloom-sync.js +1 -1
  8. package/dist/packem_chunks/catalog.js +52 -61
  9. package/dist/packem_chunks/cli-exec.js +1 -1
  10. package/dist/packem_chunks/cli-main.js +150 -152
  11. package/dist/packem_chunks/dart-plan.js +1 -1
  12. package/dist/packem_chunks/dart-projects.js +1 -1
  13. package/dist/packem_chunks/dispatch.js +1 -1
  14. package/dist/packem_chunks/doctor-probe.js +1 -1
  15. package/dist/packem_chunks/fix.js +1 -1
  16. package/dist/packem_chunks/handler.js +1 -1
  17. package/dist/packem_chunks/handler10.js +4 -4
  18. package/dist/packem_chunks/handler11.js +1 -1
  19. package/dist/packem_chunks/handler12.js +4 -4
  20. package/dist/packem_chunks/handler13.js +1 -1
  21. package/dist/packem_chunks/handler14.js +1 -1
  22. package/dist/packem_chunks/handler15.js +1 -1
  23. package/dist/packem_chunks/handler16.js +1 -1
  24. package/dist/packem_chunks/handler17.js +1 -1
  25. package/dist/packem_chunks/handler18.js +1 -1
  26. package/dist/packem_chunks/handler19.js +1 -1
  27. package/dist/packem_chunks/handler2.js +1 -1
  28. package/dist/packem_chunks/handler20.js +2 -2
  29. package/dist/packem_chunks/handler21.js +1 -1
  30. package/dist/packem_chunks/handler22.js +2 -2
  31. package/dist/packem_chunks/handler23.js +1 -1
  32. package/dist/packem_chunks/handler24.js +1 -1
  33. package/dist/packem_chunks/handler26.js +4 -4
  34. package/dist/packem_chunks/handler27.js +1 -1
  35. package/dist/packem_chunks/handler28.js +1 -1
  36. package/dist/packem_chunks/handler29.js +1 -1
  37. package/dist/packem_chunks/handler3.js +1 -1
  38. package/dist/packem_chunks/handler30.js +1 -1
  39. package/dist/packem_chunks/handler5.js +1 -1
  40. package/dist/packem_chunks/handler50.js +2 -2
  41. package/dist/packem_chunks/handler51.js +1 -1
  42. package/dist/packem_chunks/handler53.js +1 -1
  43. package/dist/packem_chunks/handler54.js +1 -1
  44. package/dist/packem_chunks/handler55.js +1 -1
  45. package/dist/packem_chunks/handler58.js +1 -1
  46. package/dist/packem_chunks/handler59.js +1 -1
  47. package/dist/packem_chunks/handler6.js +1 -1
  48. package/dist/packem_chunks/handler60.js +7 -7
  49. package/dist/packem_chunks/handler61.js +3 -3
  50. package/dist/packem_chunks/handler62.js +2 -2
  51. package/dist/packem_chunks/handler63.js +1 -1
  52. package/dist/packem_chunks/handler64.js +2 -2
  53. package/dist/packem_chunks/handler65.js +4 -4
  54. package/dist/packem_chunks/handler66.js +1 -1
  55. package/dist/packem_chunks/handler67.js +20 -31
  56. package/dist/packem_chunks/handler68.js +1 -1
  57. package/dist/packem_chunks/handler69.js +1 -1
  58. package/dist/packem_chunks/handler7.js +1 -1
  59. package/dist/packem_chunks/handler70.js +6 -6
  60. package/dist/packem_chunks/handler71.js +26 -46
  61. package/dist/packem_chunks/handler72.js +1 -1
  62. package/dist/packem_chunks/handler73.js +1 -1
  63. package/dist/packem_chunks/handler74.js +1 -1
  64. package/dist/packem_chunks/handler75.js +17 -17
  65. package/dist/packem_chunks/handler76.js +1 -1
  66. package/dist/packem_chunks/handler77.js +2 -2
  67. package/dist/packem_chunks/handler78.js +31 -31
  68. package/dist/packem_chunks/handler8.js +1 -1
  69. package/dist/packem_chunks/handler9.js +1 -1
  70. package/dist/packem_chunks/heal-accept.js +1 -1
  71. package/dist/packem_chunks/heal.js +1 -1
  72. package/dist/packem_chunks/help-command.js +7 -40
  73. package/dist/packem_chunks/index2.js +11 -11
  74. package/dist/packem_chunks/index6.js +1 -1
  75. package/dist/packem_chunks/keys-refresh.js +1 -1
  76. package/dist/packem_chunks/lean.js +1 -1
  77. package/dist/packem_chunks/list.js +1 -1
  78. package/dist/packem_chunks/loader.js +1 -1
  79. package/dist/packem_chunks/orchestrator.js +1 -1
  80. package/dist/packem_chunks/prompts.js +1 -1
  81. package/dist/packem_chunks/status.js +1 -1
  82. package/dist/packem_chunks/sync.js +1 -1
  83. package/dist/packem_chunks/sync2.js +1 -1
  84. package/dist/packem_chunks/tripwire.js +1 -1
  85. package/dist/packem_chunks/ts-loader.js +5 -5
  86. package/dist/packem_chunks/verify-lockfile.js +1 -1
  87. package/dist/packem_shared/Table-Bo1JKNCN-CGGet8ES.js +34 -0
  88. package/dist/packem_shared/{affected-selection-DDxwjwM4.js → affected-selection-DGb6Xu5K.js} +1 -1
  89. package/dist/packem_shared/{affected-shas-BuaWvmsG.js → affected-shas-B_kfSKss.js} +1 -1
  90. package/dist/packem_shared/{ai-fix-C2BhFFhi.js → ai-fix-D9MxigBQ.js} +5 -5
  91. package/dist/packem_shared/{augment-CxUPE8KX.js → augment-B9kSZuvW.js} +1 -1
  92. package/dist/packem_shared/{bin-Be7_QhQK.js → bin-AZQv95jh.js} +1 -1
  93. package/dist/packem_shared/{build-scripts-DxyVSkgM.js → build-scripts-CEDx_nJp.js} +1 -1
  94. package/dist/packem_shared/{command-runtime-BXvH5EC0.js → command-runtime-HSsYGCQd.js} +1 -1
  95. package/dist/packem_shared/{dart-pubspec-DvmyleIr.js → dart-pubspec-BK_cK2EP.js} +2 -2
  96. package/dist/packem_shared/dependency-scan-CawAKoU_.js +1 -0
  97. package/dist/packem_shared/detect-CbMRSXkM.js +1 -0
  98. package/dist/packem_shared/{docker-BTuwdXaC.js → docker-DXqV-07f.js} +1 -1
  99. package/dist/packem_shared/{ecosystem-gate-BpQNUJzN.js → ecosystem-gate-DiqQj0LJ.js} +1 -1
  100. package/dist/packem_shared/env-consistency-B4rU4MQb.js +1 -0
  101. package/dist/packem_shared/{failure-log-kp0n2rbD.js → failure-log-BP-gCUb5.js} +1 -1
  102. package/dist/packem_shared/{formatBytes-BHAzNIrn-DRcKvqnb.js → formatBytes-_HvjOy8a-B_qQr4Hw.js} +3 -3
  103. package/dist/packem_shared/{getRandomSpinner-4ZEcbTYv-DCyIuj19.js → getRandomSpinner-DX11qCB2-CoIsn7ZU.js} +1 -1
  104. package/dist/packem_shared/index-BisalDCf.js +39 -0
  105. package/dist/packem_shared/{index-BdMIfGVZ.js → index-BzhrR_iC.js} +15 -15
  106. package/dist/packem_shared/{index-DQfNpt2u.js → index-CDHP1kby.js} +1 -1
  107. package/dist/packem_shared/{index-DsSWb5XH.js → index-JRb5wabN.js} +1 -1
  108. package/dist/packem_shared/index.server-Ca_EEVfw.js +2 -0
  109. package/dist/packem_shared/{isAccessibleSync-DYKTrrvc-BwaMhQs0.js → isAccessibleSync-DYKTrrvc-C-_5cgwu.js} +1 -1
  110. package/dist/packem_shared/{lifecycle-BAhkhE2L.js → lifecycle-DvmDIRbb.js} +1 -1
  111. package/dist/packem_shared/{lockfile-DHmlPGk1.js → lockfile-CiUtEbnt.js} +1 -1
  112. package/dist/packem_shared/{manifests-Dd4Hoztt.js → manifests-Du4yKlf_.js} +1 -1
  113. package/dist/packem_shared/{min-release-age-BJnOQaoF.js → min-release-age-JViyQuBM.js} +1 -1
  114. package/dist/packem_shared/{missing-package-json-DfzrGwe1.js → missing-package-json-Cu5YVAot.js} +1 -1
  115. package/dist/packem_shared/{multi-eco-lockfiles-BIa6xvJc.js → multi-eco-lockfiles-B2X3yhyo.js} +1 -1
  116. package/dist/packem_shared/{native-config-sync-Dr9XvxOf.js → native-config-sync-TdTWjVgI.js} +1 -1
  117. package/dist/packem_shared/osv-bloom-BCAX5ARR.js +2 -0
  118. package/dist/packem_shared/package-version-KLwH0Ivy.js +4 -0
  119. package/dist/packem_shared/{packument-C9nRiBJf.js → packument-zb18Jnlw.js} +1 -1
  120. package/dist/packem_shared/{pm-runner-ImwtpnWY.js → pm-runner-RM72mDZg.js} +1 -1
  121. package/dist/packem_shared/{project-name-filter-C2rkW-Vn.js → project-name-filter-B1ZCsbOW.js} +1 -1
  122. package/dist/packem_shared/{provenance-DF-ypZj3.js → provenance-L1M2FPy_.js} +1 -1
  123. package/dist/packem_shared/{readJsonSync-CbryXYxN-Bm5i10UW.js → readJsonSync-CbryXYxN-EWl7_7KX.js} +1 -1
  124. package/dist/packem_shared/{registry-keys-BLuHOyZu.js → registry-keys-DxdqMzyp.js} +1 -1
  125. package/dist/packem_shared/{resolve-explicit-BDaQRR6o.js → resolve-explicit-CQa37JSq.js} +1 -1
  126. package/dist/packem_shared/{resolve-runtime-Cr19Pk6L.js → resolve-runtime-DNukUjIr.js} +1 -1
  127. package/dist/packem_shared/{run-file-XbRCF6Mp.js → run-file-UBukWaha.js} +1 -1
  128. package/dist/packem_shared/runtime-check-D3cRDuoi.js +1 -0
  129. package/dist/packem_shared/{s1ngularity-UCZN7skW.js → s1ngularity-CO5GkkqX.js} +1 -1
  130. package/dist/packem_shared/scaffold-files-DVyfB0yz.js +28 -0
  131. package/dist/packem_shared/{scan-progress-DcYI76zE.js → scan-progress-RwCRxJdX.js} +1 -1
  132. package/dist/packem_shared/{selectors-DCiEU0iv.js → selectors-edwcgNl3.js} +2 -2
  133. package/dist/packem_shared/{signatures-CicxPHN4.js → signatures-DIqFUOfs.js} +1 -1
  134. package/dist/packem_shared/spinner-BJjbNl1F.js +1 -0
  135. package/dist/packem_shared/target-merge-DVJl-7Qz.js +4 -0
  136. package/dist/packem_shared/{target-options-PgWIuJnb.js → target-options-DsHFmRZH.js} +1 -1
  137. package/dist/packem_shared/{task-env-Dl08aklA.js → task-env-DzR4RkOj.js} +1 -1
  138. package/dist/packem_shared/toolchain-CP79HNVy.js +5 -0
  139. package/dist/packem_shared/{typosquats-DxPzyK7u.js → typosquats-D4DEHhFy.js} +1 -1
  140. package/dist/packem_shared/{verify-CadR9PUk.js → verify-B_MblU_Q.js} +1 -1
  141. package/dist/packem_shared/{vis-update-app-DrFWQyPn.js → vis-update-app-9b2kSk9f.js} +1 -1
  142. package/dist/packem_shared/{vis-user-error-k7CLTpA4.js → vis-user-error-CRmrBaD1.js} +15 -15
  143. package/dist/packem_shared/{watch-Dr_6yz3o.js → watch-CcTketln.js} +1 -1
  144. package/dist/packem_shared/watch-loop-D1_e-qIl.js +11 -0
  145. package/dist/packem_shared/{writeFileSync-DJoHk3Ks-Dhem3Uof.js → writeFileSync-DJoHk3Ks-BPRoepNw.js} +1 -1
  146. package/dist/runtime/preload.js +1 -1
  147. package/index.js +26 -26
  148. package/package.json +12 -12
  149. package/dist/packem_shared/dependency-scan-DKK3ZEZI.js +0 -1
  150. package/dist/packem_shared/env-consistency-CUBJHENL.js +0 -1
  151. package/dist/packem_shared/index-C9ENZqH9.js +0 -39
  152. package/dist/packem_shared/index.server-D8BLnYZO.js +0 -2
  153. package/dist/packem_shared/osv-bloom-t40ra5U5.js +0 -2
  154. package/dist/packem_shared/package-version-CFuNUWDG.js +0 -4
  155. package/dist/packem_shared/runtime-check-Bh5q9IrT.js +0 -1
  156. package/dist/packem_shared/spinner-ukDEdGvp.js +0 -1
  157. package/dist/packem_shared/target-merge-BClIXg2k.js +0 -14
  158. package/dist/packem_shared/toolchain-DvUxlbDz.js +0 -5
  159. package/dist/packem_shared/watch-loop-BId9vT7Q.js +0 -11
@@ -1,4 +0,0 @@
1
- import{createRequire as ht}from"node:module";import{k as De,$ as te,a as ie,b as gt,g as Lt,f as St}from"./index-BdMIfGVZ.js";import{y as we}from"./index-C9ENZqH9.js";import{a as re,g as vt}from"./_commonjsHelpers-DTfxOvZk.js";import{r as Ct,a as Pt}from"./clean-DRiLimTx.js";import{p as bt}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";let ut;const pt=h=>(ut??=ht(import.meta.url))(h),G=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,R=h=>{if(typeof G<"u"&&G.versions&&G.versions.node){const[e,t]=G.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return G.getBuiltinModule(h)}return pt(h)},{dirname:ft}=R("node:path"),ye=R("node:url"),{fileURLToPath:dt}=ye,be=R("node:module"),{createRequire:mt}=be,yt=R("util"),E=h=>"Deno"in h,wi=()=>{if(E(globalThis)){const h=globalThis.Deno,e=h.execPath();let t=e;try{const{importMeta:i}=globalThis;i?.url&&(t=i.url)}catch{}return[e,t,...h.args]}return process.argv},Ai=()=>E(globalThis)?globalThis.Deno.cwd():process.cwd(),xi=()=>{if(E(globalThis)){const h=globalThis.Deno;return new Proxy(h.env.toObject(),{get:(e,t)=>typeof t=="string"?h.env.get(t):e[t],has:(e,t)=>typeof t=="string"?h.env.has(t):t in e,set:(e,t,i)=>typeof t=="string"?(i===void 0||h.env.set(t,i),!0):!1})}return process.env},Ei=()=>E(globalThis)?[]:process.execArgv,Oi=()=>E(globalThis)?globalThis.Deno.execPath():process.execPath,Ni=()=>{if(E(globalThis)){const h=globalThis.Deno.build?.os??"unknown";return h==="windows"?"win32":h}return process.platform},Fi=()=>{if(E(globalThis)){const h=globalThis.Deno.build?.arch??"unknown";return h==="x86_64"?"x64":h==="aarch64"?"arm64":h}return process.arch},Gi=(h=0)=>{if(E(globalThis))throw globalThis.Deno.exit(h),new Error("Deno exit failed");process.exit(h)},$i=(h,e)=>{if(E(globalThis))return()=>{};const t=process;return t.on(h,e),()=>{t.removeListener(h,e)}};var U,se;function Ae(){return se||(se=1,U=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","ALGLIB-Documentation","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Advanced-Cryptics-Dictionary","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BOLA-1.1","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-Tso","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Mark-Modifications","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","Buddy","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CAPEC-tou","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","ESA-PL-permissive-2.4","ESA-PL-strong-copyleft-2.4","ESA-PL-weak-copyleft-2.4","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-SMC","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HPND-sell-variant-critical-systems","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ISO-permission","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-STK","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MMPL-1.0.1","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-TNT","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSC-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OSSP","OpenMDW-1.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","ParaType-Free-Font-1.3","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGMLUG-PM","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TekHVC","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","UnRAR","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","Vixie-Cron","W3C","W3C-19980720","W3C-20150513","WTFNMFPL","WTFPL","Watcom-1.0","Widget-Workshop","WordNet","Wsuipa","X11","X11-distribute-modifications-variant","X11-no-permit-persons","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","hyphen-bulgarian","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]),U}var M,oe;function Dt(){return oe||(oe=1,M=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]),M}var k,le;function wt(){return le||(le=1,k=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]),k}var _,ae;function At(){if(ae)return _;ae=1;var h=[].concat(Ae()).concat(Dt()),e=wt();return _=function(t){var i=0;function s(){return i<t.length}function n(L){if(L instanceof RegExp){var c=t.slice(i),g=c.match(L);if(g)return i+=g[0].length,g[0]}else if(t.indexOf(L,i)===i)return i+=L.length,L}function l(){n(/[ ]*/)}function a(){for(var L,c=["WITH","AND","OR","(",")",":","+"],g=0;g<c.length&&(L=n(c[g]),!L);g++);if(L==="+"&&i>1&&t[i-2]===" ")throw new Error("Space before `+`");return L&&{type:"OPERATOR",string:L}}function o(){return n(/[A-Za-z0-9-.]+/)}function u(){var L=o();if(!L)throw new Error("Expected idstring at offset "+i);return L}function f(){if(n("DocumentRef-")){var L=u();return{type:"DOCUMENTREF",string:L}}}function S(){if(n("LicenseRef-")){var L=u();return{type:"LICENSEREF",string:L}}}function b(){var L=i,c=o();if(h.indexOf(c)!==-1)return{type:"LICENSE",string:c};if(e.indexOf(c)!==-1)return{type:"EXCEPTION",string:c};i=L}function v(){return a()||f()||S()||b()}for(var C=[];s()&&(l(),!!s());){var m=v();if(!m)throw new Error("Unexpected `"+t[i]+"` at offset "+i);C.push(m)}return C},_}var W,ce;function xt(){return ce||(ce=1,W=function(h){var e=0;function t(){return e<h.length}function i(){return t()?h[e]:null}function s(){if(!t())throw new Error;e++}function n(m){var L=i();if(L&&L.type==="OPERATOR"&&m===L.string)return s(),L.string}function l(){if(n("WITH")){var m=i();if(m&&m.type==="EXCEPTION")return s(),m.string;throw new Error("Expected exception after `WITH`")}}function a(){var m=e,L="",c=i();if(c.type==="DOCUMENTREF"&&(s(),L+="DocumentRef-"+c.string+":",!n(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(c=i(),c.type==="LICENSEREF")return s(),L+="LicenseRef-"+c.string,{license:L};e=m}function o(){var m=i();if(m&&m.type==="LICENSE"){s();var L={license:m.string};n("+")&&(L.plus=!0);var c=l();return c&&(L.exception=c),L}}function u(){var m=n("(");if(m){var L=v();if(!n(")"))throw new Error("Expected `)`");return L}}function f(){return u()||a()||o()}function S(m,L){return function c(){var g=L();if(g){if(!n(m))return g;var y=c();if(!y)throw new Error("Expected expression");return{left:g,conjunction:m.toLowerCase(),right:y}}}}var b=S("AND",f),v=S("OR",b),C=v();if(!C||t())throw new Error("Syntax error");return C}),W}var H,he;function xe(){if(he)return H;he=1;var h=At(),e=xt();return H=function(t){return e(h(t))},H}var j,ue;function Et(){if(ue)return j;ue=1;var h=xe(),e=Ae();function t(c){try{return h(c),!0}catch{return!1}}function i(c,g){var y=g[0].length-c[0].length;return y!==0?y:c[0].toUpperCase().localeCompare(g[0].toUpperCase())}var s=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(i),n=0,l=1,a=[function(c){return c.toUpperCase()},function(c){return c.trim()},function(c){return c.replace(/\./g,"")},function(c){return c.replace(/\s+/g,"")},function(c){return c.replace(/\s+/g,"-")},function(c){return c.replace("v","-")},function(c){return c.replace(/,?\s*(\d)/,"-$1")},function(c){return c.replace(/,?\s*(\d)/,"-$1.0")},function(c){return c.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(c){return c.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(c){return c[0].toUpperCase()+c.slice(1)},function(c){return c.replace("/","-")},function(c){return c.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(c){return c.indexOf("3.0")!==-1?c+"-or-later":c+"-only"},function(c){return c+"only"},function(c){return c.replace(/(\d)$/,"-$1.0")},function(c){return c.replace(/(-| )?(\d)$/,"-$2-Clause")},function(c){return c.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(c){return c.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(c){return c.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(c){return c.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(c){return c.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(c){return c.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(c){return"CC-"+c},function(c){return"CC-"+c+"-4.0"},function(c){return c.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(c){return"CC-"+c.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],o=e.map(function(c){var g=/^(.*)-\d+\.\d+$/.exec(c);return g?[g[0],g[1]]:[c,null]}).reduce(function(c,g){var y=g[1];return c[y]=c[y]||[],c[y].push(g[0]),c},{}),u=Object.keys(o).map(function(g){return[g,o[g]]}).filter(function(g){return g[1].length===1&&g[0]!==null&&g[0]!=="APL"}).map(function(g){return[g[0],g[1][0]]});o=void 0;var f=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(u).sort(i),S=0,b=1,v=function(c){for(var g=0;g<a.length;g++){var y=a[g](c).trim();if(y!==c&&t(y))return y}return null},C=function(c){for(var g=c.toUpperCase(),y=0;y<f.length;y++){var r=f[y];if(g.indexOf(r[S])>-1)return r[b]}return null},m=function(c,g){for(var y=0;y<s.length;y++){var r=s[y],p=r[n];if(c.indexOf(p)>-1){var d=c.replace(p,r[l]),P=g(d);if(P!==null)return P}}return null};j=function(c,g){g=g||{};var y=g.upgrade===void 0?!0:!!g.upgrade;function r(D){return y?L(D):D}var p=typeof c=="string"&&c.trim().length!==0;if(!p)throw Error("Invalid argument. Expected non-empty string.");if(c=c.trim(),t(c))return r(c);var d=c.replace(/\+$/,"").trim();if(t(d))return r(d);var P=v(c);return P!==null||(P=m(c,function(D){return t(D)?D:v(D)}),P!==null)||(P=C(c),P!==null)||(P=m(c,C),P!==null)?r(P):null};function L(c){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(c)!==-1?c+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(c)!==-1?c.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(c)!==-1?c+"-or-later":c}return j}var z,pe;function Ot(){if(pe)return z;pe=1;var h=xe(),e=Et(),t='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',i=/^SEE LICEN[CS]E IN (.+)$/;function s(l,a){return a.slice(0,l.length)===l}function n(l){if(l.hasOwnProperty("license")){var a=l.license;return s("LicenseRef",a)||s("DocumentRef",a)}else return n(l.left)||n(l.right)}return z=function(l){var a;try{a=h(l)}catch{var o;if(l==="UNLICENSED"||l==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(o=i.exec(l))return{validForOldPackages:!0,validForNewPackages:!0,inFile:o[1]};var u={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(l.trim().length!==0){var f=e(l);f&&u.warnings.push('license is similar to the valid expression "'+f+'"')}return u}return n(a)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},z}var Ee={hasSubscribers:!1},w=Ee,F=Ee;import("node:diagnostics_channel").then(h=>{w=h.channel("lru-cache:metrics"),F=h.tracingChannel("lru-cache")}).catch(()=>{});var Nt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Y=()=>w.hasSubscribers||F.hasSubscribers,Oe=new Set,fe=process||{},Ft=(h,e,t,i)=>{typeof fe.emitWarning=="function"?fe.emitWarning(h,e,t,i):console.error(`[${t}] ${e}: ${h}`)},Gt=h=>!Oe.has(h),N=h=>!!h&&h===Math.floor(h)&&h>0&&isFinite(h),Ne=h=>N(h)?h<=Math.pow(2,8)?Uint8Array:h<=Math.pow(2,16)?Uint16Array:h<=Math.pow(2,32)?Uint32Array:h<=Number.MAX_SAFE_INTEGER?B:null:null,B=class extends Array{constructor(e){super(e),this.fill(0)}},$t=class T{heap;length;static#n=!1;static create(e){let t=Ne(e);if(!t)return[];T.#n=!0;let i=new T(e,t);return T.#n=!1,i}constructor(e,t){if(!T.#n)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Tt=class Fe{#n;#c;#t;#O;#L;#B;#R;#S;get perf(){return this.#S}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#o;#v;#s;#r;#e;#u;#f;#h;#l;#C;#a;#P;#y;#d;#m;#b;#I;#p;#N;static unsafeExposeInternals(e){return{starts:e.#y,ttls:e.#d,autopurgeTimers:e.#m,sizes:e.#P,keyMap:e.#s,keyList:e.#r,valList:e.#e,next:e.#u,prev:e.#f,get head(){return e.#h},get tail(){return e.#l},free:e.#C,isBackgroundFetch:t=>e.#i(t),backgroundFetch:(t,i,s,n)=>e.#k(t,i,s,n),moveToTail:t=>e.#T(t),indexes:t=>e.#D(t),rindexes:t=>e.#w(t),isStale:t=>e.#g(t)}}get max(){return this.#n}get maxSize(){return this.#c}get calculatedSize(){return this.#v}get size(){return this.#o}get fetchMethod(){return this.#B}get memoMethod(){return this.#R}get dispose(){return this.#t}get onInsert(){return this.#O}get disposeAfter(){return this.#L}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:l,updateAgeOnHas:a,allowStale:o,dispose:u,onInsert:f,disposeAfter:S,noDisposeOnSet:b,noUpdateTTL:v,maxSize:C=0,maxEntrySize:m=0,sizeCalculation:L,fetchMethod:c,memoMethod:g,noDeleteOnFetchRejection:y,noDeleteOnStaleGet:r,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:d,ignoreFetchAbort:P,backgroundFetchSize:D=1,perf:A}=e;if(this.backgroundFetchSize=D,A!==void 0&&typeof A?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#S=A??Nt,t!==0&&!N(t))throw new TypeError("max option must be a nonnegative integer");let x=t?Ne(t):Array;if(!x)throw new Error("invalid max value: "+t);if(this.#n=t,this.#c=C,this.maxEntrySize=m||this.#c,this.sizeCalculation=L,this.sizeCalculation){if(!this.#c&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=g,c!==void 0&&typeof c!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#B=c,this.#I=!!c,this.#s=new Map,this.#r=Array.from({length:t}).fill(void 0),this.#e=Array.from({length:t}).fill(void 0),this.#u=new x(t),this.#f=new x(t),this.#h=0,this.#l=0,this.#C=$t.create(t),this.#o=0,this.#v=0,typeof u=="function"&&(this.#t=u),typeof f=="function"&&(this.#O=f),typeof S=="function"?(this.#L=S,this.#a=[]):(this.#L=void 0,this.#a=void 0),this.#b=!!this.#t,this.#N=!!this.#O,this.#p=!!this.#L,this.noDisposeOnSet=!!b,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!y,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!d,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(this.#c!==0&&!N(this.#c))throw new TypeError("maxSize must be a positive integer if specified");if(!N(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#V()}if(this.allowStale=!!o,this.noDeleteOnStaleGet=!!r,this.updateAgeOnGet=!!l,this.updateAgeOnHas=!!a,this.ttlResolution=N(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!N(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#_()}if(this.#n===0&&this.ttl===0&&this.#c===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#n&&!this.#c){let I="LRU_CACHE_UNBOUNDED";Gt(I)&&(Oe.add(I),Ft("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,Fe))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#_(){let e=new B(this.#n),t=new B(this.#n);this.#d=e,this.#y=t;let i=this.ttlAutopurge?Array.from({length:this.#n}):void 0;this.#m=i,this.#W=(o,u,f=this.#S.now())=>{t[o]=u!==0?f:0,e[o]=u,s(o,u)},this.#F=o=>{t[o]=e[o]!==0?this.#S.now():0,s(o,e[o])};let s=this.ttlAutopurge?(o,u)=>{if(i?.[o]&&(clearTimeout(i[o]),i[o]=void 0),u&&u!==0&&i){let f=setTimeout(()=>{this.#g(o)?(this.#A(this.#r[o],"expire"),i[o]=void 0):s(o,a(o))},u+1);f.unref&&f.unref(),i[o]=f}}:()=>{};this.#x=(o,u)=>{if(e[u]){let f=e[u],S=t[u];if(!f||!S)return;o.ttl=f,o.start=S,o.now=n||l();let b=o.now-S;o.remainingTTL=f-b}};let n=0,l=()=>{let o=this.#S.now();if(this.ttlResolution>0){n=o;let u=setTimeout(()=>n=0,this.ttlResolution);u.unref&&u.unref()}return o};this.getRemainingTTL=o=>{let u=this.#s.get(o);return u===void 0?0:a(u)};let a=o=>{let u=e[o],f=t[o];if(!u||!f)return 1/0;let S=(n||l())-f;return u-S};this.#g=o=>{let u=t[o],f=e[o];return!!f&&!!u&&(n||l())-u>f}}#F=()=>{};#x=()=>{};#W=()=>{};#g=()=>!1;#V(){let e=new B(this.#n);this.#v=0,this.#P=e,this.#G=t=>{this.#v-=e[t],e[t]=0},this.#H=(t,i,s,n)=>{if(!N(s)){if(this.#i(i))return this.backgroundFetchSize;if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!N(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return s},this.#U=(t,i,s)=>{if(e[t]=i,this.#c){let n=this.#c-e[t];for(;this.#v>n;)this.#M(!0)}this.#v+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#v)}}#G=e=>{};#U=(e,t,i)=>{};#H=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#D({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#l;this.#j(t)&&((e||!this.#g(t))&&(yield t),t!==this.#h);)t=this.#f[t]}*#w({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#j(t)&&((e||!this.#g(t))&&(yield t),t!==this.#l);)t=this.#u[t]}#j(e){return e!==void 0&&this.#s.get(this.#r[e])===e}*entries(){for(let e of this.#D())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*rentries(){for(let e of this.#w())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#i(this.#e[e])&&(yield[this.#r[e],this.#e[e]])}*keys(){for(let e of this.#D()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*rkeys(){for(let e of this.#w()){let t=this.#r[e];t!==void 0&&!this.#i(this.#e[e])&&(yield t)}}*values(){for(let e of this.#D())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#w())this.#e[e]!==void 0&&!this.#i(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#D()){let s=this.#e[i],n=this.#i(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#r[i],this))return this.#$(this.#r[i],t)}}forEach(e,t=this){for(let i of this.#D()){let s=this.#e[i],n=this.#i(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this)}}rforEach(e,t=this){for(let i of this.#w()){let s=this.#e[i],n=this.#i(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this)}}purgeStale(){let e=!1;for(let t of this.#w({allowStale:!0}))this.#g(t)&&(this.#A(this.#r[t],"expire"),e=!0);return e}info(e){let t=this.#s.get(e);if(t===void 0)return;let i=this.#e[t],s=this.#i(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#d&&this.#y){let l=this.#d[t],a=this.#y[t];if(l&&a){let o=l-(this.#S.now()-a);n.ttl=o,n.start=Date.now()}}return this.#P&&(n.size=this.#P[t]),n}dump(){let e=[];for(let t of this.#D({allowStale:!0})){let i=this.#r[t],s=this.#e[t],n=this.#i(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let l={value:n};if(this.#d&&this.#y){l.ttl=this.#d[t];let a=this.#S.now()-this.#y[t];l.start=Math.floor(Date.now()-a)}this.#P&&(l.size=this.#P[t]),e.unshift([i,l])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=this.#S.now()-s}this.#E(t,i.value,i)}}set(e,t,i={}){let{status:s=w.hasSubscribers?{}:void 0}=i;i.status=s,s&&(s.op="set",s.key=e,t!==void 0&&(s.value=t),s.cache=this);let n=this.#E(e,t,i);return s&&w.hasSubscribers&&w.publish(s),n}#E(e,t,i,s){let{ttl:n=this.ttl,start:l,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:u}=i,f=this.#i(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:S=this.noUpdateTTL}=i;u&&!f&&(u.value=t);let b=this.#H(e,t,i.size||0,o,u);if(this.maxEntrySize&&b>this.maxEntrySize)return this.#A(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let v=this.#o===0?void 0:this.#s.get(e);if(v===void 0)v=this.#o===0?this.#l:this.#C.length!==0?this.#C.pop():this.#o===this.#n?this.#M(!1):this.#o,this.#r[v]=e,this.#e[v]=t,this.#s.set(e,v),this.#u[this.#l]=v,this.#f[v]=this.#l,this.#l=v,this.#o++,this.#U(v,b,u),u&&(u.set="add"),S=!1,this.#N&&!f&&this.#O?.(t,e,"add");else{this.#T(v);let C=this.#e[v];if(t!==C){if(!a)if(this.#i(C)){C!==s&&C.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:m}=C;m!==void 0&&m!==t&&(this.#b&&this.#t?.(m,e,"set"),this.#p&&this.#a?.push([m,e,"set"]))}else this.#b&&this.#t?.(C,e,"set"),this.#p&&this.#a?.push([C,e,"set"]);if(this.#G(v),this.#U(v,b,u),this.#e[v]=t,!f){let m=C&&this.#i(C)?C.__staleWhileFetching:C,L=m===void 0?"add":t!==m?"replace":"update";u&&(u.set=L,m!==void 0&&(u.oldValue=m)),this.#N&&this.onInsert?.(t,e,L)}}else f||(u&&(u.set="update"),this.#N&&this.onInsert?.(t,e,"update"))}if(n!==0&&!this.#d&&this.#_(),this.#d&&(S||this.#W(v,n,l),u&&this.#x(u,v)),!a&&this.#p&&this.#a){let C=this.#a,m;for(;m=C?.shift();)this.#L?.(...m)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#h];if(this.#M(!0),this.#i(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#p&&this.#a){let e=this.#a,t;for(;t=e?.shift();)this.#L?.(...t)}}}#M(e){let t=this.#h,i=this.#r[t],s=this.#e[t],n=this.#i(s);n&&s.__abortController.abort(new Error("evicted"));let l=n?s.__staleWhileFetching:s;return(this.#b||this.#p)&&l!==void 0&&(this.#b&&this.#t?.(l,i,"evict"),this.#p&&this.#a?.push([l,i,"evict"])),this.#G(t),this.#m?.[t]&&(clearTimeout(this.#m[t]),this.#m[t]=void 0),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#C.push(t)),this.#o===1?(this.#h=this.#l=0,this.#C.length=0):this.#h=this.#u[t],this.#s.delete(i),this.#o--,t}has(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#K(e,t);return w.hasSubscribers&&w.publish(i),s}#K(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#s.get(e);if(n!==void 0){let l=this.#e[n];if(this.#i(l)&&l.__staleWhileFetching===void 0)return!1;if(this.#g(n))s&&(s.has="stale",this.#x(s,n));else return i&&this.#F(n),s&&(s.has="hit",this.#x(s,n)),!0}else s&&(s.has="miss");return!1}peek(e,t={}){let{status:i=Y()?{}:void 0}=t;i&&(i.op="peek",i.key=e,i.cache=this),t.status=i;let s=this.#X(e,t);return w.hasSubscribers&&w.publish(i),s}#X(e,t){let{status:i,allowStale:s=this.allowStale}=t,n=this.#s.get(e);if(n===void 0||!s&&this.#g(n)){i&&(i.peek=n===void 0?"miss":"stale");return}let l=this.#e[n],a=this.#i(l)?l.__staleWhileFetching:l;return i&&(a!==void 0?(i.peek="hit",i.value=a):i.peek="miss"),a}#k(e,t,i,s){let n=t===void 0?void 0:this.#e[t];if(this.#i(n))return n;let l=new AbortController,{signal:a}=i;a?.addEventListener("abort",()=>l.abort(a.reason),{signal:l.signal});let o={signal:l.signal,options:i,context:s},u=(m,L=!1)=>{let{aborted:c}=l.signal,g=i.ignoreFetchAbort&&m!==void 0,y=i.ignoreFetchAbort||!!(i.allowStaleOnFetchAbort&&m!==void 0);if(i.status&&(c&&!L?(i.status.fetchAborted=!0,i.status.fetchError=l.signal.reason,g&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),c&&!g&&!L)return S(l.signal.reason,y);let r=v,p=this.#e[t];return(p===v||p===void 0&&g&&L)&&(m===void 0?r.__staleWhileFetching!==void 0?this.#e[t]=r.__staleWhileFetching:this.#A(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#E(e,m,o.options,r))),m},f=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),S(m,!1)),S=(m,L)=>{let{aborted:c}=l.signal,g=c&&i.allowStaleOnFetchAbort,y=g||i.allowStaleOnFetchRejection,r=y||i.noDeleteOnFetchRejection,p=v;if(this.#e[t]===v&&(!r||!L&&p.__staleWhileFetching===void 0?this.#A(e,"fetch"):g||(this.#e[t]=p.__staleWhileFetching)),y)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw m},b=(m,L)=>{let c=this.#B?.(e,n,o);l.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=g=>u(g,!0)))}),c&&c instanceof Promise?c.then(g=>m(g===void 0?void 0:g),L):c!==void 0&&m(c)};i.status&&(i.status.fetchDispatched=!0);let v=new Promise(b).then(u,f),C=Object.assign(v,{__abortController:l,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.#E(e,C,{...o.options,status:void 0}),t=this.#s.get(e)):this.#e[t]=C,C}#i(e){if(!this.#I)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let i=F.hasSubscribers,{status:s=Y()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#z(e,t);return s&&i&&(s.trace=!0,F.tracePromise(()=>n,s).catch(()=>{})),n}async#z(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:o=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:S=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:b=this.allowStaleOnFetchRejection,ignoreFetchAbort:v=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:m,forceRefresh:L=!1,status:c,signal:g}=t;if(c&&(c.op="fetch",c.key=e,L&&(c.forceRefresh=!0),c.cache=this),!this.#I)return c&&(c.fetch="get"),this.#$(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:c});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:l,noDisposeOnSet:a,size:o,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:S,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:C,ignoreFetchAbort:v,status:c,signal:g},r=this.#s.get(e);if(r===void 0){c&&(c.fetch="miss");let p=this.#k(e,r,y,m);return p.__returned=p}else{let p=this.#e[r];if(this.#i(p)){let A=i&&p.__staleWhileFetching!==void 0;return c&&(c.fetch="inflight",A&&(c.returnedStale=!0)),A?p.__staleWhileFetching:p.__returned=p}let d=this.#g(r);if(!L&&!d)return c&&(c.fetch="hit"),this.#T(r),s&&this.#F(r),c&&this.#x(c,r),p;let P=this.#k(e,r,y,m),D=P.__staleWhileFetching!==void 0&&i;return c&&(c.fetch=d?"stale":"refresh",D&&d&&(c.returnedStale=!0)),D?P.__staleWhileFetching:P.__returned=P}}forceFetch(e,t={}){let i=F.hasSubscribers,{status:s=Y()?{}:void 0}=t;t.status=s,s&&t.context&&(s.context=t.context);let n=this.#J(e,t);return s&&i&&(s.trace=!0,F.tracePromise(()=>n,s).catch(()=>{})),n}async#J(e,t={}){let i=await this.#z(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="memo",i.key=e,t.context&&(i.context=t.context),i.cache=this);let s=this.#Z(e,t);return i&&(i.value=s),w.hasSubscribers&&w.publish(i),s}#Z(e,t={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,status:n,forceRefresh:l,...a}=t;n&&l&&(n.forceRefresh=!0);let o=this.#$(e,a),u=l||o===void 0;if(n&&(n.memo=u?"miss":"hit",u||(n.value=o)),!u)return o;let f=i(e,o,{options:a,context:s});return n&&(n.value=f),this.#E(e,f,a),f}get(e,t={}){let{status:i=w.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="get",i.key=e,i.cache=this);let s=this.#$(e,t);return i&&(s!==void 0&&(i.value=s),w.hasSubscribers&&w.publish(i)),s}#$(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:l}=t,a=this.#s.get(e);if(a===void 0){l&&(l.get="miss");return}let o=this.#e[a],u=this.#i(o);return l&&this.#x(l,a),this.#g(a)?u?(l&&(l.get="stale-fetching"),i&&o.__staleWhileFetching!==void 0?(l&&(l.returnedStale=!0),o.__staleWhileFetching):void 0):(n||this.#A(e,"expire"),l&&(l.get="stale"),i?(l&&(l.returnedStale=!0),o):void 0):(l&&(l.get=u?"fetching":"hit"),this.#T(a),s&&this.#F(a),u?o.__staleWhileFetching:o)}#Y(e,t){this.#f[t]=e,this.#u[e]=t}#T(e){e!==this.#l&&(e===this.#h?this.#h=this.#u[e]:this.#Y(this.#f[e],this.#u[e]),this.#Y(this.#l,e),this.#l=e)}delete(e){return this.#A(e,"delete")}#A(e,t){w.hasSubscribers&&w.publish({op:"delete",delete:t,key:e,cache:this});let i=!1;if(this.#o!==0){let s=this.#s.get(e);if(s!==void 0)if(this.#m?.[s]&&(clearTimeout(this.#m[s]),this.#m[s]=void 0),i=!0,this.#o===1)this.#q(t);else{this.#G(s);let n=this.#e[s];if(this.#i(n)?n.__abortController.abort(new Error("deleted")):(this.#b||this.#p)&&(this.#b&&this.#t?.(n,e,t),this.#p&&this.#a?.push([n,e,t])),this.#s.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#l)this.#l=this.#f[s];else if(s===this.#h)this.#h=this.#u[s];else{let l=this.#f[s];this.#u[l]=this.#u[s];let a=this.#u[s];this.#f[a]=this.#f[s]}this.#o--,this.#C.push(s)}}if(this.#p&&this.#a?.length){let s=this.#a,n;for(;n=s?.shift();)this.#L?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#w({allowStale:!0})){let i=this.#e[t];if(this.#i(i))i.__abortController.abort(new Error("deleted"));else{let s=this.#r[t];this.#b&&this.#t?.(i,s,e),this.#p&&this.#a?.push([i,s,e])}}if(this.#s.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#d&&this.#y){this.#d.fill(0),this.#y.fill(0);for(let t of this.#m??[])t!==void 0&&clearTimeout(t);this.#m?.fill(void 0)}if(this.#P&&this.#P.fill(0),this.#h=0,this.#l=0,this.#C.length=0,this.#v=0,this.#o=0,this.#p&&this.#a){let t=this.#a,i;for(;i=t?.shift();)this.#L?.(...i)}}};const Bt=Object.defineProperty({__proto__:null,LRUCache:Tt},Symbol.toStringTag,{value:"Module"}),Rt=re(Bt);var q,de;function It(){if(de)return q;de=1;const h=(...n)=>n.every(l=>l)?n.join(""):"",e=n=>n?encodeURIComponent(n):"",t=n=>n.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),i={sshtemplate:({domain:n,user:l,project:a,committish:o})=>`git@${n}:${l}/${a}.git${h("#",o)}`,sshurltemplate:({domain:n,user:l,project:a,committish:o})=>`git+ssh://git@${n}/${l}/${a}.git${h("#",o)}`,edittemplate:({domain:n,user:l,project:a,committish:o,editpath:u,path:f})=>`https://${n}/${l}/${a}${h("/",u,"/",e(o||"HEAD"),"/",f)}`,browsetemplate:({domain:n,user:l,project:a,committish:o,treepath:u})=>`https://${n}/${l}/${a}${h("/",u,"/",e(o))}`,browsetreetemplate:({domain:n,user:l,project:a,committish:o,treepath:u,path:f,fragment:S,hashformat:b})=>`https://${n}/${l}/${a}/${u}/${e(o||"HEAD")}/${f}${h("#",b(S||""))}`,browseblobtemplate:({domain:n,user:l,project:a,committish:o,blobpath:u,path:f,fragment:S,hashformat:b})=>`https://${n}/${l}/${a}/${u}/${e(o||"HEAD")}/${f}${h("#",b(S||""))}`,docstemplate:({domain:n,user:l,project:a,treepath:o,committish:u})=>`https://${n}/${l}/${a}${h("/",o,"/",e(u))}#readme`,httpstemplate:({auth:n,domain:l,user:a,project:o,committish:u})=>`git+https://${h(n,"@")}${l}/${a}/${o}.git${h("#",u)}`,filetemplate:({domain:n,user:l,project:a,committish:o,path:u})=>`https://${n}/${l}/${a}/raw/${e(o||"HEAD")}/${u}`,shortcuttemplate:({type:n,user:l,project:a,committish:o})=>`${n}:${l}/${a}${h("#",o)}`,pathtemplate:({user:n,project:l,committish:a})=>`${n}/${l}${h("#",a)}`,bugstemplate:({domain:n,user:l,project:a})=>`https://${n}/${l}/${a}/issues`,hashformat:t},s={};s.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:n,user:l,project:a,committish:o,path:u})=>`https://${h(n,"@")}raw.githubusercontent.com/${l}/${a}/${e(o||"HEAD")}/${u}`,gittemplate:({auth:n,domain:l,user:a,project:o,committish:u})=>`git://${h(n,"@")}${l}/${a}/${o}.git${h("#",u)}`,tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://codeload.${n}/${l}/${a}/tar.gz/${e(o||"HEAD")}`,extract:n=>{let[,l,a,o,u]=n.pathname.split("/",5);if(!(o&&o!=="tree")&&(o||(u=n.hash.slice(1)),a&&a.endsWith(".git")&&(a=a.slice(0,-4)),!(!l||!a)))return{user:l,project:a,committish:u}}},s.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:n,user:l,project:a,committish:o,treepath:u,path:f,editpath:S})=>`https://${n}/${l}/${a}${h("/",u,"/",e(o||"HEAD"),"/",f,S)}`,tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/${l}/${a}/get/${e(o||"HEAD")}.tar.gz`,extract:n=>{let[,l,a,o]=n.pathname.split("/",4);if(!["get"].includes(o)&&(a&&a.endsWith(".git")&&(a=a.slice(0,-4)),!(!l||!a)))return{user:l,project:a,committish:n.hash.slice(1)}}},s.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/api/v4/projects/${e(l+"/"+a)}/repository/archive.tar.gz?sha=${e(o||"HEAD")}`,extract:n=>{const l=n.pathname.slice(1);if(l.includes("/-/")||l.includes("/archive.tar.gz"))return;const a=l.split("/");let o=a.pop();o.endsWith(".git")&&(o=o.slice(0,-4));const u=a.join("/");if(!(!u||!o))return{user:u,project:o,committish:n.hash.slice(1)}}},s.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:n,project:l,committish:a})=>`git@${n}:${l}.git${h("#",a)}`,sshurltemplate:({domain:n,project:l,committish:a})=>`git+ssh://git@${n}/${l}.git${h("#",a)}`,edittemplate:({domain:n,user:l,project:a,committish:o,editpath:u})=>`https://${n}/${l}/${a}${h("/",e(o))}/${u}`,browsetemplate:({domain:n,project:l,committish:a})=>`https://${n}/${l}${h("/",e(a))}`,browsetreetemplate:({domain:n,project:l,committish:a,path:o,hashformat:u})=>`https://${n}/${l}${h("/",e(a))}${h("#",u(o))}`,browseblobtemplate:({domain:n,project:l,committish:a,path:o,hashformat:u})=>`https://${n}/${l}${h("/",e(a))}${h("#",u(o))}`,docstemplate:({domain:n,project:l,committish:a})=>`https://${n}/${l}${h("/",e(a))}`,httpstemplate:({domain:n,project:l,committish:a})=>`git+https://${n}/${l}.git${h("#",a)}`,filetemplate:({user:n,project:l,committish:a,path:o})=>`https://gist.githubusercontent.com/${n}/${l}/raw${h("/",e(a))}/${o}`,shortcuttemplate:({type:n,project:l,committish:a})=>`${n}:${l}${h("#",a)}`,pathtemplate:({project:n,committish:l})=>`${n}${h("#",l)}`,bugstemplate:({domain:n,project:l})=>`https://${n}/${l}`,gittemplate:({domain:n,project:l,committish:a})=>`git://${n}/${l}.git${h("#",a)}`,tarballtemplate:({project:n,committish:l})=>`https://codeload.github.com/gist/${n}/tar.gz/${e(l||"HEAD")}`,extract:n=>{let[,l,a,o]=n.pathname.split("/",4);if(o!=="raw"){if(!a){if(!l)return;a=l,l=null}return a.endsWith(".git")&&(a=a.slice(0,-4)),{user:l,project:a,committish:n.hash.slice(1)}}},hashformat:function(n){return n&&"file-"+t(n)}},s.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:n,user:l,project:a,committish:o,path:u})=>`https://${n}/${l}/${a}/blob/${e(o)||"HEAD"}/${u}`,httpstemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/${l}/${a}${h("#",o)}`,tarballtemplate:({domain:n,user:l,project:a,committish:o})=>`https://${n}/${l}/${a}/archive/${e(o)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:n=>{let[,l,a,o]=n.pathname.split("/",4);if(!["archive"].includes(o)&&(a&&a.endsWith(".git")&&(a=a.slice(0,-4)),!(!l||!a)))return{user:l,project:a,committish:n.hash.slice(1)}}};for(const[n,l]of Object.entries(s))s[n]=Object.assign({},i,l);return q=s,q}var V,me;function Ge(){if(me)return V;me=1;const h=(s,n,l)=>{const a=s.indexOf(l);return s.lastIndexOf(n,a>-1?a:1/0)},e=s=>{try{return new URL(s)}catch{}},t=(s,n)=>{const l=s.indexOf(":"),a=s.slice(0,l+1);if(Object.prototype.hasOwnProperty.call(n,a)||s.substr(l,3)==="://")return s;const o=s.indexOf("@");return o>-1?o>l?`git+ssh://${s}`:s:`${s.slice(0,l+1)}//${s.slice(l+1)}`},i=s=>{const n=h(s,"@","#"),l=h(s,":","#");return l>n&&(s=s.slice(0,l)+"/"+s.slice(l+1)),h(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s};return V=(s,n)=>{const l=n?t(s,n):s;return e(l)||e(i(l))},V}var K,ge;function Ut(){if(ge)return K;ge=1;const h=Ge(),e=t=>{const i=t.indexOf("#"),s=t.indexOf("/"),n=t.indexOf("/",s+1),l=t.indexOf(":"),a=/\s/.exec(t),o=t.indexOf("@"),u=!a||i>-1&&a.index>i,f=o===-1||i>-1&&o>i,S=l===-1||i>-1&&l>i,b=n===-1||i>-1&&n>i,v=s>0,C=i>-1?t[i-1]!=="/":!t.endsWith("/"),m=!t.startsWith(".");return u&&v&&C&&m&&f&&S&&b};return K=(t,i,{gitHosts:s,protocols:n})=>{if(!t)return;const l=e(t)?`github:${t}`:t,a=h(l,n);if(!a)return;const o=s.byShortcut[a.protocol],u=s.byDomain[a.hostname.startsWith("www.")?a.hostname.slice(4):a.hostname],f=o||u;if(!f)return;const S=s[o||u];let b=null;n[a.protocol]?.auth&&(a.username||a.password)&&(b=`${a.username}${a.password?":"+a.password:""}`);let v=null,C=null,m=null,L=null;try{if(o){let c=a.pathname.startsWith("/")?a.pathname.slice(1):a.pathname;const g=c.indexOf("@");g>-1&&(c=c.slice(g+1));const y=c.lastIndexOf("/");y>-1?(C=decodeURIComponent(c.slice(0,y)),C||(C=null),m=decodeURIComponent(c.slice(y+1))):m=decodeURIComponent(c),m.endsWith(".git")&&(m=m.slice(0,-4)),a.hash&&(v=decodeURIComponent(a.hash.slice(1))),L="shortcut"}else{if(!S.protocols.includes(a.protocol))return;const c=S.extract(a);if(!c)return;C=c.user&&decodeURIComponent(c.user),m=decodeURIComponent(c.project),v=decodeURIComponent(c.committish),L=n[a.protocol]?.name||a.protocol.slice(0,-1)}}catch(c){if(c instanceof URIError)return;throw c}return[f,C,b,m,v,L,i]},K}var X,Le;function Mt(){if(Le)return X;Le=1;const{LRUCache:h}=Rt,e=It(),t=Ut(),i=Ge(),s=new h({max:1e3});function n(a){try{const{protocol:o,hostname:u,pathname:f}=new URL(a);if(!u)return null;const S=/(?:git\+)http:$/.test(o)?"http:":"https:",b=f.replace(/\.git$/,"");return`${S}//${u}${b}`}catch{return null}}class l{constructor(o,u,f,S,b,v,C={}){Object.assign(this,l.#n[o],{type:o,user:u,auth:f,project:S,committish:b,default:v,opts:C})}static#n={byShortcut:{},byDomain:{}};static#c={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(o,u){l.#n[o]=u,l.#n.byDomain[u.domain]=o,l.#n.byShortcut[`${o}:`]=o,l.#c[`${o}:`]={name:o}}static fromUrl(o,u){if(typeof o!="string")return;const f=o+JSON.stringify(u||{});if(!s.has(f)){const S=t(o,u,{gitHosts:l.#n,protocols:l.#c});s.set(f,S?new l(...S):void 0)}return s.get(f)}static fromManifest(o,u={}){if(!o||typeof o!="object")return;const f=o.repository,S=f&&(typeof f=="string"?f:typeof f=="object"&&typeof f.url=="string"?f.url:null);if(!S)throw new Error("no repository");const b=S&&l.fromUrl(S.replace(/^git\+/,""),u)||null;if(b)return b;const v=n(S);return l.fromUrl(v,u)||v}static parseUrl(o){return i(o)}#t(o,u){if(typeof o!="function")return null;const f={...this,...this.opts,...u};f.path||(f.path=""),f.path.startsWith("/")&&(f.path=f.path.slice(1)),f.noCommittish&&(f.committish=null);const S=o(f);return f.noGitPlus&&S.startsWith("git+")?S.slice(4):S}hash(){return this.committish?`#${this.committish}`:""}ssh(o){return this.#t(this.sshtemplate,o)}sshurl(o){return this.#t(this.sshurltemplate,o)}browse(o,...u){return typeof o!="string"?this.#t(this.browsetemplate,o):typeof u[0]!="string"?this.#t(this.browsetreetemplate,{...u[0],path:o}):this.#t(this.browsetreetemplate,{...u[1],fragment:u[0],path:o})}browseFile(o,...u){return typeof u[0]!="string"?this.#t(this.browseblobtemplate,{...u[0],path:o}):this.#t(this.browseblobtemplate,{...u[1],fragment:u[0],path:o})}docs(o){return this.#t(this.docstemplate,o)}bugs(o){return this.#t(this.bugstemplate,o)}https(o){return this.#t(this.httpstemplate,o)}git(o){return this.#t(this.gittemplate,o)}shortcut(o){return this.#t(this.shortcuttemplate,o)}path(o){return this.#t(this.pathtemplate,o)}tarball(o){return this.#t(this.tarballtemplate,{...o,noCommittish:!1})}file(o,u){return this.#t(this.filetemplate,{...u,path:o})}edit(o,u){return this.#t(this.edittemplate,{...u,path:o})}getDefaultRepresentation(){return this.default}toString(o){return this.default&&typeof this[this.default]=="function"?this[this.default](o):this.sshurl(o)}}for(const[a,o]of Object.entries(e))l.addHost(a,o);return X=l,X}var J,Se;function kt(){if(Se)return J;Se=1,J=h;function h(e){if(!e||e==="ERROR: No README data found!")return;e=e.trim().split(`
2
- `);let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;const i=e.length;let s=t+1;for(;s<i&&e[s].trim();)s++;return e.slice(t,s).join(" ").trim()}return J}var $e={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},Te={web:"url",name:"url"},Be={server:"start",tests:"test"};const _t={topLevel:$e,bugs:Te,script:Be},Wt=Object.defineProperty({__proto__:null,bugs:Te,default:_t,script:Be,topLevel:$e},Symbol.toStringTag,{value:"Module"}),Ht=re(Wt);var Z,ve;function jt(){if(ve)return Z;ve=1;var{URL:h}=ye,e=Ct(),t=Pt(),i=Ot(),s=Mt(),{isBuiltin:n}=be,l=["dependencies","devDependencies","optionalDependencies"],a=kt(),o=Ht,u=r=>r.includes("@")&&r.indexOf("@")<r.lastIndexOf(".");Z={warn:function(){},fixRepositoryField:function(r){if(r.repositories&&(this.warn("repositories"),r.repository=r.repositories[0]),!r.repository)return this.warn("missingRepository");typeof r.repository=="string"&&(r.repository={type:"git",url:r.repository});var p=r.repository.url||"";if(p){var d=s.fromUrl(p);d&&(p=r.repository.url=d.getDefaultRepresentation()==="shortcut"?d.https():d.toString())}p.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",p)},fixTypos:function(r){Object.keys(o.topLevel).forEach(function(p){Object.prototype.hasOwnProperty.call(r,p)&&this.warn("typo",p,o.topLevel[p])},this)},fixScriptsField:function(r){if(r.scripts){if(typeof r.scripts!="object"){this.warn("nonObjectScripts"),delete r.scripts;return}Object.keys(r.scripts).forEach(function(p){typeof r.scripts[p]!="string"?(this.warn("nonStringScript"),delete r.scripts[p]):o.script[p]&&!r.scripts[o.script[p]]&&this.warn("typo",p,o.script[p],"scripts")},this)}},fixFilesField:function(r){var p=r.files;p&&!Array.isArray(p)?(this.warn("nonArrayFiles"),delete r.files):r.files&&(r.files=r.files.filter(function(d){return!d||typeof d!="string"?(this.warn("invalidFilename",d),!1):!0},this))},fixBinField:function(r){if(r.bin&&typeof r.bin=="string"){var p={},d;(d=r.name.match(/^@[^/]+[/](.*)$/))?p[d[1]]=r.bin:p[r.name]=r.bin,r.bin=p}},fixManField:function(r){r.man&&typeof r.man=="string"&&(r.man=[r.man])},fixBundleDependenciesField:function(r){var p="bundledDependencies",d="bundleDependencies";r[p]&&!r[d]&&(r[d]=r[p],delete r[p]),r[d]&&!Array.isArray(r[d])?(this.warn("nonArrayBundleDependencies"),delete r[d]):r[d]&&(r[d]=r[d].filter(function(P){return!P||typeof P!="string"?(this.warn("nonStringBundleDependency",P),!1):(r.dependencies||(r.dependencies={}),Object.prototype.hasOwnProperty.call(r.dependencies,P)||(this.warn("nonDependencyBundleDependency",P),r.dependencies[P]="*"),!0)},this))},fixDependencies:function(r){g(r,this.warn),L(r,this.warn),this.fixBundleDependenciesField(r),["dependencies","devDependencies"].forEach(function(p){if(p in r){if(!r[p]||typeof r[p]!="object"){this.warn("nonObjectDependencies",p),delete r[p];return}Object.keys(r[p]).forEach(function(d){var P=r[p][d];typeof P!="string"&&(this.warn("nonStringDependency",d,JSON.stringify(P)),delete r[p][d]);var D=s.fromUrl(r[p][d]);D&&(r[p][d]=D.toString())},this)}},this)},fixModulesField:function(r){r.modules&&(this.warn("deprecatedModules"),delete r.modules)},fixKeywordsField:function(r){typeof r.keywords=="string"&&(r.keywords=r.keywords.split(/,\s+/)),r.keywords&&!Array.isArray(r.keywords)?(delete r.keywords,this.warn("nonArrayKeywords")):r.keywords&&(r.keywords=r.keywords.filter(function(p){return typeof p!="string"||!p?(this.warn("nonStringKeyword"),!1):!0},this))},fixVersionField:function(r,p){var d=!p;if(!r.version)return r.version="",!0;if(!e(r.version,d))throw new Error('Invalid version: "'+r.version+'"');return r.version=t(r.version,d),!0},fixPeople:function(r){v(r,C),v(r,m)},fixNameField:function(r,p){typeof p=="boolean"?p={strict:p}:typeof p>"u"&&(p={});var d=p.strict;if(!r.name&&!d){r.name="";return}if(typeof r.name!="string")throw new Error("name field must be a string.");d||(r.name=r.name.trim()),b(r.name,d,p.allowLegacyCase),n(r.name)&&this.warn("conflictingName",r.name)},fixDescriptionField:function(r){r.description&&typeof r.description!="string"&&(this.warn("nonStringDescription"),delete r.description),r.readme&&!r.description&&(r.description=a(r.readme)),r.description===void 0&&delete r.description,r.description||this.warn("missingDescription")},fixReadmeField:function(r){r.readme||(this.warn("missingReadme"),r.readme="ERROR: No README data found!")},fixBugsField:function(r){if(!r.bugs&&r.repository&&r.repository.url){var p=s.fromUrl(r.repository.url);p&&p.bugs()&&(r.bugs={url:p.bugs()})}else if(r.bugs){if(typeof r.bugs=="string")u(r.bugs)?r.bugs={email:r.bugs}:h.canParse(r.bugs)?r.bugs={url:r.bugs}:this.warn("nonEmailUrlBugsString");else{y(r.bugs,this.warn);var d=r.bugs;r.bugs={},d.url&&(h.canParse(d.url)?r.bugs.url=d.url:this.warn("nonUrlBugsUrlField")),d.email&&(typeof d.email=="string"&&u(d.email)?r.bugs.email=d.email:this.warn("nonEmailBugsEmailField"))}!r.bugs.email&&!r.bugs.url&&(delete r.bugs,this.warn("emptyNormalizedBugs"))}},fixHomepageField:function(r){if(!r.homepage&&r.repository&&r.repository.url){var p=s.fromUrl(r.repository.url);p&&p.docs()&&(r.homepage=p.docs())}if(r.homepage){if(typeof r.homepage!="string")return this.warn("nonUrlHomepage"),delete r.homepage;h.canParse(r.homepage)||(r.homepage="http://"+r.homepage)}},fixLicenseField:function(r){const p=r.license||r.licence;if(!p)return this.warn("missingLicense");if(typeof p!="string"||p.length<1||p.trim()==="")return this.warn("invalidLicense");if(!i(p).validForNewPackages)return this.warn("invalidLicense")}};function f(r){if(r.charAt(0)!=="@")return!1;var p=r.slice(1).split("/");return p.length!==2?!1:p[0]&&p[1]&&p[0]===encodeURIComponent(p[0])&&p[1]===encodeURIComponent(p[1])}function S(r){return!r.match(/[/@\s+%:]/)&&r===encodeURIComponent(r)}function b(r,p,d){if(r.charAt(0)==="."||!(f(r)||S(r))||p&&!d&&r!==r.toLowerCase()||r.toLowerCase()==="node_modules"||r.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(r))}function v(r,p){return r.author&&(r.author=p(r.author)),["maintainers","contributors"].forEach(function(d){Array.isArray(r[d])&&(r[d]=r[d].map(p))}),r}function C(r){if(typeof r=="string")return r;var p=r.name||"",d=r.url||r.web,P=d?" ("+d+")":"",D=r.email||r.mail,A=D?" <"+D+">":"";return p+A+P}function m(r){if(typeof r!="string")return r;var p=r.match(/^([^(<]+)/),d=r.match(/\(([^()]+)\)/),P=r.match(/<([^<>]+)>/),D={};return p&&p[0].trim()&&(D.name=p[0].trim()),P&&(D.email=P[1]),d&&(D.url=d[1]),D}function L(r){var p=r.optionalDependencies;if(p){var d=r.dependencies||{};Object.keys(p).forEach(function(P){d[P]=p[P]}),r.dependencies=d}}function c(r,p,d){if(!r)return{};if(typeof r=="string"&&(r=r.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(r))return r;d("deprecatedArrayDependencies",p);var P={};return r.filter(function(D){return typeof D=="string"}).forEach(function(D){D=D.trim().split(/(:?[@\s><=])/);var A=D.shift(),x=D.join("");x=x.trim(),x=x.replace(/^@/,""),P[A]=x}),P}function g(r,p){l.forEach(function(d){r[d]&&(r[d]=c(r[d],d,p))})}function y(r,p){r&&Object.keys(r).forEach(function(d){o.bugs[d]&&(p("typo",d,o.bugs[d],"bugs"),r[o.bugs[d]]=r[d],delete r[d])})}return Z}var Re="'repositories' (plural) Not supported. Please pick one as the 'repository' field",Ie="No repository field.",Ue="Probably broken git url: %s",Me="scripts must be an object",ke="script values must be string commands",_e="Invalid 'files' member",We="Invalid filename in 'files' list: %s",He="Invalid 'bundleDependencies' list. Must be array of package names",je="Invalid bundleDependencies member: %s",ze="Non-dependency in bundleDependencies: %s",Ye="%s field must be an object",qe="Invalid dependency: %s %s",Ve="specifying %s as array is deprecated",Ke="modules field is deprecated",Xe="keywords should be an array of strings",Je="keywords should be an array of strings",Ze="%s is also the name of a node core module.",Qe="'description' field should be a string",et="No description",tt="No README data",it="No license field.",rt="Bug string field must be url, email, or {email,url}",nt="bugs.url field must be a string url. Deleted.",st="bugs.email field must be a string email. Deleted.",ot="Normalized value of bugs field is an empty object. Deleted.",lt="homepage field must be a string url. Deleted.",at="license should be a valid SPDX license expression",ct="%s should probably be %s.";const zt={repositories:Re,missingRepository:Ie,brokenGitUrl:Ue,nonObjectScripts:Me,nonStringScript:ke,nonArrayFiles:_e,invalidFilename:We,nonArrayBundleDependencies:He,nonStringBundleDependency:je,nonDependencyBundleDependency:ze,nonObjectDependencies:Ye,nonStringDependency:qe,deprecatedArrayDependencies:Ve,deprecatedModules:Ke,nonArrayKeywords:Xe,nonStringKeyword:Je,conflictingName:Ze,nonStringDescription:Qe,missingDescription:et,missingReadme:tt,missingLicense:it,nonEmailUrlBugsString:rt,nonUrlBugsUrlField:nt,nonEmailBugsEmailField:st,emptyNormalizedBugs:ot,nonUrlHomepage:lt,invalidLicense:at,typo:ct},Yt=Object.defineProperty({__proto__:null,brokenGitUrl:Ue,conflictingName:Ze,default:zt,deprecatedArrayDependencies:Ve,deprecatedModules:Ke,emptyNormalizedBugs:ot,invalidFilename:We,invalidLicense:at,missingDescription:et,missingLicense:it,missingReadme:tt,missingRepository:Ie,nonArrayBundleDependencies:He,nonArrayFiles:_e,nonArrayKeywords:Xe,nonDependencyBundleDependency:ze,nonEmailBugsEmailField:st,nonEmailUrlBugsString:rt,nonObjectDependencies:Ye,nonObjectScripts:Me,nonStringBundleDependency:je,nonStringDependency:qe,nonStringDescription:Qe,nonStringKeyword:Je,nonStringScript:ke,nonUrlBugsUrlField:nt,nonUrlHomepage:lt,repositories:Re,typo:ct},Symbol.toStringTag,{value:"Module"}),qt=re(Yt);var Q,Ce;function Vt(){if(Ce)return Q;Ce=1;var h=yt,e=qt;Q=function(){var i=Array.prototype.slice.call(arguments,0),s=i.shift();if(s==="typo")return t.apply(null,i);var n=e[s]?e[s]:s+": '%s'";return i.unshift(n),h.format.apply(null,i)};function t(i,s,n){return n&&(i=n+"['"+i+"']",s=n+"['"+s+"']"),h.format(e.typo,i,s)}return Q}var ee,Pe;function Kt(){if(Pe)return ee;Pe=1,ee=n;var h=jt();n.fixer=h;var e=Vt(),t=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"],i=["dependencies","people","typos"],s=t.map(function(a){return l(a)+"Field"});s=s.concat(i);function n(a,o,u){o===!0&&(o=null,u=!0),u||(u=!1),(!o||a.private)&&(o=function(){}),a.scripts&&a.scripts.install==="node-gyp rebuild"&&!a.scripts.preinstall&&(a.gypfile=!0),h.warn=function(){o(e.apply(null,arguments))},s.forEach(function(f){h["fix"+l(f)](a,u)}),a._id=a.name+"@"+a.version}function l(a){return a.charAt(0).toUpperCase()+a.slice(1)}return ee}var Xt=Kt();const Jt=vt(Xt),Zt=(h,e,t)=>{const i=te(h),s=te(e),n=s===i?".":gt(i,s);return t.some(l=>{const a=l.startsWith("./")?l.slice(2):l,o=n.startsWith("./")?n.slice(2):n;if(a==="."&&o===".")return!0;if(a.endsWith("/**")){const u=a.slice(0,-3);return o===u||o.startsWith(`${u}/`)}if(a.endsWith("/*")){const u=a.slice(0,-2);return u===""?o!=="."&&!o.includes("/"):o.startsWith(`${u}/`)||o===u}return o===a||o.startsWith(`${a}/`)})},Qt=h=>{const e=De("pnpm-workspace.yaml",{cwd:te(h),type:"file"});if(!e)return;const t=we(ie(e)),i=Array.isArray(t.packages)?t.packages:[];if(!Zt(e,h,i))return;const s={};return t.catalog&&typeof t.catalog=="object"&&(s.catalog=t.catalog),t.catalogs&&typeof t.catalogs=="object"&&(s.catalogs=t.catalogs),Object.keys(s).length>0?s:void 0},ei=(h,e,t)=>{if(e==="catalog:")return t.catalog?.[h];if(e.startsWith("catalog:")){const i=e.slice(8);return t.catalogs?.[i]?.[h]}},ti=(h,e)=>{for(const[t,i]of Object.entries(h)){if(typeof i!="string")continue;const s=ei(t,i,e);s&&(h[t]=s)}},ii=(h,e)=>{const t=["dependencies","devDependencies","peerDependencies","optionalDependencies"];for(const i of t){if(!h[i]||typeof h[i]!="object")continue;const s=h[i];ti(s,e)}};let ri;const ni=h=>(ri??=mt(import.meta.url))(h),$=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ne=h=>{if(typeof $<"u"&&$.versions&&$.versions.node){const[e,t]=$.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return $.getBuiltinModule(h)}return ni(h)},{existsSync:Bi}=ne("node:fs"),{createInterface:Ri}=ne("node:readline"),{styleText:Ii}=ne("node:util"),si=new Set(["__proto__","prototype","constructor"]);Math.max(...[...si].map(h=>h.length));typeof process.stdout<"u"&&!process.versions.deno&&globalThis.window;const oi=/, ([^,]*)$/,li=new Map,ai=(h,e={})=>{const t=e.strict&&e.ignoreWarnings?e.ignoreWarnings.map(String).toSorted((i,s)=>i.localeCompare(s)).join(","):"";return`${h}|s${String(e.strict?1:0)}|c${String(e.resolveCatalogs?1:0)}|j${String(e.json5===!1?0:1)}|y${String(e.yaml===!1?0:1)}|w${t}`};class ci extends Error{constructor(e){super(`The following warnings were encountered while normalizing package data:
3
- - ${e.join(`
4
- - `)}`),this.name="PackageJsonValidationError"}}const hi=(h,e,t=[])=>{const i=[];if(Jt(h,s=>{i.push(s)},e),e&&i.length>0){const s=i.filter(n=>!t.some(l=>l instanceof RegExp?l.test(n):l===n));if(s.length>0)throw new ci(s)}return h},ui=h=>{const e=ie(h);return we(e)},pi=h=>{const e=ie(h);return St.parse(e)},fi=(h,e)=>e?.yaml!==!1&&(h.endsWith(".yaml")||h.endsWith(".yml"))?ui(h):e?.json5!==!1&&h.endsWith(".json5")?pi(h):bt(h),di=(h,e={})=>{const t={type:"file"};h&&(t.cwd=h);const i=["package.json"];e.yaml!==!1&&i.push("package.yaml","package.yml"),e.json5!==!1&&i.push("package.json5");const s=De(i,t);if(!s)throw new Lt(`No such file or directory, for ${i.join(", ").replace(oi," or $1")} found.`);const n=e.cache&&typeof e.cache!="boolean"?e.cache:li,l=ai(s,e);if(e.cache&&n.has(l))return n.get(l);const a=fi(s,e);if(e.resolveCatalogs){const u=Qt(s);u&&ii(a,u)}hi(a,e.strict??!1,e.ignoreWarnings);const o={packageJson:a,path:s};return e.cache&&n.set(l,o),o};var mi="5.0.0";const gi={version:mi},Li=gi.version,Si="@visulima/vis";let O;const Ui=()=>{if(O!==void 0)return O;const h=process.env.VIS_VERSION;if(h)return O=h,O;try{const{packageJson:e}=di(ft(dt(import.meta.url)),{json5:!1,yaml:!1});if(e.name===Si&&typeof e.version=="string")return O=e.version,O}catch{}return O=Li,O};export{Oi as a,xi as b,Gi as c,Ai as d,$i as e,Ui as g,Fi as h,wi as i,Ei as l,Ni as u};
@@ -1 +0,0 @@
1
- import{e as f,a as d}from"./index-BdMIfGVZ.js";import{whichBin as m}from"#native";import{p as h}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";import{y as k}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";const v=s=>{for(const r of[".nvmrc",".node-version"]){const o=f(s,r);if(k(o))try{return d(o).trim().replace(/^v/,"")}catch{}}},l=(s,r)=>{const o=s.split(/[.\-+]/).map(n=>Number.parseInt(n,10)||0),a=r.split(/[.\-+]/).map(n=>Number.parseInt(n,10)||0),e=Math.max(o.length,a.length);for(let n=0;n<e;n++){const t=o[n]??0,i=a[n]??0;if(t!==i)return t-i}return 0},b=(s,r)=>{const o=r.trim();if(o===""||o==="*")return!0;const a=o.split(/\s+/).filter(Boolean);for(const e of a)if(e.startsWith(">=")){if(l(s,e.slice(2).trim())<0)return!1}else if(e.startsWith("<=")){if(l(s,e.slice(2).trim())>0)return!1}else if(e.startsWith(">")){if(l(s,e.slice(1).trim())<=0)return!1}else if(e.startsWith("<")){if(l(s,e.slice(1).trim())>=0)return!1}else if(/^\d/.test(e)){const n=s.split("."),t=e.split(".");for(const[i,c]of t.entries())if(c!==n[i])return!1}return!0},x=s=>{const r=[],o=f(s,"package.json");let a;try{a=h(o)}catch{return r}const e=process.versions.node;if(a.engines?.node){const t=a.engines.node;b(e,t)||r.push({actual:e,expected:t,kind:"node",message:`package.json engines.node requires ${t}, but the current Node.js is ${e}.`,severity:"error"})}const n=v(s);if(n){const[t,i]=n.split("."),[c,p]=e.split(".");(t!==c||i!==void 0&&i!==p)&&r.push({actual:e,expected:n,kind:"node",message:`.nvmrc pins Node ${n} but the current Node.js is ${e}. Run \`nvm use\` or switch runtimes.`,severity:"warning"})}if(a.packageManager){const[t,i]=a.packageManager.split("@"),c=(process.env.npm_config_user_agent??"").split(" ")[0]??"",[p,u]=c.split("/"),g=t==="aube"&&m("aube")!==null;p&&t&&p!==t?r.push({actual:p,expected:t,kind:"packageManager",message:`package.json packageManager pins ${a.packageManager} but the current invocation is ${c}. Install the correct package manager.`,severity:g?"warning":"error"}):u&&i&&u!==i&&r.push({actual:u,expected:i,kind:"packageManager",message:`package.json packageManager pins ${t}@${i} but the current invocation uses ${t}@${u}.`,severity:"warning"})}return r};export{x as c};
@@ -1 +0,0 @@
1
- import{x as r,F as C,o as K}from"../packem_chunks/catalog.js";import{W as h}from"./getRandomSpinner-4ZEcbTYv-DCyIuj19.js";import{k as S}from"../packem_chunks/cli-main.js";const A=100,T=2147483647,m={delta:0,frame:0,time:0};function j(s){const{interval:i=A,isActive:e=!0}=s??{},t=F(i),{renderThrottleMs:c,subscribe:v}=r.useContext(S),[n,M]=r.useState(0),[R,p]=r.useState(m),o=r.useRef(0),f=r.useRef(0),x=r.useRef({isActive:e,resetKey:n,safeInterval:t}),l=x.current,E=e&&(t!==l.safeInterval||!l.isActive||n!==l.resetKey),b=r.useCallback(()=>{M(u=>u+1)},[]);return r.useLayoutEffect(()=>{if(!e)return;p(m);let u=0;const{startTime:d,unsubscribe:I}=v(a=>{if(c>0&&a<o.current)return;const y=a-u,k=a-f.current;f.current=a,o.current=a+c,p({delta:k,frame:Math.floor(y/t),time:y})},t);return u=d,f.current=d,o.current=u+c,I},[t,e,v,c,n]),r.useLayoutEffect(()=>{x.current={isActive:e,resetKey:n,safeInterval:t}},[e,t,n]),E?{...m,reset:b}:{...R,reset:b}}function F(s){return Number.isFinite(s)?Math.min(T,Math.max(1,s)):A}function g({type:s="dots"}){const i=h(s)??h("dots"),e=i?.frames??[" "],{frame:t}=j({interval:i?.interval??80});return C.jsx(K,{children:e[t%e.length]})}export{g as l};
@@ -1,14 +0,0 @@
1
- import{createRequire as ho}from"node:module";import{_ as Ao}from"./index-BdMIfGVZ.js";import{y as _o}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";import{U as Eo}from"./writeFileSync-DJoHk3Ks-Dhem3Uof.js";let vo;const yo=e=>(vo??=ho(import.meta.url))(e),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xo=e=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[t,o]=he.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return he.getBuiltinModule(e)}return yo(e)},{createRequire:eo}=xo("node:module"),Ro=/^(?:( )+|\t+)/,nt="space";function Ot(e,t,o){return e&&t===nt&&o===1}function Nt(e,t){const o=new Map;let p=0,i,s;for(const n of e.split(/\n/g)){if(!n)continue;const c=n.match(Ro);if(c===null)p=0,i="";else{const f=c[0].length,h=c[1]?nt:"tab";if(Ot(t,h,f))continue;h!==i&&(p=0),i=h;let g=1,A=0;const R=f-p;if(p=f,R===0)g=0,A=1;else{const N=Math.abs(R);if(Ot(t,h,N))continue;s=To(h,N)}const _=o.get(s);o.set(s,_===void 0?[1,0]:[_[0]+g,_[1]+A])}}return o}function To(e,t){return(e===nt?"s":"t")+String(t)}function $o(e){const t=e[0]==="s"?nt:"tab",o=Number(e.slice(1));return{type:t,amount:o}}function So(e){let t,o=0,p=0;for(const[i,[s,n]]of e)(s>o||s===o&&n>p)&&(o=s,p=n,t=i);return t}function Co(e,t){return(e===nt?" ":" ").repeat(t)}function wo(e){if(typeof e!="string")throw new TypeError("Expected a string");let t=Nt(e,!0);t.size===0&&(t=Nt(e,!1));const o=So(t);let p,i=0,s="";return o!==void 0&&({type:p,amount:i}=$o(o),s=Co(p,i)),{amount:i,type:p,indent:s}}let ko;const Oo=e=>(ko??=eo(import.meta.url))(e),ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,No=e=>{if(typeof ve<"u"&&ve.versions&&ve.versions.node){const[t,o]=ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ve.getBuiltinModule(e)}return Oo(e)},{readFileSync:Ho}=No("node:fs"),un=(e,t,o={})=>{const{detectIndent:p,indent:i,replacer:s,stringify:n=JSON.stringify,...c}={indent:" ",...o};let f=i,h=`
2
- `;if(_o(e,Ao))try{const A=Ho(e,"utf8");if(p){const{indent:R}=wo(A);f=R}h=A.endsWith(`
3
- `)?`
4
- `:""}catch(A){if(A.code!=="ENOENT")throw A}const g=n(t,s,f);Eo(e,`${g}${h}`,c)};let Lo;const Bo=e=>(Lo??=eo(import.meta.url))(e),me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,to=e=>{if(typeof me<"u"&&me.versions&&me.versions.node){const[t,o]=me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return me.getBuiltinModule(e)}return Bo(e)},{homedir:Mo,tmpdir:mt}=to("node:os"),{env:st,cwd:Io,platform:Ht}=me,{createRequire:k}=to("node:module"),Do=0,oo=2,Po=Symbol("findUpStop"),zo=/^[A-Z]:\//i,ut=(e="")=>e&&e.replaceAll("\\","/").replace(zo,t=>t.toUpperCase()),Go=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Uo=/^[A-Z]:$/i,jo=/.(\.[^./]+)$/,Fo=/^[/\\]|^[a-z]:[/\\]/i,Ko=/\/$/,Xo=()=>typeof process.cwd=="function"?process.cwd().replaceAll("\\","/"):"/",Wo=(e,t)=>{let o="",p=0,i=-1,s=0,n;for(let c=0;c<=e.length;++c){if(c<e.length)n=e[c];else{if(n==="/")break;n="/"}if(n==="/"){if(!(i===c-1||s===1))if(s===2){if(o.length<2||p!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",p=0):(o=o.slice(0,f),p=o.length-1-o.lastIndexOf("/")),i=c,s=0;continue}else if(o.length>0){o="",p=0,i=c,s=0;continue}}t&&(o+=o.length>0?"/..":"..",p=2)}else o.length>0?o+=`/${e.slice(i+1,c)}`:o=e.slice(i+1,c),p=c-i-1;i=c,s=0}else n==="."&&s!==-1?++s:s=-1}return o},rt=e=>Go.test(e),bt=function(...e){e=e.map(p=>ut(p));let t="",o=!1;for(let p=e.length-1;p>=-1&&!o;p--){const i=p>=0?e[p]:Xo();!i||i.length===0||(t=`${i}/${t}`,o=rt(i))}return t=Wo(t,!o),o&&!rt(t)?`/${t}`:t.length>0?t:"."},qo=function(e){return jo.exec(ut(e))?.[1]??""},so=e=>{const t=ut(e).replace(Ko,""),o=t.lastIndexOf("/");if(o===-1)return rt(e)?"/":".";const p=t.slice(0,o);return Uo.test(p)?`${p}/`:p||(rt(e)?"/":".")},Qo=(e,t)=>{const o=ut(e);return o.slice(o.lastIndexOf("/")+1)},Zo=function(e){const t=Fo.exec(e)?.[0]?.replaceAll("\\","/")??"",o=Qo(e),p=qo(o);return{base:o,dir:so(e),ext:p,name:o.slice(0,o.length-p.length),root:t}},Yo=k(import.meta.url),ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vo=e=>{if(typeof ye<"u"&&ye.versions&&ye.versions.node){const[t,o]=ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ye.getBuiltinModule(e)}return Yo(e)},{fileURLToPath:Jo}=Vo("node:url");function es(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lt,Bt;function ts(){return Bt||(Bt=1,Lt=["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"]),Lt}var os=ts();const ss=es(os);new Set(ss);const pt=e=>ut(e instanceof URL?Jo(e):e),ro=e=>{if(!e||!(e instanceof URL)&&typeof e!="string")throw new TypeError("Path must be a non-empty string or URL.")},rs=k(import.meta.url),xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ns=e=>{if(typeof xe<"u"&&xe.versions&&xe.versions.node){const[t,o]=xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return xe.getBuiltinModule(e)}return rs(e)};ns("node:fs/promises");const us=k(import.meta.url),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,is=e=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[t,o]=Ae.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ae.getBuiltinModule(e)}return us(e)};is("node:fs");const Mt=e=>{if(e.isFile())return"file";if(e.isDirectory())return"dir";if(e.isSymbolicLink())return"symlink"},as=k(import.meta.url),_e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ls=e=>{if(typeof _e<"u"&&_e.versions&&_e.versions.node){const[t,o]=_e.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return _e.getBuiltinModule(e)}return as(e)},{lstat:an,mkdir:ln}=ls("node:fs/promises"),cs=k(import.meta.url),Ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ps=e=>{if(typeof Ee<"u"&&Ee.versions&&Ee.versions.node){const[t,o]=Ee.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ee.getBuiltinModule(e)}return cs(e)},{lstatSync:It,mkdirSync:fs}=ps("node:fs"),Re=e=>{ro(e);try{const t=It(e);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Mt(t))}'`);return}catch(t){if(t.code!=="ENOENT")throw t}try{fs(e,{recursive:!0})}catch(t){if(t.code!=="EEXIST")throw t;const o=It(e);if(!o.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(Mt(o))}'`,{cause:t})}},gs=k(import.meta.url),Te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ds=e=>{if(typeof Te<"u"&&Te.versions&&Te.versions.node){const[t,o]=Te.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Te.getBuiltinModule(e)}return gs(e)};ds("node:fs/promises");const ms=k(import.meta.url),$e=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,bs=e=>{if(typeof $e<"u"&&$e.versions&&$e.versions.node){const[t,o]=$e.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return $e.getBuiltinModule(e)}return ms(e)};bs("node:fs");const hs=k(import.meta.url),Se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vs=e=>{if(typeof Se<"u"&&Se.versions&&Se.versions.node){const[t,o]=Se.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Se.getBuiltinModule(e)}return hs(e)};vs("node:fs/promises");const ys=k(import.meta.url),Ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xs=e=>{if(typeof Ce<"u"&&Ce.versions&&Ce.versions.node){const[t,o]=Ce.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ce.getBuiltinModule(e)}return ys(e)};xs("node:fs");const As=k(import.meta.url),we=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_s=e=>{if(typeof we<"u"&&we.versions&&we.versions.node){const[t,o]=we.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return we.getBuiltinModule(e)}return As(e)};_s("node:fs/promises");const Es=k(import.meta.url),ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Rs=e=>{if(typeof ke<"u"&&ke.versions&&ke.versions.node){const[t,o]=ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ke.getBuiltinModule(e)}return Es(e)};Rs("node:fs");k(import.meta.url);const Ts=k(import.meta.url),Oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$s=e=>{if(typeof Oe<"u"&&Oe.versions&&Oe.versions.node){const[t,o]=Oe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Oe.getBuiltinModule(e)}return Ts(e)};$s("node:fs/promises");const Ss=k(import.meta.url),Ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Cs=e=>{if(typeof Ne<"u"&&Ne.versions&&Ne.versions.node){const[t,o]=Ne.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ne.getBuiltinModule(e)}return Ss(e)};Cs("node:fs");const ws=k(import.meta.url),He=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ks=e=>{if(typeof He<"u"&&He.versions&&He.versions.node){const[t,o]=He.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return He.getBuiltinModule(e)}return ws(e)},{stat:cn,lstat:pn}=ks("node:fs/promises"),Os=k(import.meta.url),Le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ns=e=>{if(typeof Le<"u"&&Le.versions&&Le.versions.node){const[t,o]=Le.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Le.getBuiltinModule(e)}return Os(e)},{statSync:Hs,lstatSync:Ls}=Ns("node:fs"),Bs=(e,t={})=>{const o=t.cwd?pt(t.cwd):process.cwd();let p=bt(o);const{root:i}=Zo(p),s=pt(t.stopAt??i),n=bt(p,s),c=t.type??"file",f=function(g){return[e]};t.allowSymlinks??=!0;const h=t.allowSymlinks?Hs:Ls;for(;p&&p!==n&&p!==i;){for(let g of f()){if(g===Po)return;if(g===void 0)continue;Buffer.isBuffer(g)?g=g.toString():g instanceof URL&&(g=pt(g));const A=rt(g)?g:bt(p,g);try{const R=h(A);if(c==="file"&&R.isFile()||c==="directory"&&R.isDirectory())return A}catch{}}p=so(p)}};function St(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dt={},ht,Pt;function gt(){if(Pt)return ht;Pt=1;const e="[^\\\\/]",t=Symbol("unignore"),o="\\.",p="\\+",i="\\?",s="\\/",n="(?=.)",c="[^/]",f=`(?:${s}|$)`,h=`(?:^|${s})`,g=`${o}{1,2}${f}`,A=`(?!${o})`,R=`(?!${h}${g})`,_=`(?!${o}{0,1}${f})`,N=`(?!${g})`,te=`[^.${s}]`,Q=`${c}*?`,K="/",m={DOT_LITERAL:o,PLUS_LITERAL:p,QMARK_LITERAL:i,SLASH_LITERAL:s,ONE_CHAR:n,QMARK:c,END_ANCHOR:f,DOTS_SLASH:g,NO_DOT:A,NO_DOTS:R,NO_DOT_SLASH:_,NO_DOTS_SLASH:N,QMARK_NO_DOT:te,STAR:Q,START_ANCHOR:h,SEP:K},v={...m,SLASH_LITERAL:"[\\\\/]",QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${o}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${o})`,NO_DOTS:`(?!(?:^|[\\\\/])${o}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${o}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${o}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},r={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ht={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:r,UNIGNORE:t,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(y){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${y.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(y){return y===!0?v:m}},ht}var zt;function dt(){return zt||(zt=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:o,REGEX_SPECIAL_CHARS:p,REGEX_SPECIAL_CHARS_GLOBAL:i}=gt();e.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),e.hasRegexChars=s=>p.test(s),e.isRegexChar=s=>s.length===1&&e.hasRegexChars(s),e.escapeRegex=s=>s.replace(i,"\\$1"),e.toPosixSlashes=s=>s.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return process.platform?process.platform==="win32":!1},e.removeBackslashes=s=>s.replace(o,n=>n==="\\"?"":n),e.escapeLast=(s,n,c)=>{const f=s.lastIndexOf(n,c);return f===-1?s:s[f-1]==="\\"?e.escapeLast(s,n,f-1):`${s.slice(0,f)}\\${s.slice(f)}`},e.removePrefix=(s,n={})=>{let c=s;return c.startsWith("./")&&(c=c.slice(2),n.prefix="./"),c},e.wrapOutput=(s,n={},c={})=>{const f=c.contains?"":"^",h=c.contains?"":"$";let g=`${f}(?:${s})${h}`;return n.negated===!0&&(g=`(?:^(?!${g}).*$)`),g},e.basename=(s,{windows:n}={})=>{const c=s.split(n?/[\\/]/:"/"),f=c[c.length-1];return f===""?c[c.length-2]:f}})(Dt)),Dt}var vt,Gt;function Ms(){if(Gt)return vt;Gt=1;const e=dt(),{CHAR_ASTERISK:t,CHAR_AT:o,CHAR_BACKWARD_SLASH:p,CHAR_COMMA:i,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:n,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:f,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:g,CHAR_PLUS:A,CHAR_QUESTION_MARK:R,CHAR_RIGHT_CURLY_BRACE:_,CHAR_RIGHT_PARENTHESES:N,CHAR_RIGHT_SQUARE_BRACKET:te}=gt(),Q=m=>m===c||m===p,K=m=>{m.isPrefix!==!0&&(m.depth=m.isGlobstar?1/0:1)};return vt=(m,v)=>{const r=v||{},y=m.length-1,E=r.parts===!0||r.scanToEnd===!0,T=[],x=[],O=[];let X=m,Z=-1,G=0,se=0,W=!1,re=!1,I=!1,le=!1,ge=!1,ne=!1,B=!1,ue=!1,de=!1,q=!1,F=0,V,$,w={value:"",depth:0,isGlob:!1};const l=()=>Z>=y,Y=()=>X.charCodeAt(Z+1),U=()=>(V=$,X.charCodeAt(++Z));for(;Z<y;){$=U();let H;if($===p){B=w.backslashes=!0,$=U(),$===f&&(ne=!0);continue}if(ne===!0||$===f){for(F++;l()!==!0&&($=U());){if($===p){B=w.backslashes=!0,U();continue}if($===f){F++;continue}if(ne!==!0&&$===s&&($=U())===s){if(W=w.isBrace=!0,I=w.isGlob=!0,q=!0,E===!0)continue;break}if(ne!==!0&&$===i){if(W=w.isBrace=!0,I=w.isGlob=!0,q=!0,E===!0)continue;break}if($===_&&(F--,F===0)){ne=!1,W=w.isBrace=!0,q=!0;break}}if(E===!0)continue;break}if($===c){if(T.push(Z),x.push(w),w={value:"",depth:0,isGlob:!1},q===!0)continue;if(V===s&&Z===G+1){G+=2;continue}se=Z+1;continue}if(r.noext!==!0&&($===A||$===o||$===t||$===R||$===n)&&Y()===h){if(I=w.isGlob=!0,le=w.isExtglob=!0,q=!0,$===n&&Z===G&&(de=!0),E===!0){for(;l()!==!0&&($=U());){if($===p){B=w.backslashes=!0,$=U();continue}if($===N){I=w.isGlob=!0,q=!0;break}}continue}break}if($===t){if(V===t&&(ge=w.isGlobstar=!0),I=w.isGlob=!0,q=!0,E===!0)continue;break}if($===R){if(I=w.isGlob=!0,q=!0,E===!0)continue;break}if($===g){for(;l()!==!0&&(H=U());){if(H===p){B=w.backslashes=!0,U();continue}if(H===te){re=w.isBracket=!0,I=w.isGlob=!0,q=!0;break}}if(E===!0)continue;break}if(r.nonegate!==!0&&$===n&&Z===G){ue=w.negated=!0,G++;continue}if(r.noparen!==!0&&$===h){if(I=w.isGlob=!0,E===!0){for(;l()!==!0&&($=U());){if($===h){B=w.backslashes=!0,$=U();continue}if($===N){q=!0;break}}continue}break}if(I===!0){if(q=!0,E===!0)continue;break}}r.noext===!0&&(le=!1,I=!1);let z=X,u="",a="";G>0&&(u=X.slice(0,G),X=X.slice(G),se-=G),z&&I===!0&&se>0?(z=X.slice(0,se),a=X.slice(se)):I===!0?(z="",a=X):z=X,z&&z!==""&&z!=="/"&&z!==X&&Q(z.charCodeAt(z.length-1))&&(z=z.slice(0,-1)),r.unescape===!0&&(a&&(a=e.removeBackslashes(a)),z&&B===!0&&(z=e.removeBackslashes(z)));const ee={prefix:u,input:m,start:G,base:z,glob:a,isBrace:W,isBracket:re,isGlob:I,isExtglob:le,isGlobstar:ge,negated:ue,negatedExtglob:de};if(r.tokens===!0&&(ee.maxDepth=0,Q($)||x.push(w),ee.tokens=x),r.parts===!0||r.tokens===!0){let H;for(let D=0;D<T.length;D++){const ce=H?H+1:G,J=T[D],pe=m.slice(ce,J);r.tokens&&(D===0&&G!==0?(x[D].isPrefix=!0,x[D].value=u):x[D].value=pe,K(x[D]),ee.maxDepth+=x[D].depth),(D!==0||pe!=="")&&O.push(pe),H=J}if(H&&H+1<m.length){const D=m.slice(H+1);O.push(D),r.tokens&&(x[x.length-1].value=D,K(x[x.length-1]),ee.maxDepth+=x[x.length-1].depth)}ee.slashes=T,ee.parts=O}return ee},vt}var yt,Ut;function Is(){if(Ut)return yt;Ut=1;const e=gt(),t=dt(),{MAX_LENGTH:o,POSIX_REGEX_SOURCE:p,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:n}=e,c=(m,v)=>typeof v.expandRange=="function"?v.expandRange(...m,v):(m.sort(),`[${m.join("-")}]`),f=(m,v)=>`Missing ${m}: "${v}" - use "\\\\${v}" to match literal characters`,h=m=>{const v=[];let r=0,y=0,E=0,T="",x=!1;for(const O of m){if(x===!0){T+=O,x=!1;continue}if(O==="\\"){T+=O,x=!0;continue}if(O==='"'){E=E===1?0:1,T+=O;continue}if(E===0){if(O==="[")r++;else if(O==="]"&&r>0)r--;else if(r===0){if(O==="(")y++;else if(O===")"&&y>0)y--;else if(O==="|"&&y===0){v.push(T),T="";continue}}}T+=O}return v.push(T),v},g=m=>{let v=!1;for(const r of m){if(v===!0){v=!1;continue}if(r==="\\"){v=!0;continue}if(/[?*+@!()[\]{}]/.test(r))return!1}return!0},A=m=>{let v=m.trim(),r=!0;for(;r===!0;)r=!1,/^@\([^\\()[\]{}|]+\)$/.test(v)&&(v=v.slice(2,-1),r=!0);if(g(v))return v.replace(/\\(.)/g,"$1")},R=m=>{const v=m.map(A).filter(Boolean);for(let r=0;r<v.length;r++)for(let y=r+1;y<v.length;y++){const E=v[r],T=v[y],x=E[0];if(!(!x||E!==x.repeat(E.length)||T!==x.repeat(T.length))&&(E===T||E.startsWith(T)||T.startsWith(E)))return!0}return!1},_=(m,v=!0)=>{if(m[0]!=="+"&&m[0]!=="*"||m[1]!=="(")return;let r=0,y=0,E=0,T=!1;for(let x=1;x<m.length;x++){const O=m[x];if(T===!0){T=!1;continue}if(O==="\\"){T=!0;continue}if(O==='"'){E=E===1?0:1;continue}if(E!==1){if(O==="["){r++;continue}if(O==="]"&&r>0){r--;continue}if(!(r>0)){if(O==="("){y++;continue}if(O===")"&&(y--,y===0))return v===!0&&x!==m.length-1?void 0:{type:m[0],body:m.slice(2,x),end:x}}}}},N=m=>{let v=0;const r=[];for(;v<m.length;){const y=_(m.slice(v),!1);if(!y||y.type!=="*")return;const E=h(y.body).map(x=>x.trim());if(E.length!==1)return;const T=A(E[0]);if(!T||T.length!==1)return;r.push(T),v+=y.end+1}return r.length<1?void 0:`${r.length===1?t.escapeRegex(r[0]):`[${r.map(y=>t.escapeRegex(y)).join("")}]`}*`},te=m=>{let v=0,r=m.trim(),y=_(r);for(;y;)v++,r=y.body.trim(),y=_(r);return v},Q=(m,v)=>{if(v.maxExtglobRecursion===!1)return{risky:!1};const r=typeof v.maxExtglobRecursion=="number"?v.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,y=h(m).map(E=>E.trim());if(y.length>1&&(y.some(E=>E==="")||y.some(E=>/^[*?]+$/.test(E))||R(y)))return{risky:!0};for(const E of y){const T=N(E);if(T)return{risky:!0,safeOutput:T};if(te(E)>r)return{risky:!0}}return{risky:!1}},K=(m,v)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=n[m]||m;const r={...v},y=typeof r.maxLength=="number"?Math.min(o,r.maxLength):o;let E=m.length;if(E>y)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${y}`);const T={type:"bos",value:"",output:r.prepend||""},x=[T],O=r.capture?"":"?:",X=e.globChars(r.windows),Z=e.extglobChars(X),{DOT_LITERAL:G,PLUS_LITERAL:se,SLASH_LITERAL:W,ONE_CHAR:re,DOTS_SLASH:I,NO_DOT:le,NO_DOT_SLASH:ge,NO_DOTS_SLASH:ne,QMARK:B,QMARK_NO_DOT:ue,STAR:de,START_ANCHOR:q}=X,F=b=>`(${O}(?:(?!${q}${b.dot?I:G}).)*?)`,V=r.dot?"":le,$=r.dot?B:ue;let w=r.bash===!0?F(r):de;r.capture&&(w=`(${w})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const l={input:m,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:x};m=t.removePrefix(m,l),E=m.length;const Y=[],U=[],z=[];let u=T,a;const ee=()=>l.index===E-1,H=l.peek=(b=1)=>m[l.index+b],D=l.advance=()=>m[++l.index]||"",ce=()=>m.slice(l.index+1),J=(b="",M=0)=>{l.consumed+=b,l.index+=M},pe=b=>{l.output+=b.output!=null?b.output:b.value,J(b.value)},mo=()=>{let b=1;for(;H()==="!"&&(H(2)!=="("||H(3)==="?");)D(),l.start++,b++;return b%2===0?!1:(l.negated=!0,l.start++,!0)},lt=b=>{l[b]++,z.push(b)},fe=b=>{l[b]--,z.pop()},S=b=>{if(u.type==="globstar"){const M=l.braces>0&&(b.type==="comma"||b.type==="brace"),d=b.extglob===!0||Y.length&&(b.type==="pipe"||b.type==="paren");b.type!=="slash"&&b.type!=="paren"&&!M&&!d&&(l.output=l.output.slice(0,-u.output.length),u.type="star",u.value="*",u.output=w,l.output+=u.output)}if(Y.length&&b.type!=="paren"&&(Y[Y.length-1].inner+=b.value),(b.value||b.output)&&pe(b),u&&u.type==="text"&&b.type==="text"){u.output=(u.output||u.value)+b.value,u.value+=b.value;return}b.prev=u,x.push(b),u=b},ct=(b,M)=>{const d={...Z[M],conditions:1,inner:""};d.prev=u,d.parens=l.parens,d.output=l.output,d.startIndex=l.index,d.tokensIndex=x.length;const C=(r.capture?"(":"")+d.open;lt("parens"),S({type:b,value:M,output:l.output?"":re}),S({type:"paren",extglob:!0,value:D(),output:C}),Y.push(d)},bo=b=>{const M=m.slice(b.startIndex,l.index+1),d=m.slice(b.startIndex+2,l.index),C=Q(d,r);if((b.type==="plus"||b.type==="star")&&C.risky){const L=C.safeOutput?(b.output?"":re)+(r.capture?`(${C.safeOutput})`:C.safeOutput):void 0,ie=x[b.tokensIndex];ie.type="text",ie.value=M,ie.output=L||t.escapeRegex(M);for(let ae=b.tokensIndex+1;ae<x.length;ae++)x[ae].value="",x[ae].output="",delete x[ae].suffix;l.output=b.output+ie.output,l.backtrack=!0,S({type:"paren",extglob:!0,value:a,output:""}),fe("parens");return}let P=b.close+(r.capture?")":""),j;if(b.type==="negate"){let L=w;if(b.inner&&b.inner.length>1&&b.inner.includes("/")&&(L=F(r)),(L!==w||ee()||/^\)+$/.test(ce()))&&(P=b.close=`)$))${L}`),b.inner.includes("*")&&(j=ce())&&/^\.[^\\/.]+$/.test(j)){const ie=K(j,{...v,fastpaths:!1}).output;P=b.close=`)${ie})${L})`}b.prev.type==="bos"&&(l.negatedExtglob=!0)}S({type:"paren",extglob:!0,value:a,output:P}),fe("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let b=!1,M=m.replace(s,(d,C,P,j,L,ie)=>j==="\\"?(b=!0,d):j==="?"?C?C+j+(L?B.repeat(L.length):""):ie===0?$+(L?B.repeat(L.length):""):B.repeat(P.length):j==="."?G.repeat(P.length):j==="*"?C?C+j+(L?w:""):w:C?d:`\\${d}`);return b===!0&&(r.unescape===!0?M=M.replace(/\\/g,""):M=M.replace(/\\+/g,d=>d.length%2===0?"\\\\":d?"\\":"")),M===m&&r.contains===!0?(l.output=m,l):(l.output=t.wrapOutput(M,l,v),l)}for(;!ee();){if(a=D(),a==="\0")continue;if(a==="\\"){const d=H();if(d==="/"&&r.bash!==!0||d==="."||d===";")continue;if(!d){a+="\\",S({type:"text",value:a});continue}const C=/^\\+/.exec(ce());let P=0;if(C&&C[0].length>2&&(P=C[0].length,l.index+=P,P%2!==0&&(a+="\\")),r.unescape===!0?a=D():a+=D(),l.brackets===0){S({type:"text",value:a});continue}}if(l.brackets>0&&(a!=="]"||u.value==="["||u.value==="[^")){if(r.posix!==!1&&a===":"){const d=u.value.slice(1);if(d.includes("[")&&(u.posix=!0,d.includes(":"))){const C=u.value.lastIndexOf("["),P=u.value.slice(0,C),j=u.value.slice(C+2),L=p[j];if(L){u.value=P+L,l.backtrack=!0,D(),!T.output&&x.indexOf(u)===1&&(T.output=re);continue}}}(a==="["&&H()!==":"||a==="-"&&H()==="]")&&(a=`\\${a}`),a==="]"&&(u.value==="["||u.value==="[^")&&(a=`\\${a}`),r.posix===!0&&a==="!"&&u.value==="["&&(a="^"),u.value+=a,pe({value:a});continue}if(l.quotes===1&&a!=='"'){a=t.escapeRegex(a),u.value+=a,pe({value:a});continue}if(a==='"'){l.quotes=l.quotes===1?0:1,r.keepQuotes===!0&&S({type:"text",value:a});continue}if(a==="("){lt("parens"),S({type:"paren",value:a});continue}if(a===")"){if(l.parens===0&&r.strictBrackets===!0)throw new SyntaxError(f("opening","("));const d=Y[Y.length-1];if(d&&l.parens===d.parens+1){bo(Y.pop());continue}S({type:"paren",value:a,output:l.parens?")":"\\)"}),fe("parens");continue}if(a==="["){if(r.nobracket===!0||!ce().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(f("closing","]"));a=`\\${a}`}else lt("brackets");S({type:"bracket",value:a});continue}if(a==="]"){if(r.nobracket===!0||u&&u.type==="bracket"&&u.value.length===1){S({type:"text",value:a,output:`\\${a}`});continue}if(l.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(f("opening","["));S({type:"text",value:a,output:`\\${a}`});continue}fe("brackets");const d=u.value.slice(1);if(u.posix!==!0&&d[0]==="^"&&!d.includes("/")&&(a=`/${a}`),u.value+=a,pe({value:a}),r.literalBrackets===!1||t.hasRegexChars(d))continue;const C=t.escapeRegex(u.value);if(l.output=l.output.slice(0,-u.value.length),r.literalBrackets===!0){l.output+=C,u.value=C;continue}u.value=`(${O}${C}|${u.value})`,l.output+=u.value;continue}if(a==="{"&&r.nobrace!==!0){lt("braces");const d={type:"brace",value:a,output:"(",outputIndex:l.output.length,tokensIndex:l.tokens.length};U.push(d),S(d);continue}if(a==="}"){const d=U[U.length-1];if(r.nobrace===!0||!d){S({type:"text",value:a,output:a});continue}let C=")";if(d.dots===!0){const P=x.slice(),j=[];for(let L=P.length-1;L>=0&&(x.pop(),P[L].type!=="brace");L--)P[L].type!=="dots"&&j.unshift(P[L].value);C=c(j,r),l.backtrack=!0}if(d.comma!==!0&&d.dots!==!0){const P=l.output.slice(0,d.outputIndex),j=l.tokens.slice(d.tokensIndex);d.value=d.output="\\{",a=C="\\}",l.output=P;for(const L of j)l.output+=L.output||L.value}S({type:"brace",value:a,output:C}),fe("braces"),U.pop();continue}if(a==="|"){Y.length>0&&Y[Y.length-1].conditions++,S({type:"text",value:a});continue}if(a===","){let d=a;const C=U[U.length-1];C&&z[z.length-1]==="braces"&&(C.comma=!0,d="|"),S({type:"comma",value:a,output:d});continue}if(a==="/"){if(u.type==="dot"&&l.index===l.start+1){l.start=l.index+1,l.consumed="",l.output="",x.pop(),u=T;continue}S({type:"slash",value:a,output:W});continue}if(a==="."){if(l.braces>0&&u.type==="dot"){u.value==="."&&(u.output=G);const d=U[U.length-1];u.type="dots",u.output+=a,u.value+=a,d.dots=!0;continue}if(l.braces+l.parens===0&&u.type!=="bos"&&u.type!=="slash"){S({type:"text",value:a,output:G});continue}S({type:"dot",value:a,output:G});continue}if(a==="?"){if(!(u&&u.value==="(")&&r.noextglob!==!0&&H()==="("&&H(2)!=="?"){ct("qmark",a);continue}if(u&&u.type==="paren"){const d=H();let C=a;(u.value==="("&&!/[!=<:]/.test(d)||d==="<"&&!/<([!=]|\w+>)/.test(ce()))&&(C=`\\${a}`),S({type:"text",value:a,output:C});continue}if(r.dot!==!0&&(u.type==="slash"||u.type==="bos")){S({type:"qmark",value:a,output:ue});continue}S({type:"qmark",value:a,output:B});continue}if(a==="!"){if(r.noextglob!==!0&&H()==="("&&(H(2)!=="?"||!/[!=<:]/.test(H(3)))){ct("negate",a);continue}if(r.nonegate!==!0&&l.index===0){mo();continue}}if(a==="+"){if(r.noextglob!==!0&&H()==="("&&H(2)!=="?"){ct("plus",a);continue}if(u&&u.value==="("||r.regex===!1){S({type:"plus",value:a,output:se});continue}if(u&&(u.type==="bracket"||u.type==="paren"||u.type==="brace")||l.parens>0){S({type:"plus",value:a});continue}S({type:"plus",value:se});continue}if(a==="@"){if(r.noextglob!==!0&&H()==="("&&H(2)!=="?"){S({type:"at",extglob:!0,value:a,output:""});continue}S({type:"text",value:a});continue}if(a!=="*"){(a==="$"||a==="^")&&(a=`\\${a}`);const d=i.exec(ce());d&&(a+=d[0],l.index+=d[0].length),S({type:"text",value:a});continue}if(u&&(u.type==="globstar"||u.star===!0)){u.type="star",u.star=!0,u.value+=a,u.output=w,l.backtrack=!0,l.globstar=!0,J(a);continue}let b=ce();if(r.noextglob!==!0&&/^\([^?]/.test(b)){ct("star",a);continue}if(u.type==="star"){if(r.noglobstar===!0){J(a);continue}const d=u.prev,C=d.prev,P=d.type==="slash"||d.type==="bos",j=C&&(C.type==="star"||C.type==="globstar");if(r.bash===!0&&(!P||b[0]&&b[0]!=="/")){S({type:"star",value:a,output:""});continue}const L=l.braces>0&&(d.type==="comma"||d.type==="brace"),ie=Y.length&&(d.type==="pipe"||d.type==="paren");if(!P&&d.type!=="paren"&&!L&&!ie){S({type:"star",value:a,output:""});continue}for(;b.slice(0,3)==="/**";){const ae=m[l.index+4];if(ae&&ae!=="/")break;b=b.slice(3),J("/**",3)}if(d.type==="bos"&&ee()){u.type="globstar",u.value+=a,u.output=F(r),l.output=u.output,l.globstar=!0,J(a);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&!j&&ee()){l.output=l.output.slice(0,-(d.output+u.output).length),d.output=`(?:${d.output}`,u.type="globstar",u.output=F(r)+(r.strictSlashes?")":"|$)"),u.value+=a,l.globstar=!0,l.output+=d.output+u.output,J(a);continue}if(d.type==="slash"&&d.prev.type!=="bos"&&b[0]==="/"){const ae=b[1]!==void 0?"|$":"";l.output=l.output.slice(0,-(d.output+u.output).length),d.output=`(?:${d.output}`,u.type="globstar",u.output=`${F(r)}${W}|${W}${ae})`,u.value+=a,l.output+=d.output+u.output,l.globstar=!0,J(a+D()),S({type:"slash",value:"/",output:""});continue}if(d.type==="bos"&&b[0]==="/"){u.type="globstar",u.value+=a,u.output=`(?:^|${W}|${F(r)}${W})`,l.output=u.output,l.globstar=!0,J(a+D()),S({type:"slash",value:"/",output:""});continue}if(L&&b[0]==="/"){u.type="globstar",u.value+=a,u.output=`(?:^|${W}|${F(r)}${W})`,l.output+=u.output,l.globstar=!0,J(a+D()),S({type:"slash",value:"/",output:""});continue}l.output=l.output.slice(0,-u.output.length),u.type="globstar",u.output=F(r),u.value+=a,l.output+=u.output,l.globstar=!0,J(a);continue}const M={type:"star",value:a,output:w};if(r.bash===!0){M.output=".*?",(u.type==="bos"||u.type==="slash")&&(M.output=V+M.output),S(M);continue}if(u&&(u.type==="bracket"||u.type==="paren")&&r.regex===!0){M.output=a,S(M);continue}(l.index===l.start||u.type==="slash"||u.type==="dot")&&(u.type==="dot"?(l.output+=ge,u.output+=ge):r.dot===!0?(l.output+=ne,u.output+=ne):(l.output+=V,u.output+=V),H()!=="*"&&(l.output+=re,u.output+=re)),S(M)}for(;l.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(f("closing","]"));l.output=t.escapeLast(l.output,"["),fe("brackets")}for(;l.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(f("closing",")"));l.output=t.escapeLast(l.output,"("),fe("parens")}for(;l.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(f("closing","}"));l.output=t.escapeLast(l.output,"{"),fe("braces")}if(r.strictSlashes!==!0&&(u.type==="star"||u.type==="bracket")&&S({type:"maybe_slash",value:"",output:`${W}?`}),l.backtrack===!0){l.output="";for(const b of l.tokens)l.output+=b.output!=null?b.output:b.value,b.suffix&&(l.output+=b.suffix)}return l};return K.fastpaths=(m,v)=>{const r={...v},y=typeof r.maxLength=="number"?Math.min(o,r.maxLength):o,E=m.length;if(E>y)throw new SyntaxError(`Input length: ${E}, exceeds maximum allowed length: ${y}`);m=n[m]||m;const{DOT_LITERAL:T,SLASH_LITERAL:x,ONE_CHAR:O,DOTS_SLASH:X,NO_DOT:Z,NO_DOTS:G,NO_DOTS_SLASH:se,STAR:W,START_ANCHOR:re}=e.globChars(r.windows),I=r.dot?G:Z,le=r.dot?se:Z,ge=r.capture?"":"?:",ne={negated:!1,prefix:""};let B=r.bash===!0?".*?":W;r.capture&&(B=`(${B})`);const ue=V=>V.noglobstar===!0?B:`(${ge}(?:(?!${re}${V.dot?X:T}).)*?)`,de=V=>{switch(V){case"*":return`${I}${O}${B}`;case".*":return`${T}${O}${B}`;case"*.*":return`${I}${B}${T}${O}${B}`;case"*/*":return`${I}${B}${x}${O}${le}${B}`;case"**":return I+ue(r);case"**/*":return`(?:${I}${ue(r)}${x})?${le}${O}${B}`;case"**/*.*":return`(?:${I}${ue(r)}${x})?${le}${B}${T}${O}${B}`;case"**/.*":return`(?:${I}${ue(r)}${x})?${T}${O}${B}`;default:{const $=/^(.*?)\.(\w+)$/.exec(V);if(!$)return;const w=de($[1]);return w?w+T+$[2]:void 0}}},q=t.removePrefix(m,ne);let F=de(q);return F&&r.strictSlashes!==!0&&(F+=`${x}?`),F},yt=K,yt}var xt,jt;function Ds(){if(jt)return xt;jt=1;const e=Ms(),t=Is(),o=dt(),p=gt(),i=n=>n&&typeof n=="object"&&!Array.isArray(n),s=(n,c,f=!1)=>{if(Array.isArray(n)){const Q=n.map(K=>s(K,c,f));return K=>{for(const m of Q){const v=m(K);if(v)return v}return!1}}const h=i(n)&&n.tokens&&n.input;if(n===""||typeof n!="string"&&!h)throw new TypeError("Expected pattern to be a non-empty string");const g=c||{},A=g.windows,R=h?s.compileRe(n,c):s.makeRe(n,c,!1,!0),_=R.state;delete R.state;let N=()=>!1;if(g.ignore){const Q={...c,ignore:null,onMatch:null,onResult:null};N=s(g.ignore,Q,f)}const te=(Q,K=!1)=>{const{isMatch:m,match:v,output:r}=s.test(Q,R,c,{glob:n,posix:A}),y={glob:n,state:_,regex:R,posix:A,input:Q,output:r,match:v,isMatch:m};if(typeof g.onResult=="function"&&g.onResult(y),m===!1)return y.isMatch=!1,K?y:!1;e:if(N(Q)){if(typeof g.onIgnore=="function"&&g.onIgnore(y)===p.UNIGNORE){y.isMatch=!0;break e}return y.isMatch=!1,K?y:!1}return typeof g.onMatch=="function"&&g.onMatch(y),K?y:!0};return f&&(te.state=_),te};return s.test=(n,c,f,{glob:h,posix:g}={})=>{if(typeof n!="string")throw new TypeError("Expected input to be a string");if(n==="")return{isMatch:!1,output:""};const A=f||{},R=A.format||(g?o.toPosixSlashes:null);let _=n===h,N=_&&R?R(n):n;return _===!1&&(N=R?R(n):n,_=N===h),(_===!1||A.capture===!0)&&(A.matchBase===!0||A.basename===!0?_=s.matchBase(n,c,f,g):_=c.exec(N)),{isMatch:!!_,match:_,output:N}},s.matchBase=(n,c,f)=>(c instanceof RegExp?c:s.makeRe(c,f)).test(o.basename(n)),s.isMatch=(n,c,f)=>s(c,f)(n),s.parse=(n,c)=>Array.isArray(n)?n.map(f=>s.parse(f,c)):t(n,{...c,fastpaths:!1}),s.scan=(n,c)=>e(n,c),s.compileRe=(n,c,f=!1,h=!1)=>{if(f===!0)return n.output;const g=c||{},A=g.contains?"":"^",R=g.contains?"":"$";let _=`${A}(?:${n.output})${R}`;n&&n.negated===!0&&(_=`^(?!${_}).*$`);const N=s.toRegex(_,c);return h===!0&&(N.state=n),N},s.makeRe=(n,c={},f=!1,h=!1)=>{if(!n||typeof n!="string")throw new TypeError("Expected a non-empty string");let g={negated:!1,fastpaths:!0};return c.fastpaths!==!1&&(n[0]==="."||n[0]==="*")&&(g.output=t.fastpaths(n,c)),g.output||(g=t(n,c)),s.compileRe(g,c,f,h)},s.toRegex=(n,c)=>{try{const f=c||{};return new RegExp(n,f.flags||(f.nocase?"i":""))}catch(f){if(c&&c.debug===!0)throw f;return/$^/}},s.constants=p,xt=s,xt}var At,Ft;function Ps(){if(Ft)return At;Ft=1;const e=Ds(),t=dt();function o(p,i,s=!1){return i&&(i.windows===null||i.windows===void 0)&&(i={...i,windows:t.isWindows()}),e(p,i,s)}return Object.assign(o,e),At=o,At}var zs=Ps();St(zs);const Gs=k(import.meta.url),Be=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,it=e=>{if(typeof Be<"u"&&Be.versions&&Be.versions.node){const[t,o]=Be.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Be.getBuiltinModule(e)}return Gs(e)};it("fs");it("fs");it("path");it("url");const{createRequire:Us}=it("module");var Kt=Us(import.meta.url);try{Kt.resolve("picomatch"),Kt("picomatch")}catch{}var _t,Xt;function js(){if(Xt)return _t;Xt=1;/*!
5
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
6
- *
7
- * Copyright (c) 2014-2016, Jon Schlinkert.
8
- * Licensed under the MIT License.
9
- */return _t=function(e){if(typeof e!="string"||e==="")return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1},_t}var Et,Wt;function no(){if(Wt)return Et;Wt=1;/*!
10
- * is-glob <https://github.com/jonschlinkert/is-glob>
11
- *
12
- * Copyright (c) 2014-2017, Jon Schlinkert.
13
- * Released under the MIT License.
14
- */var e=js(),t={"{":"}","(":")","[":"]"},o=function(i){if(i[0]==="!")return!0;for(var s=0,n=-2,c=-2,f=-2,h=-2,g=-2;s<i.length;){if(i[s]==="*"||i[s+1]==="?"&&/[\].+)]/.test(i[s])||c!==-1&&i[s]==="["&&i[s+1]!=="]"&&(c<s&&(c=i.indexOf("]",s)),c>s&&(g===-1||g>c||(g=i.indexOf("\\",s),g===-1||g>c)))||f!==-1&&i[s]==="{"&&i[s+1]!=="}"&&(f=i.indexOf("}",s),f>s&&(g=i.indexOf("\\",s),g===-1||g>f))||h!==-1&&i[s]==="("&&i[s+1]==="?"&&/[:!=]/.test(i[s+2])&&i[s+3]!==")"&&(h=i.indexOf(")",s),h>s&&(g=i.indexOf("\\",s),g===-1||g>h))||n!==-1&&i[s]==="("&&i[s+1]!=="|"&&(n<s&&(n=i.indexOf("|",s)),n!==-1&&i[n+1]!==")"&&(h=i.indexOf(")",n),h>n&&(g=i.indexOf("\\",n),g===-1||g>h))))return!0;if(i[s]==="\\"){var A=i[s+1];s+=2;var R=t[A];if(R){var _=i.indexOf(R,s);_!==-1&&(s=_+1)}if(i[s]==="!")return!0}else s++}return!1},p=function(i){if(i[0]==="!")return!0;for(var s=0;s<i.length;){if(/[*?{}()[\]]/.test(i[s]))return!0;if(i[s]==="\\"){var n=i[s+1];s+=2;var c=t[n];if(c){var f=i.indexOf(c,s);f!==-1&&(s=f+1)}if(i[s]==="!")return!0}else s++}return!1};return Et=function(i,s){if(typeof i!="string"||i==="")return!1;if(e(i))return!0;var n=o;return s&&s.strict===!1&&(n=p),n(i)},Et}const Fs=k(import.meta.url),Me=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,uo=e=>{if(typeof Me<"u"&&Me.versions&&Me.versions.node){const[t,o]=Me.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Me.getBuiltinModule(e)}return Fs(e)},Ks=uo("path"),Xs=uo("os");var Rt,qt;function Ws(){if(qt)return Rt;qt=1;var e=no(),t=Ks.posix.dirname,o=Xs.platform()==="win32",p="/",i=/\\/g,s=/\\([!*?|[\](){}])/g;Rt=function(f,h){var g=Object.assign({flipBackslashes:!0},h);g.flipBackslashes&&o&&f.indexOf(p)<0&&(f=f.replace(i,p)),n(f)&&(f+=p),f+="a";do f=t(f);while(c(f));return f.replace(s,"$1")};function n(f){var h=f.slice(-1),g;switch(h){case"}":g="{";break;case"]":g="[";break;default:return!1}var A=f.indexOf(g);return A<0?!1:f.slice(A+1,-1).includes(p)}function c(f){return/\([^()]+$/.test(f)||f[0]==="{"||f[0]==="["||/[^\\][{[]/.test(f)?!0:e(f)}return Rt}var qs=Ws();St(qs);const Qs=k(import.meta.url),Ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Zs=e=>{if(typeof Ie<"u"&&Ie.versions&&Ie.versions.node){const[t,o]=Ie.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ie.getBuiltinModule(e)}return Qs(e)},{access:fn}=Zs("node:fs/promises"),Ys=k(import.meta.url),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vs=e=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[t,o]=De.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return De.getBuiltinModule(e)}return Ys(e)},{accessSync:Js}=Vs("node:fs");function ft(e,t=Do){ro(e),e=pt(e);try{return Js(e,t),!0}catch{return!1}}var er=no();St(er);const tr=k(import.meta.url),Pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,io=e=>{if(typeof Pe<"u"&&Pe.versions&&Pe.versions.node){const[t,o]=Pe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Pe.getBuiltinModule(e)}return tr(e)};io("node:fs/promises");io("node:fs");let or=class extends Error{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")}};const sr=k(import.meta.url),ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ao=e=>{if(typeof ze<"u"&&ze.versions&&ze.versions.node){const[t,o]=ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return ze.getBuiltinModule(e)}return sr(e)};ao("node:fs/promises");ao("node:zlib");const rr=k(import.meta.url),Ge=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lo=e=>{if(typeof Ge<"u"&&Ge.versions&&Ge.versions.node){const[t,o]=Ge.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ge.getBuiltinModule(e)}return rr(e)};lo("node:fs");lo("node:zlib");const nr=k(import.meta.url),Ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ur=e=>{if(typeof Ue<"u"&&Ue.versions&&Ue.versions.node){const[t,o]=Ue.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ue.getBuiltinModule(e)}return nr(e)},{createRequire:co}=ur("node:module"),ir=new Map([["Error",Error],["EvalError",EvalError],["RangeError",RangeError],["ReferenceError",ReferenceError],["SyntaxError",SyntaxError],["TypeError",TypeError],["URIError",URIError]]);typeof AggregateError<"u"&&ir.set("AggregateError",AggregateError);const ar=co(import.meta.url),je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,lr=e=>{if(typeof je<"u"&&je.versions&&je.versions.node){const[t,o]=je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return je.getBuiltinModule(e)}return ar(e)};lr("node:util");const cr=co(import.meta.url),Fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ct=e=>{if(typeof Fe<"u"&&Fe.versions&&Fe.versions.node){const[t,o]=Fe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Fe.getBuiltinModule(e)}return cr(e)};Ct("node:fs");Ct("node:path");Ct("node:url");const pr=k(import.meta.url),Ke=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,po=e=>{if(typeof Ke<"u"&&Ke.versions&&Ke.versions.node){const[t,o]=Ke.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ke.getBuiltinModule(e)}return pr(e)};po("node:fs");po("node:fs/promises");const fr=k(import.meta.url),Xe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,gr=e=>{if(typeof Xe<"u"&&Xe.versions&&Xe.versions.node){const[t,o]=Xe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Xe.getBuiltinModule(e)}return fr(e)};gr("node:fs");const dr=k(import.meta.url),We=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,mr=e=>{if(typeof We<"u"&&We.versions&&We.versions.node){const[t,o]=We.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return We.getBuiltinModule(e)}return dr(e)};mr("node:fs/promises");const br=k(import.meta.url),qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hr=e=>{if(typeof qe<"u"&&qe.versions&&qe.versions.node){const[t,o]=qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return qe.getBuiltinModule(e)}return br(e)};hr("node:fs");k(import.meta.url);const vr=k(import.meta.url),Qe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,yr=e=>{if(typeof Qe<"u"&&Qe.versions&&Qe.versions.node){const[t,o]=Qe.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Qe.getBuiltinModule(e)}return vr(e)};yr("node:crypto");new TextEncoder;const xr=k(import.meta.url),Ze=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ar=e=>{if(typeof Ze<"u"&&Ze.versions&&Ze.versions.node){const[t,o]=Ze.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ze.getBuiltinModule(e)}return xr(e)};Ar("node:fs/promises");const _r=k(import.meta.url),Ye=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Er=e=>{if(typeof Ye<"u"&&Ye.versions&&Ye.versions.node){const[t,o]=Ye.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ye.getBuiltinModule(e)}return _r(e)};Er("node:fs");const Rr=k(import.meta.url),Ve=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Tr=e=>{if(typeof Ve<"u"&&Ve.versions&&Ve.versions.node){const[t,o]=Ve.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Ve.getBuiltinModule(e)}return Rr(e)};Tr("node:fs/promises");const $r=k(import.meta.url),Je=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Sr=e=>{if(typeof Je<"u"&&Je.versions&&Je.versions.node){const[t,o]=Je.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return Je.getBuiltinModule(e)}return $r(e)};Sr("node:fs");const Cr=k(import.meta.url),et=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,wt=e=>{if(typeof et<"u"&&et.versions&&et.versions.node){const[t,o]=et.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return et.getBuiltinModule(e)}return Cr(e)},wr=wt("fs"),kr=wt("os"),Or=wt("path");var Tt={},Qt;function Nr(){if(Qt)return Tt;Qt=1;var e=Object.defineProperty,t=(g,A)=>e(g,"name",{value:A,configurable:!0}),o=wr,p=kr,i=Or;const s=t(g=>{let A="";for(let R=0;R<g.length;R+=1){const _=g[R],N=_.toUpperCase();A+=_===N?_.toLowerCase():N}return A},"invertCase"),n=new Map,c=t((g,A)=>{const R=i.join(g,`.is-fs-case-sensitive-test-${process.pid}`);try{return A.writeFileSync(R,""),!A.existsSync(s(R))}finally{try{A.unlinkSync(R)}catch{}}},"checkDirectoryCaseWithWrite"),f=t((g,A,R)=>{try{return c(g,R)}catch(_){if(A===void 0)return c(p.tmpdir(),R);throw _}},"checkDirectoryCaseWithFallback"),h=t((g,A=o,R=!0)=>{const _=g??process.cwd();if(R&&n.has(_))return n.get(_);let N;const te=s(_);return te!==_&&A.existsSync(_)?N=!A.existsSync(te):N=f(_,g,A),R&&n.set(_,N),N},"isFsCaseSensitive");return Tt.isFsCaseSensitive=h,Tt}Nr();const Hr=/^[A-Z]:\//i,at=(e="")=>e&&e.replaceAll("\\","/").replace(Hr,t=>t.toUpperCase()),Lr=/^[/\\]{2}/,Br=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,kt=/^[A-Z]:$/i,Mr=/\/$/,Ir=()=>{if(typeof process.cwd=="function")try{const e=process.cwd();if(typeof e=="string")return at(e)}catch{}return"/"},$t="/",fo=(e,t)=>{let o="",p=0,i=-1,s=0,n;for(let c=0;c<=e.length;++c){if(c<e.length)n=e[c];else{if(n==="/")break;n="/"}if(n==="/"){if(!(i===c-1||s===1))if(s===2){if(o.length<2||p!==2||!o.endsWith(".")||o.at(-2)!=="."){if(o.length>2){const f=o.lastIndexOf("/");f===-1?(o="",p=0):(o=o.slice(0,f),p=o.length-1-o.lastIndexOf("/")),i=c,s=0;continue}else if(o.length>0){o="",p=0,i=c,s=0;continue}}t&&(o+=o.length>0?"/..":"..",p=2)}else o.length>0?o+=`/${e.slice(i+1,c)}`:o=e.slice(i+1,c),p=c-i-1;i=c,s=0}else n==="."&&s!==-1?++s:s=-1}return o},be=e=>Br.test(e),Dr=function(e){if(e.length===0)return".";e=at(e);const t=Lr.exec(e),o=be(e),p=e.at(-1)==="/";return e=fo(e,!o),e.length===0?o?"/":p?"./":".":(p&&(e+="/"),kt.test(e)&&(e+="/"),t?o?`//${e}`:`//./${e}`:o&&!be(e)?`/${e}`:e)},oe=(...e)=>{let t="";for(const o of e)if(o)if(t.length>0){const p=t.at(-1)==="/",i=o[0]==="/";p&&i?t+=o.slice(1):t+=p||i?o:`/${o}`}else t+=o;return Dr(t)},Pr=function(...e){e=e.map(p=>at(p));let t="",o=!1;for(let p=e.length-1;p>=-1&&!o;p--){const i=p>=0?e[p]:Ir();!i||i.length===0||(t=`${i}/${t}`,o=be(i))}return t=fo(t,!o),kt.test(t)?`${t}/`:o&&!be(t)?`/${t}`:t.length>0?t:"."},zr=e=>{const t=at(e).replace(Mr,""),o=t.lastIndexOf("/");if(o===-1)return be(e)?"/":".";const p=t.slice(0,o);return kt.test(p)?`${p}/`:p||(be(e)?"/":".")};let Gr;const Ur=e=>(Gr??=k(import.meta.url))(e),tt=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,jr=e=>{if(typeof tt<"u"&&tt.versions&&tt.versions.node){const[t,o]=tt.versions.node.split(".").map(Number);if(t>22||t===22&&o>=3||t===20&&o>=16)return tt.getBuiltinModule(e)}return Ur(e)},{fileURLToPath:Fr}=jr("node:url");function Kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zt,Yt;function Xr(){return Yt||(Yt=1,Zt=["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"]),Zt}var Wr=Xr();const qr=Kr(Wr);new Set(qr);const go=e=>at(e instanceof URL?Fr(e):e),Vt=e=>{const t=Mo();if(Ht==="win32"){const s=st.LOCALAPPDATA,n=t?oe(t,"AppData","Local"):mt(),c=s&&s.length>0?s:n;return oe(c,e,"Cache")}if(Ht==="darwin"){const s=t?oe(t,"Library","Caches"):mt();return oe(s,e)}const o=st.XDG_CACHE_HOME,p=t?oe(t,".cache"):mt(),i=o&&o.length>0?o:p;return oe(i,e)},Qr=e=>{if(e.length===0)return;const t=e.map(s=>Pr(go(s)).split($t));let o=Number.POSITIVE_INFINITY;for(const s of t)s.length<o&&(o=s.length);const p=[];for(let s=0;s<o;s+=1){const n=t[0][s];if(t.every(c=>c[s]===n))p.push(n);else break}const i=p.join($t);return i===""?$t:i},ot=(e,t)=>{if(e!==void 0)return t?(...o)=>oe(e,...o):e},Zr=e=>{if(e?.files&&e.files.length>0){const t=Qr(e.files);if(t!==void 0)return t}return e?.cwd??Io()},Yr=e=>new or(`No package.json found searching upwards from '${go(e)}'.`),Vr=e=>!ft(e,oo)&&ft(e),Jr=(e,t)=>{if(st.CACHE_DIR&&!["0","1","false","true"].includes(st.CACHE_DIR)){const h=oe(st.CACHE_DIR,e);return t?.create&&Re(h),ot(h,t?.thunk)}const o=Zr(t),p=Bs("package.json",{cwd:o,type:"file"});if(!p){if(t?.useGlobalCacheFallback){const h=Vt(e);return t.create&&Re(h),ot(h,t.thunk)}if(t?.throwError)throw Yr(o);return}const i=zr(p),s=oe(i,"node_modules"),n=oe(s,".cache"),c=oe(n,e);if(ft(c,oo))return t?.create&&Re(c),ot(c,t?.thunk);const f=[c,n,s];if(ft(s)||f.push(i),f.some(h=>Vr(h))){if(t?.useGlobalCacheFallback){const h=Vt(e);return t.create&&Re(h),ot(h,t.thunk)}return}return t?.create&&Re(c),ot(c,t?.thunk)},gn=Jr,Jt="@inherit",en=["aliases","dependsOn","inputs","outputs"],tn=(e,t)=>{if(t===void 0)return e===void 0?void 0:[...e];if(!t.includes(Jt))return[...t];const o=[];for(const p of t){if(p===Jt){e!==void 0&&o.push(...e);continue}o.push(p)}return o},dn=(e,t)=>{const o={...e,...t};for(const p of en){const i=e?.[p],s=t?.[p],n=tn(i,s);n===void 0?delete o[p]:o[p]=n}return o};export{gn as K,un as T,dn as m};
@@ -1,5 +0,0 @@
1
- import{createRequire as z}from"node:module";import{e as p,l as H,a as M}from"./index-BdMIfGVZ.js";import{y as v}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";import{p as A}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";let B;const D=e=>(B??=z(import.meta.url))(e),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,T=e=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[n,t]=k.versions.node.split(".").map(Number);if(n>22||n===22&&t>=3||n===20&&t>=16)return k.getBuiltinModule(e)}return D(e)},{execFileSync:P}=T("node:child_process"),{randomBytes:L}=T("node:crypto"),{writeFileSync:V,renameSync:q,unlinkSync:R}=T("node:fs"),{delimiter:U}=T("node:path"),J=["proto","mise","fnm","volta","asdf","nvm","corepack"],G={asdf:["bun","go","node","npm","pnpm","python","ruby","rust","yarn"],corepack:["npm","pnpm","yarn"],fnm:["node"],mise:["aube","bun","go","node","npm","pnpm","python","ruby","rust","yarn"],nvm:["node"],proto:["bun","go","node","npm","pnpm","python","ruby","rust","yarn"],volta:["node","npm","pnpm","yarn"]},Z=["proto","mise","fnm","volta","asdf","nvm","corepack"],O={asdf:[".tool-versions"],corepack:[],fnm:[".nvmrc",".node-version"],mise:[".mise.toml",".config/mise.toml","mise.toml"],nvm:[".nvmrc"],proto:[".prototools"],volta:[]},y=new Map,b=e=>{const n=y.get(e);if(n!==void 0||y.has(e))return n;const t=process.env.PATH;if(!t){y.set(e,void 0);return}const o=process.platform==="win32"?["",...(process.env.PATHEXT??".COM;.EXE;.BAT;.CMD").split(";")]:[""];for(const i of t.split(U)){const c=i.replaceAll(/^["']|["']$/g,"").trim();if(c!=="")for(const s of o){const a=`${c}${H}${e}${s}`;if(v(a))return y.set(e,a),a}}y.set(e,void 0)},S=(e,n=["--version"])=>{try{const t=P(e,n,{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}),r=/\d+\.\d+(?:\.\d+)?/.exec(t);return r?r[0]:t.trim()||void 0}catch{return}},j=(e,n)=>{const t=p(e,"package.json");if(!v(t))return[];try{const o=A(t)[n];if(n==="volta"&&typeof o=="object"&&o!==null&&Object.keys(o).length>0)return["package.json"];if(n==="packageManager"&&typeof o=="string"&&o.length>0)return["package.json"]}catch{}return[]},X=(e,n)=>e==="volta"?j(n,"volta"):e==="corepack"?j(n,"packageManager"):O[e].filter(t=>v(p(n,t))),x=new Map,Y=()=>{x.clear(),y.clear()},N=(e,n)=>{{const i=x.get(e);if(i)return i}const t=[],r=!!b("pnpm")||!!b("yarn");for(const i of Z){const c=i==="nvm"?void 0:b(i),s=i==="nvm"&&!!process.env.NVM_DIR,a=X(i,e),l=!!c||s;i==="corepack"&&!l&&(!(a.length>0)||r)||!l&&a.length===0||t.push({binPath:c,configFiles:a,installed:l,name:i,version:c?S(c):void 0})}const o=Object.freeze(t);return x.set(e,o),o},$n=(e,n,t)=>{const r=N(e);return n?.preferredManager&&n.preferredManager!=="none"?r.find(o=>o.name===n.preferredManager)??{configFiles:[],installed:!1,name:n.preferredManager}:r.find(o=>o.installed&&o.configFiles.length>0)??r.find(o=>o.installed)??r.find(o=>o.configFiles.length>0)??{configFiles:[],installed:!1,name:"none"}},K=(e,n)=>{for(const t of n){const r=p(e,t);if(v(r))try{const o=M(r).trim();if(o!=="")return{name:t,value:o.replace(/^v/,"")}}catch{}}},Q=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,nn=e=>{const n=p(e,".prototools");if(!v(n))return[];const t=M(n),r=[];let o=!1;for(const i of t.split(/\r?\n/)){const c=i.trim();if(c===""||c.startsWith("#"))continue;if(c.startsWith("[")){o=!0;continue}if(o)continue;const s=Q.exec(c);if(!s)continue;const[,a,l]=s,f=g(a);f&&r.push({source:".prototools",tool:f,version:l.trim()})}return r},en=/^\[tools\]\s*$/i,tn=/^([a-z][\w-]*)\s*=\s*"?([^"\n#]+?)"?\s*(?:#.*)?$/i,on=e=>{for(const n of O.mise){const t=p(e,n);if(!v(t))continue;const r=[],o=M(t);let i=!1;for(const c of o.split(/\r?\n/)){const s=c.trim();if(s===""||s.startsWith("#"))continue;if(s.startsWith("[")){i=en.test(s);continue}if(!i)continue;const a=tn.exec(s);if(!a)continue;const[,l,f]=a,d=g(l);d&&r.push({source:".mise.toml",tool:d,version:f.trim()})}if(r.length>0)return r}return[]},rn=e=>{const n=p(e,".tool-versions");if(!v(n))return[];const t=M(n),r=[];for(const o of t.split(/\r?\n/)){const i=o.trim();if(i===""||i.startsWith("#"))continue;const c=i.split(/\s+/);if(c.length<2)continue;const[s,...a]=c,l=g(s);l&&a[0]&&r.push({source:".tool-versions",tool:l,version:a[0]})}return r},g=e=>{switch(e.toLowerCase()){case"aube":return"aube";case"bun":return"bun";case"go":case"golang":return"go";case"node":case"nodejs":return"node";case"npm":return"npm";case"pnpm":return"pnpm";case"python":case"python3":return"python";case"ruby":return"ruby";case"rust":case"rustc":return"rust";case"yarn":return"yarn";default:return}},sn=e=>{const[n]=e.split("+",1),t=/^(pnpm|yarn|npm|bun)@(.+)$/.exec(n??"");if(!t)return;const r=g(t[1]);if(r)return{source:"packageManager",tool:r,version:t[2]}},an=(e,n)=>{const t=new Map,r=s=>{t.set(s.tool,s)},o=p(e,"package.json");let i={};try{v(o)&&(i=A(o))}catch{}if(i.engines)for(const[s,a]of Object.entries(i.engines)){const l=g(s);l&&typeof a=="string"&&r({source:"engines",tool:l,version:a})}if(i.packageManager){const s=sn(i.packageManager);s&&r(s)}if(i.volta)for(const[s,a]of Object.entries(i.volta)){const l=g(s);l&&typeof a=="string"&&r({source:"volta",tool:l,version:a})}const c=K(e,[".nvmrc",".node-version"]);c&&r({source:c.name===".nvmrc"?".nvmrc":".node-version",tool:"node",version:c.value});for(const s of rn(e))r(s);for(const s of on(e))r(s);for(const s of nn(e))r(s);if(n?.tools)for(const[s,a]of Object.entries(n.tools)){const l=g(s);l&&typeof a=="string"&&r({source:"vis.config.ts",tool:l,version:a})}return[...t.values()]},E={aube:{args:["--version"],binaries:["aube"]},bun:{args:["--version"],binaries:["bun"]},go:{args:["version"],binaries:["go"]},node:{args:["--version"],binaries:["node"]},npm:{args:["--version"],binaries:["npm"]},pnpm:{args:["--version"],binaries:["pnpm"]},python:{args:["--version"],binaries:["python","python3"]},ruby:{args:["--version"],binaries:["ruby"]},rust:{args:["--version"],binaries:["rustc"]},yarn:{args:["--version"],binaries:["yarn"]}},F=e=>{const n=E[e];for(const t of n.binaries){const r=b(t);if(r)return S(r,n.args)}if(e==="node")return process.versions.node},W=(e,n)=>{const t=n.trim();if(t===""||t==="*"||t==="latest")return!0;if(/^\d[\d.]*$/.test(t))return e===t||e.startsWith(`${t}.`);const r=s=>s.split(/[.\-+]/).map(a=>Number.parseInt(a,10)||0),o=(s,a)=>{const l=r(s),f=r(a),d=Math.max(l.length,f.length);for(let h=0;h<d;h++){const $=l[h]??0,u=f[h]??0;if($!==u)return $-u}return 0},i=s=>{for(const a of s)if(a.startsWith(">=")){if(o(e,a.slice(2).trim())<0)return!1}else if(a.startsWith("<=")){if(o(e,a.slice(2).trim())>0)return!1}else if(a.startsWith(">")){if(o(e,a.slice(1).trim())<=0)return!1}else if(a.startsWith("<")){if(o(e,a.slice(1).trim())>=0)return!1}else if(a.startsWith("^")||a.startsWith("~")){const l=a.slice(1).trim(),[f,d]=r(l),[h,$]=r(e);if(h!==f||a.startsWith("~")&&$!==d||o(e,l)<0)return!1}return!0},c=t.split("||").map(s=>s.trim().split(/\s+/).filter(Boolean)).filter(s=>s.length>0);return c.length===0?!0:c.some(s=>i(s))},cn=(e,n)=>{switch(e){case".mise.toml":return["mise"];case".node-version":case".nvmrc":return["fnm","nvm","volta","proto","mise","asdf"];case".prototools":return["proto"];case".tool-versions":return["asdf","mise"];case"packageManager":return n==="pnpm"||n==="yarn"?["self-activate","volta","proto","mise","corepack"]:n==="npm"?["volta","proto","mise","asdf","corepack"]:n==="aube"?["mise"]:n==="bun"?["proto","mise","asdf"]:["volta","proto","mise"];case"volta":return["volta"];default:return["proto","mise","fnm","volta","asdf","nvm","corepack"]}},ln=(e,n,t)=>{if(t?.preferredManager&&t.preferredManager!=="none"&&_(t.preferredManager,e.tool)){const o=n.find(i=>i.name===t.preferredManager);return o?{installed:o.installed,name:o.name}:{installed:!1,name:t.preferredManager,note:`${t.preferredManager} is the preferred manager but isn't on PATH`}}const r=cn(e.source,e.tool);for(const o of r){if(o==="self-activate"){if((e.tool==="pnpm"||e.tool==="yarn")&&b(e.tool))return{installed:!0,name:"self-activate",note:`${e.tool} will activate ${e.version} from the packageManager field on next invocation`};continue}if(!_(o,e.tool))continue;if(n.find(c=>c.name===o)?.installed)return{installed:!0,name:o}}for(const o of r)if(!(o==="self-activate"||!_(o,e.tool)))return{installed:!1,name:o,note:`${o} can install ${e.tool} — run \`vis toolchain install\` after adding it to PATH`};return{installed:!1,name:"none",note:"No manager knows how to install this tool"}},_=(e,n)=>e==="none"?!1:e==="self-activate"?n==="pnpm"||n==="yarn":G[e].includes(n),fn=(e,n)=>{const t=N(e),o=an(e,n).map(i=>{const c=F(i.tool),s=c!==void 0&&W(c,i.version),a=ln(i,t,n);return{actual:c,expected:i,manager:a,matches:s}});return{detected:t,tools:o}},un=(e,n)=>{switch(e){case"asdf":return n?{args:["install",n.tool,n.version],bin:"asdf"}:void 0;case"corepack":return n?{args:["prepare",`${n.tool}@${n.version}`,"--activate"],bin:"corepack"}:{args:["prepare","--activate"],bin:"corepack",hint:"reads the packageManager field in package.json"};case"fnm":return n?.tool!=="node"?void 0:{args:["install",n.version],bin:"fnm"};case"mise":return n?{args:["install",`${n.tool}@${n.version}`],bin:"mise"}:void 0;case"none":return;case"nvm":return{args:[],bin:"nvm",hint:"nvm is a shell function — run `nvm install` / `nvm use` from your shell"};case"proto":return n?{args:["install",n.tool,n.version],bin:"proto"}:void 0;case"self-activate":return{args:[],bin:n?.tool??"pnpm",hint:`${n?.tool??"pnpm"} will self-activate on next invocation — no install needed`};case"volta":return n?{args:["install",`${n.tool}@${n.version}`],bin:"volta"}:{args:["install","node@lts"],bin:"volta",hint:"volta pins per-tool; specify <tool>@<version>"};default:{const t=e;throw new Error(`Unknown manager: ${t}`)}}},yn=(e,n)=>{switch(e){case"asdf":return{args:["local",n.tool,n.version],bin:"asdf",configChange:{file:".tool-versions",hint:`Pins ${n.tool} ${n.version}`}};case"corepack":return n.tool!=="npm"&&n.tool!=="pnpm"&&n.tool!=="yarn"?void 0:{args:["use",`${n.tool}@${n.version}`],bin:"corepack",configChange:{file:"package.json",hint:`Writes packageManager: "${n.tool}@${n.version}"`}};case"fnm":return n.tool==="node"?{args:["use",n.version],bin:"fnm"}:void 0;case"mise":return{args:["use","--",`${n.tool}@${n.version}`],bin:"mise",configChange:{file:".mise.toml",hint:`Pins ${n.tool} ${n.version}`}};case"none":return;case"nvm":return n.tool==="node"?{args:[],bin:"nvm",configChange:{file:".nvmrc",hint:"Write version to .nvmrc manually (nvm doesn't persist)."}}:void 0;case"proto":return{args:["pin",n.tool,n.version],bin:"proto",configChange:{file:".prototools",hint:`Pins ${n.tool} ${n.version}`}};case"self-activate":return{args:[],bin:n.tool,configChange:{file:"package.json",hint:`Set packageManager: "${n.tool}@${n.version}" — ${n.tool} will self-activate on next invocation`}};case"volta":return{args:["pin",`${n.tool}@${n.version}`],bin:"volta",configChange:{file:"package.json",hint:`Writes volta.${n.tool}`}};default:{const t=e;throw new Error(`Unknown manager: ${t}`)}}},Mn=e=>{for(const n of E[e].binaries){const t=b(n);if(t)return t}},wn=(e,n)=>{const t=E[n].binaries;if(e.installed&&e.binPath&&(e.name==="proto"||e.name==="mise"||e.name==="asdf"||e.name==="volta"||e.name==="fnm"))for(const r of t)try{const i=P(e.binPath,["which",r],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3}).trim();if(i)return i}catch{}for(const r of t){const o=b(r);if(o)return o}},I=(e,n)=>{const t=`${e}.${process.pid}.${L(6).toString("hex")}.tmp`;V(t,n);try{q(t,e)}catch(r){try{R(t)}catch{}throw r}},dn=(e,n)=>{if("packageManager"in e)return e.packageManager=n,e;const t={};let r=!1;for(const[o,i]of Object.entries(e))!r&&(o==="dependencies"||o==="devDependencies"||o==="peerDependencies"||o==="optionalDependencies")&&(t.packageManager=n,r=!0),t[o]=i;return r||(t.packageManager=n),t},kn=(e,n)=>{if(n.tool!=="pnpm"&&n.tool!=="yarn"&&n.tool!=="npm"&&n.tool!=="bun")return;const t=p(e,"package.json");if(!v(t))throw new Error(`Cannot pin ${n.tool}: ${t} does not exist.`);const r=M(t),i=/\n([ \t]+)/.exec(r)?.[1]??" ";let c;try{c=JSON.parse(r)}catch(f){throw new Error(`${t} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${f.message}`,{cause:f})}const s=`${n.tool}@${n.version}`,a=dn(c,s),l=r.endsWith(`
2
- `)?`
3
- `:"";return I(t,`${JSON.stringify(a,void 0,i)}${l}`),s},Tn=(e,n)=>{const t=p(e,"package.json");if(!v(t))return;const r=M(t);let o;try{o=JSON.parse(r)}catch(a){throw new Error(`${t} is not valid JSON — fix it before running \`vis toolchain use\`. Underlying error: ${a.message}`,{cause:a})}if(o.engines?.[n.tool]===void 0||o.engines[n.tool]===n.version)return;o.engines[n.tool]=n.version;const c=/\n([ \t]+)/.exec(r)?.[1]??" ",s=r.endsWith(`
4
- `)?`
5
- `:"";return I(t,`${JSON.stringify(o,void 0,c)}${s}`),n.version},Pn=e=>{const n=/^([a-z][\w-]*)@(.+)$/i.exec(e.trim());if(!n)return;const t=g(n[1]);if(t)return{source:"vis.config.ts",tool:t,version:n[2]}},mn=async(e,n,t)=>{const r=fn(e,n),o=r.tools.filter(f=>!f.matches);if(o.length===0)return{attempted:[],failed:[],upToDate:!0};const i=r.detected.some(f=>f.installed);if(!(n?.autoInstall??i))return{attempted:[],failed:[],upToDate:!1};const s=[],a=[],l=new Map;for(const f of o){const d=l.get(f.manager.name);d?d.push(f):l.set(f.manager.name,[f])}for(const[f,d]of l){if(f==="self-activate"){for(const{expected:u}of d)t.info(`toolchain: ${u.tool} ${u.version} will self-activate on next ${u.tool} invocation`),s.push(u);continue}if(f==="none"){for(const{expected:u}of d)a.push({error:`no manager can install ${u.tool} — install one of ${J.join(", ")}`,spec:u});continue}if(!r.detected.find(u=>u.name===f)?.installed){for(const{expected:u}of d)a.push({error:`${f} is not on PATH`,spec:u});continue}const $=d.map(u=>({invocation:un(f,u.expected),tool:u})).filter(u=>u.invocation!==void 0);for(const{invocation:u,tool:C}of $){const{expected:m}=C;if(u.bin==="nvm"&&u.args.length===0){const w=F(m.tool);if(w!==void 0&&W(w,m.version)){t.info(`toolchain: ${m.tool} ${w} already satisfies ${m.version}; skipping nvm shell activation`),s.push(m);continue}t.warn(`toolchain: nvm requires a shell-side activation for ${m.tool} ${m.version}. Run \`nvm install\` / \`nvm use\` manually.`),a.push({error:"nvm requires shell-side activation",spec:m});continue}t.info(`toolchain: $ ${u.bin} ${u.args.join(" ")}`);try{P(u.bin,u.args,{cwd:e,stdio:"inherit"}),s.push(m),f==="fnm"&&vn(u.bin,t)}catch(w){a.push({error:w.message,spec:m});break}}}return Y(),{attempted:s,failed:a,upToDate:!1}},_n=async(e,n,t,r=!1)=>{if(r)return;const o=await mn(e,n,t);for(const i of o.failed)t.warn(`toolchain: ${i.spec.tool} ${i.spec.version} — ${i.error}`)},vn=(e,n)=>{const t=process.platform==="win32"?"powershell":"bash";try{const r=P(e,["env","--shell",t],{encoding:"utf8",stdio:["ignore","pipe","ignore"],timeout:2e3});for(const o of r.split(/\r?\n/)){const i=o.trim();if(i==="")continue;const c=/^\$env:([A-Z_]\w*)\s*=\s*(.+)$/i.exec(i);if(c){const[,l,f]=c;process.env[l]=f.replaceAll(/^["']|["']$/g,"");continue}const s=/^set\s+"?([A-Z_]\w*)=(.*?)"?$/i.exec(i);if(s){const[,l,f]=s;process.env[l]=f;continue}const a=/^(?:export\s+)?([A-Z_]\w*)=(.+)$/i.exec(i);if(a){const[,l,f]=a;process.env[l]=f.replaceAll(/^["']|["']$/g,"")}}}catch(r){n.warn(`toolchain: could not activate fnm env (${r.message}). Subsequent tasks may use the previous Node version.`)}};export{J as S,Pn as a,un as b,ln as c,yn as d,wn as e,N as f,fn as g,Mn as h,$n as p,_n as r,Tn as u,kn as w};
@@ -1,11 +0,0 @@
1
- import{createRequire as B}from"node:module";import{e as h,a as U,z as S,U as z,$ as K}from"./index-BdMIfGVZ.js";import{T as A}from"../packem_chunks/catalog.js";import{y as k}from"./isAccessibleSync-DYKTrrvc-BwaMhQs0.js";import{p as G}from"./readJsonSync-CbryXYxN-Bm5i10UW.js";import{h as re}from"./writeFileSync-DJoHk3Ks-Dhem3Uof.js";import{s as oe}from"./watch-Dr_6yz3o.js";let V;const J=e=>(V??=B(import.meta.url))(e),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,x=e=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[t,n]=y.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return y.getBuiltinModule(e)}return J(e)},{createHash:v}=x("node:crypto"),{spawnSync:H,spawn:Y}=x("node:child_process"),{openSync:Q,writeSync:X,closeSync:Z,statSync:ee,readFileSync:E,mkdirSync:te,writeFileSync:ne}=x("node:fs"),{pathToFileURL:se}=x("node:url"),{availableParallelism:F}=x("node:os"),j=(e,t)=>{for(const n of["dependencies","devDependencies","optionalDependencies","peerDependencies"]){const r=e[n];if(r&&typeof r[t]=="string")return r[t]}},D=(e,t)=>{for(const n of t){const r=h(e,n);if(k(r))return r}},ie=e=>{const t=h(e,"package.json");if(!k(t))return{};try{return G(t)}catch{return{}}},Xe=(e,t)=>{const n=ie(e),r=new Map;for(const o of t){const s=o.detect(e,n);s&&r.set(o.id,s)}return r},ce={error:"error",info:"info",information:"info",warning:"warning"},Ze={argsCheck:(e,t)=>I(e,t,!1),argsFix:(e,t)=>I(e,t,!0),bin:()=>["pnpm","exec","biome"],cacheKey:(e,t)=>{const n=["biome",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:(e,t)=>{const n=j(t,A.biome.packageNames[0]),r=D(e,A.biome.configFiles);if(!(!n&&!r))return{adapter:"biome",configFile:r,declared:!!n,declaredVersion:n,root:e}},extensions:["astro","cjs","css","cts","js","json","jsonc","jsx","mjs","mts","svelte","ts","tsx","vue"],id:"biome",kind:"both",parse:(e,t)=>{if(!e.stdout.trim())return[];let n;try{n=JSON.parse(e.stdout)}catch{return[{adapter:"biome",file:t.root,fixable:!1,message:`biome output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const r=[];for(const o of n.diagnostics??[]){const s=o.location?.start,i=o.location?.end,c=ae(t.root,o.location?.path),u=o.category??"",a=u==="format"||u.startsWith("format/");r.push({adapter:"biome",column:s?.column&&s.column>0?s.column:void 0,endColumn:i?.column&&i.column>0?i.column:void 0,endLine:i?.line&&i.line>0?i.line:void 0,file:c,fixable:!0,line:s?.line&&s.line>0?s.line:void 0,message:a?"Code style issues would be auto-fixed":o.message??"",ruleId:u||void 0,severity:ce[o.severity??""]??"warning"})}return r}},I=(e,t,n)=>{const r=["check","--reporter=json"];return n&&r.push("--write"),typeof t.maxWarnings=="number"&&r.push(`--max-diagnostics=${String(t.maxWarnings)}`),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},ae=(e,t)=>{const n=typeof t=="string"?t:t?.file;return n?n.startsWith("/")||/^[a-z]:[\\/]/i.test(n)?n:h(e,n):e},O="pyproject.toml",le=/^\[tool\.ruff(?:\.[\w-]+)*\]\s*$/m,ue=/^Would reformat:?\s+(.+)$/,de=e=>{const t=h(e,O);if(!k(t))return!1;try{const n=U(t);return le.test(n)}catch{return!1}},P=e=>(t,n)=>{const r=A.ruff.packageNames.map(c=>j(n,c)).find(c=>c!==void 0),o=D(t,A.ruff.configFiles),s=o?void 0:de(t)?h(t,O):void 0,i=o??s;if(!(!r&&!i))return{adapter:e,configFile:i,declared:!!r,declaredVersion:r,root:t}},fe=e=>e.startsWith("/")||/^[a-z]:[\\/]/i.test(e),N=(e,t)=>e?fe(e)?e:h(t,e):t,pe=e=>ue.exec(e)?.[1]?.trim(),et={argsCheck:(e,t)=>R(e,t,!1),argsFix:(e,t)=>R(e,t,!0),bin:()=>["ruff","check"],cacheKey:(e,t)=>{const n=["ruff-check",e.declaredVersion??"unknown",e.configFile??"no-config",t.maxWarnings===void 0?"":`mw=${t.maxWarnings}`,t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:P("ruff-check"),extensions:["py","pyi"],id:"ruff-check",kind:"lint",parse:(e,t)=>{if(!e.stdout.trim())return[];let n;try{n=JSON.parse(e.stdout)}catch{return[{adapter:"ruff-check",file:t.root,fixable:!1,message:`ruff check output was not valid JSON (exit ${e.exitCode})`,severity:"error"}]}const r=[];for(const o of n){const s=o.location,i=o.end_location;r.push({adapter:"ruff-check",column:s?.column,endColumn:i?.column,endLine:i?.row,file:N(o.filename,t.root),fixable:!!o.fix,line:s?.row,message:o.message??"",ruleId:o.code,severity:"warning"})}return r}},tt={argsCheck:(e,t)=>T(e,t,!1),argsFix:(e,t)=>T(e,t,!0),bin:()=>["ruff","format"],cacheKey:(e,t)=>{const n=["ruff-fmt",e.declaredVersion??"unknown",e.configFile??"no-config",t.quiet?"q":"",...t.extraArgs??[]];return v("sha256").update(n.join("|")).digest("hex").slice(0,16)},detect:P("ruff-fmt"),extensions:["py","pyi"],id:"ruff-fmt",kind:"fmt",parse:(e,t)=>{if(e.exitCode===0)return[];const n=[],r=new Set;for(const o of e.stdout.split(/\r?\n/)){const s=pe(o);!s||r.has(s)||(r.add(s),n.push({adapter:"ruff-fmt",file:N(s,t.root),fixable:!0,message:"Code style issues would be auto-fixed",severity:"info"}))}return n}},R=(e,t,n)=>{const r=["--output-format=json"];return n&&r.push("--fix"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},T=(e,t,n)=>{const r=[];return n||r.push("--check"),t.quiet&&r.push("--quiet"),t.extraArgs?.length&&r.push(...t.extraArgs),r.push(...e),r},nt=(e,t)=>{const n=w(e,["diff","--name-only","--diff-filter=ACMR","-z",`${t}...HEAD`]);if(n===void 0)return;const r=w(e,["diff","--name-only","--diff-filter=ACMR","-z"]),o=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]),s=w(e,["ls-files","--others","--exclude-standard","-z"]),i=new Set;for(const c of[n,r??"",o??"",s??""])for(const u of c.split("\0"))u.length!==0&&i.add(S(u)?u:h(e,u));return[...i].sort()},rt=e=>{const t=w(e,["diff","--name-only","--diff-filter=ACMR","--cached","-z"]);if(t===void 0)return;const n=new Set;for(const r of t.split("\0"))r.length!==0&&n.add(S(r)?r:h(e,r));return[...n].sort()},w=(e,t)=>{const n=H("git",[...t],{cwd:e,encoding:"utf8",timeout:1e4});if(n.status===0)return n.stdout},st=(e,t)=>{const n=new Set(t.map(s=>s.toLowerCase())),r=[],o=new Set;for(const s of e){const i=s.lastIndexOf(".");if(i===-1||i===s.length-1)continue;const c=s.slice(i+1).toLowerCase();n.has(c)&&(o.has(s)||(o.add(s),r.push(s)))}return r},he=new Set(["-","stdout"]),_=e=>({close:()=>{},write:t=>{e.write(t)}}),me=e=>{re(K(e));const t=Q(e,"w");let n=[];return{close:()=>{n.length>0&&(X(t,n.join("")),n=[]),Z(t)},write:r=>{n.push(r)}}},ot=e=>{const{cwd:t,target:n}=e;if(n===void 0||he.has(n))return _(process.stdout);if(n==="stderr")return _(process.stderr);const r=S(n)?n:z(t,n);return me(r)},C=["oxlint","oxfmt","biome","eslint","dprint","prettier","stylelint","ruff-check","ruff-fmt","markdownlint","shellcheck","typecheck"],it=(e,t)=>{const n=new Map(e.map(i=>[i.id,i])),r=[],o=new Set,s=t&&t.length>0?t:C;for(const i of s){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}if(t&&t.length>0)for(const i of C){const c=n.get(i);c&&!o.has(i)&&(r.push(c),o.add(i))}for(const i of e)o.has(i.id)||(r.push(i),o.add(i.id));return r},ct=(e,t,n)=>{const r=[];for(const o of t){const s=e.get(o.id);s&&ge(o.kind,n)&&r.push({adapter:o,presence:s})}return r},ge=(e,t)=>e===t||e==="both",at=(e,t,n={})=>{const r=new Map;for(const o of e){const s=ye(o),i=we(s,t,n);if(!i)continue;const c=r.get(i);c?c.push(o):r.set(i,[o])}return r},ye=e=>{const t=e.lastIndexOf(".");return t===-1||t===e.length-1?"":e.slice(t+1).toLowerCase()},we=(e,t,n)=>{const r=n[e];if(r&&t.some(o=>o.adapter.id===r))return r;for(const{adapter:o}of t)if(o.extensions.includes(e))return o.id},lt=(e,t,n)=>{const r=new Set(C),o=new Set([...n?.order??[],...Object.keys(n?.adapters??{})]);for(const s of o)r.has(s)||e.warn(`vis.config ${t}: unknown adapter "${s}" is ignored.`)},xe=e=>e==="error"?"error":e==="warning"?"warning":"notice",W=e=>e.replaceAll("%","%25").replaceAll("\r","%0D").replaceAll(`
2
- `,"%0A"),b=e=>W(e).replaceAll(",","%2C").replaceAll(":","%3A").replaceAll("=","%3D"),ve=(e,t)=>t&&e.startsWith(`${t}/`)?e.slice(t.length+1):e,Se=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),Ae=(e,t)=>{const n=xe(e.severity),r=ve(e.file,t),o=e.ruleId?`${e.adapter}(${e.ruleId})`:e.adapter,s=[`file=${b(r)}`];return e.line!==void 0&&s.push(`line=${String(e.line)}`),e.endLine!==void 0&&s.push(`endLine=${String(e.endLine)}`),e.column!==void 0&&s.push(`col=${String(e.column)}`),e.endColumn!==void 0&&s.push(`endColumn=${String(e.endColumn)}`),s.push(`title=${b(o)}`),`::${n} ${s.join(",")}::${W(e.message)}
3
- `},ut=e=>e.runs.flatMap(n=>[...n.findings]).sort(Se).map(n=>Ae(n,e.workspaceRoot)).join(""),g=e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&apos;"),$e=e=>`<![CDATA[${e.replaceAll("]]>","]]]]><![CDATA[>")}]]>`,Ce=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),ke=e=>e==="error"?"error":e==="warning"?"warning":"info",Fe=(e,t)=>{let{file:n}=e;return t&&e.file.startsWith(`${t}/`)&&(n=e.file.slice(t.length+1)),e.line===void 0?n:e.column===void 0?`${n}:${String(e.line)}`:`${n}:${String(e.line)}:${String(e.column)}`},Ie=(e,t,n)=>{const r=Fe(e,n),o=ke(e.severity),s=e.ruleId?`[${e.ruleId}] ${e.message}`:e.message;return[` <testcase classname="${g(t)}" name="${g(r)}">`,` <failure type="${g(o)}" message="${g(s)}">${$e(e.message)}</failure>`," </testcase>",""].join(`
4
- `)},Re=(e,t,n)=>{const r=[...e.findings].sort(Ce),o=r.filter(d=>d.severity==="error").length,s=r.filter(d=>d.severity==="warning").length,i=r.length,c=(e.durationMs/1e3).toFixed(3),u=r.map(d=>Ie(d,e.adapter,n)).join("");return` <testsuite ${[`name="${g(e.adapter)}"`,`tests="${String(i)}"`,`failures="${String(o)}"`,'errors="0"',`skipped="${String(s)}"`,`time="${c}"`,`timestamp="${t}"`].join(" ")}>
5
- ${u} </testsuite>
6
- `},dt=e=>{const t=(e.now??new Date).toISOString(),n=e.suiteName??"vis-lint-fmt",r=e.runs.map(a=>Re(a,t,e.workspaceRoot)).join(""),o=e.runs.reduce((a,d)=>a+d.findings.length,0),s=e.runs.reduce((a,d)=>a+d.findings.filter(l=>l.severity==="error").length,0),i=e.runs.reduce((a,d)=>a+d.findings.filter(l=>l.severity==="warning").length,0),c=(e.runs.reduce((a,d)=>a+d.durationMs,0)/1e3).toFixed(3);return`<?xml version="1.0" encoding="UTF-8"?>
7
- <testsuites ${[`name="${g(n)}"`,`tests="${String(o)}"`,`failures="${String(s)}"`,'errors="0"',`skipped="${String(i)}"`,`time="${c}"`].join(" ")}>
8
- ${r}</testsuites>
9
- `},Te="2.1.0",_e="https://json.schemastore.org/sarif-2.1.0.json",be=e=>e==="error"?"error":e==="warning"?"warning":"note",Me=(e,t)=>t&&e.startsWith(`${t}/`)?{uri:e.slice(t.length+1),uriBaseId:"SRCROOT"}:{uri:e},Le=e=>{const{href:t}=se(e);return t.endsWith("/")?t:`${t}/`},Ee=(e,t)=>e.file!==t.file?e.file<t.file?-1:1:(e.line??0)-(t.line??0)||(e.column??0)-(t.column??0),je=e=>{const t=new Map;for(const n of e)n.ruleId&&(t.has(n.ruleId)||t.set(n.ruleId,{id:n.ruleId,name:n.ruleId}));return[...t.values()]},De=(e,t)=>{const{uri:n,uriBaseId:r}=Me(e.file,t),o={artifactLocation:r?{uri:n,uriBaseId:r}:{uri:n}};if(e.line!==void 0){const i={startLine:e.line};e.column!==void 0&&(i.startColumn=e.column),e.endLine!==void 0&&(i.endLine=e.endLine),e.endColumn!==void 0&&(i.endColumn=e.endColumn),o.region=i}const s={level:be(e.severity),locations:[{physicalLocation:o}],message:{text:e.message}};return e.ruleId&&(s.ruleId=e.ruleId),s},Oe=(e,t)=>{const n=[...e.findings].sort(Ee),r=je(n),o={name:e.adapter,rules:r};e.presence?.declaredVersion&&(o.version=e.presence.declaredVersion);const s={results:n.map(i=>De(i,t)),tool:{driver:o}};return t&&(s.originalUriBaseIds={SRCROOT:{uri:Le(t)}}),s},ft=e=>{const t={$schema:_e,runs:e.runs.map(n=>Oe(n,e.workspaceRoot)),version:Te};return`${JSON.stringify(t,void 0,2)}
10
- `},M={error:3,info:1,warning:2},pt=e=>{const t=[],n=[];let r,o=!1;for(const s of e){n.push({adapter:s.adapter,durationMs:s.durationMs,exitCode:s.exitCode,findingCount:s.findings.length}),s.exitCode!==0&&s.exitCode!==null&&s.findings.length===0&&(o=!0);for(const i of s.findings)t.push(i),(!r||M[i.severity]>M[r])&&(r=i.severity)}return{findings:t,hadProcessFailure:o,maxSeverity:r,runs:n}},ht=e=>{const t=new Map;for(const n of e){const r=t.get(n.file);r?r.push(n):t.set(n.file,[n])}return t},mt=e=>e.hadProcessFailure||e.maxSeverity==="error"?1:0,Pe=(e,t)=>{if(t==="fix"||process.env.VIS_NO_CACHE==="1"||e.length===0)return!1;for(const n of e)if(n==="."||n==="./"||n==="..")return!1;return!0},Ne=e=>{try{const t=E(e);return v("sha256").update(t).digest("hex")}catch{return}},We=(e,t,n,r,o)=>{const s=e.cacheKey(t,r),i=[];for(const u of[...n].sort()){const a=S(u)?u:h(t.root,u);try{ee(a)}catch{return}const d=Ne(a);if(!d)return;i.push({hash:d,path:a})}const c=v("sha256");c.update(e.id),c.update("\0"),c.update(s),c.update("\0"),c.update(o);for(const u of i)c.update("\0"),c.update(u.path),c.update("\0"),c.update(u.hash);return{fileHashes:i,key:c.digest("hex")}},q=(e,t)=>h(e,"lint-fmt",t),qe=(e,t,n)=>{const r=h(q(e,t.id),`${n}.json`);try{const o=E(r,"utf8"),s=JSON.parse(o);return s.schema!==1?void 0:s}catch{return}},Be=(e,t,n,r,o)=>{const s=q(e,t.id),i={fileHashes:o,result:r,savedAt:Date.now(),schema:1};try{te(s,{recursive:!0}),ne(h(s,`${n}.json`),JSON.stringify(i))}catch{}},L=async(e,t,n,r,o)=>{const s=e.bin(t),i=[...s.slice(1),...o==="fix"?e.argsFix(n,r):e.argsCheck(n,r)];return new Promise(c=>{const u=Date.now(),a=Y(s[0],i,{cwd:t.root}),d=[],l=[];let m=!1;const p=setTimeout(()=>{m=!0,a.kill("SIGKILL")},6e4);a.stdout.on("data",f=>d.push(f)),a.stderr.on("data",f=>l.push(f)),a.on("error",f=>{clearTimeout(p),c({durationMs:Date.now()-u,exitCode:null,stderr:f.message,stdout:""})}),a.on("close",f=>{clearTimeout(p),c({durationMs:Date.now()-u,exitCode:m?null:f,stderr:Buffer.concat(l).toString("utf8"),stdout:Buffer.concat(d).toString("utf8")})})})},gt=async(e,t,n,r=F())=>{if(e.length===0)return[];const{cacheRoot:o,concurrency:s}=typeof r=="number"?{concurrency:r}:{cacheRoot:r.cacheRoot,concurrency:r.concurrency??F()},i=async l=>{const m=l.options??t;if(o&&Pe(l.files,n)){const p=We(l.adapter,l.presence,l.files,m,n);if(p){const f=qe(o,l.adapter,p.key);if(f)return f.result;const $=await L(l.adapter,l.presence,l.files,m,n);return $.exitCode!==null&&Be(o,l.adapter,p.key,$,p.fileHashes),$}}return L(l.adapter,l.presence,l.files,m,n)};if(process.env.VIS_LINT_FMT_SERIAL==="1"){const l=[];for(const m of e)l.push(await i(m));return l}const c=Math.max(1,Math.min(s,e.length)),u=Array.from({length:e.length});let a=0;const d=async()=>{for(;;){const l=a;if(a+=1,l>=e.length)return;u[l]=await i(e[l])}};return await Promise.all(Array.from({length:c},()=>d())),u},Ve=e=>{const t=new Set;for(const n of e)t.add(n.toLowerCase());return t},Je=(e,t)=>{const n=e.lastIndexOf(".");return n===-1||n===e.length-1?!1:t.has(e.slice(n+1).toLowerCase())},yt=async e=>{const{extensions:t,initialFiles:n,label:r,log:o,runCycle:s,workspaceRoot:i}=e,c=o??(p=>{process.stdout.write(`${p}
11
- `)}),u=Ve(t);await s(n),c(`▸ ${r}: watching workspace — press Ctrl-C to exit`);let a=new Set,d=!1;const l=async()=>{for(;a.size>0;){const p=[...a];a=new Set;try{await s(p)}catch(f){c(`✗ ${r}: watch cycle failed — ${f.message}`)}}},m=oe({debounceMs:200,filter:p=>Je(p,u),onChange:async p=>{for(const f of p)a.add(S(f)?f:h(i,f));if(!d){d=!0;try{await l()}finally{d=!1}}},paths:[i]});await new Promise(p=>{const f=()=>{m.close(),process.off("SIGINT",f),process.off("SIGTERM",f),p()};process.once("SIGINT",f),process.once("SIGTERM",f)})};export{Xe as a,ct as b,nt as c,j as d,yt as e,D as f,Ze as g,tt as h,at as i,gt as j,pt as k,ot as l,ft as m,dt as n,ut as o,mt as p,ht as q,it as r,rt as s,ie as t,et as u,st as v,lt as w};