@visulima/vis 2.0.2 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE.md +5395 -4307
  3. package/dist/bin.js +1 -1
  4. package/dist/binx.js +2 -2
  5. package/dist/config/index.js +1 -1
  6. package/dist/packem_chunks/CONFIG_FILES.js +6 -6
  7. package/dist/packem_chunks/DEFAULT_CLEAN_KEEP.js +1 -1
  8. package/dist/packem_chunks/agent-instructions.js +7 -7
  9. package/dist/packem_chunks/bloom-status.js +2 -2
  10. package/dist/packem_chunks/bloom-sync.js +2 -2
  11. package/dist/packem_chunks/cache-attestation.js +1 -1
  12. package/dist/packem_chunks/catalog-detector.js +1 -1
  13. package/dist/packem_chunks/catalog.js +87 -111
  14. package/dist/packem_chunks/cli-exec.js +1 -1
  15. package/dist/packem_chunks/cli-main.js +192 -217
  16. package/dist/packem_chunks/defineReleasePlugin.js +3 -3
  17. package/dist/packem_chunks/detect.js +8 -3
  18. package/dist/packem_chunks/devtools.js +1 -1
  19. package/dist/packem_chunks/discord.js +4 -4
  20. package/dist/packem_chunks/dispatch.js +4 -4
  21. package/dist/packem_chunks/doctor-probe.js +2 -2
  22. package/dist/packem_chunks/extra-files.js +3 -3
  23. package/dist/packem_chunks/fix.js +11 -11
  24. package/dist/packem_chunks/git.js +3 -3
  25. package/dist/packem_chunks/group-tags.js +1 -1
  26. package/dist/packem_chunks/handler.js +1 -1
  27. package/dist/packem_chunks/handler10.js +5 -5
  28. package/dist/packem_chunks/handler11.js +1 -1
  29. package/dist/packem_chunks/handler12.js +16 -16
  30. package/dist/packem_chunks/handler13.js +5 -5
  31. package/dist/packem_chunks/handler14.js +1 -1
  32. package/dist/packem_chunks/handler15.js +1 -1
  33. package/dist/packem_chunks/handler16.js +1 -1
  34. package/dist/packem_chunks/handler17.js +1 -1
  35. package/dist/packem_chunks/handler18.js +1 -1
  36. package/dist/packem_chunks/handler19.js +5 -5
  37. package/dist/packem_chunks/handler2.js +1 -1
  38. package/dist/packem_chunks/handler20.js +2 -2
  39. package/dist/packem_chunks/handler21.js +2 -2
  40. package/dist/packem_chunks/handler22.js +8 -8
  41. package/dist/packem_chunks/handler23.js +1 -1
  42. package/dist/packem_chunks/handler24.js +1 -1
  43. package/dist/packem_chunks/handler25.js +1 -1
  44. package/dist/packem_chunks/handler26.js +5 -5
  45. package/dist/packem_chunks/handler27.js +1 -1
  46. package/dist/packem_chunks/handler28.js +3 -3
  47. package/dist/packem_chunks/handler29.js +1 -1
  48. package/dist/packem_chunks/handler3.js +2 -2
  49. package/dist/packem_chunks/handler30.js +1 -1
  50. package/dist/packem_chunks/handler31.js +2 -2
  51. package/dist/packem_chunks/handler32.js +2 -2
  52. package/dist/packem_chunks/handler33.js +2 -2
  53. package/dist/packem_chunks/handler34.js +3 -3
  54. package/dist/packem_chunks/handler35.js +5 -5
  55. package/dist/packem_chunks/handler36.js +1 -1
  56. package/dist/packem_chunks/handler37.js +2 -2
  57. package/dist/packem_chunks/handler38.js +6 -6
  58. package/dist/packem_chunks/handler39.js +8 -8
  59. package/dist/packem_chunks/handler4.js +4 -4
  60. package/dist/packem_chunks/handler40.js +34 -34
  61. package/dist/packem_chunks/handler41.js +5 -5
  62. package/dist/packem_chunks/handler42.js +4 -4
  63. package/dist/packem_chunks/handler43.js +3 -3
  64. package/dist/packem_chunks/handler44.js +2 -2
  65. package/dist/packem_chunks/handler45.js +1 -1
  66. package/dist/packem_chunks/handler46.js +1 -1
  67. package/dist/packem_chunks/handler47.js +1 -1
  68. package/dist/packem_chunks/handler48.js +3 -3
  69. package/dist/packem_chunks/handler49.js +1 -1
  70. package/dist/packem_chunks/handler5.js +6 -6
  71. package/dist/packem_chunks/handler50.js +6 -6
  72. package/dist/packem_chunks/handler51.js +13 -13
  73. package/dist/packem_chunks/handler52.js +3 -3
  74. package/dist/packem_chunks/handler53.js +5 -5
  75. package/dist/packem_chunks/handler54.js +2 -2
  76. package/dist/packem_chunks/handler55.js +1 -1
  77. package/dist/packem_chunks/handler56.js +4 -4
  78. package/dist/packem_chunks/handler57.js +5 -5
  79. package/dist/packem_chunks/handler58.js +5 -5
  80. package/dist/packem_chunks/handler59.js +8 -8
  81. package/dist/packem_chunks/handler6.js +7 -7
  82. package/dist/packem_chunks/handler60.js +3 -3
  83. package/dist/packem_chunks/handler61.js +21 -21
  84. package/dist/packem_chunks/handler62.js +12 -12
  85. package/dist/packem_chunks/handler63.js +3 -3
  86. package/dist/packem_chunks/handler64.js +5 -5
  87. package/dist/packem_chunks/handler65.js +8 -8
  88. package/dist/packem_chunks/handler66.js +2 -2
  89. package/dist/packem_chunks/handler67.js +21 -21
  90. package/dist/packem_chunks/handler68.js +21 -21
  91. package/dist/packem_chunks/handler69.js +30 -30
  92. package/dist/packem_chunks/handler7.js +1 -1
  93. package/dist/packem_chunks/handler70.js +9 -9
  94. package/dist/packem_chunks/handler71.js +17 -17
  95. package/dist/packem_chunks/handler72.js +104 -104
  96. package/dist/packem_chunks/handler73.js +20 -20
  97. package/dist/packem_chunks/handler74.js +45 -45
  98. package/dist/packem_chunks/handler75.js +27 -3
  99. package/dist/packem_chunks/handler76.js +3 -27
  100. package/dist/packem_chunks/handler77.js +68 -68
  101. package/dist/packem_chunks/handler78.js +30 -30
  102. package/dist/packem_chunks/handler8.js +1 -1
  103. package/dist/packem_chunks/handler9.js +1 -1
  104. package/dist/packem_chunks/heal-accept.js +9 -9
  105. package/dist/packem_chunks/heal.js +11 -11
  106. package/dist/packem_chunks/help-command.js +7 -63
  107. package/dist/packem_chunks/index.js +1 -1
  108. package/dist/packem_chunks/index2.js +48 -802
  109. package/dist/packem_chunks/index3.js +3 -7
  110. package/dist/packem_chunks/index4.js +803 -134
  111. package/dist/packem_chunks/index5.js +7 -73
  112. package/dist/packem_chunks/index6.js +73 -0
  113. package/dist/packem_chunks/index7.js +135 -0
  114. package/dist/packem_chunks/interface.js +2 -2
  115. package/dist/packem_chunks/keys-refresh.js +4 -4
  116. package/dist/packem_chunks/lean.js +3 -3
  117. package/dist/packem_chunks/list.js +3 -3
  118. package/dist/packem_chunks/loader.js +4 -4
  119. package/dist/packem_chunks/loader2.js +1 -1
  120. package/dist/packem_chunks/orchestrator.js +27 -27
  121. package/dist/packem_chunks/pre-mode.js +2 -2
  122. package/dist/packem_chunks/print-config.js +1 -1
  123. package/dist/packem_chunks/prompts.js +7 -7
  124. package/dist/packem_chunks/prune.js +3 -3
  125. package/dist/packem_chunks/publish-guards.js +1 -1
  126. package/dist/packem_chunks/resolveFormatter.js +5 -5
  127. package/dist/packem_chunks/run.js +1 -1
  128. package/dist/packem_chunks/security.js +1 -1
  129. package/dist/packem_chunks/shell-runner.js +1 -1
  130. package/dist/packem_chunks/slack.js +2 -2
  131. package/dist/packem_chunks/snapshot.js +2 -2
  132. package/dist/packem_chunks/stage-publisher.js +1 -1
  133. package/dist/packem_chunks/staged-registry.js +2 -2
  134. package/dist/packem_chunks/state.js +3 -3
  135. package/dist/packem_chunks/status.js +2 -2
  136. package/dist/packem_chunks/success-walk.js +4 -4
  137. package/dist/packem_chunks/sync.js +2 -2
  138. package/dist/packem_chunks/sync2.js +2 -2
  139. package/dist/packem_chunks/tar.js +3 -3
  140. package/dist/packem_chunks/tripwire.js +2 -2
  141. package/dist/packem_chunks/ts-loader.js +5 -9
  142. package/dist/packem_chunks/verify-lockfile.js +2 -2
  143. package/dist/packem_chunks/version-resolver.js +2 -2
  144. package/dist/packem_chunks/webhook.js +1 -1
  145. package/dist/packem_chunks/workflow-templates.js +5 -5
  146. package/dist/packem_chunks/workspace.js +2 -2
  147. package/dist/packem_shared/ReleaseClient-DAvbxCdo.js +1 -0
  148. package/dist/packem_shared/Table-DyORjLji-CC9cYgCG.js +11 -0
  149. package/dist/packem_shared/{VisReleaseError-DMGRBTNO.js → VisReleaseError-DZtgcKf8.js} +1 -1
  150. package/dist/packem_shared/_commonjsHelpers-DTfxOvZk.js +1 -0
  151. package/dist/packem_shared/advisories-CyDqzi5j.js +1 -0
  152. package/dist/packem_shared/affected-selection-DPQR-Bd3.js +1 -0
  153. package/dist/packem_shared/affected-shas-Dd0P7fGD.js +1 -0
  154. package/dist/packem_shared/ai-analysis-DSQQDFU9.js +68 -0
  155. package/dist/packem_shared/ai-fix-6nXZbecQ.js +43 -0
  156. package/dist/packem_shared/augment-COAiXSIx.js +4 -0
  157. package/dist/packem_shared/bin-wafzkjaB.js +1 -0
  158. package/dist/packem_shared/build-scripts-pdVmqXRm.js +1 -0
  159. package/dist/packem_shared/clean-DRiLimTx.js +1 -0
  160. package/dist/packem_shared/command-runtime-CiLVo4ED.js +1 -0
  161. package/dist/packem_shared/{compile-cache-B_Vf_WxT.js → compile-cache-DoMHRsRZ.js} +1 -1
  162. package/dist/packem_shared/createAdapter-F7GidOzU.js +1 -0
  163. package/dist/packem_shared/createVersionActions-ByaJ1Nbv.js +1 -0
  164. package/dist/packem_shared/cyclonedx-C_ezHg8b.js +4 -0
  165. package/dist/packem_shared/dependency-scan-DBH2Qo4I.js +1 -0
  166. package/dist/packem_shared/docker-Br_iFmI-.js +59 -0
  167. package/dist/packem_shared/failure-log-D92tM0ie.js +2 -0
  168. package/dist/packem_shared/formatBytes-BHAzNIrn-DFIppnY0.js +4 -0
  169. package/dist/packem_shared/getRandomSpinner-4ZEcbTYv-DCyIuj19.js +1 -0
  170. package/dist/packem_shared/giget-CVyyR7x8.js +2 -0
  171. package/dist/packem_shared/glob-Cyk1H9ZL-ox19CSsT.js +1 -0
  172. package/dist/packem_shared/index-B4AjSxHU.js +1 -0
  173. package/dist/packem_shared/index-BisalDCf.js +39 -0
  174. package/dist/packem_shared/{index-BWl4DbMp.js → index-BjdW45xX.js} +1 -1
  175. package/dist/packem_shared/index-DHD8wb6Z.js +22 -0
  176. package/dist/packem_shared/index-DXPSWMbG.js +1 -0
  177. package/dist/packem_shared/index.server-CwSgbeN7.js +2 -0
  178. package/dist/packem_shared/isAccessibleSync-DYKTrrvc-CSnBISfV.js +1 -0
  179. package/dist/packem_shared/license-DvlYdo6T.js +1 -0
  180. package/dist/packem_shared/lifecycle-CfTZQHOG.js +2 -0
  181. package/dist/packem_shared/lockfile-35RFsJDs.js +1 -0
  182. package/dist/packem_shared/lockfile-DhHAaHN5.js +1 -0
  183. package/dist/packem_shared/main-BjJN8kWj.js +1 -0
  184. package/dist/packem_shared/manifests-BNSmpPF_.js +1 -0
  185. package/dist/packem_shared/min-release-age-ChzTC7_I.js +34 -0
  186. package/dist/packem_shared/missing-package-json-C0keIt78.js +1 -0
  187. package/dist/packem_shared/native-config-sync-BSzU4qUO.js +21 -0
  188. package/dist/packem_shared/osv-bloom-5wDAoZ1e.js +2 -0
  189. package/dist/packem_shared/otelPlugin-D8LL2-4L.js +1 -0
  190. package/dist/packem_shared/package-version-BJkg7-6H.js +4 -0
  191. package/dist/packem_shared/packument-C55kVxcQ.js +1 -0
  192. package/dist/packem_shared/{peer-warnings-BXAzXqY3.js → peer-warnings-CmYSxvql.js} +1 -1
  193. package/dist/packem_shared/pm-runner-de-jCq8q.js +1 -0
  194. package/dist/packem_shared/project-name-filter-BeREbPMI.js +7 -0
  195. package/dist/packem_shared/{prompt-BSAy8SMH.js → prompt-DMzaQEVa.js} +1 -1
  196. package/dist/packem_shared/provenance-CvfQEJPQ.js +1 -0
  197. package/dist/packem_shared/readJsonSync-CbryXYxN-B2aSeDpC.js +1 -0
  198. package/dist/packem_shared/registry-keys-DmBrAlhg.js +1 -0
  199. package/dist/packem_shared/resolve-explicit-COmP7eqr.js +5 -0
  200. package/dist/packem_shared/resolve-runtime-C7NBCA1C.js +1 -0
  201. package/dist/packem_shared/run-file-jMngGQhs.js +1 -0
  202. package/dist/packem_shared/runtime-check-BklgEMkC.js +1 -0
  203. package/dist/packem_shared/s1ngularity-RZOHbGrE.js +1 -0
  204. package/dist/packem_shared/scan-progress-C9nMDLis.js +2 -0
  205. package/dist/packem_shared/selectors-B7lSFz7l.js +3 -0
  206. package/dist/packem_shared/signatures-oZ_2IneN.js +2 -0
  207. package/dist/packem_shared/{slug-DoueYuLo.js → slug-OBHcH7wV.js} +1 -1
  208. package/dist/packem_shared/spinner-CbJfWYwB.js +1 -0
  209. package/dist/packem_shared/sticky-comment-DjhyCIZt.js +1 -0
  210. package/dist/packem_shared/subtree-DtmcKAJK.js +2 -0
  211. package/dist/packem_shared/symbols-BXDZ_sKt.js +1 -0
  212. package/dist/packem_shared/tabs-BilwonkM.js +1 -0
  213. package/dist/packem_shared/target-merge-D1xbylFw.js +4 -0
  214. package/dist/packem_shared/target-options-d_rIrLyq.js +1 -0
  215. package/dist/packem_shared/toolchain-DY11tPCw.js +5 -0
  216. package/dist/packem_shared/typosquats-D8ppc5kr.js +1 -0
  217. package/dist/packem_shared/use-measured-height-BPQg2q_p.js +1 -0
  218. package/dist/packem_shared/utils-DQFHJn72.js +1 -0
  219. package/dist/packem_shared/verify-D8wYvB85.js +1 -0
  220. package/dist/packem_shared/vis-update-app-ngwL2mRv.js +1 -0
  221. package/dist/packem_shared/vis-user-error-jhNwmkZp.js +30 -0
  222. package/dist/packem_shared/watch-Dswvj6Zp.js +1 -0
  223. package/dist/packem_shared/watch-loop-COWvvSbR.js +11 -0
  224. package/dist/packem_shared/writeFileSync-DJoHk3Ks-CgQ-VNNT.js +1 -0
  225. package/dist/release/core/changelog/index.d.ts +62 -2
  226. package/dist/release/core/package-managers/index.d.ts +25 -1
  227. package/dist/release/core/package-managers/index.js +1 -1
  228. package/dist/release/core/version-actions/index.d.ts +47 -2
  229. package/dist/release/core/version-actions/index.js +1 -1
  230. package/dist/release/index.d.ts +100 -1
  231. package/dist/release/index.js +1 -1
  232. package/dist/release/plugin-sdk.d.ts +16 -1
  233. package/dist/release/plugin-sdk.js +1 -1
  234. package/dist/release/presets.js +1 -1
  235. package/dist/release/types.js +1 -1
  236. package/dist/runtime/preload.js +1 -1
  237. package/index.d.ts +204 -204
  238. package/index.js +26 -26
  239. package/package.json +13 -13
  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-CCBGdU8U.js +0 -1
  245. package/dist/packem_shared/affected-selection-Dj-ymxhw.js +0 -1
  246. package/dist/packem_shared/affected-shas-PwkVbPch.js +0 -1
  247. package/dist/packem_shared/ai-analysis-bGCAc1jR.js +0 -68
  248. package/dist/packem_shared/ai-fix-DV5-dHBY.js +0 -43
  249. package/dist/packem_shared/augment-24KX2nkI.js +0 -4
  250. package/dist/packem_shared/bin-CtzhnYMp.js +0 -1
  251. package/dist/packem_shared/build-scripts-w4SNeR7D.js +0 -1
  252. package/dist/packem_shared/clean-DWjQl14S.js +0 -1
  253. package/dist/packem_shared/command-runtime-BLFPUYAT.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-C4KaVTn1.js +0 -4
  257. package/dist/packem_shared/dependency-scan-D_ona0Qm.js +0 -1
  258. package/dist/packem_shared/docker-DaVs-9wK.js +0 -59
  259. package/dist/packem_shared/en-D3CfXlO7.js +0 -27
  260. package/dist/packem_shared/failure-log-CTneNcio.js +0 -2
  261. package/dist/packem_shared/giget-CAxjpwew.js +0 -2
  262. package/dist/packem_shared/glob-BUjyjdE8-C4M8e02u.js +0 -1
  263. package/dist/packem_shared/index-BAe6e0XE.js +0 -1
  264. package/dist/packem_shared/index-CTMU29dI.js +0 -1
  265. package/dist/packem_shared/index-uBVnF4ji.js +0 -35
  266. package/dist/packem_shared/index.server-CusjRLCh.js +0 -2
  267. package/dist/packem_shared/license-t5KnNX6v.js +0 -1
  268. package/dist/packem_shared/lifecycle-B8A2T3gx.js +0 -2
  269. package/dist/packem_shared/lockfile-Bccery3L.js +0 -1
  270. package/dist/packem_shared/main-D_cam4hv.js +0 -1
  271. package/dist/packem_shared/manifests-BDkwiVbh.js +0 -1
  272. package/dist/packem_shared/min-release-age-OaYpLwux.js +0 -34
  273. package/dist/packem_shared/missing-package-json-BqS-OnKd.js +0 -1
  274. package/dist/packem_shared/native-config-sync-Ds1FtcrM.js +0 -21
  275. package/dist/packem_shared/osv-bloom-pKp7urSB.js +0 -2
  276. package/dist/packem_shared/otelPlugin-DmKDBaPo.js +0 -1
  277. package/dist/packem_shared/package-version-C47v64aB.js +0 -4
  278. package/dist/packem_shared/packument-HBVbyf7x.js +0 -1
  279. package/dist/packem_shared/pm-runner-C6eTANt1.js +0 -1
  280. package/dist/packem_shared/project-name-filter-CJ3XX2TI.js +0 -7
  281. package/dist/packem_shared/provenance-D4Cza8cp.js +0 -1
  282. package/dist/packem_shared/public-api-WqUCiyIe.js +0 -131
  283. package/dist/packem_shared/readJsonSync-DweZd5ZA-0eZh9sGm.js +0 -1
  284. package/dist/packem_shared/registry-keys-C0ez2VND.js +0 -1
  285. package/dist/packem_shared/resolve-explicit-BbT764KS.js +0 -5
  286. package/dist/packem_shared/resolve-runtime-D_vZovbB.js +0 -1
  287. package/dist/packem_shared/run-file-DyPFFN9U.js +0 -1
  288. package/dist/packem_shared/runtime-check-D4um-yQq.js +0 -1
  289. package/dist/packem_shared/s1ngularity-St6dhKiq.js +0 -1
  290. package/dist/packem_shared/scan-progress-q-N2JtIp.js +0 -2
  291. package/dist/packem_shared/selectors-Ce_6UAoY.js +0 -3
  292. package/dist/packem_shared/signatures-Dyeyg1q9.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-Cfy7c__2.js +0 -11
  297. package/dist/packem_shared/target-options-7XcbqGDe.js +0 -1
  298. package/dist/packem_shared/toolchain-C_pNMBM6.js +0 -5
  299. package/dist/packem_shared/typosquats-xzcAGPiM.js +0 -1
  300. package/dist/packem_shared/use-measured-height-CBjN0fle.js +0 -1
  301. package/dist/packem_shared/utils-CRueU43T.js +0 -1
  302. package/dist/packem_shared/verify-Dve9PQj3.js +0 -1
  303. package/dist/packem_shared/vis-update-app-DMAC2pPf.js +0 -1
  304. package/dist/packem_shared/vis-user-error-xmha3L4n.js +0 -30
  305. package/dist/packem_shared/watch-BXOOX7lx.js +0 -1
  306. package/dist/packem_shared/watch-loop-Q7UpkVbr.js +0 -11
