@herbertgao/pi-extensions 2026.10.0 → 2026.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (769) hide show
  1. package/README.md +16 -12
  2. package/THIRD_PARTY_NOTICES.md +3 -3
  3. package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-audit.md +2 -2
  4. package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-debt.md +2 -2
  5. package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-gain.md +1 -1
  6. package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-help.md +1 -1
  7. package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail-review.md +2 -2
  8. package/node_modules/@dietrichgebert/ponytail/.opencode/command/ponytail.md +1 -1
  9. package/node_modules/@dietrichgebert/ponytail/.opencode/plugins/index.js +4 -0
  10. package/node_modules/@dietrichgebert/ponytail/.opencode/plugins/ponytail-frontmatter.cjs +43 -3
  11. package/node_modules/@dietrichgebert/ponytail/.opencode/plugins/ponytail.mjs +142 -59
  12. package/node_modules/@dietrichgebert/ponytail/.qoder/rules/ponytail.md +21 -21
  13. package/node_modules/@dietrichgebert/ponytail/.qoder-plugin/plugin.json +1 -1
  14. package/node_modules/@dietrichgebert/ponytail/AGENTS.md +21 -21
  15. package/node_modules/@dietrichgebert/ponytail/README.md +52 -242
  16. package/node_modules/@dietrichgebert/ponytail/hooks/claude-codex-hooks.json +3 -3
  17. package/node_modules/@dietrichgebert/ponytail/hooks/copilot-hooks.json +4 -4
  18. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-activate.js +70 -16
  19. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-config.js +8 -7
  20. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-instructions.js +30 -30
  21. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-map.js +103 -0
  22. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-mode-tracker.js +46 -23
  23. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-runtime.js +39 -7
  24. package/node_modules/@dietrichgebert/ponytail/hooks/ponytail-subagent.js +20 -3
  25. package/node_modules/@dietrichgebert/ponytail/hooks/qoder-hooks.json +3 -3
  26. package/node_modules/@dietrichgebert/ponytail/package.json +3 -3
  27. package/node_modules/@dietrichgebert/ponytail/pi-extension/index.js +47 -17
  28. package/node_modules/@dietrichgebert/ponytail/scripts/uninstall.js +21 -7
  29. package/node_modules/@dietrichgebert/ponytail/skills/plugin.json +5 -0
  30. package/node_modules/@dietrichgebert/ponytail/skills/ponytail/SKILL.md +33 -101
  31. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-audit/SKILL.md +89 -27
  32. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-debt/SKILL.md +13 -12
  33. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-gain/SKILL.md +21 -18
  34. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-help/SKILL.md +12 -13
  35. package/node_modules/@dietrichgebert/ponytail/skills/ponytail-review/SKILL.md +96 -52
  36. package/node_modules/@herbertgao/pi-agency/LICENSE +21 -0
  37. package/node_modules/@herbertgao/pi-agency/README.md +40 -0
  38. package/node_modules/@herbertgao/pi-agency/package.json +53 -0
  39. package/node_modules/@herbertgao/pi-agency/src/index.ts +441 -0
  40. package/node_modules/@herbertgao/pi-cc-extensions/extensions/feature/compact-thinking.ts +12 -12
  41. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/compact-mode.ts +30 -6
  42. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/default-mode.ts +15 -9
  43. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/mouse/interaction.ts +27 -9
  44. package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/codemode.ts +4 -1
  45. package/node_modules/@herbertgao/pi-cc-extensions/package.json +2 -2
  46. package/node_modules/@narumitw/pi-caffeinate/package.json +4 -4
  47. package/node_modules/@tifan/pi-mermaid-open/package.json +5 -1
  48. package/node_modules/@tifan/pi-mermaid-open/src/index.ts +26 -9
  49. package/node_modules/@tifan/pi-recap/package.json +1 -1
  50. package/node_modules/@tifan/pi-recap/src/index.ts +104 -20
  51. package/node_modules/@tifan/pi-recap/src/models.ts +46 -4
  52. package/node_modules/pi-antigravity/README.md +23 -2
  53. package/node_modules/pi-antigravity/package.json +5 -3
  54. package/node_modules/pi-antigravity/src/diagnostics/diagnostics.ts +3 -2
  55. package/node_modules/pi-antigravity/src/features/generate-image.ts +72 -0
  56. package/node_modules/pi-antigravity/src/features/google-search.ts +71 -0
  57. package/node_modules/pi-antigravity/src/image/image.ts +86 -47
  58. package/node_modules/pi-antigravity/src/image/native.ts +69 -0
  59. package/node_modules/pi-antigravity/src/index.ts +52 -137
  60. package/node_modules/pi-antigravity/src/search/search.ts +130 -31
  61. package/node_modules/pi-antigravity/src/stream/stream.ts +162 -113
  62. package/node_modules/pi-antigravity/src/types/enums.ts +1 -0
  63. package/node_modules/pi-antigravity/src/types/types.ts +1 -1
  64. package/node_modules/pi-antigravity/src/utils/security.ts +47 -1
  65. package/node_modules/pi-antigravity/src/utils/util.ts +38 -6
  66. package/node_modules/pi-lens/CHANGELOG.md +1064 -0
  67. package/node_modules/pi-lens/README.md +115 -25
  68. package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +6 -2
  69. package/node_modules/pi-lens/dist/chunk-22AVIGXS.js +560 -0
  70. package/node_modules/pi-lens/dist/chunk-27BBHSZC.js +106 -0
  71. package/node_modules/pi-lens/dist/chunk-2BEMIWEW.js +51 -0
  72. package/node_modules/pi-lens/dist/chunk-2EECBNC5.js +89 -0
  73. package/node_modules/pi-lens/dist/chunk-34U7PLGE.js +23 -0
  74. package/node_modules/pi-lens/dist/chunk-3I5QFT3N.js +181 -0
  75. package/node_modules/pi-lens/dist/chunk-3MED75HT.js +37 -0
  76. package/node_modules/pi-lens/dist/chunk-47D2BO4S.js +87 -0
  77. package/node_modules/pi-lens/dist/chunk-4RERDEXR.js +348 -0
  78. package/node_modules/pi-lens/dist/chunk-4W2PLC4J.js +27 -0
  79. package/node_modules/pi-lens/dist/chunk-52H5B5TC.js +202 -0
  80. package/node_modules/pi-lens/dist/chunk-54B42YRX.js +27 -0
  81. package/node_modules/pi-lens/dist/chunk-5RXBNSW2.js +266 -0
  82. package/node_modules/pi-lens/dist/chunk-5THXD6X5.js +201 -0
  83. package/node_modules/pi-lens/dist/chunk-5W3R6LFT.js +24 -0
  84. package/node_modules/pi-lens/dist/chunk-5ZEJHV35.js +341 -0
  85. package/node_modules/pi-lens/dist/chunk-6P62QVEA.js +118 -0
  86. package/node_modules/pi-lens/dist/chunk-6QIUX4EP.js +459 -0
  87. package/node_modules/pi-lens/dist/chunk-6VCD4VKZ.js +78 -0
  88. package/node_modules/pi-lens/dist/chunk-7F72PXY2.js +326 -0
  89. package/node_modules/pi-lens/dist/chunk-7FBF7NPR.js +998 -0
  90. package/node_modules/pi-lens/dist/chunk-7U2IDNXN.js +37 -0
  91. package/node_modules/pi-lens/dist/chunk-ABBOA7UD.js +157 -0
  92. package/node_modules/pi-lens/dist/chunk-AHDW3GPE.js +50 -0
  93. package/node_modules/pi-lens/dist/chunk-AJ3QXTRQ.js +756 -0
  94. package/node_modules/pi-lens/dist/chunk-AJVLWNFN.js +1610 -0
  95. package/node_modules/pi-lens/dist/chunk-AJXODZY6.js +112 -0
  96. package/node_modules/pi-lens/dist/chunk-ARFCXG7S.js +84 -0
  97. package/node_modules/pi-lens/dist/chunk-AS44CFQ4.js +708 -0
  98. package/node_modules/pi-lens/dist/chunk-AWE5TMPO.js +38 -0
  99. package/node_modules/pi-lens/dist/chunk-B3I2UUT4.js +4692 -0
  100. package/node_modules/pi-lens/dist/chunk-BRJKOBZP.js +331 -0
  101. package/node_modules/pi-lens/dist/chunk-BW5KFIQC.js +59 -0
  102. package/node_modules/pi-lens/dist/chunk-C2AUYXQH.js +149 -0
  103. package/node_modules/pi-lens/dist/chunk-CGGAIP7J.js +29 -0
  104. package/node_modules/pi-lens/dist/chunk-D6QS3U6M.js +30 -0
  105. package/node_modules/pi-lens/dist/chunk-DFVMIKMQ.js +349 -0
  106. package/node_modules/pi-lens/dist/chunk-DIULIWKU.js +169 -0
  107. package/node_modules/pi-lens/dist/chunk-DQ2NZ7C4.js +2317 -0
  108. package/node_modules/pi-lens/dist/chunk-E2WFBRHM.js +213 -0
  109. package/node_modules/pi-lens/dist/chunk-E4MAEDPM.js +50 -0
  110. package/node_modules/pi-lens/dist/chunk-EOKRQ3SA.js +30 -0
  111. package/node_modules/pi-lens/dist/chunk-F3AU2TMM.js +2626 -0
  112. package/node_modules/pi-lens/dist/chunk-F3P7VQ7H.js +170 -0
  113. package/node_modules/pi-lens/dist/chunk-FC4RP4I2.js +12 -0
  114. package/node_modules/pi-lens/dist/chunk-FJNKANOS.js +32 -0
  115. package/node_modules/pi-lens/dist/chunk-GUOGVTCQ.js +146 -0
  116. package/node_modules/pi-lens/dist/chunk-GVXA6CCE.js +18 -0
  117. package/node_modules/pi-lens/dist/chunk-HHYAELLJ.js +2334 -0
  118. package/node_modules/pi-lens/dist/chunk-HMFXILPV.js +83 -0
  119. package/node_modules/pi-lens/dist/chunk-HVUZXSWK.js +421 -0
  120. package/node_modules/pi-lens/dist/chunk-HWBZIGMJ.js +62 -0
  121. package/node_modules/pi-lens/dist/chunk-I3R7GKDR.js +17 -0
  122. package/node_modules/pi-lens/dist/chunk-I7SPGOWI.js +55 -0
  123. package/node_modules/pi-lens/dist/chunk-IIXOAGHR.js +38 -0
  124. package/node_modules/pi-lens/dist/chunk-IVP5KAB7.js +2250 -0
  125. package/node_modules/pi-lens/dist/chunk-IXEBJSUE.js +22 -0
  126. package/node_modules/pi-lens/dist/chunk-JOLITGCC.js +27 -0
  127. package/node_modules/pi-lens/dist/chunk-K6VYLB2U.js +145 -0
  128. package/node_modules/pi-lens/dist/chunk-LJDODBBZ.js +78 -0
  129. package/node_modules/pi-lens/dist/chunk-LNAKEO63.js +78 -0
  130. package/node_modules/pi-lens/dist/chunk-LSMJ6KBE.js +4139 -0
  131. package/node_modules/pi-lens/dist/chunk-LW6XKDZQ.js +5565 -0
  132. package/node_modules/pi-lens/dist/chunk-N3YQJI6O.js +899 -0
  133. package/node_modules/pi-lens/dist/chunk-NABLC7W3.js +148 -0
  134. package/node_modules/pi-lens/dist/chunk-NKOUFPQF.js +659 -0
  135. package/node_modules/pi-lens/dist/chunk-NL5GLMFI.js +211 -0
  136. package/node_modules/pi-lens/dist/chunk-NMABWBZN.js +327 -0
  137. package/node_modules/pi-lens/dist/chunk-NTHH2J74.js +27 -0
  138. package/node_modules/pi-lens/dist/chunk-NTUJEGDZ.js +59 -0
  139. package/node_modules/pi-lens/dist/chunk-NXL4FFQQ.js +47 -0
  140. package/node_modules/pi-lens/dist/chunk-NXPS2L6U.js +466 -0
  141. package/node_modules/pi-lens/dist/chunk-O5WILGMI.js +42 -0
  142. package/node_modules/pi-lens/dist/chunk-O6TQT6RI.js +48 -0
  143. package/node_modules/pi-lens/dist/chunk-OAXNDZJ7.js +323 -0
  144. package/node_modules/pi-lens/dist/chunk-ODEEOXPH.js +44 -0
  145. package/node_modules/pi-lens/dist/chunk-OQGFCZJ4.js +4533 -0
  146. package/node_modules/pi-lens/dist/chunk-ORTMY4Q4.js +282 -0
  147. package/node_modules/pi-lens/dist/chunk-OS32RNR2.js +442 -0
  148. package/node_modules/pi-lens/dist/chunk-PAK6IDME.js +189 -0
  149. package/node_modules/pi-lens/dist/chunk-PWFHBTSF.js +406 -0
  150. package/node_modules/pi-lens/dist/chunk-Q5U6FMDI.js +2352 -0
  151. package/node_modules/pi-lens/dist/chunk-QOZXJ4NA.js +3364 -0
  152. package/node_modules/pi-lens/dist/chunk-QYF5S6P6.js +45 -0
  153. package/node_modules/pi-lens/dist/chunk-RIISMHKN.js +36 -0
  154. package/node_modules/pi-lens/dist/chunk-RPD4ZSB7.js +25 -0
  155. package/node_modules/pi-lens/dist/chunk-RPD5K5NC.js +79 -0
  156. package/node_modules/pi-lens/dist/chunk-RUOG5D2C.js +262 -0
  157. package/node_modules/pi-lens/dist/chunk-T4ERT73Y.js +599 -0
  158. package/node_modules/pi-lens/dist/chunk-T6D4Q4AQ.js +54 -0
  159. package/node_modules/pi-lens/dist/chunk-TGPXLY2J.js +391 -0
  160. package/node_modules/pi-lens/dist/chunk-TLGFBM3F.js +12116 -0
  161. package/node_modules/pi-lens/dist/chunk-TO6WL3GM.js +88 -0
  162. package/node_modules/pi-lens/dist/chunk-TT22N74J.js +517 -0
  163. package/node_modules/pi-lens/dist/chunk-TVN5N6GY.js +21216 -0
  164. package/node_modules/pi-lens/dist/chunk-U3VGR4VU.js +308 -0
  165. package/node_modules/pi-lens/dist/chunk-UK3CMEAL.js +1250 -0
  166. package/node_modules/pi-lens/dist/chunk-UOPVJQ4N.js +103 -0
  167. package/node_modules/pi-lens/dist/chunk-UXVNL3D7.js +23 -0
  168. package/node_modules/pi-lens/dist/chunk-UY752QSN.js +45 -0
  169. package/node_modules/pi-lens/dist/chunk-V5PXFSZK.js +188 -0
  170. package/node_modules/pi-lens/dist/chunk-V7R425XG.js +398 -0
  171. package/node_modules/pi-lens/dist/chunk-VCSRSYLF.js +81 -0
  172. package/node_modules/pi-lens/dist/chunk-VD4JQCQC.js +162 -0
  173. package/node_modules/pi-lens/dist/chunk-VDBPVIKD.js +62 -0
  174. package/node_modules/pi-lens/dist/chunk-VHQLPIRJ.js +114 -0
  175. package/node_modules/pi-lens/dist/chunk-VN2AXLEX.js +5414 -0
  176. package/node_modules/pi-lens/dist/chunk-VNMT7C64.js +478 -0
  177. package/node_modules/pi-lens/dist/chunk-WONERJTP.js +309 -0
  178. package/node_modules/pi-lens/dist/chunk-XECLWQZN.js +85 -0
  179. package/node_modules/pi-lens/dist/chunk-XIMYZ3JA.js +27 -0
  180. package/node_modules/pi-lens/dist/chunk-XK4CIILI.js +144 -0
  181. package/node_modules/pi-lens/dist/chunk-Y4T27COV.js +562 -0
  182. package/node_modules/pi-lens/dist/chunk-YGVYKNSN.js +1860 -0
  183. package/node_modules/pi-lens/dist/chunk-YLF3PPT5.js +308 -0
  184. package/node_modules/pi-lens/dist/chunk-YSNFMJKN.js +14 -0
  185. package/node_modules/pi-lens/dist/chunk-Z3CCVDUB.js +76 -0
  186. package/node_modules/pi-lens/dist/chunk-Z54ZSOBZ.js +61 -0
  187. package/node_modules/pi-lens/dist/chunk-ZAWW3AF6.js +97 -0
  188. package/node_modules/pi-lens/dist/chunk-ZMOL6RQC.js +167 -0
  189. package/node_modules/pi-lens/dist/index.js +16456 -8335
  190. package/node_modules/pi-lens/dist/mcp/analyze-cli.js +186 -232
  191. package/node_modules/pi-lens/dist/mcp/cli.js +137 -98
  192. package/node_modules/pi-lens/dist/mcp/server.js +22589 -1573
  193. package/node_modules/pi-lens/dist/mcp/worker.js +97 -38
  194. package/node_modules/pi-lens/dist/probes/installer.js +135 -0
  195. package/node_modules/pi-lens/dist/workers/project-snapshot-persist-worker.js +22 -0
  196. package/node_modules/pi-lens/dist/workers/review-graph-persist-worker.js +15 -0
  197. package/node_modules/pi-lens/docs/agent-guide.md +13 -4
  198. package/node_modules/pi-lens/docs/agent-tools.md +42 -0
  199. package/node_modules/pi-lens/docs/ast-grep_rules_catalog.md +3 -2
  200. package/node_modules/pi-lens/docs/configuration.md +20 -1
  201. package/node_modules/pi-lens/docs/environment-variables.md +52 -2
  202. package/node_modules/pi-lens/docs/features.md +8 -4
  203. package/node_modules/pi-lens/docs/globalconfig.md +1 -0
  204. package/node_modules/pi-lens/docs/io-bridge-v2-migration.md +94 -0
  205. package/node_modules/pi-lens/docs/lsp-capability-matrix.md +36 -4
  206. package/node_modules/pi-lens/docs/lsp-idle-eviction.md +124 -0
  207. package/node_modules/pi-lens/docs/mcp.md +21 -5
  208. package/node_modules/pi-lens/docs/merge-queue-rollout.md +77 -0
  209. package/node_modules/pi-lens/docs/pi-lens-fixer.md +156 -88
  210. package/node_modules/pi-lens/docs/pi-lens-investigator.md +74 -26
  211. package/node_modules/pi-lens/docs/pi-lens-merge-policy.md +694 -0
  212. package/node_modules/pi-lens/docs/pi-lens-monitor.md +73 -7
  213. package/node_modules/pi-lens/docs/pi-lens-retro.md +6 -4
  214. package/node_modules/pi-lens/docs/pi-lens-reviewer.md +188 -48
  215. package/node_modules/pi-lens/docs/pi-lens-subagent.md +246 -45
  216. package/node_modules/pi-lens/docs/pi-lens-warden.md +18 -7
  217. package/node_modules/pi-lens/docs/public-api-stability.md +55 -0
  218. package/node_modules/pi-lens/docs/release-qa-baseline.md +84 -17
  219. package/node_modules/pi-lens/docs/rfcs/3654-unified-io-bridge-v2.md +316 -0
  220. package/node_modules/pi-lens/docs/servercapabilities.md +53 -49
  221. package/node_modules/pi-lens/docs/settings.md +1 -0
  222. package/node_modules/pi-lens/docs/usage.md +5 -1
  223. package/node_modules/pi-lens/grammars/tree-sitter-bash.wasm +0 -0
  224. package/node_modules/pi-lens/grammars/tree-sitter-bash.wasm.json +3 -3
  225. package/node_modules/pi-lens/package.json +18 -6
  226. package/node_modules/pi-lens/rules/ast-grep-rules/rule-tests/advisory-registry-subset-test.yml +41 -0
  227. package/node_modules/pi-lens/rules/ast-grep-rules/rules/advisory-registry-subset.yml +50 -0
  228. package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +1275 -62
  229. package/node_modules/pi-lens/scripts/download-grammars.js +5 -0
  230. package/node_modules/pi-lens/scripts/grammars.lock.json +6 -1
  231. package/node_modules/pi-lens/scripts/install-selftest.mjs +33 -34
  232. package/node_modules/pi-lens/scripts/lib/host-provided-deps.mjs +13 -4
  233. package/node_modules/pi-lens/scripts/lib/web-tree-sitter-dir.mjs +18 -0
  234. package/node_modules/pi-typesafe/README.md +1 -1
  235. package/node_modules/pi-typesafe/dist/backends.d.ts +15 -5
  236. package/node_modules/pi-typesafe/dist/backends.js +18 -0
  237. package/node_modules/pi-typesafe/dist/client.d.ts +4 -3
  238. package/node_modules/pi-typesafe/dist/client.js +22 -7
  239. package/node_modules/pi-typesafe/dist/index.d.ts +2 -2
  240. package/node_modules/pi-typesafe/dist/index.js +1 -1
  241. package/node_modules/pi-typesafe/dist/usage.d.ts +14 -4
  242. package/node_modules/pi-typesafe/dist/usage.js +147 -42
  243. package/node_modules/pi-typesafe/package.json +1 -1
  244. package/node_modules/pi-web-access/CHANGELOG.md +48 -0
  245. package/node_modules/pi-web-access/README.md +57 -11
  246. package/node_modules/pi-web-access/brave-rate-limit.ts +8 -2
  247. package/node_modules/pi-web-access/curator-page.ts +5 -1
  248. package/node_modules/pi-web-access/curator-server.ts +2 -0
  249. package/node_modules/pi-web-access/declared-web-links.ts +2 -2
  250. package/node_modules/pi-web-access/degoog.ts +323 -0
  251. package/node_modules/pi-web-access/dist/index.js +3483 -2745
  252. package/node_modules/pi-web-access/dist/mcp-cli.js +27443 -0
  253. package/node_modules/pi-web-access/exa.ts +5 -1
  254. package/node_modules/pi-web-access/extract.ts +41 -3
  255. package/node_modules/pi-web-access/firecrawl.ts +35 -4
  256. package/node_modules/pi-web-access/gemini-search.ts +34 -11
  257. package/node_modules/pi-web-access/gemini-web.ts +14 -9
  258. package/node_modules/pi-web-access/index.ts +153 -1202
  259. package/node_modules/pi-web-access/keenable.ts +221 -0
  260. package/node_modules/pi-web-access/mcp-cli.ts +40 -0
  261. package/node_modules/pi-web-access/mcp-server.ts +81 -0
  262. package/node_modules/pi-web-access/mcp-tool-definitions.ts +117 -0
  263. package/node_modules/pi-web-access/openai-search.ts +34 -1
  264. package/node_modules/pi-web-access/package.json +23 -5
  265. package/node_modules/pi-web-access/perplexity.ts +64 -56
  266. package/node_modules/pi-web-access/tool-arguments.ts +20 -0
  267. package/node_modules/pi-web-access/video-extract.ts +1 -1
  268. package/node_modules/pi-web-access/web-tool-contract.ts +86 -0
  269. package/node_modules/pi-web-access/web-tool-core.ts +1502 -0
  270. package/node_modules/pi-web-access/youtube-extract.ts +2 -5
  271. package/package.json +17 -12
  272. package/node_modules/@dietrichgebert/ponytail/README.es.md +0 -329
  273. package/node_modules/@dietrichgebert/ponytail/README.ko.md +0 -346
  274. package/node_modules/@dietrichgebert/ponytail/assets/benchmark-3model.svg +0 -21
  275. package/node_modules/@dietrichgebert/ponytail/assets/benchmark-agentic.svg +0 -62
  276. package/node_modules/@dietrichgebert/ponytail/assets/logo-dark.png +0 -0
  277. package/node_modules/@dietrichgebert/ponytail/assets/logo-dark.svg +0 -115
  278. package/node_modules/@dietrichgebert/ponytail/assets/logo-greenpt-dark.svg +0 -27
  279. package/node_modules/@dietrichgebert/ponytail/assets/logo-greenpt.svg +0 -27
  280. package/node_modules/@dietrichgebert/ponytail/assets/logo.png +0 -0
  281. package/node_modules/@dietrichgebert/ponytail/assets/retriever-icon.png +0 -0
  282. package/node_modules/@dietrichgebert/ponytail/assets/retriever-logo-dark.svg +0 -4
  283. package/node_modules/@dietrichgebert/ponytail/assets/retriever-logo-light.svg +0 -4
  284. package/node_modules/@dietrichgebert/ponytail/assets/social-preview.png +0 -0
  285. package/node_modules/@dietrichgebert/ponytail/assets/waitlist-banner-es.png +0 -0
  286. package/node_modules/@dietrichgebert/ponytail/assets/waitlist-banner-ko.png +0 -0
  287. package/node_modules/@dietrichgebert/ponytail/assets/waitlist-banner.png +0 -0
  288. package/node_modules/pi-lens/dist/clients/actionable-warnings-logger.js +0 -35
  289. package/node_modules/pi-lens/dist/clients/actionable-warnings.js +0 -1610
  290. package/node_modules/pi-lens/dist/clients/advisory-provenance.js +0 -593
  291. package/node_modules/pi-lens/dist/clients/agent-behavior-client.js +0 -147
  292. package/node_modules/pi-lens/dist/clients/agent-nudge.js +0 -325
  293. package/node_modules/pi-lens/dist/clients/analysed-root.js +0 -1
  294. package/node_modules/pi-lens/dist/clients/ast-grep-client.js +0 -731
  295. package/node_modules/pi-lens/dist/clients/ast-grep-rule-manager.js +0 -146
  296. package/node_modules/pi-lens/dist/clients/ast-grep-tool-logger.js +0 -118
  297. package/node_modules/pi-lens/dist/clients/ast-grep-types.js +0 -10
  298. package/node_modules/pi-lens/dist/clients/ast-grep-yaml-synth.js +0 -154
  299. package/node_modules/pi-lens/dist/clients/atomic-write-staging.js +0 -75
  300. package/node_modules/pi-lens/dist/clients/atomic-write.js +0 -189
  301. package/node_modules/pi-lens/dist/clients/availability-probe-flight.js +0 -12
  302. package/node_modules/pi-lens/dist/clients/bash-file-access.js +0 -1056
  303. package/node_modules/pi-lens/dist/clients/biome-client.js +0 -357
  304. package/node_modules/pi-lens/dist/clients/blocker-freshness.js +0 -837
  305. package/node_modules/pi-lens/dist/clients/blocker-past-eof.js +0 -129
  306. package/node_modules/pi-lens/dist/clients/bootstrap.js +0 -569
  307. package/node_modules/pi-lens/dist/clients/bounded-cache.js +0 -190
  308. package/node_modules/pi-lens/dist/clients/bounded-pid-file-lock.js +0 -202
  309. package/node_modules/pi-lens/dist/clients/bounded-telemetry.js +0 -295
  310. package/node_modules/pi-lens/dist/clients/build-identity.js +0 -95
  311. package/node_modules/pi-lens/dist/clients/bundled-resource-health.js +0 -113
  312. package/node_modules/pi-lens/dist/clients/bus-events-logger.js +0 -105
  313. package/node_modules/pi-lens/dist/clients/bus-publish.js +0 -171
  314. package/node_modules/pi-lens/dist/clients/cache/rule-cache.js +0 -190
  315. package/node_modules/pi-lens/dist/clients/cache-manager.js +0 -524
  316. package/node_modules/pi-lens/dist/clients/cache-observability.js +0 -1313
  317. package/node_modules/pi-lens/dist/clients/call-graph.js +0 -852
  318. package/node_modules/pi-lens/dist/clients/cargo-manifest.js +0 -422
  319. package/node_modules/pi-lens/dist/clients/cascade-budget.js +0 -196
  320. package/node_modules/pi-lens/dist/clients/cascade-format.js +0 -315
  321. package/node_modules/pi-lens/dist/clients/cascade-logger.js +0 -31
  322. package/node_modules/pi-lens/dist/clients/cascade-types.js +0 -9
  323. package/node_modules/pi-lens/dist/clients/child-unref.js +0 -124
  324. package/node_modules/pi-lens/dist/clients/code-quality-warnings.js +0 -286
  325. package/node_modules/pi-lens/dist/clients/codebase-model.js +0 -173
  326. package/node_modules/pi-lens/dist/clients/collateral-test-role.js +0 -40
  327. package/node_modules/pi-lens/dist/clients/complexity-client.js +0 -462
  328. package/node_modules/pi-lens/dist/clients/config-core/deny.js +0 -221
  329. package/node_modules/pi-lens/dist/clients/config-core/index.js +0 -50
  330. package/node_modules/pi-lens/dist/clients/config-core/merge.js +0 -357
  331. package/node_modules/pi-lens/dist/clients/config-core/normalize.js +0 -340
  332. package/node_modules/pi-lens/dist/clients/config-core/process-spec.js +0 -248
  333. package/node_modules/pi-lens/dist/clients/config-core/provenance.js +0 -164
  334. package/node_modules/pi-lens/dist/clients/config-core/records.js +0 -218
  335. package/node_modules/pi-lens/dist/clients/config-core/resolve.js +0 -125
  336. package/node_modules/pi-lens/dist/clients/config-core/safe-object.js +0 -78
  337. package/node_modules/pi-lens/dist/clients/config-core/schema.js +0 -165
  338. package/node_modules/pi-lens/dist/clients/config-diagnostic-codes.js +0 -285
  339. package/node_modules/pi-lens/dist/clients/config-locations.js +0 -388
  340. package/node_modules/pi-lens/dist/clients/config-resolve.js +0 -798
  341. package/node_modules/pi-lens/dist/clients/config-schema.js +0 -251
  342. package/node_modules/pi-lens/dist/clients/config-warn.js +0 -407
  343. package/node_modules/pi-lens/dist/clients/console-guard-install.js +0 -26
  344. package/node_modules/pi-lens/dist/clients/cooperative-budget.js +0 -42
  345. package/node_modules/pi-lens/dist/clients/dead-code-client.js +0 -510
  346. package/node_modules/pi-lens/dist/clients/dead-code-logger.js +0 -30
  347. package/node_modules/pi-lens/dist/clients/deadline-utils.js +0 -280
  348. package/node_modules/pi-lens/dist/clients/debug-handles.js +0 -211
  349. package/node_modules/pi-lens/dist/clients/debug-heap.js +0 -174
  350. package/node_modules/pi-lens/dist/clients/deferred-lsp-work.js +0 -106
  351. package/node_modules/pi-lens/dist/clients/degradation-ledger.js +0 -426
  352. package/node_modules/pi-lens/dist/clients/demoted-finding-render.js +0 -169
  353. package/node_modules/pi-lens/dist/clients/dependency-checker.js +0 -885
  354. package/node_modules/pi-lens/dist/clients/deps/ast-grep-napi.js +0 -22
  355. package/node_modules/pi-lens/dist/clients/deps/js-yaml.js +0 -9
  356. package/node_modules/pi-lens/dist/clients/deps/minimatch.js +0 -4
  357. package/node_modules/pi-lens/dist/clients/deps/pi-tui.js +0 -14
  358. package/node_modules/pi-lens/dist/clients/deps/typebox.js +0 -14
  359. package/node_modules/pi-lens/dist/clients/deps/vscode-jsonrpc.js +0 -1
  360. package/node_modules/pi-lens/dist/clients/deps/web-tree-sitter.js +0 -24
  361. package/node_modules/pi-lens/dist/clients/diagnostic-dispositions.js +0 -630
  362. package/node_modules/pi-lens/dist/clients/diagnostic-line-freshness.js +0 -305
  363. package/node_modules/pi-lens/dist/clients/diagnostic-logger.js +0 -73
  364. package/node_modules/pi-lens/dist/clients/diagnostic-tracker.js +0 -105
  365. package/node_modules/pi-lens/dist/clients/diagnostics-publish.js +0 -230
  366. package/node_modules/pi-lens/dist/clients/dispatch/ast-grep-catalog.js +0 -65
  367. package/node_modules/pi-lens/dist/clients/dispatch/auxiliary-lsp.js +0 -343
  368. package/node_modules/pi-lens/dist/clients/dispatch/collect-later-tier.js +0 -35
  369. package/node_modules/pi-lens/dist/clients/dispatch/diagnostic-taxonomy.js +0 -66
  370. package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +0 -1269
  371. package/node_modules/pi-lens/dist/clients/dispatch/fact-provider-types.js +0 -1
  372. package/node_modules/pi-lens/dist/clients/dispatch/fact-rule-runner.js +0 -17
  373. package/node_modules/pi-lens/dist/clients/dispatch/fact-runner.js +0 -30
  374. package/node_modules/pi-lens/dist/clients/dispatch/fact-scheduler.js +0 -68
  375. package/node_modules/pi-lens/dist/clients/dispatch/fact-store.js +0 -377
  376. package/node_modules/pi-lens/dist/clients/dispatch/facts/comment-facts.js +0 -22
  377. package/node_modules/pi-lens/dist/clients/dispatch/facts/file-content.js +0 -19
  378. package/node_modules/pi-lens/dist/clients/dispatch/facts/function-facts.js +0 -348
  379. package/node_modules/pi-lens/dist/clients/dispatch/facts/import-facts.js +0 -204
  380. package/node_modules/pi-lens/dist/clients/dispatch/facts/tree-sitter-facts.js +0 -34
  381. package/node_modules/pi-lens/dist/clients/dispatch/facts/try-catch-facts.js +0 -119
  382. package/node_modules/pi-lens/dist/clients/dispatch/finding-policy.js +0 -339
  383. package/node_modules/pi-lens/dist/clients/dispatch/indent-detect.js +0 -417
  384. package/node_modules/pi-lens/dist/clients/dispatch/inline-suppressions.js +0 -89
  385. package/node_modules/pi-lens/dist/clients/dispatch/integration.js +0 -2377
  386. package/node_modules/pi-lens/dist/clients/dispatch/lazy.js +0 -11
  387. package/node_modules/pi-lens/dist/clients/dispatch/pending-runner-findings.js +0 -87
  388. package/node_modules/pi-lens/dist/clients/dispatch/plan.js +0 -278
  389. package/node_modules/pi-lens/dist/clients/dispatch/priorities.js +0 -20
  390. package/node_modules/pi-lens/dist/clients/dispatch/rule-id-normalize.js +0 -50
  391. package/node_modules/pi-lens/dist/clients/dispatch/rule-ignores.js +0 -69
  392. package/node_modules/pi-lens/dist/clients/dispatch/rule-policy.js +0 -135
  393. package/node_modules/pi-lens/dist/clients/dispatch/rules/async-noise.js +0 -40
  394. package/node_modules/pi-lens/dist/clients/dispatch/rules/async-unnecessary-wrapper.js +0 -27
  395. package/node_modules/pi-lens/dist/clients/dispatch/rules/cors-wildcard.js +0 -54
  396. package/node_modules/pi-lens/dist/clients/dispatch/rules/error-obscuring.js +0 -32
  397. package/node_modules/pi-lens/dist/clients/dispatch/rules/error-swallowing.js +0 -31
  398. package/node_modules/pi-lens/dist/clients/dispatch/rules/framework-call-noise.js +0 -67
  399. package/node_modules/pi-lens/dist/clients/dispatch/rules/high-complexity.js +0 -72
  400. package/node_modules/pi-lens/dist/clients/dispatch/rules/high-fan-out.js +0 -74
  401. package/node_modules/pi-lens/dist/clients/dispatch/rules/high-import-coupling.js +0 -37
  402. package/node_modules/pi-lens/dist/clients/dispatch/rules/missing-error-propagation.js +0 -62
  403. package/node_modules/pi-lens/dist/clients/dispatch/rules/no-commented-credentials.js +0 -52
  404. package/node_modules/pi-lens/dist/clients/dispatch/rules/pass-through-wrappers.js +0 -42
  405. package/node_modules/pi-lens/dist/clients/dispatch/rules/placeholder-comments.js +0 -40
  406. package/node_modules/pi-lens/dist/clients/dispatch/rules/unsafe-boundary.js +0 -126
  407. package/node_modules/pi-lens/dist/clients/dispatch/runner-context.js +0 -52
  408. package/node_modules/pi-lens/dist/clients/dispatch/runners/actionlint.js +0 -111
  409. package/node_modules/pi-lens/dist/clients/dispatch/runners/ast-grep-napi.js +0 -1196
  410. package/node_modules/pi-lens/dist/clients/dispatch/runners/biome-check.js +0 -296
  411. package/node_modules/pi-lens/dist/clients/dispatch/runners/cpp-check.js +0 -219
  412. package/node_modules/pi-lens/dist/clients/dispatch/runners/credo.js +0 -82
  413. package/node_modules/pi-lens/dist/clients/dispatch/runners/cue-vet.js +0 -416
  414. package/node_modules/pi-lens/dist/clients/dispatch/runners/dart-analyze.js +0 -183
  415. package/node_modules/pi-lens/dist/clients/dispatch/runners/detekt.js +0 -176
  416. package/node_modules/pi-lens/dist/clients/dispatch/runners/dotnet-build.js +0 -164
  417. package/node_modules/pi-lens/dist/clients/dispatch/runners/elixir-check.js +0 -195
  418. package/node_modules/pi-lens/dist/clients/dispatch/runners/eslint.js +0 -137
  419. package/node_modules/pi-lens/dist/clients/dispatch/runners/fact-rules.js +0 -29
  420. package/node_modules/pi-lens/dist/clients/dispatch/runners/fish-indent.js +0 -69
  421. package/node_modules/pi-lens/dist/clients/dispatch/runners/gleam-check.js +0 -167
  422. package/node_modules/pi-lens/dist/clients/dispatch/runners/go-vet.js +0 -104
  423. package/node_modules/pi-lens/dist/clients/dispatch/runners/golangci-lint.js +0 -135
  424. package/node_modules/pi-lens/dist/clients/dispatch/runners/hadolint.js +0 -91
  425. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-lint.js +0 -171
  426. package/node_modules/pi-lens/dist/clients/dispatch/runners/helm-render.js +0 -940
  427. package/node_modules/pi-lens/dist/clients/dispatch/runners/htmlhint.js +0 -117
  428. package/node_modules/pi-lens/dist/clients/dispatch/runners/index.js +0 -108
  429. package/node_modules/pi-lens/dist/clients/dispatch/runners/javac.js +0 -99
  430. package/node_modules/pi-lens/dist/clients/dispatch/runners/ktlint.js +0 -110
  431. package/node_modules/pi-lens/dist/clients/dispatch/runners/lsp.js +0 -379
  432. package/node_modules/pi-lens/dist/clients/dispatch/runners/markdownlint.js +0 -167
  433. package/node_modules/pi-lens/dist/clients/dispatch/runners/mypy.js +0 -102
  434. package/node_modules/pi-lens/dist/clients/dispatch/runners/oxlint.js +0 -414
  435. package/node_modules/pi-lens/dist/clients/dispatch/runners/php-lint.js +0 -85
  436. package/node_modules/pi-lens/dist/clients/dispatch/runners/phpstan.js +0 -120
  437. package/node_modules/pi-lens/dist/clients/dispatch/runners/prisma-validate.js +0 -62
  438. package/node_modules/pi-lens/dist/clients/dispatch/runners/psscriptanalyzer.js +0 -445
  439. package/node_modules/pi-lens/dist/clients/dispatch/runners/pyright.js +0 -169
  440. package/node_modules/pi-lens/dist/clients/dispatch/runners/rubocop.js +0 -99
  441. package/node_modules/pi-lens/dist/clients/dispatch/runners/ruff.js +0 -88
  442. package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +0 -256
  443. package/node_modules/pi-lens/dist/clients/dispatch/runners/shellcheck.js +0 -173
  444. package/node_modules/pi-lens/dist/clients/dispatch/runners/shfmt.js +0 -102
  445. package/node_modules/pi-lens/dist/clients/dispatch/runners/spellcheck.js +0 -128
  446. package/node_modules/pi-lens/dist/clients/dispatch/runners/spotbugs.js +0 -259
  447. package/node_modules/pi-lens/dist/clients/dispatch/runners/sqlfluff.js +0 -183
  448. package/node_modules/pi-lens/dist/clients/dispatch/runners/stylelint.js +0 -166
  449. package/node_modules/pi-lens/dist/clients/dispatch/runners/swiftlint.js +0 -163
  450. package/node_modules/pi-lens/dist/clients/dispatch/runners/taplo.js +0 -174
  451. package/node_modules/pi-lens/dist/clients/dispatch/runners/terragrunt.js +0 -168
  452. package/node_modules/pi-lens/dist/clients/dispatch/runners/tflint.js +0 -125
  453. package/node_modules/pi-lens/dist/clients/dispatch/runners/tree-sitter.js +0 -643
  454. package/node_modules/pi-lens/dist/clients/dispatch/runners/trivy-config.js +0 -253
  455. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/availability-policy.js +0 -496
  456. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/candidate-probe.js +0 -90
  457. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/diagnostic-parsers.js +0 -95
  458. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/lazy-installer.js +0 -274
  459. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +0 -1701
  460. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/spawn-outcome.js +0 -101
  461. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/tool-failure.js +0 -235
  462. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/toolchain-availability.js +0 -169
  463. package/node_modules/pi-lens/dist/clients/dispatch/runners/utils.js +0 -15
  464. package/node_modules/pi-lens/dist/clients/dispatch/runners/vale.js +0 -128
  465. package/node_modules/pi-lens/dist/clients/dispatch/runners/yaml-rule-parser.js +0 -242
  466. package/node_modules/pi-lens/dist/clients/dispatch/runners/yamllint.js +0 -95
  467. package/node_modules/pi-lens/dist/clients/dispatch/runners/zig-check.js +0 -79
  468. package/node_modules/pi-lens/dist/clients/dispatch/suppress-writer.js +0 -79
  469. package/node_modules/pi-lens/dist/clients/dispatch/tool-profile.js +0 -30
  470. package/node_modules/pi-lens/dist/clients/dispatch/types.js +0 -21
  471. package/node_modules/pi-lens/dist/clients/dispatch/utils/format-utils.js +0 -45
  472. package/node_modules/pi-lens/dist/clients/dispatch/utils/lsp-diagnostics.js +0 -35
  473. package/node_modules/pi-lens/dist/clients/disposition-logger.js +0 -32
  474. package/node_modules/pi-lens/dist/clients/disposition-publish.js +0 -124
  475. package/node_modules/pi-lens/dist/clients/durable-store.js +0 -97
  476. package/node_modules/pi-lens/dist/clients/effective-config.js +0 -415
  477. package/node_modules/pi-lens/dist/clients/env-utils.js +0 -83
  478. package/node_modules/pi-lens/dist/clients/error-class.js +0 -23
  479. package/node_modules/pi-lens/dist/clients/eval-timestamp.js +0 -17
  480. package/node_modules/pi-lens/dist/clients/event-loop-hold.js +0 -274
  481. package/node_modules/pi-lens/dist/clients/event-loop-monitor.js +0 -250
  482. package/node_modules/pi-lens/dist/clients/extension-log.js +0 -504
  483. package/node_modules/pi-lens/dist/clients/extension-mode.js +0 -73
  484. package/node_modules/pi-lens/dist/clients/feature-hints.js +0 -103
  485. package/node_modules/pi-lens/dist/clients/file-kinds.js +0 -412
  486. package/node_modules/pi-lens/dist/clients/file-role.js +0 -134
  487. package/node_modules/pi-lens/dist/clients/file-time.js +0 -160
  488. package/node_modules/pi-lens/dist/clients/file-utils.js +0 -1032
  489. package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +0 -494
  490. package/node_modules/pi-lens/dist/clients/finding-identity.js +0 -88
  491. package/node_modules/pi-lens/dist/clients/fix-worklog.js +0 -103
  492. package/node_modules/pi-lens/dist/clients/format-events-publish.js +0 -343
  493. package/node_modules/pi-lens/dist/clients/format-service.js +0 -222
  494. package/node_modules/pi-lens/dist/clients/formatters-lazy.js +0 -9
  495. package/node_modules/pi-lens/dist/clients/formatters.js +0 -2032
  496. package/node_modules/pi-lens/dist/clients/freshness-cadence.js +0 -17
  497. package/node_modules/pi-lens/dist/clients/freshness.js +0 -38
  498. package/node_modules/pi-lens/dist/clients/generated-artifacts.js +0 -394
  499. package/node_modules/pi-lens/dist/clients/generation-guard.js +0 -215
  500. package/node_modules/pi-lens/dist/clients/git-guard.js +0 -1136
  501. package/node_modules/pi-lens/dist/clients/git-tracked-ignore.js +0 -243
  502. package/node_modules/pi-lens/dist/clients/gitleaks-client.js +0 -509
  503. package/node_modules/pi-lens/dist/clients/go-client.js +0 -104
  504. package/node_modules/pi-lens/dist/clients/govulncheck-client.js +0 -605
  505. package/node_modules/pi-lens/dist/clients/gradle-ktfmt-style.js +0 -348
  506. package/node_modules/pi-lens/dist/clients/grammar-source.js +0 -465
  507. package/node_modules/pi-lens/dist/clients/gzip-stage-write.js +0 -135
  508. package/node_modules/pi-lens/dist/clients/hashline-anchor.js +0 -424
  509. package/node_modules/pi-lens/dist/clients/hook-budgets.js +0 -76
  510. package/node_modules/pi-lens/dist/clients/host-edit-normalize.js +0 -140
  511. package/node_modules/pi-lens/dist/clients/host-ports.js +0 -39
  512. package/node_modules/pi-lens/dist/clients/indent-retarget.js +0 -154
  513. package/node_modules/pi-lens/dist/clients/inline-blocker-dispositions.js +0 -186
  514. package/node_modules/pi-lens/dist/clients/install-diagnostics.js +0 -156
  515. package/node_modules/pi-lens/dist/clients/installer/index.js +0 -5416
  516. package/node_modules/pi-lens/dist/clients/installer/managed-tool-refresh-session.js +0 -58
  517. package/node_modules/pi-lens/dist/clients/installer/managed-tool-refresh.js +0 -783
  518. package/node_modules/pi-lens/dist/clients/instance-reaper-state.js +0 -7
  519. package/node_modules/pi-lens/dist/clients/instance-reaper.js +0 -1137
  520. package/node_modules/pi-lens/dist/clients/instance-registry-lock.js +0 -145
  521. package/node_modules/pi-lens/dist/clients/instance-registry.js +0 -773
  522. package/node_modules/pi-lens/dist/clients/jscpd-client.js +0 -378
  523. package/node_modules/pi-lens/dist/clients/json-cache-read.js +0 -65
  524. package/node_modules/pi-lens/dist/clients/knip-client.js +0 -788
  525. package/node_modules/pi-lens/dist/clients/language-policy.js +0 -252
  526. package/node_modules/pi-lens/dist/clients/language-profile.js +0 -361
  527. package/node_modules/pi-lens/dist/clients/language-registry.js +0 -603
  528. package/node_modules/pi-lens/dist/clients/latency-logger.js +0 -727
  529. package/node_modules/pi-lens/dist/clients/lazy-import.js +0 -21
  530. package/node_modules/pi-lens/dist/clients/ledger-bounds.js +0 -54
  531. package/node_modules/pi-lens/dist/clients/lens-config.js +0 -404
  532. package/node_modules/pi-lens/dist/clients/lens-engine.js +0 -358
  533. package/node_modules/pi-lens/dist/clients/lens-events.js +0 -125
  534. package/node_modules/pi-lens/dist/clients/lens-flag-registry.js +0 -467
  535. package/node_modules/pi-lens/dist/clients/lens-map.js +0 -1156
  536. package/node_modules/pi-lens/dist/clients/live-bus-emitter.js +0 -74
  537. package/node_modules/pi-lens/dist/clients/log-cleanup.js +0 -222
  538. package/node_modules/pi-lens/dist/clients/lsp/aggregation.js +0 -178
  539. package/node_modules/pi-lens/dist/clients/lsp/cascade-tier.js +0 -421
  540. package/node_modules/pi-lens/dist/clients/lsp/client.js +0 -4593
  541. package/node_modules/pi-lens/dist/clients/lsp/config.js +0 -691
  542. package/node_modules/pi-lens/dist/clients/lsp/content-limits.js +0 -41
  543. package/node_modules/pi-lens/dist/clients/lsp/diagnostic-binding.js +0 -225
  544. package/node_modules/pi-lens/dist/clients/lsp/document-drift.js +0 -467
  545. package/node_modules/pi-lens/dist/clients/lsp/edits.js +0 -1219
  546. package/node_modules/pi-lens/dist/clients/lsp/index.js +0 -8305
  547. package/node_modules/pi-lens/dist/clients/lsp/inferred-project.js +0 -216
  548. package/node_modules/pi-lens/dist/clients/lsp/jvm-runtime.js +0 -298
  549. package/node_modules/pi-lens/dist/clients/lsp/language.js +0 -63
  550. package/node_modules/pi-lens/dist/clients/lsp/launch.js +0 -746
  551. package/node_modules/pi-lens/dist/clients/lsp/lombok.js +0 -158
  552. package/node_modules/pi-lens/dist/clients/lsp/path-utils.js +0 -5
  553. package/node_modules/pi-lens/dist/clients/lsp/pending-aux-coverage.js +0 -251
  554. package/node_modules/pi-lens/dist/clients/lsp/position-encoding.js +0 -61
  555. package/node_modules/pi-lens/dist/clients/lsp/ruby-drive-dirs.js +0 -83
  556. package/node_modules/pi-lens/dist/clients/lsp/server.js +0 -3290
  557. package/node_modules/pi-lens/dist/clients/lsp/session-roots.js +0 -192
  558. package/node_modules/pi-lens/dist/clients/lsp/spawn-history.js +0 -17
  559. package/node_modules/pi-lens/dist/clients/lsp/sync-kind.js +0 -56
  560. package/node_modules/pi-lens/dist/clients/lsp/tsserver-sync.js +0 -332
  561. package/node_modules/pi-lens/dist/clients/lsp/wait-policy/capability-snapshot.js +0 -1
  562. package/node_modules/pi-lens/dist/clients/lsp/wait-policy/classification.js +0 -85
  563. package/node_modules/pi-lens/dist/clients/lsp/wait-policy/index.js +0 -10
  564. package/node_modules/pi-lens/dist/clients/lsp/wait-policy/strategies.js +0 -392
  565. package/node_modules/pi-lens/dist/clients/lsp/watch-queue.js +0 -61
  566. package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +0 -639
  567. package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-session.js +0 -30
  568. package/node_modules/pi-lens/dist/clients/lsp/workspace-sweep-hold.js +0 -184
  569. package/node_modules/pi-lens/dist/clients/lsp-budget.js +0 -186
  570. package/node_modules/pi-lens/dist/clients/lsp-document-symbols.js +0 -110
  571. package/node_modules/pi-lens/dist/clients/lsp-lazy.js +0 -9
  572. package/node_modules/pi-lens/dist/clients/lsp-mutation.js +0 -396
  573. package/node_modules/pi-lens/dist/clients/lsp-status.js +0 -59
  574. package/node_modules/pi-lens/dist/clients/map-with-concurrency.js +0 -40
  575. package/node_modules/pi-lens/dist/clients/mcp/analyze.js +0 -420
  576. package/node_modules/pi-lens/dist/clients/mcp/host-shim.js +0 -31
  577. package/node_modules/pi-lens/dist/clients/mcp/ipc.js +0 -523
  578. package/node_modules/pi-lens/dist/clients/mcp/review.js +0 -197
  579. package/node_modules/pi-lens/dist/clients/mcp/session.js +0 -412
  580. package/node_modules/pi-lens/dist/clients/memory-sampler.js +0 -208
  581. package/node_modules/pi-lens/dist/clients/message-end-attribution.js +0 -30
  582. package/node_modules/pi-lens/dist/clients/metrics-client.js +0 -107
  583. package/node_modules/pi-lens/dist/clients/metrics-history.js +0 -327
  584. package/node_modules/pi-lens/dist/clients/middle-man-analysis.js +0 -263
  585. package/node_modules/pi-lens/dist/clients/model-provider.js +0 -53
  586. package/node_modules/pi-lens/dist/clients/module-report-lsp.js +0 -189
  587. package/node_modules/pi-lens/dist/clients/module-report.js +0 -2150
  588. package/node_modules/pi-lens/dist/clients/mutating-tool.js +0 -651
  589. package/node_modules/pi-lens/dist/clients/mutation-attribution.js +0 -368
  590. package/node_modules/pi-lens/dist/clients/mutation-bridge.js +0 -240
  591. package/node_modules/pi-lens/dist/clients/ndjson-logger.js +0 -734
  592. package/node_modules/pi-lens/dist/clients/observed-mutation-sources.js +0 -101
  593. package/node_modules/pi-lens/dist/clients/observed-mutation.js +0 -1253
  594. package/node_modules/pi-lens/dist/clients/oldtext-autopatch.js +0 -128
  595. package/node_modules/pi-lens/dist/clients/opaque-mutation-scan.js +0 -496
  596. package/node_modules/pi-lens/dist/clients/opengrep-client.js +0 -333
  597. package/node_modules/pi-lens/dist/clients/opengrep-config.js +0 -76
  598. package/node_modules/pi-lens/dist/clients/package-manager.js +0 -607
  599. package/node_modules/pi-lens/dist/clients/package-root.js +0 -38
  600. package/node_modules/pi-lens/dist/clients/partial-edit-apply.js +0 -439
  601. package/node_modules/pi-lens/dist/clients/path-attribution-telemetry.js +0 -43
  602. package/node_modules/pi-lens/dist/clients/path-keyed-map.js +0 -108
  603. package/node_modules/pi-lens/dist/clients/path-utils.js +0 -1244
  604. package/node_modules/pi-lens/dist/clients/performance-report.js +0 -331
  605. package/node_modules/pi-lens/dist/clients/persist-debounce.js +0 -70
  606. package/node_modules/pi-lens/dist/clients/persistent-reverify.js +0 -271
  607. package/node_modules/pi-lens/dist/clients/php-cs-fixer-config.js +0 -119
  608. package/node_modules/pi-lens/dist/clients/pipeline.js +0 -1480
  609. package/node_modules/pi-lens/dist/clients/post-autofix-notice.js +0 -37
  610. package/node_modules/pi-lens/dist/clients/print-mode.js +0 -21
  611. package/node_modules/pi-lens/dist/clients/probe-home-state.js +0 -228
  612. package/node_modules/pi-lens/dist/clients/process-bridge.js +0 -66
  613. package/node_modules/pi-lens/dist/clients/process-singletons.js +0 -210
  614. package/node_modules/pi-lens/dist/clients/process-snapshot.js +0 -68
  615. package/node_modules/pi-lens/dist/clients/project-changes.js +0 -181
  616. package/node_modules/pi-lens/dist/clients/project-conventions.js +0 -171
  617. package/node_modules/pi-lens/dist/clients/project-diagnostics/cache.js +0 -137
  618. package/node_modules/pi-lens/dist/clients/project-diagnostics/extractors.js +0 -109
  619. package/node_modules/pi-lens/dist/clients/project-diagnostics/fresh-fetch.js +0 -668
  620. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/call-graph-impact.js +0 -118
  621. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/dead-code.js +0 -47
  622. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/gitleaks.js +0 -40
  623. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/govulncheck.js +0 -34
  624. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/jscpd.js +0 -38
  625. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/knip.js +0 -47
  626. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/madge.js +0 -48
  627. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/opengrep.js +0 -40
  628. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/runner-findings.js +0 -127
  629. package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/trivy.js +0 -81
  630. package/node_modules/pi-lens/dist/clients/project-diagnostics/scanner.js +0 -520
  631. package/node_modules/pi-lens/dist/clients/project-diagnostics/types.js +0 -1
  632. package/node_modules/pi-lens/dist/clients/project-lens-config.js +0 -807
  633. package/node_modules/pi-lens/dist/clients/project-report.js +0 -701
  634. package/node_modules/pi-lens/dist/clients/project-scale.js +0 -237
  635. package/node_modules/pi-lens/dist/clients/project-scan-policy.js +0 -11
  636. package/node_modules/pi-lens/dist/clients/project-snapshot-fingerprint.js +0 -48
  637. package/node_modules/pi-lens/dist/clients/project-snapshot-persist-worker.js +0 -20
  638. package/node_modules/pi-lens/dist/clients/project-snapshot.js +0 -1653
  639. package/node_modules/pi-lens/dist/clients/project-trust.js +0 -181
  640. package/node_modules/pi-lens/dist/clients/python-environment.js +0 -217
  641. package/node_modules/pi-lens/dist/clients/python-provenance.js +0 -639
  642. package/node_modules/pi-lens/dist/clients/quiet-window-config.js +0 -47
  643. package/node_modules/pi-lens/dist/clients/quiet-window.js +0 -236
  644. package/node_modules/pi-lens/dist/clients/read-bridge.js +0 -139
  645. package/node_modules/pi-lens/dist/clients/read-expansion.js +0 -266
  646. package/node_modules/pi-lens/dist/clients/read-guard-logger.js +0 -251
  647. package/node_modules/pi-lens/dist/clients/read-guard-tool-lines.js +0 -1306
  648. package/node_modules/pi-lens/dist/clients/read-guard.js +0 -1561
  649. package/node_modules/pi-lens/dist/clients/recent-touches.js +0 -240
  650. package/node_modules/pi-lens/dist/clients/redact/secrets.js +0 -449
  651. package/node_modules/pi-lens/dist/clients/resource-sampler.js +0 -628
  652. package/node_modules/pi-lens/dist/clients/reverse-deps.js +0 -270
  653. package/node_modules/pi-lens/dist/clients/review-graph/builder.js +0 -5126
  654. package/node_modules/pi-lens/dist/clients/review-graph/format.js +0 -33
  655. package/node_modules/pi-lens/dist/clients/review-graph/git-identity.js +0 -163
  656. package/node_modules/pi-lens/dist/clients/review-graph/import-resolvers.js +0 -481
  657. package/node_modules/pi-lens/dist/clients/review-graph/persist-worker.js +0 -10
  658. package/node_modules/pi-lens/dist/clients/review-graph/query.js +0 -244
  659. package/node_modules/pi-lens/dist/clients/review-graph/revision-drift.js +0 -21
  660. package/node_modules/pi-lens/dist/clients/review-graph/service.js +0 -96
  661. package/node_modules/pi-lens/dist/clients/review-graph/shared-extraction-ir.js +0 -82
  662. package/node_modules/pi-lens/dist/clients/review-graph/symbol-id.js +0 -103
  663. package/node_modules/pi-lens/dist/clients/review-graph/tsconfig-paths.js +0 -299
  664. package/node_modules/pi-lens/dist/clients/review-graph/types.js +0 -1
  665. package/node_modules/pi-lens/dist/clients/review-graph/workspace-modules.js +0 -449
  666. package/node_modules/pi-lens/dist/clients/review-graph-logger.js +0 -81
  667. package/node_modules/pi-lens/dist/clients/ruff-client.js +0 -179
  668. package/node_modules/pi-lens/dist/clients/rules-scanner.js +0 -131
  669. package/node_modules/pi-lens/dist/clients/run-duration.js +0 -55
  670. package/node_modules/pi-lens/dist/clients/runtime-agent-end.js +0 -746
  671. package/node_modules/pi-lens/dist/clients/runtime-config.js +0 -77
  672. package/node_modules/pi-lens/dist/clients/runtime-context.js +0 -211
  673. package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +0 -1324
  674. package/node_modules/pi-lens/dist/clients/runtime-session.js +0 -2485
  675. package/node_modules/pi-lens/dist/clients/runtime-tool-call.js +0 -1295
  676. package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +0 -2049
  677. package/node_modules/pi-lens/dist/clients/runtime-turn.js +0 -3767
  678. package/node_modules/pi-lens/dist/clients/rust-client.js +0 -97
  679. package/node_modules/pi-lens/dist/clients/safe-spawn.js +0 -2357
  680. package/node_modules/pi-lens/dist/clients/sanitize.js +0 -286
  681. package/node_modules/pi-lens/dist/clients/scan-utils.js +0 -25
  682. package/node_modules/pi-lens/dist/clients/scratch-tree-policy.js +0 -165
  683. package/node_modules/pi-lens/dist/clients/search-read-registration.js +0 -94
  684. package/node_modules/pi-lens/dist/clients/secret-findings.js +0 -114
  685. package/node_modules/pi-lens/dist/clients/security-scan-client.js +0 -352
  686. package/node_modules/pi-lens/dist/clients/session-event-guard.js +0 -297
  687. package/node_modules/pi-lens/dist/clients/session-lifecycle.js +0 -484
  688. package/node_modules/pi-lens/dist/clients/session-start-observability.js +0 -94
  689. package/node_modules/pi-lens/dist/clients/session-state-store.js +0 -101
  690. package/node_modules/pi-lens/dist/clients/session-summary.js +0 -15
  691. package/node_modules/pi-lens/dist/clients/sessionstart-logger.js +0 -27
  692. package/node_modules/pi-lens/dist/clients/sg-runner.js +0 -876
  693. package/node_modules/pi-lens/dist/clients/sgconfig.js +0 -347
  694. package/node_modules/pi-lens/dist/clients/shared-checkout-guard.js +0 -338
  695. package/node_modules/pi-lens/dist/clients/single-flight.js +0 -158
  696. package/node_modules/pi-lens/dist/clients/situational-tool-telemetry.js +0 -108
  697. package/node_modules/pi-lens/dist/clients/skills-resolver.js +0 -141
  698. package/node_modules/pi-lens/dist/clients/slow-fs.js +0 -138
  699. package/node_modules/pi-lens/dist/clients/smells-rollup.js +0 -231
  700. package/node_modules/pi-lens/dist/clients/source-filter.js +0 -596
  701. package/node_modules/pi-lens/dist/clients/source-walker.js +0 -211
  702. package/node_modules/pi-lens/dist/clients/spawn-output-cap.js +0 -120
  703. package/node_modules/pi-lens/dist/clients/spawn-timeout-cooldown.js +0 -110
  704. package/node_modules/pi-lens/dist/clients/stale-marker.js +0 -17
  705. package/node_modules/pi-lens/dist/clients/startup-scan.js +0 -400
  706. package/node_modules/pi-lens/dist/clients/startup-timing.js +0 -130
  707. package/node_modules/pi-lens/dist/clients/string-utils.js +0 -33
  708. package/node_modules/pi-lens/dist/clients/subagent-mode.js +0 -111
  709. package/node_modules/pi-lens/dist/clients/symbol-containment.js +0 -24
  710. package/node_modules/pi-lens/dist/clients/symbol-types.js +0 -5
  711. package/node_modules/pi-lens/dist/clients/test-runner-client.js +0 -2507
  712. package/node_modules/pi-lens/dist/clients/test-runner-delivery.js +0 -287
  713. package/node_modules/pi-lens/dist/clients/todo-scanner.js +0 -229
  714. package/node_modules/pi-lens/dist/clients/tool-agreement.js +0 -423
  715. package/node_modules/pi-lens/dist/clients/tool-config.js +0 -249
  716. package/node_modules/pi-lens/dist/clients/tool-cwd.js +0 -270
  717. package/node_modules/pi-lens/dist/clients/tool-definition.js +0 -47
  718. package/node_modules/pi-lens/dist/clients/tool-event.js +0 -105
  719. package/node_modules/pi-lens/dist/clients/tool-policy.js +0 -2755
  720. package/node_modules/pi-lens/dist/clients/tool-probe.js +0 -53
  721. package/node_modules/pi-lens/dist/clients/tool-render.js +0 -156
  722. package/node_modules/pi-lens/dist/clients/tool-set-policy.js +0 -118
  723. package/node_modules/pi-lens/dist/clients/tree-sitter-cache.js +0 -364
  724. package/node_modules/pi-lens/dist/clients/tree-sitter-client.js +0 -4195
  725. package/node_modules/pi-lens/dist/clients/tree-sitter-logger.js +0 -100
  726. package/node_modules/pi-lens/dist/clients/tree-sitter-navigator.js +0 -269
  727. package/node_modules/pi-lens/dist/clients/tree-sitter-query-loader.js +0 -569
  728. package/node_modules/pi-lens/dist/clients/tree-sitter-shared.js +0 -158
  729. package/node_modules/pi-lens/dist/clients/tree-sitter-symbol-extractor.js +0 -1265
  730. package/node_modules/pi-lens/dist/clients/trivy-client.js +0 -467
  731. package/node_modules/pi-lens/dist/clients/tui-fit.js +0 -50
  732. package/node_modules/pi-lens/dist/clients/turn-context.js +0 -52
  733. package/node_modules/pi-lens/dist/clients/turn-end/lane.js +0 -51
  734. package/node_modules/pi-lens/dist/clients/turn-end/lanes/govulncheck.js +0 -112
  735. package/node_modules/pi-lens/dist/clients/turn-end/lanes/secrets.js +0 -204
  736. package/node_modules/pi-lens/dist/clients/turn-summary-render.js +0 -72
  737. package/node_modules/pi-lens/dist/clients/turn-summary.js +0 -132
  738. package/node_modules/pi-lens/dist/clients/typos-config.js +0 -29
  739. package/node_modules/pi-lens/dist/clients/user-notify.js +0 -51
  740. package/node_modules/pi-lens/dist/clients/vanished-instance-marker.js +0 -57
  741. package/node_modules/pi-lens/dist/clients/warm-attach.js +0 -305
  742. package/node_modules/pi-lens/dist/clients/widget-state.js +0 -1808
  743. package/node_modules/pi-lens/dist/clients/word-index-logger.js +0 -49
  744. package/node_modules/pi-lens/dist/clients/word-index-store.js +0 -459
  745. package/node_modules/pi-lens/dist/clients/word-index.js +0 -2080
  746. package/node_modules/pi-lens/dist/clients/workspace-topology.js +0 -443
  747. package/node_modules/pi-lens/dist/clients/write-ordering-guard.js +0 -65
  748. package/node_modules/pi-lens/dist/clients/zizmor-config.js +0 -340
  749. package/node_modules/pi-lens/dist/i18n.js +0 -69
  750. package/node_modules/pi-lens/dist/mcp/build-staleness.js +0 -124
  751. package/node_modules/pi-lens/dist/scripts/lib/process-scan.mjs +0 -583
  752. package/node_modules/pi-lens/dist/scripts/lib/skills-predicate.mjs +0 -129
  753. package/node_modules/pi-lens/dist/scripts/lib/web-tree-sitter-dir.mjs +0 -123
  754. package/node_modules/pi-lens/dist/tools/activate-tools.js +0 -87
  755. package/node_modules/pi-lens/dist/tools/ast-grep-outline.js +0 -137
  756. package/node_modules/pi-lens/dist/tools/ast-grep-replace.js +0 -244
  757. package/node_modules/pi-lens/dist/tools/ast-grep-search.js +0 -762
  758. package/node_modules/pi-lens/dist/tools/effective-config.js +0 -90
  759. package/node_modules/pi-lens/dist/tools/lens-diagnostic-mark.js +0 -375
  760. package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +0 -2571
  761. package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +0 -1745
  762. package/node_modules/pi-lens/dist/tools/lsp-navigation.js +0 -1367
  763. package/node_modules/pi-lens/dist/tools/lsp-structured-output.js +0 -294
  764. package/node_modules/pi-lens/dist/tools/module-report.js +0 -382
  765. package/node_modules/pi-lens/dist/tools/project-report.js +0 -86
  766. package/node_modules/pi-lens/dist/tools/render-compact.js +0 -374
  767. package/node_modules/pi-lens/dist/tools/scan-progress.js +0 -53
  768. package/node_modules/pi-lens/dist/tools/shared.js +0 -29
  769. package/node_modules/pi-lens/dist/tools/symbol-search.js +0 -155
