@visulima/vis 3.0.0 → 3.0.2

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 (306) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE.md +5760 -4562
  3. package/dashboard/dist/index.html +12 -12
  4. package/dist/bin.js +1 -1
  5. package/dist/binx.js +2 -2
  6. package/dist/config/index.js +1 -1
  7. package/dist/packem_chunks/CONFIG_FILES.js +6 -6
  8. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -1
  9. package/dist/packem_chunks/agent-instructions.js +7 -7
  10. package/dist/packem_chunks/bloom-status.js +2 -2
  11. package/dist/packem_chunks/bloom-sync.js +2 -2
  12. package/dist/packem_chunks/cache-attestation.js +1 -1
  13. package/dist/packem_chunks/catalog-detector.js +1 -1
  14. package/dist/packem_chunks/catalog.js +87 -111
  15. package/dist/packem_chunks/cli-exec.js +1 -1
  16. package/dist/packem_chunks/cli-main.js +192 -217
  17. package/dist/packem_chunks/defineReleasePlugin.js +3 -3
  18. package/dist/packem_chunks/detect.js +8 -3
  19. package/dist/packem_chunks/devtools.js +1 -1
  20. package/dist/packem_chunks/discord.js +4 -4
  21. package/dist/packem_chunks/dispatch.js +4 -4
  22. package/dist/packem_chunks/doctor-probe.js +2 -2
  23. package/dist/packem_chunks/extra-files.js +3 -3
  24. package/dist/packem_chunks/fix.js +11 -11
  25. package/dist/packem_chunks/git.js +3 -3
  26. package/dist/packem_chunks/group-tags.js +1 -1
  27. package/dist/packem_chunks/handler.js +1 -1
  28. package/dist/packem_chunks/handler10.js +5 -5
  29. package/dist/packem_chunks/handler11.js +1 -1
  30. package/dist/packem_chunks/handler12.js +16 -16
  31. package/dist/packem_chunks/handler13.js +5 -5
  32. package/dist/packem_chunks/handler14.js +1 -1
  33. package/dist/packem_chunks/handler15.js +1 -1
  34. package/dist/packem_chunks/handler16.js +1 -1
  35. package/dist/packem_chunks/handler17.js +1 -1
  36. package/dist/packem_chunks/handler18.js +1 -1
  37. package/dist/packem_chunks/handler19.js +5 -5
  38. package/dist/packem_chunks/handler2.js +1 -1
  39. package/dist/packem_chunks/handler20.js +2 -2
  40. package/dist/packem_chunks/handler21.js +2 -2
  41. package/dist/packem_chunks/handler22.js +8 -8
  42. package/dist/packem_chunks/handler23.js +1 -1
  43. package/dist/packem_chunks/handler24.js +1 -1
  44. package/dist/packem_chunks/handler25.js +1 -1
  45. package/dist/packem_chunks/handler26.js +5 -5
  46. package/dist/packem_chunks/handler27.js +1 -1
  47. package/dist/packem_chunks/handler28.js +3 -3
  48. package/dist/packem_chunks/handler29.js +1 -1
  49. package/dist/packem_chunks/handler3.js +2 -2
  50. package/dist/packem_chunks/handler30.js +1 -1
  51. package/dist/packem_chunks/handler31.js +2 -2
  52. package/dist/packem_chunks/handler32.js +2 -2
  53. package/dist/packem_chunks/handler33.js +2 -2
  54. package/dist/packem_chunks/handler34.js +3 -3
  55. package/dist/packem_chunks/handler35.js +5 -5
  56. package/dist/packem_chunks/handler36.js +1 -1
  57. package/dist/packem_chunks/handler37.js +2 -2
  58. package/dist/packem_chunks/handler38.js +6 -6
  59. package/dist/packem_chunks/handler39.js +8 -8
  60. package/dist/packem_chunks/handler4.js +4 -4
  61. package/dist/packem_chunks/handler40.js +34 -34
  62. package/dist/packem_chunks/handler41.js +5 -5
  63. package/dist/packem_chunks/handler42.js +4 -4
  64. package/dist/packem_chunks/handler43.js +3 -3
  65. package/dist/packem_chunks/handler44.js +2 -2
  66. package/dist/packem_chunks/handler45.js +1 -1
  67. package/dist/packem_chunks/handler46.js +1 -1
  68. package/dist/packem_chunks/handler47.js +1 -1
  69. package/dist/packem_chunks/handler48.js +3 -3
  70. package/dist/packem_chunks/handler49.js +1 -1
  71. package/dist/packem_chunks/handler5.js +6 -6
  72. package/dist/packem_chunks/handler50.js +6 -6
  73. package/dist/packem_chunks/handler51.js +13 -13
  74. package/dist/packem_chunks/handler52.js +3 -3
  75. package/dist/packem_chunks/handler53.js +5 -5
  76. package/dist/packem_chunks/handler54.js +2 -2
  77. package/dist/packem_chunks/handler55.js +1 -1
  78. package/dist/packem_chunks/handler56.js +4 -4
  79. package/dist/packem_chunks/handler57.js +5 -5
  80. package/dist/packem_chunks/handler58.js +5 -5
  81. package/dist/packem_chunks/handler59.js +8 -8
  82. package/dist/packem_chunks/handler6.js +7 -7
  83. package/dist/packem_chunks/handler60.js +3 -3
  84. package/dist/packem_chunks/handler61.js +21 -21
  85. package/dist/packem_chunks/handler62.js +12 -12
  86. package/dist/packem_chunks/handler63.js +3 -3
  87. package/dist/packem_chunks/handler64.js +5 -5
  88. package/dist/packem_chunks/handler65.js +8 -8
  89. package/dist/packem_chunks/handler66.js +2 -2
  90. package/dist/packem_chunks/handler67.js +25 -24
  91. package/dist/packem_chunks/handler68.js +153 -25
  92. package/dist/packem_chunks/handler69.js +10 -153
  93. package/dist/packem_chunks/handler7.js +1 -1
  94. package/dist/packem_chunks/handler70.js +22 -10
  95. package/dist/packem_chunks/handler71.js +17 -17
  96. package/dist/packem_chunks/handler72.js +104 -104
  97. package/dist/packem_chunks/handler73.js +20 -20
  98. package/dist/packem_chunks/handler74.js +45 -45
  99. package/dist/packem_chunks/handler75.js +27 -3
  100. package/dist/packem_chunks/handler76.js +3 -27
  101. package/dist/packem_chunks/handler77.js +68 -68
  102. package/dist/packem_chunks/handler78.js +30 -30
  103. package/dist/packem_chunks/handler8.js +1 -1
  104. package/dist/packem_chunks/handler9.js +1 -1
  105. package/dist/packem_chunks/heal-accept.js +9 -9
  106. package/dist/packem_chunks/heal.js +11 -11
  107. package/dist/packem_chunks/help-command.js +7 -63
  108. package/dist/packem_chunks/index.js +1 -1
  109. package/dist/packem_chunks/index2.js +48 -804
  110. package/dist/packem_chunks/index3.js +3 -7
  111. package/dist/packem_chunks/index4.js +801 -134
  112. package/dist/packem_chunks/index5.js +7 -73
  113. package/dist/packem_chunks/index6.js +73 -0
  114. package/dist/packem_chunks/index7.js +135 -0
  115. package/dist/packem_chunks/interface.js +2 -2
  116. package/dist/packem_chunks/keys-refresh.js +4 -4
  117. package/dist/packem_chunks/lean.js +3 -3
  118. package/dist/packem_chunks/list.js +3 -3
  119. package/dist/packem_chunks/loader.js +4 -4
  120. package/dist/packem_chunks/loader2.js +1 -1
  121. package/dist/packem_chunks/orchestrator.js +27 -27
  122. package/dist/packem_chunks/pre-mode.js +2 -2
  123. package/dist/packem_chunks/print-config.js +1 -1
  124. package/dist/packem_chunks/prompts.js +7 -7
  125. package/dist/packem_chunks/prune.js +3 -3
  126. package/dist/packem_chunks/publish-guards.js +1 -1
  127. package/dist/packem_chunks/resolveFormatter.js +5 -5
  128. package/dist/packem_chunks/run.js +1 -1
  129. package/dist/packem_chunks/security.js +1 -1
  130. package/dist/packem_chunks/shell-runner.js +1 -1
  131. package/dist/packem_chunks/slack.js +2 -2
  132. package/dist/packem_chunks/snapshot.js +2 -2
  133. package/dist/packem_chunks/stage-publisher.js +1 -1
  134. package/dist/packem_chunks/staged-registry.js +2 -2
  135. package/dist/packem_chunks/state.js +3 -3
  136. package/dist/packem_chunks/status.js +2 -2
  137. package/dist/packem_chunks/success-walk.js +4 -4
  138. package/dist/packem_chunks/sync.js +2 -2
  139. package/dist/packem_chunks/sync2.js +2 -2
  140. package/dist/packem_chunks/tar.js +3 -3
  141. package/dist/packem_chunks/tripwire.js +2 -2
  142. package/dist/packem_chunks/ts-loader.js +5 -9
  143. package/dist/packem_chunks/verify-lockfile.js +2 -2
  144. package/dist/packem_chunks/version-resolver.js +2 -2
  145. package/dist/packem_chunks/webhook.js +1 -1
  146. package/dist/packem_chunks/workflow-templates.js +5 -5
  147. package/dist/packem_chunks/workspace.js +2 -2
  148. package/dist/packem_shared/ReleaseClient-DAvbxCdo.js +1 -0
  149. package/dist/packem_shared/Table-DyORjLji-CC9cYgCG.js +11 -0
  150. package/dist/packem_shared/{VisReleaseError-DMGRBTNO.js → VisReleaseError-DZtgcKf8.js} +1 -1
  151. package/dist/packem_shared/_commonjsHelpers-DTfxOvZk.js +1 -0
  152. package/dist/packem_shared/advisories-DZd1uGqa.js +1 -0
  153. package/dist/packem_shared/affected-selection-CoRXp5H4.js +1 -0
  154. package/dist/packem_shared/affected-shas-Dd0P7fGD.js +1 -0
  155. package/dist/packem_shared/ai-analysis-DSQQDFU9.js +68 -0
  156. package/dist/packem_shared/ai-fix-6nXZbecQ.js +43 -0
  157. package/dist/packem_shared/augment-COAiXSIx.js +4 -0
  158. package/dist/packem_shared/bin-C2eYtJ_N.js +1 -0
  159. package/dist/packem_shared/build-scripts-pdVmqXRm.js +1 -0
  160. package/dist/packem_shared/clean-DRiLimTx.js +1 -0
  161. package/dist/packem_shared/command-runtime-CiLVo4ED.js +1 -0
  162. package/dist/packem_shared/{compile-cache-B_Vf_WxT.js → compile-cache-DoMHRsRZ.js} +1 -1
  163. package/dist/packem_shared/createAdapter-F7GidOzU.js +1 -0
  164. package/dist/packem_shared/createVersionActions-ByaJ1Nbv.js +1 -0
  165. package/dist/packem_shared/cyclonedx-B1vzerwP.js +4 -0
  166. package/dist/packem_shared/dependency-scan-DBH2Qo4I.js +1 -0
  167. package/dist/packem_shared/docker-Bex05Qcn.js +59 -0
  168. package/dist/packem_shared/failure-log-D92tM0ie.js +2 -0
  169. package/dist/packem_shared/formatBytes-BHAzNIrn-DFIppnY0.js +4 -0
  170. package/dist/packem_shared/getRandomSpinner-4ZEcbTYv-DCyIuj19.js +1 -0
  171. package/dist/packem_shared/giget-D8Kwb0kD.js +2 -0
  172. package/dist/packem_shared/glob-Cyk1H9ZL-ox19CSsT.js +1 -0
  173. package/dist/packem_shared/index-B4AjSxHU.js +1 -0
  174. package/dist/packem_shared/index-BisalDCf.js +39 -0
  175. package/dist/packem_shared/{index-BWl4DbMp.js → index-BjdW45xX.js} +1 -1
  176. package/dist/packem_shared/index-DHD8wb6Z.js +22 -0
  177. package/dist/packem_shared/index-DXPSWMbG.js +1 -0
  178. package/dist/packem_shared/index.server-BAjDJSEu.js +2 -0
  179. package/dist/packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js +1 -0
  180. package/dist/packem_shared/license-DvlYdo6T.js +1 -0
  181. package/dist/packem_shared/lifecycle-CfTZQHOG.js +2 -0
  182. package/dist/packem_shared/lockfile-35RFsJDs.js +1 -0
  183. package/dist/packem_shared/lockfile-DhHAaHN5.js +1 -0
  184. package/dist/packem_shared/main-BP-w-K-6.js +1 -0
  185. package/dist/packem_shared/manifests-BNSmpPF_.js +1 -0
  186. package/dist/packem_shared/min-release-age-ChzTC7_I.js +34 -0
  187. package/dist/packem_shared/missing-package-json-C0keIt78.js +1 -0
  188. package/dist/packem_shared/native-config-sync-BSzU4qUO.js +21 -0
  189. package/dist/packem_shared/osv-bloom-1JS__1or.js +2 -0
  190. package/dist/packem_shared/otelPlugin-D8LL2-4L.js +1 -0
  191. package/dist/packem_shared/package-version-Bb7KGF36.js +4 -0
  192. package/dist/packem_shared/packument-C55kVxcQ.js +1 -0
  193. package/dist/packem_shared/{peer-warnings-BXAzXqY3.js → peer-warnings-CmYSxvql.js} +1 -1
  194. package/dist/packem_shared/pm-runner-de-jCq8q.js +1 -0
  195. package/dist/packem_shared/project-name-filter-DYaIbrXa.js +7 -0
  196. package/dist/packem_shared/{prompt-BSAy8SMH.js → prompt-DMzaQEVa.js} +1 -1
  197. package/dist/packem_shared/provenance-CvfQEJPQ.js +1 -0
  198. package/dist/packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js +1 -0
  199. package/dist/packem_shared/registry-keys-DmBrAlhg.js +1 -0
  200. package/dist/packem_shared/resolve-explicit-DYaHAVDg.js +5 -0
  201. package/dist/packem_shared/resolve-runtime-C7NBCA1C.js +1 -0
  202. package/dist/packem_shared/run-file-jMngGQhs.js +1 -0
  203. package/dist/packem_shared/runtime-check-BklgEMkC.js +1 -0
  204. package/dist/packem_shared/s1ngularity-C8sva2SO.js +1 -0
  205. package/dist/packem_shared/scan-progress-aVHGZYWf.js +2 -0
  206. package/dist/packem_shared/selectors-B7lSFz7l.js +3 -0
  207. package/dist/packem_shared/signatures-oZ_2IneN.js +2 -0
  208. package/dist/packem_shared/{slug-DoueYuLo.js → slug-OBHcH7wV.js} +1 -1
  209. package/dist/packem_shared/spinner-CbJfWYwB.js +1 -0
  210. package/dist/packem_shared/sticky-comment-DjhyCIZt.js +1 -0
  211. package/dist/packem_shared/subtree-DtmcKAJK.js +2 -0
  212. package/dist/packem_shared/symbols-BXDZ_sKt.js +1 -0
  213. package/dist/packem_shared/tabs-BilwonkM.js +1 -0
  214. package/dist/packem_shared/target-merge-DCGow6Kw.js +4 -0
  215. package/dist/packem_shared/target-options-d_rIrLyq.js +1 -0
  216. package/dist/packem_shared/toolchain-DY11tPCw.js +5 -0
  217. package/dist/packem_shared/typosquats-Cdsnf6aN.js +1 -0
  218. package/dist/packem_shared/use-measured-height-BPQg2q_p.js +1 -0
  219. package/dist/packem_shared/utils-DQFHJn72.js +1 -0
  220. package/dist/packem_shared/verify-D8wYvB85.js +1 -0
  221. package/dist/packem_shared/vis-update-app-ngwL2mRv.js +1 -0
  222. package/dist/packem_shared/vis-user-error-CAu9wIbe.js +30 -0
  223. package/dist/packem_shared/watch-Dswvj6Zp.js +1 -0
  224. package/dist/packem_shared/watch-loop-COWvvSbR.js +11 -0
  225. package/dist/packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js +1 -0
  226. package/dist/release/core/changelog/index.d.ts +62 -2
  227. package/dist/release/core/package-managers/index.d.ts +25 -1
  228. package/dist/release/core/package-managers/index.js +1 -1
  229. package/dist/release/core/version-actions/index.d.ts +47 -2
  230. package/dist/release/core/version-actions/index.js +1 -1
  231. package/dist/release/index.d.ts +100 -1
  232. package/dist/release/index.js +1 -1
  233. package/dist/release/plugin-sdk.d.ts +16 -1
  234. package/dist/release/plugin-sdk.js +1 -1
  235. package/dist/release/presets.js +1 -1
  236. package/dist/release/types.js +1 -1
  237. package/dist/runtime/preload.js +1 -1
  238. package/index.js +26 -26
  239. package/package.json +14 -14
  240. package/dist/packem_chunks/detect2.js +0 -8
  241. package/dist/packem_chunks/registry.js +0 -48
  242. package/dist/packem_shared/ReleaseClient-BY4OZNCK.js +0 -1
  243. package/dist/packem_shared/_commonjsHelpers-B5Y90VFO.js +0 -1
  244. package/dist/packem_shared/advisories-DsXRmIA5.js +0 -1
  245. package/dist/packem_shared/affected-selection-BE6VFCDV.js +0 -1
  246. package/dist/packem_shared/affected-shas-BKEu4RZc.js +0 -1
  247. package/dist/packem_shared/ai-analysis-DikAj6rX.js +0 -68
  248. package/dist/packem_shared/ai-fix-bfWo0cZX.js +0 -43
  249. package/dist/packem_shared/augment-BkJxi_GW.js +0 -4
  250. package/dist/packem_shared/bin-B-TytgzW.js +0 -1
  251. package/dist/packem_shared/build-scripts-DWypBQ--.js +0 -1
  252. package/dist/packem_shared/clean-DWjQl14S.js +0 -1
  253. package/dist/packem_shared/command-runtime-DQ7ZpLYL.js +0 -1
  254. package/dist/packem_shared/createAdapter-bU4DIP3F.js +0 -1
  255. package/dist/packem_shared/createVersionActions-BK43SNDH.js +0 -1
  256. package/dist/packem_shared/cyclonedx-DLBi65MV.js +0 -4
  257. package/dist/packem_shared/dependency-scan-ZLOuLkGN.js +0 -1
  258. package/dist/packem_shared/docker-B4zAZCZG.js +0 -59
  259. package/dist/packem_shared/en-BDYMmM2_.js +0 -27
  260. package/dist/packem_shared/failure-log-DyhWPqno.js +0 -2
  261. package/dist/packem_shared/giget-CAxjpwew.js +0 -2
  262. package/dist/packem_shared/glob-BUjyjdE8-Dp_QcayW.js +0 -1
  263. package/dist/packem_shared/index-BAe6e0XE.js +0 -1
  264. package/dist/packem_shared/index-BLtnel38.js +0 -35
  265. package/dist/packem_shared/index-CuKDxOCI.js +0 -1
  266. package/dist/packem_shared/index-tNFGWxc0.js +0 -39
  267. package/dist/packem_shared/index.server-CusjRLCh.js +0 -2
  268. package/dist/packem_shared/license-t5KnNX6v.js +0 -1
  269. package/dist/packem_shared/lifecycle-KY9umOg6.js +0 -2
  270. package/dist/packem_shared/lockfile-YAuZf1gh.js +0 -1
  271. package/dist/packem_shared/main-D_cam4hv.js +0 -1
  272. package/dist/packem_shared/manifests-BwTn_1ad.js +0 -1
  273. package/dist/packem_shared/min-release-age-6avfn81h.js +0 -34
  274. package/dist/packem_shared/missing-package-json-Cl0vdz6K.js +0 -1
  275. package/dist/packem_shared/native-config-sync-CHMCJx7H.js +0 -21
  276. package/dist/packem_shared/osv-bloom-DdqDnLCt.js +0 -2
  277. package/dist/packem_shared/otelPlugin-DmKDBaPo.js +0 -1
  278. package/dist/packem_shared/package-version-BNRJ3o9C.js +0 -4
  279. package/dist/packem_shared/packument-B9-WqReu.js +0 -1
  280. package/dist/packem_shared/pm-runner-DRybtzOV.js +0 -1
  281. package/dist/packem_shared/project-name-filter-Dw0fC6IO.js +0 -7
  282. package/dist/packem_shared/provenance-CLxuqCfL.js +0 -1
  283. package/dist/packem_shared/readJsonSync-DweZd5ZA-CtrDlqpb.js +0 -1
  284. package/dist/packem_shared/registry-keys-cTN24144.js +0 -1
  285. package/dist/packem_shared/resolve-explicit-Uw6WQl9R.js +0 -5
  286. package/dist/packem_shared/resolve-runtime-DztanwkZ.js +0 -1
  287. package/dist/packem_shared/run-file-CaE5_xBY.js +0 -1
  288. package/dist/packem_shared/runtime-check-C32yE57I.js +0 -1
  289. package/dist/packem_shared/s1ngularity-BIYhg82u.js +0 -1
  290. package/dist/packem_shared/scan-progress-DWfY4zkp.js +0 -2
  291. package/dist/packem_shared/selectors-D2j4M9Ul.js +0 -3
  292. package/dist/packem_shared/signatures-C8iQ5fUq.js +0 -2
  293. package/dist/packem_shared/sticky-comment-D6_7-w8T.js +0 -1
  294. package/dist/packem_shared/subtree-DSm0QEoE.js +0 -2
  295. package/dist/packem_shared/symbols-DPTlrJ3B.js +0 -1
  296. package/dist/packem_shared/target-merge-DLxJTcxn.js +0 -11
  297. package/dist/packem_shared/target-options-3t4-2F-F.js +0 -1
  298. package/dist/packem_shared/toolchain-BPzbahcQ.js +0 -5
  299. package/dist/packem_shared/typosquats-BWrmhh36.js +0 -1
  300. package/dist/packem_shared/use-measured-height-BwAwGHjw.js +0 -1
  301. package/dist/packem_shared/utils-CRueU43T.js +0 -1
  302. package/dist/packem_shared/verify-CzUPT6Uk.js +0 -1
  303. package/dist/packem_shared/vis-update-app-D6Wq8ZHM.js +0 -1
  304. package/dist/packem_shared/vis-user-error-CfM4_ORo.js +0 -30
  305. package/dist/packem_shared/watch-D_oAxW_Z.js +0 -1
  306. package/dist/packem_shared/watch-loop-BrjblOz5.js +0 -11