@@ -1,2 +0,0 @@
1
- import{createRequire as m}from"node:module";import{w as j}from"./index-uBVnF4ji.js";import{a as F}from"./en-D3CfXlO7.js";let p;const f=t=>(p??=m(import.meta.url))(t),o=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,c=t=>{if(typeof o<"u"&&o.versions&&o.versions.node){const[e,r]=o.versions.node.split(".").map(Number);if(e>22||e===22&&r>=3||e===20&&r>=16)return o.getBuiltinModule(t)}return f(t)},{mkdirSync:h,writeFileSync:g,readdirSync:y}=c("node:fs"),{readFile:_}=c("node:fs/promises"),n=t=>F(t),a=(t,e)=>j(n(t),`${encodeURIComponent(e)}.json`);class w{#e;#t;constructor(e,r){this.#e=e,this.#t=r}printTaskTerminalOutput(e,r,s){if(r!=="failure")return;const i=n(this.#e);try{h(i,{recursive:!0})}catch{return}const u=e.overrides.command,d=e.projectRoot,l={command:u,cwd:d,exitCode:void 0,hash:e.hash,runId:this.#t,status:r,taskId:e.id,terminalOutput:s,timestamp:new Date().toISOString()};try{g(a(this.#e,e.id),`${JSON.stringify(l,void 0,2)}
2
- `,"utf8")}catch{}}}const R=async(t,e)=>{const r=a(t,e);try{const s=await _(r,"utf8");return JSON.parse(s)}catch{return}},I=t=>{const e=n(t);let r;try{r=y(e)}catch{return[]}const s=[];for(const i of r)if(i.endsWith(".json"))try{s.push(decodeURIComponent(i.slice(0,-5)))}catch{}return s};export{w as F,R as a,I as l};
@@ -1,2 +0,0 @@
1
- import{createRequire as ce}from"node:module";let le;const ue=r=>(le??=ce(import.meta.url))(r),y=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,w=r=>{if(typeof y<"u"&&y.versions&&y.versions.node){const[e,t]=y.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return y.getBuiltinModule(r)}return ue(r)},{existsSync:m,openSync:de,readSync:he,closeSync:pe,statSync:fe,createWriteStream:q,readdirSync:me,renameSync:ge}=w("node:fs"),{readFile:X,mkdir:A,rm:x,writeFile:we,mkdtemp:$e}=w("node:fs/promises"),{PassThrough:V,Readable:z,pipeline:ve}=w("node:stream"),{pipeline:J}=w("node:stream/promises"),{spawn:Y}=w("node:child_process"),{basename:be,normalize:_e,delimiter:C,resolve:Z,dirname:F,join:I}=w("node:path"),{cwd:K}=y,ye=w("node:readline"),{homedir:ke,tmpdir:Q}=w("node:os"),{promisify:Ee}=w("node:util");var G=Object.defineProperty,xe=(r,e)=>{let t={};for(var n in r)G(t,n,{get:r[n],enumerable:!0});return G(t,Symbol.toStringTag,{value:"Module"}),t};const Ce=/^[A-Za-z]:\//;function T(r=""){return r&&r.replace(/\\/g,"/").replace(Ce,e=>e.toUpperCase())}const Te=/^[/\\]{2}/,Oe=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,ee=/^[A-Za-z]:$/,te=function(r){if(r.length===0)return".";r=T(r);let e=r.match(Te),t=k(r),n=r[r.length-1]==="/";return r=re(r,!t),r.length===0?t?"/":n?"./":".":(n&&(r+="/"),ee.test(r)&&(r+="/"),e?t?`//${r}`:`//./${r}`:t&&!k(r)?`/${r}`:r)},M=function(...r){let e="";for(let t of r)if(t)if(e.length>0){let n=e[e.length-1]==="/",o=t[0]==="/";n&&o?e+=t.slice(1):e+=n||o?t:`/${t}`}else e+=t;return te(e)};function je(){return typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const f=function(...r){r=r.map(n=>T(n));let e="",t=!1;for(let n=r.length-1;n>=-1&&!t;n--){let o=n>=0?r[n]:je();!o||o.length===0||(e=`${o}/${e}`,t=k(o))}return e=re(e,!t),t&&!k(e)?`/${e}`:e.length>0?e:"."};function re(r,e){let t="",n=0,o=-1,s=0,i=null;for(let a=0;a<=r.length;++a){if(a<r.length)i=r[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(t.length<2||n!==2||t[t.length-1]!=="."||t[t.length-2]!=="."){if(t.length>2){let c=t.lastIndexOf("/");c===-1?(t="",n=0):(t=t.slice(0,c),n=t.length-1-t.lastIndexOf("/")),o=a,s=0;continue}else if(t.length>0){t="",n=0,o=a,s=0;continue}}e&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${r.slice(o+1,a)}`:t=r.slice(o+1,a),n=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return t}const k=function(r){return Oe.test(r)},ne=function(r){let e=T(r).replace(/\/$/,"").split("/").slice(0,-1);return e.length===1&&ee.test(e[0])&&(e[0]+="/"),e.join("/")||(k(r)?"/":".")},oe=function(r,e){let t=T(r).split("/"),n="";for(let o=t.length-1;o>=0;o--){let s=t[o];if(s){n=s;break}}return n},Ae=/^path$/i,D={key:"PATH",value:""};function se(r){for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||!Ae.test(e))continue;let t=r[e];return t?{key:e,value:t}:D}return D}function Se(r,e){let t=e.value.split(C),n=[],o=r,s;do n.push(Z(o,"node_modules",".bin")),s=o,o=F(o);while(o!==s);n.push(F(process.execPath));let i=n.concat(t).join(C);return{key:e.key,value:i}}function ze(r,e,t=!0){let n={...process.env,...e};if(!t)return n;let o=Se(r,se(n));return n[o.key]=o.value,n}const Fe=r=>{let e=r.length,t=new V,n=()=>{--e===0&&t.end()};for(let o of r)J(o,t,{end:!1}).then(n).catch(n);return t},j=/([()\][%!^"`<>&|;, *?])/g,Ie=/^#!\s*(.+)/,Ge=/\.(?:com|exe)$/i,Me=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,De=process.platform==="win32",Pe=[".EXE",".CMD",".BAT",".COM"];function Be(r,e=[],t={}){if(t.shell===!0||!De)return{command:r,args:e,options:t};let n=P(r,t),o=null;if(n!==null){let s=Buffer.alloc(150),i=null;try{i=de(n,"r"),he(i,s,0,150,0)}catch{}finally{i!==null&&pe(i)}let a=s.toString().match(Ie);if(a!==null){let c=a[1].trim(),d=c.indexOf(" "),l=d===-1?c:c.slice(0,d),p=d===-1?"":c.slice(d+1),h=be(l);o=h==="env"?p||null:h}}if(o!==null&&n!==null&&(e=[n,...e],r=o,n=P(r,t)),n===null||!Ge.test(n)){let s=n!==null&&Me.test(n);r=_e(r),r=r.replace(j,"^$1"),e=e.map(i=>(i=i.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),i=i.replace(/(?=(\\+?)?)\1$/,"$1$1"),i=`"${i}"`,i=i.replace(j,"^$1"),s&&(i=i.replace(j,"^$1")),i)),e=["/d","/s","/c",`"${[r,...e].join(" ")}"`],r=t.env?.comspec??"cmd.exe",t={...t,windowsVerbatimArguments:!0}}return{command:r,args:e,options:t}}function P(r,e){let t=(e.cwd??K()).toString(),n=e.env??process.env,o=se(n).value,s=r.includes("/")||r.includes("\\")?[""]:[t,...o.split(C)],i=n.PATHEXT?n.PATHEXT.split(C):Pe;r.includes(".")&&i[0]!==""&&i.unshift("");for(let a of s){let c=Z(t,a.startsWith('"')&&a.endsWith('"')&&a.length>1?a.slice(1,-1):a,r);for(let d of i){let l=c+d;try{if(fe(l).isFile())return l}catch{}}}return null}var B=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(e,t){super(`Process exited with non-zero status (${e.exitCode})`),this.result=e,this.output=t}};const He={timeout:void 0,persist:!1},Re={windowsHide:!0};function Ne(r){let e=new AbortController;for(let t of r){if(t.aborted)return e.abort(),t;t.addEventListener("abort",()=>{e.abort(t.reason)},{signal:e.signal})}return e.signal}async function H(r){let e="";try{for await(let t of r)e+=t.toString()}catch{}return e}var Ue=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(e,t,n){this._options={...He,...n},this._command=e,this._args=t??[],this._processClosed=new Promise(o=>{this._resolveClose=o})}kill(e){return this._process?.kill(e)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(e,t,n){return Le(e,t,{...n,stdin:this})}async*[Symbol.asyncIterator](){let e=this._process;if(!e)return;let t=[];this._streamErr&&t.push(this._streamErr),this._streamOut&&t.push(this._streamOut);let n=Fe(t),o=ye.createInterface({input:n});for await(let s of o)yield s.toString();if(await this._processClosed,e.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new B(this)}async _waitForOutput(){let e=this._process;if(!e)throw Error("No process was started");let[t,n]=await Promise.all([this._streamOut?H(this._streamOut):"",this._streamErr?H(this._streamErr):""]);await this._processClosed;let{stdin:o}=this._options;if(o&&typeof o!="string"&&await o,e.removeAllListeners(),this._thrownError)throw this._thrownError;let s={stderr:n,stdout:t,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new B(this,s);return s}then(e,t){return this._waitForOutput().then(e,t)}_streamOut;_streamErr;spawn(){let e=K(),t=this._options,n={...Re,...t.nodeOptions},o=[];this._resetState(),t.timeout!==void 0&&o.push(AbortSignal.timeout(t.timeout)),t.signal!==void 0&&o.push(t.signal),t.persist===!0&&(n.detached=!0),o.length>0&&(n.signal=Ne(o)),n.env=ze(e,n.env,t.nodePath);let s=Be(this._command,this._args,n),i=Y(s.command,s.args,s.options);if(i.stderr&&(this._streamErr=i.stderr),i.stdout&&(this._streamOut=i.stdout),this._process=i,i.once("error",this._onError),i.once("close",this._onClose),i.stdin){let{stdin:a}=t;typeof a=="string"?i.stdin.end(a):a?.process?.stdout?.pipe(i.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(e=>{this._resolveClose=e}),this._thrownError=void 0}_onError=e=>{if(e.name==="AbortError"&&(!(e.cause instanceof Error)||e.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=e};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const S=(r,e,t)=>{let n=new Ue(r,e,t);return n.spawn(),n},Le=S;var We=xe({detectPackageManager:()=>ie,installDependencies:()=>Ke,packageManagers:()=>v});async function qe(r,e,t={}){let n=te(r).split("/");for(;n.length>0;){let o=await e(n.join("/")||"/");if(o||!t.includeParentDirs)return o;n.pop()}}function Xe(r){let e;return()=>(e===void 0&&(e=r().then(t=>(e=t,e))),e)}const Ve=Xe(async()=>{if(globalThis.process?.versions?.webcontainer)return!1;try{let{exitCode:r}=await S("corepack",["--version"]);return r===0}catch{return!1}});async function Je(r,e,t={}){let n=r!=="npm"&&r!=="bun"&&r!=="deno"&&t.corepack!==!1&&await Ve()?["corepack",[r,...e]]:[r,e],{exitCode:o,stdout:s,stderr:i}=await S(n[0],n[1],{nodeOptions:{cwd:f(t.cwd||process.cwd()),env:t.env,stdio:t.silent?"pipe":"inherit"}});if(o!==0)throw Error(`\`${n.flat().join(" ")}\` failed.${t.silent?["",s,i].join(`
2
- `):""}`)}async function Ye(r={}){let e=r.cwd||process.cwd(),t={...process.env,...r.env},n=(typeof r.packageManager=="string"?v.find(o=>o.name===r.packageManager):r.packageManager)||await ie(r.cwd||process.cwd());if(!n)throw Error("No package manager auto-detected.");return{cwd:e,env:t,silent:r.silent??!1,packageManager:n,dev:r.dev??!1,workspace:r.workspace,global:r.global??!1,dry:r.dry??!1,corepack:r.corepack??!0}}function Ze(r){let[e,t]=(r||"").split("@"),[n,o]=t?.split("+")||[];if(e&&e!=="-"&&/^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/.test(e))return{name:e,version:n,buildMeta:o};let s=(e||"").replace(/\W+/g,"");return{name:s,version:n,buildMeta:o,warnings:[`Abnormal characters found in \`packageManager\` field, sanitizing from \`${e}\` to \`${s}\``]}}const v=[{name:"npm",command:"npm",lockFile:"package-lock.json"},{name:"pnpm",command:"pnpm",lockFile:"pnpm-lock.yaml",files:["pnpm-workspace.yaml"]},{name:"bun",command:"bun",lockFile:["bun.lockb","bun.lock"]},{name:"yarn",command:"yarn",lockFile:"yarn.lock",files:[".yarnrc.yml"]},{name:"deno",command:"deno",lockFile:"deno.lock",files:["deno.json"]}];async function ie(r,e={}){let t=await qe(f(r||"."),async n=>{if(!e.ignorePackageJSON){let o=M(n,"package.json");if(m(o)){let s=JSON.parse(await X(o,"utf8"));if(s?.packageManager){let{name:i,version:a="0.0.0",buildMeta:c,warnings:d}=Ze(s.packageManager);if(i){let l=a.split(".")[0],p=v.find(h=>h.name===i&&h.majorVersion===l)||v.find(h=>h.name===i);return{name:i,command:i,version:a,majorVersion:l,buildMeta:c,warnings:d,files:p?.files,lockFile:p?.lockFile}}}}if(m(M(n,"deno.json")))return v.find(s=>s.name==="deno")}if(!e.ignoreLockFile){for(let o of v)if([o.lockFile,o.files].flat().filter(Boolean).some(s=>m(f(n,s))))return{...o}}},{includeParentDirs:e.includeParentDirs??!0});if(!t&&!e.ignoreArgv){let n=process.argv[1];if(n){for(let o of v)if(RegExp(`[/\\\\]\\.?${o.command}`).test(n))return o}}return t}async function Ke(r={}){let e=await Ye(r),t=r.frozenLockFile?{npm:["ci"],yarn:["install","--immutable"],bun:["install","--frozen-lockfile"],pnpm:["install","--frozen-lockfile"],deno:["install","--frozen"]}[e.packageManager.name]:["install"];return r.ignoreWorkspace&&e.packageManager.name==="pnpm"&&t.push("--ignore-workspace"),e.dry||await Je(e.packageManager.command,t,{cwd:e.cwd,silent:e.silent,corepack:e.corepack}),{exec:{command:e.packageManager.command,args:t}}}const Qe=Object.defineProperty({__proto__:null,basename:oe,dirname:ne,dist_exports:We,resolve:f},Symbol.toStringTag,{value:"Module"});async function et(r,e,t={}){const n=e+".json",o=JSON.parse(await X(n,"utf8").catch(()=>"{}")),s=(await E(r,{method:"HEAD",headers:t.headers}).catch(()=>{}))?.headers.get("etag");if(o.etag===s&&m(e))return;typeof s=="string"&&(o.etag=s);const i=await E(r,{headers:t.headers});if(i.status>=400)throw new Error(`Failed to download ${r}: ${i.status} ${i.statusText}`);const a=q(e);await Ee(ve)(i.body,a),await we(n,JSON.stringify(o),"utf8")}const tt=/^(?<repo>[-\w.]+\/[-\w.]+)(?<subdir>[^#]+)?(?<ref>#[-\w./@]+)?/,rt=/^(?<repo>[-\w.]+(?:\/[-\w.]+)+?)(?:::(?<subdir>[^#]*))?(?<ref>#[-\w./@]+)?$/;function O(r,e){const t=e?.expandRepo||r.includes("::"),n=r.match(t?rt:tt)?.groups||{},o=t?n.subdir?"/"+n.subdir:"/":n.subdir||"/";return{repo:n.repo||"",subdir:o,ref:n.ref?n.ref.slice(1):"main"}}function $(...r){process.env.DEBUG&&console.debug("[giget]",...r)}async function E(r,e={}){e.headers?.["sec-fetch-mode"]&&(e.mode=e.headers["sec-fetch-mode"]);const t=await fetch(r,{...e,headers:ae(e.headers)}).catch(n=>{throw new Error(`Failed to download ${r}: ${n}`,{cause:n})});if(e.validateStatus&&t.status>=400)throw new Error(`Failed to fetch ${r}: ${t.status} ${t.statusText}`);return t}function nt(){const r=process.env.XDG_CACHE_HOME?f(process.env.XDG_CACHE_HOME,"giget"):f(ke(),".cache/giget");if(process.platform==="win32"){const e=f(Q(),"giget");if(!m(e)&&m(r))try{ge(r,e)}catch{}return e}return r}function ae(r={}){const e={};for(const[t,n]of Object.entries(r))n&&(e[t.toLowerCase()]=n);return e}const ot=(r,e)=>{const t=st(r);return{name:t.name,version:t.subdir?`${t.version||"default"}-${t.subdir.replaceAll("/","-")}`:t.version,tar:({auth:n}={})=>it(t,n??e.auth)}};function st(r,e={}){const t=e.cwd??process.cwd();let n=r.replace(/#.*$/,""),o;if(/^[./]/.test(r))n=f(t,n);else if(/^https?:\/\//.test(n)){const l=/^(https?:\/\/[^/]+)\/([\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,p,h,g]=l;n=`${p}/${h}`,g&&(o=g)}}else if(n.includes("@")){const l=/^(.*?:[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(l){const[,p,h]=l;n=p,h&&(o=h)}}else{const l={"github:":"https://github.com/","gh:":"https://github.com/","gitlab:":"https://gitlab.com/","bitbucket:":"https://bitbucket.org/","sourcehut:":"https://git.sr.ht/~"},p=/^(.+?:)/.exec(n)?.at(1);p&&l[p]?n=n.replace(p,l[p]):p||(n=`${(process.env.GIGET_GIT_HOST||"https://github.com/").replace(/\/$/,"")}/${n}`);const h=/^(https?:\/\/[^/]+\/~?[\w.-]+\/[\w.-]+?)(?:\.git)?(?:\/(.+))?$/.exec(n);if(h){const[,g,u]=h;n=g,u&&(o=u)}}const s=n.replace(/^https?:\/\//,"").replace(/^.+@/,"").replace(/(\.git)?(#.*)?$/,"").replace(/^\W+/,"").replaceAll(/[:/]/g,"-"),[i,a]=/#(.+)$/.exec(r)?.at(1)?.split(":")??[],c=i||void 0,d=a||o;return{uri:n,name:s,...c&&{version:c},...d&&{subdir:d}}}async function it(r,e){const t=await $e(I(Q(),"giget-git-"));if(e&&/[\r\n]/.test(e))throw new Error("Auth token must not contain newline characters");const n={...process.env,GIT_TERMINAL_PROMPT:"0"};e&&(n.GIT_CONFIG_COUNT="1",n.GIT_CONFIG_KEY_0="http.extraHeader",n.GIT_CONFIG_VALUE_0=`Authorization: Bearer ${e}`);const o={env:n,timeout:6e4},s=at(),i=c=>N(c,o,s),a=c=>N(c,{...o,cwd:t},s);try{const c=["clone","--progress","--depth","1"];r.subdir&&c.push("--filter=blob:none","--sparse","--no-checkout"),r.version&&c.push("--branch",r.version),c.push("--",r.uri,t);try{s.update("Cloning..."),await i(c),s.update("Cloned.")}catch(u){if(!r.version)throw u;$("Shallow clone failed, falling back to full clone:",u),s.update("Shallow clone failed, cloning..."),await x(t,{recursive:!0,force:!0}),await A(t,{recursive:!0}),await a(["init"]),await a(["remote","add","origin",r.uri]),await a(["fetch","origin"]),await a(["checkout",r.version]),s.update("Fetched.")}r.subdir&&(s.update(`Sparse checkout ${r.subdir}...`),await a(["sparse-checkout","set",r.subdir]),await a(["checkout"])),s.update("Packing...");const d=r.subdir?I(t,r.subdir):t,{create:l}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);s.done();const p=l({gzip:!0,cwd:d,filter:u=>!u.startsWith(".git/")&&u!==".git"&&!u.startsWith("./.git/")&&u!=="./.git"},["."]).pipe(new V);let h=!1;const g=()=>{h||(h=!0,x(t,{recursive:!0,force:!0}))};return p.on("end",g),p.on("error",g),p.on("close",g),p}catch(c){throw s.done(),await x(t,{recursive:!0,force:!0}),c}}const R=["⠋","⠙","⠹","⠸","⠼","⠴","⠦","⠧","⠇","⠏"];function N(r,e,t){return new Promise((n,o)=>{const s=Y("git",r,{...e,stdio:["ignore","pipe","pipe"]});s.stdout.resume();let i="";s.stderr?.on("data",a=>{const c=a.toString();for(const d of c.split(/[\r\n]/)){const l=d.trim();l&&(i=l)}t&&t.update(i)}),s.on("close",a=>{a===0?n(i):o(new Error(`git ${r[0]} exited with code ${a}. Is git installed?`))}),s.on("error",a=>{a.code==="ENOENT"?o(new Error("git is not installed or not found in PATH")):o(a)})})}function at(){if(!process.stderr.isTTY)return{update(o){},done(){}};let r="",e=0;const t=()=>{const o=R[e%R.length];e++,process.stderr.write(`\x1B[2K\r\x1B[2m${o} ${r}\x1B[0m`)},n=setInterval(t,80);return{update(o){r=o,t()},done(){clearInterval(n),process.stderr.write("\x1B[2K\r")}}}const U=async(r,e)=>{if(r.endsWith(".json"))return await L(r,e);const t=new URL(r);let n=oe(t.pathname);try{const o=await E(t.href,{method:"HEAD",validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if((o.headers.get("content-type")||"").includes("application/json"))return await L(r,e);const s=o.headers.get("content-disposition")?.match(/filename="?(.+)"?/)?.[1];s&&(n=s.split(".")[0])}catch(o){$(`Failed to fetch HEAD for ${t.href}:`,o)}return{name:`${n}-${t.href.slice(0,8)}`,version:"",subdir:"",tar:t.href,defaultDir:n,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0}}},L=async(r,e)=>{const t=await(await E(r,{validateStatus:!0,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}})).json();if(!t.tar||!t.name)throw new Error(`Invalid template info from ${r}. name or tar fields are missing!`);return t},W=(r,e)=>{const t=O(r),n=process.env.GIGET_GITHUB_URL||"https://api.github.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},url:`${n.replace("api.github.com","github.com")}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/repos/${t.repo}/tarball/${t.ref}`}},ct=(r,e)=>{const t=O(r,{expandRepo:!0}),n=process.env.GIGET_GITLAB_URL||"https://gitlab.com";return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0,"sec-fetch-mode":"same-origin"},url:`${n}/${t.repo}/tree/${t.ref}${t.subdir}`,tar:`${n}/${t.repo}/-/archive/${t.ref}.tar.gz`}},lt=(r,e)=>{const t=O(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://bitbucket.com/${t.repo}/src/${t.ref}${t.subdir}`,tar:`https://bitbucket.org/${t.repo}/get/${t.ref}.tar.gz`}},ut=(r,e)=>{const t=O(r);return{name:t.repo.replace("/","-"),version:t.ref,subdir:t.subdir,headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0},url:`https://git.sr.ht/~${t.repo}/tree/${t.ref}/item${t.subdir}`,tar:`https://git.sr.ht/~${t.repo}/archive/${t.ref}.tar.gz`}},dt={http:U,https:U,git:ot,github:W,gh:W,gitlab:ct,bitbucket:lt,sourcehut:ut},ht="https://raw.githubusercontent.com/unjs/giget/main/templates",pt=(r=ht,e={})=>(async t=>{const n=Date.now(),o=`${r}/${t}.json`,s=await E(o,{headers:{authorization:e.auth?`Bearer ${e.auth}`:void 0}});if(s.status>=400)throw new Error(`Failed to download ${t} template info from ${o}: ${s.status} ${s.statusText}`);const i=await s.json();if(!i.tar||!i.name)throw new Error(`Invalid template info from ${o}. name or tar fields are missing!`);return $(`Fetched ${t} template info from ${o} in ${Date.now()-n}ms`),i}),ft=/^([\w+-.]+):/;function mt(r){if(!r)return;if(typeof r=="function")return r;const e=globalThis.process.getBuiltinModule?.("node:path")?.matchesGlob;if(typeof e!="function")throw new TypeError("Ignore patterns require `path.matchesGlob` which is supported in Node.js v22.5.0, v20.17.0 or later.");return t=>r.some(n=>e(t,n))}async function vt(r,e={}){const t=mt(e.ignore);e.registry=process.env.GIGET_REGISTRY??e.registry,e.auth=process.env.GIGET_AUTH??e.auth;const n=e.registry===!1?void 0:pt(e.registry,{auth:e.auth});let o=e.provider||(n?"registry":"github"),s=r;const i=r.match(ft);i&&(o=i[1],s=r.slice(i[0].length),(o==="http"||o==="https")&&(s=r)),o.endsWith("+git")&&(s=`${o.slice(0,-4)}:${s}`,o="git");const a=e.providers?.[o]||dt[o]||n;if(!a)throw new Error(`Unsupported provider: ${o}`);const c=await Promise.resolve().then(()=>a(s,{auth:e.auth})).catch(u=>{throw new Error(`Failed to download template from ${o}: ${u.message}`)});if(!c)throw new Error(`Failed to resolve template from ${o}`);c.name=(c.name||"template").replace(/[^\da-z-]/gi,"-"),c.defaultDir=(c.defaultDir||c.name).replace(/[^\da-z-]/gi,"-");const d=f(f(nt(),o,c.name),(c.version||c.name)+".tar.gz");if(e.preferOffline&&m(d)&&(e.offline=!0),!e.offline){await A(ne(d),{recursive:!0});const u=Date.now();if(typeof c.tar=="function"){const b=c.tar;await(async()=>{const _=await b({auth:e.auth});await J(_ instanceof z?_:z.fromWeb(_),q(d))})().catch(_=>{if(!m(d))throw _;$("Download error. Using cached version:",_),e.offline=!0})}else await et(c.tar,d,{headers:{Authorization:e.auth?`Bearer ${e.auth}`:void 0,...ae(c.headers)}}).catch(b=>{if(!m(d))throw b;$("Download error. Using cached version:",b),e.offline=!0});$(`Downloaded to ${d} in ${Date.now()-u}ms`)}if(!m(d))throw new Error(`Tarball not found: ${d} (offline: ${e.offline})`);const l=f(f(e.cwd||"."),e.dir||c.defaultDir);if(e.forceClean&&await x(l,{recursive:!0,force:!0}),!e.force&&m(l)&&me(l).length>0)throw new Error(`Destination ${l} already exists.`);await A(l,{recursive:!0});const p=Date.now(),h=c.subdir?.replace(/^\//,"")||"",{extract:g}=await import("../packem_chunks/tar.js").then(u=>u.index_min_exports);if(await g({file:d,cwd:l,onReadEntry(u){u.path=u.path.split("/").splice(1).join("/"),h&&(u.path.startsWith(h+"/")?u.path=u.path.slice(h.length):u.path=""),t&&u.path&&t(u.path.replace(/^\//,""))&&(u.path="")}}),$(`Extracted to ${l} in ${Date.now()-p}ms`),e.install){$("Installing dependencies...");const{installDependencies:u}=await Promise.resolve().then(()=>Qe).then(b=>b.dist_exports);await u({cwd:l,silent:e.silent,...typeof e.install=="object"?e.install:{}})}return{...c,source:s,dir:l}}export{vt as f,xe as l};
@@ -1 +0,0 @@
1
- import{C as o}from"./index-uBVnF4ji.js";const r=async(s,a)=>await o(s,a);export{r as s};
@@ -1 +0,0 @@
1
- import{g as Vr}from"./_commonjsHelpers-B5Y90VFO.js";import{b as j,c as D,d as Y,e as Me,f as Lr,g as Pr,r as Ar,a as jr,h as Ir}from"./clean-DWjQl14S.js";var ee,Ye;function xr(){if(Ye)return ee;Ye=1;const t=j();return ee=(r,e,s,l,n)=>{typeof s=="string"&&(n=l,l=s,s=void 0);try{return new t(r instanceof t?r.version:r,s).inc(e,l,n).version}catch{return null}},ee}var re,ke;function br(){if(ke)return re;ke=1;const t=D();return re=(r,e)=>{const s=t(r,null,!0),l=t(e,null,!0),n=s.compare(l);if(n===0)return null;const o=n>0,d=o?s:l,f=o?l:s,i=!!d.prerelease.length;if(f.prerelease.length&&!i){if(!f.patch&&!f.minor)return"major";if(f.compareMain(d)===0)return f.minor&&!f.patch?"minor":"patch"}const c=i?"pre":"";return s.major!==l.major?c+"major":s.minor!==l.minor?c+"minor":s.patch!==l.patch?c+"patch":"prerelease"},re}var te,Ue;function Mr(){if(Ue)return te;Ue=1;const t=j();return te=(r,e)=>new t(r,e).major,te}var se,Xe;function Nr(){if(Xe)return se;Xe=1;const t=j();return se=(r,e)=>new t(r,e).minor,se}var ne,Fe;function Gr(){if(Fe)return ne;Fe=1;const t=j();return ne=(r,e)=>new t(r,e).patch,ne}var ie,He;function Br(){if(He)return ie;He=1;const t=D();return ie=(r,e)=>{const s=t(r,e);return s&&s.prerelease.length?s.prerelease:null},ie}var ae,ze;function b(){if(ze)return ae;ze=1;const t=j();return ae=(r,e,s)=>new t(r,s).compare(new t(e,s)),ae}var oe,Je;function Wr(){if(Je)return oe;Je=1;const t=b();return oe=(r,e,s)=>t(e,r,s),oe}var ue,Ke;function Dr(){if(Ke)return ue;Ke=1;const t=b();return ue=(r,e)=>t(r,e,!0),ue}var ce,Qe;function Ne(){if(Qe)return ce;Qe=1;const t=j();return ce=(r,e,s)=>{const l=new t(r,s),n=new t(e,s);return l.compare(n)||l.compareBuild(n)},ce}var le,Ze;function Yr(){if(Ze)return le;Ze=1;const t=Ne();return le=(r,e)=>r.sort((s,l)=>t(s,l,e)),le}var pe,er;function kr(){if(er)return pe;er=1;const t=Ne();return pe=(r,e)=>r.sort((s,l)=>t(l,s,e)),pe}var fe,rr;function k(){if(rr)return fe;rr=1;const t=b();return fe=(r,e,s)=>t(r,e,s)>0,fe}var me,tr;function Ge(){if(tr)return me;tr=1;const t=b();return me=(r,e,s)=>t(r,e,s)<0,me}var he,sr;function Tr(){if(sr)return he;sr=1;const t=b();return he=(r,e,s)=>t(r,e,s)===0,he}var ve,nr;function _r(){if(nr)return ve;nr=1;const t=b();return ve=(r,e,s)=>t(r,e,s)!==0,ve}var de,ir;function Be(){if(ir)return de;ir=1;const t=b();return de=(r,e,s)=>t(r,e,s)>=0,de}var ge,ar;function We(){if(ar)return ge;ar=1;const t=b();return ge=(r,e,s)=>t(r,e,s)<=0,ge}var Re,or;function Or(){if(or)return Re;or=1;const t=Tr(),p=_r(),r=k(),e=Be(),s=Ge(),l=We();return Re=(o,d,f,i)=>{switch(d){case"===":return typeof o=="object"&&(o=o.version),typeof f=="object"&&(f=f.version),o===f;case"!==":return typeof o=="object"&&(o=o.version),typeof f=="object"&&(f=f.version),o!==f;case"":case"=":case"==":return t(o,f,i);case"!=":return p(o,f,i);case">":return r(o,f,i);case">=":return e(o,f,i);case"<":return s(o,f,i);case"<=":return l(o,f,i);default:throw new TypeError(`Invalid operator: ${d}`)}},Re}var $e,ur;function Ur(){if(ur)return $e;ur=1;const t=j(),p=D(),{safeRe:r,t:e}=Y();return $e=(l,n)=>{if(l instanceof t)return l;if(typeof l=="number"&&(l=String(l)),typeof l!="string")return null;n=n||{};let o=null;if(!n.rtl)o=l.match(n.includePrerelease?r[e.COERCEFULL]:r[e.COERCE]);else{const $=n.includePrerelease?r[e.COERCERTLFULL]:r[e.COERCERTL];let P;for(;(P=$.exec(l))&&(!o||o.index+o[0].length!==l.length);)(!o||P.index+P[0].length!==o.index+o[0].length)&&(o=P),$.lastIndex=P.index+P[1].length+P[2].length;$.lastIndex=-1}if(o===null)return null;const d=o[2],f=o[3]||"0",i=o[4]||"0",c=n.includePrerelease&&o[5]?`-${o[5]}`:"",g=n.includePrerelease&&o[6]?`+${o[6]}`:"";return p(`${d}.${f}.${i}${c}${g}`,n)},$e}var qe,cr;function Xr(){if(cr)return qe;cr=1;const t=D(),p=Me(),r=j(),e=(o,d,f)=>{if(!p.RELEASE_TYPES.includes(d))return null;const i=s(o,f);return i&&l(i,d)},s=(o,d)=>{const f=o instanceof r?o.version:o;return t(f,d)},l=(o,d)=>{if(n(d))return o.version;switch(o.prerelease=[],d){case"major":o.minor=0,o.patch=0;break;case"minor":o.patch=0;break}return o.format()},n=o=>o.startsWith("pre");return qe=e,qe}var Se,lr;function Fr(){if(lr)return Se;lr=1;class t{constructor(){this.max=1e3,this.map=new Map}get(r){const e=this.map.get(r);if(e!==void 0)return this.map.delete(r),this.map.set(r,e),e}delete(r){return this.map.delete(r)}set(r,e){if(!this.delete(r)&&e!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(r,e)}return this}}return Se=t,Se}var Ee,pr;function M(){if(pr)return Ee;pr=1;const t=/\s+/g;class p{constructor(a,h){if(h=s(h),a instanceof p)return a.loose===!!h.loose&&a.includePrerelease===!!h.includePrerelease?a:new p(a.raw,h);if(a instanceof l)return this.raw=a.value,this.set=[[a]],this.formatted=void 0,this;if(this.options=h,this.loose=!!h.loose,this.includePrerelease=!!h.includePrerelease,this.raw=a.trim().replace(t," "),this.set=this.raw.split("||").map(v=>this.parseRange(v.trim())).filter(v=>v.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const v=this.set[0];if(this.set=this.set.filter(S=>!V(S[0])),this.set.length===0)this.set=[v];else if(this.set.length>1){for(const S of this.set)if(S.length===1&&I(S[0])){this.set=[S];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let a=0;a<this.set.length;a++){a>0&&(this.formatted+="||");const h=this.set[a];for(let v=0;v<h.length;v++)v>0&&(this.formatted+=" "),this.formatted+=h[v].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(a){a=a.replace(L,"");const h=((this.options.includePrerelease&&P)|(this.options.loose&&T))+":"+a,v=e.get(h);if(v)return v;const S=this.options.loose,m=S?d[i.HYPHENRANGELOOSE]:d[i.HYPHENRANGE];a=a.replace(m,Q(this.options.includePrerelease)),n("hyphen replace",a),a=a.replace(d[i.COMPARATORTRIM],c),n("comparator trim",a),a=a.replace(d[i.TILDETRIM],g),n("tilde trim",a),a=a.replace(d[i.CARETTRIM],$),n("caret trim",a);let R=a.split(" ").map(O=>N(O,this.options)).join(" ").split(/\s+/).map(O=>K(O,this.options));S&&(R=R.filter(O=>(n("loose invalid filter",O,this.options),!!O.match(d[i.COMPARATORLOOSE])))),n("range list",R);const w=new Map,y=R.map(O=>new l(O,this.options));for(const O of y){if(V(O))return[O];w.set(O.value,O)}w.size>1&&w.has("")&&w.delete("");const C=[...w.values()];return e.set(h,C),C}intersects(a,h){if(!(a instanceof p))throw new TypeError("a Range is required");return this.set.some(v=>x(v,h)&&a.set.some(S=>x(S,h)&&v.every(m=>S.every(R=>m.intersects(R,h)))))}test(a){if(!a)return!1;if(typeof a=="string")try{a=new o(a,this.options)}catch{return!1}for(let h=0;h<this.set.length;h++)if(Z(this.set[h],a,this.options))return!0;return!1}}Ee=p;const r=Fr(),e=new r,s=Lr(),l=U(),n=Pr(),o=j(),{safeRe:d,src:f,t:i,comparatorTrimReplace:c,tildeTrimReplace:g,caretTrimReplace:$}=Y(),{FLAG_INCLUDE_PRERELEASE:P,FLAG_LOOSE:T}=Me(),L=new RegExp(f[i.BUILD],"g"),V=u=>u.value==="<0.0.0-0",I=u=>u.value==="",x=(u,a)=>{let h=!0;const v=u.slice();let S=v.pop();for(;h&&v.length;)h=v.every(m=>S.intersects(m,a)),S=v.pop();return h},N=(u,a)=>(u=u.replace(d[i.BUILD],""),n("comp",u,a),u=B(u,a),n("caret",u),u=A(u,a),n("tildes",u),u=H(u,a),n("xrange",u),u=J(u,a),n("stars",u),u),E=u=>!u||u.toLowerCase()==="x"||u==="*",_=(u,a,h)=>E(u)&&!E(a)||E(a)&&h&&!E(h),A=(u,a)=>u.trim().split(/\s+/).map(h=>q(h,a)).join(" "),q=(u,a)=>{const h=a.loose?d[i.TILDELOOSE]:d[i.TILDE],v=a.includePrerelease?"-0":"";return u.replace(h,(S,m,R,w,y)=>{n("tilde",u,S,m,R,w,y);let C;return E(m)?C="":E(R)?C=`>=${m}.0.0${v} <${+m+1}.0.0-0`:E(w)?C=`>=${m}.${R}.0${v} <${m}.${+R+1}.0-0`:y?(n("replaceTilde pr",y),C=`>=${m}.${R}.${w}-${y} <${m}.${+R+1}.0-0`):C=`>=${m}.${R}.${w} <${m}.${+R+1}.0-0`,n("tilde return",C),C})},B=(u,a)=>u.trim().split(/\s+/).map(h=>F(h,a)).join(" "),F=(u,a)=>{n("caret",u,a);const h=a.loose?d[i.CARETLOOSE]:d[i.CARET],v=a.includePrerelease?"-0":"";return u.replace(h,(S,m,R,w,y)=>{n("caret",u,S,m,R,w,y);let C;return E(m)?C="":E(R)?C=`>=${m}.0.0${v} <${+m+1}.0.0-0`:E(w)?m==="0"?C=`>=${m}.${R}.0${v} <${m}.${+R+1}.0-0`:C=`>=${m}.${R}.0${v} <${+m+1}.0.0-0`:y?(n("replaceCaret pr",y),m==="0"?R==="0"?C=`>=${m}.${R}.${w}-${y} <${m}.${R}.${+w+1}-0`:C=`>=${m}.${R}.${w}-${y} <${m}.${+R+1}.0-0`:C=`>=${m}.${R}.${w}-${y} <${+m+1}.0.0-0`):(n("no pr"),m==="0"?R==="0"?C=`>=${m}.${R}.${w} <${m}.${R}.${+w+1}-0`:C=`>=${m}.${R}.${w} <${m}.${+R+1}.0-0`:C=`>=${m}.${R}.${w} <${+m+1}.0.0-0`),n("caret return",C),C})},H=(u,a)=>(n("replaceXRanges",u,a),u.split(/\s+/).map(h=>z(h,a)).join(" ")),z=(u,a)=>{u=u.trim();const h=a.loose?d[i.XRANGELOOSE]:d[i.XRANGE];return u.replace(h,(v,S,m,R,w,y)=>{if(n("xRange",u,v,S,m,R,w,y),_(m,R,w))return u;const C=E(m),O=C||E(R),G=O||E(w),W=G;return S==="="&&W&&(S=""),y=a.includePrerelease?"-0":"",C?S===">"||S==="<"?v="<0.0.0-0":v="*":S&&W?(O&&(R=0),w=0,S===">"?(S=">=",O?(m=+m+1,R=0,w=0):(R=+R+1,w=0)):S==="<="&&(S="<",O?m=+m+1:R=+R+1),S==="<"&&(y="-0"),v=`${S+m}.${R}.${w}${y}`):O?v=`>=${m}.0.0${y} <${+m+1}.0.0-0`:G&&(v=`>=${m}.${R}.0${y} <${m}.${+R+1}.0-0`),n("xRange return",v),v})},J=(u,a)=>(n("replaceStars",u,a),u.trim().replace(d[i.STAR],"")),K=(u,a)=>(n("replaceGTE0",u,a),u.trim().replace(d[a.includePrerelease?i.GTE0PRE:i.GTE0],"")),Q=u=>(a,h,v,S,m,R,w,y,C,O,G,W)=>(E(v)?h="":E(S)?h=`>=${v}.0.0${u?"-0":""}`:E(m)?h=`>=${v}.${S}.0${u?"-0":""}`:R?h=`>=${h}`:h=`>=${h}${u?"-0":""}`,E(C)?y="":E(O)?y=`<${+C+1}.0.0-0`:E(G)?y=`<${C}.${+O+1}.0-0`:W?y=`<=${C}.${O}.${G}-${W}`:u?y=`<${C}.${O}.${+G+1}-0`:y=`<=${y}`,`${h} ${y}`.trim()),Z=(u,a,h)=>{for(let v=0;v<u.length;v++)if(!u[v].test(a))return!1;if(a.prerelease.length&&!h.includePrerelease){for(let v=0;v<u.length;v++)if(n(u[v].semver),u[v].semver!==l.ANY&&u[v].semver.prerelease.length>0){const S=u[v].semver;if(S.major===a.major&&S.minor===a.minor&&S.patch===a.patch)return!0}return!1}return!0};return Ee}var we,fr;function U(){if(fr)return we;fr=1;const t=Symbol("SemVer ANY");class p{static get ANY(){return t}constructor(i,c){if(c=r(c),i instanceof p){if(i.loose===!!c.loose)return i;i=i.value}i=i.trim().split(/\s+/).join(" "),n("comparator",i,c),this.options=c,this.loose=!!c.loose,this.parse(i),this.semver===t?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}parse(i){const c=this.options.loose?e[s.COMPARATORLOOSE]:e[s.COMPARATOR],g=i.match(c);if(!g)throw new TypeError(`Invalid comparator: ${i}`);this.operator=g[1]!==void 0?g[1]:"",this.operator==="="&&(this.operator=""),g[2]?this.semver=new o(g[2],this.options.loose):this.semver=t}toString(){return this.value}test(i){if(n("Comparator.test",i,this.options.loose),this.semver===t||i===t)return!0;if(typeof i=="string")try{i=new o(i,this.options)}catch{return!1}return l(i,this.operator,this.semver,this.options)}intersects(i,c){if(!(i instanceof p))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new d(i.value,c).test(this.value):i.operator===""?i.value===""?!0:new d(this.value,c).test(i.semver):(c=r(c),c.includePrerelease&&(this.value==="<0.0.0-0"||i.value==="<0.0.0-0")||!c.includePrerelease&&(this.value.startsWith("<0.0.0")||i.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&i.operator.startsWith(">")||this.operator.startsWith("<")&&i.operator.startsWith("<")||this.semver.version===i.semver.version&&this.operator.includes("=")&&i.operator.includes("=")||l(this.semver,"<",i.semver,c)&&this.operator.startsWith(">")&&i.operator.startsWith("<")||l(this.semver,">",i.semver,c)&&this.operator.startsWith("<")&&i.operator.startsWith(">")))}}we=p;const r=Lr(),{safeRe:e,t:s}=Y(),l=Or(),n=Pr(),o=j(),d=M();return we}var Ce,mr;function X(){if(mr)return Ce;mr=1;const t=M();return Ce=(r,e,s)=>{try{e=new t(e,s)}catch{return!1}return e.test(r)},Ce}var ye,hr;function Hr(){if(hr)return ye;hr=1;const t=M();return ye=(r,e)=>new t(r,e).set.map(s=>s.map(l=>l.value).join(" ").trim().split(" ")),ye}var Le,vr;function zr(){if(vr)return Le;vr=1;const t=j(),p=M();return Le=(e,s,l)=>{let n=null,o=null,d=null;try{d=new p(s,l)}catch{return null}return e.forEach(f=>{d.test(f)&&(!n||o.compare(f)===-1)&&(n=f,o=new t(n,l))}),n},Le}var Pe,dr;function Jr(){if(dr)return Pe;dr=1;const t=j(),p=M();return Pe=(e,s,l)=>{let n=null,o=null,d=null;try{d=new p(s,l)}catch{return null}return e.forEach(f=>{d.test(f)&&(!n||o.compare(f)===1)&&(n=f,o=new t(n,l))}),n},Pe}var Te,gr;function Kr(){if(gr)return Te;gr=1;const t=j(),p=M(),r=k();return Te=(s,l)=>{s=new p(s,l);let n=new t("0.0.0");if(s.test(n)||(n=new t("0.0.0-0"),s.test(n)))return n;n=null;for(let o=0;o<s.set.length;++o){const d=s.set[o];let f=null;d.forEach(i=>{const c=new t(i.semver.version);switch(i.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!f||r(c,f))&&(f=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),f&&(!n||r(n,f))&&(n=f)}return n&&s.test(n)?n:null},Te}var _e,Rr;function Qr(){if(Rr)return _e;Rr=1;const t=M();return _e=(r,e)=>{try{return new t(r,e).range||"*"}catch{return null}},_e}var Oe,$r;function De(){if($r)return Oe;$r=1;const t=j(),p=U(),{ANY:r}=p,e=M(),s=X(),l=k(),n=Ge(),o=We(),d=Be();return Oe=(i,c,g,$)=>{i=new t(i,$),c=new e(c,$);let P,T,L,V,I;switch(g){case">":P=l,T=o,L=n,V=">",I=">=";break;case"<":P=n,T=d,L=l,V="<",I="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(i,c,$))return!1;for(let x=0;x<c.set.length;++x){const N=c.set[x];let E=null,_=null;if(N.forEach(A=>{A.semver===r&&(A=new p(">=0.0.0")),E=E||A,_=_||A,P(A.semver,E.semver,$)?E=A:L(A.semver,_.semver,$)&&(_=A)}),E.operator===V||E.operator===I||(!_.operator||_.operator===V)&&T(i,_.semver)||_.operator===I&&L(i,_.semver))return!1}return!0},Oe}var Ve,qr;function Zr(){if(qr)return Ve;qr=1;const t=De();return Ve=(r,e,s)=>t(r,e,">",s),Ve}var Ae,Sr;function et(){if(Sr)return Ae;Sr=1;const t=De();return Ae=(r,e,s)=>t(r,e,"<",s),Ae}var je,Er;function rt(){if(Er)return je;Er=1;const t=M();return je=(r,e,s)=>(r=new t(r,s),e=new t(e,s),r.intersects(e,s)),je}var Ie,wr;function tt(){if(wr)return Ie;wr=1;const t=X(),p=b();return Ie=(r,e,s)=>{const l=[];let n=null,o=null;const d=r.sort((g,$)=>p(g,$,s));for(const g of d)t(g,e,s)?(o=g,n||(n=g)):(o&&l.push([n,o]),o=null,n=null);n&&l.push([n,null]);const f=[];for(const[g,$]of l)g===$?f.push(g):!$&&g===d[0]?f.push("*"):$?g===d[0]?f.push(`<=${$}`):f.push(`${g} - ${$}`):f.push(`>=${g}`);const i=f.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return i.length<c.length?i:e},Ie}var xe,Cr;function st(){if(Cr)return xe;Cr=1;const t=M(),p=U(),{ANY:r}=p,e=X(),s=b(),l=(c,g,$={})=>{if(c===g)return!0;c=new t(c,$),g=new t(g,$);let P=!1;e:for(const T of c.set){for(const L of g.set){const V=d(T,L,$);if(P=P||V!==null,V)continue e}if(P)return!1}return!0},n=[new p(">=0.0.0-0")],o=[new p(">=0.0.0")],d=(c,g,$)=>{if(c===g)return!0;if(c.length===1&&c[0].semver===r){if(g.length===1&&g[0].semver===r)return!0;$.includePrerelease?c=n:c=o}if(g.length===1&&g[0].semver===r){if($.includePrerelease)return!0;g=o}const P=new Set;let T,L;for(const q of c)q.operator===">"||q.operator===">="?T=f(T,q,$):q.operator==="<"||q.operator==="<="?L=i(L,q,$):P.add(q.semver);if(P.size>1)return null;let V;if(T&&L&&(V=s(T.semver,L.semver,$),V>0||V===0&&(T.operator!==">="||L.operator!=="<=")))return null;for(const q of P){if(T&&!e(q,String(T),$)||L&&!e(q,String(L),$))return null;for(const B of g)if(!e(q,String(B),$))return!1;return!0}let I,x,N,E,_=L&&!$.includePrerelease&&L.semver.prerelease.length?L.semver:!1,A=T&&!$.includePrerelease&&T.semver.prerelease.length?T.semver:!1;_&&_.prerelease.length===1&&L.operator==="<"&&_.prerelease[0]===0&&(_=!1);for(const q of g){if(E=E||q.operator===">"||q.operator===">=",N=N||q.operator==="<"||q.operator==="<=",T){if(A&&q.semver.prerelease&&q.semver.prerelease.length&&q.semver.major===A.major&&q.semver.minor===A.minor&&q.semver.patch===A.patch&&(A=!1),q.operator===">"||q.operator===">="){if(I=f(T,q,$),I===q&&I!==T)return!1}else if(T.operator===">="&&!q.test(T.semver))return!1}if(L){if(_&&q.semver.prerelease&&q.semver.prerelease.length&&q.semver.major===_.major&&q.semver.minor===_.minor&&q.semver.patch===_.patch&&(_=!1),q.operator==="<"||q.operator==="<="){if(x=i(L,q,$),x===q&&x!==L)return!1}else if(L.operator==="<="&&!q.test(L.semver))return!1}if(!q.operator&&(L||T)&&V!==0)return!1}return!(T&&N&&!L&&V!==0||L&&E&&!T&&V!==0||A||_)},f=(c,g,$)=>{if(!c)return g;const P=s(c.semver,g.semver,$);return P>0?c:P<0||g.operator===">"&&c.operator===">="?g:c},i=(c,g,$)=>{if(!c)return g;const P=s(c.semver,g.semver,$);return P<0?c:P>0||g.operator==="<"&&c.operator==="<="?g:c};return xe=l,xe}var be,yr;function nt(){if(yr)return be;yr=1;const t=Y(),p=Me(),r=j(),e=Ir(),s=D(),l=Ar(),n=jr(),o=xr(),d=br(),f=Mr(),i=Nr(),c=Gr(),g=Br(),$=b(),P=Wr(),T=Dr(),L=Ne(),V=Yr(),I=kr(),x=k(),N=Ge(),E=Tr(),_=_r(),A=Be(),q=We(),B=Or(),F=Ur(),H=Xr(),z=U(),J=M(),K=X(),Q=Hr(),Z=zr(),u=Jr(),a=Kr(),h=Qr(),v=De(),S=Zr(),m=et(),R=rt(),w=tt(),y=st();return be={parse:s,valid:l,clean:n,inc:o,diff:d,major:f,minor:i,patch:c,prerelease:g,compare:$,rcompare:P,compareLoose:T,compareBuild:L,sort:V,rsort:I,gt:x,lt:N,eq:E,neq:_,gte:A,lte:q,cmp:B,coerce:F,truncate:H,Comparator:z,Range:J,satisfies:K,toComparators:Q,maxSatisfying:Z,minSatisfying:u,minVersion:a,validRange:h,outside:v,gtr:S,ltr:m,intersects:R,simplifyRange:w,subset:y,SemVer:r,re:t.re,src:t.src,tokens:t.t,SEMVER_SPEC_VERSION:p.SEMVER_SPEC_VERSION,RELEASE_TYPES:p.RELEASE_TYPES,compareIdentifiers:e.compareIdentifiers,rcompareIdentifiers:e.rcompareIdentifiers},be}var it=nt();const ut=Vr(it);export{it as s,ut as u};
@@ -1 +0,0 @@
1
- import{m as h,D as k,f as S}from"./provenance-D4Cza8cp.js";import{g as $}from"./packument-HBVbyf7x.js";import{H as d}from"./en-D3CfXlO7.js";import{W as N}from"./build-scripts-w4SNeR7D.js";import{n as v}from"./license-t5KnNX6v.js";import{v as R,P as L,z as P}from"./index-uBVnF4ji.js";import{D}from"./package-version-C47v64aB.js";import"./public-api-WqUCiyIe.js";import{L as w}from"./dependency-scan-D_ona0Qm.js";const m={CRITICAL:0,HIGH:1,LOW:3,MODERATE:2,UNKNOWN:4},oe=(t,e)=>{const n=m[(t.vulnerability.severity??"UNKNOWN").toUpperCase()]??4,s=m[(e.vulnerability.severity??"UNKNOWN").toUpperCase()]??4;return n-s||t.packageName.localeCompare(e.packageName)||t.packageVersion.localeCompare(e.packageVersion)},W=(t,e)=>{const n=m[e.toUpperCase()]??2;return(m[t.toUpperCase()]??4)<=n},b=["firstSeen","installScripts","license","malware","publisherChange","score","unexpectedDeps","vulnerability"],g=6e4,A=(t,e,n)=>{for(const s of n)if(s===t||s===`${t}@${e}`||s.endsWith("*")&&t.startsWith(s.slice(0,-1)))return!0;return!1},x=async(t,e)=>{const n=e.security?.policies?.firstSeen;if(n?.minutes===void 0||n.minutes<=0)return[];const{minutes:s}=n,a=n.exclude??[],r=e.security?.acceptedRisks,c=s*g,i=Date.now();return(await h(t.packages,k,async o=>{if(A(o.name,o.version,a))return;const l=await $(o.name,{workspaceRoot:t.workspaceRoot});if(l===void 0)return;const p=l.time?.[o.version];if(p===void 0)return;const u=Date.parse(p);if(Number.isNaN(u))return;const f=i-u;if(f>=c)return;const y=Math.max(0,Math.floor(f/g));return{acceptedRisk:d(o.name,o.version,r,"firstSeen"),data:{ageMinutes:y,minimumMinutes:s,publishedAt:p},packageName:o.name,policy:"firstSeen",reason:`${o.name}@${o.version} was published ${String(y)} min ago — below the ${String(s)} min firstSeen cooldown.`,severity:"block",version:o.version}})).filter(o=>o!==void 0)},O=(t,e)=>{const n=e.security?.policies?.installScripts;if(!n)return[];const s=n.allow??{},a=n.strict===!0;if(!a&&Object.keys(s).length===0)return[];const r=N(t.workspaceRoot,s,{pinVersions:e.security?.pinVersions===!0});if(r.unapproved.length===0)return[];const c=e.security?.acceptedRisks,i=a?"block":"warn";return r.unapproved.map(o=>({acceptedRisk:d(o.name,o.version??"*",c,"installScripts"),data:{hooks:o.hooks},packageName:o.name,policy:"installScripts",reason:`${o.name}${o.version?`@${o.version}`:""} declares unapproved build script(s): ${o.hooks.join(", ")}`,severity:i,version:o.version??"*"}))},U=new Set(["AND","OR"]),E=t=>{const e=t.replaceAll("("," ").replaceAll(")"," ").split(/\s+/).map(a=>a.trim()).filter(a=>a.length>0),n=[];let s=!1;for(const a of e){const r=a.toUpperCase();if(s){s=!1;continue}if(r==="WITH"){s=!0;continue}if(U.has(r))continue;const c=a.endsWith("+"),i=c?a.slice(0,-1):a,o=v(i)??i;n.push(o),c&&n.push(`${o}-or-later`)}return n},F=t=>{if(typeof t.license=="string"){const e=t.license.trim();return e.length>0?e:void 0}if(t.license&&typeof t.license=="object"&&typeof t.license.type=="string"){const e=t.license.type.trim();if(e.length>0)return e}if(Array.isArray(t.licenses)&&t.licenses.length>0){const e=t.licenses.map(n=>n&&typeof n.type=="string"?n.type.trim():"").filter(n=>n.length>0);if(e.length>0)return e.length===1?e[0]:`(${e.join(" OR ")})`}},I=(t,e)=>{if(e.length===0)return;const n=new Set(e.map(s=>v(s)??s).map(s=>s.toLowerCase()));for(const s of t)if(n.has(s.toLowerCase()))return s},M=(t,e)=>{if(e.length===0)return;const n=new Set(e.map(s=>v(s)??s).map(s=>s.toLowerCase()));for(const s of t)if(!n.has(s.toLowerCase()))return s},V=(t,e)=>{const n=e.security?.policies?.license;if(!n)return[];const s=n.allow??[],a=n.deny??[];if(s.length===0&&a.length===0)return[];const r=e.security?.acceptedRisks,c=[];for(const i of t.packages){const o=t.manifestData?.get(`${i.name}@${i.version}`),l=o?F(o):void 0;if(!l){s.length>0&&c.push({acceptedRisk:d(i.name,i.version,r,"license"),data:{declaredLicense:null},packageName:i.name,policy:"license",reason:`${i.name}@${i.version} declares no license; allow-list mode requires one of: ${s.join(", ")}`,severity:"block",version:i.version});continue}const p=E(l),u=I(p,a);if(u){c.push({acceptedRisk:d(i.name,i.version,r,"license"),data:{declaredLicense:l,deniedLicense:u},packageName:i.name,policy:"license",reason:`${i.name}@${i.version} uses denied license '${u}' (declared: ${l})`,severity:"block",version:i.version});continue}const f=M(p,s);f&&c.push({acceptedRisk:d(i.name,i.version,r,"license"),data:{allowList:s,declaredLicense:l,unallowedLicense:f},packageName:i.name,policy:"license",reason:`${i.name}@${i.version} uses license '${f}' which is not on the allow-list (declared: ${l})`,severity:"block",version:i.version})}return c},j=6e4,_=(t,e,n)=>{for(const s of n)if(s===t||s===`${t}@${e}`||s.endsWith("*")&&t.startsWith(s.slice(0,-1)))return!0;return!1},H=async(t,e)=>{const n=e.security?.policies?.publisherChange;if(n?.mode!=="no-downgrade")return[];const s=n.exclude??[],a=typeof n.ignoreAfter=="number"?n.ignoreAfter*j:void 0,r=e.security?.acceptedRisks,c=Date.now();return(await h(t.packages,k,async i=>{if(_(i.name,i.version,s))return;const o=await $(i.name,{workspaceRoot:t.workspaceRoot});if(o===void 0)return;if(a!==void 0){const p=o.time?.[i.version],u=p===void 0?Number.NaN:Date.parse(p);if(!Number.isNaN(u)&&c-u>a)return}if(o.versions[i.version]?.dist?.attestations?.provenance!==void 0)return;const l=S(o,i.version);if(l!==void 0)return{acceptedRisk:d(i.name,i.version,r,"publisherChange"),data:{priorVersionWithProvenance:l},packageName:i.name,policy:"publisherChange",reason:`${i.name}@${i.version} dropped the provenance attestation that ${i.name}@${l} carried — publisher trust downgrade.`,severity:"block",version:i.version}})).filter(i=>i!==void 0)},T=t=>{for(const e of Object.values(w))for(const n of[e.file,...e.aliases??[]])if(t===n||t.endsWith(`/${n}`)||t.endsWith(`.${n}`))return e.type},z=(t,e,n)=>{const s=R(e)?e:L(t,e);let a;try{a=P(s)}catch{return}const r=T(s)??w[n]?.type;if(!r)return;const c=D(a,r);if(c.length===0)return;const i=new Set;for(const o of c)i.add(`${o.name}@${o.version}`);return i},K=(t,e)=>{for(const n of e)if(n===t||n.endsWith("*")&&t.startsWith(n.slice(0,-1)))return!0;return!1},Y=(t,e)=>{const n=e.security?.policies?.unexpectedDeps;if(!n)return[];const s=n.allow??[],a=n.baselineLockfile;if(s.length===0&&!a)return[];const r=a?z(t.workspaceRoot,a,t.packageManager):void 0,c=e.security?.acceptedRisks,i=[];for(const o of t.packages){const l=s.length===0||K(o.name,s),p=r?r.has(`${o.name}@${o.version}`):!0;if(l&&p)continue;const u=[],f={};l||(u.push(`not on allow-list (${s.length} entr${s.length===1?"y":"ies"})`),f.allowList=s),!p&&r&&(u.push(`not present in baseline lockfile (${a})`),f.baselineLockfile=a),i.push({acceptedRisk:d(o.name,o.version,c,"unexpectedDeps"),data:f,packageName:o.name,policy:"unexpectedDeps",reason:`${o.name}@${o.version} is unexpected: ${u.join("; ")}`,severity:"block",version:o.version})}return i},q=(t,e)=>{if(!t.osvFindings||t.osvFindings.size===0)return[];const n=e.security?.policies?.vulnerability?.failOn,s=e.security?.acceptedRisks,a=[];for(const r of t.packages){const c=t.osvFindings.get(r.name);if(!(!c||c.length===0))for(const i of c){const o=n?W(i.severity,n)?"block":"warn":"info";a.push({acceptedRisk:d(r.name,r.version,s,"vulnerability"),data:{advisoryId:i.id,aliases:i.aliases??[],cvssScore:i.cvssScore,fixedVersions:i.fixedVersions,severity:i.severity,summary:i.summary},packageName:r.name,policy:"vulnerability",reason:`${i.severity} ${i.id} affects ${r.name}@${r.version}: ${i.summary}`,severity:o,version:r.version})}}return a},C=[{evaluate:q,isConfigured:t=>t.security?.policies?.vulnerability!==void 0,name:"vulnerability",offlineSupported:!0,surfaces:["audit","doctor"]},{evaluate:V,isConfigured:t=>{const e=t.security?.policies?.license;return!!(e&&(e.allow&&e.allow.length>0||e.deny&&e.deny.length>0))},name:"license",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:O,isConfigured:t=>{const e=t.security?.policies?.installScripts;return!!(e&&(e.allow&&Object.keys(e.allow).length>0||e.strict===!0))},name:"installScripts",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:Y,isConfigured:t=>{const e=t.security?.policies?.unexpectedDeps;return!!(e&&(e.allow&&e.allow.length>0||typeof e.baselineLockfile=="string"))},name:"unexpectedDeps",offlineSupported:!0,surfaces:["audit","doctor","install"]},{evaluate:x,isConfigured:t=>{const e=t.security?.policies?.firstSeen?.minutes;return typeof e=="number"&&e>0},name:"firstSeen",offlineSupported:!1,surfaces:["audit","doctor","install"]},{evaluate:H,isConfigured:t=>t.security?.policies?.publisherChange?.mode==="no-downgrade",name:"publisherChange",offlineSupported:!1,surfaces:["audit","doctor","install"]}],G=(t,e,n)=>C.filter(s=>s.surfaces.includes(t)?n!==void 0?n.has(s.name):s.isConfigured(e):!1),re=async(t,e,n)=>{const s=G(e,n.visConfig,n.enabledPolicies),a=[];for(const r of s){if(t.offline&&!r.offlineSupported){a.push({packageName:"*",policy:r.name,reason:`policy.${r.name} skipped: requires network (--offline)`,severity:"info",version:"*"});continue}try{const c=await r.evaluate(t,n.visConfig);a.push(...c)}catch(c){const i=c instanceof Error?c.message:String(c);a.push({packageName:"*",policy:r.name,reason:`policy.${r.name} failed: ${i}`,severity:"info",version:"*"})}}return a},B=(()=>{const t=new Map;for(const e of b)t.set(e.toLowerCase(),e);return t})(),ae=()=>C.map(t=>t.name),ce=(t,e)=>{if(t===void 0)return;const n=t.trim().toLowerCase();if(n===""||n==="none")return new Set;if(n==="all")return new Set(b);const s=new Set;for(const a of t.split(",").map(r=>r.trim()).filter(r=>r.length>0)){const r=a.replace(/^_+/,"").replaceAll(/_+([a-z])/g,(i,o)=>o.toUpperCase()),c=B.get(r.toLowerCase());c===void 0?e?.(a):s.add(c)}return s};export{oe as c,re as e,ae as g,ce as p,W as s};
@@ -1,35 +0,0 @@
1
- import{createRequire as Dr}from"node:module";import{E as st}from"./public-api-WqUCiyIe.js";let pr;const fr=u=>(pr??=Dr(import.meta.url))(u),Pu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ar=u=>{if(typeof Pu<"u"&&Pu.versions&&Pu.versions.node){const[e,t]=Pu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Pu.getBuiltinModule(u)}return fr(u)},{createRequire:I}=Ar("node:module"),Je=0,hr=4,Er=Symbol("findUpStop"),Ea=/"(?:[^"\\]|\\.)*"|\/\/[^\r\n]*|\/\*[\s\S]*?\*\//g,Cr=/^[A-Z]:\//i,_u=(u="")=>u&&u.replaceAll("\\","/").replace(Cr,e=>e.toUpperCase()),Fr=/^[/\\]{2}/,gr=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Z]:[/\\]/i,Ze=/^[A-Z]:$/i,ot=/^\/([A-Z]:)?$/i,it=/^([A-Z]:)\/$/i,dr=/[^/](\.[^./]+)$/,mr=/^[/\\]|^[a-z]:[/\\]/i,yr=/\/$/,Br=()=>{if(typeof process.cwd=="function")try{const u=process.cwd();if(typeof u=="string")return _u(u)}catch{}return"/"},Ca="/",It=(u,e)=>{let t="",n=0,s=-1,r=0,o;for(let i=0;i<=u.length;++i){if(i<u.length)o=u[i];else{if(o==="/")break;o="/"}if(o==="/"){if(!(s===i-1||r===1))if(r===2){if(t.length<2||n!==2||!t.endsWith(".")||t.at(-2)!=="."){if(t.length>2){const a=t.lastIndexOf("/");a===-1?(t="",n=0):(t=t.slice(0,a),n=t.length-1-t.lastIndexOf("/")),s=i,r=0;continue}else if(t.length>0){t="",n=0,s=i,r=0;continue}}e&&(t+=t.length>0?"/..":"..",n=2)}else t.length>0?t+=`/${u.slice(s+1,i)}`:t=u.slice(s+1,i),n=i-s-1;s=i,r=0}else o==="."&&r!==-1?++r:r=-1}return t},Nu=u=>gr.test(u),Fe=function(u){if(u.length===0)return".";u=_u(u);const e=Fr.exec(u),t=Nu(u),n=u.at(-1)==="/";return u=It(u,!t),u.length===0?t?"/":n?"./":".":(n&&(u+="/"),Ze.test(u)&&(u+="/"),e?t?`//${u}`:`//./${u}`:t&&!Nu(u)?`/${u}`:u)},br=(...u)=>{let e="";for(const t of u)if(t)if(e.length>0){const n=e.at(-1)==="/",s=t[0]==="/";n&&s?e+=t.slice(1):e+=n||s?t:`/${t}`}else e+=t;return Fe(e)},Lu=function(...u){u=u.map(n=>_u(n));let e="",t=!1;for(let n=u.length-1;n>=-1&&!t;n--){const s=n>=0?u[n]:Br();!s||s.length===0||(e=`${s}/${e}`,t=Nu(s))}return e=It(e,!t),Ze.test(e)?`${e}/`:t&&!Nu(e)?`/${e}`:e.length>0?e:"."},Fa=function(u){return _u(u)},$r=function(u){return dr.exec(_u(u))?.[1]??""},ga=function(u,e){const t=Lu(u).replace(ot,"$1").replace(it,"$1").split("/"),n=Lu(e).replace(ot,"$1").replace(it,"$1").split("/");if(n[0][1]===":"&&t[0][1]===":"&&t[0]!==n[0])return n.join("/");const s=Math.min(t.length,n.length);let r=0;for(;r<s&&t[r]===n[r];)r+=1;const o=t.length-r;return[...Array.from({length:o}).fill(".."),...n.slice(r)].join("/")},Ye=u=>{const e=_u(u).replace(yr,""),t=e.lastIndexOf("/");if(t===-1)return Nu(u)?"/":".";const n=e.slice(0,t);return Ze.test(n)?`${n}/`:n||(Nu(u)?"/":".")},ut=(u,e)=>{const t=_u(u),n=t.slice(t.lastIndexOf("/")+1);if(e&&n.endsWith(e)){if(e===t)return"";const s=n.slice(0,-e.length);if(s.length>0)return s}return n},vr=function(u){const e=mr.exec(u)?.[0]?.replaceAll("\\","/")??"",t=ut(u),n=$r(t);return{base:t,dir:Ye(u),ext:n,name:t.slice(0,t.length-n.length),root:e}};let wr;const xr=u=>(wr??=I(import.meta.url))(u),Hu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Sr=u=>{if(typeof Hu<"u"&&Hu.versions&&Hu.versions.node){const[e,t]=Hu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Hu.getBuiltinModule(u)}return xr(u)},{fileURLToPath:_r}=Sr("node:url");function Tr(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var at,lt;function Rr(){return lt||(lt=1,at=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cr3","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"]),at}var kr=Rr();const Or=Tr(kr);new Set(Or);const Nr=/^(?:\.?\.[/\\]|\.\.\B)/,da=u=>Nr.test(u)||u==="..",yu=u=>_u(u instanceof URL?_r(u):u);let Lr=class extends Error{constructor(e){super(`EEXIST: ${e}`)}get code(){return"EEXIST"}set code(e){throw new Error("Cannot overwrite code EEXIST")}get name(){return"AlreadyExistsError"}set name(e){throw new Error("Cannot overwrite name of AlreadyExistsError")}};const bu=u=>{if(!u||!(u instanceof URL)&&typeof u!="string")throw new TypeError("Path must be a non-empty string or URL.")};let Pr;const Hr=u=>(Pr??=I(import.meta.url))(u),Iu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ir=u=>{if(typeof Iu<"u"&&Iu.versions&&Iu.versions.node){const[e,t]=Iu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Iu.getBuiltinModule(u)}return Hr(u)};Ir("node:fs/promises");let Mr;const jr=u=>(Mr??=I(import.meta.url))(u),Mu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Gr=u=>{if(typeof Mu<"u"&&Mu.versions&&Mu.versions.node){const[e,t]=Mu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Mu.getBuiltinModule(u)}return jr(u)};Gr("node:fs");const we=u=>{if(u.isFile())return"file";if(u.isDirectory())return"dir";if(u.isSymbolicLink())return"symlink"};let zr;const Ur=u=>(zr??=I(import.meta.url))(u),ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wr=u=>{if(typeof ju<"u"&&ju.versions&&ju.versions.node){const[e,t]=ju.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ju.getBuiltinModule(u)}return Ur(u)},{lstat:ct,mkdir:qr}=Wr("node:fs/promises"),ya=async u=>{bu(u);try{const e=await ct(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{await qr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=await ct(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(t))}'`,{cause:e})}};let Xr;const Kr=u=>(Xr??=I(import.meta.url))(u),Gu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Vr=u=>{if(typeof Gu<"u"&&Gu.versions&&Gu.versions.node){const[e,t]=Gu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Gu.getBuiltinModule(u)}return Kr(u)},{lstatSync:Dt,mkdirSync:Qr}=Vr("node:fs"),Ba=u=>{bu(u);try{const e=Dt(u);if(!e.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(e))}'`);return}catch(e){if(e.code!=="ENOENT")throw e}try{Qr(u,{recursive:!0})}catch(e){if(e.code!=="EEXIST")throw e;const t=Dt(u);if(!t.isDirectory())throw new Error(`Ensure path exists, expected 'dir', got '${String(we(t))}'`,{cause:e})}};let Jr;const Zr=u=>(Jr??=I(import.meta.url))(u),zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Yr=u=>{if(typeof zu<"u"&&zu.versions&&zu.versions.node){const[e,t]=zu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return zu.getBuiltinModule(u)}return Zr(u)};Yr("node:fs/promises");let un;const en=u=>(un??=I(import.meta.url))(u),Uu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tn=u=>{if(typeof Uu<"u"&&Uu.versions&&Uu.versions.node){const[e,t]=Uu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Uu.getBuiltinModule(u)}return en(u)};tn("node:fs");let rn;const nn=u=>(rn??=I(import.meta.url))(u),Wu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,sn=u=>{if(typeof Wu<"u"&&Wu.versions&&Wu.versions.node){const[e,t]=Wu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Wu.getBuiltinModule(u)}return nn(u)};sn("node:fs/promises");let on;const an=u=>(on??=I(import.meta.url))(u),qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ln=u=>{if(typeof qu<"u"&&qu.versions&&qu.versions.node){const[e,t]=qu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return qu.getBuiltinModule(u)}return an(u)};ln("node:fs");let cn;const Dn=u=>(cn??=I(import.meta.url))(u),Xu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,pn=u=>{if(typeof Xu<"u"&&Xu.versions&&Xu.versions.node){const[e,t]=Xu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Xu.getBuiltinModule(u)}return Dn(u)};pn("node:fs/promises");let fn;const An=u=>(fn??=I(import.meta.url))(u),Ku=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,hn=u=>{if(typeof Ku<"u"&&Ku.versions&&Ku.versions.node){const[e,t]=Ku.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ku.getBuiltinModule(u)}return An(u)};hn("node:fs");let pt=class extends Error{root;constructor(e,t){super(`${e instanceof Error?e.message:String(e)} for path "${t}"`),this.cause=e,this.root=t}get name(){return"WalkError"}set name(e){throw new Error("Cannot overwrite name of WalkError")}};const En=u=>{const e=[],t=new Set;let n=0;for(const i of u){if(i==="{")e.push(n);else if(i==="}"){const a=e.pop();a!==void 0&&(t.add(a),t.add(n))}n+=1}let s=0,r=0,o="";for(const i of u)i==="{"?t.has(r)?(o+="(",s+=1):o+=String.raw`\{`:i==="}"?t.has(r)?(o+=")",s-=1):o+=String.raw`\}`:i===","&&s>0?o+="|":o+=i,r+=1;return o},ft=u=>{const e=u.replace(/[$()+\\^]/g,String.raw`\$&`).replace(/\.\*/g,".([^/]*)").replace(/\*\*/g,"(.*)").replace(/(?<!\.)\*(?!\*)/g,"([^/]*)").replace(/\?/g,"[^/]").replace(/\.(?!\*)/g,String.raw`\.`),t=En(e).replace(/\[!(.*?)\]/g,"[^$1]");try{return new RegExp(`^${t}$`)}catch(n){throw new Error(`Invalid glob pattern: ${u}`,{cause:n})}};let Cn=class{name;path;#u;constructor(e,t,n){this.#u=e,this.name=t,this.path=n}isDirectory(){return this.#u.isDirectory()}isFile(){return this.#u.isFile()}isSymbolicLink(){return this.#u.isSymbolicLink()}};const We=(u,e,t)=>new Cn(u,e,t),$e=(u,e,t,n)=>{if(Array.isArray(e)&&e.length>0&&!e.some(r=>u.endsWith(r)))return!1;const s=u.includes("\\")?u.replaceAll("\\","/"):u;return t&&!t.some(r=>r.test(s))?!1:!n?.some(r=>r.test(s))};let Fn;const gn=u=>(Fn??=I(import.meta.url))(u),Vu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,dn=u=>{if(typeof Vu<"u"&&Vu.versions&&Vu.versions.node){const[e,t]=Vu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Vu.getBuiltinModule(u)}return gn(u)};dn("node:fs/promises");let mn;const yn=u=>(mn??=I(import.meta.url))(u),Qu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Bn=u=>{if(typeof Qu<"u"&&Qu.versions&&Qu.versions.node){const[e,t]=Qu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Qu.getBuiltinModule(u)}return yn(u)},{readdirSync:bn,realpathSync:$n,statSync:Mt}=Bn("node:fs"),vn=u=>{const e=Fe(u),t=Mt(e);return We(t,ut(e),e)};function*wn(u,e={}){const{extensions:t,followSymlinks:n=!1,includeDirs:s=!0,includeFiles:r=!0,includeSymlinks:o=!0,match:i,maxDepth:a=Number.POSITIVE_INFINITY,skip:d}=e;if(bu(u),a<0)return;const D=e.visited??new Set,m=i?i.map(C=>typeof C=="string"?ft(C):C):void 0,b=d?d.map(C=>typeof C=="string"?ft(C):C):void 0;if(u=Lu(yu(u)),s&&$e(u,t,m,b)&&(yield vn(u)),!(a<1||!$e(u,void 0,void 0,b)))try{const C=bn(u,{withFileTypes:!0});for(const f of C){let $=br(u,f.name),g=f,{name:w}=f,_=f.isDirectory(),h=f.isFile();if(f.isSymbolicLink())if(n){const F=Fe($n($));if(D.has(F))continue;$=F;const l=Mt(F);_=l.isDirectory(),h=l.isFile(),g=l,w=ut(F)}else if(o&&$e($,t,m,b)){yield We(f,f.name,Fe($));continue}else continue;_?(n&&D.add($),yield*wn($,{extensions:t,followSymlinks:n,includeDirs:s,includeFiles:r,includeSymlinks:o,match:m,maxDepth:a-1,skip:b,visited:D})):h&&r&&$e($,t,m,b)&&(yield We(g,w,Fe($)))}}catch(C){throw C instanceof pt?C:new pt(C,u)}}let xn;const Sn=u=>(xn??=I(import.meta.url))(u),Ju=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_n=u=>{if(typeof Ju<"u"&&Ju.versions&&Ju.versions.node){const[e,t]=Ju.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ju.getBuiltinModule(u)}return Sn(u)};_n("node:fs/promises");let Tn;const Rn=u=>(Tn??=I(import.meta.url))(u),Zu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,kn=u=>{if(typeof Zu<"u"&&Zu.versions&&Zu.versions.node){const[e,t]=Zu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Zu.getBuiltinModule(u)}return Rn(u)},{statSync:On,lstatSync:Nn}=kn("node:fs"),va=(u,e={})=>{if(typeof u!="string"&&!Array.isArray(u)&&typeof u!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const t=e.cwd?yu(e.cwd):process.cwd();let n=Lu(t);const{root:s}=vr(n),r=yu(e.stopAt??s),o=Lu(n,r),i=e.type??"file",a=function(D){return typeof u=="function"?[u(D)]:typeof u=="string"?[u]:Array.isArray(u)?u:[u]};e.allowSymlinks??=!0;const d=e.allowSymlinks?On:Nn;for(;n;){for(let D of a(n)){if(D===Er)return;if(D===void 0)continue;Buffer.isBuffer(D)?D=D.toString():D instanceof URL&&(D=yu(D));const m=Nu(D)?D:Lu(n,D);try{const b=d(m);if(i==="file"&&b.isFile()||i==="directory"&&b.isDirectory())return m}catch{}}if(n===o||n===s)break;n=Ye(n)}};function et(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var At={},Re,ht;function Se(){if(ht)return Re;ht=1;const u="[^\\\\/]",e=Symbol("unignore"),t="\\.",n="\\+",s="\\?",r="\\/",o="(?=.)",i="[^/]",a=`(?:${r}|$)`,d=`(?:^|${r})`,D=`${t}{1,2}${a}`,m=`(?!${t})`,b=`(?!${d}${D})`,C=`(?!${t}{0,1}${a})`,f=`(?!${D})`,$=`[^.${r}]`,g=`${i}*?`,w="/",_={DOT_LITERAL:t,PLUS_LITERAL:n,QMARK_LITERAL:s,SLASH_LITERAL:r,ONE_CHAR:o,QMARK:i,END_ANCHOR:a,DOTS_SLASH:D,NO_DOT:m,NO_DOTS:b,NO_DOT_SLASH:C,NO_DOTS_SLASH:f,QMARK_NO_DOT:$,STAR:g,START_ANCHOR:d,SEP:w},h={..._,SLASH_LITERAL:"[\\\\/]",QMARK:u,STAR:`${u}*?`,DOTS_SLASH:`${t}{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!${t})`,NO_DOTS:`(?!(?:^|[\\\\/])${t}{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!${t}{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!${t}{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"},F={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Re={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:F,UNIGNORE:e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(l){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${l.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(l){return l===!0?h:_}},Re}var Et;function _e(){return Et||(Et=1,(function(u){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:t,REGEX_SPECIAL_CHARS:n,REGEX_SPECIAL_CHARS_GLOBAL:s}=Se();u.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),u.hasRegexChars=r=>n.test(r),u.isRegexChar=r=>r.length===1&&u.hasRegexChars(r),u.escapeRegex=r=>r.replace(s,"\\$1"),u.toPosixSlashes=r=>r.replace(e,"/"),u.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const r=navigator.platform.toLowerCase();return r==="win32"||r==="windows"}return process.platform?process.platform==="win32":!1},u.removeBackslashes=r=>r.replace(t,o=>o==="\\"?"":o),u.escapeLast=(r,o,i)=>{const a=r.lastIndexOf(o,i);return a===-1?r:r[a-1]==="\\"?u.escapeLast(r,o,a-1):`${r.slice(0,a)}\\${r.slice(a)}`},u.removePrefix=(r,o={})=>{let i=r;return i.startsWith("./")&&(i=i.slice(2),o.prefix="./"),i},u.wrapOutput=(r,o={},i={})=>{const a=i.contains?"":"^",d=i.contains?"":"$";let D=`${a}(?:${r})${d}`;return o.negated===!0&&(D=`(?:^(?!${D}).*$)`),D},u.basename=(r,{windows:o}={})=>{const i=r.split(o?/[\\/]/:"/"),a=i[i.length-1];return a===""?i[i.length-2]:a}})(At)),At}var ke,Ct;function Ln(){if(Ct)return ke;Ct=1;const u=_e(),{CHAR_ASTERISK:e,CHAR_AT:t,CHAR_BACKWARD_SLASH:n,CHAR_COMMA:s,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:i,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:D,CHAR_PLUS:m,CHAR_QUESTION_MARK:b,CHAR_RIGHT_CURLY_BRACE:C,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:$}=Se(),g=_=>_===i||_===n,w=_=>{_.isPrefix!==!0&&(_.depth=_.isGlobstar?1/0:1)};return ke=(_,h)=>{const F=h||{},l=_.length-1,T=F.parts===!0||F.scanToEnd===!0,N=[],x=[],S=[];let v=_,j=-1,q=0,au=0,gu=!1,lu=!1,Z=!1,cu=!1,$u=!1,Au=!1,Du=!1,Q=!1,hu=!1,ru=!1,vu=0,nu,R,G={value:"",depth:0,isGlob:!1};const tu=()=>j>=l,A=()=>v.charCodeAt(j+1),X=()=>(nu=R,v.charCodeAt(++j));for(;j<l;){R=X();let su;if(R===n){Du=G.backslashes=!0,R=X(),R===a&&(Au=!0);continue}if(Au===!0||R===a){for(vu++;tu()!==!0&&(R=X());){if(R===n){Du=G.backslashes=!0,X();continue}if(R===a){vu++;continue}if(Au!==!0&&R===r&&(R=X())===r){if(gu=G.isBrace=!0,Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(Au!==!0&&R===s){if(gu=G.isBrace=!0,Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===C&&(vu--,vu===0)){Au=!1,gu=G.isBrace=!0,ru=!0;break}}if(T===!0)continue;break}if(R===i){if(N.push(j),x.push(G),G={value:"",depth:0,isGlob:!1},ru===!0)continue;if(nu===r&&j===q+1){q+=2;continue}au=j+1;continue}if(F.noext!==!0&&(R===m||R===t||R===e||R===b||R===o)&&A()===d){if(Z=G.isGlob=!0,cu=G.isExtglob=!0,ru=!0,R===o&&j===q&&(hu=!0),T===!0){for(;tu()!==!0&&(R=X());){if(R===n){Du=G.backslashes=!0,R=X();continue}if(R===f){Z=G.isGlob=!0,ru=!0;break}}continue}break}if(R===e){if(nu===e&&($u=G.isGlobstar=!0),Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===b){if(Z=G.isGlob=!0,ru=!0,T===!0)continue;break}if(R===D){for(;tu()!==!0&&(su=X());){if(su===n){Du=G.backslashes=!0,X();continue}if(su===$){lu=G.isBracket=!0,Z=G.isGlob=!0,ru=!0;break}}if(T===!0)continue;break}if(F.nonegate!==!0&&R===o&&j===q){Q=G.negated=!0,q++;continue}if(F.noparen!==!0&&R===d){if(Z=G.isGlob=!0,T===!0){for(;tu()!==!0&&(R=X());){if(R===d){Du=G.backslashes=!0,R=X();continue}if(R===f){ru=!0;break}}continue}break}if(Z===!0){if(ru=!0,T===!0)continue;break}}F.noext===!0&&(cu=!1,Z=!1);let U=v,wu="",c="";q>0&&(wu=v.slice(0,q),v=v.slice(q),au-=q),U&&Z===!0&&au>0?(U=v.slice(0,au),c=v.slice(au)):Z===!0?(U="",c=v):U=v,U&&U!==""&&U!=="/"&&U!==v&&g(U.charCodeAt(U.length-1))&&(U=U.slice(0,-1)),F.unescape===!0&&(c&&(c=u.removeBackslashes(c)),U&&Du===!0&&(U=u.removeBackslashes(U)));const p={prefix:wu,input:_,start:q,base:U,glob:c,isBrace:gu,isBracket:lu,isGlob:Z,isExtglob:cu,isGlobstar:$u,negated:Q,negatedExtglob:hu};if(F.tokens===!0&&(p.maxDepth=0,g(R)||x.push(G),p.tokens=x),F.parts===!0||F.tokens===!0){let su;for(let M=0;M<N.length;M++){const pu=su?su+1:q,Eu=N[M],iu=_.slice(pu,Eu);F.tokens&&(M===0&&q!==0?(x[M].isPrefix=!0,x[M].value=wu):x[M].value=iu,w(x[M]),p.maxDepth+=x[M].depth),(M!==0||iu!=="")&&S.push(iu),su=Eu}if(su&&su+1<_.length){const M=_.slice(su+1);S.push(M),F.tokens&&(x[x.length-1].value=M,w(x[x.length-1]),p.maxDepth+=x[x.length-1].depth)}p.slashes=N,p.parts=S}return p},ke}var Oe,Ft;function Pn(){if(Ft)return Oe;Ft=1;const u=Se(),e=_e(),{MAX_LENGTH:t,POSIX_REGEX_SOURCE:n,REGEX_NON_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=u,i=(h,F)=>typeof F.expandRange=="function"?F.expandRange(...h,F):(h.sort(),`[${h.join("-")}]`),a=(h,F)=>`Missing ${h}: "${F}" - use "\\\\${F}" to match literal characters`,d=h=>{const F=[];let l=0,T=0,N=0,x="",S=!1;for(const v of h){if(S===!0){x+=v,S=!1;continue}if(v==="\\"){x+=v,S=!0;continue}if(v==='"'){N=N===1?0:1,x+=v;continue}if(N===0){if(v==="[")l++;else if(v==="]"&&l>0)l--;else if(l===0){if(v==="(")T++;else if(v===")"&&T>0)T--;else if(v==="|"&&T===0){F.push(x),x="";continue}}}x+=v}return F.push(x),F},D=h=>{let F=!1;for(const l of h){if(F===!0){F=!1;continue}if(l==="\\"){F=!0;continue}if(/[?*+@!()[\]{}]/.test(l))return!1}return!0},m=h=>{let F=h.trim(),l=!0;for(;l===!0;)l=!1,/^@\([^\\()[\]{}|]+\)$/.test(F)&&(F=F.slice(2,-1),l=!0);if(D(F))return F.replace(/\\(.)/g,"$1")},b=h=>{const F=h.map(m).filter(Boolean);for(let l=0;l<F.length;l++)for(let T=l+1;T<F.length;T++){const N=F[l],x=F[T],S=N[0];if(!(!S||N!==S.repeat(N.length)||x!==S.repeat(x.length))&&(N===x||N.startsWith(x)||x.startsWith(N)))return!0}return!1},C=(h,F=!0)=>{if(h[0]!=="+"&&h[0]!=="*"||h[1]!=="(")return;let l=0,T=0,N=0,x=!1;for(let S=1;S<h.length;S++){const v=h[S];if(x===!0){x=!1;continue}if(v==="\\"){x=!0;continue}if(v==='"'){N=N===1?0:1;continue}if(N!==1){if(v==="["){l++;continue}if(v==="]"&&l>0){l--;continue}if(!(l>0)){if(v==="("){T++;continue}if(v===")"&&(T--,T===0))return F===!0&&S!==h.length-1?void 0:{type:h[0],body:h.slice(2,S),end:S}}}}},f=h=>`${h.length===1?e.escapeRegex(h[0]):`[${h.map(F=>e.escapeRegex(F)).join("")}]`}*`,$=h=>{let F=0;const l=[];for(;F<h.length;){const T=C(h.slice(F),!1);if(!T||T.type!=="*")return;const N=d(T.body).map(S=>S.trim());if(N.length!==1)return;const x=m(N[0]);if(!x||x.length!==1)return;l.push(x),F+=T.end+1}if(!(l.length<1))return l},g=h=>{let F=0,l=h.trim(),T=C(l);for(;T;)F++,l=T.body.trim(),T=C(l);return F},w=(h,F)=>{if(F.maxExtglobRecursion===!1)return{risky:!1};const l=typeof F.maxExtglobRecursion=="number"?F.maxExtglobRecursion:u.DEFAULT_MAX_EXTGLOB_RECURSION,T=d(h).map(v=>v.trim());if(T.length>1&&(T.some(v=>v==="")||T.some(v=>/^[*?]+$/.test(v))||b(T)))return{risky:!0};const N=[];let x=!1,S=!0;for(const v of T){const j=$(v);if(j){x=!0,N.push(...j);continue}const q=m(v);if(q&&q.length===1){N.push(q);continue}if(S=!1,g(v)>l)return{risky:!0}}return x?S?{risky:!0,safeOutput:f([...new Set(N)])}:{risky:!0}:{risky:!1}},_=(h,F)=>{if(typeof h!="string")throw new TypeError("Expected a string");h=o[h]||h;const l={...F},T=typeof l.maxLength=="number"?Math.min(t,l.maxLength):t;let N=h.length;if(N>T)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${T}`);const x={type:"bos",value:"",output:l.prepend||""},S=[x],v=l.capture?"":"?:",j=u.globChars(l.windows),q=u.extglobChars(j),{DOT_LITERAL:au,PLUS_LITERAL:gu,SLASH_LITERAL:lu,ONE_CHAR:Z,DOTS_SLASH:cu,NO_DOT:$u,NO_DOT_SLASH:Au,NO_DOTS_SLASH:Du,QMARK:Q,QMARK_NO_DOT:hu,STAR:ru,START_ANCHOR:vu}=j,nu=B=>`(${v}(?:(?!${vu}${B.dot?cu:au}).)*?)`,R=l.dot?"":$u,G=l.dot?Q:hu;let tu=l.bash===!0?nu(l):ru;l.capture&&(tu=`(${tu})`),typeof l.noext=="boolean"&&(l.noextglob=l.noext);const A={input:h,index:-1,start:0,dot:l.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};h=e.removePrefix(h,A),N=h.length;const X=[],U=[],wu=[];let c=x,p;const su=()=>A.index===N-1,M=A.peek=(B=1)=>h[A.index+B],pu=A.advance=()=>h[++A.index]||"",Eu=()=>h.slice(A.index+1),iu=(B="",K=0)=>{A.consumed+=B,A.index+=K},ye=B=>{A.output+=B.output!=null?B.output:B.value,iu(B.value)},lr=()=>{let B=1;for(;M()==="!"&&(M(2)!=="("||M(3)==="?");)pu(),A.start++,B++;return B%2===0?!1:(A.negated=!0,A.start++,!0)},Be=B=>{A[B]++,wu.push(B)},xu=B=>{A[B]--,wu.pop()},L=B=>{if(c.type==="globstar"){const K=A.braces>0&&(B.type==="comma"||B.type==="brace"),y=B.extglob===!0||X.length&&(B.type==="pipe"||B.type==="paren");B.type!=="slash"&&B.type!=="paren"&&!K&&!y&&(A.output=A.output.slice(0,-c.output.length),c.type="star",c.value="*",c.output=tu,A.output+=c.output)}if(X.length&&B.type!=="paren"&&(X[X.length-1].inner+=B.value),(B.value||B.output)&&ye(B),c&&c.type==="text"&&B.type==="text"){c.output=(c.output||c.value)+B.value,c.value+=B.value;return}B.prev=c,S.push(B),c=B},be=(B,K)=>{const y={...q[K],conditions:1,inner:""};y.prev=c,y.parens=A.parens,y.output=A.output,y.startIndex=A.index,y.tokensIndex=S.length;const P=(l.capture?"(":"")+y.open;Be("parens"),L({type:B,value:K,output:A.output?"":Z}),L({type:"paren",extglob:!0,value:pu(),output:P}),X.push(y)},cr=B=>{const K=h.slice(B.startIndex,A.index+1),y=h.slice(B.startIndex+2,A.index),P=w(y,l);if((B.type==="plus"||B.type==="star")&&P.risky){const z=P.safeOutput?(B.output?"":Z)+(l.capture?`(${P.safeOutput})`:P.safeOutput):void 0,Cu=S[B.tokensIndex];Cu.type="text",Cu.value=K,Cu.output=z||e.escapeRegex(K);for(let Fu=B.tokensIndex+1;Fu<S.length;Fu++)S[Fu].value="",S[Fu].output="",delete S[Fu].suffix;A.output=B.output+Cu.output,A.backtrack=!0,L({type:"paren",extglob:!0,value:p,output:""}),xu("parens");return}let J=B.close+(l.capture?")":""),uu;if(B.type==="negate"){let z=tu;if(B.inner&&B.inner.length>1&&B.inner.includes("/")&&(z=nu(l)),(z!==tu||su()||/^\)+$/.test(Eu()))&&(J=B.close=`)$))${z}`),B.inner.includes("*")&&(uu=Eu())&&/^\.[^\\/.]+$/.test(uu)){const Cu=_(uu,{...F,fastpaths:!1}).output;J=B.close=`)${Cu})${z})`}B.prev.type==="bos"&&(A.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:p,output:J}),xu("parens")};if(l.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(h)){let B=!1,K=h.replace(r,(y,P,J,uu,z,Cu)=>uu==="\\"?(B=!0,y):uu==="?"?P?P+uu+(z?Q.repeat(z.length):""):Cu===0?G+(z?Q.repeat(z.length):""):Q.repeat(J.length):uu==="."?au.repeat(J.length):uu==="*"?P?P+uu+(z?tu:""):tu:P?y:`\\${y}`);return B===!0&&(l.unescape===!0?K=K.replace(/\\/g,""):K=K.replace(/\\+/g,y=>y.length%2===0?"\\\\":y?"\\":"")),K===h&&l.contains===!0?(A.output=h,A):(A.output=e.wrapOutput(K,A,F),A)}for(;!su();){if(p=pu(),p==="\0")continue;if(p==="\\"){const y=M();if(y==="/"&&l.bash!==!0||y==="."||y===";")continue;if(!y){p+="\\",L({type:"text",value:p});continue}const P=/^\\+/.exec(Eu());let J=0;if(P&&P[0].length>2&&(J=P[0].length,A.index+=J,J%2!==0&&(p+="\\")),l.unescape===!0?p=pu():p+=pu(),A.brackets===0){L({type:"text",value:p});continue}}if(A.brackets>0&&(p!=="]"||c.value==="["||c.value==="[^")){if(l.posix!==!1&&p===":"){const y=c.value.slice(1);if(y.includes("[")&&(c.posix=!0,y.includes(":"))){const P=c.value.lastIndexOf("["),J=c.value.slice(0,P),uu=c.value.slice(P+2),z=n[uu];if(z){c.value=J+z,A.backtrack=!0,pu(),!x.output&&S.indexOf(c)===1&&(x.output=Z);continue}}}(p==="["&&M()!==":"||p==="-"&&M()==="]")&&(p=`\\${p}`),p==="]"&&(c.value==="["||c.value==="[^")&&(p=`\\${p}`),l.posix===!0&&p==="!"&&c.value==="["&&(p="^"),c.value+=p,ye({value:p});continue}if(A.quotes===1&&p!=='"'){p=e.escapeRegex(p),c.value+=p,ye({value:p});continue}if(p==='"'){A.quotes=A.quotes===1?0:1,l.keepQuotes===!0&&L({type:"text",value:p});continue}if(p==="("){Be("parens"),L({type:"paren",value:p});continue}if(p===")"){if(A.parens===0&&l.strictBrackets===!0)throw new SyntaxError(a("opening","("));const y=X[X.length-1];if(y&&A.parens===y.parens+1){cr(X.pop());continue}L({type:"paren",value:p,output:A.parens?")":"\\)"}),xu("parens");continue}if(p==="["){if(l.nobracket===!0||!Eu().includes("]")){if(l.nobracket!==!0&&l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));p=`\\${p}`}else Be("brackets");L({type:"bracket",value:p});continue}if(p==="]"){if(l.nobracket===!0||c&&c.type==="bracket"&&c.value.length===1){L({type:"text",value:p,output:`\\${p}`});continue}if(A.brackets===0){if(l.strictBrackets===!0)throw new SyntaxError(a("opening","["));L({type:"text",value:p,output:`\\${p}`});continue}xu("brackets");const y=c.value.slice(1);if(c.posix!==!0&&y[0]==="^"&&!y.includes("/")&&(p=`/${p}`),c.value+=p,ye({value:p}),l.literalBrackets===!1||e.hasRegexChars(y))continue;const P=e.escapeRegex(c.value);if(A.output=A.output.slice(0,-c.value.length),l.literalBrackets===!0){A.output+=P,c.value=P;continue}c.value=`(${v}${P}|${c.value})`,A.output+=c.value;continue}if(p==="{"&&l.nobrace!==!0){Be("braces");const y={type:"brace",value:p,output:"(",outputIndex:A.output.length,tokensIndex:A.tokens.length};U.push(y),L(y);continue}if(p==="}"){const y=U[U.length-1];if(l.nobrace===!0||!y){L({type:"text",value:p,output:p});continue}let P=")";if(y.dots===!0){const J=S.slice(),uu=[];for(let z=J.length-1;z>=0&&(S.pop(),J[z].type!=="brace");z--)J[z].type!=="dots"&&uu.unshift(J[z].value);P=i(uu,l),A.backtrack=!0}if(y.comma!==!0&&y.dots!==!0){const J=A.output.slice(0,y.outputIndex),uu=A.tokens.slice(y.tokensIndex);y.value=y.output="\\{",p=P="\\}",A.output=J;for(const z of uu)A.output+=z.output||z.value}L({type:"brace",value:p,output:P}),xu("braces"),U.pop();continue}if(p==="|"){X.length>0&&X[X.length-1].conditions++,L({type:"text",value:p});continue}if(p===","){let y=p;const P=U[U.length-1];P&&wu[wu.length-1]==="braces"&&(P.comma=!0,y="|"),L({type:"comma",value:p,output:y});continue}if(p==="/"){if(c.type==="dot"&&A.index===A.start+1){A.start=A.index+1,A.consumed="",A.output="",S.pop(),c=x;continue}L({type:"slash",value:p,output:lu});continue}if(p==="."){if(A.braces>0&&c.type==="dot"){c.value==="."&&(c.output=au);const y=U[U.length-1];c.type="dots",c.output+=p,c.value+=p,y.dots=!0;continue}if(A.braces+A.parens===0&&c.type!=="bos"&&c.type!=="slash"){L({type:"text",value:p,output:au});continue}L({type:"dot",value:p,output:au});continue}if(p==="?"){if(!(c&&c.value==="(")&&l.noextglob!==!0&&M()==="("&&M(2)!=="?"){be("qmark",p);continue}if(c&&c.type==="paren"){const y=M();let P=p;(c.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(Eu()))&&(P=`\\${p}`),L({type:"text",value:p,output:P});continue}if(l.dot!==!0&&(c.type==="slash"||c.type==="bos")){L({type:"qmark",value:p,output:hu});continue}L({type:"qmark",value:p,output:Q});continue}if(p==="!"){if(l.noextglob!==!0&&M()==="("&&(M(2)!=="?"||!/[!=<:]/.test(M(3)))){be("negate",p);continue}if(l.nonegate!==!0&&A.index===0){lr();continue}}if(p==="+"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){be("plus",p);continue}if(c&&c.value==="("||l.regex===!1){L({type:"plus",value:p,output:gu});continue}if(c&&(c.type==="bracket"||c.type==="paren"||c.type==="brace")||A.parens>0){L({type:"plus",value:p});continue}L({type:"plus",value:gu});continue}if(p==="@"){if(l.noextglob!==!0&&M()==="("&&M(2)!=="?"){L({type:"at",extglob:!0,value:p,output:""});continue}L({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const y=s.exec(Eu());y&&(p+=y[0],A.index+=y[0].length),L({type:"text",value:p});continue}if(c&&(c.type==="globstar"||c.star===!0)){c.type="star",c.star=!0,c.value+=p,c.output=tu,A.backtrack=!0,A.globstar=!0,iu(p);continue}let B=Eu();if(l.noextglob!==!0&&/^\([^?]/.test(B)){be("star",p);continue}if(c.type==="star"){if(l.noglobstar===!0){iu(p);continue}const y=c.prev,P=y.prev,J=y.type==="slash"||y.type==="bos",uu=P&&(P.type==="star"||P.type==="globstar");if(l.bash===!0&&(!J||B[0]&&B[0]!=="/")){L({type:"star",value:p,output:""});continue}const z=A.braces>0&&(y.type==="comma"||y.type==="brace"),Cu=X.length&&(y.type==="pipe"||y.type==="paren");if(!J&&y.type!=="paren"&&!z&&!Cu){L({type:"star",value:p,output:""});continue}for(;B.slice(0,3)==="/**";){const Fu=h[A.index+4];if(Fu&&Fu!=="/")break;B=B.slice(3),iu("/**",3)}if(y.type==="bos"&&su()){c.type="globstar",c.value+=p,c.output=nu(l),A.output=c.output,A.globstar=!0,iu(p);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&!uu&&su()){A.output=A.output.slice(0,-(y.output+c.output).length),y.output=`(?:${y.output}`,c.type="globstar",c.output=nu(l)+(l.strictSlashes?")":"|$)"),c.value+=p,A.globstar=!0,A.output+=y.output+c.output,iu(p);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&B[0]==="/"){const Fu=B[1]!==void 0?"|$":"";A.output=A.output.slice(0,-(y.output+c.output).length),y.output=`(?:${y.output}`,c.type="globstar",c.output=`${nu(l)}${lu}|${lu}${Fu})`,c.value+=p,A.output+=y.output+c.output,A.globstar=!0,iu(p+pu()),L({type:"slash",value:"/",output:""});continue}if(y.type==="bos"&&B[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${lu}|${nu(l)}${lu})`,A.output=c.output,A.globstar=!0,iu(p+pu()),L({type:"slash",value:"/",output:""});continue}if(z&&B[0]==="/"){c.type="globstar",c.value+=p,c.output=`(?:^|${lu}|${nu(l)}${lu})`,A.output+=c.output,A.globstar=!0,iu(p+pu()),L({type:"slash",value:"/",output:""});continue}A.output=A.output.slice(0,-c.output.length),c.type="globstar",c.output=nu(l),c.value+=p,A.output+=c.output,A.globstar=!0,iu(p);continue}const K={type:"star",value:p,output:tu};if(l.bash===!0){K.output=".*?",(c.type==="bos"||c.type==="slash")&&(K.output=R+K.output),L(K);continue}if(c&&(c.type==="bracket"||c.type==="paren")&&l.regex===!0){K.output=p,L(K);continue}(A.index===A.start||c.type==="slash"||c.type==="dot")&&(c.type==="dot"?(A.output+=Au,c.output+=Au):l.dot===!0?(A.output+=Du,c.output+=Du):(A.output+=R,c.output+=R),M()!=="*"&&(A.output+=Z,c.output+=Z)),L(K)}for(;A.brackets>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","]"));A.output=e.escapeLast(A.output,"["),xu("brackets")}for(;A.parens>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing",")"));A.output=e.escapeLast(A.output,"("),xu("parens")}for(;A.braces>0;){if(l.strictBrackets===!0)throw new SyntaxError(a("closing","}"));A.output=e.escapeLast(A.output,"{"),xu("braces")}if(l.strictSlashes!==!0&&(c.type==="star"||c.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${lu}?`}),A.backtrack===!0){A.output="";for(const B of A.tokens)A.output+=B.output!=null?B.output:B.value,B.suffix&&(A.output+=B.suffix)}return A};return _.fastpaths=(h,F)=>{const l={...F},T=typeof l.maxLength=="number"?Math.min(t,l.maxLength):t,N=h.length;if(N>T)throw new SyntaxError(`Input length: ${N}, exceeds maximum allowed length: ${T}`);h=o[h]||h;const{DOT_LITERAL:x,SLASH_LITERAL:S,ONE_CHAR:v,DOTS_SLASH:j,NO_DOT:q,NO_DOTS:au,NO_DOTS_SLASH:gu,STAR:lu,START_ANCHOR:Z}=u.globChars(l.windows),cu=l.dot?au:q,$u=l.dot?gu:q,Au=l.capture?"":"?:",Du={negated:!1,prefix:""};let Q=l.bash===!0?".*?":lu;l.capture&&(Q=`(${Q})`);const hu=R=>R.noglobstar===!0?Q:`(${Au}(?:(?!${Z}${R.dot?j:x}).)*?)`,ru=R=>{switch(R){case"*":return`${cu}${v}${Q}`;case".*":return`${x}${v}${Q}`;case"*.*":return`${cu}${Q}${x}${v}${Q}`;case"*/*":return`${cu}${Q}${S}${v}${$u}${Q}`;case"**":return cu+hu(l);case"**/*":return`(?:${cu}${hu(l)}${S})?${$u}${v}${Q}`;case"**/*.*":return`(?:${cu}${hu(l)}${S})?${$u}${Q}${x}${v}${Q}`;case"**/.*":return`(?:${cu}${hu(l)}${S})?${x}${v}${Q}`;default:{const G=/^(.*?)\.(\w+)$/.exec(R);if(!G)return;const tu=ru(G[1]);return tu?tu+x+G[2]:void 0}}},vu=e.removePrefix(h,Du);let nu=ru(vu);return nu&&l.strictSlashes!==!0&&(nu+=`${S}?`),nu},Oe=_,Oe}var Ne,gt;function Hn(){if(gt)return Ne;gt=1;const u=Ln(),e=Pn(),t=_e(),n=Se(),s=o=>o&&typeof o=="object"&&!Array.isArray(o),r=(o,i,a=!1)=>{if(Array.isArray(o)){const g=o.map(w=>r(w,i,a));return w=>{for(const _ of g){const h=_(w);if(h)return h}return!1}}const d=s(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!d)throw new TypeError("Expected pattern to be a non-empty string");const D=i||{},m=D.windows,b=d?r.compileRe(o,i):r.makeRe(o,i,!1,!0),C=b.state;delete b.state;let f=()=>!1;if(D.ignore){const g={...i,ignore:null,onMatch:null,onResult:null};f=r(D.ignore,g,a)}const $=(g,w=!1)=>{const{isMatch:_,match:h,output:F}=r.test(g,b,i,{glob:o,posix:m}),l={glob:o,state:C,regex:b,posix:m,input:g,output:F,match:h,isMatch:_};if(typeof D.onResult=="function"&&D.onResult(l),_===!1)return l.isMatch=!1,w?l:!1;u:if(f(g)){if(typeof D.onIgnore=="function"&&D.onIgnore(l)===n.UNIGNORE){l.isMatch=!0;break u}return l.isMatch=!1,w?l:!1}return typeof D.onMatch=="function"&&D.onMatch(l),w?l:!0};return a&&($.state=C),$};return r.test=(o,i,a,{glob:d,posix:D}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const m=a||{},b=m.format||(D?t.toPosixSlashes:null);let C=o===d,f=C&&b?b(o):o;return C===!1&&(f=b?b(o):o,C=f===d),(C===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?C=r.matchBase(o,i,a,D):C=i.exec(f)),{isMatch:!!C,match:C,output:f}},r.matchBase=(o,i,a,d=a&&a.windows)=>(i instanceof RegExp?i:r.makeRe(i,a)).test(t.basename(o,{windows:d})),r.isMatch=(o,i,a)=>r(i,a)(o),r.parse=(o,i)=>Array.isArray(o)?o.map(a=>r.parse(a,i)):e(o,{...i,fastpaths:!1}),r.scan=(o,i)=>u(o,i),r.compileRe=(o,i,a=!1,d=!1)=>{if(a===!0)return o.output;const D=i||{},m=D.contains?"":"^",b=D.contains?"":"$";let C=`${m}(?:${o.output})${b}`;o&&o.negated===!0&&(C=`^(?!${C}).*$`);const f=r.toRegex(C,i);return d===!0&&(f.state=o),f},r.makeRe=(o,i={},a=!1,d=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let D={negated:!1,fastpaths:!0};return i.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(D.output=e.fastpaths(o,i)),D.output||(D=e(o,i)),r.compileRe(D,i,a,d)},r.toRegex=(o,i)=>{try{const a=i||{};return new RegExp(o,a.flags||(a.nocase?"i":""))}catch(a){if(i&&i.debug===!0)throw a;return/$^/}},r.constants=n,Ne=r,Ne}var Le,dt;function In(){if(dt)return Le;dt=1;const u=Hn(),e=_e();function t(n,s,r=!1){return s&&(s.windows===null||s.windows===void 0)&&(s={...s,windows:e.isWindows()}),u(n,s,r)}return Object.assign(t,u),Le=t,Le}var Mn=In();const ku=et(Mn);let jn;const Gn=u=>(jn??=I(import.meta.url))(u),Yu=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,de=u=>{if(typeof Yu<"u"&&Yu.versions&&Yu.versions.node){const[e,t]=Yu.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Yu.getBuiltinModule(u)}return Gn(u)},mt=de("fs"),zn={...mt,default:mt},{statSync:Un,stat:Wn,realpathSync:qn,realpath:Xn,readdirSync:Kn,readdir:Vn}=de("fs"),{sep:jt,basename:Qn,dirname:qe,resolve:Gt,normalize:Jn,relative:Zn,posix:Ou,isAbsolute:Yn}=de("path"),{fileURLToPath:us}=de("url"),{createRequire:es}=de("module");var yt=es(import.meta.url);function ts(u){let e=Jn(u);return e.length>1&&e[e.length-1]===jt&&(e=e.substring(0,e.length-1)),e}const rs=/[\\/]/g;function zt(u,e){return u.replace(rs,e)}const ns=/^[a-z]:[\\/]$/i;function ss(u){return u==="/"||ns.test(u)}function Pe(u,e){const{resolvePaths:t,normalizePath:n,pathSeparator:s}=e,r=process.platform==="win32"&&u.includes("/")||u.startsWith(".");if(t&&(u=Gt(u)),(n||r)&&(u=ts(u)),u===".")return"";const o=u[u.length-1]!==s;return zt(o?u+s:u,s)}function Ut(u,e){return e+u}function os(u,e){return function(t,n){return n.startsWith(u)?n.slice(u.length)+t:zt(Zn(u,n),e.pathSeparator)+e.pathSeparator+t}}function is(u){return u}function as(u,e,t){return e+u+t}function ls(u,e){const{relativePaths:t,includeBasePath:n}=e;return t&&u?os(u,e):n?Ut:is}function cs(u){return function(e,t){t.push(e.substring(u.length)||".")}}function Ds(u){return function(e,t,n){const s=e.substring(u.length)||".";n.every(r=>r(s,!0))&&t.push(s)}}const ps=(u,e)=>{e.push(u||".")},fs=(u,e,t)=>{const n=u||".";t.every(s=>s(n,!0))&&e.push(n)},As=()=>{};function hs(u,e){const{includeDirs:t,filters:n,relativePaths:s}=e;return t?s?n&&n.length?Ds(u):cs(u):n&&n.length?fs:ps:As}const Es=(u,e,t,n)=>{n.every(s=>s(u,!1))&&t.files++},Cs=(u,e,t,n)=>{n.every(s=>s(u,!1))&&e.push(u)},Fs=(u,e,t,n)=>{t.files++},gs=(u,e)=>{e.push(u)},ds=()=>{};function ms(u){const{excludeFiles:e,filters:t,onlyCounts:n}=u;return e?ds:t&&t.length?n?Es:Cs:n?Fs:gs}const ys=u=>u,Bs=()=>[""].slice(0,0);function bs(u){return u.group?Bs:ys}const $s=(u,e,t)=>{u.push({directory:e,files:t,dir:e})},vs=()=>{};function ws(u){return u.group?$s:vs}const xs=function(u,e,t){const{queue:n,fs:s,options:{suppressErrors:r}}=e;n.enqueue(),s.realpath(u,(o,i)=>{if(o)return n.dequeue(r?null:o,e);s.stat(i,(a,d)=>{if(a)return n.dequeue(r?null:a,e);if(d.isDirectory()&&Wt(u,i,e))return n.dequeue(null,e);t(d,i),n.dequeue(null,e)})})},Ss=function(u,e,t){const{queue:n,fs:s,options:{suppressErrors:r}}=e;n.enqueue();try{const o=s.realpathSync(u),i=s.statSync(o);if(i.isDirectory()&&Wt(u,o,e))return;t(i,o)}catch(o){if(!r)throw o}};function _s(u,e){return!u.resolveSymlinks||u.excludeSymlinks?null:e?Ss:xs}function Wt(u,e,t){if(t.options.useRealPaths)return Ts(e,t);let n=qe(u),s=1;for(;n!==t.root&&s<2;){const r=t.symlinks.get(n);r&&(r===e||r.startsWith(e)||e.startsWith(r))?s++:n=qe(n)}return t.symlinks.set(u,e),s>1}function Ts(u,e){return e.visited.includes(u+e.options.pathSeparator)}const Rs=u=>u.counts,ks=u=>u.groups,Os=u=>u.paths,Ns=u=>u.paths.slice(0,u.options.maxFiles),Ls=(u,e,t)=>(Te(e,t,u.counts,u.options.suppressErrors),null),Ps=(u,e,t)=>(Te(e,t,u.paths,u.options.suppressErrors),null),Hs=(u,e,t)=>(Te(e,t,u.paths.slice(0,u.options.maxFiles),u.options.suppressErrors),null),Is=(u,e,t)=>(Te(e,t,u.groups,u.options.suppressErrors),null);function Te(u,e,t,n){e(u&&!n?u:null,t)}function Ms(u,e){const{onlyCounts:t,group:n,maxFiles:s}=u;return t?e?Rs:Ls:n?e?ks:Is:s?e?Ns:Hs:e?Os:Ps}const qt={withFileTypes:!0},js=(u,e,t,n,s)=>{if(u.queue.enqueue(),n<0)return u.queue.dequeue(null,u);const{fs:r}=u;u.visited.push(e),u.counts.directories++,r.readdir(e||".",qt,(o,i=[])=>{s(i,t,n),u.queue.dequeue(u.options.suppressErrors?null:o,u)})},Gs=(u,e,t,n,s)=>{const{fs:r}=u;if(n<0)return;u.visited.push(e),u.counts.directories++;let o=[];try{o=r.readdirSync(e||".",qt)}catch(i){if(!u.options.suppressErrors)throw i}s(o,t,n)};function zs(u){return u?Gs:js}var Us=class{count=0;constructor(u){this.onQueueEmpty=u}enqueue(){return this.count++,this.count}dequeue(u,e){this.onQueueEmpty&&(--this.count<=0||u)&&(this.onQueueEmpty(u,e),u&&(e.controller.abort(),this.onQueueEmpty=void 0))}},Ws=class{_files=0;_directories=0;set files(u){this._files=u}get files(){return this._files}set directories(u){this._directories=u}get directories(){return this._directories}get dirs(){return this._directories}},qs=class{aborted=!1;abort(){this.aborted=!0}},Xt=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=Ms(t,this.isSynchronous),this.root=Pe(e,t),this.state={root:ss(this.root)?this.root:this.root.slice(0,-1),paths:[""].slice(0,0),groups:[],counts:new Ws,options:t,queue:new Us((s,r)=>this.callbackInvoker(r,s,n)),symlinks:new Map,visited:[""].slice(0,0),controller:new qs,fs:t.fs||zn},this.joinPath=ls(this.root,t),this.pushDirectory=hs(this.root,t),this.pushFile=ms(t),this.getArray=bs(t),this.groupFiles=ws(t),this.resolveSymlink=_s(t,this.isSynchronous),this.walkDirectory=zs(this.isSynchronous)}start(){return this.pushDirectory(this.root,this.state.paths,this.state.options.filters),this.walkDirectory(this.state,this.root,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{const{paths:s,options:{filters:r,resolveSymlinks:o,excludeSymlinks:i,exclude:a,maxFiles:d,signal:D,useRealPaths:m,pathSeparator:b},controller:C}=this.state;if(C.aborted||D&&D.aborted||d&&s.length>d)return;const f=this.getArray(this.state.paths);for(let $=0;$<e.length;++$){const g=e[$];if(g.isFile()||g.isSymbolicLink()&&!o&&!i){const w=this.joinPath(g.name,t);this.pushFile(w,f,this.state.counts,r)}else if(g.isDirectory()){let w=as(g.name,t,this.state.options.pathSeparator);if(a&&a(g.name,w))continue;this.pushDirectory(w,s,r),this.walkDirectory(this.state,w,w,n-1,this.walk)}else if(this.resolveSymlink&&g.isSymbolicLink()){let w=Ut(g.name,t);this.resolveSymlink(w,this.state,(_,h)=>{if(_.isDirectory()){if(h=Pe(h,this.state.options),a&&a(g.name,m?h:w+b))return;this.walkDirectory(this.state,h,m?h:w+b,n-1,this.walk)}else{h=m?h:w;const F=Qn(h),l=Pe(qe(h),this.state.options);h=this.joinPath(F,l),this.pushFile(h,f,this.state.counts,r)}})}}this.groupFiles(this.state.groups,t,f)}};function Xs(u,e){return new Promise((t,n)=>{Kt(u,e,(s,r)=>{if(s)return n(s);t(r)})})}function Kt(u,e,t){new Xt(u,e,t).start()}function Ks(u,e){return new Xt(u,e).start()}var Bt=class{constructor(e,t){this.root=e,this.options=t}withPromise(){return Xs(this.root,this.options)}withCallback(e){Kt(this.root,this.options,e)}sync(){return Ks(this.root,this.options)}};let Vt=null;try{yt.resolve("picomatch"),Vt=yt("picomatch")}catch{}var Vs=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:jt,filters:[]};globFunction;constructor(u){this.options={...this.options,...u},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(u){return this.options.pathSeparator=u,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(u){return this.options.maxDepth=u,this}withMaxFiles(u){return this.options.maxFiles=u,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:u=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=u,this.withFullPaths()}withAbortSignal(u){return this.options.signal=u,this}normalize(){return this.options.normalizePath=!0,this}filter(u){return this.options.filters.push(u),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(u){return this.options.exclude=u,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(u){return new Bt(u||".",this.options)}withGlobFunction(u){return this.globFunction=u,this}crawlWithOptions(u,e){return this.options={...this.options,...e},new Bt(u||".",this.options)}glob(...u){return this.globFunction?this.globWithOptions(u):this.globWithOptions(u,{dot:!0})}globWithOptions(u,...e){const t=this.globFunction||Vt;if(!t)throw new Error("Please specify a glob function to use glob matching.");var n=this.globCache[u.join("\0")];return n||(n=t(u,...e),this.globCache[u.join("\0")]=n),this.options.filters.push(s=>n(s)),this}};const Qs=Array.isArray,Qt=/\\/g,Js=/^[A-Za-z]:$/,Jt=process.platform==="win32",Zs=/^(\/?\.\.)+$/;function bt(u,e={}){const t=u.length,n=Array(t),s=Array(t);let r,o;for(r=0;r<t;r++){const i=Zt(u[r]);n[r]=i;const a=i.length,d=Array(a);for(o=0;o<a;o++)d[o]=ku(i[o],e);s[r]=d}return i=>{const a=i.split("/");if(a[0]===".."&&Zs.test(i))return!0;for(r=0;r<t;r++){const d=n[r],D=s[r],m=a.length,b=Math.min(m,d.length);for(o=0;o<b;){const C=d[o];if(C.includes("/"))return!0;if(!D[o](a[o]))break;if(!e.noglobstar&&C==="**")return!0;o++}if(o===m)return!0}return!1}}const Ys=/^[A-Z]:\/$/i,uo=Jt?u=>Ys.test(u):u=>u==="/";function $t(u,e,t){if(u===e||e.startsWith(`${u}/`)){if(t){const s=u.length+ +!uo(u);return(r,o)=>r.slice(s,o?-1:void 0)||"."}const n=e.slice(u.length+1);return n?(s,r)=>{if(s===".")return n;const o=`${n}/${s}`;return r?o.slice(0,-1):o}:(s,r)=>r&&s!=="."?s.slice(0,-1):s}return t?n=>Ou.relative(u,n)||".":n=>Ou.relative(u,`${e}/${n}`)||"."}function eo(u,e){if(e.startsWith(`${u}/`)){const t=e.slice(u.length+1);return n=>`${t}/${n}`}return t=>{const n=Ou.relative(u,`${e}/${t}`);return t[t.length-1]==="/"&&n!==""?`${n}/`:n||"."}}function vt(u){return u.replace(Js,e=>`${e}/`)}const to={parts:!0};function Zt(u){var e;const t=ku.scan(u,to);return!((e=t.parts)===null||e===void 0)&&e.length?t.parts:[u]}const ro=/(?<!\\)([()[\]{}*?|]|^!|[!+@](?=\()|\\(?![()[\]{}!*+?@|]))/g,no=/(?<!\\)([()[\]{}]|^!|[!+@](?=\())/g,so=u=>u.replace(ro,"\\$&"),oo=u=>u.replace(no,"\\$&"),io=Jt?oo:so;function ao(u,e){const t=ku.scan(u);return t.isGlob||t.negated}function Ee(...u){console.log(`[tinyglobby ${new Date().toLocaleTimeString("es")}]`,...u)}function Yt(u){return typeof u=="string"?[u]:u??[]}const lo=/^(\/?\.\.)+/,co=/\\(?=[()[\]{}!*+?@|])/g;function He(u,e,t,n){var s;const r=e.cwd;let o=u;u[u.length-1]==="/"&&(o=u.slice(0,-1));const i=o.lastIndexOf("/"),a=(i===-1?o:o.slice(i+1)).startsWith("!(");o[o.length-1]!=="*"&&!a&&e.expandDirectories&&(o+="/**");const d=io(r);o=Yn(o.replace(co,""))?Ou.relative(d,o):Ou.normalize(o);const D=(s=lo.exec(o))===null||s===void 0?void 0:s[0],m=Zt(o);if(D){const C=(D.length+1)/3;let f=0;const $=d.split("/");for(;f<C&&m[f+C]===$[$.length+f-C];)o=o.slice(0,(C-f-1)*3)+o.slice((C-f)*3+m[f+C].length+1)||".",f++;const g=Ou.join(r,D.slice(f*3));g[0]!=="."&&t.root.length>g.length&&(t.root=vt(g),t.depthOffset=-C+f)}if(!n&&t.depthOffset>=0){var b;(b=t.commonPath)!==null&&b!==void 0||(t.commonPath=m);const C=[],f=Math.min(t.commonPath.length,m.length);for(let $=0;$<f;$++){const g=m[$];if(g==="**"&&!m[$+1]){C.pop();break}if($===m.length-1||g!==t.commonPath[$]||ao(g))break;C.push(g)}t.depthOffset=C.length,t.commonPath=C,t.root=vt(C.length>0?Ou.join(r,...C):r)}return o}function Do(u,e,t){const n=[],s=[],r=[];for(const o of u.ignore)o&&(o[0]!=="!"||o[1]==="("?s.push(He(o,u,t,!0)):r.push(o.slice(1)));for(const o of e)o&&(o[0]!=="!"||o[1]==="("?n.push(He(o,u,t,!1)):(o[1]!=="!"||o[2]==="(")&&s.push(He(o.slice(1),u,t,!0)));return{match:n,ignore:s,unignore:r}}function po(u,e){const t=u.cwd,n={root:t,depthOffset:0},s=Do(u,e,n);u.debug&&Ee("internal processing patterns:",s);const{absolute:r,caseSensitiveMatch:o,debug:i,dot:a,followSymbolicLinks:d,onlyDirectories:D}=u,m=n.root.replace(Qt,""),b={dot:a,nobrace:u.braceExpansion===!1,nocase:!o,noextglob:u.extglob===!1,noglobstar:u.globstar===!1,posix:!0},C=s.unignore.length>0,f=C?ku(s.unignore,b):void 0,$=C?bt(s.unignore,b):void 0,g=ku(s.match,{...b,ignore:s.ignore,onIgnore:f?S=>f(S.output)&&ku.constants.UNIGNORE:void 0}),w=ku(s.ignore,b),_=bt(s.match,b),h=$t(t,m,r),F=r?h:$t(t,m,!0),l=s.match.length>0&&s.match.every(S=>S==="**"||S==="**/*"),T=s.ignore.length>0||C||!l?(S,v)=>{const j=F(v,!0);return j==="."||$&&$(j)?!1:!_(j)||w(j)}:void 0;let N;u.deep!==void 0&&(N=Math.round(u.deep-n.depthOffset));const x=new Vs({filters:[i?(S,v)=>{const j=h(S,v),q=g(j);return q&&Ee(`matched ${j}`),q}:(S,v)=>{const j=h(S,v);return g(j)}],exclude:i&&T?(S,v)=>{const j=T(S,v);return Ee(`${j?"skipped":"crawling"} ${v}`),j}:T,fs:u.fs,pathSeparator:"/",relativePaths:!r,resolvePaths:r,includeBasePath:r,resolveSymlinks:d,excludeSymlinks:!d,excludeFiles:D,includeDirs:D||!u.onlyFiles,maxDepth:N,signal:u.signal}).crawl(m);return u.debug&&Ee("internal properties:",{...n,root:m}),[x,t!==m&&!r&&eo(t,m)]}function fo(u,e){if(e)for(let t=u.length-1;t>=0;t--)u[t]=e(u[t]);return u}const wt={caseSensitiveMatch:!0,debug:!!process.env.TINYGLOBBY_DEBUG,expandDirectories:!0,followSymbolicLinks:!0,onlyFiles:!0};function Ao(u){const e=Object.assign({},u);for(const t in wt)e[t]===void 0&&Object.assign(e,{[t]:wt[t]});return e.cwd=(e.cwd instanceof URL?us(e.cwd):Gt(e.cwd||process.cwd())).replace(Qt,"/"),e.ignore=Yt(e.ignore),e.fs&&(e.fs={readdir:e.fs.readdir||Vn,readdirSync:e.fs.readdirSync||Kn,realpath:e.fs.realpath||Xn,realpathSync:e.fs.realpathSync||qn,stat:e.fs.stat||Wn,statSync:e.fs.statSync||Un}),e.debug&&Ee("globbing with options:",e),e}function ho(u,e={}){var t;if(u&&e?.patterns)throw new Error("Cannot pass patterns as both an argument and an option");const n=Qs(u)||typeof u=="string",s=Yt((t=n?u:u.patterns)!==null&&t!==void 0?t:"**/*"),r=Ao(n?e:u);return s.length>0?po(r,s):[]}async function Sa(u,e){const[t,n]=ho(u,e);return t?fo(await t.withPromise(),n):[]}var Ie,xt;function Eo(){if(xt)return Ie;xt=1;/*!
2
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
- *
4
- * Copyright (c) 2014-2016, Jon Schlinkert.
5
- * Licensed under the MIT License.
6
- */return Ie=function(u){if(typeof u!="string"||u==="")return!1;for(var e;e=/(\\).|([@?!+*]\(.*\))/g.exec(u);){if(e[2])return!0;u=u.slice(e.index+e[0].length)}return!1},Ie}var Me,St;function ur(){if(St)return Me;St=1;/*!
7
- * is-glob <https://github.com/jonschlinkert/is-glob>
8
- *
9
- * Copyright (c) 2014-2017, Jon Schlinkert.
10
- * Released under the MIT License.
11
- */var u=Eo(),e={"{":"}","(":")","[":"]"},t=function(s){if(s[0]==="!")return!0;for(var r=0,o=-2,i=-2,a=-2,d=-2,D=-2;r<s.length;){if(s[r]==="*"||s[r+1]==="?"&&/[\].+)]/.test(s[r])||i!==-1&&s[r]==="["&&s[r+1]!=="]"&&(i<r&&(i=s.indexOf("]",r)),i>r&&(D===-1||D>i||(D=s.indexOf("\\",r),D===-1||D>i)))||a!==-1&&s[r]==="{"&&s[r+1]!=="}"&&(a=s.indexOf("}",r),a>r&&(D=s.indexOf("\\",r),D===-1||D>a))||d!==-1&&s[r]==="("&&s[r+1]==="?"&&/[:!=]/.test(s[r+2])&&s[r+3]!==")"&&(d=s.indexOf(")",r),d>r&&(D=s.indexOf("\\",r),D===-1||D>d))||o!==-1&&s[r]==="("&&s[r+1]!=="|"&&(o<r&&(o=s.indexOf("|",r)),o!==-1&&s[o+1]!==")"&&(d=s.indexOf(")",o),d>o&&(D=s.indexOf("\\",o),D===-1||D>d))))return!0;if(s[r]==="\\"){var m=s[r+1];r+=2;var b=e[m];if(b){var C=s.indexOf(b,r);C!==-1&&(r=C+1)}if(s[r]==="!")return!0}else r++}return!1},n=function(s){if(s[0]==="!")return!0;for(var r=0;r<s.length;){if(/[*?{}()[\]]/.test(s[r]))return!0;if(s[r]==="\\"){var o=s[r+1];r+=2;var i=e[o];if(i){var a=s.indexOf(i,r);a!==-1&&(r=a+1)}if(s[r]==="!")return!0}else r++}return!1};return Me=function(s,r){if(typeof s!="string"||s==="")return!1;if(u(s))return!0;var o=t;return r&&r.strict===!1&&(o=n),o(s)},Me}let Co;const Fo=u=>(Co??=I(import.meta.url))(u),ue=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,er=u=>{if(typeof ue<"u"&&ue.versions&&ue.versions.node){const[e,t]=ue.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ue.getBuiltinModule(u)}return Fo(u)},go=er("path"),mo=er("os");var je,_t;function yo(){if(_t)return je;_t=1;var u=ur(),e=go.posix.dirname,t=mo.platform()==="win32",n="/",s=/\\/g,r=/\\([!*?|[\](){}])/g;je=function(a,d){var D=Object.assign({flipBackslashes:!0},d);D.flipBackslashes&&t&&a.indexOf(n)<0&&(a=a.replace(s,n)),o(a)&&(a+=n),a+="a";do a=e(a);while(i(a));return a.replace(r,"$1")};function o(a){var d=a.slice(-1),D;switch(d){case"}":D="{";break;case"]":D="[";break;default:return!1}var m=a.indexOf(D);return m<0?!1:a.slice(m+1,-1).includes(n)}function i(a){return/\([^()]+$/.test(a)||a[0]==="{"||a[0]==="["||/[^\\][{[]/.test(a)?!0:u(a)}return je}var Bo=yo();et(Bo);let bo;const $o=u=>(bo??=I(import.meta.url))(u),ee=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,vo=u=>{if(typeof ee<"u"&&ee.versions&&ee.versions.node){const[e,t]=ee.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ee.getBuiltinModule(u)}return $o(u)},{access:wo}=vo("node:fs/promises");async function _a(u,e=Je){bu(u),u=yu(u);try{return await wo(u,e),!0}catch{return!1}}let xo;const So=u=>(xo??=I(import.meta.url))(u),te=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,_o=u=>{if(typeof te<"u"&&te.versions&&te.versions.node){const[e,t]=te.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return te.getBuiltinModule(u)}return So(u)},{accessSync:To}=_o("node:fs");function Xe(u,e=Je){bu(u),u=yu(u);try{return To(u,e),!0}catch{return!1}}var Ro=ur();et(Ro);let ko;const Oo=u=>(ko??=I(import.meta.url))(u),re=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tr=u=>{if(typeof re<"u"&&re.versions&&re.versions.node){const[e,t]=re.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return re.getBuiltinModule(u)}return Oo(u)};tr("node:fs/promises");tr("node:fs");let No=class extends Error{constructor(e){super(`ENOENT: ${e}`)}get code(){return"ENOENT"}set code(e){throw new Error("Cannot overwrite code ENOENT")}get name(){return"NotFoundError"}set name(e){throw new Error("Cannot overwrite name of NotFoundError")}},Lo=class extends Error{constructor(e){super(`EPERM: Operation not permitted, ${e}`)}get code(){return"EPERM"}set code(e){throw new Error("Cannot overwrite code EPERM")}get name(){return"PermissionError"}set name(e){throw new Error("Cannot overwrite name of PermissionError")}};const rr=(u,e)=>{const t=u?.code;return t==="ENOENT"?new No(`no such file or directory, open '${e}'`):t==="EACCES"||t==="EPERM"?new Lo(`unable to read the non-readable file: ${e}`):u};let Po;const Ho=u=>(Po??=I(import.meta.url))(u),ne=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,nr=u=>{if(typeof ne<"u"&&ne.versions&&ne.versions.node){const[e,t]=ne.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ne.getBuiltinModule(u)}return Ho(u)},{readFile:Io}=nr("node:fs/promises"),{unzip:Mo,brotliDecompress:jo}=nr("node:zlib"),Go={brotli:jo,gzip:Mo,none:(u,e)=>{e(null,u)}},ka=async(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:n,encoding:s,flag:r}=e??{};let o;try{o=await Io(u,r?{flag:r}:{})}catch(i){throw rr(i,u)}return await new Promise((i,a)=>{Go[n??"none"](o,(d,D)=>{d?a(d):i(t?D:D.toString(s??"utf8"))})})};let zo;const Uo=u=>(zo??=I(import.meta.url))(u),se=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,sr=u=>{if(typeof se<"u"&&se.versions&&se.versions.node){const[e,t]=se.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return se.getBuiltinModule(u)}return Uo(u)},{readFileSync:Wo}=sr("node:fs"),{unzipSync:qo,brotliDecompressSync:Xo}=sr("node:zlib"),Ko={brotli:Xo,gzip:qo,none:u=>u},Vo=(u,e)=>{bu(u),u=yu(u);const{buffer:t,compression:n,encoding:s,flag:r}=e??{};let o;try{o=Wo(u,r?{flag:r}:{})}catch(d){throw rr(d,u)}const i=Ko[n??"none"],a=i(o);return t?a:a.toString(s??"utf8")},Qo=globalThis.process??Object.create(null),Tt={versions:{}},Rt=new Proxy(Qo,{get(u,e){if(e in u)return u[e];if(e in Tt)return Tt[e]}}),Jo=u=>u.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
12
- `),Zo=(u,e,t,n)=>{const s={column:0,line:-1,...u.start},r={...s,...u.end},o=s.line,i=s.column,a=r.line,d=r.column;let D=Math.max(o-(t+1),0),m=Math.min(e.length,a+n);o===-1&&(D=0),a===-1&&(m=e.length);const b=a-o,C={};if(b)for(let f=0;f<=b;f++){const $=f+o;if(!i)C[$]=!0;else if(f===0){const g=e[$-1]?.length;C[$]=[i,(g??0)-i+1]}else if(f===b)C[$]=[0,d];else{const g=e[$-f]?.length;C[$]=[0,g]}}else i===d?C[o]=i?[i,0]:!0:C[o]=[i,(d??0)-(i??0)];return{end:m,markerLines:C,start:D}},Yo=Rt.platform==="win32"&&!Rt.env?.WT_SESSION?">":"❯",Oa=(u,e,t)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...t,color:{gutter:f=>f,marker:f=>f,message:f=>f,...t?.color}},s=typeof e.start.column=="number";let r=(u.includes("\r")?Jo(u):u).split(`
13
- `);typeof n.tabWidth=="number"&&u.includes(" ")&&(r=r.map(f=>f.replaceAll(" "," ".repeat(n.tabWidth))));const{end:o,markerLines:i,start:a}=Zo(e,r,n.linesAbove,n.linesBelow),d=String(o).length,{gutter:D,marker:m,message:b}=n.color;let C=r.slice(a,o).map((f,$)=>{const g=a+1+$,w=i[g],_=String(g).padStart(d),h=!i[g+1],F=` ${_}${n.showGutter?" |":""}`;if(w){let l="";if(Array.isArray(w)){const T=f.replaceAll(/[^\t]/g," ").slice(0,Math.max(w[0]-1,0)),N=w[1]||1;l=[`
14
- `,n.prefix+D(F.replaceAll(/\d/g," "))," ",T,m("^").repeat(N)].join(""),h&&n.message&&(l+=` ${b(n.message)}`)}return[n.prefix+m(Yo),D(F),f.length>0?` ${f}`:"",l].join("")}return`${n.prefix} ${D(F)}${f.length>0?` ${f}`:""}`}).join(`
15
- `);return n.message&&!s&&(C=`${n.prefix+" ".repeat(d+1)+n.message}
16
- ${C}`),C},kt=(u,e)=>{let t=0,n=e.length-2;for(;t<n;){const s=t+(n-t>>1);if(u<e[s])n=s-1;else if(u>=e[s+1])t=s+1;else{t=s;break}}return t},ui=/\n|\r(?!\n)/,ei=u=>u.split(ui).reduce((e,t)=>(e.push(e.at(-1)+t.length+1),e),[0]),Na=(u,e,t)=>{if(!Array.isArray(u)&&typeof u!="string"||(typeof u=="string"||Array.isArray(u))&&u.length===0)return{column:0,line:0};if(typeof e!="number"||typeof u=="string"&&e>=u.length||Array.isArray(u)&&e+1>=u.at(-1))return{column:0,line:0};if(typeof u=="string"){const s=ei(u),r=kt(e,s);return{column:e-s[r]+1,line:r+1}}const n=kt(e,u);return{column:e-u[n]+1,line:n+1}};let La=class extends Error{fileName;codeFrame;name="JSONError";#u;constructor(e){super(),this.#u=e}get message(){return`${this.#u}${this.fileName?` in ${this.fileName}`:""}${this.codeFrame?`
17
-
18
- ${this.codeFrame}
19
- `:""}`}set message(e){this.#u=e}};const ti=u=>{const e={force:!0,recursive:!0};return u?.maxRetries!==void 0&&(e.maxRetries=u.maxRetries),u?.retryDelay!==void 0&&(e.retryDelay=u.retryDelay),e};let ri;const ni=u=>(ri??=I(import.meta.url))(u),oe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,or=u=>{if(typeof oe<"u"&&oe.versions&&oe.versions.node){const[e,t]=oe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return oe.getBuiltinModule(u)}return ni(u)};or("node:fs");or("node:fs/promises");let si;const oi=u=>(si??=I(import.meta.url))(u),ie=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ii=u=>{if(typeof ie<"u"&&ie.versions&&ie.versions.node){const[e,t]=ie.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ie.getBuiltinModule(u)}return oi(u)};ii("node:fs");let ai;const li=u=>(ai??=I(import.meta.url))(u),ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,ci=u=>{if(typeof ae<"u"&&ae.versions&&ae.versions.node){const[e,t]=ae.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ae.getBuiltinModule(u)}return li(u)};ci("node:fs/promises");let Di;const pi=u=>(Di??=I(import.meta.url))(u),le=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,fi=u=>{if(typeof le<"u"&&le.versions&&le.versions.node){const[e,t]=le.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return le.getBuiltinModule(u)}return pi(u)},{rmSync:Ai}=fi("node:fs"),Ha=(u,e={})=>{bu(u),Ai(u,ti(e))},hi=u=>{if(typeof u!="string"&&!(u instanceof ArrayBuffer)&&!ArrayBuffer.isView(u))throw new TypeError("File contents must be a string, ArrayBuffer, or ArrayBuffer view.")};let Ei;const Ci=u=>(Ei??=I(import.meta.url))(u),ce=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Fi=u=>{if(typeof ce<"u"&&ce.versions&&ce.versions.node){const[e,t]=ce.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return ce.getBuiltinModule(u)}return Ci(u)},{randomBytes:gi}=Fi("node:crypto"),di=u=>`${u}.${process.pid.toString(36)}.${gi(6).toString("hex")}.tmp`,mi=new TextEncoder,yi=u=>{if(u instanceof Uint8Array)return u;if(typeof u=="string")return mi.encode(u);if(u instanceof ArrayBuffer)return new Uint8Array(u);if(ArrayBuffer.isView(u)){const e=u.buffer.slice(u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(e)}throw new TypeError("Invalid contents type. Expected string or ArrayBuffer.")};let Bi;const bi=u=>(Bi??=I(import.meta.url))(u),De=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$i=u=>{if(typeof De<"u"&&De.versions&&De.versions.node){const[e,t]=De.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return De.getBuiltinModule(u)}return bi(u)};$i("node:fs/promises");let vi;const wi=u=>(vi??=I(import.meta.url))(u),pe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,xi=u=>{if(typeof pe<"u"&&pe.versions&&pe.versions.node){const[e,t]=pe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return pe.getBuiltinModule(u)}return wi(u)},{mkdirSync:Si,readFileSync:_i,writeFileSync:Ti,statSync:Ri,renameSync:Ot,chownSync:ki,chmodSync:Oi,unlinkSync:Ni}=xi("node:fs"),Li=(u,e,t)=>{t={backup:!1,encoding:"utf8",flag:"w",overwrite:!0,recursive:!0,...t},bu(u),hi(e),u=yu(u);const n=Xe(u,Je),s=t.flag??"w",r=s.includes("a"),o=s.includes("x");if(n&&(!t.overwrite||o))throw new Lr(`file already exists, open '${u}'`);const i=di(u);try{!n&&t.recursive&&Si(Ye(u),{recursive:!0});let a,d=typeof e=="string"?Buffer.from(e,t.encoding??"utf8"):yi(e);if(r&&n&&(d=Buffer.concat([_i(u),d])),Ti(i,d,{flag:"wx"}),n&&t.backup&&(a=Ri(u),t.chown??={gid:a.gid,uid:a.uid},Ot(u,`${u}.bak`)),t.chown)try{ki(i,t.chown.uid,t.chown.gid)}catch{}const D=a&&t.mode===void 0?a.mode:t.mode;D!==void 0&&Oi(i,D),Ot(i,u)}catch(a){throw new Error(`Failed to write file at: ${u} - ${a.message}`,{cause:a})}finally{Xe(i)&&Ni(i)}},Pi=/^(?:( )+|\t+)/,me="space";function Nt(u,e,t){return u&&e===me&&t===1}function Lt(u,e){const t=new Map;let n=0,s,r;for(const o of u.split(/\n/g)){if(!o)continue;const i=o.match(Pi);if(i===null)n=0,s="";else{const a=i[0].length,d=i[1]?me:"tab";if(Nt(e,d,a))continue;d!==s&&(n=0),s=d;let D=1,m=0;const b=a-n;if(n=a,b===0)D=0,m=1;else{const f=Math.abs(b);if(Nt(e,d,f))continue;r=Hi(d,f)}const C=t.get(r);t.set(r,C===void 0?[1,0]:[C[0]+D,C[1]+m])}}return t}function Hi(u,e){return(u===me?"s":"t")+String(e)}function Ii(u){const e=u[0]==="s"?me:"tab",t=Number(u.slice(1));return{type:e,amount:t}}function Mi(u){let e,t=0,n=0;for(const[s,[r,o]]of u)(r>t||r===t&&o>n)&&(t=r,n=o,e=s);return e}function ji(u,e){return(u===me?" ":" ").repeat(e)}function Gi(u){if(typeof u!="string")throw new TypeError("Expected a string");let e=Lt(u,!0);e.size===0&&(e=Lt(u,!1));const t=Mi(e);let n,s=0,r="";return t!==void 0&&({type:n,amount:s}=Ii(t),r=ji(n,s)),{amount:s,type:n,indent:r}}let zi;const Ui=u=>(zi??=I(import.meta.url))(u),fe=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Wi=u=>{if(typeof fe<"u"&&fe.versions&&fe.versions.node){const[e,t]=fe.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return fe.getBuiltinModule(u)}return Ui(u)};Wi("node:fs/promises");let qi;const Xi=u=>(qi??=I(import.meta.url))(u),Ae=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,Ki=u=>{if(typeof Ae<"u"&&Ae.versions&&Ae.versions.node){const[e,t]=Ae.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return Ae.getBuiltinModule(u)}return Xi(u)},{readFileSync:Vi}=Ki("node:fs"),Ia=(u,e,t={})=>{const{detectIndent:n,indent:s,replacer:r,stringify:o=JSON.stringify,...i}={indent:" ",...t};let a=s,d=`
20
- `;if(Xe(u,hr))try{const m=Vi(u,"utf8");if(n){const{indent:b}=Gi(m);a=b}d=m.endsWith(`
21
- `)?`
22
- `:""}catch(m){if(m.code!=="ENOENT")throw m}const D=o(e,r,a);Li(u,`${D}${d}`,i)};let Qi;const Ji=u=>(Qi??=I(import.meta.url))(u),he=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,tt=u=>{if(typeof he<"u"&&he.versions&&he.versions.node){const[e,t]=he.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return he.getBuiltinModule(u)}return Ji(u)},Zi=tt("fs"),Yi=tt("os"),ua=tt("path");var Ge={},Pt;function ea(){if(Pt)return Ge;Pt=1;var u=Object.defineProperty,e=(D,m)=>u(D,"name",{value:m,configurable:!0}),t=Zi,n=Yi,s=ua;const r=e(D=>{let m="";for(let b=0;b<D.length;b+=1){const C=D[b],f=C.toUpperCase();m+=C===f?C.toLowerCase():f}return m},"invertCase"),o=new Map,i=e((D,m)=>{const b=s.join(D,`.is-fs-case-sensitive-test-${process.pid}`);try{return m.writeFileSync(b,""),!m.existsSync(r(b))}finally{try{m.unlinkSync(b)}catch{}}},"checkDirectoryCaseWithWrite"),a=e((D,m,b)=>{try{return i(D,b)}catch(C){if(m===void 0)return i(n.tmpdir(),b);throw C}},"checkDirectoryCaseWithFallback"),d=e((D,m=t,b=!0)=>{const C=D??process.cwd();if(b&&o.has(C))return o.get(C);let f;const $=r(C);return $!==C&&m.existsSync(C)?f=!m.existsSync($):f=a(C,D,m),b&&o.set(C,f),f},"isFsCaseSensitive");return Ge.isFsCaseSensitive=d,Ge}var ta=ea();const Ma=ta.isFsCaseSensitive;function ja(u,e,t){const{buffer:n,compression:s,encoding:r="utf8",flag:o,...i}={},a=Vo(u,{buffer:n,compression:s,encoding:r,flag:o});return typeof e=="function"?st(a,e,i):st(a,i)}var ra=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,na=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,sa=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,ze={Space_Separator:ra,ID_Start:na,ID_Continue:sa},Y={isSpaceSeparator(u){return typeof u=="string"&&ze.Space_Separator.test(u)},isIdStartChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u==="$"||u==="_"||ze.ID_Start.test(u))},isIdContinueChar(u){return typeof u=="string"&&(u>="a"&&u<="z"||u>="A"&&u<="Z"||u>="0"&&u<="9"||u==="$"||u==="_"||u==="‌"||u==="‍"||ze.ID_Continue.test(u))},isDigit(u){return typeof u=="string"&&/[0-9]/.test(u)},isHexDigit(u){return typeof u=="string"&&/[0-9A-Fa-f]/.test(u)}};let Ke,ou,mu,xe,Su,fu,eu,rt,ge;var oa=function(u,e){Ke=String(u),ou="start",mu=[],xe=0,Su=1,fu=0,eu=void 0,rt=void 0,ge=void 0;do eu=ia(),ca[ou]();while(eu.type!=="eof");return typeof e=="function"?Ve({"":ge},"",e):ge};function Ve(u,e,t){const n=u[e];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let s=0;s<n.length;s++){const r=String(s),o=Ve(n,r,t);o===void 0?delete n[r]:Object.defineProperty(n,r,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const s in n){const r=Ve(n,s,t);r===void 0?delete n[s]:Object.defineProperty(n,s,{value:r,writable:!0,enumerable:!0,configurable:!0})}return t.call(u,e,n)}let O,k,Ce,du,H;function ia(){for(O="default",k="",Ce=!1,du=1;;){H=Bu();const u=ir[O]();if(u)return u}}function Bu(){if(Ke[xe])return String.fromCodePoint(Ke.codePointAt(xe))}function E(){const u=Bu();return u===`
23
- `?(Su++,fu=0):u?fu+=u.length:fu++,u&&(xe+=u.length),u}const ir={default(){switch(H){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
24
- `:case"\r":case"\u2028":case"\u2029":E();return;case"/":E(),O="comment";return;case void 0:return E(),W("eof")}if(Y.isSpaceSeparator(H)){E();return}return ir[ou]()},comment(){switch(H){case"*":E(),O="multiLineComment";return;case"/":E(),O="singleLineComment";return}throw V(E())},multiLineComment(){switch(H){case"*":E(),O="multiLineCommentAsterisk";return;case void 0:throw V(E())}E()},multiLineCommentAsterisk(){switch(H){case"*":E();return;case"/":E(),O="default";return;case void 0:throw V(E())}E(),O="multiLineComment"},singleLineComment(){switch(H){case`
25
- `:case"\r":case"\u2028":case"\u2029":E(),O="default";return;case void 0:return E(),W("eof")}E()},value(){switch(H){case"{":case"[":return W("punctuator",E());case"n":return E(),Tu("ull"),W("null",null);case"t":return E(),Tu("rue"),W("boolean",!0);case"f":return E(),Tu("alse"),W("boolean",!1);case"-":case"+":E()==="-"&&(du=-1),O="sign";return;case".":k=E(),O="decimalPointLeading";return;case"0":k=E(),O="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),O="decimalInteger";return;case"I":return E(),Tu("nfinity"),W("numeric",1/0);case"N":return E(),Tu("aN"),W("numeric",NaN);case'"':case"'":Ce=E()==='"',k="",O="string";return}throw V(E())},identifierNameStartEscape(){if(H!=="u")throw V(E());E();const u=Qe();switch(u){case"$":case"_":break;default:if(!Y.isIdStartChar(u))throw Ht();break}k+=u,O="identifierName"},identifierName(){switch(H){case"$":case"_":case"‌":case"‍":k+=E();return;case"\\":E(),O="identifierNameEscape";return}if(Y.isIdContinueChar(H)){k+=E();return}return W("identifier",k)},identifierNameEscape(){if(H!=="u")throw V(E());E();const u=Qe();switch(u){case"$":case"_":case"‌":case"‍":break;default:if(!Y.isIdContinueChar(u))throw Ht();break}k+=u,O="identifierName"},sign(){switch(H){case".":k=E(),O="decimalPointLeading";return;case"0":k=E(),O="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":k=E(),O="decimalInteger";return;case"I":return E(),Tu("nfinity"),W("numeric",du*(1/0));case"N":return E(),Tu("aN"),W("numeric",NaN)}throw V(E())},zero(){switch(H){case".":k+=E(),O="decimalPoint";return;case"e":case"E":k+=E(),O="decimalExponent";return;case"x":case"X":k+=E(),O="hexadecimal";return}return W("numeric",du*0)},decimalInteger(){switch(H){case".":k+=E(),O="decimalPoint";return;case"e":case"E":k+=E(),O="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalPointLeading(){if(Y.isDigit(H)){k+=E(),O="decimalFraction";return}throw V(E())},decimalPoint(){switch(H){case"e":case"E":k+=E(),O="decimalExponent";return}if(Y.isDigit(H)){k+=E(),O="decimalFraction";return}return W("numeric",du*Number(k))},decimalFraction(){switch(H){case"e":case"E":k+=E(),O="decimalExponent";return}if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},decimalExponent(){switch(H){case"+":case"-":k+=E(),O="decimalExponentSign";return}if(Y.isDigit(H)){k+=E(),O="decimalExponentInteger";return}throw V(E())},decimalExponentSign(){if(Y.isDigit(H)){k+=E(),O="decimalExponentInteger";return}throw V(E())},decimalExponentInteger(){if(Y.isDigit(H)){k+=E();return}return W("numeric",du*Number(k))},hexadecimal(){if(Y.isHexDigit(H)){k+=E(),O="hexadecimalInteger";return}throw V(E())},hexadecimalInteger(){if(Y.isHexDigit(H)){k+=E();return}return W("numeric",du*Number(k))},string(){switch(H){case"\\":E(),k+=aa();return;case'"':if(Ce)return E(),W("string",k);k+=E();return;case"'":if(!Ce)return E(),W("string",k);k+=E();return;case`
26
- `:case"\r":throw V(E());case"\u2028":case"\u2029":Da(H);break;case void 0:throw V(E())}k+=E()},start(){switch(H){case"{":case"[":return W("punctuator",E())}O="value"},beforePropertyName(){switch(H){case"$":case"_":k=E(),O="identifierName";return;case"\\":E(),O="identifierNameStartEscape";return;case"}":return W("punctuator",E());case'"':case"'":Ce=E()==='"',O="string";return}if(Y.isIdStartChar(H)){k+=E(),O="identifierName";return}throw V(E())},afterPropertyName(){if(H===":")return W("punctuator",E());throw V(E())},beforePropertyValue(){O="value"},afterPropertyValue(){switch(H){case",":case"}":return W("punctuator",E())}throw V(E())},beforeArrayValue(){if(H==="]")return W("punctuator",E());O="value"},afterArrayValue(){switch(H){case",":case"]":return W("punctuator",E())}throw V(E())},end(){throw V(E())}};function W(u,e){return{type:u,value:e,line:Su,column:fu}}function Tu(u){for(const e of u){if(Bu()!==e)throw V(E());E()}}function aa(){switch(Bu()){case"b":return E(),"\b";case"f":return E(),"\f";case"n":return E(),`
27
- `;case"r":return E(),"\r";case"t":return E()," ";case"v":return E(),"\v";case"0":if(E(),Y.isDigit(Bu()))throw V(E());return"\0";case"x":return E(),la();case"u":return E(),Qe();case`
28
- `:case"\u2028":case"\u2029":return E(),"";case"\r":return E(),Bu()===`
29
- `&&E(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw V(E());case void 0:throw V(E())}return E()}function la(){let u="",e=Bu();if(!Y.isHexDigit(e)||(u+=E(),e=Bu(),!Y.isHexDigit(e)))throw V(E());return u+=E(),String.fromCodePoint(parseInt(u,16))}function Qe(){let u="",e=4;for(;e-- >0;){const t=Bu();if(!Y.isHexDigit(t))throw V(E());u+=E()}return String.fromCodePoint(parseInt(u,16))}const ca={start(){if(eu.type==="eof")throw Ru();Ue()},beforePropertyName(){switch(eu.type){case"identifier":case"string":rt=eu.value,ou="afterPropertyName";return;case"punctuator":ve();return;case"eof":throw Ru()}},afterPropertyName(){if(eu.type==="eof")throw Ru();ou="beforePropertyValue"},beforePropertyValue(){if(eu.type==="eof")throw Ru();Ue()},beforeArrayValue(){if(eu.type==="eof")throw Ru();if(eu.type==="punctuator"&&eu.value==="]"){ve();return}Ue()},afterPropertyValue(){if(eu.type==="eof")throw Ru();switch(eu.value){case",":ou="beforePropertyName";return;case"}":ve()}},afterArrayValue(){if(eu.type==="eof")throw Ru();switch(eu.value){case",":ou="beforeArrayValue";return;case"]":ve()}},end(){}};function Ue(){let u;switch(eu.type){case"punctuator":switch(eu.value){case"{":u={};break;case"[":u=[];break}break;case"null":case"boolean":case"numeric":case"string":u=eu.value;break}if(ge===void 0)ge=u;else{const e=mu[mu.length-1];Array.isArray(e)?e.push(u):Object.defineProperty(e,rt,{value:u,writable:!0,enumerable:!0,configurable:!0})}if(u!==null&&typeof u=="object")mu.push(u),Array.isArray(u)?ou="beforeArrayValue":ou="beforePropertyName";else{const e=mu[mu.length-1];e==null?ou="end":Array.isArray(e)?ou="afterArrayValue":ou="afterPropertyValue"}}function ve(){mu.pop();const u=mu[mu.length-1];u==null?ou="end":Array.isArray(u)?ou="afterArrayValue":ou="afterPropertyValue"}function V(u){return nt(u===void 0?`JSON5: invalid end of input at ${Su}:${fu}`:`JSON5: invalid character '${ar(u)}' at ${Su}:${fu}`)}function Ru(){return nt(`JSON5: invalid end of input at ${Su}:${fu}`)}function Ht(){return fu-=5,nt(`JSON5: invalid identifier character at ${Su}:${fu}`)}function Da(u){console.warn(`JSON5: '${ar(u)}' in strings is not valid ECMAScript; consider escaping`)}function ar(u){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[u])return e[u];if(u<" "){const t=u.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return u}function nt(u){const e=new SyntaxError(u);return e.lineNumber=Su,e.columnNumber=fu,e}var pa=function(u,e,t){const n=[];let s="",r,o,i="",a;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(t=e.space,a=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){r=[];for(const f of e){let $;typeof f=="string"?$=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&($=String(f)),$!==void 0&&r.indexOf($)<0&&r.push($)}}return t instanceof Number?t=Number(t):t instanceof String&&(t=String(t)),typeof t=="number"?t>0&&(t=Math.min(10,Math.floor(t)),i=" ".substr(0,t)):typeof t=="string"&&(i=t.substr(0,10)),d("",{"":u});function d(f,$){let g=$[f];switch(g!=null&&(typeof g.toJSON5=="function"?g=g.toJSON5(f):typeof g.toJSON=="function"&&(g=g.toJSON(f))),o&&(g=o.call($,f,g)),g instanceof Number?g=Number(g):g instanceof String?g=String(g):g instanceof Boolean&&(g=g.valueOf()),g){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof g=="string")return D(g);if(typeof g=="number")return String(g);if(typeof g=="object")return Array.isArray(g)?C(g):m(g)}function D(f){const $={"'":.1,'"':.2},g={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let w="";for(let h=0;h<f.length;h++){const F=f[h];switch(F){case"'":case'"':$[F]++,w+=F;continue;case"\0":if(Y.isDigit(f[h+1])){w+="\\x00";continue}}if(g[F]){w+=g[F];continue}if(F<" "){let l=F.charCodeAt(0).toString(16);w+="\\x"+("00"+l).substring(l.length);continue}w+=F}const _=a||Object.keys($).reduce((h,F)=>$[h]<$[F]?h:F);return w=w.replace(new RegExp(_,"g"),g[_]),_+w+_}function m(f){if(n.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");n.push(f);let $=s;s=s+i;let g=r||Object.keys(f),w=[];for(const h of g){const F=d(h,f);if(F!==void 0){let l=b(h)+":";i!==""&&(l+=" "),l+=F,w.push(l)}}let _;if(w.length===0)_="{}";else{let h;if(i==="")h=w.join(","),_="{"+h+"}";else{let F=`,
30
- `+s;h=w.join(F),_=`{
31
- `+s+h+`,
32
- `+$+"}"}}return n.pop(),s=$,_}function b(f){if(f.length===0)return D(f);const $=String.fromCodePoint(f.codePointAt(0));if(!Y.isIdStartChar($))return D(f);for(let g=$.length;g<f.length;g++)if(!Y.isIdContinueChar(String.fromCodePoint(f.codePointAt(g))))return D(f);return f}function C(f){if(n.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");n.push(f);let $=s;s=s+i;let g=[];for(let _=0;_<f.length;_++){const h=d(String(_),f);g.push(h!==void 0?h:"null")}let w;if(g.length===0)w="[]";else if(i==="")w="["+g.join(",")+"]";else{let _=`,
33
- `+s,h=g.join(_);w=`[
34
- `+s+h+`,
35
- `+$+"]"}return n.pop(),s=$,w}};const fa={parse:oa,stringify:pa};var Ga=fa;export{Sa as C,Na as E,Ye as J,ut as K,Oa as L,vr as M,Lu as P,Fe as W,da as _,Ca as a,ga as b,wn as c,Ba as d,yu as e,ka as f,ya as g,va as h,Ga as i,Li as j,No as k,Xe as l,_a as m,Ma as n,Ea as o,Ha as p,Ia as q,La as s,ja as u,Nu as v,br as w,Fa as y,Vo as z};
@@ -1,2 +0,0 @@
1
- const G=/^-{1,2}(no-color|no-colors|color=false|color=never)$/,P=/^-{1,2}(color=256)$/,D=/^-{1,2}(color=16m|color=full|color=truecolor)$/,L=/^-{1,2}(color|colors|color=true|color=always)$/,j=/-mono|dumb/i,F=/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/,V=/-256(color)?$/i,Y=/^screen|^tmux|^xterm|^vt[1-5]\d\d|^ansi|color|mintty|rxvt|cygwin|linux/i,U=()=>{const t=globalThis.process?.getBuiltinModule;return typeof t!="function"?"":t("node:os").release()},_=(t,e={})=>{const{isTTY:i,sniffFlags:o=!0}=e,l=globalThis,u=l.Deno!=null,c=l.process??l.Deno??{},p=c.argv??c.args??[],O=o?p.indexOf("--"):-1,a=d=>{if(!o)return!1;const R=p.findIndex(k=>d.test(k));return R!==-1&&(O===-1||R<O)};let r={};try{r=u?l.Deno.env.toObject():c.env??{}}catch{}const n="FORCE_COLOR",g=n in r,s=r[n]??void 0,m=typeof s=="string",S=typeof s=="number";let h;if(s==="true")h=1;else if(s==="false")h=0;else if(m&&s.length===0)h=1;else if(m&&s.length>0){const d=Number.parseInt(s,10);h=Number.isNaN(d)?void 0:Math.max(0,Math.min(d,3))}else S&&(h=Number.isNaN(s)?void 0:Math.max(0,Math.min(s,3)));if(s!=="true"&&s!=="false"&&h!==void 0&&h<4)return h;const w=g&&h!==void 0&&h>0;if(g&&h===0||a(G)||!w&&"NO_COLOR"in r)return 0;if(a(P))return 2;if(a(D))return 3;if(a(L))return 1;const N=h??0;if("TF_BUILD"in r&&"AGENT_NAME"in r)return 1;if(r.TERM&&j.test(r.TERM))return N;if(u?l.Deno.build.os==="windows":c.platform==="win32"){if("WT_SESSION"in r)return 3;if("ANSICON"in r)return 1;try{let d;u?d=l.Deno.osRelease():typeof c.os?.release=="function"?d=c.os.release():d=U();const R=d.split(".");return Number(R[0])>=10&&Number(R[2])>=10586?Number(R[2])>=14931?3:2:1}catch{}}if("CI"in r)return["GITEA_ACTIONS","CIRCLECI","GITHUB_WORKFLOW","GITHUB_ACTIONS"].some(d=>d in r)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(d=>d in r)||r.CI_NAME==="codeship"?1:N;if(r.TERMINAL_EMULATOR?.includes("JediTerm"))return 3;if("TEAMCITY_VERSION"in r)return F.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor"||r.TERM==="xterm-kitty"||r.TERM==="xterm-ghostty"||r.TERM==="wezterm")return 3;if("TERM_PROGRAM"in r){const d=Number.parseInt((r.TERM_PROGRAM_VERSION??"").split(".")[0],10);if(r.TERM_PROGRAM==="iTerm.app")return d>=3?3:2;if(r.TERM_PROGRAM==="Apple_Terminal")return 2}if(V.test(r.TERM))return 2;let T;return i!==void 0?T=i:u?T=t==="out"?l.Deno.stdout.isTerminal():l.Deno.stderr.isTerminal():"PM2_HOME"in r&&"pm_id"in r?T=!0:T=!!c[`std${t}`]?.isTTY,T&&Y.test(r.TERM)||"COLORTERM"in r?1:N},W=()=>_("out"),H=()=>_("err");function q({onlyFirst:t=!1}={}){const e="(?:\\u001B\\][\\s\\S]*?(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(e,t?void 0:"g")}const M=(t,e,i)=>e>t?e:Math.min(t,i),z=/^#?([a-f\d]{3}|[a-f\d]{6})$/i,K=t=>{let[,e]=z.exec(t)??[];const i=e?e.length:0;if(i===3){const l=e.charAt(0),u=e.charAt(1),c=e.charAt(2);e=l+l+u+u+c+c}else if(i!==6)return globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`[@visulima/colorize] Invalid hex color "${t}"; expected a 3- or 6-digit hex string (e.g. "#96C" or "#E0115F"). Falling back to black.`),[0,0,0];const o=Number.parseInt(e,16);return[o>>16&255,o>>8&255,o&255]},I=(t,e,i)=>t===e&&e===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/51)+6*Math.round(e/51)+Math.round(i/51),E=t=>{let e,i,o;if(t<8)return 30+t;if(t<16)return 90+(t-8);if(t>=232)e=i=o=((t-232)*10+8)/255;else{t-=16;const c=t%36;e=Math.floor(t/36)/5,i=Math.floor(c/6)/5,o=c%6/5}const l=Math.max(e,i,o)*2;if(l===0)return 30;const u=30+(Math.round(o)<<2|Math.round(i)<<1|Math.round(e));return l===2?u+60:u},y=(t,e,i)=>E(I(t,e,i)),f=39,b=49,C=10,B={close:"",open:""},v=t=>{const e=t>0?(n,g)=>({close:`\x1B[${String(g)}m`,open:`\x1B[${String(n)}m`}):()=>B,i=n=>(g,s,m)=>n(I(Number(g),Number(s),Number(m))),o=n=>g=>{const[s,m,S]=K(g);return n(s,m,S)};let l=n=>e(`38;5;${String(n)}`,f),u=n=>e(`48;5;${String(n)}`,b),c=(n,g,s)=>e(`38;2;${String(n)};${String(g)};${String(s)}`,f),p=(n,g,s)=>e(`48;2;${String(n)};${String(g)};${String(s)}`,b);t===1?(l=n=>e(E(Number(n)),f),u=n=>e(E(Number(n))+C,b),c=(n,g,s)=>e(y(Number(n),Number(g),Number(s)),f),p=(n,g,s)=>e(y(Number(n),Number(g),Number(s))+C,b)):t===2&&(c=i(l),p=i(u));const O={bold:e(1,22),dim:e(2,22),hidden:e(8,28),inverse:e(7,27),italic:e(3,23),overline:e(53,55),reset:e(0,0),strike:e(9,29),strikethrough:e(9,29),underline:e(4,24),visible:B},a={bgBlack:e(40,b),bgBlackBright:e(100,b),bgBlue:e(44,b),bgBlueBright:e(104,b),bgCyan:e(46,b),bgCyanBright:e(106,b),bgGray:e(100,b),bgGreen:e(42,b),bgGreenBright:e(102,b),bgGrey:e(100,b),bgMagenta:e(45,b),bgMagentaBright:e(105,b),bgRed:e(41,b),bgRedBright:e(101,b),bgWhite:e(47,b),bgWhiteBright:e(107,b),bgYellow:e(43,b),bgYellowBright:e(103,b),black:e(30,f),blackBright:e(90,f),blue:e(34,f),blueBright:e(94,f),cyan:e(36,f),cyanBright:e(96,f),gray:e(90,f),green:e(32,f),greenBright:e(92,f),grey:e(90,f),magenta:e(35,f),magentaBright:e(95,f),red:e(31,f),redBright:e(91,f),white:e(37,f),whiteBright:e(97,f),yellow:e(33,f),yellowBright:e(93,f)},r={bg:n=>u(M(n,0,255)),bgHex:o(p),bgRgb:(n,g,s)=>p(M(n,0,255),M(g,0,255),M(s,0,255)),fg:n=>l(M(n,0,255)),hex:o(c),rgb:(n,g,s)=>c(M(n,0,255),M(g,0,255),M(s,0,255))};return{baseColors:a,baseStyles:O,styleMethods:r}},A=W(),J=H();v(A);const Q=(t,e,i)=>{if(e==="")return t;let o=t.indexOf(e);if(o<0)return t;const l=e.length;let u=0,c="";for(;~o;)c+=t.slice(u,o)+i,u=o+l,o=t.indexOf(e,u);return c+t.slice(u)},Z=(t,e,i)=>{if(t==null||t==="")return"";let o;if(t.raw===void 0?o=String(t):o=String.raw(t,...e),o.includes("\x1B"))for(let l=i;l;l=l.props)o=Q(o,l.close,l.open);return o.includes(`
2
- `)&&(o=o.replace(/(\r*\n)/g,`${i.closeStack}$1${i.openStack}`)),i.openStack+o+i.closeStack},x=function(t){const e=t?.level??A,{baseColors:i,baseStyles:o,styleMethods:l}=v(e),u={};let c=null;const p=({props:a},{close:r,open:n})=>{const g=(a?.openStack??"")+n,s=r+(a?.closeStack??""),m=(S,...h)=>Z(S,h,m.props);return Object.setPrototypeOf(m,c),m.props={close:r,closeStack:s,open:n,openStack:g,props:a},m.open=g,m.close=s,m},O=a=>String(a);O.strip=a=>a.replaceAll(q(),"");for(const a in i)u[a]={get(){const r=p(this,i[a]);return Object.defineProperty(this,a,{value:r}),r}};for(const a in o)u[a]={get(){const r=p(this,o[a]);return Object.defineProperty(this,a,{value:r}),r}};for(const a in l)u[a]={get(){return(...r)=>p(this,l[a](...r))}};return u.ansi256=u.fg,u.bgAnsi256=u.bg,c=Object.defineProperties({},u),Object.setPrototypeOf(O,c),O},$=new x;new x({level:J});const X=$.bold,ee=$.cyan,te=$.dim,re=$.green,ne=$.inverse,oe=$.magenta,ie=$.red,se=$.underline,le=$.yellow;export{H as $,te as E,re as I,ne as O,oe as Q,ie as V,$ as a,se as e,X as j,ee as q,le as s,W as w};
@@ -1 +0,0 @@
1
- const r=new Set(["0BSD","AGPL-3.0","AGPL-3.0-only","AGPL-3.0-or-later","Apache-1.1","Apache-2.0","Artistic-2.0","BlueOak-1.0.0","BSD-2-Clause","BSD-3-Clause","BSL-1.0","CC0-1.0","CC-BY-3.0","CC-BY-4.0","CDDL-1.0","CDDL-1.1","EPL-1.0","EPL-2.0","GPL-2.0","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0","GPL-3.0-only","GPL-3.0-or-later","ISC","LGPL-2.0","LGPL-2.1","LGPL-3.0","MIT","MIT-0","MPL-1.1","MPL-2.0","Python-2.0","Unlicense","WTFPL","Zlib"]),c={apache2:"Apache-2.0","apache 2.0":"Apache-2.0",bsd:"BSD-3-Clause","bsd-2":"BSD-2-Clause","bsd-3":"BSD-3-Clause",mit:"MIT",public:"Unlicense","public domain":"Unlicense"},l=(()=>{const e=new Map;for(const n of r)e.set(n.toLowerCase(),n);for(const[n,s]of Object.entries(c))e.set(n,s);return e})(),o=e=>{const n=e.trim();if(n.length!==0)return r.has(n)?n:l.get(n.toLowerCase())},a=e=>{let n;if(typeof e.license=="string")n=e.license;else if(e.license&&typeof e.license=="object"&&typeof e.license.type=="string")n=e.license.type;else if(Array.isArray(e.licenses)&&e.licenses.length>0){const t=e.licenses[0];t&&typeof t.type=="string"&&(n=t.type)}if(!n)return;const s=n.trim();if(s.length===0)return;if(/[()]|\b(?:and|or|with)\b/i.test(s))return[{expression:s}];const i=o(s);return i?[{license:{id:i}}]:[{license:{name:s}}]};export{a as e,o as n};
@@ -1,2 +0,0 @@
1
- import{createRequire as A}from"node:module";import{f as W,e as C,w as c,g as L,m as q}from"./index-uBVnF4ji.js";import{e as z}from"./en-D3CfXlO7.js";import{N as Q}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";import{withEnhancedPath as et}from"@visulima/task-runner";let F;const N=t=>(F??=A(import.meta.url))(t),d=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,l=t=>{if(typeof d<"u"&&d.versions&&d.versions.node){const[o,e]=d.versions.node.split(".").map(Number);if(o>22||o===22&&e>=3||o===20&&e>=16)return d.getBuiltinModule(t)}return N(t)},{Socket:G}=l("node:net"),{randomBytes:V}=l("node:crypto"),{readdir:B,rm:k,unlink:v,open:Y,readFile:J,stat:K,writeFile:U,rename:X}=l("node:fs/promises"),{spawn:Z}=l("node:child_process"),{openSync:tt,closeSync:ot}=l("node:fs");async function $(t,o,e){const s=await W(t,{buffer:!0,encoding:void 0});let i=new TextDecoder().decode(s);const{beforeParse:r,color:n}={};return typeof r=="function"&&(i=r(i)),Q(i,o,C(t),{color:n})}const st=3e4,E=100;class it extends Error{constructor(o,e){super(o),this.elapsedMs=e,this.name="ServiceReadinessError"}elapsedMs}const rt=async t=>{const o=t.host??"127.0.0.1",{port:e}=t,s=t.timeoutMs??st,i=Date.now();for(;Date.now()-i<s;){if(await nt(o,e))return;await at(E)}throw new it(`Timed out waiting for ${o}:${String(e)} to accept TCP connections (${String(s)}ms)`,Date.now()-i)},nt=(t,o)=>new Promise(e=>{const s=new G,i=r=>{s.removeAllListeners(),s.destroy(),e(r)};s.once("connect",()=>{i(!0)}),s.once("error",()=>{i(!1)}),s.setTimeout(E,()=>{i(!1)});try{s.connect(o,t)}catch{i(!1)}}),at=t=>new Promise(o=>{setTimeout(o,t)}),ct=async(t,o)=>{const e=t.readiness??(t.port===void 0?void 0:{tcp:{port:t.port}});e&&await rt({host:e.tcp.host,port:e.tcp.port,timeoutMs:o?.timeoutMs??e.tcp.timeoutMs})},_=384,b=5e3,ht=50,dt=3e4,h=async t=>{const o=c(z(t),"services");try{await L(o)}catch(e){throw e.code==="ENOTDIR"?new Error(`Service registry path ${o} exists but is not a directory. Remove it or move the conflicting file before running \`vis service\`.`,{cause:e}):e}return o},y=t=>t.replaceAll("/","_").replaceAll(":","__"),g=(t,o)=>c(t,`${y(o)}.json`),ft=(t,o)=>c(t,`${y(o)}.lock`),u=async(t,o)=>{const e=await h(t),s=g(e,o);if(await q(s))try{return await $(s)}catch{return}},lt=async t=>{const o=await h(t);let e;try{e=await B(o)}catch{return[]}const s=[];for(const i of e)if(i.endsWith(".json"))try{const r=await $(c(o,i));s.push(r)}catch{}return s},ut=async(t,o)=>{const e=await h(t),s=g(e,o.id),i=c(e,`.${V(8).toString("hex")}.tmp`);await U(i,`${JSON.stringify(o,void 0,2)}
2
- `,{mode:_});try{await mt(i,s)}catch(r){throw await k(i,{force:!0}).catch(()=>{}),r}},pt=new Set(["EACCES","EBUSY","EPERM"]),wt=8,kt=20,mt=async(t,o)=>{let e=0;for(;;)try{await X(t,o);return}catch(s){const{code:i}=s;if(!(i!==void 0&&pt.has(i))||e>=wt)throw s;const r=kt*2**e;await new Promise(n=>{setTimeout(n,r)}),e+=1}},f=async(t,o,e)=>{const s=await h(t),i=e??await u(t,o);await k(g(s,o),{force:!0}),i&&await k(i.logFile,{force:!0}).catch(()=>{})},a=t=>{try{return process.kill(t,0),!0}catch{return!1}},jt=async t=>{const o=await lt(t),e=[],s=[];for(const i of o){if(a(i.pid)){s.push(i);continue}const r=await u(t,i.id);if(r&&r.pid!==i.pid){s.push(r);continue}await f(t,i.id,i).catch(()=>{}),e.push(i.id)}return{pruned:e,surviving:s}},_t=t=>new Promise(o=>{setTimeout(o,t)}),yt=async t=>{try{const o=await Y(t,"wx",_);try{await o.writeFile(String(process.pid))}finally{await o.close().catch(()=>{})}return!0}catch(o){if(o.code==="EEXIST")return!1;throw o}},gt=async t=>{let o;try{const e=await J(t,"utf8"),s=Number.parseInt(e.trim(),10);o=Number.isFinite(s)?s:void 0}catch{return!0}if(o!==void 0&&!a(o))return!0;try{const e=await K(t);return Date.now()-e.mtimeMs>dt}catch{return!0}},M=async(t,o,e)=>{const s=await h(t),i=ft(s,o),r=Date.now();for(;!await yt(i);){if(await gt(i)){await v(i).catch(()=>{});continue}if(Date.now()-r>=b)throw new Error(`Could not acquire service lock for ${o} within ${String(b)}ms — another \`vis service\` invocation appears to be holding it.`);await _t(ht)}try{return await e()}finally{await v(i).catch(()=>{})}};function m(t,o={},e){for(const s in t){const i=t[s],r=e?`${e}:${s}`:s;typeof i=="object"&&i!==null?m(i,o,r):typeof i=="function"&&(o[r]=i)}return o}const R=(()=>{if(console.createTask)return console.createTask;const t={run:o=>o()};return()=>t})();function T(t,o,e,s){for(let i=e;i<t.length;i+=1)try{const r=s?s.run(()=>t[i](...o)):t[i](...o);if(r&&typeof r.then=="function")return Promise.resolve(r).then(()=>T(t,o,i+1,s))}catch(r){return Promise.reject(r)}}function vt(t,o,e){if(t.length>0)return T(t,o,0,R(e))}function bt(t,o,e){if(t.length>0){const s=R(e);return Promise.all(t.map(i=>s.run(()=>i(...o))))}}function w(t,o){for(const e of[...t])e(o)}var St=class{_hooks;_before;_after;_deprecatedHooks;_deprecatedMessages;constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,o,e={}){if(!t||typeof o!="function")return()=>{};const s=t;let i;for(;this._deprecatedHooks[t];)i=this._deprecatedHooks[t],t=i.to;if(i&&!e.allowDeprecated){let r=i.message;r||(r=`${s} hook has been deprecated`+(i.to?`, please use ${i.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(r)||(console.warn(r),this._deprecatedMessages.add(r))}if(!o.name)try{Object.defineProperty(o,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(o),()=>{o&&(this.removeHook(t,o),o=void 0)}}hookOnce(t,o){let e,s=(...i)=>(typeof e=="function"&&e(),e=void 0,s=void 0,o(...i));return e=this.hook(t,s),e}removeHook(t,o){const e=this._hooks[t];if(e){const s=e.indexOf(o);s!==-1&&e.splice(s,1),e.length===0&&(this._hooks[t]=void 0)}}clearHook(t){this._hooks[t]=void 0}deprecateHook(t,o){this._deprecatedHooks[t]=typeof o=="string"?{to:o}:o;const e=this._hooks[t]||[];this._hooks[t]=void 0;for(const s of e)this.hook(t,s)}deprecateHooks(t){for(const o in t)this.deprecateHook(o,t[o])}addHooks(t){const o=m(t),e=Object.keys(o).map(s=>this.hook(s,o[s]));return()=>{for(const s of e)s();e.length=0}}removeHooks(t){const o=m(t);for(const e in o)this.removeHook(e,o[e])}removeAllHooks(){this._hooks={}}callHook(t,...o){return this.callHookWith(vt,t,o)}callHookParallel(t,...o){return this.callHookWith(bt,t,o)}callHookWith(t,o,e){const s=this._before||this._after?{name:o,args:e,context:{}}:void 0;this._before&&w(this._before,s);const i=t(this._hooks[o]?[...this._hooks[o]]:[],e,o);return i instanceof Promise?i.finally(()=>{this._after&&s&&w(this._after,s)}):(this._after&&s&&w(this._after,s),i)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const o=this._before.indexOf(t);o!==-1&&this._before.splice(o,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const o=this._after.indexOf(t);o!==-1&&this._after.splice(o,1)}}}};function Ht(){return new St}const xt=()=>Ht(),Ot=async(t,o)=>{if(!(!o||o.length===0))for(const e of o){if(e.hooks)for(const[s,i]of Object.entries(e.hooks)){const r=Array.isArray(i)?i:[i];for(const n of r)t.hook(s,n)}e.setup&&await e.setup(t)}};class It{#e;#o;#s=new Map;constructor(o,e){this.#e=o,this.#o=e}startTasks(o){for(const e of o)this.#s.set(e.id,e),this.#t("task:before",e)}endTasks(o){for(const e of o)this.#s.delete(e.task.id),this.#t("task:after",e.task,e),e.status==="failure"?this.#t("task:failure",e.task,e):$t(e.status)&&this.#t("task:cacheHit",e.task,e)}printCacheMiss(o,e){this.#t("task:cacheMiss",o,e)}onTaskStdout(o,e){this.#t("task:stdout",o,e)}onTaskStderr(o,e){this.#t("task:stderr",o,e)}#t(o,...e){Promise.resolve(this.#e.callHook(o,...e)).catch(s=>{if(this.#o)try{this.#o(o,s)}catch{}})}}const $t=t=>t==="local-cache"||t==="local-cache-kept-existing"||t==="remote-cache",S=process.platform==="win32",Et=async t=>{const{command:o,cwd:e,env:s,logFile:i}=t,r=tt(i,"a",_);let n;const p=S?"cmd":"/bin/sh",j=S?["/d","/s","/c",o]:["-c",o];try{n=Z(p,j,{cwd:e,detached:!0,env:et({...process.env,...s},e),stdio:["ignore",r,r],windowsHide:!0})}finally{ot(r)}if(n.pid===void 0&&await new Promise((x,O)=>{n.once("spawn",()=>{x()}),n.once("error",I=>{O(I)})}),n.pid===void 0)throw new Error(`Failed to spawn detached process for command: ${o}`);return n.unref(),{pid:n.pid}},P=5e3,At=async t=>M(t.workspaceRoot,t.id,async()=>{const o=await u(t.workspaceRoot,t.id);if(o&&a(o.pid))throw new Error(`Service ${t.id} is already running (pid ${String(o.pid)})`);o&&await f(t.workspaceRoot,t.id,o);const e=await h(t.workspaceRoot),s=y(t.id),i=c(e,`${s}.log`),{pid:r}=await Et({command:t.command,cwd:t.cwd,env:t.env,logFile:i}),n={command:t.command,config:t.config,cwd:t.cwd,env:t.config.env??{},id:t.id,logFile:i,pid:r,slug:s,startedAt:new Date().toISOString(),visVersion:process.env.VIS_VERSION??"0.0.0"};if(await ut(t.workspaceRoot,n),t.skipReadiness!==!0)try{await ct(t.config,{timeoutMs:t.readinessTimeoutMs})}catch(p){throw await D(r,t.config.killGracePeriodMs??P).catch(()=>{}),await f(t.workspaceRoot,t.id,n).catch(()=>{}),p}return{entry:n}}),Ft=async t=>M(t.workspaceRoot,t.id,async()=>{const o=await u(t.workspaceRoot,t.id);if(!o)return{stopped:!1};if(!a(o.pid))return await f(t.workspaceRoot,t.id,o),{stopped:!1};const e=t.graceMs??o.config.killGracePeriodMs??P;return await D(o.pid,e),await f(t.workspaceRoot,t.id,o),{stopped:!0}}),D=async(t,o)=>{H(t,"SIGTERM");const e=Date.now();for(;Date.now()-e<o;){if(!a(t))return;await new Promise(s=>{setTimeout(s,100)})}a(t)&&H(t,"SIGKILL")},H=(t,o)=>{try{process.platform==="win32"?process.kill(t,o):process.kill(-t,o)}catch(e){if(e.code==="ESRCH")return;throw e}};export{It as H,it as S,At as a,ct as b,lt as c,xt as d,Ot as e,f,a as i,jt as p,u as r,Ft as s};
@@ -1 +0,0 @@
1
- import{createRequire as f}from"node:module";import{w as c}from"./index-uBVnF4ji.js";let p;const k=e=>(p??=f(import.meta.url))(e),a=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,g=e=>{if(typeof a<"u"&&a.versions&&a.versions.node){const[t,n]=a.versions.node.split(".").map(Number);if(t>22||t===22&&n>=3||t===20&&n>=16)return a.getBuiltinModule(e)}return k(e)},{statSync:m,existsSync:d}=g("node:fs"),b={aube:["aube-lock.yaml"],bun:["bun.lock","bun.lockb"],npm:["npm-shrinkwrap.json","package-lock.json"],pnpm:["pnpm-lock.yaml"],yarn:["yarn.lock"]},y={aube:["node_modules/.aube-state","node_modules/.modules.yaml"],bun:["node_modules/.bun-tag"],npm:["node_modules/.package-lock.json"],pnpm:["node_modules/.modules.yaml","node_modules/.pnpm/lock.yaml"],yarn:["node_modules/.yarn-integrity","node_modules/.yarn-state.yml",".yarn/install-state.gz"]},_={ci:{aube:"aube ci",bun:"bun install --frozen-lockfile",npm:"npm ci",pnpm:"pnpm install --frozen-lockfile",yarn:"yarn install --immutable"},tty:{aube:"aube install",bun:"bun install",npm:"npm install",pnpm:"pnpm install",yarn:"yarn install"}},h=1e3,M=e=>{for(const[t,n]of Object.entries(b))for(const s of n)if(d(c(e,s)))return{lockfileFile:s,manager:t}},j=(e,t)=>{let n;for(const s of y[t]){const o=c(e,s);if(!d(o))continue;const{mtimeMs:i}=m(o);(!n||i>n.mtimeMs)&&(n={mtimeMs:i,path:s})}return n},C=(e,t={})=>{const n=M(e);if(!n)return{checked:!1};const{lockfileFile:s,manager:o}=n,i=m(c(e,s)).mtimeMs,l=j(e,o),u=_[t.inCi?"ci":"tty"][o],r={installMarkerMtimeMs:l?.mtimeMs,lockfileMtimeMs:i,lockfilePath:s,marker:l?.path,packageManager:o};return l?i>l.mtimeMs+h?{checked:!0,detail:r,failure:"stale-install",message:`${s} is newer than node_modules (${l.path}) — run \`${u}\` to sync.`}:{checked:!0,detail:r}:{checked:!0,detail:r,failure:"missing-install",message:`lockfile detected but node_modules looks uninitialised — run \`${u}\` before \`vis run\`.`}},q=(e,t,n,s={})=>{if(s.skip)return{checked:!1,shouldContinue:!0};const o=C(e,{inCi:t});if(!o.failure)return{...o,shouldContinue:!0};const i=`preflight: ${o.message??"lockfile drift detected"}`;return t&&!s.ciAsWarning?{...o,formattedMessage:i,shouldContinue:!1}:(n.warn(i),{...o,formattedMessage:i,shouldContinue:!0})};export{M as d,q as r};
@@ -1 +0,0 @@
1
- import{createRequire as O}from"node:module";let $;const P=t=>($??=O(import.meta.url))(t),u=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,h=t=>{if(typeof u<"u"&&u.versions&&u.versions.node){const[e,s]=u.versions.node.split(".").map(Number);if(e>22||e===22&&s>=3||e===20&&s>=16)return u.getBuiltinModule(t)}return P(t)},{spawn:S}=h("node:child_process"),{cwd:y}=u,{basename:A,normalize:T,delimiter:p,resolve:E,dirname:f}=h("node:path"),{pipeline:k}=h("node:stream/promises"),{PassThrough:j}=h("node:stream"),q=h("node:readline"),{openSync:B,readSync:H,closeSync:M,statSync:R}=h("node:fs"),F=/^path$/i,w={key:"PATH",value:""};function b(t){for(const e in t){if(!Object.prototype.hasOwnProperty.call(t,e)||!F.test(e))continue;const s=t[e];return s?{key:e,value:s}:w}return w}function L(t,e){const s=e.value.split(p),r=[];let n=t,i;do r.push(E(n,"node_modules",".bin")),i=n,n=f(n);while(n!==i);r.push(f(process.execPath));const o=r.concat(s).join(p);return{key:e.key,value:o}}function W(t,e,s=!0){const r={...process.env,...e};if(!s)return r;const n=L(t,b(r));return r[n.key]=n.value,r}const X=t=>{let e=t.length;const s=new j,r=()=>{--e===0&&s.end()};for(const n of t)k(n,s,{end:!1}).then(r).catch(r);return s},_=/([()\][%!^"`<>&|;, *?])/g,z=/^#!\s*(.+)/,D=/\.(?:com|exe)$/i,I=/node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i,N=process.platform==="win32",V=[".EXE",".CMD",".BAT",".COM"];function G(t,e=[],s={}){if(s.shell===!0||!N)return{command:t,args:e,options:s};let r=g(t,s),n=null;if(r!==null){const i=Buffer.alloc(150);let o=null;try{o=B(r,"r"),H(o,i,0,150,0)}catch{}finally{o!==null&&M(o)}const c=i.toString().match(z);if(c!==null){const l=c[1].trim(),a=l.indexOf(" "),d=a!==-1?l.slice(0,a):l,x=a!==-1?l.slice(a+1):"",m=A(d);n=m==="env"?x||null:m}}if(n!==null&&r!==null&&(e=[r,...e],t=n,r=g(t,s)),r===null||!D.test(r)){const i=r!==null&&I.test(r);t=T(t),t=t.replace(_,"^$1"),e=e.map(o=>(o=o.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),o=o.replace(/(?=(\\+?)?)\1$/,"$1$1"),o=`"${o}"`,o=o.replace(_,"^$1"),i&&(o=o.replace(_,"^$1")),o)),e=["/d","/s","/c",`"${[t,...e].join(" ")}"`],t=s.env?.comspec??"cmd.exe",s={...s,windowsVerbatimArguments:!0}}return{command:t,args:e,options:s}}function g(t,e){const s=(e.cwd??y()).toString(),r=e.env??process.env,n=b(r).value,i=t.includes("/")||t.includes("\\")?[""]:[s,...n.split(p)],o=r.PATHEXT?r.PATHEXT.split(p):V;t.includes(".")&&o[0]!==""&&o.unshift("");for(const c of i){const l=E(s,c.startsWith('"')&&c.endsWith('"')&&c.length>1?c.slice(1,-1):c,t);for(const a of o){const d=l+a;try{if(R(d).isFile())return d}catch{}}}return null}var v=class extends Error{result;output;get exitCode(){if(this.result.exitCode!==null)return this.result.exitCode}constructor(t,e){super(`Process exited with non-zero status (${t.exitCode})`),this.result=t,this.output=e}};const J={timeout:void 0,persist:!1},Q={windowsHide:!0};function Y(t){const e=new AbortController;for(const s of t){if(s.aborted)return e.abort(),s;const r=()=>{e.abort(s.reason)};s.addEventListener("abort",r,{signal:e.signal})}return e.signal}async function C(t){let e="";try{for await(const s of t)e+=s.toString()}catch{}return e}var Z=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&this._process.exitCode!==null)return this._process.exitCode}constructor(t,e,s){this._options={...J,...s},this._command=t,this._args=e??[],this._processClosed=new Promise(r=>{this._resolveClose=r})}kill(t){return this._process?.kill(t)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(t,e,s){return U(t,e,{...s,stdin:this})}async*[Symbol.asyncIterator](){const t=this._process;if(!t)return;const e=[];this._streamErr&&e.push(this._streamErr),this._streamOut&&e.push(this._streamOut);const s=X(e),r=q.createInterface({input:s});for await(const n of r)yield n.toString();if(await this._processClosed,t.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new v(this)}async _waitForOutput(){const t=this._process;if(!t)throw new Error("No process was started");const[e,s]=await Promise.all([this._streamOut?C(this._streamOut):"",this._streamErr?C(this._streamErr):""]);await this._processClosed;const{stdin:r}=this._options;if(r&&typeof r!="string"&&await r,t.removeAllListeners(),this._thrownError)throw this._thrownError;const n={stderr:s,stdout:e,exitCode:this.exitCode};if(this._options.throwOnError&&this.exitCode!==0&&this.exitCode!==void 0)throw new v(this,n);return n}then(t,e){return this._waitForOutput().then(t,e)}_streamOut;_streamErr;spawn(){const t=y(),e=this._options,s={...Q,...e.nodeOptions},r=[];this._resetState(),e.timeout!==void 0&&r.push(AbortSignal.timeout(e.timeout)),e.signal!==void 0&&r.push(e.signal),e.persist===!0&&(s.detached=!0),r.length>0&&(s.signal=Y(r)),s.env=W(t,s.env,e.nodePath);const n=G(this._command,this._args,s),i=S(n.command,n.args,n.options);if(i.stderr&&(this._streamErr=i.stderr),i.stdout&&(this._streamOut=i.stdout),this._process=i,i.once("error",this._onError),i.once("close",this._onClose),i.stdin){const{stdin:o}=e;typeof o=="string"?i.stdin.end(o):o?.process?.stdout?.pipe(i.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(t=>{this._resolveClose=t}),this._thrownError=void 0}_onError=t=>{if(t.name==="AbortError"&&(!(t.cause instanceof Error)||t.cause.name!=="TimeoutError")){this._aborted=!0;return}this._thrownError=t};_onClose=()=>{this._resolveClose&&this._resolveClose()}};const K=(t,e,s)=>{const r=new Z(t,e,s);return r.spawn(),r},U=K;export{K as k};
@@ -1 +0,0 @@
1
- import{createRequire as j}from"node:module";import{w as d,l as y}from"./index-uBVnF4ji.js";import{a as S}from"./readJsonSync-DweZd5ZA-0eZh9sGm.js";let M;const b=i=>(M??=j(import.meta.url))(i),f=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,$=i=>{if(typeof f<"u"&&f.versions&&f.versions.node){const[e,t]=f.versions.node.split(".").map(Number);if(e>22||e===22&&t>=3||e===20&&t>=16)return f.getBuiltinModule(i)}return b(i)},{readdirSync:g,lstatSync:w}=$("node:fs"),q=/^([^<(]+?)?(?:<([^>]+)>)?\s*(?:\(([^)]+)\))?\s*$/u,A=i=>{const e=i.match(q);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}},R=i=>{if(!Array.isArray(i)||i.length===0)return;const e=[];for(const t of i)if(typeof t=="string"){const n=A(t);n&&e.push(n)}else if(t&&typeof t=="object"){const n=t,r=typeof n.name=="string"?n.name:void 0,o=typeof n.email=="string"?n.email:void 0,u=typeof n.url=="string"?n.url:void 0;(r||o||u)&&e.push({email:o,name:r,url:u})}return e.length>0?e:void 0},D=i=>{const e=d(i,"node_modules");if(!y(e))return new Map;const t=new Map,n=new Set,r=(o,u="")=>{if(n.has(o))return;n.add(o);let _;try{_=g(o)}catch{return}for(const a of _){const c=d(o,a);let p;try{p=w(c)}catch{continue}if(p.isSymbolicLink())continue;if(a.startsWith("@")){p.isDirectory()&&r(c,`${a}/`);continue}if(a===".pnpm"&&u===""){let s;try{s=g(c)}catch{continue}for(const m of s){const l=d(c,m,"node_modules");y(l)&&r(l)}continue}if(a.startsWith(".")||!p.isDirectory())continue;const h=u+a,v=d(c,"package.json");try{if(!y(v))continue;const s=S(v);if(typeof s.version!="string")continue;const m=`${h}@${s.version}`;t.has(m)||t.set(m,{directory:c,license:s.license,licenses:Array.isArray(s.licenses)?s.licenses:void 0,maintainers:R(s.maintainers),name:h,scripts:s.scripts&&typeof s.scripts=="object"?s.scripts:void 0,version:s.version});const l=d(c,"node_modules");y(l)&&r(l)}catch{}}};return r(e),t};export{R as n,D as r};
@@ -1,34 +0,0 @@
1
- import{w as d,l as u,z as o,j as $}from"./index-uBVnF4ji.js";import{a as k}from"../packem_chunks/cli-main.js";const E=(x,g,h,m=[])=>{const t=[];if(h===void 0)return t.push("minimumReleaseAge not set in vis.config; skipping native sync."),t;const l=Number.isFinite(h)?Math.max(0,Math.round(h)):0;switch(x){case"bun":{const n=d(g,"bunfig.toml");let e=u(n)?o(n):"";const a=l*60,i=`minimumReleaseAge = ${String(a)}`,s=m.length>0?`minimumReleaseAgeExcludes = [${m.map(p=>`"${p.replaceAll(String.raw`"`,String.raw`\"`)}"`).join(", ")}]`:void 0,c=/^\[install\][ \t]*\n/m.exec(e);if(c?.index===void 0){const p=s?`${i}
2
- ${s}`:i;e=`${e.trimEnd()?`${e.trimEnd()}
3
-
4
- `:""}[install]
5
- ${p}
6
- `}else{const p=c.index+c[0].length,R=e.slice(p),A=/^\[/m.exec(R),y=A?.index===void 0?e.length:p+A.index;let r=e.slice(p,y);r=/^[ \t]*minimumReleaseAge[ \t]*=/m.test(r)?r.replace(/^[ \t]*minimumReleaseAge[ \t]*=.*$/m,i):`${i}
7
- ${r}`,s&&(r=/^[ \t]*minimumReleaseAgeExcludes[ \t]*=/m.test(r)?r.replace(/^[ \t]*minimumReleaseAgeExcludes[ \t]*=.*$/m,s):`${s}
8
- ${r}`),e=`${e.slice(0,p)}${r}${e.slice(y)}`}$(n,e.endsWith(`
9
- `)?e:`${e}
10
- `),t.push(`Updated bunfig.toml [install] minimumReleaseAge = ${String(a)} (${String(l)} minutes)`),s&&t.push(`Updated bunfig.toml [install] minimumReleaseAgeExcludes (${String(m.length)} entries)`);break}case"npm":{const n=d(g,".npmrc");let e=u(n)?o(n):"";const a=l===0?0:Math.max(1,Math.ceil(l/1440)),i=`min-release-age=${String(a)}`;e=/^\s*min-release-age\s*=/m.test(e)?e.replace(/^\s*min-release-age\s*=.*$/m,i):`${e.trimEnd()}
11
- ${i}
12
- `,$(n,e.endsWith(`
13
- `)?e:`${e}
14
- `),t.push(`Updated .npmrc min-release-age=${String(a)} (rounded up from ${String(l)} 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=d(g,"pnpm-workspace.yaml");if(!u(n)){t.push("pnpm-workspace.yaml not found. Cannot sync minimumReleaseAge.");break}let e=o(n);e.endsWith(`
15
- `)||(e+=`
16
- `);const a=`minimumReleaseAge: ${String(l)}
17
- `;if(e=/^minimumReleaseAge[ \t]*:.*$/m.test(e)?e.replace(/^minimumReleaseAge[ \t]*:.*$/m,a.trimEnd()):`${e.trimEnd()}
18
-
19
- ${a}`,m.length>0){const i=`minimumReleaseAgeExclude:
20
- ${m.map(c=>` - ${k(c)}`).join(`
21
- `)}
22
- `,s=/^minimumReleaseAgeExclude:[ \t]*\n(?:[ \t]{2}[^\n]*\n)*/m;e=s.test(e)?e.replace(s,i):`${e.trimEnd()}
23
-
24
- ${i}`}$(n,e),t.push(`Updated pnpm-workspace.yaml minimumReleaseAge: ${String(l)} minutes`),m.length>0&&t.push(`Updated pnpm-workspace.yaml minimumReleaseAgeExclude (${String(m.length)} entries)`);break}case"yarn":{const n=d(g,".yarnrc.yml");if(!u(n)){t.push("yarn classic lacks npmMinimalAgeGate; .yarnrc.yml not found, skipping.");break}let e=o(n);const a=`npmMinimalAgeGate: ${String(l)}`;if(e.endsWith(`
25
- `)||(e+=`
26
- `),e=/^npmMinimalAgeGate[ \t]*:.*$/m.test(e)?e.replace(/^npmMinimalAgeGate[ \t]*:.*$/m,a):`${e.trimEnd()}
27
-
28
- ${a}
29
- `,m.length>0){const i=`npmPreapprovedPackages:
30
- ${m.map(c=>` - ${k(c)}`).join(`
31
- `)}
32
- `,s=/^npmPreapprovedPackages:[ \t]*\n(?:[ \t]{2}[^\n]*\n)*/m;e=s.test(e)?e.replace(s,i):`${e.trimEnd()}
33
-
34
- ${i}`}$(n,e),t.push(`Updated .yarnrc.yml npmMinimalAgeGate: ${String(l)} (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{E as S};