@@ -0,0 +1,2352 @@
1
+ import { createRequire as __pilensCreateRequire } from "node:module"; const require = __pilensCreateRequire(import.meta.url);
2
+
3
+ // node_modules/balanced-match/dist/esm/index.js
4
+ var balanced = (a, b, str) => {
5
+ const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
6
+ const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
7
+ const r = ma !== null && mb != null && range(ma, mb, str);
8
+ return r && {
9
+ start: r[0],
10
+ end: r[1],
11
+ pre: str.slice(0, r[0]),
12
+ body: str.slice(r[0] + ma.length, r[1]),
13
+ post: str.slice(r[1] + mb.length)
14
+ };
15
+ };
16
+ var maybeMatch = (reg, str) => {
17
+ const m = str.match(reg);
18
+ return m ? m[0] : null;
19
+ };
20
+ var range = (a, b, str) => {
21
+ let begs, beg, left, right = void 0, result;
22
+ let ai = str.indexOf(a);
23
+ let bi = str.indexOf(b, ai + 1);
24
+ let i = ai;
25
+ if (ai >= 0 && bi > 0) {
26
+ if (a === b) {
27
+ return [ai, bi];
28
+ }
29
+ begs = [];
30
+ left = str.length;
31
+ while (i >= 0 && !result) {
32
+ if (i === ai) {
33
+ begs.push(i);
34
+ ai = str.indexOf(a, i + 1);
35
+ } else if (begs.length === 1) {
36
+ const r = begs.pop();
37
+ if (r !== void 0)
38
+ result = [r, bi];
39
+ } else {
40
+ beg = begs.pop();
41
+ if (beg !== void 0 && beg < left) {
42
+ left = beg;
43
+ right = bi;
44
+ }
45
+ bi = str.indexOf(b, i + 1);
46
+ }
47
+ i = ai < bi && ai >= 0 ? ai : bi;
48
+ }
49
+ if (begs.length && right !== void 0) {
50
+ result = [left, right];
51
+ }
52
+ }
53
+ return result;
54
+ };
55
+
56
+ // node_modules/brace-expansion/dist/esm/index.js
57
+ var escSlash = "\0SLASH" + Math.random() + "\0";
58
+ var escOpen = "\0OPEN" + Math.random() + "\0";
59
+ var escClose = "\0CLOSE" + Math.random() + "\0";
60
+ var escComma = "\0COMMA" + Math.random() + "\0";
61
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
62
+ var escSlashPattern = new RegExp(escSlash, "g");
63
+ var escOpenPattern = new RegExp(escOpen, "g");
64
+ var escClosePattern = new RegExp(escClose, "g");
65
+ var escCommaPattern = new RegExp(escComma, "g");
66
+ var escPeriodPattern = new RegExp(escPeriod, "g");
67
+ var slashPattern = /\\\\/g;
68
+ var openPattern = /\\{/g;
69
+ var closePattern = /\\}/g;
70
+ var commaPattern = /\\,/g;
71
+ var periodPattern = /\\\./g;
72
+ var EXPANSION_MAX = 1e5;
73
+ var EXPANSION_MAX_LENGTH = 4e6;
74
+ var EXPANSION_MAX_DEPTH = 1e3;
75
+ var EXPANSION_MAX_REWRITES = 1e3;
76
+ function numeric(str) {
77
+ return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
78
+ }
79
+ function escapeBraces(str) {
80
+ return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
81
+ }
82
+ function unescapeBraces(str) {
83
+ return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
84
+ }
85
+ function pushAll(target, items) {
86
+ for (let i = 0; i < items.length; i++) {
87
+ target.push(items[i]);
88
+ }
89
+ }
90
+ function parseCommaParts(str) {
91
+ const parts = [];
92
+ let carry = "";
93
+ for (; ; ) {
94
+ const m = balanced("{", "}", str);
95
+ if (!m) {
96
+ const tail = str.split(",");
97
+ tail[0] = carry + tail[0];
98
+ pushAll(parts, tail);
99
+ return parts;
100
+ }
101
+ const { pre, body, post } = m;
102
+ const p = pre.split(",");
103
+ p[0] = carry + p[0];
104
+ p[p.length - 1] += "{" + body + "}";
105
+ if (!post.length) {
106
+ pushAll(parts, p);
107
+ return parts;
108
+ }
109
+ carry = p.pop();
110
+ pushAll(parts, p);
111
+ str = post;
112
+ }
113
+ }
114
+ function expand(str, options = {}) {
115
+ if (!str) {
116
+ return [];
117
+ }
118
+ const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH, maxDepth = EXPANSION_MAX_DEPTH, maxRewrites = EXPANSION_MAX_REWRITES } = options;
119
+ if (str.slice(0, 2) === "{}") {
120
+ str = "\\{\\}" + str.slice(2);
121
+ }
122
+ return expand_(escapeBraces(str), max, maxLength, maxDepth, 0, maxRewrites, true).map(unescapeBraces);
123
+ }
124
+ function embrace(str) {
125
+ return "{" + str + "}";
126
+ }
127
+ function isPadded(el) {
128
+ return /^-?0\d/.test(el);
129
+ }
130
+ function lte(i, y) {
131
+ return i <= y;
132
+ }
133
+ function gte(i, y) {
134
+ return i >= y;
135
+ }
136
+ function combine(acc, pre, values, max, maxLength, dropEmpties) {
137
+ const out = [];
138
+ let length = 0;
139
+ for (let a = 0; a < acc.length; a++) {
140
+ for (let v = 0; v < values.length; v++) {
141
+ if (out.length >= max)
142
+ return out;
143
+ const expansion = acc[a] + pre + values[v];
144
+ if (dropEmpties && !expansion)
145
+ continue;
146
+ if (length + expansion.length > maxLength)
147
+ return out;
148
+ out.push(expansion);
149
+ length += expansion.length;
150
+ }
151
+ }
152
+ return out;
153
+ }
154
+ function expandSequence(body, isAlphaSequence, max, maxLength) {
155
+ const n = body.split(/\.\./);
156
+ const N = [];
157
+ if (n[0] === void 0 || n[1] === void 0) {
158
+ return N;
159
+ }
160
+ const x = numeric(n[0]);
161
+ const y = numeric(n[1]);
162
+ const width = Math.max(n[0].length, n[1].length);
163
+ let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
164
+ let test = lte;
165
+ const reverse = y < x;
166
+ if (reverse) {
167
+ incr *= -1;
168
+ test = gte;
169
+ }
170
+ const pad = n.some(isPadded);
171
+ let length = 0;
172
+ for (let i = x; test(i, y) && N.length < max; i += incr) {
173
+ let c;
174
+ if (isAlphaSequence) {
175
+ c = String.fromCharCode(i);
176
+ if (c === "\\") {
177
+ c = "";
178
+ }
179
+ } else {
180
+ c = String(i);
181
+ if (pad) {
182
+ const need = width - c.length;
183
+ if (need > 0) {
184
+ const z = new Array(need + 1).join("0");
185
+ if (i < 0) {
186
+ c = "-" + z + c.slice(1);
187
+ } else {
188
+ c = z + c;
189
+ }
190
+ }
191
+ }
192
+ }
193
+ if (length + c.length > maxLength)
194
+ break;
195
+ N.push(c);
196
+ length += c.length;
197
+ }
198
+ return N;
199
+ }
200
+ function expand_(str, max, maxLength, maxDepth, depth, maxRewrites, isTop) {
201
+ if (depth > maxDepth) {
202
+ return [str];
203
+ }
204
+ let acc = [""];
205
+ let rewrites = 0;
206
+ let dropEmpties = false;
207
+ let firstGroup = true;
208
+ for (; ; ) {
209
+ const m = balanced("{", "}", str);
210
+ if (!m) {
211
+ return combine(acc, str, [""], max, maxLength, dropEmpties);
212
+ }
213
+ const pre = m.pre;
214
+ if (/\$$/.test(pre)) {
215
+ acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length);
216
+ firstGroup = false;
217
+ if (!m.post.length)
218
+ break;
219
+ str = m.post;
220
+ continue;
221
+ }
222
+ const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
223
+ const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
224
+ const isSequence = isNumericSequence || isAlphaSequence;
225
+ const isOptions = m.body.indexOf(",") >= 0;
226
+ if (!isSequence && !isOptions) {
227
+ if (rewrites < maxRewrites && m.post.match(/,(?!,).*\}/)) {
228
+ rewrites++;
229
+ str = m.pre + "{" + m.body + escClose + m.post;
230
+ isTop = true;
231
+ continue;
232
+ }
233
+ return combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties);
234
+ }
235
+ if (firstGroup) {
236
+ dropEmpties = isTop && !isSequence;
237
+ firstGroup = false;
238
+ }
239
+ let values;
240
+ if (isSequence) {
241
+ values = expandSequence(m.body, isAlphaSequence, max, maxLength);
242
+ } else {
243
+ let n = parseCommaParts(m.body);
244
+ if (n.length === 1 && n[0] !== void 0) {
245
+ n = expand_(n[0], max, maxLength, maxDepth, depth + 1, maxRewrites, false).map(embrace);
246
+ if (n.length === 1) {
247
+ acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length);
248
+ if (!m.post.length)
249
+ break;
250
+ str = m.post;
251
+ continue;
252
+ }
253
+ }
254
+ let dropsEmpties = dropEmpties && !m.post.length && !pre;
255
+ for (let d = 0; dropsEmpties && d < acc.length; d++) {
256
+ if (acc[d]) {
257
+ dropsEmpties = false;
258
+ }
259
+ }
260
+ values = [];
261
+ let valuesLength = 0;
262
+ outer: for (let j = 0; j < n.length; j++) {
263
+ const expanded = expand_(n[j], max, maxLength, maxDepth, depth + 1, maxRewrites, false);
264
+ for (let k = 0; k < expanded.length; k++) {
265
+ const v = expanded[k];
266
+ if (dropsEmpties && !v)
267
+ continue;
268
+ if (values.length >= max || valuesLength + v.length > maxLength) {
269
+ break outer;
270
+ }
271
+ values.push(v);
272
+ valuesLength += v.length;
273
+ }
274
+ }
275
+ }
276
+ acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);
277
+ if (!m.post.length)
278
+ break;
279
+ str = m.post;
280
+ }
281
+ return acc;
282
+ }
283
+
284
+ // node_modules/minimatch/dist/esm/assert-valid-pattern.js
285
+ var MAX_PATTERN_LENGTH = 1024 * 64;
286
+ var assertValidPattern = (pattern) => {
287
+ if (typeof pattern !== "string") {
288
+ throw new TypeError("invalid pattern");
289
+ }
290
+ if (pattern.length > MAX_PATTERN_LENGTH) {
291
+ throw new TypeError("pattern is too long");
292
+ }
293
+ };
294
+
295
+ // node_modules/minimatch/dist/esm/brace-expressions.js
296
+ var posixClasses = {
297
+ "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
298
+ "[:alpha:]": ["\\p{L}\\p{Nl}", true],
299
+ "[:ascii:]": ["\\x00-\\x7f", false],
300
+ "[:blank:]": ["\\p{Zs}\\t", true],
301
+ "[:cntrl:]": ["\\p{Cc}", true],
302
+ "[:digit:]": ["\\p{Nd}", true],
303
+ "[:graph:]": ["\\p{Z}\\p{C}", true, true],
304
+ "[:lower:]": ["\\p{Ll}", true],
305
+ "[:print:]": ["\\p{C}", true],
306
+ "[:punct:]": ["\\p{P}", true],
307
+ "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true],
308
+ "[:upper:]": ["\\p{Lu}", true],
309
+ "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true],
310
+ "[:xdigit:]": ["A-Fa-f0-9", false]
311
+ };
312
+ var braceEscape = (s) => s.replace(/[[\]\\-]/g, "\\$&");
313
+ var regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
314
+ var rangesToString = (ranges) => ranges.join("");
315
+ var parseClass = (glob, position) => {
316
+ const pos = position;
317
+ if (glob.charAt(pos) !== "[") {
318
+ throw new Error("not in a brace expression");
319
+ }
320
+ const ranges = [];
321
+ const negs = [];
322
+ let i = pos + 1;
323
+ let sawStart = false;
324
+ let uflag = false;
325
+ let escaping = false;
326
+ let negate = false;
327
+ let endPos = pos;
328
+ let rangeStart = "";
329
+ WHILE: while (i < glob.length) {
330
+ const c = glob.charAt(i);
331
+ if ((c === "!" || c === "^") && i === pos + 1) {
332
+ negate = true;
333
+ i++;
334
+ continue;
335
+ }
336
+ if (c === "]" && sawStart && !escaping) {
337
+ endPos = i + 1;
338
+ break;
339
+ }
340
+ sawStart = true;
341
+ if (c === "\\") {
342
+ if (!escaping) {
343
+ escaping = true;
344
+ i++;
345
+ continue;
346
+ }
347
+ }
348
+ if (c === "[" && !escaping) {
349
+ for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
350
+ if (glob.startsWith(cls, i)) {
351
+ if (rangeStart) {
352
+ return ["$.", false, glob.length - pos, true];
353
+ }
354
+ i += cls.length;
355
+ if (neg)
356
+ negs.push(unip);
357
+ else
358
+ ranges.push(unip);
359
+ uflag = uflag || u;
360
+ continue WHILE;
361
+ }
362
+ }
363
+ }
364
+ escaping = false;
365
+ if (rangeStart) {
366
+ if (c > rangeStart) {
367
+ ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c));
368
+ } else if (c === rangeStart) {
369
+ ranges.push(braceEscape(c));
370
+ }
371
+ rangeStart = "";
372
+ i++;
373
+ continue;
374
+ }
375
+ if (glob.startsWith("-]", i + 1)) {
376
+ ranges.push(braceEscape(c + "-"));
377
+ i += 2;
378
+ continue;
379
+ }
380
+ if (glob.startsWith("-", i + 1)) {
381
+ rangeStart = c;
382
+ i += 2;
383
+ continue;
384
+ }
385
+ ranges.push(braceEscape(c));
386
+ i++;
387
+ }
388
+ if (endPos < i) {
389
+ return ["", false, 0, false];
390
+ }
391
+ if (!ranges.length && !negs.length) {
392
+ return ["$.", false, glob.length - pos, true];
393
+ }
394
+ if (negs.length === 0 && ranges.length === 1 && /^\\?.$/.test(ranges[0]) && !negate) {
395
+ const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
396
+ return [regexpEscape(r), false, endPos - pos, false];
397
+ }
398
+ const sranges = "[" + (negate ? "^" : "") + rangesToString(ranges) + "]";
399
+ const snegs = "[" + (negate ? "" : "^") + rangesToString(negs) + "]";
400
+ const comb = ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs;
401
+ return [comb, uflag, endPos - pos, true];
402
+ };
403
+
404
+ // node_modules/minimatch/dist/esm/unescape.js
405
+ var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
406
+ if (magicalBraces) {
407
+ return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
408
+ }
409
+ return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
410
+ };
411
+
412
+ // node_modules/minimatch/dist/esm/ast.js
413
+ var _a;
414
+ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
415
+ var isExtglobType = (c) => types.has(c);
416
+ var isExtglobAST = (c) => isExtglobType(c.type);
417
+ var adoptionMap = /* @__PURE__ */ new Map([
418
+ ["!", ["@"]],
419
+ ["?", ["?", "@"]],
420
+ ["@", ["@"]],
421
+ ["*", ["*", "+", "?", "@"]],
422
+ ["+", ["+", "@"]]
423
+ ]);
424
+ var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
425
+ ["!", ["?"]],
426
+ ["@", ["?"]],
427
+ ["+", ["?", "*"]]
428
+ ]);
429
+ var adoptionAnyMap = /* @__PURE__ */ new Map([
430
+ ["!", ["?", "@"]],
431
+ ["?", ["?", "@"]],
432
+ ["@", ["?", "@"]],
433
+ ["*", ["*", "+", "?", "@"]],
434
+ ["+", ["+", "@", "?", "*"]]
435
+ ]);
436
+ var usurpMap = /* @__PURE__ */ new Map([
437
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
438
+ [
439
+ "?",
440
+ /* @__PURE__ */ new Map([
441
+ ["*", "*"],
442
+ ["+", "*"]
443
+ ])
444
+ ],
445
+ [
446
+ "@",
447
+ /* @__PURE__ */ new Map([
448
+ ["!", "!"],
449
+ ["?", "?"],
450
+ ["@", "@"],
451
+ ["*", "*"],
452
+ ["+", "+"]
453
+ ])
454
+ ],
455
+ [
456
+ "+",
457
+ /* @__PURE__ */ new Map([
458
+ ["?", "*"],
459
+ ["*", "*"]
460
+ ])
461
+ ]
462
+ ]);
463
+ var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
464
+ var startNoDot = "(?!\\.)";
465
+ var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
466
+ var justDots = /* @__PURE__ */ new Set(["..", "."]);
467
+ var reSpecials = new Set("().*{}+?[]^$\\!");
468
+ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
469
+ var qmark = "[^/]";
470
+ var star = qmark + "*?";
471
+ var starNoEmpty = qmark + "+?";
472
+ var ID = 0;
473
+ var AST = class {
474
+ type;
475
+ #root;
476
+ #hasMagic;
477
+ #uflag = false;
478
+ #parts = [];
479
+ #parent;
480
+ #parentIndex;
481
+ #negs;
482
+ #filledNegs = false;
483
+ #options;
484
+ #toString;
485
+ // set to true if it's an extglob with no children
486
+ // (which really means one child of '')
487
+ #emptyExt = false;
488
+ id = ++ID;
489
+ get depth() {
490
+ return (this.#parent?.depth ?? -1) + 1;
491
+ }
492
+ [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
493
+ return {
494
+ "@@type": "AST",
495
+ id: this.id,
496
+ type: this.type,
497
+ root: this.#root.id,
498
+ parent: this.#parent?.id,
499
+ depth: this.depth,
500
+ partsLength: this.#parts.length,
501
+ parts: this.#parts
502
+ };
503
+ }
504
+ constructor(type, parent, options = {}) {
505
+ this.type = type;
506
+ if (type)
507
+ this.#hasMagic = true;
508
+ this.#parent = parent;
509
+ this.#root = this.#parent ? this.#parent.#root : this;
510
+ this.#options = this.#root === this ? options : this.#root.#options;
511
+ this.#negs = this.#root === this ? [] : this.#root.#negs;
512
+ if (type === "!" && !this.#root.#filledNegs)
513
+ this.#negs.push(this);
514
+ this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
515
+ }
516
+ get hasMagic() {
517
+ if (this.#hasMagic !== void 0)
518
+ return this.#hasMagic;
519
+ for (const p of this.#parts) {
520
+ if (typeof p === "string")
521
+ continue;
522
+ if (p.type || p.hasMagic)
523
+ return this.#hasMagic = true;
524
+ }
525
+ return this.#hasMagic;
526
+ }
527
+ // reconstructs the pattern
528
+ toString() {
529
+ return this.#toString !== void 0 ? this.#toString : !this.type ? this.#toString = this.#parts.map((p) => String(p)).join("") : this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")";
530
+ }
531
+ #fillNegs() {
532
+ if (this !== this.#root)
533
+ throw new Error("should only call on root");
534
+ if (this.#filledNegs)
535
+ return this;
536
+ this.toString();
537
+ this.#filledNegs = true;
538
+ let n;
539
+ while (n = this.#negs.pop()) {
540
+ if (n.type !== "!")
541
+ continue;
542
+ let p = n;
543
+ let pp = p.#parent;
544
+ while (pp) {
545
+ for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
546
+ for (const part of n.#parts) {
547
+ if (typeof part === "string") {
548
+ throw new Error("string part in extglob AST??");
549
+ }
550
+ part.copyIn(pp.#parts[i]);
551
+ }
552
+ }
553
+ p = pp;
554
+ pp = p.#parent;
555
+ }
556
+ }
557
+ return this;
558
+ }
559
+ push(...parts) {
560
+ for (const p of parts) {
561
+ if (p === "")
562
+ continue;
563
+ if (typeof p !== "string" && !(p instanceof _a && p.#parent === this)) {
564
+ throw new Error("invalid part: " + p);
565
+ }
566
+ this.#parts.push(p);
567
+ }
568
+ }
569
+ toJSON() {
570
+ const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
571
+ if (this.isStart() && !this.type)
572
+ ret.unshift([]);
573
+ if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) {
574
+ ret.push({});
575
+ }
576
+ return ret;
577
+ }
578
+ isStart() {
579
+ if (this.#root === this)
580
+ return true;
581
+ if (!this.#parent?.isStart())
582
+ return false;
583
+ if (this.#parentIndex === 0)
584
+ return true;
585
+ const p = this.#parent;
586
+ for (let i = 0; i < this.#parentIndex; i++) {
587
+ const pp = p.#parts[i];
588
+ if (!(pp instanceof _a && pp.type === "!")) {
589
+ return false;
590
+ }
591
+ }
592
+ return true;
593
+ }
594
+ isEnd() {
595
+ if (this.#root === this)
596
+ return true;
597
+ if (this.#parent?.type === "!")
598
+ return true;
599
+ if (!this.#parent?.isEnd())
600
+ return false;
601
+ if (!this.type)
602
+ return this.#parent?.isEnd();
603
+ const pl = this.#parent ? this.#parent.#parts.length : 0;
604
+ return this.#parentIndex === pl - 1;
605
+ }
606
+ copyIn(part) {
607
+ if (typeof part === "string")
608
+ this.push(part);
609
+ else
610
+ this.push(part.clone(this));
611
+ }
612
+ clone(parent) {
613
+ const c = new _a(this.type, parent);
614
+ for (const p of this.#parts) {
615
+ c.copyIn(p);
616
+ }
617
+ return c;
618
+ }
619
+ static #parseAST(str, ast, pos, opt, extDepth) {
620
+ const maxDepth = opt.maxExtglobRecursion ?? 2;
621
+ let escaping = false;
622
+ let inBrace = false;
623
+ let braceStart = -1;
624
+ let braceNeg = false;
625
+ if (ast.type === null) {
626
+ let i2 = pos;
627
+ let acc2 = "";
628
+ while (i2 < str.length) {
629
+ const c = str.charAt(i2++);
630
+ if (escaping || c === "\\") {
631
+ escaping = !escaping;
632
+ acc2 += c;
633
+ continue;
634
+ }
635
+ if (inBrace) {
636
+ if (i2 === braceStart + 1) {
637
+ if (c === "^" || c === "!") {
638
+ braceNeg = true;
639
+ }
640
+ } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) {
641
+ inBrace = false;
642
+ }
643
+ acc2 += c;
644
+ continue;
645
+ } else if (c === "[") {
646
+ inBrace = true;
647
+ braceStart = i2;
648
+ braceNeg = false;
649
+ acc2 += c;
650
+ continue;
651
+ }
652
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
653
+ if (doRecurse) {
654
+ ast.push(acc2);
655
+ acc2 = "";
656
+ const ext2 = new _a(c, ast);
657
+ i2 = _a.#parseAST(str, ext2, i2, opt, extDepth + 1);
658
+ ast.push(ext2);
659
+ continue;
660
+ }
661
+ acc2 += c;
662
+ }
663
+ ast.push(acc2);
664
+ return i2;
665
+ }
666
+ let i = pos + 1;
667
+ let part = new _a(null, ast);
668
+ const parts = [];
669
+ let acc = "";
670
+ while (i < str.length) {
671
+ const c = str.charAt(i++);
672
+ if (escaping || c === "\\") {
673
+ escaping = !escaping;
674
+ acc += c;
675
+ continue;
676
+ }
677
+ if (inBrace) {
678
+ if (i === braceStart + 1) {
679
+ if (c === "^" || c === "!") {
680
+ braceNeg = true;
681
+ }
682
+ } else if (c === "]" && !(i === braceStart + 2 && braceNeg)) {
683
+ inBrace = false;
684
+ }
685
+ acc += c;
686
+ continue;
687
+ } else if (c === "[") {
688
+ inBrace = true;
689
+ braceStart = i;
690
+ braceNeg = false;
691
+ acc += c;
692
+ continue;
693
+ }
694
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
695
+ (extDepth <= maxDepth || ast && ast.#canAdoptType(c));
696
+ if (doRecurse) {
697
+ const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
698
+ part.push(acc);
699
+ acc = "";
700
+ const ext2 = new _a(c, part);
701
+ part.push(ext2);
702
+ i = _a.#parseAST(str, ext2, i, opt, extDepth + depthAdd);
703
+ continue;
704
+ }
705
+ if (c === "|") {
706
+ part.push(acc);
707
+ acc = "";
708
+ parts.push(part);
709
+ part = new _a(null, ast);
710
+ continue;
711
+ }
712
+ if (c === ")") {
713
+ if (acc === "" && ast.#parts.length === 0) {
714
+ ast.#emptyExt = true;
715
+ }
716
+ part.push(acc);
717
+ acc = "";
718
+ ast.push(...parts, part);
719
+ return i;
720
+ }
721
+ acc += c;
722
+ }
723
+ ast.type = null;
724
+ ast.#hasMagic = void 0;
725
+ ast.#parts = [str.substring(pos - 1)];
726
+ return i;
727
+ }
728
+ #canAdoptWithSpace(child) {
729
+ return this.#canAdopt(child, adoptionWithSpaceMap);
730
+ }
731
+ #canAdopt(child, map = adoptionMap) {
732
+ if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) {
733
+ return false;
734
+ }
735
+ const gc = child.#parts[0];
736
+ if (!gc || typeof gc !== "object" || gc.type === null) {
737
+ return false;
738
+ }
739
+ return this.#canAdoptType(gc.type, map);
740
+ }
741
+ #canAdoptType(c, map = adoptionAnyMap) {
742
+ return !!map.get(this.type)?.includes(c);
743
+ }
744
+ #adoptWithSpace(child, index) {
745
+ const gc = child.#parts[0];
746
+ const blank = new _a(null, gc, this.options);
747
+ blank.#parts.push("");
748
+ gc.push(blank);
749
+ this.#adopt(child, index);
750
+ }
751
+ #adopt(child, index) {
752
+ const gc = child.#parts[0];
753
+ this.#parts.splice(index, 1, ...gc.#parts);
754
+ for (const p of gc.#parts) {
755
+ if (typeof p === "object")
756
+ p.#parent = this;
757
+ }
758
+ this.#toString = void 0;
759
+ }
760
+ #canUsurpType(c) {
761
+ const m = usurpMap.get(this.type);
762
+ return !!m?.has(c);
763
+ }
764
+ #canUsurp(child) {
765
+ if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) {
766
+ return false;
767
+ }
768
+ const gc = child.#parts[0];
769
+ if (!gc || typeof gc !== "object" || gc.type === null) {
770
+ return false;
771
+ }
772
+ return this.#canUsurpType(gc.type);
773
+ }
774
+ #usurp(child) {
775
+ const m = usurpMap.get(this.type);
776
+ const gc = child.#parts[0];
777
+ const nt = m?.get(gc.type);
778
+ if (!nt)
779
+ return false;
780
+ this.#parts = gc.#parts;
781
+ for (const p of this.#parts) {
782
+ if (typeof p === "object") {
783
+ p.#parent = this;
784
+ }
785
+ }
786
+ this.type = nt;
787
+ this.#toString = void 0;
788
+ this.#emptyExt = false;
789
+ }
790
+ static fromGlob(pattern, options = {}) {
791
+ const ast = new _a(null, void 0, options);
792
+ _a.#parseAST(pattern, ast, 0, options, 0);
793
+ return ast;
794
+ }
795
+ // returns the regular expression if there's magic, or the unescaped
796
+ // string if not.
797
+ toMMPattern() {
798
+ if (this !== this.#root)
799
+ return this.#root.toMMPattern();
800
+ const glob = this.toString();
801
+ const [re, body, hasMagic, uflag] = this.toRegExpSource();
802
+ const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase();
803
+ if (!anyMagic) {
804
+ return body;
805
+ }
806
+ const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : "");
807
+ return Object.assign(new RegExp(`^${re}$`, flags), {
808
+ _src: re,
809
+ _glob: glob
810
+ });
811
+ }
812
+ get options() {
813
+ return this.#options;
814
+ }
815
+ // returns the string match, the regexp source, whether there's magic
816
+ // in the regexp (so a regular expression is required) and whether or
817
+ // not the uflag is needed for the regular expression (for posix classes)
818
+ // TODO: instead of injecting the start/end at this point, just return
819
+ // the BODY of the regexp, along with the start/end portions suitable
820
+ // for binding the start/end in either a joined full-path makeRe context
821
+ // (where we bind to (^|/), or a standalone matchPart context (where
822
+ // we bind to ^, and not /). Otherwise slashes get duped!
823
+ //
824
+ // In part-matching mode, the start is:
825
+ // - if not isStart: nothing
826
+ // - if traversal possible, but not allowed: ^(?!\.\.?$)
827
+ // - if dots allowed or not possible: ^
828
+ // - if dots possible and not allowed: ^(?!\.)
829
+ // end is:
830
+ // - if not isEnd(): nothing
831
+ // - else: $
832
+ //
833
+ // In full-path matching mode, we put the slash at the START of the
834
+ // pattern, so start is:
835
+ // - if first pattern: same as part-matching mode
836
+ // - if not isStart(): nothing
837
+ // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
838
+ // - if dots allowed or not possible: /
839
+ // - if dots possible and not allowed: /(?!\.)
840
+ // end is:
841
+ // - if last pattern, same as part-matching mode
842
+ // - else nothing
843
+ //
844
+ // Always put the (?:$|/) on negated tails, though, because that has to be
845
+ // there to bind the end of the negated pattern portion, and it's easier to
846
+ // just stick it in now rather than try to inject it later in the middle of
847
+ // the pattern.
848
+ //
849
+ // We can just always return the same end, and leave it up to the caller
850
+ // to know whether it's going to be used joined or in parts.
851
+ // And, if the start is adjusted slightly, can do the same there:
852
+ // - if not isStart: nothing
853
+ // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
854
+ // - if dots allowed or not possible: (?:/|^)
855
+ // - if dots possible and not allowed: (?:/|^)(?!\.)
856
+ //
857
+ // But it's better to have a simpler binding without a conditional, for
858
+ // performance, so probably better to return both start options.
859
+ //
860
+ // Then the caller just ignores the end if it's not the first pattern,
861
+ // and the start always gets applied.
862
+ //
863
+ // But that's always going to be $ if it's the ending pattern, or nothing,
864
+ // so the caller can just attach $ at the end of the pattern when building.
865
+ //
866
+ // So the todo is:
867
+ // - better detect what kind of start is needed
868
+ // - return both flavors of starting pattern
869
+ // - attach $ at the end of the pattern when creating the actual RegExp
870
+ //
871
+ // Ah, but wait, no, that all only applies to the root when the first pattern
872
+ // is not an extglob. If the first pattern IS an extglob, then we need all
873
+ // that dot prevention biz to live in the extglob portions, because eg
874
+ // +(*|.x*) can match .xy but not .yx.
875
+ //
876
+ // So, return the two flavors if it's #root and the first child is not an
877
+ // AST, otherwise leave it to the child AST to handle it, and there,
878
+ // use the (?:^|/) style of start binding.
879
+ //
880
+ // Even simplified further:
881
+ // - Since the start for a join is eg /(?!\.) and the start for a part
882
+ // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
883
+ // or start or whatever) and prepend ^ or / at the Regexp construction.
884
+ toRegExpSource(allowDot) {
885
+ const dot = allowDot ?? !!this.#options.dot;
886
+ if (this.#root === this) {
887
+ this.#flatten();
888
+ this.#fillNegs();
889
+ }
890
+ if (!isExtglobAST(this)) {
891
+ const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
892
+ const src = this.#parts.map((p) => {
893
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
894
+ this.#hasMagic = this.#hasMagic || hasMagic;
895
+ this.#uflag = this.#uflag || uflag;
896
+ return re;
897
+ }).join("");
898
+ let start2 = "";
899
+ if (this.isStart()) {
900
+ if (typeof this.#parts[0] === "string") {
901
+ const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
902
+ if (!dotTravAllowed) {
903
+ const aps = addPatternStart;
904
+ const needNoTrav = (
905
+ // dots are allowed, and the pattern starts with [ or .
906
+ dot && aps.has(src.charAt(0)) || // the pattern starts with \., and then [ or .
907
+ src.startsWith("\\.") && aps.has(src.charAt(2)) || // the pattern starts with \.\., and then [ or .
908
+ src.startsWith("\\.\\.") && aps.has(src.charAt(4))
909
+ );
910
+ const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
911
+ start2 = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : "";
912
+ }
913
+ }
914
+ }
915
+ let end = "";
916
+ if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") {
917
+ end = "(?:$|\\/)";
918
+ }
919
+ const final2 = start2 + src + end;
920
+ return [
921
+ final2,
922
+ unescape(src),
923
+ this.#hasMagic = !!this.#hasMagic,
924
+ this.#uflag
925
+ ];
926
+ }
927
+ const repeated = this.type === "*" || this.type === "+";
928
+ const start = this.type === "!" ? "(?:(?!(?:" : "(?:";
929
+ let body = this.#partsToRegExp(dot);
930
+ if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
931
+ const s = this.toString();
932
+ const me = this;
933
+ me.#parts = [s];
934
+ me.type = null;
935
+ me.#hasMagic = void 0;
936
+ return [s, unescape(this.toString()), false, false];
937
+ }
938
+ let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
939
+ if (bodyDotAllowed === body) {
940
+ bodyDotAllowed = "";
941
+ }
942
+ if (bodyDotAllowed) {
943
+ body = `(?:${body})(?:${bodyDotAllowed})*?`;
944
+ }
945
+ let final = "";
946
+ if (this.type === "!" && this.#emptyExt) {
947
+ final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty;
948
+ } else {
949
+ const close = this.type === "!" ? (
950
+ // !() must match something,but !(x) can match ''
951
+ "))" + (this.isStart() && !dot && !allowDot ? startNoDot : "") + star + ")"
952
+ ) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && bodyDotAllowed ? ")" : this.type === "*" && bodyDotAllowed ? `)?` : `)${this.type}`;
953
+ final = start + body + close;
954
+ }
955
+ return [
956
+ final,
957
+ unescape(body),
958
+ this.#hasMagic = !!this.#hasMagic,
959
+ this.#uflag
960
+ ];
961
+ }
962
+ #flatten() {
963
+ if (!isExtglobAST(this)) {
964
+ for (const p of this.#parts) {
965
+ if (typeof p === "object") {
966
+ p.#flatten();
967
+ }
968
+ }
969
+ } else {
970
+ let iterations = 0;
971
+ let done = false;
972
+ do {
973
+ done = true;
974
+ for (let i = 0; i < this.#parts.length; i++) {
975
+ const c = this.#parts[i];
976
+ if (typeof c === "object") {
977
+ c.#flatten();
978
+ if (this.#canAdopt(c)) {
979
+ done = false;
980
+ this.#adopt(c, i);
981
+ } else if (this.#canAdoptWithSpace(c)) {
982
+ done = false;
983
+ this.#adoptWithSpace(c, i);
984
+ } else if (this.#canUsurp(c)) {
985
+ done = false;
986
+ this.#usurp(c);
987
+ }
988
+ }
989
+ }
990
+ } while (!done && ++iterations < 10);
991
+ }
992
+ this.#toString = void 0;
993
+ }
994
+ #partsToRegExp(dot) {
995
+ return this.#parts.map((p) => {
996
+ if (typeof p === "string") {
997
+ throw new Error("string type in extglob ast??");
998
+ }
999
+ const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
1000
+ this.#uflag = this.#uflag || uflag;
1001
+ return re;
1002
+ }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|");
1003
+ }
1004
+ static #parseGlob(glob, hasMagic, noEmpty = false) {
1005
+ let escaping = false;
1006
+ let re = "";
1007
+ let uflag = false;
1008
+ let inStar = false;
1009
+ for (let i = 0; i < glob.length; i++) {
1010
+ const c = glob.charAt(i);
1011
+ if (escaping) {
1012
+ escaping = false;
1013
+ re += (reSpecials.has(c) ? "\\" : "") + c;
1014
+ continue;
1015
+ }
1016
+ if (c === "*") {
1017
+ if (inStar)
1018
+ continue;
1019
+ inStar = true;
1020
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
1021
+ hasMagic = true;
1022
+ continue;
1023
+ } else {
1024
+ inStar = false;
1025
+ }
1026
+ if (c === "\\") {
1027
+ if (i === glob.length - 1) {
1028
+ re += "\\\\";
1029
+ } else {
1030
+ escaping = true;
1031
+ }
1032
+ continue;
1033
+ }
1034
+ if (c === "[") {
1035
+ const [src, needUflag, consumed, magic] = parseClass(glob, i);
1036
+ if (consumed) {
1037
+ re += src;
1038
+ uflag = uflag || needUflag;
1039
+ i += consumed - 1;
1040
+ hasMagic = hasMagic || magic;
1041
+ continue;
1042
+ }
1043
+ }
1044
+ if (c === "?") {
1045
+ re += qmark;
1046
+ hasMagic = true;
1047
+ continue;
1048
+ }
1049
+ re += regExpEscape(c);
1050
+ }
1051
+ return [re, unescape(glob), !!hasMagic, uflag];
1052
+ }
1053
+ };
1054
+ _a = AST;
1055
+
1056
+ // node_modules/minimatch/dist/esm/escape.js
1057
+ var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
1058
+ if (magicalBraces) {
1059
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
1060
+ }
1061
+ return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1062
+ };
1063
+
1064
+ // node_modules/minimatch/dist/esm/index.js
1065
+ var minimatch = (p, pattern, options = {}) => {
1066
+ assertValidPattern(pattern);
1067
+ if (!options.nocomment && pattern.charAt(0) === "#") {
1068
+ return false;
1069
+ }
1070
+ return new Minimatch(pattern, options).match(p);
1071
+ };
1072
+ var starDotExtRE = /^\*+([^+@!?*[(]*)$/;
1073
+ var starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2);
1074
+ var starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2);
1075
+ var starDotExtTestNocase = (ext2) => {
1076
+ ext2 = ext2.toLowerCase();
1077
+ return (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2);
1078
+ };
1079
+ var starDotExtTestNocaseDot = (ext2) => {
1080
+ ext2 = ext2.toLowerCase();
1081
+ return (f) => f.toLowerCase().endsWith(ext2);
1082
+ };
1083
+ var starDotStarRE = /^\*+\.\*+$/;
1084
+ var starDotStarTest = (f) => !f.startsWith(".") && f.includes(".");
1085
+ var starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes(".");
1086
+ var dotStarRE = /^\.\*+$/;
1087
+ var dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith(".");
1088
+ var starRE = /^\*+$/;
1089
+ var starTest = (f) => f.length !== 0 && !f.startsWith(".");
1090
+ var starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..";
1091
+ var qmarksRE = /^\?+([^+@!?*[(]*)?$/;
1092
+ var qmarksTestNocase = ([$0, ext2 = ""]) => {
1093
+ const noext = qmarksTestNoExt([$0]);
1094
+ if (!ext2)
1095
+ return noext;
1096
+ ext2 = ext2.toLowerCase();
1097
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1098
+ };
1099
+ var qmarksTestNocaseDot = ([$0, ext2 = ""]) => {
1100
+ const noext = qmarksTestNoExtDot([$0]);
1101
+ if (!ext2)
1102
+ return noext;
1103
+ ext2 = ext2.toLowerCase();
1104
+ return (f) => noext(f) && f.toLowerCase().endsWith(ext2);
1105
+ };
1106
+ var qmarksTestDot = ([$0, ext2 = ""]) => {
1107
+ const noext = qmarksTestNoExtDot([$0]);
1108
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1109
+ };
1110
+ var qmarksTest = ([$0, ext2 = ""]) => {
1111
+ const noext = qmarksTestNoExt([$0]);
1112
+ return !ext2 ? noext : (f) => noext(f) && f.endsWith(ext2);
1113
+ };
1114
+ var qmarksTestNoExt = ([$0]) => {
1115
+ const len = $0.length;
1116
+ return (f) => f.length === len && !f.startsWith(".");
1117
+ };
1118
+ var qmarksTestNoExtDot = ([$0]) => {
1119
+ const len = $0.length;
1120
+ return (f) => f.length === len && f !== "." && f !== "..";
1121
+ };
1122
+ var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
1123
+ var path = {
1124
+ win32: { sep: "\\" },
1125
+ posix: { sep: "/" }
1126
+ };
1127
+ var sep = defaultPlatform === "win32" ? path.win32.sep : path.posix.sep;
1128
+ minimatch.sep = sep;
1129
+ var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
1130
+ minimatch.GLOBSTAR = GLOBSTAR;
1131
+ var qmark2 = "[^/]";
1132
+ var star2 = qmark2 + "*?";
1133
+ var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1134
+ var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?";
1135
+ var filter = (pattern, options = {}) => (p) => minimatch(p, pattern, options);
1136
+ minimatch.filter = filter;
1137
+ var ext = (a, b = {}) => Object.assign({}, a, b);
1138
+ var defaults = (def) => {
1139
+ if (!def || typeof def !== "object" || !Object.keys(def).length) {
1140
+ return minimatch;
1141
+ }
1142
+ const orig = minimatch;
1143
+ const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options));
1144
+ return Object.assign(m, {
1145
+ Minimatch: class Minimatch extends orig.Minimatch {
1146
+ constructor(pattern, options = {}) {
1147
+ super(pattern, ext(def, options));
1148
+ }
1149
+ static defaults(options) {
1150
+ return orig.defaults(ext(def, options)).Minimatch;
1151
+ }
1152
+ },
1153
+ AST: class AST extends orig.AST {
1154
+ /* c8 ignore start */
1155
+ constructor(type, parent, options = {}) {
1156
+ super(type, parent, ext(def, options));
1157
+ }
1158
+ /* c8 ignore stop */
1159
+ static fromGlob(pattern, options = {}) {
1160
+ return orig.AST.fromGlob(pattern, ext(def, options));
1161
+ }
1162
+ },
1163
+ unescape: (s, options = {}) => orig.unescape(s, ext(def, options)),
1164
+ escape: (s, options = {}) => orig.escape(s, ext(def, options)),
1165
+ filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)),
1166
+ defaults: (options) => orig.defaults(ext(def, options)),
1167
+ makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)),
1168
+ braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)),
1169
+ match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)),
1170
+ sep: orig.sep,
1171
+ GLOBSTAR
1172
+ });
1173
+ };
1174
+ minimatch.defaults = defaults;
1175
+ var braceExpand = (pattern, options = {}) => {
1176
+ assertValidPattern(pattern);
1177
+ if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
1178
+ return [pattern];
1179
+ }
1180
+ return expand(pattern, { max: options.braceExpandMax });
1181
+ };
1182
+ minimatch.braceExpand = braceExpand;
1183
+ var makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
1184
+ minimatch.makeRe = makeRe;
1185
+ var match = (list, pattern, options = {}) => {
1186
+ const mm = new Minimatch(pattern, options);
1187
+ list = list.filter((f) => mm.match(f));
1188
+ if (mm.options.nonull && !list.length) {
1189
+ list.push(pattern);
1190
+ }
1191
+ return list;
1192
+ };
1193
+ minimatch.match = match;
1194
+ var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
1195
+ var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1196
+ var Minimatch = class {
1197
+ options;
1198
+ set;
1199
+ pattern;
1200
+ windowsPathsNoEscape;
1201
+ nonegate;
1202
+ negate;
1203
+ comment;
1204
+ empty;
1205
+ preserveMultipleSlashes;
1206
+ partial;
1207
+ globSet;
1208
+ globParts;
1209
+ nocase;
1210
+ isWindows;
1211
+ platform;
1212
+ windowsNoMagicRoot;
1213
+ maxGlobstarRecursion;
1214
+ regexp;
1215
+ constructor(pattern, options = {}) {
1216
+ assertValidPattern(pattern);
1217
+ options = options || {};
1218
+ this.options = options;
1219
+ this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
1220
+ this.pattern = pattern;
1221
+ this.platform = options.platform || defaultPlatform;
1222
+ this.isWindows = this.platform === "win32";
1223
+ const awe = "allowWindowsEscape";
1224
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
1225
+ if (this.windowsPathsNoEscape) {
1226
+ this.pattern = this.pattern.replace(/\\/g, "/");
1227
+ }
1228
+ this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
1229
+ this.regexp = null;
1230
+ this.negate = false;
1231
+ this.nonegate = !!options.nonegate;
1232
+ this.comment = false;
1233
+ this.empty = false;
1234
+ this.partial = !!options.partial;
1235
+ this.nocase = !!this.options.nocase;
1236
+ this.windowsNoMagicRoot = options.windowsNoMagicRoot !== void 0 ? options.windowsNoMagicRoot : !!(this.isWindows && this.nocase);
1237
+ this.globSet = [];
1238
+ this.globParts = [];
1239
+ this.set = [];
1240
+ this.make();
1241
+ }
1242
+ hasMagic() {
1243
+ if (this.options.magicalBraces && this.set.length > 1) {
1244
+ return true;
1245
+ }
1246
+ for (const pattern of this.set) {
1247
+ for (const part of pattern) {
1248
+ if (typeof part !== "string")
1249
+ return true;
1250
+ }
1251
+ }
1252
+ return false;
1253
+ }
1254
+ debug(..._) {
1255
+ }
1256
+ make() {
1257
+ const pattern = this.pattern;
1258
+ const options = this.options;
1259
+ if (!options.nocomment && pattern.charAt(0) === "#") {
1260
+ this.comment = true;
1261
+ return;
1262
+ }
1263
+ if (!pattern) {
1264
+ this.empty = true;
1265
+ return;
1266
+ }
1267
+ this.parseNegate();
1268
+ this.globSet = [...new Set(this.braceExpand())];
1269
+ if (options.debug) {
1270
+ this.debug = (...args) => console.error(...args);
1271
+ }
1272
+ this.debug(this.pattern, this.globSet);
1273
+ const rawGlobParts = this.globSet.map((s) => this.slashSplit(s));
1274
+ this.globParts = this.preprocess(rawGlobParts);
1275
+ this.debug(this.pattern, this.globParts);
1276
+ let set = this.globParts.map((s, _, __) => {
1277
+ if (this.isWindows && this.windowsNoMagicRoot) {
1278
+ const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
1279
+ const isDrive = /^[a-z]:/i.test(s[0]);
1280
+ if (isUNC) {
1281
+ return [
1282
+ ...s.slice(0, 4),
1283
+ ...s.slice(4).map((ss) => this.parse(ss))
1284
+ ];
1285
+ } else if (isDrive) {
1286
+ return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
1287
+ }
1288
+ }
1289
+ return s.map((ss) => this.parse(ss));
1290
+ });
1291
+ this.debug(this.pattern, set);
1292
+ this.set = set.filter((s) => s.indexOf(false) === -1);
1293
+ if (this.isWindows) {
1294
+ for (let i = 0; i < this.set.length; i++) {
1295
+ const p = this.set[i];
1296
+ if (p[0] === "" && p[1] === "" && this.globParts[i][2] === "?" && typeof p[3] === "string" && /^[a-z]:$/i.test(p[3])) {
1297
+ p[2] = "?";
1298
+ }
1299
+ }
1300
+ }
1301
+ this.debug(this.pattern, this.set);
1302
+ }
1303
+ // various transforms to equivalent pattern sets that are
1304
+ // faster to process in a filesystem walk. The goal is to
1305
+ // eliminate what we can, and push all ** patterns as far
1306
+ // to the right as possible, even if it increases the number
1307
+ // of patterns that we have to process.
1308
+ preprocess(globParts) {
1309
+ if (this.options.noglobstar) {
1310
+ for (const partset of globParts) {
1311
+ for (let j = 0; j < partset.length; j++) {
1312
+ if (partset[j] === "**") {
1313
+ partset[j] = "*";
1314
+ }
1315
+ }
1316
+ }
1317
+ }
1318
+ const { optimizationLevel = 1 } = this.options;
1319
+ if (optimizationLevel >= 2) {
1320
+ globParts = this.firstPhasePreProcess(globParts);
1321
+ globParts = this.secondPhasePreProcess(globParts);
1322
+ } else if (optimizationLevel >= 1) {
1323
+ globParts = this.levelOneOptimize(globParts);
1324
+ } else {
1325
+ globParts = this.adjascentGlobstarOptimize(globParts);
1326
+ }
1327
+ return globParts;
1328
+ }
1329
+ // just get rid of adjascent ** portions
1330
+ adjascentGlobstarOptimize(globParts) {
1331
+ return globParts.map((parts) => {
1332
+ let gs = -1;
1333
+ while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1334
+ let i = gs;
1335
+ while (parts[i + 1] === "**") {
1336
+ i++;
1337
+ }
1338
+ if (i !== gs) {
1339
+ parts.splice(gs, i - gs);
1340
+ }
1341
+ }
1342
+ return parts;
1343
+ });
1344
+ }
1345
+ // get rid of adjascent ** and resolve .. portions
1346
+ levelOneOptimize(globParts) {
1347
+ return globParts.map((parts) => {
1348
+ parts = parts.reduce((set, part) => {
1349
+ const prev = set[set.length - 1];
1350
+ if (part === "**" && prev === "**") {
1351
+ return set;
1352
+ }
1353
+ if (part === "..") {
1354
+ if (prev && prev !== ".." && prev !== "." && prev !== "**") {
1355
+ set.pop();
1356
+ return set;
1357
+ }
1358
+ }
1359
+ set.push(part);
1360
+ return set;
1361
+ }, []);
1362
+ return parts.length === 0 ? [""] : parts;
1363
+ });
1364
+ }
1365
+ levelTwoFileOptimize(parts) {
1366
+ if (!Array.isArray(parts)) {
1367
+ parts = this.slashSplit(parts);
1368
+ }
1369
+ let didSomething = false;
1370
+ do {
1371
+ didSomething = false;
1372
+ if (!this.preserveMultipleSlashes) {
1373
+ for (let i = 1; i < parts.length - 1; i++) {
1374
+ const p = parts[i];
1375
+ if (i === 1 && p === "" && parts[0] === "")
1376
+ continue;
1377
+ if (p === "." || p === "") {
1378
+ didSomething = true;
1379
+ parts.splice(i, 1);
1380
+ i--;
1381
+ }
1382
+ }
1383
+ if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1384
+ didSomething = true;
1385
+ parts.pop();
1386
+ }
1387
+ }
1388
+ let dd = 0;
1389
+ while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1390
+ const p = parts[dd - 1];
1391
+ if (p && p !== "." && p !== ".." && p !== "**" && !(this.isWindows && /^[a-z]:$/i.test(p))) {
1392
+ didSomething = true;
1393
+ parts.splice(dd - 1, 2);
1394
+ dd -= 2;
1395
+ }
1396
+ }
1397
+ } while (didSomething);
1398
+ return parts.length === 0 ? [""] : parts;
1399
+ }
1400
+ // First phase: single-pattern processing
1401
+ // <pre> is 1 or more portions
1402
+ // <rest> is 1 or more portions
1403
+ // <p> is any portion other than ., .., '', or **
1404
+ // <e> is . or ''
1405
+ //
1406
+ // **/.. is *brutal* for filesystem walking performance, because
1407
+ // it effectively resets the recursive walk each time it occurs,
1408
+ // and ** cannot be reduced out by a .. pattern part like a regexp
1409
+ // or most strings (other than .., ., and '') can be.
1410
+ //
1411
+ // <pre>/**/../<p>/<p>/<rest> -> {<pre>/../<p>/<p>/<rest>,<pre>/**/<p>/<p>/<rest>}
1412
+ // <pre>/<e>/<rest> -> <pre>/<rest>
1413
+ // <pre>/<p>/../<rest> -> <pre>/<rest>
1414
+ // **/**/<rest> -> **/<rest>
1415
+ //
1416
+ // **/*/<rest> -> */**/<rest> <== not valid because ** doesn't follow
1417
+ // this WOULD be allowed if ** did follow symlinks, or * didn't
1418
+ firstPhasePreProcess(globParts) {
1419
+ let didSomething = false;
1420
+ do {
1421
+ didSomething = false;
1422
+ for (let parts of globParts) {
1423
+ let gs = -1;
1424
+ while (-1 !== (gs = parts.indexOf("**", gs + 1))) {
1425
+ let gss = gs;
1426
+ while (parts[gss + 1] === "**") {
1427
+ gss++;
1428
+ }
1429
+ if (gss > gs) {
1430
+ parts.splice(gs + 1, gss - gs);
1431
+ }
1432
+ let next = parts[gs + 1];
1433
+ const p = parts[gs + 2];
1434
+ const p2 = parts[gs + 3];
1435
+ if (next !== "..")
1436
+ continue;
1437
+ if (!p || p === "." || p === ".." || !p2 || p2 === "." || p2 === "..") {
1438
+ continue;
1439
+ }
1440
+ didSomething = true;
1441
+ parts.splice(gs, 1);
1442
+ const other = parts.slice(0);
1443
+ other[gs] = "**";
1444
+ globParts.push(other);
1445
+ gs--;
1446
+ }
1447
+ if (!this.preserveMultipleSlashes) {
1448
+ for (let i = 1; i < parts.length - 1; i++) {
1449
+ const p = parts[i];
1450
+ if (i === 1 && p === "" && parts[0] === "")
1451
+ continue;
1452
+ if (p === "." || p === "") {
1453
+ didSomething = true;
1454
+ parts.splice(i, 1);
1455
+ i--;
1456
+ }
1457
+ }
1458
+ if (parts[0] === "." && parts.length === 2 && (parts[1] === "." || parts[1] === "")) {
1459
+ didSomething = true;
1460
+ parts.pop();
1461
+ }
1462
+ }
1463
+ let dd = 0;
1464
+ while (-1 !== (dd = parts.indexOf("..", dd + 1))) {
1465
+ const p = parts[dd - 1];
1466
+ if (p && p !== "." && p !== ".." && p !== "**") {
1467
+ didSomething = true;
1468
+ const needDot = dd === 1 && parts[dd + 1] === "**";
1469
+ const splin = needDot ? ["."] : [];
1470
+ parts.splice(dd - 1, 2, ...splin);
1471
+ if (parts.length === 0)
1472
+ parts.push("");
1473
+ dd -= 2;
1474
+ }
1475
+ }
1476
+ }
1477
+ } while (didSomething);
1478
+ return globParts;
1479
+ }
1480
+ // second phase: multi-pattern dedupes
1481
+ // {<pre>/*/<rest>,<pre>/<p>/<rest>} -> <pre>/*/<rest>
1482
+ // {<pre>/<rest>,<pre>/<rest>} -> <pre>/<rest>
1483
+ // {<pre>/**/<rest>,<pre>/<rest>} -> <pre>/**/<rest>
1484
+ //
1485
+ // {<pre>/**/<rest>,<pre>/**/<p>/<rest>} -> <pre>/**/<rest>
1486
+ // ^-- not valid because ** doens't follow symlinks
1487
+ secondPhasePreProcess(globParts) {
1488
+ for (let i = 0; i < globParts.length - 1; i++) {
1489
+ for (let j = i + 1; j < globParts.length; j++) {
1490
+ const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
1491
+ if (matched) {
1492
+ globParts[i] = [];
1493
+ globParts[j] = matched;
1494
+ break;
1495
+ }
1496
+ }
1497
+ }
1498
+ return globParts.filter((gs) => gs.length);
1499
+ }
1500
+ partsMatch(a, b, emptyGSMatch = false) {
1501
+ let ai = 0;
1502
+ let bi = 0;
1503
+ let result = [];
1504
+ let which = "";
1505
+ while (ai < a.length && bi < b.length) {
1506
+ if (a[ai] === b[bi]) {
1507
+ result.push(which === "b" ? b[bi] : a[ai]);
1508
+ ai++;
1509
+ bi++;
1510
+ } else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
1511
+ result.push(a[ai]);
1512
+ ai++;
1513
+ } else if (emptyGSMatch && b[bi] === "**" && a[ai] === b[bi + 1]) {
1514
+ result.push(b[bi]);
1515
+ bi++;
1516
+ } else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
1517
+ if (which === "b")
1518
+ return false;
1519
+ which = "a";
1520
+ result.push(a[ai]);
1521
+ ai++;
1522
+ bi++;
1523
+ } else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
1524
+ if (which === "a")
1525
+ return false;
1526
+ which = "b";
1527
+ result.push(b[bi]);
1528
+ ai++;
1529
+ bi++;
1530
+ } else {
1531
+ return false;
1532
+ }
1533
+ }
1534
+ return a.length === b.length && result;
1535
+ }
1536
+ parseNegate() {
1537
+ if (this.nonegate)
1538
+ return;
1539
+ const pattern = this.pattern;
1540
+ let negate = false;
1541
+ let negateOffset = 0;
1542
+ for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) {
1543
+ negate = !negate;
1544
+ negateOffset++;
1545
+ }
1546
+ if (negateOffset)
1547
+ this.pattern = pattern.slice(negateOffset);
1548
+ this.negate = negate;
1549
+ }
1550
+ // set partial to true to test if, for example,
1551
+ // "/a/b" matches the start of "/*/b/*/d"
1552
+ // Partial means, if you run out of file before you run
1553
+ // out of pattern, then that's fine, as long as all
1554
+ // the parts match.
1555
+ matchOne(file, pattern, partial = false) {
1556
+ let fileStartIndex = 0;
1557
+ let patternStartIndex = 0;
1558
+ if (this.isWindows) {
1559
+ const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1560
+ const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1561
+ const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1562
+ const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1563
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1564
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1565
+ if (typeof fdi === "number" && typeof pdi === "number") {
1566
+ const [fd, pd] = [
1567
+ file[fdi],
1568
+ pattern[pdi]
1569
+ ];
1570
+ if (fd.toLowerCase() === pd.toLowerCase()) {
1571
+ pattern[pdi] = fd;
1572
+ patternStartIndex = pdi;
1573
+ fileStartIndex = fdi;
1574
+ }
1575
+ }
1576
+ }
1577
+ const { optimizationLevel = 1 } = this.options;
1578
+ if (optimizationLevel >= 2) {
1579
+ file = this.levelTwoFileOptimize(file);
1580
+ }
1581
+ if (pattern.includes(GLOBSTAR)) {
1582
+ return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
1583
+ }
1584
+ return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
1585
+ }
1586
+ #matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
1587
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
1588
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
1589
+ const [head, body, tail] = partial ? [
1590
+ pattern.slice(patternIndex, firstgs),
1591
+ pattern.slice(firstgs + 1),
1592
+ []
1593
+ ] : [
1594
+ pattern.slice(patternIndex, firstgs),
1595
+ pattern.slice(firstgs + 1, lastgs),
1596
+ pattern.slice(lastgs + 1)
1597
+ ];
1598
+ if (head.length) {
1599
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
1600
+ if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
1601
+ return false;
1602
+ }
1603
+ fileIndex += head.length;
1604
+ patternIndex += head.length;
1605
+ }
1606
+ let fileTailMatch = 0;
1607
+ if (tail.length) {
1608
+ if (tail.length + fileIndex > file.length)
1609
+ return false;
1610
+ let tailStart = file.length - tail.length;
1611
+ if (this.#matchOne(file, tail, partial, tailStart, 0)) {
1612
+ fileTailMatch = tail.length;
1613
+ } else {
1614
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
1615
+ return false;
1616
+ }
1617
+ tailStart--;
1618
+ if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
1619
+ return false;
1620
+ }
1621
+ fileTailMatch = tail.length + 1;
1622
+ }
1623
+ }
1624
+ if (!body.length) {
1625
+ let sawSome = !!fileTailMatch;
1626
+ for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
1627
+ const f = String(file[i2]);
1628
+ sawSome = true;
1629
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
1630
+ return false;
1631
+ }
1632
+ }
1633
+ return partial || sawSome;
1634
+ }
1635
+ const bodySegments = [[[], 0]];
1636
+ let currentBody = bodySegments[0];
1637
+ let nonGsParts = 0;
1638
+ const nonGsPartsSums = [0];
1639
+ for (const b of body) {
1640
+ if (b === GLOBSTAR) {
1641
+ nonGsPartsSums.push(nonGsParts);
1642
+ currentBody = [[], 0];
1643
+ bodySegments.push(currentBody);
1644
+ } else {
1645
+ currentBody[0].push(b);
1646
+ nonGsParts++;
1647
+ }
1648
+ }
1649
+ let i = bodySegments.length - 1;
1650
+ const fileLength = file.length - fileTailMatch;
1651
+ for (const b of bodySegments) {
1652
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
1653
+ }
1654
+ return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
1655
+ }
1656
+ // return false for "nope, not matching"
1657
+ // return null for "not matching, cannot keep trying"
1658
+ #matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
1659
+ const bs = bodySegments[bodyIndex];
1660
+ if (!bs) {
1661
+ for (let i = fileIndex; i < file.length; i++) {
1662
+ sawTail = true;
1663
+ const f = file[i];
1664
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
1665
+ return false;
1666
+ }
1667
+ }
1668
+ return sawTail;
1669
+ }
1670
+ const [body, after] = bs;
1671
+ while (fileIndex <= after) {
1672
+ const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
1673
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
1674
+ const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
1675
+ if (sub !== false) {
1676
+ return sub;
1677
+ }
1678
+ }
1679
+ const f = file[fileIndex];
1680
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
1681
+ return false;
1682
+ }
1683
+ fileIndex++;
1684
+ }
1685
+ return partial || null;
1686
+ }
1687
+ #matchOne(file, pattern, partial, fileIndex, patternIndex) {
1688
+ let fi;
1689
+ let pi;
1690
+ let pl;
1691
+ let fl;
1692
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
1693
+ this.debug("matchOne loop");
1694
+ let p = pattern[pi];
1695
+ let f = file[fi];
1696
+ this.debug(pattern, p, f);
1697
+ if (p === false || p === GLOBSTAR) {
1698
+ return false;
1699
+ }
1700
+ let hit;
1701
+ if (typeof p === "string") {
1702
+ hit = f === p;
1703
+ this.debug("string match", p, f, hit);
1704
+ } else {
1705
+ hit = p.test(f);
1706
+ this.debug("pattern match", p, f, hit);
1707
+ }
1708
+ if (!hit)
1709
+ return false;
1710
+ }
1711
+ if (fi === fl && pi === pl) {
1712
+ return true;
1713
+ } else if (fi === fl) {
1714
+ return partial;
1715
+ } else if (pi === pl) {
1716
+ return fi === fl - 1 && file[fi] === "";
1717
+ } else {
1718
+ throw new Error("wtf?");
1719
+ }
1720
+ }
1721
+ braceExpand() {
1722
+ return braceExpand(this.pattern, this.options);
1723
+ }
1724
+ parse(pattern) {
1725
+ assertValidPattern(pattern);
1726
+ const options = this.options;
1727
+ if (pattern === "**")
1728
+ return GLOBSTAR;
1729
+ if (pattern === "")
1730
+ return "";
1731
+ let m;
1732
+ let fastTest = null;
1733
+ if (m = pattern.match(starRE)) {
1734
+ fastTest = options.dot ? starTestDot : starTest;
1735
+ } else if (m = pattern.match(starDotExtRE)) {
1736
+ fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]);
1737
+ } else if (m = pattern.match(qmarksRE)) {
1738
+ fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m);
1739
+ } else if (m = pattern.match(starDotStarRE)) {
1740
+ fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
1741
+ } else if (m = pattern.match(dotStarRE)) {
1742
+ fastTest = dotStarTest;
1743
+ }
1744
+ const re = AST.fromGlob(pattern, this.options).toMMPattern();
1745
+ if (fastTest && typeof re === "object") {
1746
+ Reflect.defineProperty(re, "test", { value: fastTest });
1747
+ }
1748
+ return re;
1749
+ }
1750
+ makeRe() {
1751
+ if (this.regexp || this.regexp === false)
1752
+ return this.regexp;
1753
+ const set = this.set;
1754
+ if (!set.length) {
1755
+ this.regexp = false;
1756
+ return this.regexp;
1757
+ }
1758
+ const options = this.options;
1759
+ const twoStar = options.noglobstar ? star2 : options.dot ? twoStarDot : twoStarNoDot;
1760
+ const flags = new Set(options.nocase ? ["i"] : []);
1761
+ let re = set.map((pattern) => {
1762
+ const pp = pattern.map((p) => {
1763
+ if (p instanceof RegExp) {
1764
+ for (const f of p.flags.split(""))
1765
+ flags.add(f);
1766
+ }
1767
+ return typeof p === "string" ? regExpEscape2(p) : p === GLOBSTAR ? GLOBSTAR : p._src;
1768
+ });
1769
+ pp.forEach((p, i) => {
1770
+ const next = pp[i + 1];
1771
+ const prev = pp[i - 1];
1772
+ if (p !== GLOBSTAR || prev === GLOBSTAR) {
1773
+ return;
1774
+ }
1775
+ if (prev === void 0) {
1776
+ if (next !== void 0 && next !== GLOBSTAR) {
1777
+ pp[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + next;
1778
+ } else {
1779
+ pp[i] = twoStar;
1780
+ }
1781
+ } else if (next === void 0) {
1782
+ pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
1783
+ } else if (next !== GLOBSTAR) {
1784
+ pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
1785
+ pp[i + 1] = GLOBSTAR;
1786
+ }
1787
+ });
1788
+ const filtered = pp.filter((p) => p !== GLOBSTAR);
1789
+ if (this.partial && filtered.length >= 1) {
1790
+ const prefixes = [];
1791
+ for (let i = 1; i <= filtered.length; i++) {
1792
+ prefixes.push(filtered.slice(0, i).join("/"));
1793
+ }
1794
+ return "(?:" + prefixes.join("|") + ")";
1795
+ }
1796
+ return filtered.join("/");
1797
+ }).join("|");
1798
+ const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
1799
+ re = "^" + open + re + close + "$";
1800
+ if (this.partial) {
1801
+ re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
1802
+ }
1803
+ if (this.negate)
1804
+ re = "^(?!" + re + ").+$";
1805
+ try {
1806
+ this.regexp = new RegExp(re, [...flags].join(""));
1807
+ } catch {
1808
+ this.regexp = false;
1809
+ }
1810
+ return this.regexp;
1811
+ }
1812
+ slashSplit(p) {
1813
+ if (this.preserveMultipleSlashes) {
1814
+ return p.split("/");
1815
+ } else if (this.isWindows && /^\/\/[^/]+/.test(p)) {
1816
+ return ["", ...p.split(/\/+/)];
1817
+ } else {
1818
+ return p.split(/\/+/);
1819
+ }
1820
+ }
1821
+ match(f, partial = this.partial) {
1822
+ this.debug("match", f, this.pattern);
1823
+ if (this.comment) {
1824
+ return false;
1825
+ }
1826
+ if (this.empty) {
1827
+ return f === "";
1828
+ }
1829
+ if (f === "/" && partial) {
1830
+ return true;
1831
+ }
1832
+ const options = this.options;
1833
+ if (this.isWindows) {
1834
+ f = f.split("\\").join("/");
1835
+ }
1836
+ const ff = this.slashSplit(f);
1837
+ this.debug(this.pattern, "split", ff);
1838
+ const set = this.set;
1839
+ this.debug(this.pattern, "set", set);
1840
+ let filename = ff[ff.length - 1];
1841
+ if (!filename) {
1842
+ for (let i = ff.length - 2; !filename && i >= 0; i--) {
1843
+ filename = ff[i];
1844
+ }
1845
+ }
1846
+ for (const pattern of set) {
1847
+ let file = ff;
1848
+ if (options.matchBase && pattern.length === 1) {
1849
+ file = [filename];
1850
+ }
1851
+ const hit = this.matchOne(file, pattern, partial);
1852
+ if (hit) {
1853
+ if (options.flipNegate) {
1854
+ return true;
1855
+ }
1856
+ return !this.negate;
1857
+ }
1858
+ }
1859
+ if (options.flipNegate) {
1860
+ return false;
1861
+ }
1862
+ return this.negate;
1863
+ }
1864
+ static defaults(def) {
1865
+ return minimatch.defaults(def).Minimatch;
1866
+ }
1867
+ };
1868
+ minimatch.AST = AST;
1869
+ minimatch.Minimatch = Minimatch;
1870
+ minimatch.escape = escape;
1871
+ minimatch.unescape = unescape;
1872
+
1873
+ // dist/clients/path-utils.js
1874
+ import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
1875
+ import * as os from "node:os";
1876
+ import * as path2 from "node:path";
1877
+ import { win32 } from "node:path";
1878
+ import { fileURLToPath, pathToFileURL } from "node:url";
1879
+ function isWindowsPath(filePath) {
1880
+ return /^[A-Za-z]:/.test(filePath) || filePath.startsWith("\\");
1881
+ }
1882
+ function toPosix(filePath) {
1883
+ return filePath.replace(/\\/g, "/");
1884
+ }
1885
+ function isFullyQualifiedWin32(filePath) {
1886
+ return win32.isAbsolute(filePath) && win32.parse(filePath).root.length > 1;
1887
+ }
1888
+ function isFullyQualifiedPosix(filePath) {
1889
+ return path2.posix.isAbsolute(filePath) && !isWindowsPath(filePath);
1890
+ }
1891
+ function isFullyQualified(filePath) {
1892
+ return process.platform === "win32" ? isFullyQualifiedWin32(filePath) : isFullyQualifiedPosix(filePath);
1893
+ }
1894
+ function isAbsoluteFilePath(filePath) {
1895
+ const p = isWindowsPath(filePath) ? win32 : path2;
1896
+ return p.isAbsolute(filePath);
1897
+ }
1898
+ function adoptCanonicalCasing(held, canonical) {
1899
+ const heldParts = held.split("/");
1900
+ const realParts = canonical.split("/");
1901
+ let i = heldParts.length - 1;
1902
+ let j = realParts.length - 1;
1903
+ let changed = false;
1904
+ while (i >= 0 && j >= 0) {
1905
+ const a = heldParts[i];
1906
+ const b = realParts[j];
1907
+ if (a !== b) {
1908
+ if (a.toLowerCase() !== b.toLowerCase())
1909
+ break;
1910
+ heldParts[i] = b;
1911
+ changed = true;
1912
+ }
1913
+ i--;
1914
+ j--;
1915
+ }
1916
+ return changed ? heldParts.join("/") : held;
1917
+ }
1918
+ function normalizeFilePath(filePath) {
1919
+ if (process.platform === "win32") {
1920
+ if (filePath === "")
1921
+ return "";
1922
+ if (!isFullyQualifiedWin32(filePath)) {
1923
+ return win32.normalize(filePath).replace(/\\/g, "/");
1924
+ }
1925
+ }
1926
+ const normalized = filePath.replace(/\\/g, "/");
1927
+ if (process.platform !== "win32" && !isWindowsPath(normalized)) {
1928
+ const folded = normalized === "" || normalized.startsWith("//") ? normalized : path2.posix.normalize(normalized);
1929
+ try {
1930
+ const canonical = realpathSync.native(folded);
1931
+ if (canonical === folded)
1932
+ return folded;
1933
+ const adopted = adoptCanonicalCasing(folded, canonical);
1934
+ if (adopted === folded)
1935
+ return folded;
1936
+ return realpathSync.native(adopted) === canonical ? adopted : folded;
1937
+ } catch {
1938
+ return folded;
1939
+ }
1940
+ }
1941
+ try {
1942
+ const canonical = realpathSync.native(filePath);
1943
+ return canonical.replace(/\\/g, "/");
1944
+ } catch {
1945
+ try {
1946
+ return resolveNonExisting(filePath);
1947
+ } catch {
1948
+ const resolved = win32.normalize(win32.resolve(filePath));
1949
+ return resolved.replace(/\\/g, "/").toLowerCase();
1950
+ }
1951
+ }
1952
+ }
1953
+ function realpathOrResolve(filePath) {
1954
+ const resolved = path2.resolve(filePath);
1955
+ try {
1956
+ return realpathSync(resolved);
1957
+ } catch {
1958
+ return resolved;
1959
+ }
1960
+ }
1961
+ function normalizeLoggedPath(value) {
1962
+ return isFullyQualifiedWin32(value) || isFullyQualifiedPosix(value) ? normalizeFilePath(value) : value;
1963
+ }
1964
+ function resolveNonExisting(filePath) {
1965
+ const resolved = win32.resolve(filePath);
1966
+ let current = resolved;
1967
+ const nonExistentParts = [];
1968
+ while (true) {
1969
+ if (existsSync(current)) {
1970
+ const canonical = realpathSync.native(current);
1971
+ if (nonExistentParts.length === 0) {
1972
+ return canonical.replace(/\\/g, "/");
1973
+ }
1974
+ const tail = nonExistentParts.reverse().join("/").toLowerCase();
1975
+ const base = canonical.replace(/\\/g, "/");
1976
+ return base.endsWith("/") ? base + tail : `${base}/${tail}`;
1977
+ }
1978
+ const parent = win32.dirname(current);
1979
+ if (parent === current) {
1980
+ throw new Error("No existing parent found");
1981
+ }
1982
+ nonExistentParts.push(win32.basename(current));
1983
+ current = parent;
1984
+ }
1985
+ }
1986
+ function uriToPath(uri) {
1987
+ try {
1988
+ const filePath = fileURLToPath(uri);
1989
+ return normalizeFilePath(filePath);
1990
+ } catch {
1991
+ return normalizeFilePath(uri);
1992
+ }
1993
+ }
1994
+ function uriToDiskPath(uri) {
1995
+ try {
1996
+ return fileURLToPath(uri);
1997
+ } catch {
1998
+ return uri;
1999
+ }
2000
+ }
2001
+ function normalizeMapKey(filePath) {
2002
+ return normalizeFilePath(filePath);
2003
+ }
2004
+ function toProjectRelativePath(filePath, projectRoot) {
2005
+ const p = isWindowsPath(filePath) ? win32 : path2;
2006
+ if (!p.isAbsolute(filePath))
2007
+ return filePath.replace(/\\/g, "/");
2008
+ const inside = (root, file) => {
2009
+ const relative = p.relative(p.resolve(root), file);
2010
+ return relative && relative !== ".." && !relative.startsWith(`..${p.sep}`) && !p.isAbsolute(relative) ? relative.replace(/\\/g, "/") : void 0;
2011
+ };
2012
+ const direct = inside(projectRoot, filePath);
2013
+ if (direct !== void 0)
2014
+ return direct;
2015
+ const canonical = inside(normalizeFilePath(projectRoot), normalizeFilePath(filePath));
2016
+ if (canonical !== void 0)
2017
+ return canonical;
2018
+ return filePath.replace(/\\/g, "/");
2019
+ }
2020
+ function normalizeEphemeralMapKey(filePath) {
2021
+ if (process.platform !== "win32" && !filePath.includes("\\"))
2022
+ return filePath;
2023
+ const slashed = filePath.replace(/\\/g, "/");
2024
+ return process.platform === "win32" ? slashed.toLowerCase() : slashed;
2025
+ }
2026
+ function pathsEqual(a, b) {
2027
+ return normalizeFilePath(a) === normalizeFilePath(b);
2028
+ }
2029
+ function* walkUpDirs(startDir) {
2030
+ let current = path2.resolve(startDir);
2031
+ while (true) {
2032
+ yield current;
2033
+ const parent = path2.dirname(current);
2034
+ if (parent === current)
2035
+ return;
2036
+ current = parent;
2037
+ }
2038
+ }
2039
+ function findNearestContaining(startDir, candidates) {
2040
+ for (const dir of walkUpDirs(startDir)) {
2041
+ for (const name of candidates) {
2042
+ if (existsSync(path2.join(dir, name)))
2043
+ return dir;
2044
+ }
2045
+ }
2046
+ return void 0;
2047
+ }
2048
+ function findLocalToolConfig(startDir, names, options = {}) {
2049
+ const homeDir = options.homeDir !== void 0 ? path2.resolve(options.homeDir) : void 0;
2050
+ for (const dir of walkUpDirs(startDir || process.cwd())) {
2051
+ if (homeDir !== void 0 && isAtOrAboveHomeDir(dir, homeDir)) {
2052
+ return void 0;
2053
+ }
2054
+ for (const name of names) {
2055
+ const candidate = path2.join(dir, name);
2056
+ if (existsSync(candidate))
2057
+ return candidate;
2058
+ }
2059
+ }
2060
+ return void 0;
2061
+ }
2062
+ function isRealGitMarker(markerPath, details) {
2063
+ const detailed = details === true;
2064
+ try {
2065
+ const marker = statSync(markerPath);
2066
+ let valid = false;
2067
+ if (marker.isDirectory()) {
2068
+ statSync(path2.join(markerPath, "HEAD"));
2069
+ valid = true;
2070
+ } else if (marker.isFile()) {
2071
+ valid = readFileSync(markerPath, "utf8").split(/\r?\n/, 1)[0].startsWith("gitdir:");
2072
+ }
2073
+ if (!detailed)
2074
+ return valid;
2075
+ return { kind: valid ? "valid" : "absent" };
2076
+ } catch (cause) {
2077
+ if (!detailed)
2078
+ return false;
2079
+ if (typeof cause === "object" && cause !== null && "code" in cause && (cause.code === "ENOENT" || cause.code === "ENOTDIR")) {
2080
+ return { kind: "absent" };
2081
+ }
2082
+ return { kind: "unavailable", cause };
2083
+ }
2084
+ }
2085
+ function findNearestMarkerRoot(startDir, markers, options = {}) {
2086
+ const boundaries = options.boundaries ?? [];
2087
+ const homeDir = path2.resolve(options.homeDir ?? os.homedir());
2088
+ const markerPredicate = options.markerPredicate ?? (() => true);
2089
+ let current = path2.resolve(startDir);
2090
+ for (let depth = 0; depth < 64; depth++) {
2091
+ if (isAtOrAboveHomeDir(current, homeDir))
2092
+ return null;
2093
+ if (markers.some((m) => existsSync(path2.join(current, m)) && markerPredicate(path2.join(current, m))))
2094
+ return current;
2095
+ if (boundaries.some((m) => existsSync(path2.join(current, m))))
2096
+ return null;
2097
+ const parent = path2.dirname(current);
2098
+ if (parent === current)
2099
+ return null;
2100
+ current = parent;
2101
+ }
2102
+ return null;
2103
+ }
2104
+ function findNearestMarkerRootDetailed(startDir, markers, options) {
2105
+ const homeDir = path2.resolve(options.homeDir ?? os.homedir());
2106
+ let current = path2.resolve(startDir);
2107
+ for (let depth = 0; depth < 64; depth++) {
2108
+ if (isAtOrAboveHomeDir(current, homeDir))
2109
+ return { kind: "not-found", reason: "home-ceiling" };
2110
+ for (const marker of markers) {
2111
+ const markerPath = path2.join(current, marker);
2112
+ const checked = options.markerPredicate(markerPath);
2113
+ if (checked.kind === "unavailable")
2114
+ return { kind: "unavailable", markerPath, cause: checked.cause };
2115
+ if (checked.kind === "valid")
2116
+ return { kind: "found", root: current };
2117
+ }
2118
+ const parent = path2.dirname(current);
2119
+ if (parent === current)
2120
+ return { kind: "not-found", reason: "root" };
2121
+ current = parent;
2122
+ }
2123
+ return { kind: "not-found", reason: "depth-limit" };
2124
+ }
2125
+ function isAtOrAboveHomeDir(dir, homeDir = os.homedir(), pathImpl = path2) {
2126
+ const rel = pathImpl.relative(pathImpl.resolve(dir), pathImpl.resolve(homeDir));
2127
+ return !rel.startsWith("..") && !pathImpl.isAbsolute(rel);
2128
+ }
2129
+ function homeRelativePath(filePath, homeDir = os.homedir()) {
2130
+ if (filePath.length === 0)
2131
+ return filePath;
2132
+ const candidate = toPosix(filePath);
2133
+ const home = toPosix(homeDir).replace(/\/+$/, "");
2134
+ if (home.length === 0)
2135
+ return filePath;
2136
+ const fold = (text) => process.platform === "win32" ? text.toLowerCase() : text;
2137
+ const foldedHome = fold(home);
2138
+ const foldedCandidate = fold(candidate);
2139
+ if (foldedCandidate === foldedHome)
2140
+ return "~";
2141
+ if (!foldedCandidate.startsWith(`${foldedHome}/`))
2142
+ return filePath;
2143
+ return `~${candidate.slice(home.length)}`;
2144
+ }
2145
+ function isUnderDir(child, parent) {
2146
+ const normChild = normalizeFilePath(child);
2147
+ const normParent = normalizeFilePath(parent);
2148
+ const parentPrefix = normParent.endsWith("/") ? normParent : `${normParent}/`;
2149
+ return normChild === normParent || normChild.startsWith(parentPrefix);
2150
+ }
2151
+ var VENDOR_DIR_NAMES = /* @__PURE__ */ new Set([
2152
+ "node_modules",
2153
+ "vendor",
2154
+ "vendors",
2155
+ "third_party",
2156
+ "third-party"
2157
+ ]);
2158
+ function isExternalOrVendorFile(filePath, projectRoot) {
2159
+ if (!isUnderDir(filePath, projectRoot))
2160
+ return true;
2161
+ const normalized = normalizeFilePath(filePath);
2162
+ const rootNorm = normalizeFilePath(projectRoot);
2163
+ const rel = normalized.startsWith(rootNorm + "/") ? normalized.slice(rootNorm.length + 1) : normalized;
2164
+ return rel.split("/").some((seg) => VENDOR_DIR_NAMES.has(seg));
2165
+ }
2166
+ function nameMatchesMarkerGlob(name, pattern) {
2167
+ return minimatch(name, pattern, {
2168
+ dot: true,
2169
+ nocase: process.platform === "win32"
2170
+ });
2171
+ }
2172
+ function direntsHaveMarkerGlobMatch(entries, pattern) {
2173
+ return entries.some((entry) => (entry.isFile() || entry.isSymbolicLink()) && nameMatchesMarkerGlob(entry.name, pattern));
2174
+ }
2175
+ var CARGO_WORKSPACE_MEMBER_DIALECT = {
2176
+ name: "cargo",
2177
+ globstar: "pattern-never-matches",
2178
+ wildcardCrossesSeparator: false,
2179
+ characterClasses: false,
2180
+ normalizePattern: (pattern) => pattern.replace(/\/+$/, "")
2181
+ };
2182
+ var UV_WORKSPACE_MEMBERS_DIALECT = {
2183
+ name: "uv-members",
2184
+ globstar: "crosses-components",
2185
+ wildcardCrossesSeparator: false,
2186
+ characterClasses: true,
2187
+ normalizePattern: (pattern) => path2.posix.normalize(toPosix(pattern))
2188
+ };
2189
+ var UV_WORKSPACE_EXCLUDE_DIALECT = {
2190
+ name: "uv-exclude",
2191
+ globstar: "crosses-components",
2192
+ wildcardCrossesSeparator: true,
2193
+ characterClasses: true,
2194
+ normalizePattern: (pattern) => path2.posix.normalize(toPosix(pattern))
2195
+ };
2196
+ function findCharacterClassEnd(segment, open) {
2197
+ let i = open + 1;
2198
+ if (segment[i] === "!" || segment[i] === "^")
2199
+ i += 1;
2200
+ if (segment[i] === "]")
2201
+ i += 1;
2202
+ for (; i < segment.length; i += 1)
2203
+ if (segment[i] === "]")
2204
+ return i;
2205
+ return -1;
2206
+ }
2207
+ function stepAcceptsChar(crossesSeparator, ch) {
2208
+ return crossesSeparator ? ch !== "\n" && ch !== "\r" && ch !== "\u2028" && ch !== "\u2029" : ch !== "/";
2209
+ }
2210
+ function compileWorkspaceMemberPattern(pattern, dialect) {
2211
+ const isGlobstar = (component) => component === "**" && dialect.globstar === "crosses-components";
2212
+ const components = pattern.split("/");
2213
+ const steps = [];
2214
+ let needSeparator = false;
2215
+ for (let c = 0; c < components.length; c += 1) {
2216
+ if (needSeparator)
2217
+ steps.push({ kind: "literal", char: "/" });
2218
+ needSeparator = false;
2219
+ const component = components[c];
2220
+ if (isGlobstar(component)) {
2221
+ if (c === components.length - 1) {
2222
+ steps.push({ kind: "one", crossesSeparator: true });
2223
+ steps.push({ kind: "star", crossesSeparator: true });
2224
+ continue;
2225
+ }
2226
+ const split = { kind: "split", alternative: -1 };
2227
+ steps.push(split);
2228
+ steps.push({ kind: "one", crossesSeparator: true });
2229
+ steps.push({ kind: "star", crossesSeparator: true });
2230
+ steps.push({ kind: "literal", char: "/" });
2231
+ split.alternative = steps.length;
2232
+ continue;
2233
+ }
2234
+ for (let i = 0; i < component.length; i += 1) {
2235
+ const ch = component[i];
2236
+ if (ch === "*") {
2237
+ steps.push({
2238
+ kind: "star",
2239
+ crossesSeparator: dialect.wildcardCrossesSeparator
2240
+ });
2241
+ continue;
2242
+ }
2243
+ if (ch === "?") {
2244
+ steps.push({
2245
+ kind: "one",
2246
+ crossesSeparator: dialect.wildcardCrossesSeparator
2247
+ });
2248
+ continue;
2249
+ }
2250
+ if (ch === "[" && dialect.characterClasses) {
2251
+ const close = findCharacterClassEnd(component, i);
2252
+ if (close !== -1) {
2253
+ const body = component.slice(i + 1, close).replace(/[\\\]]/g, "\\$&");
2254
+ const source = body.startsWith("!") ? `[^${body.slice(1)}]` : `[${body}]`;
2255
+ let match2;
2256
+ try {
2257
+ match2 = new RegExp(`^${source}$`);
2258
+ } catch {
2259
+ return void 0;
2260
+ }
2261
+ steps.push({ kind: "class", match: match2 });
2262
+ i = close;
2263
+ continue;
2264
+ }
2265
+ }
2266
+ steps.push({ kind: "literal", char: ch });
2267
+ }
2268
+ needSeparator = true;
2269
+ }
2270
+ return steps;
2271
+ }
2272
+ var WORKSPACE_GLOB_MEMO_CELL_CAP = 2e6;
2273
+ function matchesWorkspaceMemberSteps(steps, subject, onCap) {
2274
+ const stepCount = steps.length;
2275
+ const width = subject.length + 1;
2276
+ if ((stepCount + 1) * width > WORKSPACE_GLOB_MEMO_CELL_CAP) {
2277
+ onCap?.();
2278
+ return false;
2279
+ }
2280
+ const table = new Uint8Array((stepCount + 1) * width);
2281
+ for (let p = subject.length; p >= 0; p -= 1) {
2282
+ const atEnd = p === subject.length;
2283
+ table[stepCount * width + p] = atEnd ? 1 : 0;
2284
+ for (let s = stepCount - 1; s >= 0; s -= 1) {
2285
+ const step = steps[s];
2286
+ const next = (s + 1) * width;
2287
+ let matched = 0;
2288
+ switch (step.kind) {
2289
+ case "literal":
2290
+ matched = !atEnd && subject[p] === step.char ? table[next + p + 1] : 0;
2291
+ break;
2292
+ case "one":
2293
+ matched = !atEnd && stepAcceptsChar(step.crossesSeparator, subject[p]) ? table[next + p + 1] : 0;
2294
+ break;
2295
+ case "class":
2296
+ matched = !atEnd && step.match.test(subject[p]) ? table[next + p + 1] : 0;
2297
+ break;
2298
+ case "star":
2299
+ matched = table[next + p] === 1 || !atEnd && stepAcceptsChar(step.crossesSeparator, subject[p]) && table[s * width + p + 1] === 1 ? 1 : 0;
2300
+ break;
2301
+ case "split":
2302
+ matched = table[step.alternative * width + p] === 1 || table[next + p] === 1 ? 1 : 0;
2303
+ break;
2304
+ }
2305
+ table[s * width + p] = matched;
2306
+ }
2307
+ }
2308
+ return table[0] === 1;
2309
+ }
2310
+ function matchesWorkspaceMemberPattern(pattern, relativePath, dialect, onCap) {
2311
+ const normalized = dialect.normalizePattern(pattern);
2312
+ if (dialect.globstar === "pattern-never-matches" && normalized.includes("**")) {
2313
+ return false;
2314
+ }
2315
+ const steps = compileWorkspaceMemberPattern(normalized, dialect);
2316
+ return steps !== void 0 && matchesWorkspaceMemberSteps(steps, relativePath, onCap);
2317
+ }
2318
+
2319
+ export {
2320
+ minimatch,
2321
+ Minimatch,
2322
+ isWindowsPath,
2323
+ toPosix,
2324
+ isFullyQualifiedWin32,
2325
+ isFullyQualified,
2326
+ isAbsoluteFilePath,
2327
+ normalizeFilePath,
2328
+ realpathOrResolve,
2329
+ normalizeLoggedPath,
2330
+ uriToPath,
2331
+ uriToDiskPath,
2332
+ normalizeMapKey,
2333
+ toProjectRelativePath,
2334
+ normalizeEphemeralMapKey,
2335
+ pathsEqual,
2336
+ walkUpDirs,
2337
+ findNearestContaining,
2338
+ findLocalToolConfig,
2339
+ isRealGitMarker,
2340
+ findNearestMarkerRoot,
2341
+ findNearestMarkerRootDetailed,
2342
+ isAtOrAboveHomeDir,
2343
+ homeRelativePath,
2344
+ isUnderDir,
2345
+ isExternalOrVendorFile,
2346
+ nameMatchesMarkerGlob,
2347
+ direntsHaveMarkerGlobMatch,
2348
+ CARGO_WORKSPACE_MEMBER_DIALECT,
2349
+ UV_WORKSPACE_MEMBERS_DIALECT,
2350
+ UV_WORKSPACE_EXCLUDE_DIALECT,
2351
+ matchesWorkspaceMemberPattern
2352
+ };