@@ -0,0 +1 @@
1
+ import{createRequire as j}from"node:module";import{e as d}from"./index-DHD8wb6Z.js";import{y}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{p as P}from"./readJsonSync-CbryXYxN-B2aSeDpC.js";let M;const b=o=>(M??=j(import.meta.url))(o),l=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,N=o=>{if(typeof l<"u"&&l.versions&&l.versions.node){const[e,t]=l.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return l.getBuiltinModule(o)}return b(o)},{readdirSync:g,lstatSync:S}=N("node:fs"),R=/^([^<(]+?)?(?:<([^>]+)>)?\s*(?:\(([^)]+)\))?\s*$/u,T=o=>{const e=o.match(R);if(!e)return;const t=e[1]?.trim(),n=e[2]?.trim(),r=e[3]?.trim();if(!(!t&&!n&&!r))return{email:n||void 0,name:t||void 0,url:r||void 0}},k=o=>{if(!Array.isArray(o)||o.length===0)return;const e=[];for(const t of o)if(typeof t=="string"){const n=T(t);n&&e.push(n)}else if(t&&typeof t=="object"){const n=t,r=typeof n.name=="string"?n.name:void 0,i=typeof n.email=="string"?n.email:void 0,u=typeof n.url=="string"?n.url:void 0;(r||i||u)&&e.push({email:i,name:r,url:u})}return e.length>0?e:void 0},D=o=>{const e=d(o,"node_modules");if(!y(e))return new Map;const t=new Map,n=new Set,r=(i,u="")=>{if(n.has(i))return;n.add(i);let h;try{h=g(i)}catch{return}for(const a of h){const c=d(i,a);let m;try{m=S(c)}catch{continue}if(m.isSymbolicLink())continue;if(a.startsWith("@")){m.isDirectory()&&r(c,`${a}/`);continue}if(a===".pnpm"&&u===""){let s;try{s=g(c)}catch{continue}for(const p of s){const f=d(c,p,"node_modules");y(f)&&r(f)}continue}if(a.startsWith(".")||!m.isDirectory())continue;const v=u+a,_=d(c,"package.json");try{if(!y(_))continue;const s=P(_);if(typeof s.version!="string")continue;const p=`${v}@${s.version}`;t.has(p)||t.set(p,{directory:c,license:s.license,licenses:Array.isArray(s.licenses)?s.licenses:void 0,maintainers:k(s.maintainers),name:v,scripts:s.scripts&&typeof s.scripts=="object"?s.scripts:void 0,version:s.version});const f=d(c,"node_modules");y(f)&&r(f)}catch{}}};return r(e),t};export{k as n,D as r};
@@ -0,0 +1,34 @@
1
+ import{e as g,z as d}from"./index-DHD8wb6Z.js";import{r as A}from"../packem_chunks/cli-main.js";import{y as $}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{U as u}from"./writeFileSync-DJoHk3Ks-CgQ-VNNT.js";const x=(k,p,h,m=[])=>{const t=[];if(h===void 0)return t.push("minimumReleaseAge not set in vis.config; skipping native sync."),t;const r=Number.isFinite(h)?Math.max(0,Math.round(h)):0;switch(k){case"bun":{const n=g(p,"bunfig.toml");let e=$(n)?d(n):"";const s=r*60,i=`minimumReleaseAge = ${String(s)}`,a=m.length>0?`minimumReleaseAgeExcludes = [${m.map(c=>`"${c.replaceAll(String.raw`"`,String.raw`\"`)}"`).join(", ")}]`:void 0,o=/^\[install\][ \t]*\n/m.exec(e);if(o?.index===void 0){const c=a?`${i}
2
+ ${a}`:i;e=`${e.trimEnd()?`${e.trimEnd()}
3
+
4
+ `:""}[install]
5
+ ${c}
6
+ `}else{const c=o.index+o[0].length,b=e.slice(c),y=/^\[/m.exec(b),f=y?.index===void 0?e.length:c+y.index;let l=e.slice(c,f);l=/^[ \t]*minimumReleaseAge[ \t]*=/m.test(l)?l.replace(/^[ \t]*minimumReleaseAge[ \t]*=.*$/m,i):`${i}
7
+ ${l}`,a&&(l=/^[ \t]*minimumReleaseAgeExcludes[ \t]*=/m.test(l)?l.replace(/^[ \t]*minimumReleaseAgeExcludes[ \t]*=.*$/m,a):`${a}
8
+ ${l}`),e=`${e.slice(0,c)}${l}${e.slice(f)}`}u(n,e.endsWith(`
9
+ `)?e:`${e}
10
+ `),t.push(`Updated bunfig.toml [install] minimumReleaseAge = ${String(s)} (${String(r)} minutes)`),a&&t.push(`Updated bunfig.toml [install] minimumReleaseAgeExcludes (${String(m.length)} entries)`);break}case"npm":{const n=g(p,".npmrc");let e=$(n)?d(n):"";const s=r===0?0:Math.max(1,Math.ceil(r/1440)),i=`min-release-age=${String(s)}`;e=/^\s*min-release-age\s*=/m.test(e)?e.replace(/^\s*min-release-age\s*=.*$/m,i):`${e.trimEnd()}
11
+ ${i}
12
+ `,u(n,e.endsWith(`
13
+ `)?e:`${e}
14
+ `),t.push(`Updated .npmrc min-release-age=${String(s)} (rounded up from ${String(r)} minutes; npm's unit is days)`),m.length>0&&t.push("npm has no native per-package exclude list; skipped excludes sync.");break}case"pnpm":{const n=g(p,"pnpm-workspace.yaml");if(!$(n)){t.push("pnpm-workspace.yaml not found. Cannot sync minimumReleaseAge.");break}let e=d(n);e.endsWith(`
15
+ `)||(e+=`
16
+ `);const s=`minimumReleaseAge: ${String(r)}
17
+ `;if(e=/^minimumReleaseAge[ \t]*:.*$/m.test(e)?e.replace(/^minimumReleaseAge[ \t]*:.*$/m,s.trimEnd()):`${e.trimEnd()}
18
+
19
+ ${s}`,m.length>0){const i=`minimumReleaseAgeExclude:
20
+ ${m.map(o=>` - ${A(o)}`).join(`
21
+ `)}
22
+ `,a=/^minimumReleaseAgeExclude:[ \t]*\n(?:[ \t]{2}[^\n]*\n)*/m;e=a.test(e)?e.replace(a,i):`${e.trimEnd()}
23
+
24
+ ${i}`}u(n,e),t.push(`Updated pnpm-workspace.yaml minimumReleaseAge: ${String(r)} minutes`),m.length>0&&t.push(`Updated pnpm-workspace.yaml minimumReleaseAgeExclude (${String(m.length)} entries)`);break}case"yarn":{const n=g(p,".yarnrc.yml");if(!$(n)){t.push("yarn classic lacks npmMinimalAgeGate; .yarnrc.yml not found, skipping.");break}let e=d(n);const s=`npmMinimalAgeGate: ${String(r)}`;if(e.endsWith(`
25
+ `)||(e+=`
26
+ `),e=/^npmMinimalAgeGate[ \t]*:.*$/m.test(e)?e.replace(/^npmMinimalAgeGate[ \t]*:.*$/m,s):`${e.trimEnd()}
27
+
28
+ ${s}
29
+ `,m.length>0){const i=`npmPreapprovedPackages:
30
+ ${m.map(o=>` - ${A(o)}`).join(`
31
+ `)}
32
+ `,a=/^npmPreapprovedPackages:[ \t]*\n(?:[ \t]{2}[^\n]*\n)*/m;e=a.test(e)?e.replace(a,i):`${e.trimEnd()}
33
+
34
+ ${i}`}u(n,e),t.push(`Updated .yarnrc.yml npmMinimalAgeGate: ${String(r)} (minutes; bare integer dodges yarn duration-string bug)`),m.length>0&&t.push(`Updated .yarnrc.yml npmPreapprovedPackages (${String(m.length)} entries)`);break}}return t};export{x as s};
@@ -0,0 +1 @@
1
+ import{e as h,U as l}from"./index-DHD8wb6Z.js";import{i as d,v as E,L as o}from"../packem_chunks/catalog.js";import{y as c}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";const _=/\/+$/,f=/node_modules/,p=/\.git/,S=/[$()+.?[\\\]^{|}]/g,P=/\/\*\*$|\/\*\/\*$/,g=(s,u)=>{const n=u.replace(_,"");if(n.startsWith("!"))return[];const t=[];if(n.endsWith("/*")){const r=n.slice(0,-2),e=l(s,r);if(!c(e))return[];for(const i of o(e,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]}))i.path===e||i.name.startsWith(".")||t.push(h(r,i.name));return t}if(n.endsWith("/**")||n.endsWith("/*/*")){const r=n.replace(P,""),e=l(s,r);if(!c(e))return[];for(const i of o(e,{includeFiles:!1,includeSymlinks:!1,skip:[f,p]})){if(i.path===e)continue;const m=i.path.slice(e.length+1);t.push(`${r}/${m}`)}return t}if(!n.includes("/")&&n.includes("*")){const r=n.replaceAll(S,String.raw`\$&`).replaceAll("*",".*"),e=new RegExp(`^${r}$`);for(const i of o(s,{includeFiles:!1,includeSymlinks:!1,maxDepth:1,skip:[f,p]}))i.path!==s&&e.test(i.name)&&t.push(i.name);return t}const a=l(s,n);return c(a)&&t.push(n),t},W=s=>{const n=d(s)??E(s)??[],t=new Set,a=[];for(const r of n)for(const e of g(s,r))e==="."||t.has(e)||(t.add(e),c(h(s,e,"package.json"))||a.push({packageDir:e}));return a};export{W as l};
@@ -0,0 +1,21 @@
1
+ import{e as o,z as f,l as E}from"./index-DHD8wb6Z.js";import{i as O}from"../packem_chunks/cli-main.js";import{U as c}from"./writeFileSync-DJoHk3Ks-CgQ-VNNT.js";import{y as u}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{p as C}from"./readJsonSync-CbryXYxN-B2aSeDpC.js";const N=(x,a,d)=>{const s=[],$=Object.entries(d).filter(([,n])=>n).map(([n])=>n);switch(x){case"bun":{const n=o(a,"package.json");if(u(n))try{const e=C(n);e.trustedDependencies=$,c(n,`${JSON.stringify(e,null,2)}
2
+ `),s.push(`Updated package.json trustedDependencies with ${$.length} packages`)}catch(e){s.push(`Failed to update package.json: ${e instanceof Error?e.message:String(e)}`)}break}case"npm":{const n=o(a,".npmrc");let e=u(n)?f(n):"";/^\s*ignore-scripts\s*=\s*true\s*$/m.test(e)?s.push(".npmrc already has ignore-scripts=true"):(e=`${e.trimEnd()}
3
+ ignore-scripts=true
4
+ `,c(n,e),s.push("Added ignore-scripts=true to .npmrc"));break}case"pnpm":{const n=o(a,"pnpm-workspace.yaml");if(!u(n)){s.push("pnpm-workspace.yaml not found. Cannot sync allowBuilds.");break}let e={},m=[];try{const t=E(n);e=t?.allowBuilds??{},m=Array.isArray(t?.onlyBuiltDependencies)?t.onlyBuiltDependencies:[]}catch{}const y={...e,...d},j=Object.keys(d).filter(t=>e[t]!==d[t]).length,g=$.toSorted((t,l)=>t.localeCompare(l)),S=[...new Set([...m,...g])].toSorted((t,l)=>t.localeCompare(l)),b=g.filter(t=>!m.includes(t)).length;if(j===0&&b===0)s.push(`All ${String(Object.keys(d).length)} allowBuilds entries already present in pnpm-workspace.yaml.`);else{const t=Object.keys(y).sort(),l=i=>i.startsWith("@")||i.includes("/")||/[:#\s]/.test(i),h=i=>l(i)?`'${i.replaceAll("'","''")}'`:i,p=`allowBuilds:
5
+ ${t.map(i=>` ${h(i)}: ${String(y[i])}`).join(`
6
+ `)}
7
+ `;let r=f(n);r.endsWith(`
8
+ `)||(r+=`
9
+ `);const D=/^allowBuilds:[ \t]*\n(?:[ \t]{2}[^\n]*\n)*/m;if(r=D.test(r)?r.replace(D,p):`${r.trimEnd()}
10
+
11
+ ${p}`,S.length>0){const i=`onlyBuiltDependencies:
12
+ ${S.map(A=>` - ${l(A)?`'${A.replaceAll("'","''")}'`:A}`).join(`
13
+ `)}
14
+ `,w=/^onlyBuiltDependencies:[ \t]*\n(?:[ \t]{2}[^\n]*\n)*/m;r=w.test(r)?r.replace(w,i):`${r.trimEnd()}
15
+
16
+ ${i}`}c(n,r),s.push(`Updated pnpm-workspace.yaml allowBuilds (${String(j)} new, ${String(t.length)} total)`),b>0&&s.push(`Updated pnpm-workspace.yaml onlyBuiltDependencies (${String(b)} new, ${String(S.length)} total)`)}const k=o(a,"package.json");if(u(k)&&g.length>0)try{const t=C(k),l=Array.isArray(t.pnpm?.onlyBuiltDependencies)?t.pnpm.onlyBuiltDependencies:[],h=[...new Set([...l,...g])].toSorted((p,r)=>p.localeCompare(r)),B=g.filter(p=>!l.includes(p)).length;B>0&&(t.pnpm={...t.pnpm,onlyBuiltDependencies:h},c(k,`${JSON.stringify(t,null,2)}
17
+ `),s.push(`Updated package.json pnpm.onlyBuiltDependencies (${String(B)} new, ${String(h.length)} total)`))}catch(t){s.push(`Failed to update package.json pnpm.onlyBuiltDependencies: ${t instanceof Error?t.message:String(t)}`)}break}case"yarn":{if(O(a)){const n=o(a,".yarnrc.yml");let e=f(n);const m=/^\s*enableScripts\s*:/m.test(e),y=/^\s*enableScripts\s*:\s*false\s*$/m.test(e);m?y?s.push(".yarnrc.yml already has enableScripts: false"):(e=e.replace(/^\s*enableScripts\s*:.+$/m,"enableScripts: false"),c(n,e),s.push("Changed enableScripts to false in .yarnrc.yml")):(e=`${e.trimEnd()}
18
+ enableScripts: false
19
+ `,c(n,e),s.push("Added enableScripts: false to .yarnrc.yml"))}else{const n=o(a,".npmrc");let e=u(n)?f(n):"";/^\s*ignore-scripts\s*=\s*true\s*$/m.test(e)?s.push(".npmrc already has ignore-scripts=true"):(e=`${e.trimEnd()}
20
+ ignore-scripts=true
21
+ `,c(n,e),s.push("Added ignore-scripts=true to .npmrc (yarn classic lacks enableScripts)"))}break}}return s};export{N as s};
@@ -0,0 +1,2 @@
1
+ import{createRequire as j}from"node:module";import{w as J}from"./target-merge-DCGow6Kw.js";import{osvBloomDecode as z,osvBloomProbeBatch as K,NATIVE_BINDING_VERSION as D}from"#native";let k;const V=e=>(k??=j(import.meta.url))(e),h=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=e=>{if(typeof h<"u"&&h.versions&&h.versions.node){const[s,t]=h.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return h.getBuiltinModule(e)}return V(e)},{createHash:H,randomUUID:P}=v("node:crypto"),{existsSync:g}=v("node:fs"),{readFile:O,mkdir:T,stat:B,writeFile:F,rename:q,unlink:G}=v("node:fs/promises"),{join:d,dirname:W}=v("node:path"),I=6;if(D!==I)throw new Error(`vis native binding ABI mismatch in osv-bloom: expected ${I}, got ${D}. Rebuild via \`pnpm --filter @visulima/vis run build:native\` or reinstall the platform binding package.`);const nt="https://endevco.github.io/osv-bloom",X=new Set(["endevco.github.io"]);class w extends Error{cause="OSV_BLOOM_SOURCE_NOT_ALLOWED";constructor(s){super(`osv-bloom source host '${s}' is not in the built-in allowlist. Add it to \`security.audit.advisories.bloom.allowedHosts\` if intentional.`),this.name="OsvBloomSourceNotAllowedError"}}class b extends Error{cause="OSV_BLOOM_NETWORK";constructor(s,t){super(`osv-bloom fetch failed for ${s}: ${t}. Check connectivity, proxy env vars, or --source.`),this.name="OsvBloomNetworkError"}}class Y extends Error{cause="OSV_BLOOM_INTEGRITY";constructor(s,t){super(`osv-bloom filter.bin sha256 mismatch (expected ${s}, got ${t}). Refusing to install a corrupted filter.`),this.name="OsvBloomIntegrityError"}}class m extends Error{cause="OSV_BLOOM_MANIFEST";constructor(s){super(`osv-bloom manifest invalid: ${s}`),this.name="OsvBloomManifestError"}}class Q extends Error{cause="OSV_BLOOM_CACHE_MISS";constructor(s){super(`No osv-bloom cache at ${s}. Run 'vis advisories bloom sync' first.`),this.name="OsvBloomCacheMissError"}}const p=e=>{const t=J("vis",{create:!0,cwd:e})??d(e,"node_modules",".cache","vis");return d(t,"osv-bloom")},l=e=>d(e,"filter.bin"),$=e=>d(e,"manifest.json"),L=e=>d(e,"state.json"),Z=(e,s)=>{let t;try{t=new URL(e)}catch{throw new w(e)}if(!t.host)throw new w(e);if(t.protocol!=="https:")throw new w(`${t.protocol}//${t.host}`);if(!new Set([...X,...s??[]]).has(t.host))throw new w(t.host);return t},at=async e=>{const s=Date.now(),t=e.cacheDir??p(e.workspaceRoot);await T(t,{recursive:!0});const r=Z(e.source,e.allowedHosts),n=new URL("manifest.json",M(r.toString())),o=new URL("filter.bin",M(r.toString())),a=await A(n,{method:"GET"});if(!a.ok)throw new b(n.toString(),a.status);const _=await a.text(),i=R(_),u=await x(t);if(!e.force&&u?.setDigestSha256===i.setDigestSha256&&g(l(t)))return{bytesOnDisk:(await B(l(t))).size,cacheDir:t,durationMs:Date.now()-s,manifest:i,upToDate:!0};const E={};!e.force&&u?.filterEtag&&(E.headers={"if-none-match":u.filterEtag});const f=await A(o,{...E,method:"GET"});if(f.status===304&&u&&g(l(t)))return await N(t,_,{fetchedAtIso:new Date().toISOString(),filterEtag:u.filterEtag,setDigestSha256:i.setDigestSha256}),{bytesOnDisk:(await B(l(t))).size,cacheDir:t,durationMs:Date.now()-s,manifest:i,upToDate:!0};if(!f.ok||!f.body)throw new b(o.toString(),f.status);const c=Buffer.from(await f.arrayBuffer());e.onProgress&&e.onProgress(c.length,c.length);const y=tt(c);if(y!==i.filterSha256)throw new Y(i.filterSha256,y);if(c.length!==i.bloomByteLen)throw new m(`filter.bin length ${c.length} does not match manifest.bloom_byte_len ${i.bloomByteLen}`);const U=f.headers.get("etag")??void 0;return await S(l(t),c),await N(t,_,{fetchedAtIso:new Date().toISOString(),filterEtag:U,setDigestSha256:i.setDigestSha256}),{bytesOnDisk:c.length,cacheDir:t,durationMs:Date.now()-s,manifest:i,upToDate:!1}},it=async(e,s)=>{const t=s?.cacheDir??p(e),r=l(t);if(!g(r)){if(s?.softFail)return null;throw new Q(t)}const n=await O(r);return z(n)},ct=(e,s)=>K(e,s),lt=async(e,s)=>{const t=s??p(e);if(!g(l(t)))return{cacheDir:t,present:!1};let n,o;try{n=R(await O($(t),"utf8"))}catch{}try{o=await x(t)}catch{}return{cacheDir:t,fetchedAtIso:o?.fetchedAtIso,manifest:n,present:!0}},R=e=>{let s;try{s=JSON.parse(e)}catch(o){throw new m(o instanceof Error?o.message:String(o))}const t=o=>{const a=s[o];if(typeof a!="number"||Number.isNaN(a))throw new m(`field '${o}' missing or non-numeric`);return a},r=o=>{const a=s[o];if(typeof a!="string"||a.length===0)throw new m(`field '${o}' missing or empty`);return a},n=t("format_version");if(n!==1)throw new m(`unsupported format_version ${n} (this build expects v1)`);return{advisoryCount:t("advisory_count"),bloomByteLen:t("bloom_byte_len"),bloomKHashes:t("bloom_k_hashes"),bloomMBits:t("bloom_m_bits"),builtAtRfc3339:r("built_at_rfc3339"),builtAtUnix:t("built_at_unix"),entryCount:t("entry_count"),filterSha256:r("filter_sha256"),formatVersion:n,setDigestSha256:r("set_digest_sha256"),sourceUrl:r("source_url"),targetFpr:t("target_fpr")}},x=async e=>{try{const s=await O(L(e),"utf8"),t=JSON.parse(s);return typeof t.setDigestSha256!="string"||typeof t.fetchedAtIso!="string"?void 0:{fetchedAtIso:t.fetchedAtIso,filterEtag:typeof t.filterEtag=="string"?t.filterEtag:void 0,setDigestSha256:t.setDigestSha256}}catch{return}},N=async(e,s,t)=>{await S($(e),Buffer.from(s,"utf8")),await S(L(e),Buffer.from(`${JSON.stringify(t,void 0,2)}
2
+ `,"utf8"))},S=async(e,s)=>{await T(W(e),{recursive:!0});const t=`${e}.${process.pid}.${P()}.tmp`;try{await F(t,s),await q(t,e)}catch(r){throw await G(t).catch(()=>{}),r}},tt=e=>H("sha256").update(e).digest("hex"),M=e=>e.endsWith("/")?e:`${e}/`,et=3e4,A=async(e,s)=>{try{return await fetch(e,{...s,signal:AbortSignal.timeout(et)})}catch(t){throw new b(e.toString(),t instanceof Error?t.message:String(t))}};export{nt as D,Q as O,lt as g,it as l,ct as p,at as s};
@@ -0,0 +1 @@
1
+ import{c as Te}from"./_commonjsHelpers-DTfxOvZk.js";import{definePlugin as Tt}from"./definePlugin-DoUcoYSy.js";var ne={},M={},I={},m={},T={},D={},Me;function dt(){return Me||(Me=1,Object.defineProperty(D,"__esModule",{value:!0}),D.VERSION=void 0,D.VERSION="1.9.1"),D}var R={},Re;function Mt(){if(Re)return R;Re=1,Object.defineProperty(R,"__esModule",{value:!0}),R.isCompatible=R._makeCompatibilityCheck=void 0;const e=dt(),t=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function u(r){const n=new Set([r]),i=new Set,c=r.match(t);if(!c)return()=>!1;const a={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};if(a.prerelease!=null)return function(l){return l===r};function o(s){return i.add(s),!1}function g(s){return n.add(s),!0}return function(l){if(n.has(l))return!0;if(i.has(l))return!1;const d=l.match(t);if(!d)return o(l);const _={major:+d[1],minor:+d[2],patch:+d[3],prerelease:d[4]};return _.prerelease!=null||a.major!==_.major?o(l):a.major===0?a.minor===_.minor&&a.patch<=_.patch?g(l):o(l):a.minor<=_.minor?g(l):o(l)}}return R._makeCompatibilityCheck=u,R.isCompatible=u(e.VERSION),R}var Ee;function y(){if(Ee)return T;Ee=1,Object.defineProperty(T,"__esModule",{value:!0}),T.unregisterGlobal=T.getGlobal=T.registerGlobal=void 0;const e=dt(),t=Mt(),u=e.VERSION.split(".")[0],r=Symbol.for(`opentelemetry.js.api.${u}`),n=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof Te=="object"?Te:{};function i(o,g,s,l=!1){var d;const _=n[r]=(d=n[r])!==null&&d!==void 0?d:{version:e.VERSION};if(!l&&_[o]){const f=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${o}`);return s.error(f.stack||f.message),!1}if(_.version!==e.VERSION){const f=new Error(`@opentelemetry/api: Registration of version v${_.version} for ${o} does not match previously registered API v${e.VERSION}`);return s.error(f.stack||f.message),!1}return _[o]=g,s.debug(`@opentelemetry/api: Registered a global for ${o} v${e.VERSION}.`),!0}T.registerGlobal=i;function c(o){var g,s;const l=(g=n[r])===null||g===void 0?void 0:g.version;if(!(!l||!(0,t.isCompatible)(l)))return(s=n[r])===null||s===void 0?void 0:s[o]}T.getGlobal=c;function a(o,g){g.debug(`@opentelemetry/api: Unregistering a global for ${o} v${e.VERSION}.`);const s=n[r];s&&delete s[o]}return T.unregisterGlobal=a,T}var Se;function Rt(){if(Se)return m;Se=1,Object.defineProperty(m,"__esModule",{value:!0}),m.DiagComponentLogger=void 0;const e=y();class t{constructor(n){this._namespace=n.namespace||"DiagComponentLogger"}debug(...n){return u("debug",this._namespace,n)}error(...n){return u("error",this._namespace,n)}info(...n){return u("info",this._namespace,n)}warn(...n){return u("warn",this._namespace,n)}verbose(...n){return u("verbose",this._namespace,n)}}m.DiagComponentLogger=t;function u(r,n,i){const c=(0,e.getGlobal)("diag");if(c)return c[r](n,...i)}return m}var L={},ae={},Ce;function _e(){return Ce||(Ce=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagLogLevel=void 0,(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(e.DiagLogLevel||(e.DiagLogLevel={}))})(ae)),ae}var he;function Et(){if(he)return L;he=1,Object.defineProperty(L,"__esModule",{value:!0}),L.createLogLevelDiagLogger=void 0;const e=_e();function t(u,r){u<e.DiagLogLevel.NONE?u=e.DiagLogLevel.NONE:u>e.DiagLogLevel.ALL&&(u=e.DiagLogLevel.ALL),r=r||{};function n(i,c){const a=r[i];return typeof a=="function"&&u>=c?a.bind(r):function(){}}return{error:n("error",e.DiagLogLevel.ERROR),warn:n("warn",e.DiagLogLevel.WARN),info:n("info",e.DiagLogLevel.INFO),debug:n("debug",e.DiagLogLevel.DEBUG),verbose:n("verbose",e.DiagLogLevel.VERBOSE)}}return L.createLogLevelDiagLogger=t,L}var ye;function A(){if(ye)return I;ye=1,Object.defineProperty(I,"__esModule",{value:!0}),I.DiagAPI=void 0;const e=Rt(),t=Et(),u=_e(),r=y(),n="diag";class i{static instance(){return this._instance||(this._instance=new i),this._instance}constructor(){function a(s){return function(...l){const d=(0,r.getGlobal)("diag");if(d)return d[s](...l)}}const o=this,g=(s,l={logLevel:u.DiagLogLevel.INFO})=>{var d,_,f;if(s===o){const b=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return o.error((d=b.stack)!==null&&d!==void 0?d:b.message),!1}typeof l=="number"&&(l={logLevel:l});const O=(0,r.getGlobal)("diag"),N=(0,t.createLogLevelDiagLogger)((_=l.logLevel)!==null&&_!==void 0?_:u.DiagLogLevel.INFO,s);if(O&&!l.suppressOverrideMessage){const b=(f=new Error().stack)!==null&&f!==void 0?f:"<failed to generate stacktrace>";O.warn(`Current logger will be overwritten from ${b}`),N.warn(`Current logger will overwrite one already registered from ${b}`)}return(0,r.registerGlobal)("diag",N,o,!0)};o.setLogger=g,o.disable=()=>{(0,r.unregisterGlobal)(n,o)},o.createComponentLogger=s=>new e.DiagComponentLogger(s),o.verbose=a("verbose"),o.debug=a("debug"),o.info=a("info"),o.warn=a("warn"),o.error=a("error")}}return I.DiagAPI=i,I}var w={},Ae;function St(){if(Ae)return w;Ae=1,Object.defineProperty(w,"__esModule",{value:!0}),w.BaggageImpl=void 0;class e{constructor(u){this._entries=u?new Map(u):new Map}getEntry(u){const r=this._entries.get(u);if(r)return Object.assign({},r)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(u,r){const n=new e(this._entries);return n._entries.set(u,r),n}removeEntry(u){const r=new e(this._entries);return r._entries.delete(u),r}removeEntries(...u){const r=new e(this._entries);for(const n of u)r._entries.delete(n);return r}clear(){return new e}}return w.BaggageImpl=e,w}var V={},Ie;function Ct(){return Ie||(Ie=1,Object.defineProperty(V,"__esModule",{value:!0}),V.baggageEntryMetadataSymbol=void 0,V.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")),V}var me;function _t(){if(me)return M;me=1,Object.defineProperty(M,"__esModule",{value:!0}),M.baggageEntryMetadataFromString=M.createBaggage=void 0;const e=A(),t=St(),u=Ct(),r=e.DiagAPI.instance();function n(c={}){return new t.BaggageImpl(new Map(Object.entries(c)))}M.createBaggage=n;function i(c){return typeof c!="string"&&(r.error(`Cannot create baggage metadata from unknown type: ${typeof c}`),c=""),{__TYPE__:u.baggageEntryMetadataSymbol,toString(){return c}}}return M.baggageEntryMetadataFromString=i,M}var E={},De;function te(){if(De)return E;De=1,Object.defineProperty(E,"__esModule",{value:!0}),E.ROOT_CONTEXT=E.createContextKey=void 0;function e(u){return Symbol.for(u)}E.createContextKey=e;class t{constructor(r){const n=this;n._currentContext=r?new Map(r):new Map,n.getValue=i=>n._currentContext.get(i),n.setValue=(i,c)=>{const a=new t(n._currentContext);return a._currentContext.set(i,c),a},n.deleteValue=i=>{const c=new t(n._currentContext);return c._currentContext.delete(i),c}}}return E.ROOT_CONTEXT=new t,E}var oe={},Le;function ht(){return Le||(Le=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagConsoleLogger=e._originalConsoleMethods=void 0;const t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];if(e._originalConsoleMethods={},typeof console<"u"){const r=["error","warn","info","debug","trace","log"];for(const n of r)typeof console[n]=="function"&&(e._originalConsoleMethods[n]=console[n])}class u{constructor(){function n(i){return function(...c){let a=e._originalConsoleMethods[i];if(typeof a!="function"&&(a=e._originalConsoleMethods.log),typeof a!="function"&&console&&(a=console[i],typeof a!="function"&&(a=console.log)),typeof a=="function")return a.apply(console,c)}}for(let i=0;i<t.length;i++)this[t[i].n]=n(t[i].c)}}e.DiagConsoleLogger=u})(oe)),oe}var ie={},we;function ft(){return we||(we=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createNoopMeter=e.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=e.NOOP_OBSERVABLE_GAUGE_METRIC=e.NOOP_OBSERVABLE_COUNTER_METRIC=e.NOOP_UP_DOWN_COUNTER_METRIC=e.NOOP_HISTOGRAM_METRIC=e.NOOP_GAUGE_METRIC=e.NOOP_COUNTER_METRIC=e.NOOP_METER=e.NoopObservableUpDownCounterMetric=e.NoopObservableGaugeMetric=e.NoopObservableCounterMetric=e.NoopObservableMetric=e.NoopHistogramMetric=e.NoopGaugeMetric=e.NoopUpDownCounterMetric=e.NoopCounterMetric=e.NoopMetric=e.NoopMeter=void 0;class t{constructor(){}createGauge(_,f){return e.NOOP_GAUGE_METRIC}createHistogram(_,f){return e.NOOP_HISTOGRAM_METRIC}createCounter(_,f){return e.NOOP_COUNTER_METRIC}createUpDownCounter(_,f){return e.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(_,f){return e.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(_,f){return e.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(_,f){return e.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(_,f){}removeBatchObservableCallback(_){}}e.NoopMeter=t;class u{}e.NoopMetric=u;class r extends u{add(_,f){}}e.NoopCounterMetric=r;class n extends u{add(_,f){}}e.NoopUpDownCounterMetric=n;class i extends u{record(_,f){}}e.NoopGaugeMetric=i;class c extends u{record(_,f){}}e.NoopHistogramMetric=c;class a{addCallback(_){}removeCallback(_){}}e.NoopObservableMetric=a;class o extends a{}e.NoopObservableCounterMetric=o;class g extends a{}e.NoopObservableGaugeMetric=g;class s extends a{}e.NoopObservableUpDownCounterMetric=s,e.NOOP_METER=new t,e.NOOP_COUNTER_METRIC=new r,e.NOOP_GAUGE_METRIC=new i,e.NOOP_HISTOGRAM_METRIC=new c,e.NOOP_UP_DOWN_COUNTER_METRIC=new n,e.NOOP_OBSERVABLE_COUNTER_METRIC=new o,e.NOOP_OBSERVABLE_GAUGE_METRIC=new g,e.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new s;function l(){return e.NOOP_METER}e.createNoopMeter=l})(ie)),ie}var ue={},Ve;function yt(){return Ve||(Ve=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueType=void 0,(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(e.ValueType||(e.ValueType={}))})(ue)),ue}var S={},je;function pt(){return je||(je=1,Object.defineProperty(S,"__esModule",{value:!0}),S.defaultTextMapSetter=S.defaultTextMapGetter=void 0,S.defaultTextMapGetter={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},S.defaultTextMapSetter={set(e,t,u){e!=null&&(e[t]=u)}}),S}var j={},q={},G={},B={},qe;function At(){if(qe)return B;qe=1,Object.defineProperty(B,"__esModule",{value:!0}),B.NoopContextManager=void 0;const e=te();let t=class{active(){return e.ROOT_CONTEXT}with(r,n,i,...c){return n.call(i,...c)}bind(r,n){return n}enable(){return this}disable(){return this}};return B.NoopContextManager=t,B}var Ge;function re(){if(Ge)return G;Ge=1,Object.defineProperty(G,"__esModule",{value:!0}),G.ContextAPI=void 0;const e=At(),t=y(),u=A(),r="context",n=new e.NoopContextManager;class i{constructor(){}static getInstance(){return this._instance||(this._instance=new i),this._instance}setGlobalContextManager(a){return(0,t.registerGlobal)(r,a,u.DiagAPI.instance())}active(){return this._getContextManager().active()}with(a,o,g,...s){return this._getContextManager().with(a,o,g,...s)}bind(a,o){return this._getContextManager().bind(a,o)}_getContextManager(){return(0,t.getGlobal)(r)||n}disable(){this._getContextManager().disable(),(0,t.unregisterGlobal)(r,u.DiagAPI.instance())}}return G.ContextAPI=i,G}var p={},U={},ce={},se={},Be;function vt(){return Be||(Be=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TraceFlags=void 0,(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(e.TraceFlags||(e.TraceFlags={}))})(se)),se}var Ue;function fe(){return Ue||(Ue=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=void 0;const t=vt();e.INVALID_SPANID="0000000000000000",e.INVALID_TRACEID="00000000000000000000000000000000",e.INVALID_SPAN_CONTEXT={traceId:e.INVALID_TRACEID,spanId:e.INVALID_SPANID,traceFlags:t.TraceFlags.NONE}})(ce)),ce}var xe;function pe(){if(xe)return U;xe=1,Object.defineProperty(U,"__esModule",{value:!0}),U.NonRecordingSpan=void 0;const e=fe();let t=class{constructor(r=e.INVALID_SPAN_CONTEXT){this._spanContext=r}spanContext(){return this._spanContext}setAttribute(r,n){return this}setAttributes(r){return this}addEvent(r,n){return this}addLink(r){return this}addLinks(r){return this}setStatus(r){return this}updateName(r){return this}end(r){}isRecording(){return!1}recordException(r,n){}};return U.NonRecordingSpan=t,U}var ke;function Pt(){if(ke)return p;ke=1,Object.defineProperty(p,"__esModule",{value:!0}),p.getSpanContext=p.setSpanContext=p.deleteSpan=p.setSpan=p.getActiveSpan=p.getSpan=void 0;const e=te(),t=pe(),u=re(),r=(0,e.createContextKey)("OpenTelemetry Context Key SPAN");function n(s){return s.getValue(r)||void 0}p.getSpan=n;function i(){return n(u.ContextAPI.getInstance().active())}p.getActiveSpan=i;function c(s,l){return s.setValue(r,l)}p.setSpan=c;function a(s){return s.deleteValue(r)}p.deleteSpan=a;function o(s,l){return c(s,new t.NonRecordingSpan(l))}p.setSpanContext=o;function g(s){var l;return(l=n(s))===null||l===void 0?void 0:l.spanContext()}return p.getSpanContext=g,p}var v={},$e;function ve(){if($e)return v;$e=1,Object.defineProperty(v,"__esModule",{value:!0}),v.wrapSpanContext=v.isSpanContextValid=v.isValidSpanId=v.isValidTraceId=void 0;const e=fe(),t=pe(),u=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function r(o,g){if(typeof o!="string"||o.length!==g)return!1;let s=0;for(let l=0;l<o.length;l+=4)s+=(u[o.charCodeAt(l)]|0)+(u[o.charCodeAt(l+1)]|0)+(u[o.charCodeAt(l+2)]|0)+(u[o.charCodeAt(l+3)]|0);return s===g}function n(o){return r(o,32)&&o!==e.INVALID_TRACEID}v.isValidTraceId=n;function i(o){return r(o,16)&&o!==e.INVALID_SPANID}v.isValidSpanId=i;function c(o){return n(o.traceId)&&i(o.spanId)}v.isSpanContextValid=c;function a(o){return new t.NonRecordingSpan(o)}return v.wrapSpanContext=a,v}var Fe;function bt(){if(Fe)return q;Fe=1,Object.defineProperty(q,"__esModule",{value:!0}),q.NoopTracer=void 0;const e=re(),t=Pt(),u=pe(),r=ve(),n=e.ContextAPI.getInstance();let i=class{startSpan(o,g,s=n.active()){if(!!g?.root)return new u.NonRecordingSpan;const d=s&&(0,t.getSpanContext)(s);return c(d)&&(0,r.isSpanContextValid)(d)?new u.NonRecordingSpan(d):new u.NonRecordingSpan}startActiveSpan(o,g,s,l){let d,_,f;if(arguments.length<2)return;arguments.length===2?f=g:arguments.length===3?(d=g,f=s):(d=g,_=s,f=l);const O=_??n.active(),N=this.startSpan(o,d,O),b=(0,t.setSpan)(O,N);return n.with(b,f,void 0,N)}};q.NoopTracer=i;function c(a){return a!==null&&typeof a=="object"&&"spanId"in a&&typeof a.spanId=="string"&&"traceId"in a&&typeof a.traceId=="string"&&"traceFlags"in a&&typeof a.traceFlags=="number"}return q}var Ke;function Ot(){if(Ke)return j;Ke=1,Object.defineProperty(j,"__esModule",{value:!0}),j.ProxyTracer=void 0;const e=bt(),t=new e.NoopTracer;let u=class{constructor(n,i,c,a){this._provider=n,this.name=i,this.version=c,this.options=a}startSpan(n,i,c){return this._getTracer().startSpan(n,i,c)}startActiveSpan(n,i,c,a){const o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)}_getTracer(){if(this._delegate)return this._delegate;const n=this._provider.getDelegateTracer(this.name,this.version,this.options);return n?(this._delegate=n,this._delegate):t}};return j.ProxyTracer=u,j}var x={},k={},Xe;function It(){if(Xe)return k;Xe=1,Object.defineProperty(k,"__esModule",{value:!0}),k.NoopTracerProvider=void 0;const e=bt();let t=class{getTracer(r,n,i){return new e.NoopTracer}};return k.NoopTracerProvider=t,k}var He;function Nt(){if(He)return x;He=1,Object.defineProperty(x,"__esModule",{value:!0}),x.ProxyTracerProvider=void 0;const e=Ot(),t=It(),u=new t.NoopTracerProvider;let r=class{getTracer(i,c,a){var o;return(o=this.getDelegateTracer(i,c,a))!==null&&o!==void 0?o:new e.ProxyTracer(this,i,c,a)}getDelegate(){var i;return(i=this._delegate)!==null&&i!==void 0?i:u}setDelegate(i){this._delegate=i}getDelegateTracer(i,c,a){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(i,c,a)}};return x.ProxyTracerProvider=r,x}var le={},We;function mt(){return We||(We=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SamplingDecision=void 0,(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(e.SamplingDecision||(e.SamplingDecision={}))})(le)),le}var ge={},Ye;function Dt(){return Ye||(Ye=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpanKind=void 0,(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(e.SpanKind||(e.SpanKind={}))})(ge)),ge}var de={},ze;function Lt(){return ze||(ze=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpanStatusCode=void 0,(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(e.SpanStatusCode||(e.SpanStatusCode={}))})(de)),de}var $={},F={},C={},Qe;function wt(){if(Qe)return C;Qe=1,Object.defineProperty(C,"__esModule",{value:!0}),C.validateValue=C.validateKey=void 0;const e="[_0-9a-z-*/]",t=`[a-z]${e}{0,255}`,u=`[a-z0-9]${e}{0,240}@[a-z]${e}{0,13}`,r=new RegExp(`^(?:${t}|${u})$`),n=/^[ -~]{0,255}[!-~]$/,i=/,|=/;function c(o){return r.test(o)}C.validateKey=c;function a(o){return n.test(o)&&!i.test(o)}return C.validateValue=a,C}var Je;function Vt(){if(Je)return F;Je=1,Object.defineProperty(F,"__esModule",{value:!0}),F.TraceStateImpl=void 0;const e=wt(),t=32,u=512,r=",",n="=";class i{constructor(a){this._internalState=new Map,a&&this._parse(a)}set(a,o){const g=this._clone();return g._internalState.has(a)&&g._internalState.delete(a),g._internalState.set(a,o),g}unset(a){const o=this._clone();return o._internalState.delete(a),o}get(a){return this._internalState.get(a)}serialize(){return Array.from(this._internalState.keys()).reduceRight((a,o)=>(a.push(o+n+this.get(o)),a),[]).join(r)}_parse(a){a.length>u||(this._internalState=a.split(r).reduceRight((o,g)=>{const s=g.trim(),l=s.indexOf(n);if(l!==-1){const d=s.slice(0,l),_=s.slice(l+1,g.length);(0,e.validateKey)(d)&&(0,e.validateValue)(_)&&o.set(d,_)}return o},new Map),this._internalState.size>t&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,t))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){const a=new i;return a._internalState=new Map(this._internalState),a}}return F.TraceStateImpl=i,F}var Ze;function jt(){if(Ze)return $;Ze=1,Object.defineProperty($,"__esModule",{value:!0}),$.createTraceState=void 0;const e=Vt();function t(u){return new e.TraceStateImpl(u)}return $.createTraceState=t,$}var K={},et;function qt(){if(et)return K;et=1,Object.defineProperty(K,"__esModule",{value:!0}),K.context=void 0;const e=re();return K.context=e.ContextAPI.getInstance(),K}var X={},tt;function Gt(){if(tt)return X;tt=1,Object.defineProperty(X,"__esModule",{value:!0}),X.diag=void 0;const e=A();return X.diag=e.DiagAPI.instance(),X}var H={},W={},h={},rt;function Bt(){if(rt)return h;rt=1,Object.defineProperty(h,"__esModule",{value:!0}),h.NOOP_METER_PROVIDER=h.NoopMeterProvider=void 0;const e=ft();let t=class{getMeter(r,n,i){return e.NOOP_METER}};return h.NoopMeterProvider=t,h.NOOP_METER_PROVIDER=new t,h}var nt;function Ut(){if(nt)return W;nt=1,Object.defineProperty(W,"__esModule",{value:!0}),W.MetricsAPI=void 0;const e=Bt(),t=y(),u=A(),r="metrics";class n{constructor(){}static getInstance(){return this._instance||(this._instance=new n),this._instance}setGlobalMeterProvider(c){return(0,t.registerGlobal)(r,c,u.DiagAPI.instance())}getMeterProvider(){return(0,t.getGlobal)(r)||e.NOOP_METER_PROVIDER}getMeter(c,a,o){return this.getMeterProvider().getMeter(c,a,o)}disable(){(0,t.unregisterGlobal)(r,u.DiagAPI.instance())}}return W.MetricsAPI=n,W}var at;function xt(){if(at)return H;at=1,Object.defineProperty(H,"__esModule",{value:!0}),H.metrics=void 0;const e=Ut();return H.metrics=e.MetricsAPI.getInstance(),H}var Y={},z={},Q={},ot;function kt(){if(ot)return Q;ot=1,Object.defineProperty(Q,"__esModule",{value:!0}),Q.NoopTextMapPropagator=void 0;let e=class{inject(u,r){}extract(u,r){return u}fields(){return[]}};return Q.NoopTextMapPropagator=e,Q}var P={},it;function $t(){if(it)return P;it=1,Object.defineProperty(P,"__esModule",{value:!0}),P.deleteBaggage=P.setBaggage=P.getActiveBaggage=P.getBaggage=void 0;const e=re(),u=(0,te().createContextKey)("OpenTelemetry Baggage Key");function r(a){return a.getValue(u)||void 0}P.getBaggage=r;function n(){return r(e.ContextAPI.getInstance().active())}P.getActiveBaggage=n;function i(a,o){return a.setValue(u,o)}P.setBaggage=i;function c(a){return a.deleteValue(u)}return P.deleteBaggage=c,P}var ut;function Ft(){if(ut)return z;ut=1,Object.defineProperty(z,"__esModule",{value:!0}),z.PropagationAPI=void 0;const e=y(),t=kt(),u=pt(),r=$t(),n=_t(),i=A(),c="propagation",a=new t.NoopTextMapPropagator;class o{constructor(){this.createBaggage=n.createBaggage,this.getBaggage=r.getBaggage,this.getActiveBaggage=r.getActiveBaggage,this.setBaggage=r.setBaggage,this.deleteBaggage=r.deleteBaggage}static getInstance(){return this._instance||(this._instance=new o),this._instance}setGlobalPropagator(s){return(0,e.registerGlobal)(c,s,i.DiagAPI.instance())}inject(s,l,d=u.defaultTextMapSetter){return this._getGlobalPropagator().inject(s,l,d)}extract(s,l,d=u.defaultTextMapGetter){return this._getGlobalPropagator().extract(s,l,d)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,e.unregisterGlobal)(c,i.DiagAPI.instance())}_getGlobalPropagator(){return(0,e.getGlobal)(c)||a}}return z.PropagationAPI=o,z}var ct;function Kt(){if(ct)return Y;ct=1,Object.defineProperty(Y,"__esModule",{value:!0}),Y.propagation=void 0;const e=Ft();return Y.propagation=e.PropagationAPI.getInstance(),Y}var J={},Z={},st;function Xt(){if(st)return Z;st=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.TraceAPI=void 0;const e=y(),t=Nt(),u=ve(),r=Pt(),n=A(),i="trace";class c{constructor(){this._proxyTracerProvider=new t.ProxyTracerProvider,this.wrapSpanContext=u.wrapSpanContext,this.isSpanContextValid=u.isSpanContextValid,this.deleteSpan=r.deleteSpan,this.getSpan=r.getSpan,this.getActiveSpan=r.getActiveSpan,this.getSpanContext=r.getSpanContext,this.setSpan=r.setSpan,this.setSpanContext=r.setSpanContext}static getInstance(){return this._instance||(this._instance=new c),this._instance}setGlobalTracerProvider(o){const g=(0,e.registerGlobal)(i,this._proxyTracerProvider,n.DiagAPI.instance());return g&&this._proxyTracerProvider.setDelegate(o),g}getTracerProvider(){return(0,e.getGlobal)(i)||this._proxyTracerProvider}getTracer(o,g){return this.getTracerProvider().getTracer(o,g)}disable(){(0,e.unregisterGlobal)(i,n.DiagAPI.instance()),this._proxyTracerProvider=new t.ProxyTracerProvider}}return Z.TraceAPI=c,Z}var lt;function Ht(){if(lt)return J;lt=1,Object.defineProperty(J,"__esModule",{value:!0}),J.trace=void 0;const e=Xt();return J.trace=e.TraceAPI.getInstance(),J}var gt;function Wt(){return gt||(gt=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.trace=e.propagation=e.metrics=e.diag=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.createTraceState=e.TraceFlags=e.SpanStatusCode=e.SpanKind=e.SamplingDecision=e.ProxyTracerProvider=e.ProxyTracer=e.defaultTextMapSetter=e.defaultTextMapGetter=e.ValueType=e.createNoopMeter=e.DiagLogLevel=e.DiagConsoleLogger=e.ROOT_CONTEXT=e.createContextKey=e.baggageEntryMetadataFromString=void 0;var t=_t();Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return t.baggageEntryMetadataFromString}});var u=te();Object.defineProperty(e,"createContextKey",{enumerable:!0,get:function(){return u.createContextKey}}),Object.defineProperty(e,"ROOT_CONTEXT",{enumerable:!0,get:function(){return u.ROOT_CONTEXT}});var r=ht();Object.defineProperty(e,"DiagConsoleLogger",{enumerable:!0,get:function(){return r.DiagConsoleLogger}});var n=_e();Object.defineProperty(e,"DiagLogLevel",{enumerable:!0,get:function(){return n.DiagLogLevel}});var i=ft();Object.defineProperty(e,"createNoopMeter",{enumerable:!0,get:function(){return i.createNoopMeter}});var c=yt();Object.defineProperty(e,"ValueType",{enumerable:!0,get:function(){return c.ValueType}});var a=pt();Object.defineProperty(e,"defaultTextMapGetter",{enumerable:!0,get:function(){return a.defaultTextMapGetter}}),Object.defineProperty(e,"defaultTextMapSetter",{enumerable:!0,get:function(){return a.defaultTextMapSetter}});var o=Ot();Object.defineProperty(e,"ProxyTracer",{enumerable:!0,get:function(){return o.ProxyTracer}});var g=Nt();Object.defineProperty(e,"ProxyTracerProvider",{enumerable:!0,get:function(){return g.ProxyTracerProvider}});var s=mt();Object.defineProperty(e,"SamplingDecision",{enumerable:!0,get:function(){return s.SamplingDecision}});var l=Dt();Object.defineProperty(e,"SpanKind",{enumerable:!0,get:function(){return l.SpanKind}});var d=Lt();Object.defineProperty(e,"SpanStatusCode",{enumerable:!0,get:function(){return d.SpanStatusCode}});var _=vt();Object.defineProperty(e,"TraceFlags",{enumerable:!0,get:function(){return _.TraceFlags}});var f=jt();Object.defineProperty(e,"createTraceState",{enumerable:!0,get:function(){return f.createTraceState}});var O=ve();Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return O.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return O.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return O.isValidSpanId}});var N=fe();Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return N.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return N.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return N.INVALID_SPAN_CONTEXT}});const b=qt();Object.defineProperty(e,"context",{enumerable:!0,get:function(){return b.context}});const Pe=Gt();Object.defineProperty(e,"diag",{enumerable:!0,get:function(){return Pe.diag}});const be=xt();Object.defineProperty(e,"metrics",{enumerable:!0,get:function(){return be.metrics}});const Oe=Kt();Object.defineProperty(e,"propagation",{enumerable:!0,get:function(){return Oe.propagation}});const Ne=Ht();Object.defineProperty(e,"trace",{enumerable:!0,get:function(){return Ne.trace}}),e.default={context:b.context,diag:Pe.diag,metrics:be.metrics,propagation:Oe.propagation,trace:Ne.trace}})(ne)),ne}var ee=Wt();const or=e=>{const{renameSpan:t,tracer:u}=e;let r;const n=new Map;return Tt({hooks:{"run:after":i=>{if(!r)return;const c=[...i.values()].filter(a=>a.status==="failure").length;r.setAttribute("vis.run.tasks_total",i.size),r.setAttribute("vis.run.tasks_failed",c),c>0?r.setStatus({code:ee.SpanStatusCode.ERROR,message:`${String(c)} task(s) failed`}):r.setStatus({code:ee.SpanStatusCode.OK}),r.end(),r=void 0;for(const a of n.values())a.end();n.clear()},"run:before":i=>{r&&(r.setStatus({code:ee.SpanStatusCode.ERROR,message:"run:before fired while previous run was still active"}),r.end());for(const c of n.values())c.end();n.clear(),r=u.startSpan("vis.run",{attributes:{"vis.run.task_count":i.tasks.length,"vis.workspace_root":i.workspaceRoot}})},"task:after":(i,c)=>{const a=n.get(i.id);a&&(a.setAttribute("vis.task.exit_code",c.code??0),a.setAttribute("vis.task.cache_status",c.status),a.end(),n.delete(i.id))},"task:before":i=>{const c=n.get(i.id);c&&(c.setStatus({code:ee.SpanStatusCode.ERROR,message:"retried — superseded by new attempt"}),c.end());const a=u.startSpan(t?t(i):i.id,{attributes:{"vis.task.id":i.id,"vis.task.project":i.target.project,"vis.task.target":i.target.target}});n.set(i.id,a)},"task:failure":(i,c)=>{const a=n.get(i.id);a&&a.setStatus({code:ee.SpanStatusCode.ERROR,message:`Task failed with exit code ${String(c.code??-1)}`})}},name:"otel"})};export{or as otelPlugin};
@@ -0,0 +1,4 @@
1
+ import{createRequire as ct}from"node:module";import{k as be,m as te,l as De,a as mt,h as gt,z as Lt,g as St}from"./index-DHD8wb6Z.js";import{a as ie,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-B2aSeDpC.js";let ht;const ut=h=>(ht??=ct(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 ut(h)},{dirname:pt}=R("node:path"),Pe=R("node:url"),{fileURLToPath:ft}=Pe,ye=R("node:module"),{createRequire:dt}=ye,yt=R("util"),E=h=>"Deno"in h,Di=()=>{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(),wi=()=>{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},xi=()=>E(globalThis)?[]:process.execArgv,Ei=()=>E(globalThis)?globalThis.Deno.execPath():process.execPath,Oi=()=>{if(E(globalThis)){const h=globalThis.Deno.build?.os??"unknown";return h==="windows"?"win32":h}return process.platform},Ni=()=>{if(E(globalThis)){const h=globalThis.Deno.build?.arch??"unknown";return h==="x86_64"?"x64":h==="aarch64"?"arm64":h}return process.arch},Fi=(h=0)=>{if(E(globalThis))throw globalThis.Deno.exit(h),new Error("Deno exit failed");process.exit(h)},Gi=(h,e)=>{if(E(globalThis))return()=>{};const t=process;return t.on(h,e),()=>{t.removeListener(h,e)}};var U,ne;function Ae(){return ne||(ne=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,se;function Dt(){return se||(se=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,oe;function At(){return oe||(oe=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 wt(){if(ae)return _;ae=1;var h=[].concat(Ae()).concat(Dt()),e=At();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 a(){n(/[ ]*/)}function o(){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 l(){return n(/[A-Za-z0-9-.]+/)}function u(){var L=l();if(!L)throw new Error("Expected idstring at offset "+i);return L}function d(){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=l();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 o()||d()||S()||b()}for(var C=[];s()&&(a(),!!s());){var m=v();if(!m)throw new Error("Unexpected `"+t[i]+"` at offset "+i);C.push(m)}return C},_}var W,le;function xt(){return le||(le=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 a(){if(n("WITH")){var m=i();if(m&&m.type==="EXCEPTION")return s(),m.string;throw new Error("Expected exception after `WITH`")}}function o(){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 l(){var m=i();if(m&&m.type==="LICENSE"){s();var L={license:m.string};n("+")&&(L.plus=!0);var c=a();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 d(){return u()||o()||l()}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",d),v=S("OR",b),C=v();if(!C||t())throw new Error("Syntax error");return C}),W}var H,ce;function we(){if(ce)return H;ce=1;var h=wt(),e=xt();return H=function(t){return e(h(t))},H}var j,he;function Et(){if(he)return j;he=1;var h=we(),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,a=1,o=[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"}],l=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(l).map(function(g){return[g,l[g]]}).filter(function(g){return g[1].length===1&&g[0]!==null&&g[0]!=="APL"}).map(function(g){return[g[0],g[1][0]]});l=void 0;var d=[["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<o.length;g++){var y=o[g](c).trim();if(y!==c&&t(y))return y}return null},C=function(c){for(var g=c.toUpperCase(),y=0;y<d.length;y++){var r=d[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 f=c.replace(p,r[a]),P=g(f);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 f=c.replace(/\+$/,"").trim();if(t(f))return r(f);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,ue;function Ot(){if(ue)return z;ue=1;var h=we(),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(a,o){return o.slice(0,a.length)===a}function n(a){if(a.hasOwnProperty("license")){var o=a.license;return s("LicenseRef",o)||s("DocumentRef",o)}else return n(a.left)||n(a.right)}return z=function(a){var o;try{o=h(a)}catch{var l;if(a==="UNLICENSED"||a==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(l=i.exec(a))return{validForOldPackages:!0,validForNewPackages:!0,inFile:l[1]};var u={validForOldPackages:!1,validForNewPackages:!1,warnings:[t]};if(a.trim().length!==0){var d=e(a);d&&u.warnings.push('license is similar to the valid expression "'+d+'"')}return u}return n(o)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[t]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}},z}var xe={hasSubscribers:!1},A=xe,F=xe;import("node:diagnostics_channel").then(h=>{A=h.channel("lru-cache:metrics"),F=h.tracingChannel("lru-cache")}).catch(()=>{});var Nt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Y=()=>A.hasSubscribers||F.hasSubscribers,Ee=new Set,pe=process||{},Ft=(h,e,t,i)=>{typeof pe.emitWarning=="function"?pe.emitWarning(h,e,t,i):console.error(`[${t}] ${e}: ${h}`)},Gt=h=>!Ee.has(h),N=h=>!!h&&h===Math.floor(h)&&h>0&&isFinite(h),Oe=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(h){super(h),this.fill(0)}},$t=class T{heap;length;static#n=!1;static create(e){let t=Oe(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 Ne{#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;#a;#C;#l;#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.#a},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.#A(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:a,updateAgeOnHas:o,allowStale:l,dispose:u,onInsert:d,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:f,ignoreFetchAbort:P,backgroundFetchSize:D=1,perf:w}=e;if(this.backgroundFetchSize=D,w!==void 0&&typeof w?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#S=w??Nt,t!==0&&!N(t))throw new TypeError("max option must be a nonnegative integer");let x=t?Oe(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.#a=0,this.#C=$t.create(t),this.#o=0,this.#v=0,typeof u=="function"&&(this.#t=u),typeof d=="function"&&(this.#O=d),typeof S=="function"?(this.#L=S,this.#l=[]):(this.#L=void 0,this.#l=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=!!f,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=!!l,this.noDeleteOnStaleGet=!!r,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,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)&&(Ee.add(I),Ft("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",I,Ne))}}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,l,u=this.#S.now())=>{t[o]=l!==0?u:0,e[o]=l,s(o,l)},this.#F=o=>{t[o]=e[o]!==0?this.#S.now():0,s(o,e[o])};let s=this.ttlAutopurge?(o,l)=>{if(i?.[o]&&(clearTimeout(i[o]),i[o]=void 0),l&&l!==0&&i){let u=setTimeout(()=>{this.#g(o)&&this.#w(this.#r[o],"expire")},l+1);u.unref&&u.unref(),i[o]=u}}:()=>{};this.#x=(o,l)=>{if(e[l]){let u=e[l],d=t[l];if(!u||!d)return;o.ttl=u,o.start=d,o.now=n||a();let S=o.now-d;o.remainingTTL=u-S}};let n=0,a=()=>{let o=this.#S.now();if(this.ttlResolution>0){n=o;let l=setTimeout(()=>n=0,this.ttlResolution);l.unref&&l.unref()}return o};this.getRemainingTTL=o=>{let l=this.#s.get(o);if(l===void 0)return 0;let u=e[l],d=t[l];if(!u||!d)return 1/0;let S=(n||a())-d;return u-S},this.#g=o=>{let l=t[o],u=e[o];return!!u&&!!l&&(n||a())-l>u}}#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.#a;this.#j(t)&&((e||!this.#g(t))&&(yield t),t!==this.#h);)t=this.#f[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#j(t)&&((e||!this.#g(t))&&(yield t),t!==this.#a);)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.#A())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.#A()){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.#A())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.#A()){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.#A({allowStale:!0}))this.#g(t)&&(this.#w(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 a=this.#d[t],o=this.#y[t];if(a&&o){let l=a-(this.#S.now()-o);n.ttl=l,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 a={value:n};if(this.#d&&this.#y){a.ttl=this.#d[t];let o=this.#S.now()-this.#y[t];a.start=Math.floor(Date.now()-o)}this.#P&&(a.size=this.#P[t]),e.unshift([i,a])}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=A.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&&A.hasSubscribers&&A.publish(s),n}#E(e,t,i,s){let{ttl:n=this.ttl,start:a,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=i,d=this.#i(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:S=this.noUpdateTTL}=i;u&&!d&&(u.value=t);let b=this.#H(e,t,i.size||0,l,u);if(this.maxEntrySize&&b>this.maxEntrySize)return this.#w(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.#a: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.#a]=v,this.#f[v]=this.#a,this.#a=v,this.#o++,this.#U(v,b,u),u&&(u.set="add"),S=!1,this.#N&&!d&&this.#O?.(t,e,"add");else{this.#T(v);let C=this.#e[v];if(t!==C){if(!o)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.#l?.push([m,e,"set"]))}else this.#b&&this.#t?.(C,e,"set"),this.#p&&this.#l?.push([C,e,"set"]);if(this.#G(v),this.#U(v,b,u),this.#e[v]=t,!d){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 d||(u&&(u.set="update"),this.#N&&this.onInsert?.(t,e,"update"))}if(n!==0&&!this.#d&&this.#_(),this.#d&&(S||this.#W(v,n,a),u&&this.#x(u,v)),!o&&this.#p&&this.#l){let C=this.#l,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.#l){let e=this.#l,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 a=n?s.__staleWhileFetching:s;return(this.#b||this.#p)&&a!==void 0&&(this.#b&&this.#t?.(a,i,"evict"),this.#p&&this.#l?.push([a,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.#a=0,this.#C.length=0):this.#h=this.#u[t],this.#s.delete(i),this.#o--,t}has(e,t={}){let{status:i=A.hasSubscribers?{}:void 0}=t;t.status=i,i&&(i.op="has",i.key=e,i.cache=this);let s=this.#K(e,t);return A.hasSubscribers&&A.publish(i),s}#K(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#s.get(e);if(n!==void 0){let a=this.#e[n];if(this.#i(a)&&a.__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 A.hasSubscribers&&A.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 a=this.#e[n],o=this.#i(a)?a.__staleWhileFetching:a;return i&&(o!==void 0?(i.peek="hit",i.value=o):i.peek="miss"),o}#k(e,t,i,s){let n=t===void 0?void 0:this.#e[t];if(this.#i(n))return n;let a=new AbortController,{signal:o}=i;o?.addEventListener("abort",()=>a.abort(o.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:s},u=(m,L=!1)=>{let{aborted:c}=a.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=a.signal.reason,g&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),c&&!g&&!L)return S(a.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.#w(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.#E(e,m,l.options,r))),m},d=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),S(m,!1)),S=(m,L)=>{let{aborted:c}=a.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.#w(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,l);a.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,d),C=Object.assign(v,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.#E(e,C,{...l.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:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:d=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:a,noDisposeOnSet:o,size:l,sizeCalculation:u,noUpdateTTL:d,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 w=i&&p.__staleWhileFetching!==void 0;return c&&(c.fetch="inflight",w&&(c.returnedStale=!0)),w?p.__staleWhileFetching:p.__returned=p}let f=this.#g(r);if(!L&&!f)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=f?"stale":"refresh",D&&f&&(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=A.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),A.hasSubscribers&&A.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:a,...o}=t;n&&a&&(n.forceRefresh=!0);let l=this.#$(e,o),u=a||l===void 0;if(n&&(n.memo=u?"miss":"hit",u||(n.value=l)),!u)return l;let d=i(e,l,{options:o,context:s});return n&&(n.value=d),this.#E(e,d,o),d}get(e,t={}){let{status:i=A.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),A.hasSubscribers&&A.publish(i)),s}#$(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,o=this.#s.get(e);if(o===void 0){a&&(a.get="miss");return}let l=this.#e[o],u=this.#i(l);return a&&this.#x(a,o),this.#g(o)?u?(a&&(a.get="stale-fetching"),i&&l.__staleWhileFetching!==void 0?(a&&(a.returnedStale=!0),l.__staleWhileFetching):void 0):(n||this.#w(e,"expire"),a&&(a.get="stale"),i?(a&&(a.returnedStale=!0),l):void 0):(a&&(a.get=u?"fetching":"hit"),this.#T(o),s&&this.#F(o),u?l.__staleWhileFetching:l)}#Y(e,t){this.#f[t]=e,this.#u[e]=t}#T(e){e!==this.#a&&(e===this.#h?this.#h=this.#u[e]:this.#Y(this.#f[e],this.#u[e]),this.#Y(this.#a,e),this.#a=e)}delete(e){return this.#w(e,"delete")}#w(e,t){A.hasSubscribers&&A.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.#l?.push([n,e,t])),this.#s.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#a)this.#a=this.#f[s];else if(s===this.#h)this.#h=this.#u[s];else{let a=this.#f[s];this.#u[a]=this.#u[s];let o=this.#u[s];this.#f[o]=this.#f[s]}this.#o--,this.#C.push(s)}}if(this.#p&&this.#l?.length){let s=this.#l,n;for(;n=s?.shift();)this.#L?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#A({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.#l?.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.#a=0,this.#C.length=0,this.#v=0,this.#o=0,this.#p&&this.#l){let t=this.#l,i;for(;i=t?.shift();)this.#L?.(...i)}}};const Bt=Object.defineProperty({__proto__:null,LRUCache:Tt},Symbol.toStringTag,{value:"Module"}),Rt=ie(Bt);var q,fe;function It(){if(fe)return q;fe=1;const h=(...n)=>n.every(a=>a)?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:a,project:o,committish:l})=>`git@${n}:${a}/${o}.git${h("#",l)}`,sshurltemplate:({domain:n,user:a,project:o,committish:l})=>`git+ssh://git@${n}/${a}/${o}.git${h("#",l)}`,edittemplate:({domain:n,user:a,project:o,committish:l,editpath:u,path:d})=>`https://${n}/${a}/${o}${h("/",u,"/",e(l||"HEAD"),"/",d)}`,browsetemplate:({domain:n,user:a,project:o,committish:l,treepath:u})=>`https://${n}/${a}/${o}${h("/",u,"/",e(l))}`,browsetreetemplate:({domain:n,user:a,project:o,committish:l,treepath:u,path:d,fragment:S,hashformat:b})=>`https://${n}/${a}/${o}/${u}/${e(l||"HEAD")}/${d}${h("#",b(S||""))}`,browseblobtemplate:({domain:n,user:a,project:o,committish:l,blobpath:u,path:d,fragment:S,hashformat:b})=>`https://${n}/${a}/${o}/${u}/${e(l||"HEAD")}/${d}${h("#",b(S||""))}`,docstemplate:({domain:n,user:a,project:o,treepath:l,committish:u})=>`https://${n}/${a}/${o}${h("/",l,"/",e(u))}#readme`,httpstemplate:({auth:n,domain:a,user:o,project:l,committish:u})=>`git+https://${h(n,"@")}${a}/${o}/${l}.git${h("#",u)}`,filetemplate:({domain:n,user:a,project:o,committish:l,path:u})=>`https://${n}/${a}/${o}/raw/${e(l||"HEAD")}/${u}`,shortcuttemplate:({type:n,user:a,project:o,committish:l})=>`${n}:${a}/${o}${h("#",l)}`,pathtemplate:({user:n,project:a,committish:o})=>`${n}/${a}${h("#",o)}`,bugstemplate:({domain:n,user:a,project:o})=>`https://${n}/${a}/${o}/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:a,project:o,committish:l,path:u})=>`https://${h(n,"@")}raw.githubusercontent.com/${a}/${o}/${e(l||"HEAD")}/${u}`,gittemplate:({auth:n,domain:a,user:o,project:l,committish:u})=>`git://${h(n,"@")}${a}/${o}/${l}.git${h("#",u)}`,tarballtemplate:({domain:n,user:a,project:o,committish:l})=>`https://codeload.${n}/${a}/${o}/tar.gz/${e(l||"HEAD")}`,extract:n=>{let[,a,o,l,u]=n.pathname.split("/",5);if(!(l&&l!=="tree")&&(l||(u=n.hash.slice(1)),o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!a||!o)))return{user:a,project:o,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:a,project:o,committish:l,treepath:u,path:d,editpath:S})=>`https://${n}/${a}/${o}${h("/",u,"/",e(l||"HEAD"),"/",d,S)}`,tarballtemplate:({domain:n,user:a,project:o,committish:l})=>`https://${n}/${a}/${o}/get/${e(l||"HEAD")}.tar.gz`,extract:n=>{let[,a,o,l]=n.pathname.split("/",4);if(!["get"].includes(l)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!a||!o)))return{user:a,project:o,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:a,project:o,committish:l})=>`https://${n}/api/v4/projects/${e(a+"/"+o)}/repository/archive.tar.gz?sha=${e(l||"HEAD")}`,extract:n=>{const a=n.pathname.slice(1);if(a.includes("/-/")||a.includes("/archive.tar.gz"))return;const o=a.split("/");let l=o.pop();l.endsWith(".git")&&(l=l.slice(0,-4));const u=o.join("/");if(!(!u||!l))return{user:u,project:l,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:a,committish:o})=>`git@${n}:${a}.git${h("#",o)}`,sshurltemplate:({domain:n,project:a,committish:o})=>`git+ssh://git@${n}/${a}.git${h("#",o)}`,edittemplate:({domain:n,user:a,project:o,committish:l,editpath:u})=>`https://${n}/${a}/${o}${h("/",e(l))}/${u}`,browsetemplate:({domain:n,project:a,committish:o})=>`https://${n}/${a}${h("/",e(o))}`,browsetreetemplate:({domain:n,project:a,committish:o,path:l,hashformat:u})=>`https://${n}/${a}${h("/",e(o))}${h("#",u(l))}`,browseblobtemplate:({domain:n,project:a,committish:o,path:l,hashformat:u})=>`https://${n}/${a}${h("/",e(o))}${h("#",u(l))}`,docstemplate:({domain:n,project:a,committish:o})=>`https://${n}/${a}${h("/",e(o))}`,httpstemplate:({domain:n,project:a,committish:o})=>`git+https://${n}/${a}.git${h("#",o)}`,filetemplate:({user:n,project:a,committish:o,path:l})=>`https://gist.githubusercontent.com/${n}/${a}/raw${h("/",e(o))}/${l}`,shortcuttemplate:({type:n,project:a,committish:o})=>`${n}:${a}${h("#",o)}`,pathtemplate:({project:n,committish:a})=>`${n}${h("#",a)}`,bugstemplate:({domain:n,project:a})=>`https://${n}/${a}`,gittemplate:({domain:n,project:a,committish:o})=>`git://${n}/${a}.git${h("#",o)}`,tarballtemplate:({project:n,committish:a})=>`https://codeload.github.com/gist/${n}/tar.gz/${e(a||"HEAD")}`,extract:n=>{let[,a,o,l]=n.pathname.split("/",4);if(l!=="raw"){if(!o){if(!a)return;o=a,a=null}return o.endsWith(".git")&&(o=o.slice(0,-4)),{user:a,project:o,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:a,project:o,committish:l,path:u})=>`https://${n}/${a}/${o}/blob/${e(l)||"HEAD"}/${u}`,httpstemplate:({domain:n,user:a,project:o,committish:l})=>`https://${n}/${a}/${o}${h("#",l)}`,tarballtemplate:({domain:n,user:a,project:o,committish:l})=>`https://${n}/${a}/${o}/archive/${e(l)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:n=>{let[,a,o,l]=n.pathname.split("/",4);if(!["archive"].includes(l)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!a||!o)))return{user:a,project:o,committish:n.hash.slice(1)}}};for(const[n,a]of Object.entries(s))s[n]=Object.assign({},i,a);return q=s,q}var V,de;function Fe(){if(de)return V;de=1;const h=(s,n,a)=>{const o=s.indexOf(a);return s.lastIndexOf(n,o>-1?o:1/0)},e=s=>{try{return new URL(s)}catch{}},t=(s,n)=>{const a=s.indexOf(":"),o=s.slice(0,a+1);if(Object.prototype.hasOwnProperty.call(n,o)||s.substr(a,3)==="://")return s;const l=s.indexOf("@");return l>-1?l>a?`git+ssh://${s}`:s:`${s.slice(0,a+1)}//${s.slice(a+1)}`},i=s=>{const n=h(s,"@","#"),a=h(s,":","#");return a>n&&(s=s.slice(0,a)+"/"+s.slice(a+1)),h(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s};return V=(s,n)=>{const a=n?t(s,n):s;return e(a)||e(i(a))},V}var K,me;function Ut(){if(me)return K;me=1;const h=Fe(),e=t=>{const i=t.indexOf("#"),s=t.indexOf("/"),n=t.indexOf("/",s+1),a=t.indexOf(":"),o=/\s/.exec(t),l=t.indexOf("@"),u=!o||i>-1&&o.index>i,d=l===-1||i>-1&&l>i,S=a===-1||i>-1&&a>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&&d&&S&&b};return K=(t,i,{gitHosts:s,protocols:n})=>{if(!t)return;const a=e(t)?`github:${t}`:t,o=h(a,n);if(!o)return;const l=s.byShortcut[o.protocol],u=s.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],d=l||u;if(!d)return;const S=s[l||u];let b=null;n[o.protocol]?.auth&&(o.username||o.password)&&(b=`${o.username}${o.password?":"+o.password:""}`);let v=null,C=null,m=null,L=null;try{if(l){let c=o.pathname.startsWith("/")?o.pathname.slice(1):o.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)),o.hash&&(v=decodeURIComponent(o.hash.slice(1))),L="shortcut"}else{if(!S.protocols.includes(o.protocol))return;const c=S.extract(o);if(!c)return;C=c.user&&decodeURIComponent(c.user),m=decodeURIComponent(c.project),v=decodeURIComponent(c.committish),L=n[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(c){if(c instanceof URIError)return;throw c}return[d,C,b,m,v,L,i]},K}var X,ge;function Mt(){if(ge)return X;ge=1;const{LRUCache:h}=Rt,e=It(),t=Ut(),i=Fe(),s=new h({max:1e3});function n(o){try{const{protocol:l,hostname:u,pathname:d}=new URL(o);if(!u)return null;const S=/(?:git\+)http:$/.test(l)?"http:":"https:",b=d.replace(/\.git$/,"");return`${S}//${u}${b}`}catch{return null}}class a{constructor(l,u,d,S,b,v,C={}){Object.assign(this,a.#n[l],{type:l,user:u,auth:d,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(l,u){a.#n[l]=u,a.#n.byDomain[u.domain]=l,a.#n.byShortcut[`${l}:`]=l,a.#c[`${l}:`]={name:l}}static fromUrl(l,u){if(typeof l!="string")return;const d=l+JSON.stringify(u||{});if(!s.has(d)){const S=t(l,u,{gitHosts:a.#n,protocols:a.#c});s.set(d,S?new a(...S):void 0)}return s.get(d)}static fromManifest(l,u={}){if(!l||typeof l!="object")return;const d=l.repository,S=d&&(typeof d=="string"?d:typeof d=="object"&&typeof d.url=="string"?d.url:null);if(!S)throw new Error("no repository");const b=S&&a.fromUrl(S.replace(/^git\+/,""),u)||null;if(b)return b;const v=n(S);return a.fromUrl(v,u)||v}static parseUrl(l){return i(l)}#t(l,u){if(typeof l!="function")return null;const d={...this,...this.opts,...u};d.path||(d.path=""),d.path.startsWith("/")&&(d.path=d.path.slice(1)),d.noCommittish&&(d.committish=null);const S=l(d);return d.noGitPlus&&S.startsWith("git+")?S.slice(4):S}hash(){return this.committish?`#${this.committish}`:""}ssh(l){return this.#t(this.sshtemplate,l)}sshurl(l){return this.#t(this.sshurltemplate,l)}browse(l,...u){return typeof l!="string"?this.#t(this.browsetemplate,l):typeof u[0]!="string"?this.#t(this.browsetreetemplate,{...u[0],path:l}):this.#t(this.browsetreetemplate,{...u[1],fragment:u[0],path:l})}browseFile(l,...u){return typeof u[0]!="string"?this.#t(this.browseblobtemplate,{...u[0],path:l}):this.#t(this.browseblobtemplate,{...u[1],fragment:u[0],path:l})}docs(l){return this.#t(this.docstemplate,l)}bugs(l){return this.#t(this.bugstemplate,l)}https(l){return this.#t(this.httpstemplate,l)}git(l){return this.#t(this.gittemplate,l)}shortcut(l){return this.#t(this.shortcuttemplate,l)}path(l){return this.#t(this.pathtemplate,l)}tarball(l){return this.#t(this.tarballtemplate,{...l,noCommittish:!1})}file(l,u){return this.#t(this.filetemplate,{...u,path:l})}edit(l,u){return this.#t(this.edittemplate,{...u,path:l})}getDefaultRepresentation(){return this.default}toString(l){return this.default&&typeof this[this.default]=="function"?this[this.default](l):this.sshurl(l)}}for(const[o,l]of Object.entries(e))a.addHost(o,l);return X=a,X}var J,Le;function kt(){if(Le)return J;Le=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 Ge={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"},$e={web:"url",name:"url"},Te={server:"start",tests:"test"};const _t={topLevel:Ge,bugs:$e,script:Te},Wt=Object.defineProperty({__proto__:null,bugs:$e,default:_t,script:Te,topLevel:Ge},Symbol.toStringTag,{value:"Module"}),Ht=ie(Wt);var Z,Se;function jt(){if(Se)return Z;Se=1;var{URL:h}=Pe,e=Ct(),t=Pt(),i=Ot(),s=Mt(),{isBuiltin:n}=ye,a=["dependencies","devDependencies","optionalDependencies"],o=kt(),l=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 f=s.fromUrl(p);f&&(p=r.repository.url=f.getDefaultRepresentation()==="shortcut"?f.https():f.toString())}p.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",p)},fixTypos:function(r){Object.keys(l.topLevel).forEach(function(p){Object.prototype.hasOwnProperty.call(r,p)&&this.warn("typo",p,l.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]):l.script[p]&&!r.scripts[l.script[p]]&&this.warn("typo",p,l.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(f){return!f||typeof f!="string"?(this.warn("invalidFilename",f),!1):!0},this))},fixBinField:function(r){if(r.bin&&typeof r.bin=="string"){var p={},f;(f=r.name.match(/^@[^/]+[/](.*)$/))?p[f[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",f="bundleDependencies";r[p]&&!r[f]&&(r[f]=r[p],delete r[p]),r[f]&&!Array.isArray(r[f])?(this.warn("nonArrayBundleDependencies"),delete r[f]):r[f]&&(r[f]=r[f].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(f){var P=r[p][f];typeof P!="string"&&(this.warn("nonStringDependency",f,JSON.stringify(P)),delete r[p][f]);var D=s.fromUrl(r[p][f]);D&&(r[p][f]=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 f=!p;if(!r.version)return r.version="",!0;if(!e(r.version,f))throw new Error('Invalid version: "'+r.version+'"');return r.version=t(r.version,f),!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 f=p.strict;if(!r.name&&!f){r.name="";return}if(typeof r.name!="string")throw new Error("name field must be a string.");f||(r.name=r.name.trim()),b(r.name,f,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=o(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 f=r.bugs;r.bugs={},f.url&&(h.canParse(f.url)?r.bugs.url=f.url:this.warn("nonUrlBugsUrlField")),f.email&&(typeof f.email=="string"&&u(f.email)?r.bugs.email=f.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 d(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,f){if(r.charAt(0)==="."||!(d(r)||S(r))||p&&!f&&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(f){Array.isArray(r[f])&&(r[f]=r[f].map(p))}),r}function C(r){if(typeof r=="string")return r;var p=r.name||"",f=r.url||r.web,P=f?" ("+f+")":"",D=r.email||r.mail,w=D?" <"+D+">":"";return p+w+P}function m(r){if(typeof r!="string")return r;var p=r.match(/^([^(<]+)/),f=r.match(/\(([^()]+)\)/),P=r.match(/<([^<>]+)>/),D={};return p&&p[0].trim()&&(D.name=p[0].trim()),P&&(D.email=P[1]),f&&(D.url=f[1]),D}function L(r){var p=r.optionalDependencies;if(p){var f=r.dependencies||{};Object.keys(p).forEach(function(P){f[P]=p[P]}),r.dependencies=f}}function c(r,p,f){if(!r)return{};if(typeof r=="string"&&(r=r.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(r))return r;f("deprecatedArrayDependencies",p);var P={};return r.filter(function(D){return typeof D=="string"}).forEach(function(D){D=D.trim().split(/(:?[@\s><=])/);var w=D.shift(),x=D.join("");x=x.trim(),x=x.replace(/^@/,""),P[w]=x}),P}function g(r,p){a.forEach(function(f){r[f]&&(r[f]=c(r[f],f,p))})}function y(r,p){r&&Object.keys(r).forEach(function(f){l.bugs[f]&&(p("typo",f,l.bugs[f],"bugs"),r[l.bugs[f]]=r[f],delete r[f])})}return Z}var Be="'repositories' (plural) Not supported. Please pick one as the 'repository' field",Re="No repository field.",Ie="Probably broken git url: %s",Ue="scripts must be an object",Me="script values must be string commands",ke="Invalid 'files' member",_e="Invalid filename in 'files' list: %s",We="Invalid 'bundleDependencies' list. Must be array of package names",He="Invalid bundleDependencies member: %s",je="Non-dependency in bundleDependencies: %s",ze="%s field must be an object",Ye="Invalid dependency: %s %s",qe="specifying %s as array is deprecated",Ve="modules field is deprecated",Ke="keywords should be an array of strings",Xe="keywords should be an array of strings",Je="%s is also the name of a node core module.",Ze="'description' field should be a string",Qe="No description",et="No README data",tt="No license field.",it="Bug string field must be url, email, or {email,url}",rt="bugs.url field must be a string url. Deleted.",nt="bugs.email field must be a string email. Deleted.",st="Normalized value of bugs field is an empty object. Deleted.",ot="homepage field must be a string url. Deleted.",at="license should be a valid SPDX license expression",lt="%s should probably be %s.";const zt={repositories:Be,missingRepository:Re,brokenGitUrl:Ie,nonObjectScripts:Ue,nonStringScript:Me,nonArrayFiles:ke,invalidFilename:_e,nonArrayBundleDependencies:We,nonStringBundleDependency:He,nonDependencyBundleDependency:je,nonObjectDependencies:ze,nonStringDependency:Ye,deprecatedArrayDependencies:qe,deprecatedModules:Ve,nonArrayKeywords:Ke,nonStringKeyword:Xe,conflictingName:Je,nonStringDescription:Ze,missingDescription:Qe,missingReadme:et,missingLicense:tt,nonEmailUrlBugsString:it,nonUrlBugsUrlField:rt,nonEmailBugsEmailField:nt,emptyNormalizedBugs:st,nonUrlHomepage:ot,invalidLicense:at,typo:lt},Yt=Object.defineProperty({__proto__:null,brokenGitUrl:Ie,conflictingName:Je,default:zt,deprecatedArrayDependencies:qe,deprecatedModules:Ve,emptyNormalizedBugs:st,invalidFilename:_e,invalidLicense:at,missingDescription:Qe,missingLicense:tt,missingReadme:et,missingRepository:Re,nonArrayBundleDependencies:We,nonArrayFiles:ke,nonArrayKeywords:Ke,nonDependencyBundleDependency:je,nonEmailBugsEmailField:nt,nonEmailUrlBugsString:it,nonObjectDependencies:ze,nonObjectScripts:Ue,nonStringBundleDependency:He,nonStringDependency:Ye,nonStringDescription:Ze,nonStringKeyword:Xe,nonStringScript:Me,nonUrlBugsUrlField:rt,nonUrlHomepage:ot,repositories:Be,typo:lt},Symbol.toStringTag,{value:"Module"}),qt=ie(Yt);var Q,ve;function Vt(){if(ve)return Q;ve=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,Ce;function Kt(){if(Ce)return ee;Ce=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(o){return a(o)+"Field"});s=s.concat(i);function n(o,l,u){l===!0&&(l=null,u=!0),u||(u=!1),(!l||o.private)&&(l=function(){}),o.scripts&&o.scripts.install==="node-gyp rebuild"&&!o.scripts.preinstall&&(o.gypfile=!0),h.warn=function(){l(e.apply(null,arguments))},s.forEach(function(d){h["fix"+a(d)](o,u)}),o._id=o.name+"@"+o.version}function a(o){return o.charAt(0).toUpperCase()+o.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?".":mt(i,s);return t.some(a=>{const o=a.startsWith("./")?a.slice(2):a,l=n.startsWith("./")?n.slice(2):n;if(o==="."&&l===".")return!0;if(o.endsWith("/**")){const u=o.slice(0,-3);return l===u||l.startsWith(`${u}/`)}if(o.endsWith("/*")){const u=o.slice(0,-2);return u===""?l!=="."&&!l.includes("/"):l.startsWith(`${u}/`)||l===u}return l===o||l.startsWith(`${o}/`)})},Qt=h=>{const e=be("pnpm-workspace.yaml",{cwd:te(h),type:"file"});if(!e)return;const t=De(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??=dt(import.meta.url))(h),$=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,re=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:$i}=re("node:fs"),{createInterface:Ti}=re("node:readline"),{styleText:Bi}=re("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=/, ([^,]*)$/,ai=new Map,li=(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(a=>a instanceof RegExp?a.test(n):a===n));if(s.length>0)throw new ci(s)}return h},ui=h=>De(h),pi=h=>{const e=Lt(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=be(i,t);if(!s)throw new gt(`No such file or directory, for ${i.join(", ").replace(oi," or $1")} found.`);const n=e.cache&&typeof e.cache!="boolean"?e.cache:ai,a=li(s,e);if(e.cache&&n.has(a))return n.get(a);const o=fi(s,e);if(e.resolveCatalogs){const u=Qt(s);u&&ii(o,u)}hi(o,e.strict??!1,e.ignoreWarnings);const l={packageJson:o,path:s};return e.cache&&n.set(a,l),l};var mi="3.0.1";const gi={version:mi},Li=gi.version,Si="@visulima/vis";let O;const Ri=()=>{if(O!==void 0)return O;const h=process.env.VIS_VERSION;if(h)return O=h,O;try{const{packageJson:e}=di(pt(ft(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{Ei as a,wi as b,Fi as c,Ai as d,Gi as e,Ri as g,Ni as h,Di as i,xi as l,Oi as u};
@@ -0,0 +1 @@
1
+ import{createRequire as b}from"node:module";import{e as p}from"./index-DHD8wb6Z.js";import{s as j}from"./index-B4AjSxHU.js";import{g as S}from"./formatBytes-BHAzNIrn-DFIppnY0.js";import{y as U}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{p as E}from"./readJsonSync-CbryXYxN-B2aSeDpC.js";import{h as R}from"./writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let _;const T=t=>(_??=b(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,k=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[e,s]=d.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return d.getBuiltinModule(t)}return T(t)},{rmSync:u,writeFileSync:C}=k("node:fs"),g=3,F=1800*1e3,A=15e3,v=()=>p(S(),"packuments"),y=t=>p(v(),`${encodeURIComponent(t)}.json`),M=t=>{const e=y(t);if(U(e))try{const s=E(e);if(s.cacheVersion!==g){u(e,{force:!0});return}if(Date.now()-s.createdAt>s.ttlMs){u(e,{force:!0});return}return s.packument}catch{u(e,{force:!0});return}},w=(t,e,s)=>{R(v());const o={cacheVersion:g,createdAt:Date.now(),packument:e,ttlMs:s};C(y(t),JSON.stringify(o),"utf8")},P=t=>{const e={},s=t.versions??{};for(const[a,r]of Object.entries(s)){const i=r.dist,n={version:a};if(r._npmUser!==void 0&&(n._npmUser=r._npmUser),r.maintainers!==void 0&&(n.maintainers=r.maintainers),r.bin!==void 0&&(n.bin=r.bin),i!==void 0){const c={};i.signatures!==void 0&&(c.signatures=i.signatures),i.attestations!==void 0&&(c.attestations=i.attestations),typeof i.integrity=="string"&&(c.integrity=i.integrity),typeof i.tarball=="string"&&(c.tarball=i.tarball),typeof i.unpackedSize=="number"&&Number.isFinite(i.unpackedSize)&&i.unpackedSize>=0&&(c.unpackedSize=i.unpackedSize),typeof i.fileCount=="number"&&Number.isInteger(i.fileCount)&&i.fileCount>=0&&(c.fileCount=i.fileCount),n.dist=c}r.repository!==void 0&&(n.repository=r.repository),r.license!==void 0&&(n.license=r.license),typeof r.readme=="string"&&(n.readme=r.readme),typeof r.readmeFilename=="string"&&(n.readmeFilename=r.readmeFilename),typeof r.private=="boolean"&&(n.private=r.private),typeof r.deprecated=="string"&&(n.deprecated=r.deprecated),r.scripts!==void 0&&typeof r.scripts=="object"&&(n.scripts=r.scripts),e[a]=n}const o={name:typeof t.name=="string"?t.name:"",versions:e};return t["dist-tags"]!==void 0&&(o["dist-tags"]=t["dist-tags"]),t.time!==void 0&&(o.time=t.time),typeof t.readme=="string"&&(o.readme=t.readme),o},D=t=>{const e={Accept:"application/json"};return t!==void 0&&t!==""&&(e.Authorization=`Bearer ${t}`),e},N=async(t,e)=>{if(e.registryUrl!==void 0)return{authToken:e.authToken,url:e.registryUrl};if(e.workspaceRoot!==void 0){const{getRegistryForPackage:s,loadNpmrc:o}=await import("../packem_chunks/catalog.js").then(n=>n.ab),a=o(e.workspaceRoot),{token:r,url:i}=s(t,a);return{authToken:e.authToken??r,url:i}}return{authToken:e.authToken,url:"https://registry.npmjs.org"}},x=async(t,e={})=>{const s=e.cacheTtlMs??F,o=M(t);if(o!==void 0)return o;if(e.offline)return;const a=await N(t,e),i=`${a.url.endsWith("/")?a.url.slice(0,-1):a.url}/${t.replace("/","%2f")}`,n=new AbortController,c=setTimeout(()=>{n.abort()},A),l=()=>{n.abort()};e.signal?.addEventListener("abort",l,{once:!0});try{const f=await fetch(i,{headers:D(a.authToken),signal:n.signal});if(f.status===404)return;if(!f.ok)throw new Error(`Registry returned ${String(f.status)} for ${t}`);const h=await f.json(),m=P(h);return w(t,m,s),m}finally{clearTimeout(c),e.signal?.removeEventListener("abort",l)}},B=(t,e)=>{const s=Object.keys(t.versions);if(s.length===0)return;if(e===void 0||e===""||e==="latest")return t["dist-tags"]?.latest??s.at(-1);const o=t["dist-tags"]?.[e];return o!==void 0?o:Object.hasOwn(t.versions,e)?e:j.maxSatisfying(s,e)??void 0};export{x as g,B as r};
@@ -1 +1 @@
1
- const s=[/Issues with peer dependencies found/i,/\bunmet peer\b/i,/\bERESOLVE\b/,/unmet peer dependency/i,/\bYN0060\b/,/incorrect peer dependency/i],d="Peer dependency issues detected. Run `vis update --peer` to inspect and bump mismatched peer dependencies.",p=e=>e?s.some(n=>n.test(e)):!1;export{d as P,p as h};
1
+ const s=[/Issues with peer dependencies found/i,/\bunmet peer\b/i,/\bERESOLVE\b/,/unmet peer dependency/i,/\bYN0060\b/,/incorrect peer dependency/i],d="Peer dependency issues detected. Run `vis update --peer` to inspect and bump mismatched peer dependencies.",r=e=>e?s.some(n=>n.test(e)):!1;export{d as P,r as h};
@@ -0,0 +1 @@
1
+ import{createRequire as U}from"node:module";import{e as y,m as O,c as S,z as J}from"./index-DHD8wb6Z.js";import{withEnhancedPath as Y,collectNodeModulesBinDirs as z}from"@visulima/task-runner";import{s as j}from"./index-B4AjSxHU.js";import{resolveDlx as G,detectPackageManager as H,whichBin as V,resolveAdd as X,resolveRemove as K,resolveDedupe as Q,resolveWhy as Z,resolveLink as ee,resolveUnlink as ne,resolvePmCommand as re,execPmCommandInteractive as se,resolveInstall as ae,resolveExec as ie}from"#native";import{y as R}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";let T;const x=e=>(T??=U(import.meta.url))(e),k=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,q=e=>{if(typeof k<"u"&&k.versions&&k.versions.node){const[n,r]=k.versions.node.split(".").map(Number);if(n>22||n===22&&r>=3||n===20&&r>=16)return k.getBuiltinModule(e)}return x(e)},{spawn:F,spawnSync:E}=q("node:child_process"),p=(e,n,r,s)=>{for(const a of n)e.push("--filter",a);r&&e.push("--recursive"),s&&e.push("--workspace-root")},te=e=>{const n=[],r=[];return p(n,e.filter,e.recursive,e.workspaceRoot),e.silent&&n.push("--silent"),e.frozenLockfile&&n.push("--frozen-lockfile"),n.push("install"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.force&&n.push("--force"),e.ignoreScripts&&n.push("--ignore-scripts"),e.lockfileOnly&&n.push("--lockfile-only"),e.noOptional&&n.push("--no-optional"),e.offline&&n.push("--offline"),{args:n,bin:"aube",warnings:r}},oe=e=>{const n=[],r=[];return p(n,e.filter,!1,!1),n.push("add"),e.saveDev&&n.push("--save-dev"),e.exact&&n.push("--save-exact"),e.global&&n.push("--global"),e.optional&&n.push("--save-optional"),e.peer&&n.push("--save-peer"),e.workspace&&r.push("aube has no flag for the `workspace:` protocol; it auto-detects local workspace members during add. Ignoring --workspace."),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:r}},ue=e=>{const n=[];return p(n,e.filter,e.recursive,!1),n.push("remove"),e.saveDev&&n.push("--save-dev"),e.global&&n.push("--global"),e.workspaceRoot&&n.push("--workspace"),n.push(...e.packages),{args:n,bin:"aube",warnings:[]}},ce=e=>{const n=["dedupe"];return e&&n.push("--check"),{args:n,bin:"aube",warnings:[]}},le=e=>{const n=[],r=[];p(n,e.filter,e.recursive,!1),n.push("why"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.json&&n.push("--json"),e.long&&n.push("--long"),e.parseable&&n.push("--parseable"),e.depth!==void 0&&r.push("aube why does not accept --depth; ignoring."),e.noOptional&&r.push("aube why does not accept --no-optional; ignoring."),e.global&&r.push("aube why does not accept --global; ignoring.");const[s,...a]=e.packages;return s===void 0?r.push("aube why requires a package name; none provided."):(a.length>0&&r.push("aube why takes a single package; using the first."),n.push(s)),{args:n,bin:"aube",warnings:r}},fe=e=>{const n=[];e.silent&&n.push("--silent"),n.push("dlx");for(const r of e.additionalPackages)n.push("--package",r);return e.shellMode&&n.push("--shell-mode"),n.push(e.package),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},de=e=>{const n=[];return p(n,e.filter,e.recursive,e.workspaceRoot),n.push("exec"),e.parallel&&n.push("--parallel"),e.reverse&&n.push("--reverse"),e.shellMode&&n.push("--shell-mode"),n.push(e.command),n.push(...e.args),{args:n,bin:"aube",warnings:[]}},he=e=>{const n=["link"];return e!==null&&n.push(e),{args:n,bin:"aube",warnings:[]}},pe=(e,n)=>{const r=[],s=[];return n&&r.push("--recursive"),r.push("unlink"),e.length>1&&s.push("aube unlink takes a single package; using the first."),e.length>0&&r.push(e[0]),{args:r,bin:"aube",warnings:s}},ge=e=>{const n=["view","--",e.package],r=[],[s,...a]=e.fields;return s!==void 0?(a.length>0&&r.push("aube view only supports a single field; using the first."),e.json&&r.push("aube view does not support --json with a field selector; printing the field without --json."),n.push(s)):e.json&&n.push("--json"),{args:n,bin:"aube",warnings:r}},Ye=e=>{const n=[],r=[];return p(n,e.filters,e.recursive,e.workspaceRoot),n.push("update"),e.dev&&n.push("--dev"),e.prod&&n.push("--prod"),e.global&&n.push("--global"),e.interactive&&n.push("--interactive"),e.latest&&n.push("--latest"),e.noOptional&&n.push("--no-optional"),e.noSave&&n.push("--no-save"),n.push(...e.packages),{args:n,bin:"aube",warnings:r}},be=new Set(["fund","ping","search","token"]),ke=(e,n)=>be.has(e)?{args:[e,...n],bin:"npm",warnings:[`'${e}' is not natively supported by aube. Delegating to npm.`]}:{args:[e,...n],bin:"aube",warnings:[]},w=256*1024,we=e=>{const n=e?{...process.env,...e}:{...process.env};return process.stderr.isTTY&&n.FORCE_COLOR===void 0&&n.NO_COLOR===void 0&&(n.FORCE_COLOR="1"),n},I=e=>e!==""&&!/[\s"&()<>^|%!]/u.test(e)?e:`"${e.replaceAll(/(\\*)"/gu,String.raw`$1$1\"`).replace(/(\\+)$/u,"$1$1").replaceAll(/[&()<>^|%!]/gu,String.raw`^$&`)}"`,ve=async(e,n,r)=>new Promise((s,a)=>{const i=process.platform==="win32",t=F(i?I(e):e,i?n.map(o=>I(o)):[...n],{cwd:r.cwd,env:we(r.env),shell:i,stdio:["inherit","pipe","pipe"],windowsHide:!0});let c=[],f=0;const d=o=>{if(c.push(o),f+=o.length,!(f<=w)){for(;c.length>1&&f-c[0].length>w;)f-=c.shift().length;if(c.length===1&&f>w){const h=c[0];c[0]=h.subarray(h.length-w),f=w}}},b=()=>Buffer.concat(c).toString("utf8");t.stdout?.on("data",o=>{process.stdout.write(o),d(o)}),t.stderr?.on("data",o=>{process.stderr.write(o),d(o)}),t.on("error",a),t.on("close",o=>{const h=b();c=[],s({code:o??1,output:h})})}),v=e=>{const n=j.coerce(e);return n?j.gte(n,"11.0.0"):!1},l=e=>e.name==="yarn"&&!e.version.startsWith("1."),$=e=>e.name==="yarn"&&e.version.startsWith("1."),ye=e=>e[0]==="rm"?["remove",...e.slice(1)]:e,me=(e,n,r)=>{switch(n){case"audit":return l(e)?{args:["npm","audit",...r],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"config":{if(l(e)){const[s,...a]=r;return s==="delete"?{args:["config","unset",...a],bin:"yarn",kind:"rewrite",warning:"yarn berry uses `config unset`, not `config delete`."}:{kind:"passthrough"}}return e.name==="bun"?{kind:"skip",warning:"bun has no `config` CLI. Edit bunfig.toml or .npmrc directly."}:e.name==="deno"?{kind:"skip",warning:"deno has no registry-config CLI. Edit deno.json directly."}:{kind:"passthrough"}}case"dist-tag":return $(e)?{args:["tag",...r],bin:"yarn",kind:"rewrite",warning:"yarn 1 has no `dist-tag`; using `yarn tag`."}:l(e)?{args:["npm","tag",...ye(r)],bin:"yarn",kind:"rewrite"}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`dist-tag\`. Use \`npm dist-tag\` instead.`}:{kind:"passthrough"};case"login":case"logout":return l(e)?{args:["npm",n,...r],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:[n,...r],bin:"npm",kind:"rewrite",warning:`bun has no \`${n}\`; falling back to \`npm ${n}\` (writes ~/.npmrc, which bun reads).`}:e.name==="deno"?{kind:"skip",warning:`deno has no \`${n}\`. JSR uses browser OAuth via \`deno publish\`.`}:{kind:"passthrough"};case"owner":return e.name==="pnpm"&&v(e.version)?{args:["owner",...r],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `owner`; falling back to `npm owner`."}:l(e)?{args:["owner",...r],bin:"npm",kind:"rewrite",warning:"yarn berry has no `owner` (not in `yarn npm`); falling back to `npm owner`."}:e.name==="bun"?{args:["owner",...r],bin:"npm",kind:"rewrite",warning:"bun has no `owner`; falling back to `npm owner`."}:e.name==="deno"?{kind:"skip",warning:"deno has no `owner`. JSR uses scope-member roles via the web UI."}:{kind:"passthrough"};case"ping":return e.name==="pnpm"&&v(e.version)?{args:["ping",...r],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `ping`; falling back to `npm ping`."}:{kind:"passthrough"};case"plugin":return l(e)?{kind:"passthrough"}:{kind:"skip",warning:`${e.name} does not support yarn-style plugins. Skipping (no-op).`};case"prune":return $(e)?{kind:"skip",warning:"yarn 1 has no `prune`. Use `yarn install --production` for a prod-only tree."}:l(e)?{kind:"skip",warning:"yarn berry has no `prune`. Use `yarn workspaces focus --production` instead."}:e.name==="bun"||e.name==="deno"?{kind:"skip",warning:`${e.name} has no \`prune\`. Pruning happens automatically on install.`}:{kind:"passthrough"};case"publish":return l(e)?{args:["npm","publish",...r],bin:"yarn",kind:"rewrite"}:{kind:"passthrough"};case"rebuild":return $(e)?{kind:"skip",warning:"yarn 1 has no `rebuild`. Re-install instead."}:e.name==="bun"?{kind:"skip",warning:"bun has no `rebuild`. Use `bun install --force` instead."}:e.name==="deno"?{kind:"skip",warning:"deno has no `rebuild`."}:{kind:"passthrough"};case"search":return e.name==="pnpm"&&v(e.version)?{args:["search",...r],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `search`; falling back to `npm search`."}:{kind:"passthrough"};case"token":return e.name==="pnpm"&&v(e.version)?{args:["token",...r],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `token`; falling back to `npm token`."}:{kind:"passthrough"};case"whoami":return e.name==="pnpm"&&v(e.version)?{args:["whoami",...r],bin:"npm",kind:"rewrite",warning:"pnpm 11 removed `whoami`; falling back to `npm whoami`."}:l(e)?{args:["npm","whoami",...r],bin:"yarn",kind:"rewrite"}:e.name==="bun"?{args:["pm","whoami",...r],bin:"bun",kind:"rewrite"}:e.name==="deno"?{kind:"skip",warning:"deno has no `whoami`. JSR uses browser auth."}:{kind:"passthrough"};default:return{kind:"passthrough"}}},A=e=>V(e)!==null,je=e=>{const n=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"],["bun.lock","bun"],["bun.lockb","bun"],["deno.lock","deno"]];let r=e;for(;;){for(const[a,i]of n)if(R(y(r,a)))return i;const s=O(r);if(s===r||S(r).root===r)return;r=s}},ze=(e,n)=>{if(n.name!=="aube")return;const r=je(e);if(r!==void 0)return`Resolved installer is aube but the workspace has a ${r} lockfile. Aube reads and writes ${r}'s lockfile format in place, but its byte output may differ subtly — expect a one-time churn diff on the first install, and ongoing drift if your team mixes tools on the same lockfile. To pin the choice across the team, set \`install.backend\` in vis.config; to bypass aube for this run, pass --no-aube.`},C=e=>{if(R(e))try{return JSON.parse(J(e,{buffer:!1}))}catch{return}},Re=e=>{let n=e;for(;;){const r=y(n,"package.json"),s=C(r);if(s&&typeof s.packageManager=="string"&&s.packageManager.length>0)return s.packageManager;const a=O(n);if(a===n||S(n).root===n)return;n=a}},M=new Set(["npm","pnpm","yarn"]),P=(e,n,r)=>r===!1||!M.has(n)||!A("corepack")?!1:r===!0?!0:Re(e)!==void 0,Ge=(e,n)=>{const r=n.backend,s=process.env.VIS_INSTALLER,a=r??s??n.configBackend,i=n.configCorepack??"auto";if(a&&a!=="auto"){if(a==="aube"&&!A("aube"))throw new Error('install.backend is set to "aube" but the `aube` binary is not on PATH. Install it via `npm i -g @endevco/aube`, `mise use -g aube`, or `brew install endevco/tap/aube`.');return{name:a,useCorepack:P(e,a,i),version:"latest"}}if(A("aube"))return{name:"aube",useCorepack:!1,version:"latest"};const t=$e(e);return{...t,useCorepack:P(e,t.name,i)}},$e=e=>{if(!R(e))throw new Error(`Could not detect package manager in ${e}. Directory does not exist.`);const n=H(e);return{name:n.name,version:n.version||"latest"}},L=(e,n)=>n.useCorepack!==!0||!M.has(n.name)||e.bin==="corepack"||e.bin!==n.name?e:{...e,args:[n.name,...e.args],bin:"corepack"},Ae=(e,n,r)=>{if(r===void 0)return se(e.bin,e.args,n);const s=E(e.bin,e.args,{cwd:n,env:{...process.env,...r},stdio:"inherit"});if(s.error)throw s.error;return s.status??1},u=(e,n,r,s,a={})=>{const i=L(n,e);for(const t of i.warnings)s.warn(`warning: ${t}`);return a.dry?(s.log(`[dry-run] ${i.bin} ${i.args.join(" ")}`),0):Ae(i,r,a.env)},g=(e,n,r,s,a={})=>u(e,n(),r,s,a),Oe=(e,n)=>n==="aube"||n==="deno"?e:{...e,args:[...e.args,"--prefer-offline"]},Se=(e,n,r)=>n!=="yarn"||r.startsWith("1.")||!e.args.includes("--immutable")||e.args.includes("--immutable-cache")?e:{...e,args:[...e.args,"--immutable-cache"]},W=(e,n,r)=>{let s=e.name==="aube"?te(n):ae(e.name,e.version,{...n,silent:n.silent||r.silent===!0});return r.preferOffline&&(s=Oe(s,e.name)),r.ciMode&&(s=Se(s,e.name,e.version)),s},He=(e,n,r,s,a={})=>{const i=W(e,n,a);return D(e,i,r,s,{dry:a.dry,env:a.env})},Ve=async(e,n,r,s,a={})=>{const i=L(W(e,n,a),e);for(const t of i.warnings)s.warn(`warning: ${t}`);return a.dry?(s.log(`[dry-run] ${i.bin} ${i.args.join(" ")}`),{code:0,output:""}):ve(i.bin,i.args,{cwd:r,env:a.env?{...process.env,...a.env}:process.env})},N=(e,n)=>{const r=n==="deno"?"--quiet":"--silent";return{...e,args:[...e.args,r]}},Ce=(e,n)=>n==="yarn"||n==="aube"?null:{...e,args:[...e.args,"--dry-run"]},D=(e,n,r,s,a)=>{if(a.dry!==!0)return u(e,n,r,s,a);const i=Ce(n,e.name);return i===null?u(e,n,r,s,a):u(e,i,r,s,{env:a.env})},De=(e,n)=>n==="aube"?{...e,args:[...e.args,"--ignore-scripts"]}:n==="deno"?e:{...e,args:[...e.args,"--ignore-scripts"]},_e=(e,n,r,s,a={})=>{let i=e.name==="aube"?oe(n):X(e.name,e.version,n);a.ignoreScripts&&(i=De(i,e.name)),a.silent&&(i=N(i,e.name));const t=D(e,i,r,s,{dry:a.dry,env:a.env});return t===0&&a.autoInstallPeers&&Me(e,n,r,s,a),t},Ie=e=>{if(e.startsWith("@")){const r=e.indexOf("/");if(r===-1)return e;const s=e.indexOf("@",r);return s===-1?e:e.slice(0,s)}const n=e.indexOf("@");return n===-1?e:e.slice(0,n)},Pe=(e,n)=>{let r=e;for(;;){const s=y(r,"node_modules",n,"package.json"),a=C(s);if(a)return a;const i=O(r);if(i===r||S(r).root===r)return;r=i}},Ee=e=>{const n=C(y(e,"package.json")),r=new Set;if(!n)return r;for(const s of["dependencies","devDependencies","peerDependencies","optionalDependencies"]){const a=n[s];if(a)for(const i of Object.keys(a))r.add(i)}return r},Me=(e,n,r,s,a)=>{if(e.name==="deno")return;const i=Ee(r),t=new Map;for(const d of n.packages){const b=Ie(d),o=Pe(r,b);if(!o?.peerDependencies)continue;const h=o.peerDependenciesMeta??{};for(const[m,B]of Object.entries(o.peerDependencies))h[m]?.optional||i.has(m)||t.has(m)||t.set(m,B)}if(t.size===0)return;const c=[...t.entries()].map(([d,b])=>`${d}@${b}`);s.log(`auto-installing peer dependencies: ${c.join(", ")}`);const f={exact:!1,filter:n.filter,global:!1,optional:!1,packages:c,peer:!1,saveDev:n.saveDev,workspace:!1,workspaceRoot:n.workspaceRoot};_e(e,f,r,s,{ignoreScripts:a.ignoreScripts})},Xe=(e,n,r,s,a={})=>{let i=e.name==="aube"?ue(n):K(e.name,e.version,n);return a.silent&&(i=N(i,e.name)),D(e,i,r,s,{dry:a.dry,env:a.env})},Ke=(e,n,r,s,a={})=>e.name==="aube"?u(e,ce(n),r,s,a):g(e,()=>Q(e.name,e.version,n),r,s,a),Qe=(e,n,r,s,a={})=>e.name==="aube"?u(e,le(n),r,s,a):g(e,()=>Z(e.name,e.version,n),r,s,a),Le=(e,n)=>{if(e.name==="aube")return ge(n);const r=[],s=[],a=e.name;switch(e.name){case"bun":{const i=j.coerce(e.version);i&&j.lt(i,"1.3.0")&&s.push(`bun ${e.version} does not support \`bun pm view\` (added in bun 1.3). Upgrade bun, or run \`npm view ${n.package}\` instead.`),r.push("pm","view","--",n.package,...n.fields),n.json&&r.push("--json");break}case"deno":{const i=n.package.startsWith("npm:")||n.package.startsWith("jsr:")||n.package.startsWith("https://")||n.package.startsWith("http://")||n.package.startsWith("file:")?n.package:`npm:${n.package}`;r.push("info","--",i),n.json&&r.push("--json"),n.fields.length>0&&s.push("deno info does not accept field selectors; ignoring.");break}case"npm":case"pnpm":{r.push("view","--",n.package,...n.fields),n.json&&r.push("--json");break}case"yarn":{if(e.version.startsWith("1.")){r.push("info","--",n.package);const[i,...t]=n.fields;i!==void 0&&(t.length>0&&s.push("yarn v1 only supports querying one field at a time; using the first."),r.push(i)),n.json&&r.push("--json")}else r.push("npm","info","--",n.package),n.fields.length>0&&s.push("yarn berry does not support field arguments to 'npm info'; ignoring."),n.json&&r.push("--json");break}default:{const i=e.name;throw new Error(`Unsupported package manager: ${i}`)}}return{args:r,bin:a,warnings:s}},Ze=(e,n,r,s,a={})=>u(e,Le(e,n),r,s,a),en=(e,n,r,s,a={})=>e.name==="aube"?u(e,he(n),r,s,a):g(e,()=>ee(e.name,e.version,n),r,s,a),nn=(e,n,r,s,a,i={})=>e.name==="aube"?u(e,pe(n,r),s,a,i):g(e,()=>ne(e.name,e.version,n,r),s,a,i),We=(e,n,r)=>{if(e.args.includes("--offline")||e.args.includes("--cached-only"))return e;const s=(a,i)=>{const t=[...e.args];return t.splice(i,0,a),{...e,args:t}};switch(n){case"aube":case"pnpm":return s("--offline",1);case"bun":return{...e,warnings:[...e.warnings,"bun x does not support --offline. Pre-install the package via `vis install` so bun x resolves from the local cache."]};case"deno":return s("--cached-only",1);case"npm":return s("--offline",1);case"yarn":return r.startsWith("1.")?s("--offline",0):{...e,warnings:[...e.warnings,"yarn berry has no --offline flag for dlx. Configure `enableNetwork: false` in .yarnrc.yml or set `enableMirror: true` for offline-first behavior."]};default:{const a=n;return{...e,warnings:[...e.warnings,`applyDlxOffline: unsupported pm ${String(a)}`]}}}},rn=(e,n,r,s,a={})=>{let i=e.name==="aube"?fe(n):G(e.name,e.version,n);return a.offline&&(i=We(i,e.name,e.version)),u(e,i,r,s,{dry:a.dry,env:a.env})},_=process.platform==="win32",Ne=_?[".exe",".cmd",".bat",".ps1",""]:[""],Be=(e,n)=>{if(!(e.includes("/")||e.includes("\\")))for(const r of z(n))for(const s of Ne){const a=y(r,`${e}${s}`);if(R(a))return _?a.replaceAll("/","\\"):a}},sn=(e,n,r)=>{const s=Be(e,r);if(s===void 0||_&&!s.toLowerCase().endsWith(".exe"))return null;const a=E(s,n,{cwd:r,env:Y({...process.env},r),stdio:"inherit"});if(a.error)throw a.error;return a.status??1},an=(e,n,r,s,a={})=>e.name==="aube"?u(e,de(n),r,s,a):g(e,()=>ie(e.name,e.version,n),r,s,a),tn=(e,n,r,s,a,i={})=>{if(e.name==="aube")return u(e,ke(n,r),s,a,i);const t=me(e,n,r);return t.kind==="skip"?(a.warn(`warning: ${t.warning}`),0):t.kind==="rewrite"?u(e,{args:t.args,bin:t.bin,warnings:t.warning?[t.warning]:[]},s,a,i):g(e,()=>re(e.name,e.version,n,r),s,a,i)};export{Ge as a,an as b,_e as c,$e as d,Ke as e,Ze as f,ze as g,Ve as h,en as i,tn as j,Xe as k,nn as l,Qe as m,He as n,rn as o,Ye as p,sn as r,ve as s};
@@ -0,0 +1,7 @@
1
+ import{createRequire as p}from"node:module";import{V as l}from"./vis-user-error-CAu9wIbe.js";let g;const m=e=>(g??=p(import.meta.url))(e),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=e=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[s,n]=c.versions.node.split(".").map(Number);if(s>22||s===22&&n>=3||s===20&&n>=16)return c.getBuiltinModule(e)}return m(e)},{createInterface:j}=h("node:readline"),y=e=>{const s=new Set;for(const n of Object.values(e.projects))for(const t of Object.keys(n.targets??{}))s.add(t);return[...s].sort()},b=e=>{const s=new Map;for(const n of e.values())for(const[t,o]of Object.entries(n))for(const r of o.aliases??[])s.has(r)||s.set(r,t);return s},$=(e,s)=>s.get(e)??e,w=(e,s)=>{if(e.length===0)return s.length;if(s.length===0)return e.length;const n=[];for(let t=0;t<=s.length;t++)n[t]=[t];for(let t=0;t<=e.length;t++)n[0][t]=t;for(let t=1;t<=s.length;t++)for(let o=1;o<=e.length;o++){const r=s[t-1]===e[o-1]?0:1;n[t][o]=Math.min(n[t-1][o]+1,n[t][o-1]+1,n[t-1][o-1]+r)}return n[s.length][e.length]},v=(e,s,n=3)=>f(e,s,1,n)[0],f=(e,s,n=3,t=3)=>{const o=[];for(const r of s){const i=w(e.toLowerCase(),r.toLowerCase());i<=t&&o.push({distance:i,name:r})}return o.sort((r,i)=>r.distance-i.distance||r.name.localeCompare(i.name)),o.slice(0,n).map(r=>r.name)},M=e=>e.length===0?" (no targets found)":e.map(s=>` - ${s}`).join(`
2
+ `),S=async e=>{if(e.length===0||!process.stdin.isTTY||!process.stdout.isTTY)return;const s=j({input:process.stdin,output:process.stdout});try{process.stdout.write(`Available targets:
3
+ `);for(const[r,i]of e.entries())process.stdout.write(` ${String(r+1).padStart(2," ")}. ${i}
4
+ `);process.stdout.write(`
5
+ `);const t=(await new Promise(r=>{s.question("Select a target (number or name, blank to cancel): ",r)})).trim();if(t.length===0)return;const o=Number.parseInt(t,10);return Number.isFinite(o)&&o>=1&&o<=e.length?e[o-1]:e.includes(t)?t:v(t,e)}finally{s.close()}},x=(e,s,n)=>{const t=new Set(s.split(",").map(a=>a.trim()).filter(Boolean));if(t.size===0)throw new l("--projects was given no project names. Pass a comma-separated list, or omit the flag to include every project.");const o=e.filter(a=>t.has(a));if(o.length>0)return o;const r=[...t].flatMap(a=>f(a,n)).filter((a,u,d)=>d.indexOf(a)===u),i=r.length>0?`
6
+ Did you mean: ${r.slice(0,3).join(", ")}?`:`
7
+ Run \`vis list\` to see the ${String(n.length)} known project name(s).`;throw new l(`No matching projects found for: ${s}${i}`)};export{M as a,b,y as c,x as f,S as p,$ as r,f as s};
@@ -1 +1 @@
1
- import{createRequire as n}from"node:module";let i;const c=e=>(i??=n(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,a=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[s,t]=r.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return r.getBuiltinModule(e)}return c(e)},{createInterface:u}=a("node:readline"),l=async e=>{const s=u({input:process.stdin,output:process.stdout});try{return await new Promise(t=>{s.question(e,o=>{t(o.trim().toLowerCase())})})}finally{s.close()}},d=async(e,s=l)=>{const t=(await s(e)).trim().toLowerCase();return t==="y"||t==="yes"};export{l as d,d as p};
1
+ import{createRequire as n}from"node:module";let i;const c=e=>(i??=n(import.meta.url))(e),r=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,a=e=>{if(typeof r<"u"&&r.versions&&r.versions.node){const[s,t]=r.versions.node.split(".").map(Number);if(s>22||s===22&&t>=3||s===20&&t>=16)return r.getBuiltinModule(e)}return c(e)},{createInterface:u}=a("node:readline"),l=async e=>{const s=u({input:process.stdin,output:process.stdout});try{return await new Promise(t=>{s.question(e,o=>{t(o.trim().toLowerCase())})})}finally{s.close()}},p=async(e,s=l)=>{const o=(await s(e)).trim().toLowerCase();return o==="y"||o==="yes"};export{l as d,p};
@@ -0,0 +1 @@
1
+ import{s as i}from"./index-B4AjSxHU.js";import{g as u}from"./packument-C55kVxcQ.js";import{c as d}from"../packem_chunks/cli-main.js";const v=8,h=async(r,e,o)=>{if(r.length===0)return[];const t=Math.max(1,Math.min(e,r.length)),s=Array.from({length:r.length});let n=0;const c=async()=>{for(;n<r.length;){const a=n;n+=1;const l=r[a];s[a]=await o(l,a)}};return await Promise.all(Array.from({length:t},()=>c())),s},f=(r,e)=>r.versions[e]?.dist?.attestations?.provenance!==void 0,p=(r,e)=>i.valid(e)?Object.keys(r.versions).filter(t=>i.valid(t)!==null&&i.lt(t,e)).filter(t=>i.satisfies(t,"*",{includePrerelease:!1})).filter(t=>f(r,t)).sort((t,s)=>i.lt(t,s)?1:-1)[0]:void 0,m=async(r,e={})=>{if(d("provenance"))return[];const o=new Set(e.allowlist),t=e.concurrency??v;return(await h(r,t,async({name:n,version:c})=>{if(o.has(n))return;const a=await u(n,{workspaceRoot:e.workspaceRoot});if(a===void 0||f(a,c))return;const l=p(a,c);if(l!==void 0)return{packageName:n,priorVersionWithProvenance:l,version:c}})).filter(n=>n!==void 0)};export{v as D,p as f,h as m,m as r};
@@ -0,0 +1 @@
1
+ import{r as u,d as a,T as l,z as f,C as d}from"./index-DHD8wb6Z.js";const m=e=>String.raw`\u{${e.codePointAt(0).toString(16)}}`,p=(e,r,c)=>l(e,{start:r},{tabWidth:!1,...c}),g=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,N=(e,r)=>{const c=g.exec(r);if(!c)return;const[,i,t,n]=c;if(t&&n)return{column:Number(n),line:Number(t)};let o=Number(i);return o===e.length&&(o=e.length-1),a(e,o)},b=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,h=e=>e.replace(b,(r,c,i)=>`"${i}"(${m(i)})`);function $(e,r,c,i){let t;try{return JSON.parse(e,r)}catch(s){t=s.message}let n;e?(n=N(e,t),t=h(t)):t+=" while parsing empty string";const o=new u(t);throw o.fileName=c,n&&(o.codeFrame=p(e,n,i)),o}function x(e,r,c){const i=f(e,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(i);const{beforeParse:n,color:o}={};return typeof n=="function"&&(t=n(t)),$(t,r,d(e),{color:o})}export{$ as N,x as p};
@@ -0,0 +1 @@
1
+ import{createRequire as _}from"node:module";import{e as l}from"./index-DHD8wb6Z.js";import{g as T}from"./formatBytes-BHAzNIrn-DFIppnY0.js";import{y as d}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";import{p as b}from"./readJsonSync-CbryXYxN-B2aSeDpC.js";import{h as j}from"./writeFileSync-DJoHk3Ks-CgQ-VNNT.js";let p;const g=e=>(p??=_(import.meta.url))(e),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,v=e=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[t,r]=o.versions.node.split(".").map(Number);if(t>22||t===22&&r>=3||t===20&&r>=16)return o.getBuiltinModule(e)}return g(e)},{rmSync:f,writeFileSync:k}=v("node:fs"),C=1440*60*1e3,A=15e3,E="https://registry.npmjs.org/-/npm/v1/keys",m=()=>l(T(),"registry-keys"),c=()=>l(m(),"npmjs.json"),L=()=>{const e=c();if(d(e))try{const t=b(e),r=Date.now()-t.createdAt>t.ttlMs;return{entry:t,expired:r}}catch{f(e,{force:!0});return}},M=(e,t)=>{j(m());const r={createdAt:Date.now(),keys:e,ttlMs:t};k(c(),JSON.stringify(r),"utf8")},F=async(e={})=>{const t=e.ttlMs??C,r=e.keysUrl??process.env.VIS_NPM_KEYS_URL??E,s=L();if(s!==void 0&&!s.expired&&e.forceRefresh!==!0)return{fromCache:!0,keys:s.entry.keys};const n=new AbortController,h=setTimeout(()=>{n.abort()},A),i=()=>{n.abort()};e.signal?.addEventListener("abort",i,{once:!0});try{const a=await fetch(r,{headers:{Accept:"application/json"},signal:n.signal});if(!a.ok)return s!==void 0?{fromCache:!0,keys:s.entry.keys,stale:!0}:void 0;const u=await a.json(),y=Array.isArray(u.keys)?u.keys:[];return M(y,t),{fromCache:!1,keys:y}}catch{return s!==void 0?{fromCache:!0,keys:s.entry.keys,stale:!0}:void 0}finally{clearTimeout(h),e.signal?.removeEventListener("abort",i)}},P=()=>{const e=c();return d(e)?(f(e,{force:!0}),!0):!1};export{P as c,F as f};
@@ -0,0 +1,5 @@
1
+ import{i as R}from"./index-BjdW45xX.js";import{k as A}from"./formatBytes-BHAzNIrn-DFIppnY0.js";import{d as M,p as k}from"./prompt-DMzaQEVa.js";import{h as S,M as T,r as E,a as P,b as C,c as x,d as O,e as V,f as F}from"./s1ngularity-C8sva2SO.js";import{D as h,m as g,r as L}from"./provenance-CvfQEJPQ.js";import{g as y}from"./packument-C55kVxcQ.js";import{c as N,p as w}from"../packem_chunks/cli-main.js";import{r as _}from"./signatures-oZ_2IneN.js";import{s as I}from"./index-B4AjSxHU.js";import{p as U}from"./utils-DQFHJn72.js";const j=15,B=e=>{const a=(e.TERM??"").toLowerCase();return a!=="dumb"&&a!=="unknown"&&a!==""},W=async(e,a,t,r)=>new Promise(d=>{if(r?.aborted){d(!1);return}const o=B(t)&&a.isTTY!==!1;let s=e;const c=()=>{o?a.write(`\rContinuing in ${String(s)}s... press Ctrl-C to abort. `):s===e&&a.write(`Warnings present; proceeding in ${String(e)}s.
2
+ `)};c();const u=setInterval(()=>{if(s-=1,s<=0){clearInterval(u),r?.removeEventListener("abort",i),o&&a.write(`\rContinuing now.
3
+ `),d(!0);return}c()},1e3),i=()=>{clearInterval(u),o&&a.write(`\rAborted.
4
+ `),d(!1)};r?.addEventListener("abort",i,{once:!0})}),Y=async(e,a={})=>{if(e.length===0)return{proceed:!0};const t=a.env??process.env,r=a.isTty??!!process.stdin.isTTY,d=a.isCi??R,o=a.strict??!1,s=a.readline??M,c=a.output??{isTTY:!!process.stdout.isTTY,write:p=>process.stdout.write(p)},u=A(t.VIS_DISABLE_AUTO_CONTINUE),i=Number.parseInt(t.VIS_AUTO_CONTINUE_SECONDS??"",10),l=a.countdownSeconds??(Number.isFinite(i)&&i>0?i:j);return e.some(p=>p.severity==="error")?o?{proceed:!1,reason:"errors-present"}:d?{proceed:!1,reason:"errors-present"}:r?await k("Proceed despite errors? [y/N] ",s)?{proceed:!0}:{proceed:!1,reason:"user-aborted"}:{proceed:!1,reason:"non-tty"}:o?{proceed:!1,reason:"ci-strict"}:r?u?await k("Proceed despite warnings? [y/N] ",s)?{proceed:!0}:{proceed:!1,reason:"user-aborted"}:await W(l,c,t,a.signal)?{proceed:!0}:{proceed:!1,reason:"user-aborted"}:{proceed:!0}},Ne=async(e,a={})=>{if(e.isEmpty())return!0;const t=e.all(),r=a.output??{isTTY:!!process.stdout.isTTY,write:o=>process.stdout.write(o)};for(const o of S(t))r.write(`${o}
5
+ `);return(await Y(t,{countdownSeconds:a.countdownSeconds,isCi:a.isCi,isTty:a.isTty,output:r,readline:a.readline,signal:a.signal,strict:a.strict})).proceed},f=300,H=e=>{const a=e.replaceAll(new RegExp("\\p{Cc}","gu")," ").replaceAll(/\s+/gu," ").trim();return a.length>f?`${a.slice(0,f-1)}…`:a},G=e=>{const a=e["dist-tags"]?.latest;return a!==void 0&&Object.hasOwn(e.versions,a)?a:Object.keys(e.versions).at(-1)},q=async(e,a={})=>{if(N("deprecation"))return[];const t=new Set(a.allowlist),r=a.concurrency??h;return(await g(e,r,async({name:o,version:s})=>{if(t.has(o))return;const c=await y(o,{workspaceRoot:a.workspaceRoot});if(c===void 0)return;const u=Object.hasOwn(c.versions,s)?s:G(c);if(u===void 0)return;const i=c.versions[u];if(i===void 0)return;const l=typeof i.deprecated=="string"?H(i.deprecated):"";if(l!=="")return{packageName:o,reason:l,version:u}})).filter(o=>o!==void 0)},D={newPackageDays:22,unmaintainedDays:365},b=1440*60*1e3,v=e=>{if(e===void 0)return;const a=Date.parse(e);return Number.isNaN(a)?void 0:a},$=e=>{const a=e.time??{};return Object.entries(a).filter(([t])=>t!=="created"&&t!=="modified").map(([,t])=>v(t)).filter(t=>t!==void 0)},z=e=>{const a=v(e.time?.created);if(a!==void 0)return a;const t=$(e);return t.length>0?Math.min(...t):void 0},K=e=>{const a=v(e.time?.modified);if(a!==void 0)return a;const t=$(e);return t.length>0?Math.max(...t):void 0},X=async(e,a={})=>{if(N("packageAge"))return[];const t=new Set(a.allowlist),r=a.concurrency??h,d=(a.now??Date.now)(),o=a.thresholds?.newPackageDays??D.newPackageDays,s=a.thresholds?.unmaintainedDays??D.unmaintainedDays;return(await g(e,r,async({name:u})=>{if(t.has(u))return;const i=await y(u,{workspaceRoot:a.workspaceRoot});if(i===void 0)return;const l=z(i);if(l!==void 0){const m=(d-l)/b;if(m<o)return{days:Math.max(0,Math.floor(m)),kind:"new-package",packageName:u,severity:"error"}}const n=K(i);if(n!==void 0){const m=(d-n)/b;if(m>s)return{days:Math.floor(m),kind:"unmaintained",packageName:u,severity:"warning"}}})).filter(u=>u!==void 0)},J=e=>({marshall:"author",message:e.message,packageName:e.packageName,severity:e.severity}),Q=e=>({marshall:"provenance",message:`Prior version ${e.priorVersionWithProvenance} had provenance but ${e.version} does not.`,packageName:e.packageName,severity:"error",suggestedAction:`Investigate why ${e.version} dropped sigstore attestations.`}),Z=e=>{const a=e.hookChanges.map(t=>`${t.hook} (${t.kind})`).join(", ");return{marshall:"s1ngularity",message:`${e.version} ${e.hookChanges.length===1?"has an":"has"} install-script ${e.hookChanges.length===1?"change":"changes"} [${a}] AND dropped the provenance attestation that ${e.priorVersion} carried — this is the s1ngularity compromised-publish shape.`,packageName:e.packageName,severity:"error",suggestedAction:`Do not install ${e.packageName}@${e.version}. Verify the publish against the project's release CI; pin to ${e.priorVersion} until confirmed. Allowlist via security.marshalls.s1ngularity.allowlist only if the conjunction is explained.`}},ee=e=>({marshall:"deprecation",message:`${e.packageName}@${e.version} is deprecated: ${e.reason}`,packageName:e.packageName,severity:"error",suggestedAction:`Migrate off ${e.packageName} or add it to security.marshalls.deprecation.allowlist if the deprecation is acceptable.`}),ae=e=>({marshall:"packageAge",message:e.kind==="new-package"?`Package first published ${String(e.days)} day${e.days===1?"":"s"} ago — brand-new package names are a common typosquat/dependency-confusion signature.`:`No new release in ${String(e.days)} days — package may be unmaintained.`,packageName:e.packageName,severity:e.severity}),re=e=>{const a=e.newBins.map(t=>t.command).join(", ");return{marshall:"newBin",message:`${e.toVersion} adds new bin script${e.newBins.length===1?"":"s"}: ${a} (prior: ${e.fromVersion}).`,packageName:e.packageName,severity:"warning"}},se=e=>({marshall:"metadata",message:`Missing/invalid metadata: ${e.issues.join(", ")}.`,packageName:e.packageName,severity:"warning"}),te=e=>e.kind==="no-data"?{marshall:"downloads",message:"npm stats API returned no monthly download data.",packageName:e.packageName,severity:e.severity}:{marshall:"downloads",message:`Only ${String(e.downloadsLastMonth??0)} downloads in the past month.`,packageName:e.packageName,severity:e.severity},oe=e=>({marshall:"expiredDomains",message:e.kind==="expired"?`Maintainer email domain ${e.domain} (${e.maintainer}) is unregistered — potential hijack risk.`:`Could not verify maintainer email domain ${e.domain} (${e.maintainer}).`,packageName:e.packageName,severity:e.severity}),ne=e=>({marshall:"signatures",message:e.message,packageName:e.packageName,severity:e.severity}),ie=e=>({marshall:"archivedRepo",message:e.kind==="archived"?`Source repo ${e.owner}/${e.repo} is archived${e.archivedAt===void 0?"":` (since ${e.archivedAt})`}.`:`Source repo ${e.owner}/${e.repo} returned 404 from GitHub.`,packageName:e.packageName,severity:"warning"}),ce=["author","provenance","s1ngularity","newBin","metadata","deprecation","packageAge","expiredDomains","signatures","archivedRepo"],le=e=>ce.some(a=>a==="signatures"?e.signatures?.enabled===!0:e[a]?.enabled!==!1),de=async(e,a,t,r)=>{const d=[...new Set(e.map(o=>o.name))];await g(d,a,async o=>{try{await y(o,{signal:r,workspaceRoot:t})}catch{}})},$e=async(e,a={})=>{const t=new T;if(e.length===0)return t;const r=a.config??{},d=e.map(l=>l.name),o=a.signal,s=a.concurrency??h;le(r)&&await de(e,s,a.workspaceRoot,o);const c=[],u=[],i=l=>{const n=c.length;c.push([]),u.push((async()=>{try{c[n]=await l()}catch{}})())};r.author?.enabled!==!1&&i(async()=>(await E(e,{allowlist:r.author?.allowlist,concurrency:s,signal:o,thresholds:{dormantErrorDays:r.author?.dormantErrorDays,dormantWarnDays:r.author?.dormantWarnDays,newPublisherWindowDays:r.author?.newPublisherWindowDays,recentVersionErrorDays:r.author?.recentVersionErrorDays,recentVersionWarnDays:r.author?.recentVersionWarnDays},workspaceRoot:a.workspaceRoot})).map(n=>J(n))),r.provenance?.enabled!==!1&&i(async()=>(await L(e,{allowlist:r.provenance?.allowlist,concurrency:s,workspaceRoot:a.workspaceRoot})).map(n=>Q(n))),r.s1ngularity?.enabled!==!1&&i(async()=>(await P(e,{allowlist:r.s1ngularity?.allowlist,concurrency:s,workspaceRoot:a.workspaceRoot})).map(n=>Z(n))),r.newBin?.enabled!==!1&&i(async()=>(await C(e,{allowlist:r.newBin?.allowlist,concurrency:s,workspaceRoot:a.workspaceRoot})).map(n=>re(n))),r.metadata?.enabled!==!1&&i(async()=>(await x(e,{allowlist:r.metadata?.allowlist,checks:r.metadata?.checks,concurrency:s,workspaceRoot:a.workspaceRoot})).map(n=>se(n))),r.deprecation?.enabled!==!1&&i(async()=>(await q(e,{allowlist:r.deprecation?.allowlist,concurrency:s,workspaceRoot:a.workspaceRoot})).map(n=>ee(n))),r.packageAge?.enabled!==!1&&i(async()=>(await X(e,{allowlist:r.packageAge?.allowlist,concurrency:s,thresholds:{newPackageDays:r.packageAge?.newPackageDays,unmaintainedDays:r.packageAge?.unmaintainedDays},workspaceRoot:a.workspaceRoot})).map(n=>ae(n))),r.downloads?.enabled!==!1&&i(async()=>(await O(d,{allowlist:r.downloads?.allowlist,concurrency:s,errorThreshold:r.downloads?.errorThreshold,signal:o,warnThreshold:r.downloads?.warnThreshold})).map(n=>te(n))),r.expiredDomains?.enabled!==!1&&i(async()=>(await V(e,{allowDomains:r.expiredDomains?.allowDomains,allowlist:r.expiredDomains?.allowlist,concurrency:s,dnsServers:r.expiredDomains?.dnsServers,perDomainTimeoutMs:r.expiredDomains?.timeoutMs,signal:o,workspaceRoot:a.workspaceRoot})).map(n=>oe(n))),r.signatures?.enabled===!0&&i(async()=>(await _(e,{allowlist:r.signatures?.allowlist,concurrency:s,keysUrl:r.signatures?.keysUrl,signal:o,treatExpiredAs:r.signatures?.treatExpiredAs,workspaceRoot:a.workspaceRoot})).map(n=>ne(n))),r.archivedRepo?.enabled!==!1&&i(async()=>(await F(e,{allowlist:r.archivedRepo?.allowlist,concurrency:s,githubToken:r.archivedRepo?.githubToken,signal:o,workspaceRoot:a.workspaceRoot})).map(n=>ie(n))),await Promise.all(u);for(const l of c)t.addMany(l);return t},ue=1e4,me=async(e,a=ue)=>{const t=new Map;if(e.length===0)return t;const r=new AbortController,d=setTimeout(()=>{r.abort()},a);try{await Promise.all(e.map(async o=>{try{const s=await fetch(`https://registry.npmjs.org/${o}/latest`,{headers:{Accept:"application/json"},signal:r.signal});if(s.ok){const c=await s.json();c.version?t.set(o,c.version):w.debug(`resolveLatestVersions: ${o} returned 200 but no version field; dropping.`)}else w.debug(`resolveLatestVersions: ${o} returned ${String(s.status)}; dropping.`)}catch(s){w.debug(`resolveLatestVersions: ${o} fetch failed (${s instanceof Error?s.message:String(s)}); dropping.`)}}))}finally{clearTimeout(d)}return t},Re=async e=>{const a=e.map(s=>U(s)),t=new Map;for(const s of a)if(s.versionSpec){const c=I.coerce(s.versionSpec);c&&t.set(s.name,c.version)}const r=a.filter(s=>!t.has(s.name)).map(s=>s.name),d=await me(r),o=[];for(const s of a){const c=t.get(s.name)??d.get(s.name);c?o.push({name:s.name,version:c}):w.debug(`resolveExplicitPackages: dropping ${s.name}${s.versionSpec?`@${s.versionSpec}`:""} — neither semver-coerce nor /latest resolved a version.`)}return o};export{$e as a,me as b,Ne as p,Re as r};
@@ -0,0 +1 @@
1
+ import{e as d,m as E,c as b}from"./index-DHD8wb6Z.js";import{y as u}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.js";const g={id:"bun",label:"Bun",lockfiles:["bun.lock","bun.lockb"],scriptSource:"package.json"},R={id:"node",label:"Node.js",lockfiles:["pnpm-lock.yaml","yarn.lock","package-lock.json","npm-shrinkwrap.json"],scriptSource:"package.json"},l={bun:g,node:R},a=["node","bun"],i={"deno.lock":"deno"},j=a.flatMap(n=>l[n].lockfiles.map(e=>[e,n])),p="Deno is not supported yet (deferred — see rfc/design-runtime-multitool.md).",s=(n,e)=>{if(n==="node"||n==="bun")return n;throw n in i||n==="deno"?new Error(`${e} requested runtime "${n}", but ${p}`):new Error(`${e} requested unknown runtime "${n}". Supported: ${a.join(", ")}.`)},D=n=>{let e=n;for(;;){for(const[o,t]of j)if(u(d(e,o)))return{runtime:t};for(const o of Object.keys(i))if(u(d(e,o)))return{deferred:i[o]};const r=E(e);if(r===e||b(e).root===e)return{};e=r}},$=(n,e={})=>{const r=e.env??process.env,o=(f,m,k)=>({adapter:l[f],deferredNotice:k,runtime:f,source:m});if(e.flag!==void 0&&e.flag!=="")return o(s(e.flag,"--runtime"),"flag");const t=r.VIS_RUNTIME;if(t!==void 0&&t!=="")return o(s(t,"VIS_RUNTIME"),"env");if(e.config!==void 0)return o(s(e.config,"config runtime:"),"config");const c=D(n);return c.runtime!==void 0?o(c.runtime,"lockfile"):c.deferred!==void 0?o("node","default",`Detected a ${c.deferred} project but ${p} Falling back to node.`):o("node","default")};export{$ as r};
@@ -0,0 +1 @@
1
+ import{createRequire as O}from"node:module";import{e as i,m as p}from"./index-DHD8wb6Z.js";import{p as E}from"./augment-COAiXSIx.js";let h;const y=s=>(h??=O(import.meta.url))(s),c=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,d=s=>{if(typeof c<"u"&&c.versions&&c.versions.node){const[e,r]=c.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return c.getBuiltinModule(s)}return y(s)},{spawnSync:u}=d("node:child_process"),{existsSync:l}=d("node:fs"),b=s=>{let e=s;for(;;){const r=i(e,".pnp.cjs");if(l(r)){const o=i(e,".pnp.loader.mjs");return{esmLoader:l(o)?o:void 0,pnpCjs:r}}const t=p(e);if(t===e)return;e=t}},x=s=>{const e=b(s);if(e===void 0)return[];const r=["--require",e.pnpCjs];return e.esmLoader!==void 0&&r.push("--import",e.esmLoader),r},I=[{flag:"--enable-source-maps",key:"sourcemaps",min:[22,0]},{flag:"--experimental-sqlite",key:"sqlite",min:[22,5]},{flag:"--experimental-webstorage",key:"webstorage",min:[22,4]},{flag:"--experimental-eventsource",key:"eventsource",min:[22,3]},{flag:"--experimental-websocket",key:"websocket",max:[21,999],min:[20,10]},{flag:"--experimental-vm-modules",key:"vm-modules",min:[22,0]}],P=[22,4],j=s=>{const[e,r]=s.split(".").map(t=>Number.parseInt(t,10));return[e??0,r??0]},f=(s,e)=>s[0]>e[0]||s[0]===e[0]&&s[1]>=e[1],T=(s,e)=>s[0]<e[0]||s[0]===e[0]&&s[1]<=e[1],L=(s,e)=>f(s,e.min)&&(e.max===void 0||T(s,e.max)),A=s=>{const e=s.trim().toLowerCase();return e===""||e==="all"||e==="1"||e==="true"},m=(s,e)=>A(s)||s.split(",").some(r=>r.trim().toLowerCase()===e),g=(s,e,r)=>{const t=j(e),o=[];for(const n of I)m(s,n.key)&&L(t,n)&&o.push(n.flag);return m(s,"localstorage")&&f(t,P)&&(o.includes("--experimental-webstorage")||o.push("--experimental-webstorage"),o.push(`--localstorage-file=${r}`)),o},v="VIS_X_REEXEC",C=(s,e,r)=>{const t={...process.env},o=i(p(process.argv[1]),"runtime","preload.js");if(t.NODE_OPTIONS){const a=t.NODE_OPTIONS.replace(`--import ${JSON.stringify(o)}`,"").replace(`--import ${o}`,"").replaceAll(/\s+/gu," ").trim();a===""?delete t.NODE_OPTIONS:t.NODE_OPTIONS=a}delete t.VIS_AUGMENT_SUBPROCESS,delete t.VIS_UNFLAG,delete t.VIS_POLYFILL;const n=u(process.execPath,[s,...e],{cwd:r,env:t,stdio:"inherit"});if(n.error)throw n.error;return n.status??(n.signal===null?0:1)},_=s=>{let e=s;for(;;){if(l(i(e,"package.json"))||l(i(e,".pnp.cjs")))return i(e,".vis","localstorage");const r=p(e);if(r===e)return i(s,".vis","localstorage");e=r}},R=s=>{const e=process.env.VIS_UNFLAG;return[...e===void 0?[]:g(e,process.versions.node,_(s)),...x(s)]},U=(s,e,r)=>{const t=u("bun",["run",s,...e],{cwd:r,stdio:"inherit"});if(t.error)throw t.error.code==="ENOENT"?new Error("Runtime is set to bun but the `bun` binary is not on PATH. Install it from https://bun.sh."):t.error;return t.status??(t.signal===null?0:1)},k=(s,e,r,t)=>{const o=u(process.execPath,[...s,process.argv[1],"x",e,...r],{cwd:t,env:{...process.env,[v]:"1"},stdio:"inherit"});return o.status??(o.signal===null?0:1)},w=async(s,e,r)=>{if(process.env[v]===void 0){const n=R(r);if(n.length>0)return k(n,s,e,r)}if(process.env.VIS_AUGMENT_SUBPROCESS!==void 0){const n=i(p(process.argv[1]),"runtime","preload.js"),a=process.env.VIS_UNFLAG,N=a===void 0?[]:g(a,process.versions.node,_(r)),S=[process.env.NODE_OPTIONS??"",...N,`--import ${JSON.stringify(n)}`].filter(Boolean);process.env.NODE_OPTIONS=S.join(" ").trim()}const{importTs:t}=await import("../packem_chunks/ts-loader.js").then(n=>n.t);await E(r);const o=process.argv;process.argv=[process.execPath,s,...e];try{await t(s)}finally{process.argv=o}return typeof process.exitCode=="number"?process.exitCode:0},B=async(s,e,r,t,o={})=>o.node?C(s,e,t):r==="bun"?U(s,e,t):w(s,e,t);export{B as r};
@@ -0,0 +1 @@
1
+ import{e as f,z as d}from"./index-DHD8wb6Z.js";import{whichBin as m}from"#native";import{p as h}from"./readJsonSync-CbryXYxN-B2aSeDpC.js";import{y as k}from"./isAccessibleSync-DYKTrrvc-CSnBISfV.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};