gennady 0.6.1 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/README.md +2 -15
  2. package/ai/agents/agent-resolve-conflicts.xml +6 -0
  3. package/ai/agents/agent-review-verifier.xml +6 -0
  4. package/ai/directives/architecture/README.md +21 -0
  5. package/ai/directives/coding/README.md +23 -0
  6. package/ai/directives/coding/result-conventions.xml +55 -0
  7. package/ai/directives/coding/svelte5-runes.xml +248 -0
  8. package/ai/directives/coding/sveltekit-rules.xml +247 -0
  9. package/ai/directives/coding/typescript-rules.xml +589 -0
  10. package/ai/directives/coding/uikit-component-storybook.xml +347 -0
  11. package/ai/directives/coding/uikit-component-svelte.xml +344 -0
  12. package/ai/directives/coding/uikit-spec-drafting.xml +243 -0
  13. package/ai/directives/dbc-audit.directive.xml +131 -0
  14. package/ai/directives/dev-review.directive.xml +148 -0
  15. package/ai/directives/infra/README.md +11 -0
  16. package/ai/directives/infra/eslint-setup.xml +467 -0
  17. package/ai/directives/infra/git-setup.xml +261 -0
  18. package/ai/directives/infra/nodejs-npm-setup.xml +354 -0
  19. package/ai/directives/infra/storybook-setup.xml +153 -0
  20. package/ai/directives/knowledge.xml +206 -0
  21. package/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
  22. package/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
  23. package/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
  24. package/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
  25. package/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
  26. package/ai/directives/sdd/README.md +49 -0
  27. package/ai/directives/sdd/audit.directive.xml +543 -0
  28. package/ai/directives/sdd/discovery.directive.xml +824 -0
  29. package/ai/directives/sdd/fix.directive.xml +249 -0
  30. package/ai/directives/sdd/module-decomposition.directive.xml +666 -0
  31. package/ai/directives/sdd/phase-execution-protocol.xml +339 -0
  32. package/ai/directives/sdd/scaffold.directive.xml +717 -0
  33. package/ai/directives/sdd/setup.directive.xml +213 -0
  34. package/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
  35. package/ai/directives/semantic-change-extractor.directive.xml +99 -0
  36. package/ai/directives/testing/README.md +25 -0
  37. package/ai/directives/testing/common.xml +234 -0
  38. package/ai/directives/testing/node-test.xml +288 -0
  39. package/ai/directives/testing/playwright-cli.xml +199 -0
  40. package/ai/directives/testing/playwright-e2e.xml +292 -0
  41. package/ai/directives/testing/storybook-usage.xml +173 -0
  42. package/ai/directives/testing/svelte-testing.xml +237 -0
  43. package/ai/directives/testing/vitest-rules.xml +326 -0
  44. package/ai/docs/README.md +17 -0
  45. package/ai/docs/ai-icl.md +538 -0
  46. package/ai/docs/ai-priming.md +548 -0
  47. package/ai/docs/ai-prompt-formats.md +406 -0
  48. package/ai/docs/ai-promting.md +572 -0
  49. package/ai/drafts/DRAFT.md +120 -0
  50. package/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
  51. package/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
  52. package/ai/drafts/d.md +65 -0
  53. package/ai/drafts/music-posts.md +105 -0
  54. package/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
  55. package/ai/fw/v1/core/mental-model.xml +50 -0
  56. package/ai/fw/v1/discovery/intent-reactor.xml +92 -0
  57. package/ai/fw/v1/production/swarm-protocol.xml +122 -0
  58. package/ai/fw/v1/review/quality-pipeline.xml +102 -0
  59. package/ai/fw/v2/arch-universal.xml +73 -0
  60. package/ai/fw-draft/README.md +79 -0
  61. package/ai/fw-draft/bin/discovery.sh +116 -0
  62. package/ai/fw-draft/gennady.xml +58 -0
  63. package/ai/fw-draft/provider/claude.xml +16 -0
  64. package/ai/fw-draft/provider/cursor.xml +23 -0
  65. package/ai/fw-draft/provider/default.xml +12 -0
  66. package/ai/fw-draft/roles/developer.xml +18 -0
  67. package/ai/fw-draft/router.xml +39 -0
  68. package/ai/fw-draft/routes/development.xml +32 -0
  69. package/ai/fw-draft/routes/universal.xml +58 -0
  70. package/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
  71. package/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
  72. package/dist/ai/agents/agent-resolve-conflicts.xml +6 -0
  73. package/dist/ai/agents/agent-review-verifier.xml +6 -0
  74. package/dist/ai/directives/architecture/README.md +21 -0
  75. package/dist/ai/directives/coding/README.md +23 -0
  76. package/dist/ai/directives/coding/result-conventions.xml +55 -0
  77. package/dist/ai/directives/coding/svelte5-runes.xml +248 -0
  78. package/dist/ai/directives/coding/sveltekit-rules.xml +247 -0
  79. package/dist/ai/directives/coding/typescript-rules.xml +589 -0
  80. package/dist/ai/directives/coding/uikit-component-storybook.xml +347 -0
  81. package/dist/ai/directives/coding/uikit-component-svelte.xml +344 -0
  82. package/dist/ai/directives/coding/uikit-spec-drafting.xml +243 -0
  83. package/dist/ai/directives/dbc-audit.directive.xml +131 -0
  84. package/dist/ai/directives/dev-review.directive.xml +148 -0
  85. package/dist/ai/directives/infra/README.md +11 -0
  86. package/dist/ai/directives/infra/eslint-setup.xml +467 -0
  87. package/dist/ai/directives/infra/git-setup.xml +261 -0
  88. package/dist/ai/directives/infra/nodejs-npm-setup.xml +354 -0
  89. package/dist/ai/directives/infra/storybook-setup.xml +153 -0
  90. package/dist/ai/directives/knowledge.xml +206 -0
  91. package/dist/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
  92. package/dist/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
  93. package/dist/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
  94. package/dist/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
  95. package/dist/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
  96. package/dist/ai/directives/sdd/README.md +49 -0
  97. package/dist/ai/directives/sdd/audit.directive.xml +543 -0
  98. package/dist/ai/directives/sdd/discovery.directive.xml +824 -0
  99. package/dist/ai/directives/sdd/fix.directive.xml +249 -0
  100. package/dist/ai/directives/sdd/module-decomposition.directive.xml +666 -0
  101. package/dist/ai/directives/sdd/phase-execution-protocol.xml +339 -0
  102. package/dist/ai/directives/sdd/scaffold.directive.xml +717 -0
  103. package/dist/ai/directives/sdd/setup.directive.xml +213 -0
  104. package/dist/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
  105. package/dist/ai/directives/semantic-change-extractor.directive.xml +99 -0
  106. package/dist/ai/directives/testing/README.md +25 -0
  107. package/dist/ai/directives/testing/common.xml +234 -0
  108. package/dist/ai/directives/testing/node-test.xml +288 -0
  109. package/dist/ai/directives/testing/playwright-cli.xml +199 -0
  110. package/dist/ai/directives/testing/playwright-e2e.xml +292 -0
  111. package/dist/ai/directives/testing/storybook-usage.xml +173 -0
  112. package/dist/ai/directives/testing/svelte-testing.xml +237 -0
  113. package/dist/ai/directives/testing/vitest-rules.xml +326 -0
  114. package/dist/ai/docs/README.md +17 -0
  115. package/dist/ai/docs/ai-icl.md +538 -0
  116. package/dist/ai/docs/ai-priming.md +548 -0
  117. package/dist/ai/docs/ai-prompt-formats.md +406 -0
  118. package/dist/ai/docs/ai-promting.md +572 -0
  119. package/dist/ai/drafts/DRAFT.md +120 -0
  120. package/dist/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
  121. package/dist/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
  122. package/dist/ai/drafts/d.md +65 -0
  123. package/dist/ai/drafts/music-posts.md +105 -0
  124. package/dist/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
  125. package/dist/ai/fw/v1/core/mental-model.xml +50 -0
  126. package/dist/ai/fw/v1/discovery/intent-reactor.xml +92 -0
  127. package/dist/ai/fw/v1/production/swarm-protocol.xml +122 -0
  128. package/dist/ai/fw/v1/review/quality-pipeline.xml +102 -0
  129. package/dist/ai/fw/v2/arch-universal.xml +73 -0
  130. package/dist/ai/fw-draft/README.md +79 -0
  131. package/dist/ai/fw-draft/bin/discovery.sh +116 -0
  132. package/dist/ai/fw-draft/gennady.xml +58 -0
  133. package/dist/ai/fw-draft/provider/claude.xml +16 -0
  134. package/dist/ai/fw-draft/provider/cursor.xml +23 -0
  135. package/dist/ai/fw-draft/provider/default.xml +12 -0
  136. package/dist/ai/fw-draft/roles/developer.xml +18 -0
  137. package/dist/ai/fw-draft/router.xml +39 -0
  138. package/dist/ai/fw-draft/routes/development.xml +32 -0
  139. package/dist/ai/fw-draft/routes/universal.xml +58 -0
  140. package/dist/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
  141. package/dist/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
  142. package/dist/chunks/_commonjsHelpers-DaMA6jEr.js +8 -0
  143. package/dist/chunks/devtools-CPZ0IUNM.js +79 -0
  144. package/dist/chunks/{help.cmd-CWasx25o.js → help.cmd-B_G7EWzF.js} +9 -2
  145. package/dist/chunks/{index-Bh0p7rJg.js → index-BCqnKvNZ.js} +33 -9
  146. package/dist/chunks/{index-Gy1n7hRU.js → index-BLsDffzZ.js} +1 -1
  147. package/dist/chunks/index-Bq4d25CK.js +26964 -0
  148. package/dist/chunks/{index-D1Hurfwu.js → index-BrSutH7l.js} +57 -33
  149. package/dist/chunks/{index-DgAmONSz.js → index-BsD-J44e.js} +12 -12
  150. package/dist/chunks/{index-Bx_P7mlL.js → index-BzBhCTHq.js} +2 -2
  151. package/dist/chunks/{index-B3r-YFvt.js → index-CAWs-GED.js} +1 -1
  152. package/dist/chunks/index-CFd_iufb.js +16979 -0
  153. package/dist/chunks/index-DAU6h0aT.js +178 -0
  154. package/dist/chunks/index-Db09OODV.js +176 -0
  155. package/dist/chunks/{index-BrobNwbS.js → index-Dc44ukmL.js} +35 -19
  156. package/dist/chunks/index-DeYzAoxF.js +3789 -0
  157. package/dist/chunks/index-O5kqC9i_.js +443 -0
  158. package/dist/chunks/index-TX0TmKeu.js +540 -0
  159. package/dist/chunks/{run-review-command.logic-BQDGxh0f.js → run-review-command.logic-CwxYeLby.js} +2 -2
  160. package/dist/chunks/services-Dnk3nB2x.js +2732 -0
  161. package/dist/chunks/shared-COpFaV-w.js +665 -0
  162. package/dist/cli/cmd/_shared/prompt/io/load-agent-template.io.d.ts +3 -3
  163. package/dist/cli/cmd/_shared/prompt/logic/build-ai-first-knowledge-block.logic.d.ts +3 -3
  164. package/dist/cli/cmd/_shared/prompt/logic/build-ai-verify-placeholders.logic.d.ts +7 -4
  165. package/dist/cli/cmd/_shared/prompt/logic/verify-commands/resolve-verify-commands.logic.d.ts +5 -0
  166. package/dist/cli/cmd/_shared/update-check-worker.d.ts +1 -0
  167. package/dist/cli/cmd/_shared/update-check.d.ts +38 -0
  168. package/dist/cli/cmd/agent-mon/cmd/create-providers.d.ts +15 -0
  169. package/dist/cli/cmd/agent-mon/cmd/index.d.ts +1 -0
  170. package/dist/cli/cmd/agent-mon/cmd/run.d.ts +12 -0
  171. package/dist/cli/cmd/agent-mon/state/create-state-manager.d.ts +32 -0
  172. package/dist/cli/cmd/agent-mon/state/group-by-provider.d.ts +14 -0
  173. package/dist/cli/cmd/agent-mon/state/index.d.ts +5 -0
  174. package/dist/cli/cmd/agent-mon/state/is-waiting.d.ts +9 -0
  175. package/dist/cli/cmd/agent-mon/state/view-model.type.d.ts +74 -0
  176. package/dist/cli/cmd/agent-mon/ui/app.d.ts +16 -0
  177. package/dist/cli/cmd/agent-mon/ui/column-view.d.ts +14 -0
  178. package/dist/cli/cmd/agent-mon/ui/index.d.ts +10 -0
  179. package/dist/cli/cmd/agent-mon/ui/provider-column.d.ts +14 -0
  180. package/dist/cli/cmd/agent-mon/ui/session-card.d.ts +12 -0
  181. package/dist/cli/cmd/agent-mon/ui/status-badge.d.ts +10 -0
  182. package/dist/cli/cmd/alt-opinion/alt-opinion-parser.d.ts +18 -0
  183. package/dist/cli/cmd/alt-opinion/alt-opinion-runner.d.ts +32 -0
  184. package/dist/cli/cmd/alt-opinion/alt-opinion.cmd.d.ts +34 -0
  185. package/dist/cli/cmd/alt-opinion/alt-opinion.types.d.ts +88 -0
  186. package/dist/cli/cmd/alt-opinion/index.d.ts +1 -0
  187. package/dist/cli/cmd/cat/cat-url.fn.d.ts +19 -0
  188. package/dist/cli/cmd/lint/checks/anchor.check.d.ts +11 -0
  189. package/dist/cli/cmd/lint/checks/dbc-contract.check.d.ts +16 -0
  190. package/dist/cli/cmd/lint/checks/disables.check.d.ts +12 -0
  191. package/dist/cli/cmd/lint/checks/file-header.check.d.ts +10 -0
  192. package/dist/cli/cmd/lint/checks/language.check.d.ts +11 -0
  193. package/dist/cli/cmd/lint/index.d.ts +1 -0
  194. package/dist/cli/cmd/lint/lint.cmd.d.ts +18 -0
  195. package/dist/cli/cmd/lint/lint.types.d.ts +72 -0
  196. package/dist/cli/cmd/lint/utils/resolve-references.fn.d.ts +32 -0
  197. package/dist/cli/cmd/remote-console/index.d.ts +2 -0
  198. package/dist/cli/cmd/remote-console/remote-console.cmd.d.ts +55 -0
  199. package/dist/cli/cmd/resolve-conflicts/_core/io/resolve-conflicts-template-load.io.d.ts +2 -2
  200. package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-args-parse.logic.d.ts +3 -3
  201. package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-run.logic.d.ts +3 -3
  202. package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-context-git-build.logic.d.ts +4 -4
  203. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-artifact.type.d.ts +3 -1
  204. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-args.type.d.ts +3 -1
  205. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-result.type.d.ts +5 -1
  206. package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-context-git.type.d.ts +18 -2
  207. package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-artifact-build.xml.d.ts +6 -6
  208. package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-render.xml.d.ts +4 -4
  209. package/dist/cli/cmd/review/_core/io/load-review-verify-template.io.d.ts +2 -2
  210. package/dist/cli/cmd/review/_core/logic/build-review-context-git.logic.d.ts +3 -3
  211. package/dist/cli/cmd/review/_core/logic/build-review-context-vcs.logic.d.ts +2 -2
  212. package/dist/cli/cmd/review/_core/logic/load-review-context-mr.logic.d.ts +5 -5
  213. package/dist/cli/cmd/review/_core/logic/parse-review-command-args.logic.d.ts +3 -3
  214. package/dist/cli/cmd/review/_core/logic/resolve-review-intent.logic.d.ts +3 -3
  215. package/dist/cli/cmd/review/_core/logic/run-review-command.logic.d.ts +3 -3
  216. package/dist/cli/cmd/review/_core/types/review-artifact.type.d.ts +4 -1
  217. package/dist/cli/cmd/review/_core/types/review-command-args.type.d.ts +7 -1
  218. package/dist/cli/cmd/review/_core/types/review-command-mode.type.d.ts +1 -1
  219. package/dist/cli/cmd/review/_core/types/review-command-options.type.d.ts +3 -1
  220. package/dist/cli/cmd/review/_core/types/review-command-result.type.d.ts +5 -1
  221. package/dist/cli/cmd/review/_core/types/review-context-git.type.d.ts +3 -1
  222. package/dist/cli/cmd/review/_core/types/review-context-mr.type.d.ts +22 -3
  223. package/dist/cli/cmd/review/_core/types/review-context-vcs.type.d.ts +4 -1
  224. package/dist/cli/cmd/review/_core/types/review-intent.type.d.ts +1 -1
  225. package/dist/cli/cmd/review/_core/xml/build-review-artifact.xml.d.ts +10 -10
  226. package/dist/cli/cmd/review/_core/xml/render-review-issues.xml.d.ts +3 -3
  227. package/dist/cli/cmd/review/_core/xml/render-review-verify.xml.d.ts +4 -4
  228. package/dist/cli/cmd/sync/index.d.ts +1 -0
  229. package/dist/cli/cmd/sync/sync-core.d.ts +65 -0
  230. package/dist/cli/cmd/sync/sync-formatter.d.ts +12 -0
  231. package/dist/cli/cmd/sync/sync.cmd.d.ts +33 -0
  232. package/dist/cli/cmd/sync/sync.types.d.ts +50 -0
  233. package/dist/cli/cmd/vcs-reply/vcs-reply.cmd.d.ts +4 -4
  234. package/dist/cli/utils/ai-legacy/ai-legacy-agent.d.ts +12 -11
  235. package/dist/cli/utils/ai-legacy/ai-legacy-core.d.ts +33 -17
  236. package/dist/cli/utils/ai-legacy/ai-legacy-model.d.ts +42 -23
  237. package/dist/cli/utils/cat-gen/cat-gen.d.ts +19 -8
  238. package/dist/cli/utils/commit-gen/commit-gen.d.ts +39 -15
  239. package/dist/cli/utils/prompts/index.d.ts +6 -6
  240. package/dist/cli/utils/review-gen/review-gen.d.ts +33 -9
  241. package/dist/gennady.js +30 -10
  242. package/dist/index.d.ts +1 -0
  243. package/dist/index.js +43 -22
  244. package/dist/services/agent-mon/diff/diff.d.ts +9 -0
  245. package/dist/services/agent-mon/diff/index.d.ts +1 -0
  246. package/dist/services/agent-mon/index.d.ts +10 -0
  247. package/dist/services/agent-mon/model/agent-provider.type.d.ts +20 -0
  248. package/dist/services/agent-mon/model/agent-session.type.d.ts +49 -0
  249. package/dist/services/agent-mon/model/errors.d.ts +20 -0
  250. package/dist/services/agent-mon/model/index.d.ts +7 -0
  251. package/dist/services/agent-mon/model/observe-opts.type.d.ts +7 -0
  252. package/dist/services/agent-mon/model/scan-opts.type.d.ts +7 -0
  253. package/dist/services/agent-mon/model/session-changes.type.d.ts +10 -0
  254. package/dist/services/agent-mon/monitor/agent-monitor.d.ts +44 -0
  255. package/dist/services/agent-mon/monitor/create-monitor.d.ts +6 -0
  256. package/dist/services/agent-mon/monitor/index.d.ts +2 -0
  257. package/dist/services/agent-mon/observe/index.d.ts +1 -0
  258. package/dist/services/agent-mon/observe/observe.d.ts +12 -0
  259. package/dist/services/agent-mon/providers/claude/claude-provider.d.ts +50 -0
  260. package/dist/services/agent-mon/providers/claude/index.d.ts +5 -0
  261. package/dist/services/agent-mon/providers/claude/ps.d.ts +36 -0
  262. package/dist/services/agent-mon/providers/claude/session-json.d.ts +37 -0
  263. package/dist/services/agent-mon/providers/opencode/db.d.ts +41 -0
  264. package/dist/services/agent-mon/providers/opencode/index.d.ts +3 -0
  265. package/dist/services/agent-mon/providers/opencode/model-parser.d.ts +6 -0
  266. package/dist/services/agent-mon/providers/opencode/opencode-provider.d.ts +45 -0
  267. package/dist/services/ai-client/providers/ai-model.type.d.ts +14 -0
  268. package/dist/services/ai-client/providers/open-router/open-router-model.type.d.ts +1 -4
  269. package/dist/services/ai-client/providers/open-router/open-router-provider.d.ts +17 -0
  270. package/dist/services/ai-client/providers/openai-like-provider.d.ts +1 -0
  271. package/dist/services/data-ore/telegram/telegram-data-ore.d.ts +17 -0
  272. package/dist/services/data-ore/telegram/telegram-data-ore.types.d.ts +4 -0
  273. package/dist/services/data-ore/telegram/telegram-demo-music-helper.d.ts +1 -0
  274. package/dist/services/data-ore/telegram/telegram-demo.d.ts +1 -0
  275. package/dist/services/dbc/linter/dbc-ast-adapter.types.d.ts +82 -0
  276. package/dist/services/dbc/linter/dbc-linter.types.d.ts +95 -0
  277. package/dist/services/dbc/linter/implementations/ts/dbc-ts-ast-adapter.d.ts +184 -0
  278. package/dist/services/dbc/linter/implementations/ts/dbc-ts-linter.d.ts +152 -0
  279. package/dist/services/dbc/parser/dbc-parser.types.d.ts +16 -16
  280. package/dist/services/dbc/parser/implementations/jsdoc/dbc-jsdoc-parser.d.ts +14 -4
  281. package/dist/services/logger/logger.d.ts +26 -6
  282. package/dist/services/remote-console/client/remote-console-client-serializer.d.ts +7 -0
  283. package/dist/services/remote-console/client/remote-console-client.d.ts +20 -0
  284. package/dist/services/remote-console/client/remote-console-client.types.d.ts +88 -0
  285. package/dist/services/remote-console/remote-console.d.ts +6 -0
  286. package/dist/services/remote-console/server/remote-console-server.d.ts +10 -0
  287. package/dist/services/remote-console/server/remote-console-server.types.d.ts +44 -0
  288. package/dist/services/remote-console/server/remote-console-stdout-writer.d.ts +26 -0
  289. package/dist/services/vcs-client/abstract/vcs-client-merge-discussions.d.ts +22 -14
  290. package/dist/services/vcs-client/abstract/vcs-client-merge-requests.d.ts +31 -14
  291. package/dist/services/vcs-client/abstract/vcs-client-repository-files.d.ts +16 -0
  292. package/dist/services/vcs-client/abstract/vcs-client.d.ts +9 -5
  293. package/dist/services/vcs-client/entities/vcs-file-content.type.d.ts +24 -0
  294. package/dist/services/vcs-client/entities/vcs-merge-request-changes.type.d.ts +32 -0
  295. package/dist/services/vcs-client/entities/vcs-url.type.d.ts +14 -0
  296. package/dist/services/vcs-client/entities/vcs-user.type.d.ts +3 -0
  297. package/dist/services/vcs-client/github/vcs-github-client.d.ts +31 -0
  298. package/dist/services/vcs-client/github/vcs-github-merge-requests.d.ts +40 -0
  299. package/dist/services/vcs-client/github/vcs-github-repository-files.d.ts +27 -0
  300. package/dist/services/vcs-client/gitlab/vcs-gitlab-client.d.ts +13 -4
  301. package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-discussions.d.ts +16 -5
  302. package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-requests.d.ts +24 -5
  303. package/dist/services/vcs-client/gitlab/vcs-gitlab-repository-files.d.ts +27 -0
  304. package/dist/services/vcs-client/parse-vcs-url.d.ts +3 -0
  305. package/dist/shared/backend/git/git-core.d.ts +24 -22
  306. package/dist/shared/backend/git/git-diff.d.ts +16 -5
  307. package/dist/shared/backend/rc/rc-config.d.ts +27 -15
  308. package/dist/shared/common/exec.d.ts +4 -6
  309. package/dist/shared/common/files.d.ts +1 -3
  310. package/dist/shared/common/language.d.ts +3 -6
  311. package/dist/shared/common/parse-args.d.ts +1 -4
  312. package/dist/shared/common/style.d.ts +3 -3
  313. package/dist/shared/common/think.d.ts +1 -5
  314. package/dist/shared/common/tokens.d.ts +1 -5
  315. package/dist/shared/common/unguard.d.ts +4 -8
  316. package/dist/shared/common/xml.d.ts +16 -12
  317. package/package.json +20 -4
  318. package/dist/.ai/agents/agent-resolve-conflicts.xml +0 -148
  319. package/dist/.ai/agents/agent-review-verifier.xml +0 -181
  320. package/dist/chunks/index-C4jt5WBP.js +0 -3548
  321. package/dist/chunks/services-Sb7TwLxt.js +0 -122
  322. package/dist/chunks/shared-D0kSJB49.js +0 -601
@@ -0,0 +1,3789 @@
1
+ import yt from "node:fs";
2
+ import St from "node:path";
3
+ import { c as Hn, g as Dn } from "./_commonjsHelpers-DaMA6jEr.js";
4
+ import Kt from "os";
5
+ import Se from "path";
6
+ import Pn from "util";
7
+ import dt from "stream";
8
+ import In from "events";
9
+ import Qt from "fs";
10
+ import { l as xe, p as Nn, V as qn, d as Fn } from "./services-Dnk3nB2x.js";
11
+ import { p as Bn, s as ne } from "./shared-COpFaV-w.js";
12
+ var se = {}, ie = {}, Oe = {}, nr;
13
+ function jn() {
14
+ if (nr) return Oe;
15
+ nr = 1, Object.defineProperty(Oe, "__esModule", { value: !0 }), Oe.splitWhen = Oe.flatten = void 0;
16
+ function o(l) {
17
+ return l.reduce((u, r) => [].concat(u, r), []);
18
+ }
19
+ Oe.flatten = o;
20
+ function a(l, u) {
21
+ const r = [[]];
22
+ let t = 0;
23
+ for (const n of l)
24
+ u(n) ? (t++, r[t] = []) : r[t].push(n);
25
+ return r;
26
+ }
27
+ return Oe.splitWhen = a, Oe;
28
+ }
29
+ var ke = {}, sr;
30
+ function Gn() {
31
+ if (sr) return ke;
32
+ sr = 1, Object.defineProperty(ke, "__esModule", { value: !0 }), ke.isEnoentCodeError = void 0;
33
+ function o(a) {
34
+ return a.code === "ENOENT";
35
+ }
36
+ return ke.isEnoentCodeError = o, ke;
37
+ }
38
+ var Me = {}, ir;
39
+ function Un() {
40
+ if (ir) return Me;
41
+ ir = 1, Object.defineProperty(Me, "__esModule", { value: !0 }), Me.createDirentFromStats = void 0;
42
+ class o {
43
+ constructor(u, r) {
44
+ this.name = u, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r.isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink = r.isSymbolicLink.bind(r);
45
+ }
46
+ }
47
+ function a(l, u) {
48
+ return new o(l, u);
49
+ }
50
+ return Me.createDirentFromStats = a, Me;
51
+ }
52
+ var ee = {}, ar;
53
+ function Wn() {
54
+ if (ar) return ee;
55
+ ar = 1, Object.defineProperty(ee, "__esModule", { value: !0 }), ee.convertPosixPathToPattern = ee.convertWindowsPathToPattern = ee.convertPathToPattern = ee.escapePosixPath = ee.escapeWindowsPath = ee.escape = ee.removeLeadingDotSegment = ee.makeAbsolute = ee.unixify = void 0;
56
+ const o = Kt, a = Se, l = o.platform() === "win32", u = 2, r = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, t = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, n = /^\\\\([.?])/, e = /\\(?![!()+@[\]{}])/g;
57
+ function i(C) {
58
+ return C.replace(/\\/g, "/");
59
+ }
60
+ ee.unixify = i;
61
+ function s(C, m) {
62
+ return a.resolve(C, m);
63
+ }
64
+ ee.makeAbsolute = s;
65
+ function p(C) {
66
+ if (C.charAt(0) === ".") {
67
+ const m = C.charAt(1);
68
+ if (m === "/" || m === "\\")
69
+ return C.slice(u);
70
+ }
71
+ return C;
72
+ }
73
+ ee.removeLeadingDotSegment = p, ee.escape = l ? h : d;
74
+ function h(C) {
75
+ return C.replace(t, "\\$2");
76
+ }
77
+ ee.escapeWindowsPath = h;
78
+ function d(C) {
79
+ return C.replace(r, "\\$2");
80
+ }
81
+ ee.escapePosixPath = d, ee.convertPathToPattern = l ? y : T;
82
+ function y(C) {
83
+ return h(C).replace(n, "//$1").replace(e, "/");
84
+ }
85
+ ee.convertWindowsPathToPattern = y;
86
+ function T(C) {
87
+ return d(C);
88
+ }
89
+ return ee.convertPosixPathToPattern = T, ee;
90
+ }
91
+ var I = {};
92
+ /*!
93
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
94
+ *
95
+ * Copyright (c) 2014-2016, Jon Schlinkert.
96
+ * Licensed under the MIT License.
97
+ */
98
+ var mt, or;
99
+ function Vn() {
100
+ return or || (or = 1, mt = function(a) {
101
+ if (typeof a != "string" || a === "")
102
+ return !1;
103
+ for (var l; l = /(\\).|([@?!+*]\(.*\))/g.exec(a); ) {
104
+ if (l[2]) return !0;
105
+ a = a.slice(l.index + l[0].length);
106
+ }
107
+ return !1;
108
+ }), mt;
109
+ }
110
+ /*!
111
+ * is-glob <https://github.com/jonschlinkert/is-glob>
112
+ *
113
+ * Copyright (c) 2014-2017, Jon Schlinkert.
114
+ * Released under the MIT License.
115
+ */
116
+ var vt, ur;
117
+ function Kn() {
118
+ if (ur) return vt;
119
+ ur = 1;
120
+ var o = Vn(), a = { "{": "}", "(": ")", "[": "]" }, l = function(r) {
121
+ if (r[0] === "!")
122
+ return !0;
123
+ for (var t = 0, n = -2, e = -2, i = -2, s = -2, p = -2; t < r.length; ) {
124
+ if (r[t] === "*" || r[t + 1] === "?" && /[\].+)]/.test(r[t]) || e !== -1 && r[t] === "[" && r[t + 1] !== "]" && (e < t && (e = r.indexOf("]", t)), e > t && (p === -1 || p > e || (p = r.indexOf("\\", t), p === -1 || p > e))) || i !== -1 && r[t] === "{" && r[t + 1] !== "}" && (i = r.indexOf("}", t), i > t && (p = r.indexOf("\\", t), p === -1 || p > i)) || s !== -1 && r[t] === "(" && r[t + 1] === "?" && /[:!=]/.test(r[t + 2]) && r[t + 3] !== ")" && (s = r.indexOf(")", t), s > t && (p = r.indexOf("\\", t), p === -1 || p > s)) || n !== -1 && r[t] === "(" && r[t + 1] !== "|" && (n < t && (n = r.indexOf("|", t)), n !== -1 && r[n + 1] !== ")" && (s = r.indexOf(")", n), s > n && (p = r.indexOf("\\", n), p === -1 || p > s))))
125
+ return !0;
126
+ if (r[t] === "\\") {
127
+ var h = r[t + 1];
128
+ t += 2;
129
+ var d = a[h];
130
+ if (d) {
131
+ var y = r.indexOf(d, t);
132
+ y !== -1 && (t = y + 1);
133
+ }
134
+ if (r[t] === "!")
135
+ return !0;
136
+ } else
137
+ t++;
138
+ }
139
+ return !1;
140
+ }, u = function(r) {
141
+ if (r[0] === "!")
142
+ return !0;
143
+ for (var t = 0; t < r.length; ) {
144
+ if (/[*?{}()[\]]/.test(r[t]))
145
+ return !0;
146
+ if (r[t] === "\\") {
147
+ var n = r[t + 1];
148
+ t += 2;
149
+ var e = a[n];
150
+ if (e) {
151
+ var i = r.indexOf(e, t);
152
+ i !== -1 && (t = i + 1);
153
+ }
154
+ if (r[t] === "!")
155
+ return !0;
156
+ } else
157
+ t++;
158
+ }
159
+ return !1;
160
+ };
161
+ return vt = function(t, n) {
162
+ if (typeof t != "string" || t === "")
163
+ return !1;
164
+ if (o(t))
165
+ return !0;
166
+ var e = l;
167
+ return n && n.strict === !1 && (e = u), e(t);
168
+ }, vt;
169
+ }
170
+ var Rt, cr;
171
+ function Qn() {
172
+ if (cr) return Rt;
173
+ cr = 1;
174
+ var o = Kn(), a = Se.posix.dirname, l = Kt.platform() === "win32", u = "/", r = /\\/g, t = /[\{\[].*[\}\]]$/, n = /(^|[^\\])([\{\[]|\([^\)]+$)/, e = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
175
+ return Rt = function(s, p) {
176
+ var h = Object.assign({ flipBackslashes: !0 }, p);
177
+ h.flipBackslashes && l && s.indexOf(u) < 0 && (s = s.replace(r, u)), t.test(s) && (s += u), s += "a";
178
+ do
179
+ s = a(s);
180
+ while (o(s) || n.test(s));
181
+ return s.replace(e, "$1");
182
+ }, Rt;
183
+ }
184
+ var Et = {}, lr;
185
+ function Xt() {
186
+ return lr || (lr = 1, (function(o) {
187
+ o.isInteger = (a) => typeof a == "number" ? Number.isInteger(a) : typeof a == "string" && a.trim() !== "" ? Number.isInteger(Number(a)) : !1, o.find = (a, l) => a.nodes.find((u) => u.type === l), o.exceedsLimit = (a, l, u = 1, r) => r === !1 || !o.isInteger(a) || !o.isInteger(l) ? !1 : (Number(l) - Number(a)) / Number(u) >= r, o.escapeNode = (a, l = 0, u) => {
188
+ const r = a.nodes[l];
189
+ r && (u && r.type === u || r.type === "open" || r.type === "close") && r.escaped !== !0 && (r.value = "\\" + r.value, r.escaped = !0);
190
+ }, o.encloseBrace = (a) => a.type !== "brace" ? !1 : a.commas >> 0 + a.ranges >> 0 === 0 ? (a.invalid = !0, !0) : !1, o.isInvalidBrace = (a) => a.type !== "brace" ? !1 : a.invalid === !0 || a.dollar ? !0 : a.commas >> 0 + a.ranges >> 0 === 0 || a.open !== !0 || a.close !== !0 ? (a.invalid = !0, !0) : !1, o.isOpenOrClose = (a) => a.type === "open" || a.type === "close" ? !0 : a.open === !0 || a.close === !0, o.reduce = (a) => a.reduce((l, u) => (u.type === "text" && l.push(u.value), u.type === "range" && (u.type = "text"), l), []), o.flatten = (...a) => {
191
+ const l = [], u = (r) => {
192
+ for (let t = 0; t < r.length; t++) {
193
+ const n = r[t];
194
+ if (Array.isArray(n)) {
195
+ u(n);
196
+ continue;
197
+ }
198
+ n !== void 0 && l.push(n);
199
+ }
200
+ return l;
201
+ };
202
+ return u(a), l;
203
+ };
204
+ })(Et)), Et;
205
+ }
206
+ var At, fr;
207
+ function Yt() {
208
+ if (fr) return At;
209
+ fr = 1;
210
+ const o = Xt();
211
+ return At = (a, l = {}) => {
212
+ const u = (r, t = {}) => {
213
+ const n = l.escapeInvalid && o.isInvalidBrace(t), e = r.invalid === !0 && l.escapeInvalid === !0;
214
+ let i = "";
215
+ if (r.value)
216
+ return (n || e) && o.isOpenOrClose(r) ? "\\" + r.value : r.value;
217
+ if (r.value)
218
+ return r.value;
219
+ if (r.nodes)
220
+ for (const s of r.nodes)
221
+ i += u(s);
222
+ return i;
223
+ };
224
+ return u(a);
225
+ }, At;
226
+ }
227
+ /*!
228
+ * is-number <https://github.com/jonschlinkert/is-number>
229
+ *
230
+ * Copyright (c) 2014-present, Jon Schlinkert.
231
+ * Released under the MIT License.
232
+ */
233
+ var bt, hr;
234
+ function Xn() {
235
+ return hr || (hr = 1, bt = function(o) {
236
+ return typeof o == "number" ? o - o === 0 : typeof o == "string" && o.trim() !== "" ? Number.isFinite ? Number.isFinite(+o) : isFinite(+o) : !1;
237
+ }), bt;
238
+ }
239
+ /*!
240
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
241
+ *
242
+ * Copyright (c) 2015-present, Jon Schlinkert.
243
+ * Released under the MIT License.
244
+ */
245
+ var Pt, pr;
246
+ function Yn() {
247
+ if (pr) return Pt;
248
+ pr = 1;
249
+ const o = Xn(), a = (m, S, _) => {
250
+ if (o(m) === !1)
251
+ throw new TypeError("toRegexRange: expected the first argument to be a number");
252
+ if (S === void 0 || m === S)
253
+ return String(m);
254
+ if (o(S) === !1)
255
+ throw new TypeError("toRegexRange: expected the second argument to be a number.");
256
+ let c = { relaxZeros: !0, ..._ };
257
+ typeof c.strictZeros == "boolean" && (c.relaxZeros = c.strictZeros === !1);
258
+ let f = String(c.relaxZeros), g = String(c.shorthand), R = String(c.capture), v = String(c.wrap), P = m + ":" + S + "=" + f + g + R + v;
259
+ if (a.cache.hasOwnProperty(P))
260
+ return a.cache[P].result;
261
+ let O = Math.min(m, S), D = Math.max(m, S);
262
+ if (Math.abs(O - D) === 1) {
263
+ let N = m + "|" + S;
264
+ return c.capture ? `(${N})` : c.wrap === !1 ? N : `(?:${N})`;
265
+ }
266
+ let k = T(m) || T(S), M = { min: m, max: S, a: O, b: D }, x = [], U = [];
267
+ if (k && (M.isPadded = k, M.maxLen = String(M.max).length), O < 0) {
268
+ let N = D < 0 ? Math.abs(D) : 1;
269
+ U = t(N, Math.abs(O), M, c), O = M.a = 0;
270
+ }
271
+ return D >= 0 && (x = t(O, D, M, c)), M.negatives = U, M.positives = x, M.result = l(U, x), c.capture === !0 ? M.result = `(${M.result})` : c.wrap !== !1 && x.length + U.length > 1 && (M.result = `(?:${M.result})`), a.cache[P] = M, M.result;
272
+ };
273
+ function l(m, S, _) {
274
+ let c = n(m, S, "-", !1) || [], f = n(S, m, "", !1) || [], g = n(m, S, "-?", !0) || [];
275
+ return c.concat(g).concat(f).join("|");
276
+ }
277
+ function u(m, S) {
278
+ let _ = 1, c = 1, f = p(m, _), g = /* @__PURE__ */ new Set([S]);
279
+ for (; m <= f && f <= S; )
280
+ g.add(f), _ += 1, f = p(m, _);
281
+ for (f = h(S + 1, c) - 1; m < f && f <= S; )
282
+ g.add(f), c += 1, f = h(S + 1, c) - 1;
283
+ return g = [...g], g.sort(i), g;
284
+ }
285
+ function r(m, S, _) {
286
+ if (m === S)
287
+ return { pattern: m, count: [], digits: 0 };
288
+ let c = e(m, S), f = c.length, g = "", R = 0;
289
+ for (let v = 0; v < f; v++) {
290
+ let [P, O] = c[v];
291
+ P === O ? g += P : P !== "0" || O !== "9" ? g += y(P, O) : R++;
292
+ }
293
+ return R && (g += _.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: g, count: [R], digits: f };
294
+ }
295
+ function t(m, S, _, c) {
296
+ let f = u(m, S), g = [], R = m, v;
297
+ for (let P = 0; P < f.length; P++) {
298
+ let O = f[P], D = r(String(R), String(O), c), k = "";
299
+ if (!_.isPadded && v && v.pattern === D.pattern) {
300
+ v.count.length > 1 && v.count.pop(), v.count.push(D.count[0]), v.string = v.pattern + d(v.count), R = O + 1;
301
+ continue;
302
+ }
303
+ _.isPadded && (k = C(O, _, c)), D.string = k + D.pattern + d(D.count), g.push(D), R = O + 1, v = D;
304
+ }
305
+ return g;
306
+ }
307
+ function n(m, S, _, c, f) {
308
+ let g = [];
309
+ for (let R of m) {
310
+ let { string: v } = R;
311
+ !c && !s(S, "string", v) && g.push(_ + v), c && s(S, "string", v) && g.push(_ + v);
312
+ }
313
+ return g;
314
+ }
315
+ function e(m, S) {
316
+ let _ = [];
317
+ for (let c = 0; c < m.length; c++) _.push([m[c], S[c]]);
318
+ return _;
319
+ }
320
+ function i(m, S) {
321
+ return m > S ? 1 : S > m ? -1 : 0;
322
+ }
323
+ function s(m, S, _) {
324
+ return m.some((c) => c[S] === _);
325
+ }
326
+ function p(m, S) {
327
+ return Number(String(m).slice(0, -S) + "9".repeat(S));
328
+ }
329
+ function h(m, S) {
330
+ return m - m % Math.pow(10, S);
331
+ }
332
+ function d(m) {
333
+ let [S = 0, _ = ""] = m;
334
+ return _ || S > 1 ? `{${S + (_ ? "," + _ : "")}}` : "";
335
+ }
336
+ function y(m, S, _) {
337
+ return `[${m}${S - m === 1 ? "" : "-"}${S}]`;
338
+ }
339
+ function T(m) {
340
+ return /^-?(0+)\d/.test(m);
341
+ }
342
+ function C(m, S, _) {
343
+ if (!S.isPadded)
344
+ return m;
345
+ let c = Math.abs(S.maxLen - String(m).length), f = _.relaxZeros !== !1;
346
+ switch (c) {
347
+ case 0:
348
+ return "";
349
+ case 1:
350
+ return f ? "0?" : "0";
351
+ case 2:
352
+ return f ? "0{0,2}" : "00";
353
+ default:
354
+ return f ? `0{0,${c}}` : `0{${c}}`;
355
+ }
356
+ }
357
+ return a.cache = {}, a.clearCache = () => a.cache = {}, Pt = a, Pt;
358
+ }
359
+ /*!
360
+ * fill-range <https://github.com/jonschlinkert/fill-range>
361
+ *
362
+ * Copyright (c) 2014-present, Jon Schlinkert.
363
+ * Licensed under the MIT License.
364
+ */
365
+ var xt, dr;
366
+ function xn() {
367
+ if (dr) return xt;
368
+ dr = 1;
369
+ const o = Pn, a = Yn(), l = (c) => c !== null && typeof c == "object" && !Array.isArray(c), u = (c) => (f) => c === !0 ? Number(f) : String(f), r = (c) => typeof c == "number" || typeof c == "string" && c !== "", t = (c) => Number.isInteger(+c), n = (c) => {
370
+ let f = `${c}`, g = -1;
371
+ if (f[0] === "-" && (f = f.slice(1)), f === "0") return !1;
372
+ for (; f[++g] === "0"; ) ;
373
+ return g > 0;
374
+ }, e = (c, f, g) => typeof c == "string" || typeof f == "string" ? !0 : g.stringify === !0, i = (c, f, g) => {
375
+ if (f > 0) {
376
+ let R = c[0] === "-" ? "-" : "";
377
+ R && (c = c.slice(1)), c = R + c.padStart(R ? f - 1 : f, "0");
378
+ }
379
+ return g === !1 ? String(c) : c;
380
+ }, s = (c, f) => {
381
+ let g = c[0] === "-" ? "-" : "";
382
+ for (g && (c = c.slice(1), f--); c.length < f; ) c = "0" + c;
383
+ return g ? "-" + c : c;
384
+ }, p = (c, f, g) => {
385
+ c.negatives.sort((D, k) => D < k ? -1 : D > k ? 1 : 0), c.positives.sort((D, k) => D < k ? -1 : D > k ? 1 : 0);
386
+ let R = f.capture ? "" : "?:", v = "", P = "", O;
387
+ return c.positives.length && (v = c.positives.map((D) => s(String(D), g)).join("|")), c.negatives.length && (P = `-(${R}${c.negatives.map((D) => s(String(D), g)).join("|")})`), v && P ? O = `${v}|${P}` : O = v || P, f.wrap ? `(${R}${O})` : O;
388
+ }, h = (c, f, g, R) => {
389
+ if (g)
390
+ return a(c, f, { wrap: !1, ...R });
391
+ let v = String.fromCharCode(c);
392
+ if (c === f) return v;
393
+ let P = String.fromCharCode(f);
394
+ return `[${v}-${P}]`;
395
+ }, d = (c, f, g) => {
396
+ if (Array.isArray(c)) {
397
+ let R = g.wrap === !0, v = g.capture ? "" : "?:";
398
+ return R ? `(${v}${c.join("|")})` : c.join("|");
399
+ }
400
+ return a(c, f, g);
401
+ }, y = (...c) => new RangeError("Invalid range arguments: " + o.inspect(...c)), T = (c, f, g) => {
402
+ if (g.strictRanges === !0) throw y([c, f]);
403
+ return [];
404
+ }, C = (c, f) => {
405
+ if (f.strictRanges === !0)
406
+ throw new TypeError(`Expected step "${c}" to be a number`);
407
+ return [];
408
+ }, m = (c, f, g = 1, R = {}) => {
409
+ let v = Number(c), P = Number(f);
410
+ if (!Number.isInteger(v) || !Number.isInteger(P)) {
411
+ if (R.strictRanges === !0) throw y([c, f]);
412
+ return [];
413
+ }
414
+ v === 0 && (v = 0), P === 0 && (P = 0);
415
+ let O = v > P, D = String(c), k = String(f), M = String(g);
416
+ g = Math.max(Math.abs(g), 1);
417
+ let x = n(D) || n(k) || n(M), U = x ? Math.max(D.length, k.length, M.length) : 0, N = x === !1 && e(c, f, R) === !1, q = R.transform || u(N);
418
+ if (R.toRegex && g === 1)
419
+ return h(s(c, U), s(f, U), !0, R);
420
+ let F = { negatives: [], positives: [] }, z = (H) => F[H < 0 ? "negatives" : "positives"].push(Math.abs(H)), ce = [], $ = 0;
421
+ for (; O ? v >= P : v <= P; )
422
+ R.toRegex === !0 && g > 1 ? z(v) : ce.push(i(q(v, $), U, N)), v = O ? v - g : v + g, $++;
423
+ return R.toRegex === !0 ? g > 1 ? p(F, R, U) : d(ce, null, { wrap: !1, ...R }) : ce;
424
+ }, S = (c, f, g = 1, R = {}) => {
425
+ if (!t(c) && c.length > 1 || !t(f) && f.length > 1)
426
+ return T(c, f, R);
427
+ let v = R.transform || ((N) => String.fromCharCode(N)), P = `${c}`.charCodeAt(0), O = `${f}`.charCodeAt(0), D = P > O, k = Math.min(P, O), M = Math.max(P, O);
428
+ if (R.toRegex && g === 1)
429
+ return h(k, M, !1, R);
430
+ let x = [], U = 0;
431
+ for (; D ? P >= O : P <= O; )
432
+ x.push(v(P, U)), P = D ? P - g : P + g, U++;
433
+ return R.toRegex === !0 ? d(x, null, { wrap: !1, options: R }) : x;
434
+ }, _ = (c, f, g, R = {}) => {
435
+ if (f == null && r(c))
436
+ return [c];
437
+ if (!r(c) || !r(f))
438
+ return T(c, f, R);
439
+ if (typeof g == "function")
440
+ return _(c, f, 1, { transform: g });
441
+ if (l(g))
442
+ return _(c, f, 0, g);
443
+ let v = { ...R };
444
+ return v.capture === !0 && (v.wrap = !0), g = g || v.step || 1, t(g) ? t(c) && t(f) ? m(c, f, g, v) : S(c, f, Math.max(Math.abs(g), 1), v) : g != null && !l(g) ? C(g, v) : _(c, f, 1, g);
445
+ };
446
+ return xt = _, xt;
447
+ }
448
+ var Ct, _r;
449
+ function Zn() {
450
+ if (_r) return Ct;
451
+ _r = 1;
452
+ const o = xn(), a = Xt();
453
+ return Ct = (u, r = {}) => {
454
+ const t = (n, e = {}) => {
455
+ const i = a.isInvalidBrace(e), s = n.invalid === !0 && r.escapeInvalid === !0, p = i === !0 || s === !0, h = r.escapeInvalid === !0 ? "\\" : "";
456
+ let d = "";
457
+ if (n.isOpen === !0)
458
+ return h + n.value;
459
+ if (n.isClose === !0)
460
+ return console.log("node.isClose", h, n.value), h + n.value;
461
+ if (n.type === "open")
462
+ return p ? h + n.value : "(";
463
+ if (n.type === "close")
464
+ return p ? h + n.value : ")";
465
+ if (n.type === "comma")
466
+ return n.prev.type === "comma" ? "" : p ? n.value : "|";
467
+ if (n.value)
468
+ return n.value;
469
+ if (n.nodes && n.ranges > 0) {
470
+ const y = a.reduce(n.nodes), T = o(...y, { ...r, wrap: !1, toRegex: !0, strictZeros: !0 });
471
+ if (T.length !== 0)
472
+ return y.length > 1 && T.length > 1 ? `(${T})` : T;
473
+ }
474
+ if (n.nodes)
475
+ for (const y of n.nodes)
476
+ d += t(y, n);
477
+ return d;
478
+ };
479
+ return t(u);
480
+ }, Ct;
481
+ }
482
+ var Tt, gr;
483
+ function zn() {
484
+ if (gr) return Tt;
485
+ gr = 1;
486
+ const o = xn(), a = Yt(), l = Xt(), u = (t = "", n = "", e = !1) => {
487
+ const i = [];
488
+ if (t = [].concat(t), n = [].concat(n), !n.length) return t;
489
+ if (!t.length)
490
+ return e ? l.flatten(n).map((s) => `{${s}}`) : n;
491
+ for (const s of t)
492
+ if (Array.isArray(s))
493
+ for (const p of s)
494
+ i.push(u(p, n, e));
495
+ else
496
+ for (let p of n)
497
+ e === !0 && typeof p == "string" && (p = `{${p}}`), i.push(Array.isArray(p) ? u(s, p, e) : s + p);
498
+ return l.flatten(i);
499
+ };
500
+ return Tt = (t, n = {}) => {
501
+ const e = n.rangeLimit === void 0 ? 1e3 : n.rangeLimit, i = (s, p = {}) => {
502
+ s.queue = [];
503
+ let h = p, d = p.queue;
504
+ for (; h.type !== "brace" && h.type !== "root" && h.parent; )
505
+ h = h.parent, d = h.queue;
506
+ if (s.invalid || s.dollar) {
507
+ d.push(u(d.pop(), a(s, n)));
508
+ return;
509
+ }
510
+ if (s.type === "brace" && s.invalid !== !0 && s.nodes.length === 2) {
511
+ d.push(u(d.pop(), ["{}"]));
512
+ return;
513
+ }
514
+ if (s.nodes && s.ranges > 0) {
515
+ const m = l.reduce(s.nodes);
516
+ if (l.exceedsLimit(...m, n.step, e))
517
+ throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
518
+ let S = o(...m, n);
519
+ S.length === 0 && (S = a(s, n)), d.push(u(d.pop(), S)), s.nodes = [];
520
+ return;
521
+ }
522
+ const y = l.encloseBrace(s);
523
+ let T = s.queue, C = s;
524
+ for (; C.type !== "brace" && C.type !== "root" && C.parent; )
525
+ C = C.parent, T = C.queue;
526
+ for (let m = 0; m < s.nodes.length; m++) {
527
+ const S = s.nodes[m];
528
+ if (S.type === "comma" && s.type === "brace") {
529
+ m === 1 && T.push(""), T.push("");
530
+ continue;
531
+ }
532
+ if (S.type === "close") {
533
+ d.push(u(d.pop(), T, y));
534
+ continue;
535
+ }
536
+ if (S.value && S.type !== "open") {
537
+ T.push(u(T.pop(), S.value));
538
+ continue;
539
+ }
540
+ S.nodes && i(S, s);
541
+ }
542
+ return T;
543
+ };
544
+ return l.flatten(i(t));
545
+ }, Tt;
546
+ }
547
+ var Ot, yr;
548
+ function Jn() {
549
+ return yr || (yr = 1, Ot = {
550
+ MAX_LENGTH: 1e4,
551
+ // Digits
552
+ CHAR_0: "0",
553
+ /* 0 */
554
+ CHAR_9: "9",
555
+ /* 9 */
556
+ // Alphabet chars.
557
+ CHAR_UPPERCASE_A: "A",
558
+ /* A */
559
+ CHAR_LOWERCASE_A: "a",
560
+ /* a */
561
+ CHAR_UPPERCASE_Z: "Z",
562
+ /* Z */
563
+ CHAR_LOWERCASE_Z: "z",
564
+ /* z */
565
+ CHAR_LEFT_PARENTHESES: "(",
566
+ /* ( */
567
+ CHAR_RIGHT_PARENTHESES: ")",
568
+ /* ) */
569
+ CHAR_ASTERISK: "*",
570
+ /* * */
571
+ // Non-alphabetic chars.
572
+ CHAR_AMPERSAND: "&",
573
+ /* & */
574
+ CHAR_AT: "@",
575
+ /* @ */
576
+ CHAR_BACKSLASH: "\\",
577
+ /* \ */
578
+ CHAR_BACKTICK: "`",
579
+ /* ` */
580
+ CHAR_CARRIAGE_RETURN: "\r",
581
+ /* \r */
582
+ CHAR_CIRCUMFLEX_ACCENT: "^",
583
+ /* ^ */
584
+ CHAR_COLON: ":",
585
+ /* : */
586
+ CHAR_COMMA: ",",
587
+ /* , */
588
+ CHAR_DOLLAR: "$",
589
+ /* . */
590
+ CHAR_DOT: ".",
591
+ /* . */
592
+ CHAR_DOUBLE_QUOTE: '"',
593
+ /* " */
594
+ CHAR_EQUAL: "=",
595
+ /* = */
596
+ CHAR_EXCLAMATION_MARK: "!",
597
+ /* ! */
598
+ CHAR_FORM_FEED: "\f",
599
+ /* \f */
600
+ CHAR_FORWARD_SLASH: "/",
601
+ /* / */
602
+ CHAR_HASH: "#",
603
+ /* # */
604
+ CHAR_HYPHEN_MINUS: "-",
605
+ /* - */
606
+ CHAR_LEFT_ANGLE_BRACKET: "<",
607
+ /* < */
608
+ CHAR_LEFT_CURLY_BRACE: "{",
609
+ /* { */
610
+ CHAR_LEFT_SQUARE_BRACKET: "[",
611
+ /* [ */
612
+ CHAR_LINE_FEED: `
613
+ `,
614
+ /* \n */
615
+ CHAR_NO_BREAK_SPACE: " ",
616
+ /* \u00A0 */
617
+ CHAR_PERCENT: "%",
618
+ /* % */
619
+ CHAR_PLUS: "+",
620
+ /* + */
621
+ CHAR_QUESTION_MARK: "?",
622
+ /* ? */
623
+ CHAR_RIGHT_ANGLE_BRACKET: ">",
624
+ /* > */
625
+ CHAR_RIGHT_CURLY_BRACE: "}",
626
+ /* } */
627
+ CHAR_RIGHT_SQUARE_BRACKET: "]",
628
+ /* ] */
629
+ CHAR_SEMICOLON: ";",
630
+ /* ; */
631
+ CHAR_SINGLE_QUOTE: "'",
632
+ /* ' */
633
+ CHAR_SPACE: " ",
634
+ /* */
635
+ CHAR_TAB: " ",
636
+ /* \t */
637
+ CHAR_UNDERSCORE: "_",
638
+ /* _ */
639
+ CHAR_VERTICAL_LINE: "|",
640
+ /* | */
641
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
642
+ /* \uFEFF */
643
+ }), Ot;
644
+ }
645
+ var wt, Sr;
646
+ function es() {
647
+ if (Sr) return wt;
648
+ Sr = 1;
649
+ const o = Yt(), {
650
+ MAX_LENGTH: a,
651
+ CHAR_BACKSLASH: l,
652
+ /* \ */
653
+ CHAR_BACKTICK: u,
654
+ /* ` */
655
+ CHAR_COMMA: r,
656
+ /* , */
657
+ CHAR_DOT: t,
658
+ /* . */
659
+ CHAR_LEFT_PARENTHESES: n,
660
+ /* ( */
661
+ CHAR_RIGHT_PARENTHESES: e,
662
+ /* ) */
663
+ CHAR_LEFT_CURLY_BRACE: i,
664
+ /* { */
665
+ CHAR_RIGHT_CURLY_BRACE: s,
666
+ /* } */
667
+ CHAR_LEFT_SQUARE_BRACKET: p,
668
+ /* [ */
669
+ CHAR_RIGHT_SQUARE_BRACKET: h,
670
+ /* ] */
671
+ CHAR_DOUBLE_QUOTE: d,
672
+ /* " */
673
+ CHAR_SINGLE_QUOTE: y,
674
+ /* ' */
675
+ CHAR_NO_BREAK_SPACE: T,
676
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: C
677
+ } = Jn();
678
+ return wt = (S, _ = {}) => {
679
+ if (typeof S != "string")
680
+ throw new TypeError("Expected a string");
681
+ const c = _ || {}, f = typeof c.maxLength == "number" ? Math.min(a, c.maxLength) : a;
682
+ if (S.length > f)
683
+ throw new SyntaxError(`Input length (${S.length}), exceeds max characters (${f})`);
684
+ const g = { type: "root", input: S, nodes: [] }, R = [g];
685
+ let v = g, P = g, O = 0;
686
+ const D = S.length;
687
+ let k = 0, M = 0, x;
688
+ const U = () => S[k++], N = (q) => {
689
+ if (q.type === "text" && P.type === "dot" && (P.type = "text"), P && P.type === "text" && q.type === "text") {
690
+ P.value += q.value;
691
+ return;
692
+ }
693
+ return v.nodes.push(q), q.parent = v, q.prev = P, P = q, q;
694
+ };
695
+ for (N({ type: "bos" }); k < D; )
696
+ if (v = R[R.length - 1], x = U(), !(x === C || x === T)) {
697
+ if (x === l) {
698
+ N({ type: "text", value: (_.keepEscaping ? x : "") + U() });
699
+ continue;
700
+ }
701
+ if (x === h) {
702
+ N({ type: "text", value: "\\" + x });
703
+ continue;
704
+ }
705
+ if (x === p) {
706
+ O++;
707
+ let q;
708
+ for (; k < D && (q = U()); ) {
709
+ if (x += q, q === p) {
710
+ O++;
711
+ continue;
712
+ }
713
+ if (q === l) {
714
+ x += U();
715
+ continue;
716
+ }
717
+ if (q === h && (O--, O === 0))
718
+ break;
719
+ }
720
+ N({ type: "text", value: x });
721
+ continue;
722
+ }
723
+ if (x === n) {
724
+ v = N({ type: "paren", nodes: [] }), R.push(v), N({ type: "text", value: x });
725
+ continue;
726
+ }
727
+ if (x === e) {
728
+ if (v.type !== "paren") {
729
+ N({ type: "text", value: x });
730
+ continue;
731
+ }
732
+ v = R.pop(), N({ type: "text", value: x }), v = R[R.length - 1];
733
+ continue;
734
+ }
735
+ if (x === d || x === y || x === u) {
736
+ const q = x;
737
+ let F;
738
+ for (_.keepQuotes !== !0 && (x = ""); k < D && (F = U()); ) {
739
+ if (F === l) {
740
+ x += F + U();
741
+ continue;
742
+ }
743
+ if (F === q) {
744
+ _.keepQuotes === !0 && (x += F);
745
+ break;
746
+ }
747
+ x += F;
748
+ }
749
+ N({ type: "text", value: x });
750
+ continue;
751
+ }
752
+ if (x === i) {
753
+ M++;
754
+ const F = {
755
+ type: "brace",
756
+ open: !0,
757
+ close: !1,
758
+ dollar: P.value && P.value.slice(-1) === "$" || v.dollar === !0,
759
+ depth: M,
760
+ commas: 0,
761
+ ranges: 0,
762
+ nodes: []
763
+ };
764
+ v = N(F), R.push(v), N({ type: "open", value: x });
765
+ continue;
766
+ }
767
+ if (x === s) {
768
+ if (v.type !== "brace") {
769
+ N({ type: "text", value: x });
770
+ continue;
771
+ }
772
+ const q = "close";
773
+ v = R.pop(), v.close = !0, N({ type: q, value: x }), M--, v = R[R.length - 1];
774
+ continue;
775
+ }
776
+ if (x === r && M > 0) {
777
+ if (v.ranges > 0) {
778
+ v.ranges = 0;
779
+ const q = v.nodes.shift();
780
+ v.nodes = [q, { type: "text", value: o(v) }];
781
+ }
782
+ N({ type: "comma", value: x }), v.commas++;
783
+ continue;
784
+ }
785
+ if (x === t && M > 0 && v.commas === 0) {
786
+ const q = v.nodes;
787
+ if (M === 0 || q.length === 0) {
788
+ N({ type: "text", value: x });
789
+ continue;
790
+ }
791
+ if (P.type === "dot") {
792
+ if (v.range = [], P.value += x, P.type = "range", v.nodes.length !== 3 && v.nodes.length !== 5) {
793
+ v.invalid = !0, v.ranges = 0, P.type = "text";
794
+ continue;
795
+ }
796
+ v.ranges++, v.args = [];
797
+ continue;
798
+ }
799
+ if (P.type === "range") {
800
+ q.pop();
801
+ const F = q[q.length - 1];
802
+ F.value += P.value + x, P = F, v.ranges--;
803
+ continue;
804
+ }
805
+ N({ type: "dot", value: x });
806
+ continue;
807
+ }
808
+ N({ type: "text", value: x });
809
+ }
810
+ do
811
+ if (v = R.pop(), v.type !== "root") {
812
+ v.nodes.forEach((z) => {
813
+ z.nodes || (z.type === "open" && (z.isOpen = !0), z.type === "close" && (z.isClose = !0), z.nodes || (z.type = "text"), z.invalid = !0);
814
+ });
815
+ const q = R[R.length - 1], F = q.nodes.indexOf(v);
816
+ q.nodes.splice(F, 1, ...v.nodes);
817
+ }
818
+ while (R.length > 0);
819
+ return N({ type: "eos" }), g;
820
+ }, wt;
821
+ }
822
+ var $t, mr;
823
+ function ts() {
824
+ if (mr) return $t;
825
+ mr = 1;
826
+ const o = Yt(), a = Zn(), l = zn(), u = es(), r = (t, n = {}) => {
827
+ let e = [];
828
+ if (Array.isArray(t))
829
+ for (const i of t) {
830
+ const s = r.create(i, n);
831
+ Array.isArray(s) ? e.push(...s) : e.push(s);
832
+ }
833
+ else
834
+ e = [].concat(r.create(t, n));
835
+ return n && n.expand === !0 && n.nodupes === !0 && (e = [...new Set(e)]), e;
836
+ };
837
+ return r.parse = (t, n = {}) => u(t, n), r.stringify = (t, n = {}) => o(typeof t == "string" ? r.parse(t, n) : t, n), r.compile = (t, n = {}) => (typeof t == "string" && (t = r.parse(t, n)), a(t, n)), r.expand = (t, n = {}) => {
838
+ typeof t == "string" && (t = r.parse(t, n));
839
+ let e = l(t, n);
840
+ return n.noempty === !0 && (e = e.filter(Boolean)), n.nodupes === !0 && (e = [...new Set(e)]), e;
841
+ }, r.create = (t, n = {}) => t === "" || t.length < 3 ? [t] : n.expand !== !0 ? r.compile(t, n) : r.expand(t, n), $t = r, $t;
842
+ }
843
+ var Lt = {}, kt, vr;
844
+ function _t() {
845
+ if (vr) return kt;
846
+ vr = 1;
847
+ const o = Se, a = "\\\\/", l = `[^${a}]`, u = 0, r = "\\.", t = "\\+", n = "\\?", e = "\\/", i = "(?=.)", s = "[^/]", p = `(?:${e}|$)`, h = `(?:^|${e})`, d = `${r}{1,2}${p}`, y = `(?!${r})`, T = `(?!${h}${d})`, C = `(?!${r}{0,1}${p})`, m = `(?!${d})`, S = `[^.${e}]`, _ = `${s}*?`, c = {
848
+ DOT_LITERAL: r,
849
+ PLUS_LITERAL: t,
850
+ QMARK_LITERAL: n,
851
+ SLASH_LITERAL: e,
852
+ ONE_CHAR: i,
853
+ QMARK: s,
854
+ END_ANCHOR: p,
855
+ DOTS_SLASH: d,
856
+ NO_DOT: y,
857
+ NO_DOTS: T,
858
+ NO_DOT_SLASH: C,
859
+ NO_DOTS_SLASH: m,
860
+ QMARK_NO_DOT: S,
861
+ STAR: _,
862
+ START_ANCHOR: h
863
+ }, f = {
864
+ ...c,
865
+ SLASH_LITERAL: `[${a}]`,
866
+ QMARK: l,
867
+ STAR: `${l}*?`,
868
+ DOTS_SLASH: `${r}{1,2}(?:[${a}]|$)`,
869
+ NO_DOT: `(?!${r})`,
870
+ NO_DOTS: `(?!(?:^|[${a}])${r}{1,2}(?:[${a}]|$))`,
871
+ NO_DOT_SLASH: `(?!${r}{0,1}(?:[${a}]|$))`,
872
+ NO_DOTS_SLASH: `(?!${r}{1,2}(?:[${a}]|$))`,
873
+ QMARK_NO_DOT: `[^.${a}]`,
874
+ START_ANCHOR: `(?:^|[${a}])`,
875
+ END_ANCHOR: `(?:[${a}]|$)`
876
+ }, g = {
877
+ __proto__: null,
878
+ alnum: "a-zA-Z0-9",
879
+ alpha: "a-zA-Z",
880
+ ascii: "\\x00-\\x7F",
881
+ blank: " \\t",
882
+ cntrl: "\\x00-\\x1F\\x7F",
883
+ digit: "0-9",
884
+ graph: "\\x21-\\x7E",
885
+ lower: "a-z",
886
+ print: "\\x20-\\x7E ",
887
+ punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
888
+ space: " \\t\\r\\n\\v\\f",
889
+ upper: "A-Z",
890
+ word: "A-Za-z0-9_",
891
+ xdigit: "A-Fa-f0-9"
892
+ };
893
+ return kt = {
894
+ DEFAULT_MAX_EXTGLOB_RECURSION: u,
895
+ MAX_LENGTH: 1024 * 64,
896
+ POSIX_REGEX_SOURCE: g,
897
+ // regular expressions
898
+ REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
899
+ REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
900
+ REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
901
+ REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
902
+ REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
903
+ REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
904
+ // Replace globs with equivalent patterns to reduce parsing time.
905
+ REPLACEMENTS: {
906
+ __proto__: null,
907
+ "***": "*",
908
+ "**/**": "**",
909
+ "**/**/**": "**"
910
+ },
911
+ // Digits
912
+ CHAR_0: 48,
913
+ /* 0 */
914
+ CHAR_9: 57,
915
+ /* 9 */
916
+ // Alphabet chars.
917
+ CHAR_UPPERCASE_A: 65,
918
+ /* A */
919
+ CHAR_LOWERCASE_A: 97,
920
+ /* a */
921
+ CHAR_UPPERCASE_Z: 90,
922
+ /* Z */
923
+ CHAR_LOWERCASE_Z: 122,
924
+ /* z */
925
+ CHAR_LEFT_PARENTHESES: 40,
926
+ /* ( */
927
+ CHAR_RIGHT_PARENTHESES: 41,
928
+ /* ) */
929
+ CHAR_ASTERISK: 42,
930
+ /* * */
931
+ // Non-alphabetic chars.
932
+ CHAR_AMPERSAND: 38,
933
+ /* & */
934
+ CHAR_AT: 64,
935
+ /* @ */
936
+ CHAR_BACKWARD_SLASH: 92,
937
+ /* \ */
938
+ CHAR_CARRIAGE_RETURN: 13,
939
+ /* \r */
940
+ CHAR_CIRCUMFLEX_ACCENT: 94,
941
+ /* ^ */
942
+ CHAR_COLON: 58,
943
+ /* : */
944
+ CHAR_COMMA: 44,
945
+ /* , */
946
+ CHAR_DOT: 46,
947
+ /* . */
948
+ CHAR_DOUBLE_QUOTE: 34,
949
+ /* " */
950
+ CHAR_EQUAL: 61,
951
+ /* = */
952
+ CHAR_EXCLAMATION_MARK: 33,
953
+ /* ! */
954
+ CHAR_FORM_FEED: 12,
955
+ /* \f */
956
+ CHAR_FORWARD_SLASH: 47,
957
+ /* / */
958
+ CHAR_GRAVE_ACCENT: 96,
959
+ /* ` */
960
+ CHAR_HASH: 35,
961
+ /* # */
962
+ CHAR_HYPHEN_MINUS: 45,
963
+ /* - */
964
+ CHAR_LEFT_ANGLE_BRACKET: 60,
965
+ /* < */
966
+ CHAR_LEFT_CURLY_BRACE: 123,
967
+ /* { */
968
+ CHAR_LEFT_SQUARE_BRACKET: 91,
969
+ /* [ */
970
+ CHAR_LINE_FEED: 10,
971
+ /* \n */
972
+ CHAR_NO_BREAK_SPACE: 160,
973
+ /* \u00A0 */
974
+ CHAR_PERCENT: 37,
975
+ /* % */
976
+ CHAR_PLUS: 43,
977
+ /* + */
978
+ CHAR_QUESTION_MARK: 63,
979
+ /* ? */
980
+ CHAR_RIGHT_ANGLE_BRACKET: 62,
981
+ /* > */
982
+ CHAR_RIGHT_CURLY_BRACE: 125,
983
+ /* } */
984
+ CHAR_RIGHT_SQUARE_BRACKET: 93,
985
+ /* ] */
986
+ CHAR_SEMICOLON: 59,
987
+ /* ; */
988
+ CHAR_SINGLE_QUOTE: 39,
989
+ /* ' */
990
+ CHAR_SPACE: 32,
991
+ /* */
992
+ CHAR_TAB: 9,
993
+ /* \t */
994
+ CHAR_UNDERSCORE: 95,
995
+ /* _ */
996
+ CHAR_VERTICAL_LINE: 124,
997
+ /* | */
998
+ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
999
+ /* \uFEFF */
1000
+ SEP: o.sep,
1001
+ /**
1002
+ * Create EXTGLOB_CHARS
1003
+ */
1004
+ extglobChars(R) {
1005
+ return {
1006
+ "!": { type: "negate", open: "(?:(?!(?:", close: `))${R.STAR})` },
1007
+ "?": { type: "qmark", open: "(?:", close: ")?" },
1008
+ "+": { type: "plus", open: "(?:", close: ")+" },
1009
+ "*": { type: "star", open: "(?:", close: ")*" },
1010
+ "@": { type: "at", open: "(?:", close: ")" }
1011
+ };
1012
+ },
1013
+ /**
1014
+ * Create GLOB_CHARS
1015
+ */
1016
+ globChars(R) {
1017
+ return R === !0 ? f : c;
1018
+ }
1019
+ }, kt;
1020
+ }
1021
+ var Rr;
1022
+ function gt() {
1023
+ return Rr || (Rr = 1, (function(o) {
1024
+ const a = Se, l = process.platform === "win32", {
1025
+ REGEX_BACKSLASH: u,
1026
+ REGEX_REMOVE_BACKSLASH: r,
1027
+ REGEX_SPECIAL_CHARS: t,
1028
+ REGEX_SPECIAL_CHARS_GLOBAL: n
1029
+ } = _t();
1030
+ o.isObject = (e) => e !== null && typeof e == "object" && !Array.isArray(e), o.hasRegexChars = (e) => t.test(e), o.isRegexChar = (e) => e.length === 1 && o.hasRegexChars(e), o.escapeRegex = (e) => e.replace(n, "\\$1"), o.toPosixSlashes = (e) => e.replace(u, "/"), o.removeBackslashes = (e) => e.replace(r, (i) => i === "\\" ? "" : i), o.supportsLookbehinds = () => {
1031
+ const e = process.version.slice(1).split(".").map(Number);
1032
+ return e.length === 3 && e[0] >= 9 || e[0] === 8 && e[1] >= 10;
1033
+ }, o.isWindows = (e) => e && typeof e.windows == "boolean" ? e.windows : l === !0 || a.sep === "\\", o.escapeLast = (e, i, s) => {
1034
+ const p = e.lastIndexOf(i, s);
1035
+ return p === -1 ? e : e[p - 1] === "\\" ? o.escapeLast(e, i, p - 1) : `${e.slice(0, p)}\\${e.slice(p)}`;
1036
+ }, o.removePrefix = (e, i = {}) => {
1037
+ let s = e;
1038
+ return s.startsWith("./") && (s = s.slice(2), i.prefix = "./"), s;
1039
+ }, o.wrapOutput = (e, i = {}, s = {}) => {
1040
+ const p = s.contains ? "" : "^", h = s.contains ? "" : "$";
1041
+ let d = `${p}(?:${e})${h}`;
1042
+ return i.negated === !0 && (d = `(?:^(?!${d}).*$)`), d;
1043
+ };
1044
+ })(Lt)), Lt;
1045
+ }
1046
+ var Mt, Er;
1047
+ function rs() {
1048
+ if (Er) return Mt;
1049
+ Er = 1;
1050
+ const o = gt(), {
1051
+ CHAR_ASTERISK: a,
1052
+ /* * */
1053
+ CHAR_AT: l,
1054
+ /* @ */
1055
+ CHAR_BACKWARD_SLASH: u,
1056
+ /* \ */
1057
+ CHAR_COMMA: r,
1058
+ /* , */
1059
+ CHAR_DOT: t,
1060
+ /* . */
1061
+ CHAR_EXCLAMATION_MARK: n,
1062
+ /* ! */
1063
+ CHAR_FORWARD_SLASH: e,
1064
+ /* / */
1065
+ CHAR_LEFT_CURLY_BRACE: i,
1066
+ /* { */
1067
+ CHAR_LEFT_PARENTHESES: s,
1068
+ /* ( */
1069
+ CHAR_LEFT_SQUARE_BRACKET: p,
1070
+ /* [ */
1071
+ CHAR_PLUS: h,
1072
+ /* + */
1073
+ CHAR_QUESTION_MARK: d,
1074
+ /* ? */
1075
+ CHAR_RIGHT_CURLY_BRACE: y,
1076
+ /* } */
1077
+ CHAR_RIGHT_PARENTHESES: T,
1078
+ /* ) */
1079
+ CHAR_RIGHT_SQUARE_BRACKET: C
1080
+ /* ] */
1081
+ } = _t(), m = (c) => c === e || c === u, S = (c) => {
1082
+ c.isPrefix !== !0 && (c.depth = c.isGlobstar ? 1 / 0 : 1);
1083
+ };
1084
+ return Mt = (c, f) => {
1085
+ const g = f || {}, R = c.length - 1, v = g.parts === !0 || g.scanToEnd === !0, P = [], O = [], D = [];
1086
+ let k = c, M = -1, x = 0, U = 0, N = !1, q = !1, F = !1, z = !1, ce = !1, $ = !1, H = !1, V = !1, oe = !1, ue = !1, ae = 0, fe, B, W = { value: "", depth: 0, isGlob: !1 };
1087
+ const A = () => M >= R, le = () => k.charCodeAt(M + 1), te = () => (fe = B, k.charCodeAt(++M));
1088
+ for (; M < R; ) {
1089
+ B = te();
1090
+ let K;
1091
+ if (B === u) {
1092
+ H = W.backslashes = !0, B = te(), B === i && ($ = !0);
1093
+ continue;
1094
+ }
1095
+ if ($ === !0 || B === i) {
1096
+ for (ae++; A() !== !0 && (B = te()); ) {
1097
+ if (B === u) {
1098
+ H = W.backslashes = !0, te();
1099
+ continue;
1100
+ }
1101
+ if (B === i) {
1102
+ ae++;
1103
+ continue;
1104
+ }
1105
+ if ($ !== !0 && B === t && (B = te()) === t) {
1106
+ if (N = W.isBrace = !0, F = W.isGlob = !0, ue = !0, v === !0)
1107
+ continue;
1108
+ break;
1109
+ }
1110
+ if ($ !== !0 && B === r) {
1111
+ if (N = W.isBrace = !0, F = W.isGlob = !0, ue = !0, v === !0)
1112
+ continue;
1113
+ break;
1114
+ }
1115
+ if (B === y && (ae--, ae === 0)) {
1116
+ $ = !1, N = W.isBrace = !0, ue = !0;
1117
+ break;
1118
+ }
1119
+ }
1120
+ if (v === !0)
1121
+ continue;
1122
+ break;
1123
+ }
1124
+ if (B === e) {
1125
+ if (P.push(M), O.push(W), W = { value: "", depth: 0, isGlob: !1 }, ue === !0) continue;
1126
+ if (fe === t && M === x + 1) {
1127
+ x += 2;
1128
+ continue;
1129
+ }
1130
+ U = M + 1;
1131
+ continue;
1132
+ }
1133
+ if (g.noext !== !0 && (B === h || B === l || B === a || B === d || B === n) === !0 && le() === s) {
1134
+ if (F = W.isGlob = !0, z = W.isExtglob = !0, ue = !0, B === n && M === x && (oe = !0), v === !0) {
1135
+ for (; A() !== !0 && (B = te()); ) {
1136
+ if (B === u) {
1137
+ H = W.backslashes = !0, B = te();
1138
+ continue;
1139
+ }
1140
+ if (B === T) {
1141
+ F = W.isGlob = !0, ue = !0;
1142
+ break;
1143
+ }
1144
+ }
1145
+ continue;
1146
+ }
1147
+ break;
1148
+ }
1149
+ if (B === a) {
1150
+ if (fe === a && (ce = W.isGlobstar = !0), F = W.isGlob = !0, ue = !0, v === !0)
1151
+ continue;
1152
+ break;
1153
+ }
1154
+ if (B === d) {
1155
+ if (F = W.isGlob = !0, ue = !0, v === !0)
1156
+ continue;
1157
+ break;
1158
+ }
1159
+ if (B === p) {
1160
+ for (; A() !== !0 && (K = te()); ) {
1161
+ if (K === u) {
1162
+ H = W.backslashes = !0, te();
1163
+ continue;
1164
+ }
1165
+ if (K === C) {
1166
+ q = W.isBracket = !0, F = W.isGlob = !0, ue = !0;
1167
+ break;
1168
+ }
1169
+ }
1170
+ if (v === !0)
1171
+ continue;
1172
+ break;
1173
+ }
1174
+ if (g.nonegate !== !0 && B === n && M === x) {
1175
+ V = W.negated = !0, x++;
1176
+ continue;
1177
+ }
1178
+ if (g.noparen !== !0 && B === s) {
1179
+ if (F = W.isGlob = !0, v === !0) {
1180
+ for (; A() !== !0 && (B = te()); ) {
1181
+ if (B === s) {
1182
+ H = W.backslashes = !0, B = te();
1183
+ continue;
1184
+ }
1185
+ if (B === T) {
1186
+ ue = !0;
1187
+ break;
1188
+ }
1189
+ }
1190
+ continue;
1191
+ }
1192
+ break;
1193
+ }
1194
+ if (F === !0) {
1195
+ if (ue = !0, v === !0)
1196
+ continue;
1197
+ break;
1198
+ }
1199
+ }
1200
+ g.noext === !0 && (z = !1, F = !1);
1201
+ let J = k, b = "", E = "";
1202
+ x > 0 && (b = k.slice(0, x), k = k.slice(x), U -= x), J && F === !0 && U > 0 ? (J = k.slice(0, U), E = k.slice(U)) : F === !0 ? (J = "", E = k) : J = k, J && J !== "" && J !== "/" && J !== k && m(J.charCodeAt(J.length - 1)) && (J = J.slice(0, -1)), g.unescape === !0 && (E && (E = o.removeBackslashes(E)), J && H === !0 && (J = o.removeBackslashes(J)));
1203
+ const he = {
1204
+ prefix: b,
1205
+ input: c,
1206
+ start: x,
1207
+ base: J,
1208
+ glob: E,
1209
+ isBrace: N,
1210
+ isBracket: q,
1211
+ isGlob: F,
1212
+ isExtglob: z,
1213
+ isGlobstar: ce,
1214
+ negated: V,
1215
+ negatedExtglob: oe
1216
+ };
1217
+ if (g.tokens === !0 && (he.maxDepth = 0, m(B) || O.push(W), he.tokens = O), g.parts === !0 || g.tokens === !0) {
1218
+ let K;
1219
+ for (let Z = 0; Z < P.length; Z++) {
1220
+ const me = K ? K + 1 : x, pe = P[Z], be = c.slice(me, pe);
1221
+ g.tokens && (Z === 0 && x !== 0 ? (O[Z].isPrefix = !0, O[Z].value = b) : O[Z].value = be, S(O[Z]), he.maxDepth += O[Z].depth), (Z !== 0 || be !== "") && D.push(be), K = pe;
1222
+ }
1223
+ if (K && K + 1 < c.length) {
1224
+ const Z = c.slice(K + 1);
1225
+ D.push(Z), g.tokens && (O[O.length - 1].value = Z, S(O[O.length - 1]), he.maxDepth += O[O.length - 1].depth);
1226
+ }
1227
+ he.slashes = P, he.parts = D;
1228
+ }
1229
+ return he;
1230
+ }, Mt;
1231
+ }
1232
+ var Ht, Ar;
1233
+ function ns() {
1234
+ if (Ar) return Ht;
1235
+ Ar = 1;
1236
+ const o = _t(), a = gt(), {
1237
+ MAX_LENGTH: l,
1238
+ POSIX_REGEX_SOURCE: u,
1239
+ REGEX_NON_SPECIAL_CHARS: r,
1240
+ REGEX_SPECIAL_CHARS_BACKREF: t,
1241
+ REPLACEMENTS: n
1242
+ } = o, e = (_, c) => {
1243
+ if (typeof c.expandRange == "function")
1244
+ return c.expandRange(..._, c);
1245
+ _.sort();
1246
+ const f = `[${_.join("-")}]`;
1247
+ try {
1248
+ new RegExp(f);
1249
+ } catch {
1250
+ return _.map((R) => a.escapeRegex(R)).join("..");
1251
+ }
1252
+ return f;
1253
+ }, i = (_, c) => `Missing ${_}: "${c}" - use "\\\\${c}" to match literal characters`, s = (_) => {
1254
+ const c = [];
1255
+ let f = 0, g = 0, R = 0, v = "", P = !1;
1256
+ for (const O of _) {
1257
+ if (P === !0) {
1258
+ v += O, P = !1;
1259
+ continue;
1260
+ }
1261
+ if (O === "\\") {
1262
+ v += O, P = !0;
1263
+ continue;
1264
+ }
1265
+ if (O === '"') {
1266
+ R = R === 1 ? 0 : 1, v += O;
1267
+ continue;
1268
+ }
1269
+ if (R === 0) {
1270
+ if (O === "[")
1271
+ f++;
1272
+ else if (O === "]" && f > 0)
1273
+ f--;
1274
+ else if (f === 0) {
1275
+ if (O === "(")
1276
+ g++;
1277
+ else if (O === ")" && g > 0)
1278
+ g--;
1279
+ else if (O === "|" && g === 0) {
1280
+ c.push(v), v = "";
1281
+ continue;
1282
+ }
1283
+ }
1284
+ }
1285
+ v += O;
1286
+ }
1287
+ return c.push(v), c;
1288
+ }, p = (_) => {
1289
+ let c = !1;
1290
+ for (const f of _) {
1291
+ if (c === !0) {
1292
+ c = !1;
1293
+ continue;
1294
+ }
1295
+ if (f === "\\") {
1296
+ c = !0;
1297
+ continue;
1298
+ }
1299
+ if (/[?*+@!()[\]{}]/.test(f))
1300
+ return !1;
1301
+ }
1302
+ return !0;
1303
+ }, h = (_) => {
1304
+ let c = _.trim(), f = !0;
1305
+ for (; f === !0; )
1306
+ f = !1, /^@\([^\\()[\]{}|]+\)$/.test(c) && (c = c.slice(2, -1), f = !0);
1307
+ if (p(c))
1308
+ return c.replace(/\\(.)/g, "$1");
1309
+ }, d = (_) => {
1310
+ const c = _.map(h).filter(Boolean);
1311
+ for (let f = 0; f < c.length; f++)
1312
+ for (let g = f + 1; g < c.length; g++) {
1313
+ const R = c[f], v = c[g], P = R[0];
1314
+ if (!(!P || R !== P.repeat(R.length) || v !== P.repeat(v.length)) && (R === v || R.startsWith(v) || v.startsWith(R)))
1315
+ return !0;
1316
+ }
1317
+ return !1;
1318
+ }, y = (_, c = !0) => {
1319
+ if (_[0] !== "+" && _[0] !== "*" || _[1] !== "(")
1320
+ return;
1321
+ let f = 0, g = 0, R = 0, v = !1;
1322
+ for (let P = 1; P < _.length; P++) {
1323
+ const O = _[P];
1324
+ if (v === !0) {
1325
+ v = !1;
1326
+ continue;
1327
+ }
1328
+ if (O === "\\") {
1329
+ v = !0;
1330
+ continue;
1331
+ }
1332
+ if (O === '"') {
1333
+ R = R === 1 ? 0 : 1;
1334
+ continue;
1335
+ }
1336
+ if (R !== 1) {
1337
+ if (O === "[") {
1338
+ f++;
1339
+ continue;
1340
+ }
1341
+ if (O === "]" && f > 0) {
1342
+ f--;
1343
+ continue;
1344
+ }
1345
+ if (!(f > 0)) {
1346
+ if (O === "(") {
1347
+ g++;
1348
+ continue;
1349
+ }
1350
+ if (O === ")" && (g--, g === 0))
1351
+ return c === !0 && P !== _.length - 1 ? void 0 : {
1352
+ type: _[0],
1353
+ body: _.slice(2, P),
1354
+ end: P
1355
+ };
1356
+ }
1357
+ }
1358
+ }
1359
+ }, T = (_) => {
1360
+ let c = 0;
1361
+ const f = [];
1362
+ for (; c < _.length; ) {
1363
+ const R = y(_.slice(c), !1);
1364
+ if (!R || R.type !== "*")
1365
+ return;
1366
+ const v = s(R.body).map((O) => O.trim());
1367
+ if (v.length !== 1)
1368
+ return;
1369
+ const P = h(v[0]);
1370
+ if (!P || P.length !== 1)
1371
+ return;
1372
+ f.push(P), c += R.end + 1;
1373
+ }
1374
+ return f.length < 1 ? void 0 : `${f.length === 1 ? a.escapeRegex(f[0]) : `[${f.map((R) => a.escapeRegex(R)).join("")}]`}*`;
1375
+ }, C = (_) => {
1376
+ let c = 0, f = _.trim(), g = y(f);
1377
+ for (; g; )
1378
+ c++, f = g.body.trim(), g = y(f);
1379
+ return c;
1380
+ }, m = (_, c) => {
1381
+ if (c.maxExtglobRecursion === !1)
1382
+ return { risky: !1 };
1383
+ const f = typeof c.maxExtglobRecursion == "number" ? c.maxExtglobRecursion : o.DEFAULT_MAX_EXTGLOB_RECURSION, g = s(_).map((R) => R.trim());
1384
+ if (g.length > 1 && (g.some((R) => R === "") || g.some((R) => /^[*?]+$/.test(R)) || d(g)))
1385
+ return { risky: !0 };
1386
+ for (const R of g) {
1387
+ const v = T(R);
1388
+ if (v)
1389
+ return { risky: !0, safeOutput: v };
1390
+ if (C(R) > f)
1391
+ return { risky: !0 };
1392
+ }
1393
+ return { risky: !1 };
1394
+ }, S = (_, c) => {
1395
+ if (typeof _ != "string")
1396
+ throw new TypeError("Expected a string");
1397
+ _ = n[_] || _;
1398
+ const f = { ...c }, g = typeof f.maxLength == "number" ? Math.min(l, f.maxLength) : l;
1399
+ let R = _.length;
1400
+ if (R > g)
1401
+ throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${g}`);
1402
+ const v = { type: "bos", value: "", output: f.prepend || "" }, P = [v], O = f.capture ? "" : "?:", D = a.isWindows(c), k = o.globChars(D), M = o.extglobChars(k), {
1403
+ DOT_LITERAL: x,
1404
+ PLUS_LITERAL: U,
1405
+ SLASH_LITERAL: N,
1406
+ ONE_CHAR: q,
1407
+ DOTS_SLASH: F,
1408
+ NO_DOT: z,
1409
+ NO_DOT_SLASH: ce,
1410
+ NO_DOTS_SLASH: $,
1411
+ QMARK: H,
1412
+ QMARK_NO_DOT: V,
1413
+ STAR: oe,
1414
+ START_ANCHOR: ue
1415
+ } = k, ae = (L) => `(${O}(?:(?!${ue}${L.dot ? F : x}).)*?)`, fe = f.dot ? "" : z, B = f.dot ? H : V;
1416
+ let W = f.bash === !0 ? ae(f) : oe;
1417
+ f.capture && (W = `(${W})`), typeof f.noext == "boolean" && (f.noextglob = f.noext);
1418
+ const A = {
1419
+ input: _,
1420
+ index: -1,
1421
+ start: 0,
1422
+ dot: f.dot === !0,
1423
+ consumed: "",
1424
+ output: "",
1425
+ prefix: "",
1426
+ backtrack: !1,
1427
+ negated: !1,
1428
+ brackets: 0,
1429
+ braces: 0,
1430
+ parens: 0,
1431
+ quotes: 0,
1432
+ globstar: !1,
1433
+ tokens: P
1434
+ };
1435
+ _ = a.removePrefix(_, A), R = _.length;
1436
+ const le = [], te = [], J = [];
1437
+ let b = v, E;
1438
+ const he = () => A.index === R - 1, K = A.peek = (L = 1) => _[A.index + L], Z = A.advance = () => _[++A.index] || "", me = () => _.slice(A.index + 1), pe = (L = "", Y = 0) => {
1439
+ A.consumed += L, A.index += Y;
1440
+ }, be = (L) => {
1441
+ A.output += L.output != null ? L.output : L.value, pe(L.value);
1442
+ }, kn = () => {
1443
+ let L = 1;
1444
+ for (; K() === "!" && (K(2) !== "(" || K(3) === "?"); )
1445
+ Z(), A.start++, L++;
1446
+ return L % 2 === 0 ? !1 : (A.negated = !0, A.start++, !0);
1447
+ }, je = (L) => {
1448
+ A[L]++, J.push(L);
1449
+ }, Pe = (L) => {
1450
+ A[L]--, J.pop();
1451
+ }, G = (L) => {
1452
+ if (b.type === "globstar") {
1453
+ const Y = A.braces > 0 && (L.type === "comma" || L.type === "brace"), w = L.extglob === !0 || le.length && (L.type === "pipe" || L.type === "paren");
1454
+ L.type !== "slash" && L.type !== "paren" && !Y && !w && (A.output = A.output.slice(0, -b.output.length), b.type = "star", b.value = "*", b.output = W, A.output += b.output);
1455
+ }
1456
+ if (le.length && L.type !== "paren" && (le[le.length - 1].inner += L.value), (L.value || L.output) && be(L), b && b.type === "text" && L.type === "text") {
1457
+ b.value += L.value, b.output = (b.output || "") + L.value;
1458
+ return;
1459
+ }
1460
+ L.prev = b, P.push(L), b = L;
1461
+ }, Ge = (L, Y) => {
1462
+ const w = { ...M[Y], conditions: 1, inner: "" };
1463
+ w.prev = b, w.parens = A.parens, w.output = A.output, w.startIndex = A.index, w.tokensIndex = P.length;
1464
+ const j = (f.capture ? "(" : "") + w.open;
1465
+ je("parens"), G({ type: L, value: Y, output: A.output ? "" : q }), G({ type: "paren", extglob: !0, value: Z(), output: j }), le.push(w);
1466
+ }, Mn = (L) => {
1467
+ const Y = _.slice(L.startIndex, A.index + 1), w = _.slice(L.startIndex + 2, A.index), j = m(w, f);
1468
+ if ((L.type === "plus" || L.type === "star") && j.risky) {
1469
+ const Q = j.safeOutput ? (L.output ? "" : q) + (f.capture ? `(${j.safeOutput})` : j.safeOutput) : void 0, ge = P[L.tokensIndex];
1470
+ ge.type = "text", ge.value = Y, ge.output = Q || a.escapeRegex(Y);
1471
+ for (let ye = L.tokensIndex + 1; ye < P.length; ye++)
1472
+ P[ye].value = "", P[ye].output = "", delete P[ye].suffix;
1473
+ A.output = L.output + ge.output, A.backtrack = !0, G({ type: "paren", extglob: !0, value: E, output: "" }), Pe("parens");
1474
+ return;
1475
+ }
1476
+ let X = L.close + (f.capture ? ")" : ""), re;
1477
+ if (L.type === "negate") {
1478
+ let Q = W;
1479
+ if (L.inner && L.inner.length > 1 && L.inner.includes("/") && (Q = ae(f)), (Q !== W || he() || /^\)+$/.test(me())) && (X = L.close = `)$))${Q}`), L.inner.includes("*") && (re = me()) && /^\.[^\\/.]+$/.test(re)) {
1480
+ const ge = S(re, { ...c, fastpaths: !1 }).output;
1481
+ X = L.close = `)${ge})${Q})`;
1482
+ }
1483
+ L.prev.type === "bos" && (A.negatedExtglob = !0);
1484
+ }
1485
+ G({ type: "paren", extglob: !0, value: E, output: X }), Pe("parens");
1486
+ };
1487
+ if (f.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(_)) {
1488
+ let L = !1, Y = _.replace(t, (w, j, X, re, Q, ge) => re === "\\" ? (L = !0, w) : re === "?" ? j ? j + re + (Q ? H.repeat(Q.length) : "") : ge === 0 ? B + (Q ? H.repeat(Q.length) : "") : H.repeat(X.length) : re === "." ? x.repeat(X.length) : re === "*" ? j ? j + re + (Q ? W : "") : W : j ? w : `\\${w}`);
1489
+ return L === !0 && (f.unescape === !0 ? Y = Y.replace(/\\/g, "") : Y = Y.replace(/\\+/g, (w) => w.length % 2 === 0 ? "\\\\" : w ? "\\" : "")), Y === _ && f.contains === !0 ? (A.output = _, A) : (A.output = a.wrapOutput(Y, A, c), A);
1490
+ }
1491
+ for (; !he(); ) {
1492
+ if (E = Z(), E === "\0")
1493
+ continue;
1494
+ if (E === "\\") {
1495
+ const w = K();
1496
+ if (w === "/" && f.bash !== !0 || w === "." || w === ";")
1497
+ continue;
1498
+ if (!w) {
1499
+ E += "\\", G({ type: "text", value: E });
1500
+ continue;
1501
+ }
1502
+ const j = /^\\+/.exec(me());
1503
+ let X = 0;
1504
+ if (j && j[0].length > 2 && (X = j[0].length, A.index += X, X % 2 !== 0 && (E += "\\")), f.unescape === !0 ? E = Z() : E += Z(), A.brackets === 0) {
1505
+ G({ type: "text", value: E });
1506
+ continue;
1507
+ }
1508
+ }
1509
+ if (A.brackets > 0 && (E !== "]" || b.value === "[" || b.value === "[^")) {
1510
+ if (f.posix !== !1 && E === ":") {
1511
+ const w = b.value.slice(1);
1512
+ if (w.includes("[") && (b.posix = !0, w.includes(":"))) {
1513
+ const j = b.value.lastIndexOf("["), X = b.value.slice(0, j), re = b.value.slice(j + 2), Q = u[re];
1514
+ if (Q) {
1515
+ b.value = X + Q, A.backtrack = !0, Z(), !v.output && P.indexOf(b) === 1 && (v.output = q);
1516
+ continue;
1517
+ }
1518
+ }
1519
+ }
1520
+ (E === "[" && K() !== ":" || E === "-" && K() === "]") && (E = `\\${E}`), E === "]" && (b.value === "[" || b.value === "[^") && (E = `\\${E}`), f.posix === !0 && E === "!" && b.value === "[" && (E = "^"), b.value += E, be({ value: E });
1521
+ continue;
1522
+ }
1523
+ if (A.quotes === 1 && E !== '"') {
1524
+ E = a.escapeRegex(E), b.value += E, be({ value: E });
1525
+ continue;
1526
+ }
1527
+ if (E === '"') {
1528
+ A.quotes = A.quotes === 1 ? 0 : 1, f.keepQuotes === !0 && G({ type: "text", value: E });
1529
+ continue;
1530
+ }
1531
+ if (E === "(") {
1532
+ je("parens"), G({ type: "paren", value: E });
1533
+ continue;
1534
+ }
1535
+ if (E === ")") {
1536
+ if (A.parens === 0 && f.strictBrackets === !0)
1537
+ throw new SyntaxError(i("opening", "("));
1538
+ const w = le[le.length - 1];
1539
+ if (w && A.parens === w.parens + 1) {
1540
+ Mn(le.pop());
1541
+ continue;
1542
+ }
1543
+ G({ type: "paren", value: E, output: A.parens ? ")" : "\\)" }), Pe("parens");
1544
+ continue;
1545
+ }
1546
+ if (E === "[") {
1547
+ if (f.nobracket === !0 || !me().includes("]")) {
1548
+ if (f.nobracket !== !0 && f.strictBrackets === !0)
1549
+ throw new SyntaxError(i("closing", "]"));
1550
+ E = `\\${E}`;
1551
+ } else
1552
+ je("brackets");
1553
+ G({ type: "bracket", value: E });
1554
+ continue;
1555
+ }
1556
+ if (E === "]") {
1557
+ if (f.nobracket === !0 || b && b.type === "bracket" && b.value.length === 1) {
1558
+ G({ type: "text", value: E, output: `\\${E}` });
1559
+ continue;
1560
+ }
1561
+ if (A.brackets === 0) {
1562
+ if (f.strictBrackets === !0)
1563
+ throw new SyntaxError(i("opening", "["));
1564
+ G({ type: "text", value: E, output: `\\${E}` });
1565
+ continue;
1566
+ }
1567
+ Pe("brackets");
1568
+ const w = b.value.slice(1);
1569
+ if (b.posix !== !0 && w[0] === "^" && !w.includes("/") && (E = `/${E}`), b.value += E, be({ value: E }), f.literalBrackets === !1 || a.hasRegexChars(w))
1570
+ continue;
1571
+ const j = a.escapeRegex(b.value);
1572
+ if (A.output = A.output.slice(0, -b.value.length), f.literalBrackets === !0) {
1573
+ A.output += j, b.value = j;
1574
+ continue;
1575
+ }
1576
+ b.value = `(${O}${j}|${b.value})`, A.output += b.value;
1577
+ continue;
1578
+ }
1579
+ if (E === "{" && f.nobrace !== !0) {
1580
+ je("braces");
1581
+ const w = {
1582
+ type: "brace",
1583
+ value: E,
1584
+ output: "(",
1585
+ outputIndex: A.output.length,
1586
+ tokensIndex: A.tokens.length
1587
+ };
1588
+ te.push(w), G(w);
1589
+ continue;
1590
+ }
1591
+ if (E === "}") {
1592
+ const w = te[te.length - 1];
1593
+ if (f.nobrace === !0 || !w) {
1594
+ G({ type: "text", value: E, output: E });
1595
+ continue;
1596
+ }
1597
+ let j = ")";
1598
+ if (w.dots === !0) {
1599
+ const X = P.slice(), re = [];
1600
+ for (let Q = X.length - 1; Q >= 0 && (P.pop(), X[Q].type !== "brace"); Q--)
1601
+ X[Q].type !== "dots" && re.unshift(X[Q].value);
1602
+ j = e(re, f), A.backtrack = !0;
1603
+ }
1604
+ if (w.comma !== !0 && w.dots !== !0) {
1605
+ const X = A.output.slice(0, w.outputIndex), re = A.tokens.slice(w.tokensIndex);
1606
+ w.value = w.output = "\\{", E = j = "\\}", A.output = X;
1607
+ for (const Q of re)
1608
+ A.output += Q.output || Q.value;
1609
+ }
1610
+ G({ type: "brace", value: E, output: j }), Pe("braces"), te.pop();
1611
+ continue;
1612
+ }
1613
+ if (E === "|") {
1614
+ le.length > 0 && le[le.length - 1].conditions++, G({ type: "text", value: E });
1615
+ continue;
1616
+ }
1617
+ if (E === ",") {
1618
+ let w = E;
1619
+ const j = te[te.length - 1];
1620
+ j && J[J.length - 1] === "braces" && (j.comma = !0, w = "|"), G({ type: "comma", value: E, output: w });
1621
+ continue;
1622
+ }
1623
+ if (E === "/") {
1624
+ if (b.type === "dot" && A.index === A.start + 1) {
1625
+ A.start = A.index + 1, A.consumed = "", A.output = "", P.pop(), b = v;
1626
+ continue;
1627
+ }
1628
+ G({ type: "slash", value: E, output: N });
1629
+ continue;
1630
+ }
1631
+ if (E === ".") {
1632
+ if (A.braces > 0 && b.type === "dot") {
1633
+ b.value === "." && (b.output = x);
1634
+ const w = te[te.length - 1];
1635
+ b.type = "dots", b.output += E, b.value += E, w.dots = !0;
1636
+ continue;
1637
+ }
1638
+ if (A.braces + A.parens === 0 && b.type !== "bos" && b.type !== "slash") {
1639
+ G({ type: "text", value: E, output: x });
1640
+ continue;
1641
+ }
1642
+ G({ type: "dot", value: E, output: x });
1643
+ continue;
1644
+ }
1645
+ if (E === "?") {
1646
+ if (!(b && b.value === "(") && f.noextglob !== !0 && K() === "(" && K(2) !== "?") {
1647
+ Ge("qmark", E);
1648
+ continue;
1649
+ }
1650
+ if (b && b.type === "paren") {
1651
+ const j = K();
1652
+ let X = E;
1653
+ if (j === "<" && !a.supportsLookbehinds())
1654
+ throw new Error("Node.js v10 or higher is required for regex lookbehinds");
1655
+ (b.value === "(" && !/[!=<:]/.test(j) || j === "<" && !/<([!=]|\w+>)/.test(me())) && (X = `\\${E}`), G({ type: "text", value: E, output: X });
1656
+ continue;
1657
+ }
1658
+ if (f.dot !== !0 && (b.type === "slash" || b.type === "bos")) {
1659
+ G({ type: "qmark", value: E, output: V });
1660
+ continue;
1661
+ }
1662
+ G({ type: "qmark", value: E, output: H });
1663
+ continue;
1664
+ }
1665
+ if (E === "!") {
1666
+ if (f.noextglob !== !0 && K() === "(" && (K(2) !== "?" || !/[!=<:]/.test(K(3)))) {
1667
+ Ge("negate", E);
1668
+ continue;
1669
+ }
1670
+ if (f.nonegate !== !0 && A.index === 0) {
1671
+ kn();
1672
+ continue;
1673
+ }
1674
+ }
1675
+ if (E === "+") {
1676
+ if (f.noextglob !== !0 && K() === "(" && K(2) !== "?") {
1677
+ Ge("plus", E);
1678
+ continue;
1679
+ }
1680
+ if (b && b.value === "(" || f.regex === !1) {
1681
+ G({ type: "plus", value: E, output: U });
1682
+ continue;
1683
+ }
1684
+ if (b && (b.type === "bracket" || b.type === "paren" || b.type === "brace") || A.parens > 0) {
1685
+ G({ type: "plus", value: E });
1686
+ continue;
1687
+ }
1688
+ G({ type: "plus", value: U });
1689
+ continue;
1690
+ }
1691
+ if (E === "@") {
1692
+ if (f.noextglob !== !0 && K() === "(" && K(2) !== "?") {
1693
+ G({ type: "at", extglob: !0, value: E, output: "" });
1694
+ continue;
1695
+ }
1696
+ G({ type: "text", value: E });
1697
+ continue;
1698
+ }
1699
+ if (E !== "*") {
1700
+ (E === "$" || E === "^") && (E = `\\${E}`);
1701
+ const w = r.exec(me());
1702
+ w && (E += w[0], A.index += w[0].length), G({ type: "text", value: E });
1703
+ continue;
1704
+ }
1705
+ if (b && (b.type === "globstar" || b.star === !0)) {
1706
+ b.type = "star", b.star = !0, b.value += E, b.output = W, A.backtrack = !0, A.globstar = !0, pe(E);
1707
+ continue;
1708
+ }
1709
+ let L = me();
1710
+ if (f.noextglob !== !0 && /^\([^?]/.test(L)) {
1711
+ Ge("star", E);
1712
+ continue;
1713
+ }
1714
+ if (b.type === "star") {
1715
+ if (f.noglobstar === !0) {
1716
+ pe(E);
1717
+ continue;
1718
+ }
1719
+ const w = b.prev, j = w.prev, X = w.type === "slash" || w.type === "bos", re = j && (j.type === "star" || j.type === "globstar");
1720
+ if (f.bash === !0 && (!X || L[0] && L[0] !== "/")) {
1721
+ G({ type: "star", value: E, output: "" });
1722
+ continue;
1723
+ }
1724
+ const Q = A.braces > 0 && (w.type === "comma" || w.type === "brace"), ge = le.length && (w.type === "pipe" || w.type === "paren");
1725
+ if (!X && w.type !== "paren" && !Q && !ge) {
1726
+ G({ type: "star", value: E, output: "" });
1727
+ continue;
1728
+ }
1729
+ for (; L.slice(0, 3) === "/**"; ) {
1730
+ const ye = _[A.index + 4];
1731
+ if (ye && ye !== "/")
1732
+ break;
1733
+ L = L.slice(3), pe("/**", 3);
1734
+ }
1735
+ if (w.type === "bos" && he()) {
1736
+ b.type = "globstar", b.value += E, b.output = ae(f), A.output = b.output, A.globstar = !0, pe(E);
1737
+ continue;
1738
+ }
1739
+ if (w.type === "slash" && w.prev.type !== "bos" && !re && he()) {
1740
+ A.output = A.output.slice(0, -(w.output + b.output).length), w.output = `(?:${w.output}`, b.type = "globstar", b.output = ae(f) + (f.strictSlashes ? ")" : "|$)"), b.value += E, A.globstar = !0, A.output += w.output + b.output, pe(E);
1741
+ continue;
1742
+ }
1743
+ if (w.type === "slash" && w.prev.type !== "bos" && L[0] === "/") {
1744
+ const ye = L[1] !== void 0 ? "|$" : "";
1745
+ A.output = A.output.slice(0, -(w.output + b.output).length), w.output = `(?:${w.output}`, b.type = "globstar", b.output = `${ae(f)}${N}|${N}${ye})`, b.value += E, A.output += w.output + b.output, A.globstar = !0, pe(E + Z()), G({ type: "slash", value: "/", output: "" });
1746
+ continue;
1747
+ }
1748
+ if (w.type === "bos" && L[0] === "/") {
1749
+ b.type = "globstar", b.value += E, b.output = `(?:^|${N}|${ae(f)}${N})`, A.output = b.output, A.globstar = !0, pe(E + Z()), G({ type: "slash", value: "/", output: "" });
1750
+ continue;
1751
+ }
1752
+ A.output = A.output.slice(0, -b.output.length), b.type = "globstar", b.output = ae(f), b.value += E, A.output += b.output, A.globstar = !0, pe(E);
1753
+ continue;
1754
+ }
1755
+ const Y = { type: "star", value: E, output: W };
1756
+ if (f.bash === !0) {
1757
+ Y.output = ".*?", (b.type === "bos" || b.type === "slash") && (Y.output = fe + Y.output), G(Y);
1758
+ continue;
1759
+ }
1760
+ if (b && (b.type === "bracket" || b.type === "paren") && f.regex === !0) {
1761
+ Y.output = E, G(Y);
1762
+ continue;
1763
+ }
1764
+ (A.index === A.start || b.type === "slash" || b.type === "dot") && (b.type === "dot" ? (A.output += ce, b.output += ce) : f.dot === !0 ? (A.output += $, b.output += $) : (A.output += fe, b.output += fe), K() !== "*" && (A.output += q, b.output += q)), G(Y);
1765
+ }
1766
+ for (; A.brackets > 0; ) {
1767
+ if (f.strictBrackets === !0) throw new SyntaxError(i("closing", "]"));
1768
+ A.output = a.escapeLast(A.output, "["), Pe("brackets");
1769
+ }
1770
+ for (; A.parens > 0; ) {
1771
+ if (f.strictBrackets === !0) throw new SyntaxError(i("closing", ")"));
1772
+ A.output = a.escapeLast(A.output, "("), Pe("parens");
1773
+ }
1774
+ for (; A.braces > 0; ) {
1775
+ if (f.strictBrackets === !0) throw new SyntaxError(i("closing", "}"));
1776
+ A.output = a.escapeLast(A.output, "{"), Pe("braces");
1777
+ }
1778
+ if (f.strictSlashes !== !0 && (b.type === "star" || b.type === "bracket") && G({ type: "maybe_slash", value: "", output: `${N}?` }), A.backtrack === !0) {
1779
+ A.output = "";
1780
+ for (const L of A.tokens)
1781
+ A.output += L.output != null ? L.output : L.value, L.suffix && (A.output += L.suffix);
1782
+ }
1783
+ return A;
1784
+ };
1785
+ return S.fastpaths = (_, c) => {
1786
+ const f = { ...c }, g = typeof f.maxLength == "number" ? Math.min(l, f.maxLength) : l, R = _.length;
1787
+ if (R > g)
1788
+ throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${g}`);
1789
+ _ = n[_] || _;
1790
+ const v = a.isWindows(c), {
1791
+ DOT_LITERAL: P,
1792
+ SLASH_LITERAL: O,
1793
+ ONE_CHAR: D,
1794
+ DOTS_SLASH: k,
1795
+ NO_DOT: M,
1796
+ NO_DOTS: x,
1797
+ NO_DOTS_SLASH: U,
1798
+ STAR: N,
1799
+ START_ANCHOR: q
1800
+ } = o.globChars(v), F = f.dot ? x : M, z = f.dot ? U : M, ce = f.capture ? "" : "?:", $ = { negated: !1, prefix: "" };
1801
+ let H = f.bash === !0 ? ".*?" : N;
1802
+ f.capture && (H = `(${H})`);
1803
+ const V = (fe) => fe.noglobstar === !0 ? H : `(${ce}(?:(?!${q}${fe.dot ? k : P}).)*?)`, oe = (fe) => {
1804
+ switch (fe) {
1805
+ case "*":
1806
+ return `${F}${D}${H}`;
1807
+ case ".*":
1808
+ return `${P}${D}${H}`;
1809
+ case "*.*":
1810
+ return `${F}${H}${P}${D}${H}`;
1811
+ case "*/*":
1812
+ return `${F}${H}${O}${D}${z}${H}`;
1813
+ case "**":
1814
+ return F + V(f);
1815
+ case "**/*":
1816
+ return `(?:${F}${V(f)}${O})?${z}${D}${H}`;
1817
+ case "**/*.*":
1818
+ return `(?:${F}${V(f)}${O})?${z}${H}${P}${D}${H}`;
1819
+ case "**/.*":
1820
+ return `(?:${F}${V(f)}${O})?${P}${D}${H}`;
1821
+ default: {
1822
+ const B = /^(.*?)\.(\w+)$/.exec(fe);
1823
+ if (!B) return;
1824
+ const W = oe(B[1]);
1825
+ return W ? W + P + B[2] : void 0;
1826
+ }
1827
+ }
1828
+ }, ue = a.removePrefix(_, $);
1829
+ let ae = oe(ue);
1830
+ return ae && f.strictSlashes !== !0 && (ae += `${O}?`), ae;
1831
+ }, Ht = S, Ht;
1832
+ }
1833
+ var Dt, br;
1834
+ function ss() {
1835
+ if (br) return Dt;
1836
+ br = 1;
1837
+ const o = Se, a = rs(), l = ns(), u = gt(), r = _t(), t = (e) => e && typeof e == "object" && !Array.isArray(e), n = (e, i, s = !1) => {
1838
+ if (Array.isArray(e)) {
1839
+ const S = e.map((c) => n(c, i, s));
1840
+ return (c) => {
1841
+ for (const f of S) {
1842
+ const g = f(c);
1843
+ if (g) return g;
1844
+ }
1845
+ return !1;
1846
+ };
1847
+ }
1848
+ const p = t(e) && e.tokens && e.input;
1849
+ if (e === "" || typeof e != "string" && !p)
1850
+ throw new TypeError("Expected pattern to be a non-empty string");
1851
+ const h = i || {}, d = u.isWindows(i), y = p ? n.compileRe(e, i) : n.makeRe(e, i, !1, !0), T = y.state;
1852
+ delete y.state;
1853
+ let C = () => !1;
1854
+ if (h.ignore) {
1855
+ const S = { ...i, ignore: null, onMatch: null, onResult: null };
1856
+ C = n(h.ignore, S, s);
1857
+ }
1858
+ const m = (S, _ = !1) => {
1859
+ const { isMatch: c, match: f, output: g } = n.test(S, y, i, { glob: e, posix: d }), R = { glob: e, state: T, regex: y, posix: d, input: S, output: g, match: f, isMatch: c };
1860
+ return typeof h.onResult == "function" && h.onResult(R), c === !1 ? (R.isMatch = !1, _ ? R : !1) : C(S) ? (typeof h.onIgnore == "function" && h.onIgnore(R), R.isMatch = !1, _ ? R : !1) : (typeof h.onMatch == "function" && h.onMatch(R), _ ? R : !0);
1861
+ };
1862
+ return s && (m.state = T), m;
1863
+ };
1864
+ return n.test = (e, i, s, { glob: p, posix: h } = {}) => {
1865
+ if (typeof e != "string")
1866
+ throw new TypeError("Expected input to be a string");
1867
+ if (e === "")
1868
+ return { isMatch: !1, output: "" };
1869
+ const d = s || {}, y = d.format || (h ? u.toPosixSlashes : null);
1870
+ let T = e === p, C = T && y ? y(e) : e;
1871
+ return T === !1 && (C = y ? y(e) : e, T = C === p), (T === !1 || d.capture === !0) && (d.matchBase === !0 || d.basename === !0 ? T = n.matchBase(e, i, s, h) : T = i.exec(C)), { isMatch: !!T, match: T, output: C };
1872
+ }, n.matchBase = (e, i, s, p = u.isWindows(s)) => (i instanceof RegExp ? i : n.makeRe(i, s)).test(o.basename(e)), n.isMatch = (e, i, s) => n(i, s)(e), n.parse = (e, i) => Array.isArray(e) ? e.map((s) => n.parse(s, i)) : l(e, { ...i, fastpaths: !1 }), n.scan = (e, i) => a(e, i), n.compileRe = (e, i, s = !1, p = !1) => {
1873
+ if (s === !0)
1874
+ return e.output;
1875
+ const h = i || {}, d = h.contains ? "" : "^", y = h.contains ? "" : "$";
1876
+ let T = `${d}(?:${e.output})${y}`;
1877
+ e && e.negated === !0 && (T = `^(?!${T}).*$`);
1878
+ const C = n.toRegex(T, i);
1879
+ return p === !0 && (C.state = e), C;
1880
+ }, n.makeRe = (e, i = {}, s = !1, p = !1) => {
1881
+ if (!e || typeof e != "string")
1882
+ throw new TypeError("Expected a non-empty string");
1883
+ let h = { negated: !1, fastpaths: !0 };
1884
+ return i.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (h.output = l.fastpaths(e, i)), h.output || (h = l(e, i)), n.compileRe(h, i, s, p);
1885
+ }, n.toRegex = (e, i) => {
1886
+ try {
1887
+ const s = i || {};
1888
+ return new RegExp(e, s.flags || (s.nocase ? "i" : ""));
1889
+ } catch (s) {
1890
+ if (i && i.debug === !0) throw s;
1891
+ return /$^/;
1892
+ }
1893
+ }, n.constants = r, Dt = n, Dt;
1894
+ }
1895
+ var It, Pr;
1896
+ function is() {
1897
+ return Pr || (Pr = 1, It = ss()), It;
1898
+ }
1899
+ var Nt, xr;
1900
+ function as() {
1901
+ if (xr) return Nt;
1902
+ xr = 1;
1903
+ const o = Pn, a = ts(), l = is(), u = gt(), r = (e) => e === "" || e === "./", t = (e) => {
1904
+ const i = e.indexOf("{");
1905
+ return i > -1 && e.indexOf("}", i) > -1;
1906
+ }, n = (e, i, s) => {
1907
+ i = [].concat(i), e = [].concat(e);
1908
+ let p = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), y = 0, T = (S) => {
1909
+ d.add(S.output), s && s.onResult && s.onResult(S);
1910
+ };
1911
+ for (let S = 0; S < i.length; S++) {
1912
+ let _ = l(String(i[S]), { ...s, onResult: T }, !0), c = _.state.negated || _.state.negatedExtglob;
1913
+ c && y++;
1914
+ for (let f of e) {
1915
+ let g = _(f, !0);
1916
+ (c ? !g.isMatch : g.isMatch) && (c ? p.add(g.output) : (p.delete(g.output), h.add(g.output)));
1917
+ }
1918
+ }
1919
+ let m = (y === i.length ? [...d] : [...h]).filter((S) => !p.has(S));
1920
+ if (s && m.length === 0) {
1921
+ if (s.failglob === !0)
1922
+ throw new Error(`No matches found for "${i.join(", ")}"`);
1923
+ if (s.nonull === !0 || s.nullglob === !0)
1924
+ return s.unescape ? i.map((S) => S.replace(/\\/g, "")) : i;
1925
+ }
1926
+ return m;
1927
+ };
1928
+ return n.match = n, n.matcher = (e, i) => l(e, i), n.isMatch = (e, i, s) => l(i, s)(e), n.any = n.isMatch, n.not = (e, i, s = {}) => {
1929
+ i = [].concat(i).map(String);
1930
+ let p = /* @__PURE__ */ new Set(), h = [], d = (T) => {
1931
+ s.onResult && s.onResult(T), h.push(T.output);
1932
+ }, y = new Set(n(e, i, { ...s, onResult: d }));
1933
+ for (let T of h)
1934
+ y.has(T) || p.add(T);
1935
+ return [...p];
1936
+ }, n.contains = (e, i, s) => {
1937
+ if (typeof e != "string")
1938
+ throw new TypeError(`Expected a string: "${o.inspect(e)}"`);
1939
+ if (Array.isArray(i))
1940
+ return i.some((p) => n.contains(e, p, s));
1941
+ if (typeof i == "string") {
1942
+ if (r(e) || r(i))
1943
+ return !1;
1944
+ if (e.includes(i) || e.startsWith("./") && e.slice(2).includes(i))
1945
+ return !0;
1946
+ }
1947
+ return n.isMatch(e, i, { ...s, contains: !0 });
1948
+ }, n.matchKeys = (e, i, s) => {
1949
+ if (!u.isObject(e))
1950
+ throw new TypeError("Expected the first argument to be an object");
1951
+ let p = n(Object.keys(e), i, s), h = {};
1952
+ for (let d of p) h[d] = e[d];
1953
+ return h;
1954
+ }, n.some = (e, i, s) => {
1955
+ let p = [].concat(e);
1956
+ for (let h of [].concat(i)) {
1957
+ let d = l(String(h), s);
1958
+ if (p.some((y) => d(y)))
1959
+ return !0;
1960
+ }
1961
+ return !1;
1962
+ }, n.every = (e, i, s) => {
1963
+ let p = [].concat(e);
1964
+ for (let h of [].concat(i)) {
1965
+ let d = l(String(h), s);
1966
+ if (!p.every((y) => d(y)))
1967
+ return !1;
1968
+ }
1969
+ return !0;
1970
+ }, n.all = (e, i, s) => {
1971
+ if (typeof e != "string")
1972
+ throw new TypeError(`Expected a string: "${o.inspect(e)}"`);
1973
+ return [].concat(i).every((p) => l(p, s)(e));
1974
+ }, n.capture = (e, i, s) => {
1975
+ let p = u.isWindows(s), d = l.makeRe(String(e), { ...s, capture: !0 }).exec(p ? u.toPosixSlashes(i) : i);
1976
+ if (d)
1977
+ return d.slice(1).map((y) => y === void 0 ? "" : y);
1978
+ }, n.makeRe = (...e) => l.makeRe(...e), n.scan = (...e) => l.scan(...e), n.parse = (e, i) => {
1979
+ let s = [];
1980
+ for (let p of [].concat(e || []))
1981
+ for (let h of a(String(p), i))
1982
+ s.push(l.parse(h, i));
1983
+ return s;
1984
+ }, n.braces = (e, i) => {
1985
+ if (typeof e != "string") throw new TypeError("Expected a string");
1986
+ return i && i.nobrace === !0 || !t(e) ? [e] : a(e, i);
1987
+ }, n.braceExpand = (e, i) => {
1988
+ if (typeof e != "string") throw new TypeError("Expected a string");
1989
+ return n.braces(e, { ...i, expand: !0 });
1990
+ }, n.hasBraces = t, Nt = n, Nt;
1991
+ }
1992
+ var Cr;
1993
+ function os() {
1994
+ if (Cr) return I;
1995
+ Cr = 1, Object.defineProperty(I, "__esModule", { value: !0 }), I.isAbsolute = I.partitionAbsoluteAndRelative = I.removeDuplicateSlashes = I.matchAny = I.convertPatternsToRe = I.makeRe = I.getPatternParts = I.expandBraceExpansion = I.expandPatternsWithBraceExpansion = I.isAffectDepthOfReadingPattern = I.endsWithSlashGlobStar = I.hasGlobStar = I.getBaseDirectory = I.isPatternRelatedToParentDirectory = I.getPatternsOutsideCurrentDirectory = I.getPatternsInsideCurrentDirectory = I.getPositivePatterns = I.getNegativePatterns = I.isPositivePattern = I.isNegativePattern = I.convertToNegativePattern = I.convertToPositivePattern = I.isDynamicPattern = I.isStaticPattern = void 0;
1996
+ const o = Se, a = Qn(), l = as(), u = "**", r = "\\", t = /[*?]|^!/, n = /\[[^[]*]/, e = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, i = /[!*+?@]\([^(]*\)/, s = /,|\.\./, p = /(?!^)\/{2,}/g;
1997
+ function h($, H = {}) {
1998
+ return !d($, H);
1999
+ }
2000
+ I.isStaticPattern = h;
2001
+ function d($, H = {}) {
2002
+ return $ === "" ? !1 : !!(H.caseSensitiveMatch === !1 || $.includes(r) || t.test($) || n.test($) || e.test($) || H.extglob !== !1 && i.test($) || H.braceExpansion !== !1 && y($));
2003
+ }
2004
+ I.isDynamicPattern = d;
2005
+ function y($) {
2006
+ const H = $.indexOf("{");
2007
+ if (H === -1)
2008
+ return !1;
2009
+ const V = $.indexOf("}", H + 1);
2010
+ if (V === -1)
2011
+ return !1;
2012
+ const oe = $.slice(H, V);
2013
+ return s.test(oe);
2014
+ }
2015
+ function T($) {
2016
+ return m($) ? $.slice(1) : $;
2017
+ }
2018
+ I.convertToPositivePattern = T;
2019
+ function C($) {
2020
+ return "!" + $;
2021
+ }
2022
+ I.convertToNegativePattern = C;
2023
+ function m($) {
2024
+ return $.startsWith("!") && $[1] !== "(";
2025
+ }
2026
+ I.isNegativePattern = m;
2027
+ function S($) {
2028
+ return !m($);
2029
+ }
2030
+ I.isPositivePattern = S;
2031
+ function _($) {
2032
+ return $.filter(m);
2033
+ }
2034
+ I.getNegativePatterns = _;
2035
+ function c($) {
2036
+ return $.filter(S);
2037
+ }
2038
+ I.getPositivePatterns = c;
2039
+ function f($) {
2040
+ return $.filter((H) => !R(H));
2041
+ }
2042
+ I.getPatternsInsideCurrentDirectory = f;
2043
+ function g($) {
2044
+ return $.filter(R);
2045
+ }
2046
+ I.getPatternsOutsideCurrentDirectory = g;
2047
+ function R($) {
2048
+ return $.startsWith("..") || $.startsWith("./..");
2049
+ }
2050
+ I.isPatternRelatedToParentDirectory = R;
2051
+ function v($) {
2052
+ return a($, { flipBackslashes: !1 });
2053
+ }
2054
+ I.getBaseDirectory = v;
2055
+ function P($) {
2056
+ return $.includes(u);
2057
+ }
2058
+ I.hasGlobStar = P;
2059
+ function O($) {
2060
+ return $.endsWith("/" + u);
2061
+ }
2062
+ I.endsWithSlashGlobStar = O;
2063
+ function D($) {
2064
+ const H = o.basename($);
2065
+ return O($) || h(H);
2066
+ }
2067
+ I.isAffectDepthOfReadingPattern = D;
2068
+ function k($) {
2069
+ return $.reduce((H, V) => H.concat(M(V)), []);
2070
+ }
2071
+ I.expandPatternsWithBraceExpansion = k;
2072
+ function M($) {
2073
+ const H = l.braces($, { expand: !0, nodupes: !0, keepEscaping: !0 });
2074
+ return H.sort((V, oe) => V.length - oe.length), H.filter((V) => V !== "");
2075
+ }
2076
+ I.expandBraceExpansion = M;
2077
+ function x($, H) {
2078
+ let { parts: V } = l.scan($, Object.assign(Object.assign({}, H), { parts: !0 }));
2079
+ return V.length === 0 && (V = [$]), V[0].startsWith("/") && (V[0] = V[0].slice(1), V.unshift("")), V;
2080
+ }
2081
+ I.getPatternParts = x;
2082
+ function U($, H) {
2083
+ return l.makeRe($, H);
2084
+ }
2085
+ I.makeRe = U;
2086
+ function N($, H) {
2087
+ return $.map((V) => U(V, H));
2088
+ }
2089
+ I.convertPatternsToRe = N;
2090
+ function q($, H) {
2091
+ return H.some((V) => V.test($));
2092
+ }
2093
+ I.matchAny = q;
2094
+ function F($) {
2095
+ return $.replace(p, "/");
2096
+ }
2097
+ I.removeDuplicateSlashes = F;
2098
+ function z($) {
2099
+ const H = [], V = [];
2100
+ for (const oe of $)
2101
+ ce(oe) ? H.push(oe) : V.push(oe);
2102
+ return [H, V];
2103
+ }
2104
+ I.partitionAbsoluteAndRelative = z;
2105
+ function ce($) {
2106
+ return o.isAbsolute($);
2107
+ }
2108
+ return I.isAbsolute = ce, I;
2109
+ }
2110
+ var He = {}, qt, Tr;
2111
+ function us() {
2112
+ if (Tr) return qt;
2113
+ Tr = 1;
2114
+ const a = dt.PassThrough, l = Array.prototype.slice;
2115
+ qt = u;
2116
+ function u() {
2117
+ const t = [], n = l.call(arguments);
2118
+ let e = !1, i = n[n.length - 1];
2119
+ i && !Array.isArray(i) && i.pipe == null ? n.pop() : i = {};
2120
+ const s = i.end !== !1, p = i.pipeError === !0;
2121
+ i.objectMode == null && (i.objectMode = !0), i.highWaterMark == null && (i.highWaterMark = 64 * 1024);
2122
+ const h = a(i);
2123
+ function d() {
2124
+ for (let C = 0, m = arguments.length; C < m; C++)
2125
+ t.push(r(arguments[C], i));
2126
+ return y(), this;
2127
+ }
2128
+ function y() {
2129
+ if (e)
2130
+ return;
2131
+ e = !0;
2132
+ let C = t.shift();
2133
+ if (!C) {
2134
+ process.nextTick(T);
2135
+ return;
2136
+ }
2137
+ Array.isArray(C) || (C = [C]);
2138
+ let m = C.length + 1;
2139
+ function S() {
2140
+ --m > 0 || (e = !1, y());
2141
+ }
2142
+ function _(c) {
2143
+ function f() {
2144
+ c.removeListener("merge2UnpipeEnd", f), c.removeListener("end", f), p && c.removeListener("error", g), S();
2145
+ }
2146
+ function g(R) {
2147
+ h.emit("error", R);
2148
+ }
2149
+ if (c._readableState.endEmitted)
2150
+ return S();
2151
+ c.on("merge2UnpipeEnd", f), c.on("end", f), p && c.on("error", g), c.pipe(h, { end: !1 }), c.resume();
2152
+ }
2153
+ for (let c = 0; c < C.length; c++)
2154
+ _(C[c]);
2155
+ S();
2156
+ }
2157
+ function T() {
2158
+ e = !1, h.emit("queueDrain"), s && h.end();
2159
+ }
2160
+ return h.setMaxListeners(0), h.add = d, h.on("unpipe", function(C) {
2161
+ C.emit("merge2UnpipeEnd");
2162
+ }), n.length && d.apply(null, n), h;
2163
+ }
2164
+ function r(t, n) {
2165
+ if (Array.isArray(t))
2166
+ for (let e = 0, i = t.length; e < i; e++)
2167
+ t[e] = r(t[e], n);
2168
+ else {
2169
+ if (!t._readableState && t.pipe && (t = t.pipe(a(n))), !t._readableState || !t.pause || !t.pipe)
2170
+ throw new Error("Only readable stream can be merged.");
2171
+ t.pause();
2172
+ }
2173
+ return t;
2174
+ }
2175
+ return qt;
2176
+ }
2177
+ var Or;
2178
+ function cs() {
2179
+ if (Or) return He;
2180
+ Or = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.merge = void 0;
2181
+ const o = us();
2182
+ function a(u) {
2183
+ const r = o(u);
2184
+ return u.forEach((t) => {
2185
+ t.once("error", (n) => r.emit("error", n));
2186
+ }), r.once("close", () => l(u)), r.once("end", () => l(u)), r;
2187
+ }
2188
+ He.merge = a;
2189
+ function l(u) {
2190
+ u.forEach((r) => r.emit("close"));
2191
+ }
2192
+ return He;
2193
+ }
2194
+ var we = {}, wr;
2195
+ function ls() {
2196
+ if (wr) return we;
2197
+ wr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.isEmpty = we.isString = void 0;
2198
+ function o(l) {
2199
+ return typeof l == "string";
2200
+ }
2201
+ we.isString = o;
2202
+ function a(l) {
2203
+ return l === "";
2204
+ }
2205
+ return we.isEmpty = a, we;
2206
+ }
2207
+ var $r;
2208
+ function Te() {
2209
+ if ($r) return ie;
2210
+ $r = 1, Object.defineProperty(ie, "__esModule", { value: !0 }), ie.string = ie.stream = ie.pattern = ie.path = ie.fs = ie.errno = ie.array = void 0;
2211
+ const o = jn();
2212
+ ie.array = o;
2213
+ const a = Gn();
2214
+ ie.errno = a;
2215
+ const l = Un();
2216
+ ie.fs = l;
2217
+ const u = Wn();
2218
+ ie.path = u;
2219
+ const r = os();
2220
+ ie.pattern = r;
2221
+ const t = cs();
2222
+ ie.stream = t;
2223
+ const n = ls();
2224
+ return ie.string = n, ie;
2225
+ }
2226
+ var Lr;
2227
+ function fs() {
2228
+ if (Lr) return se;
2229
+ Lr = 1, Object.defineProperty(se, "__esModule", { value: !0 }), se.convertPatternGroupToTask = se.convertPatternGroupsToTasks = se.groupPatternsByBaseDirectory = se.getNegativePatternsAsPositive = se.getPositivePatterns = se.convertPatternsToTasks = se.generate = void 0;
2230
+ const o = Te();
2231
+ function a(s, p) {
2232
+ const h = l(s, p), d = l(p.ignore, p), y = r(h), T = t(h, d), C = y.filter((c) => o.pattern.isStaticPattern(c, p)), m = y.filter((c) => o.pattern.isDynamicPattern(c, p)), S = u(
2233
+ C,
2234
+ T,
2235
+ /* dynamic */
2236
+ !1
2237
+ ), _ = u(
2238
+ m,
2239
+ T,
2240
+ /* dynamic */
2241
+ !0
2242
+ );
2243
+ return S.concat(_);
2244
+ }
2245
+ se.generate = a;
2246
+ function l(s, p) {
2247
+ let h = s;
2248
+ return p.braceExpansion && (h = o.pattern.expandPatternsWithBraceExpansion(h)), p.baseNameMatch && (h = h.map((d) => d.includes("/") ? d : `**/${d}`)), h.map((d) => o.pattern.removeDuplicateSlashes(d));
2249
+ }
2250
+ function u(s, p, h) {
2251
+ const d = [], y = o.pattern.getPatternsOutsideCurrentDirectory(s), T = o.pattern.getPatternsInsideCurrentDirectory(s), C = n(y), m = n(T);
2252
+ return d.push(...e(C, p, h)), "." in m ? d.push(i(".", T, p, h)) : d.push(...e(m, p, h)), d;
2253
+ }
2254
+ se.convertPatternsToTasks = u;
2255
+ function r(s) {
2256
+ return o.pattern.getPositivePatterns(s);
2257
+ }
2258
+ se.getPositivePatterns = r;
2259
+ function t(s, p) {
2260
+ return o.pattern.getNegativePatterns(s).concat(p).map(o.pattern.convertToPositivePattern);
2261
+ }
2262
+ se.getNegativePatternsAsPositive = t;
2263
+ function n(s) {
2264
+ const p = {};
2265
+ return s.reduce((h, d) => {
2266
+ const y = o.pattern.getBaseDirectory(d);
2267
+ return y in h ? h[y].push(d) : h[y] = [d], h;
2268
+ }, p);
2269
+ }
2270
+ se.groupPatternsByBaseDirectory = n;
2271
+ function e(s, p, h) {
2272
+ return Object.keys(s).map((d) => i(d, s[d], p, h));
2273
+ }
2274
+ se.convertPatternGroupsToTasks = e;
2275
+ function i(s, p, h, d) {
2276
+ return {
2277
+ dynamic: d,
2278
+ positive: p,
2279
+ negative: h,
2280
+ base: s,
2281
+ patterns: [].concat(p, h.map(o.pattern.convertToNegativePattern))
2282
+ };
2283
+ }
2284
+ return se.convertPatternGroupToTask = i, se;
2285
+ }
2286
+ var Ue = {}, We = {}, de = {}, Ve = {}, Ke = {}, ve = {}, Re = {}, Ee = {}, De = {}, kr;
2287
+ function hs() {
2288
+ if (kr) return De;
2289
+ kr = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.read = void 0;
2290
+ function o(u, r, t) {
2291
+ r.fs.lstat(u, (n, e) => {
2292
+ if (n !== null) {
2293
+ a(t, n);
2294
+ return;
2295
+ }
2296
+ if (!e.isSymbolicLink() || !r.followSymbolicLink) {
2297
+ l(t, e);
2298
+ return;
2299
+ }
2300
+ r.fs.stat(u, (i, s) => {
2301
+ if (i !== null) {
2302
+ if (r.throwErrorOnBrokenSymbolicLink) {
2303
+ a(t, i);
2304
+ return;
2305
+ }
2306
+ l(t, e);
2307
+ return;
2308
+ }
2309
+ r.markSymbolicLink && (s.isSymbolicLink = () => !0), l(t, s);
2310
+ });
2311
+ });
2312
+ }
2313
+ De.read = o;
2314
+ function a(u, r) {
2315
+ u(r);
2316
+ }
2317
+ function l(u, r) {
2318
+ u(null, r);
2319
+ }
2320
+ return De;
2321
+ }
2322
+ var Ie = {}, Mr;
2323
+ function ps() {
2324
+ if (Mr) return Ie;
2325
+ Mr = 1, Object.defineProperty(Ie, "__esModule", { value: !0 }), Ie.read = void 0;
2326
+ function o(a, l) {
2327
+ const u = l.fs.lstatSync(a);
2328
+ if (!u.isSymbolicLink() || !l.followSymbolicLink)
2329
+ return u;
2330
+ try {
2331
+ const r = l.fs.statSync(a);
2332
+ return l.markSymbolicLink && (r.isSymbolicLink = () => !0), r;
2333
+ } catch (r) {
2334
+ if (!l.throwErrorOnBrokenSymbolicLink)
2335
+ return u;
2336
+ throw r;
2337
+ }
2338
+ }
2339
+ return Ie.read = o, Ie;
2340
+ }
2341
+ var Qe = {}, Ft = {}, Hr;
2342
+ function ds() {
2343
+ return Hr || (Hr = 1, (function(o) {
2344
+ Object.defineProperty(o, "__esModule", { value: !0 }), o.createFileSystemAdapter = o.FILE_SYSTEM_ADAPTER = void 0;
2345
+ const a = Qt;
2346
+ o.FILE_SYSTEM_ADAPTER = {
2347
+ lstat: a.lstat,
2348
+ stat: a.stat,
2349
+ lstatSync: a.lstatSync,
2350
+ statSync: a.statSync
2351
+ };
2352
+ function l(u) {
2353
+ return u === void 0 ? o.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, o.FILE_SYSTEM_ADAPTER), u);
2354
+ }
2355
+ o.createFileSystemAdapter = l;
2356
+ })(Ft)), Ft;
2357
+ }
2358
+ var Dr;
2359
+ function _s() {
2360
+ if (Dr) return Qe;
2361
+ Dr = 1, Object.defineProperty(Qe, "__esModule", { value: !0 });
2362
+ const o = ds();
2363
+ class a {
2364
+ constructor(u = {}) {
2365
+ this._options = u, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = o.createFileSystemAdapter(this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0);
2366
+ }
2367
+ _getValue(u, r) {
2368
+ return u ?? r;
2369
+ }
2370
+ }
2371
+ return Qe.default = a, Qe;
2372
+ }
2373
+ var Ir;
2374
+ function Le() {
2375
+ if (Ir) return Ee;
2376
+ Ir = 1, Object.defineProperty(Ee, "__esModule", { value: !0 }), Ee.statSync = Ee.stat = Ee.Settings = void 0;
2377
+ const o = hs(), a = ps(), l = _s();
2378
+ Ee.Settings = l.default;
2379
+ function u(n, e, i) {
2380
+ if (typeof e == "function") {
2381
+ o.read(n, t(), e);
2382
+ return;
2383
+ }
2384
+ o.read(n, t(e), i);
2385
+ }
2386
+ Ee.stat = u;
2387
+ function r(n, e) {
2388
+ const i = t(e);
2389
+ return a.read(n, i);
2390
+ }
2391
+ Ee.statSync = r;
2392
+ function t(n = {}) {
2393
+ return n instanceof l.default ? n : new l.default(n);
2394
+ }
2395
+ return Ee;
2396
+ }
2397
+ /*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2398
+ var Bt, Nr;
2399
+ function gs() {
2400
+ if (Nr) return Bt;
2401
+ Nr = 1;
2402
+ let o;
2403
+ return Bt = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : Hn) : (a) => (o || (o = Promise.resolve())).then(a).catch((l) => setTimeout(() => {
2404
+ throw l;
2405
+ }, 0)), Bt;
2406
+ }
2407
+ /*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2408
+ var jt, qr;
2409
+ function ys() {
2410
+ if (qr) return jt;
2411
+ qr = 1, jt = a;
2412
+ const o = gs();
2413
+ function a(l, u) {
2414
+ let r, t, n, e = !0;
2415
+ Array.isArray(l) ? (r = [], t = l.length) : (n = Object.keys(l), r = {}, t = n.length);
2416
+ function i(p) {
2417
+ function h() {
2418
+ u && u(p, r), u = null;
2419
+ }
2420
+ e ? o(h) : h();
2421
+ }
2422
+ function s(p, h, d) {
2423
+ r[p] = d, (--t === 0 || h) && i(h);
2424
+ }
2425
+ t ? n ? n.forEach(function(p) {
2426
+ l[p](function(h, d) {
2427
+ s(p, h, d);
2428
+ });
2429
+ }) : l.forEach(function(p, h) {
2430
+ p(function(d, y) {
2431
+ s(h, d, y);
2432
+ });
2433
+ }) : i(null), e = !1;
2434
+ }
2435
+ return jt;
2436
+ }
2437
+ var Ne = {}, Fr;
2438
+ function Cn() {
2439
+ if (Fr) return Ne;
2440
+ Fr = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
2441
+ const o = process.versions.node.split(".");
2442
+ if (o[0] === void 0 || o[1] === void 0)
2443
+ throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
2444
+ const a = Number.parseInt(o[0], 10), l = Number.parseInt(o[1], 10), u = 10, r = 10, t = a > u, n = a === u && l >= r;
2445
+ return Ne.IS_SUPPORT_READDIR_WITH_FILE_TYPES = t || n, Ne;
2446
+ }
2447
+ var qe = {}, Fe = {}, Br;
2448
+ function Ss() {
2449
+ if (Br) return Fe;
2450
+ Br = 1, Object.defineProperty(Fe, "__esModule", { value: !0 }), Fe.createDirentFromStats = void 0;
2451
+ class o {
2452
+ constructor(u, r) {
2453
+ this.name = u, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r.isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink = r.isSymbolicLink.bind(r);
2454
+ }
2455
+ }
2456
+ function a(l, u) {
2457
+ return new o(l, u);
2458
+ }
2459
+ return Fe.createDirentFromStats = a, Fe;
2460
+ }
2461
+ var jr;
2462
+ function Tn() {
2463
+ if (jr) return qe;
2464
+ jr = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.fs = void 0;
2465
+ const o = Ss();
2466
+ return qe.fs = o, qe;
2467
+ }
2468
+ var Be = {}, Gr;
2469
+ function On() {
2470
+ if (Gr) return Be;
2471
+ Gr = 1, Object.defineProperty(Be, "__esModule", { value: !0 }), Be.joinPathSegments = void 0;
2472
+ function o(a, l, u) {
2473
+ return a.endsWith(u) ? a + l : a + u + l;
2474
+ }
2475
+ return Be.joinPathSegments = o, Be;
2476
+ }
2477
+ var Ur;
2478
+ function ms() {
2479
+ if (Ur) return Re;
2480
+ Ur = 1, Object.defineProperty(Re, "__esModule", { value: !0 }), Re.readdir = Re.readdirWithFileTypes = Re.read = void 0;
2481
+ const o = Le(), a = ys(), l = Cn(), u = Tn(), r = On();
2482
+ function t(h, d, y) {
2483
+ if (!d.stats && l.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
2484
+ n(h, d, y);
2485
+ return;
2486
+ }
2487
+ i(h, d, y);
2488
+ }
2489
+ Re.read = t;
2490
+ function n(h, d, y) {
2491
+ d.fs.readdir(h, { withFileTypes: !0 }, (T, C) => {
2492
+ if (T !== null) {
2493
+ s(y, T);
2494
+ return;
2495
+ }
2496
+ const m = C.map((_) => ({
2497
+ dirent: _,
2498
+ name: _.name,
2499
+ path: r.joinPathSegments(h, _.name, d.pathSegmentSeparator)
2500
+ }));
2501
+ if (!d.followSymbolicLinks) {
2502
+ p(y, m);
2503
+ return;
2504
+ }
2505
+ const S = m.map((_) => e(_, d));
2506
+ a(S, (_, c) => {
2507
+ if (_ !== null) {
2508
+ s(y, _);
2509
+ return;
2510
+ }
2511
+ p(y, c);
2512
+ });
2513
+ });
2514
+ }
2515
+ Re.readdirWithFileTypes = n;
2516
+ function e(h, d) {
2517
+ return (y) => {
2518
+ if (!h.dirent.isSymbolicLink()) {
2519
+ y(null, h);
2520
+ return;
2521
+ }
2522
+ d.fs.stat(h.path, (T, C) => {
2523
+ if (T !== null) {
2524
+ if (d.throwErrorOnBrokenSymbolicLink) {
2525
+ y(T);
2526
+ return;
2527
+ }
2528
+ y(null, h);
2529
+ return;
2530
+ }
2531
+ h.dirent = u.fs.createDirentFromStats(h.name, C), y(null, h);
2532
+ });
2533
+ };
2534
+ }
2535
+ function i(h, d, y) {
2536
+ d.fs.readdir(h, (T, C) => {
2537
+ if (T !== null) {
2538
+ s(y, T);
2539
+ return;
2540
+ }
2541
+ const m = C.map((S) => {
2542
+ const _ = r.joinPathSegments(h, S, d.pathSegmentSeparator);
2543
+ return (c) => {
2544
+ o.stat(_, d.fsStatSettings, (f, g) => {
2545
+ if (f !== null) {
2546
+ c(f);
2547
+ return;
2548
+ }
2549
+ const R = {
2550
+ name: S,
2551
+ path: _,
2552
+ dirent: u.fs.createDirentFromStats(S, g)
2553
+ };
2554
+ d.stats && (R.stats = g), c(null, R);
2555
+ });
2556
+ };
2557
+ });
2558
+ a(m, (S, _) => {
2559
+ if (S !== null) {
2560
+ s(y, S);
2561
+ return;
2562
+ }
2563
+ p(y, _);
2564
+ });
2565
+ });
2566
+ }
2567
+ Re.readdir = i;
2568
+ function s(h, d) {
2569
+ h(d);
2570
+ }
2571
+ function p(h, d) {
2572
+ h(null, d);
2573
+ }
2574
+ return Re;
2575
+ }
2576
+ var Ae = {}, Wr;
2577
+ function vs() {
2578
+ if (Wr) return Ae;
2579
+ Wr = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.readdir = Ae.readdirWithFileTypes = Ae.read = void 0;
2580
+ const o = Le(), a = Cn(), l = Tn(), u = On();
2581
+ function r(e, i) {
2582
+ return !i.stats && a.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? t(e, i) : n(e, i);
2583
+ }
2584
+ Ae.read = r;
2585
+ function t(e, i) {
2586
+ return i.fs.readdirSync(e, { withFileTypes: !0 }).map((p) => {
2587
+ const h = {
2588
+ dirent: p,
2589
+ name: p.name,
2590
+ path: u.joinPathSegments(e, p.name, i.pathSegmentSeparator)
2591
+ };
2592
+ if (h.dirent.isSymbolicLink() && i.followSymbolicLinks)
2593
+ try {
2594
+ const d = i.fs.statSync(h.path);
2595
+ h.dirent = l.fs.createDirentFromStats(h.name, d);
2596
+ } catch (d) {
2597
+ if (i.throwErrorOnBrokenSymbolicLink)
2598
+ throw d;
2599
+ }
2600
+ return h;
2601
+ });
2602
+ }
2603
+ Ae.readdirWithFileTypes = t;
2604
+ function n(e, i) {
2605
+ return i.fs.readdirSync(e).map((p) => {
2606
+ const h = u.joinPathSegments(e, p, i.pathSegmentSeparator), d = o.statSync(h, i.fsStatSettings), y = {
2607
+ name: p,
2608
+ path: h,
2609
+ dirent: l.fs.createDirentFromStats(p, d)
2610
+ };
2611
+ return i.stats && (y.stats = d), y;
2612
+ });
2613
+ }
2614
+ return Ae.readdir = n, Ae;
2615
+ }
2616
+ var Xe = {}, Gt = {}, Vr;
2617
+ function Rs() {
2618
+ return Vr || (Vr = 1, (function(o) {
2619
+ Object.defineProperty(o, "__esModule", { value: !0 }), o.createFileSystemAdapter = o.FILE_SYSTEM_ADAPTER = void 0;
2620
+ const a = Qt;
2621
+ o.FILE_SYSTEM_ADAPTER = {
2622
+ lstat: a.lstat,
2623
+ stat: a.stat,
2624
+ lstatSync: a.lstatSync,
2625
+ statSync: a.statSync,
2626
+ readdir: a.readdir,
2627
+ readdirSync: a.readdirSync
2628
+ };
2629
+ function l(u) {
2630
+ return u === void 0 ? o.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, o.FILE_SYSTEM_ADAPTER), u);
2631
+ }
2632
+ o.createFileSystemAdapter = l;
2633
+ })(Gt)), Gt;
2634
+ }
2635
+ var Kr;
2636
+ function Es() {
2637
+ if (Kr) return Xe;
2638
+ Kr = 1, Object.defineProperty(Xe, "__esModule", { value: !0 });
2639
+ const o = Se, a = Le(), l = Rs();
2640
+ class u {
2641
+ constructor(t = {}) {
2642
+ this._options = t, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = l.createFileSystemAdapter(this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, o.sep), this.stats = this._getValue(this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this.fsStatSettings = new a.Settings({
2643
+ followSymbolicLink: this.followSymbolicLinks,
2644
+ fs: this.fs,
2645
+ throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
2646
+ });
2647
+ }
2648
+ _getValue(t, n) {
2649
+ return t ?? n;
2650
+ }
2651
+ }
2652
+ return Xe.default = u, Xe;
2653
+ }
2654
+ var Qr;
2655
+ function Zt() {
2656
+ if (Qr) return ve;
2657
+ Qr = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.Settings = ve.scandirSync = ve.scandir = void 0;
2658
+ const o = ms(), a = vs(), l = Es();
2659
+ ve.Settings = l.default;
2660
+ function u(n, e, i) {
2661
+ if (typeof e == "function") {
2662
+ o.read(n, t(), e);
2663
+ return;
2664
+ }
2665
+ o.read(n, t(e), i);
2666
+ }
2667
+ ve.scandir = u;
2668
+ function r(n, e) {
2669
+ const i = t(e);
2670
+ return a.read(n, i);
2671
+ }
2672
+ ve.scandirSync = r;
2673
+ function t(n = {}) {
2674
+ return n instanceof l.default ? n : new l.default(n);
2675
+ }
2676
+ return ve;
2677
+ }
2678
+ var Ye = { exports: {} }, Ut, Xr;
2679
+ function As() {
2680
+ if (Xr) return Ut;
2681
+ Xr = 1;
2682
+ function o(a) {
2683
+ var l = new a(), u = l;
2684
+ function r() {
2685
+ var n = l;
2686
+ return n.next ? l = n.next : (l = new a(), u = l), n.next = null, n;
2687
+ }
2688
+ function t(n) {
2689
+ u.next = n, u = n;
2690
+ }
2691
+ return {
2692
+ get: r,
2693
+ release: t
2694
+ };
2695
+ }
2696
+ return Ut = o, Ut;
2697
+ }
2698
+ var Yr;
2699
+ function bs() {
2700
+ if (Yr) return Ye.exports;
2701
+ Yr = 1;
2702
+ var o = As();
2703
+ function a(t, n, e) {
2704
+ if (typeof t == "function" && (e = n, n = t, t = null), !(e >= 1))
2705
+ throw new Error("fastqueue concurrency must be equal to or greater than 1");
2706
+ var i = o(u), s = null, p = null, h = 0, d = null, y = {
2707
+ push: f,
2708
+ drain: l,
2709
+ saturated: l,
2710
+ pause: C,
2711
+ paused: !1,
2712
+ get concurrency() {
2713
+ return e;
2714
+ },
2715
+ set concurrency(k) {
2716
+ if (!(k >= 1))
2717
+ throw new Error("fastqueue concurrency must be equal to or greater than 1");
2718
+ if (e = k, !y.paused)
2719
+ for (; s && h < e; )
2720
+ h++, R();
2721
+ },
2722
+ running: T,
2723
+ resume: _,
2724
+ idle: c,
2725
+ length: m,
2726
+ getQueue: S,
2727
+ unshift: g,
2728
+ empty: l,
2729
+ kill: v,
2730
+ killAndDrain: P,
2731
+ error: D,
2732
+ abort: O
2733
+ };
2734
+ return y;
2735
+ function T() {
2736
+ return h;
2737
+ }
2738
+ function C() {
2739
+ y.paused = !0;
2740
+ }
2741
+ function m() {
2742
+ for (var k = s, M = 0; k; )
2743
+ k = k.next, M++;
2744
+ return M;
2745
+ }
2746
+ function S() {
2747
+ for (var k = s, M = []; k; )
2748
+ M.push(k.value), k = k.next;
2749
+ return M;
2750
+ }
2751
+ function _() {
2752
+ if (y.paused) {
2753
+ if (y.paused = !1, s === null) {
2754
+ h++, R();
2755
+ return;
2756
+ }
2757
+ for (; s && h < e; )
2758
+ h++, R();
2759
+ }
2760
+ }
2761
+ function c() {
2762
+ return h === 0 && y.length() === 0;
2763
+ }
2764
+ function f(k, M) {
2765
+ var x = i.get();
2766
+ x.context = t, x.release = R, x.value = k, x.callback = M || l, x.errorHandler = d, h >= e || y.paused ? p ? (p.next = x, p = x) : (s = x, p = x, y.saturated()) : (h++, n.call(t, x.value, x.worked));
2767
+ }
2768
+ function g(k, M) {
2769
+ var x = i.get();
2770
+ x.context = t, x.release = R, x.value = k, x.callback = M || l, x.errorHandler = d, h >= e || y.paused ? s ? (x.next = s, s = x) : (s = x, p = x, y.saturated()) : (h++, n.call(t, x.value, x.worked));
2771
+ }
2772
+ function R(k) {
2773
+ k && i.release(k);
2774
+ var M = s;
2775
+ M && h <= e ? y.paused ? h-- : (p === s && (p = null), s = M.next, M.next = null, n.call(t, M.value, M.worked), p === null && y.empty()) : --h === 0 && y.drain();
2776
+ }
2777
+ function v() {
2778
+ s = null, p = null, y.drain = l;
2779
+ }
2780
+ function P() {
2781
+ s = null, p = null, y.drain(), y.drain = l;
2782
+ }
2783
+ function O() {
2784
+ var k = s;
2785
+ for (s = null, p = null; k; ) {
2786
+ var M = k.next, x = k.callback, U = k.errorHandler, N = k.value, q = k.context;
2787
+ k.value = null, k.callback = l, k.errorHandler = null, U && U(new Error("abort"), N), x.call(q, new Error("abort")), k.release(k), k = M;
2788
+ }
2789
+ y.drain = l;
2790
+ }
2791
+ function D(k) {
2792
+ d = k;
2793
+ }
2794
+ }
2795
+ function l() {
2796
+ }
2797
+ function u() {
2798
+ this.value = null, this.callback = l, this.next = null, this.release = l, this.context = null, this.errorHandler = null;
2799
+ var t = this;
2800
+ this.worked = function(e, i) {
2801
+ var s = t.callback, p = t.errorHandler, h = t.value;
2802
+ t.value = null, t.callback = l, t.errorHandler && p(e, h), s.call(t.context, e, i), t.release(t);
2803
+ };
2804
+ }
2805
+ function r(t, n, e) {
2806
+ typeof t == "function" && (e = n, n = t, t = null);
2807
+ function i(C, m) {
2808
+ n.call(this, C).then(function(S) {
2809
+ m(null, S);
2810
+ }, m);
2811
+ }
2812
+ var s = a(t, i, e), p = s.push, h = s.unshift;
2813
+ return s.push = d, s.unshift = y, s.drained = T, s;
2814
+ function d(C) {
2815
+ var m = new Promise(function(S, _) {
2816
+ p(C, function(c, f) {
2817
+ if (c) {
2818
+ _(c);
2819
+ return;
2820
+ }
2821
+ S(f);
2822
+ });
2823
+ });
2824
+ return m.catch(l), m;
2825
+ }
2826
+ function y(C) {
2827
+ var m = new Promise(function(S, _) {
2828
+ h(C, function(c, f) {
2829
+ if (c) {
2830
+ _(c);
2831
+ return;
2832
+ }
2833
+ S(f);
2834
+ });
2835
+ });
2836
+ return m.catch(l), m;
2837
+ }
2838
+ function T() {
2839
+ var C = new Promise(function(m) {
2840
+ process.nextTick(function() {
2841
+ if (s.idle())
2842
+ m();
2843
+ else {
2844
+ var S = s.drain;
2845
+ s.drain = function() {
2846
+ typeof S == "function" && S(), m(), s.drain = S;
2847
+ };
2848
+ }
2849
+ });
2850
+ });
2851
+ return C;
2852
+ }
2853
+ }
2854
+ return Ye.exports = a, Ye.exports.promise = r, Ye.exports;
2855
+ }
2856
+ var _e = {}, Zr;
2857
+ function zt() {
2858
+ if (Zr) return _e;
2859
+ Zr = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.joinPathSegments = _e.replacePathSegmentSeparator = _e.isAppliedFilter = _e.isFatalError = void 0;
2860
+ function o(r, t) {
2861
+ return r.errorFilter === null ? !0 : !r.errorFilter(t);
2862
+ }
2863
+ _e.isFatalError = o;
2864
+ function a(r, t) {
2865
+ return r === null || r(t);
2866
+ }
2867
+ _e.isAppliedFilter = a;
2868
+ function l(r, t) {
2869
+ return r.split(/[/\\]/).join(t);
2870
+ }
2871
+ _e.replacePathSegmentSeparator = l;
2872
+ function u(r, t, n) {
2873
+ return r === "" ? t : r.endsWith(n) ? r + t : r + n + t;
2874
+ }
2875
+ return _e.joinPathSegments = u, _e;
2876
+ }
2877
+ var Ze = {}, zr;
2878
+ function wn() {
2879
+ if (zr) return Ze;
2880
+ zr = 1, Object.defineProperty(Ze, "__esModule", { value: !0 });
2881
+ const o = zt();
2882
+ class a {
2883
+ constructor(u, r) {
2884
+ this._root = u, this._settings = r, this._root = o.replacePathSegmentSeparator(u, r.pathSegmentSeparator);
2885
+ }
2886
+ }
2887
+ return Ze.default = a, Ze;
2888
+ }
2889
+ var Jr;
2890
+ function $n() {
2891
+ if (Jr) return Ke;
2892
+ Jr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 });
2893
+ const o = In, a = Zt(), l = bs(), u = zt(), r = wn();
2894
+ class t extends r.default {
2895
+ constructor(e, i) {
2896
+ super(e, i), this._settings = i, this._scandir = a.scandir, this._emitter = new o.EventEmitter(), this._queue = l(this._worker.bind(this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => {
2897
+ this._isFatalError || this._emitter.emit("end");
2898
+ };
2899
+ }
2900
+ read() {
2901
+ return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => {
2902
+ this._pushToQueue(this._root, this._settings.basePath);
2903
+ }), this._emitter;
2904
+ }
2905
+ get isDestroyed() {
2906
+ return this._isDestroyed;
2907
+ }
2908
+ destroy() {
2909
+ if (this._isDestroyed)
2910
+ throw new Error("The reader is already destroyed");
2911
+ this._isDestroyed = !0, this._queue.killAndDrain();
2912
+ }
2913
+ onEntry(e) {
2914
+ this._emitter.on("entry", e);
2915
+ }
2916
+ onError(e) {
2917
+ this._emitter.once("error", e);
2918
+ }
2919
+ onEnd(e) {
2920
+ this._emitter.once("end", e);
2921
+ }
2922
+ _pushToQueue(e, i) {
2923
+ const s = { directory: e, base: i };
2924
+ this._queue.push(s, (p) => {
2925
+ p !== null && this._handleError(p);
2926
+ });
2927
+ }
2928
+ _worker(e, i) {
2929
+ this._scandir(e.directory, this._settings.fsScandirSettings, (s, p) => {
2930
+ if (s !== null) {
2931
+ i(s, void 0);
2932
+ return;
2933
+ }
2934
+ for (const h of p)
2935
+ this._handleEntry(h, e.base);
2936
+ i(null, void 0);
2937
+ });
2938
+ }
2939
+ _handleError(e) {
2940
+ this._isDestroyed || !u.isFatalError(this._settings, e) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("error", e));
2941
+ }
2942
+ _handleEntry(e, i) {
2943
+ if (this._isDestroyed || this._isFatalError)
2944
+ return;
2945
+ const s = e.path;
2946
+ i !== void 0 && (e.path = u.joinPathSegments(i, e.name, this._settings.pathSegmentSeparator)), u.isAppliedFilter(this._settings.entryFilter, e) && this._emitEntry(e), e.dirent.isDirectory() && u.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(s, i === void 0 ? void 0 : e.path);
2947
+ }
2948
+ _emitEntry(e) {
2949
+ this._emitter.emit("entry", e);
2950
+ }
2951
+ }
2952
+ return Ke.default = t, Ke;
2953
+ }
2954
+ var en;
2955
+ function Ps() {
2956
+ if (en) return Ve;
2957
+ en = 1, Object.defineProperty(Ve, "__esModule", { value: !0 });
2958
+ const o = $n();
2959
+ class a {
2960
+ constructor(t, n) {
2961
+ this._root = t, this._settings = n, this._reader = new o.default(this._root, this._settings), this._storage = [];
2962
+ }
2963
+ read(t) {
2964
+ this._reader.onError((n) => {
2965
+ l(t, n);
2966
+ }), this._reader.onEntry((n) => {
2967
+ this._storage.push(n);
2968
+ }), this._reader.onEnd(() => {
2969
+ u(t, this._storage);
2970
+ }), this._reader.read();
2971
+ }
2972
+ }
2973
+ Ve.default = a;
2974
+ function l(r, t) {
2975
+ r(t);
2976
+ }
2977
+ function u(r, t) {
2978
+ r(null, t);
2979
+ }
2980
+ return Ve;
2981
+ }
2982
+ var ze = {}, tn;
2983
+ function xs() {
2984
+ if (tn) return ze;
2985
+ tn = 1, Object.defineProperty(ze, "__esModule", { value: !0 });
2986
+ const o = dt, a = $n();
2987
+ class l {
2988
+ constructor(r, t) {
2989
+ this._root = r, this._settings = t, this._reader = new a.default(this._root, this._settings), this._stream = new o.Readable({
2990
+ objectMode: !0,
2991
+ read: () => {
2992
+ },
2993
+ destroy: () => {
2994
+ this._reader.isDestroyed || this._reader.destroy();
2995
+ }
2996
+ });
2997
+ }
2998
+ read() {
2999
+ return this._reader.onError((r) => {
3000
+ this._stream.emit("error", r);
3001
+ }), this._reader.onEntry((r) => {
3002
+ this._stream.push(r);
3003
+ }), this._reader.onEnd(() => {
3004
+ this._stream.push(null);
3005
+ }), this._reader.read(), this._stream;
3006
+ }
3007
+ }
3008
+ return ze.default = l, ze;
3009
+ }
3010
+ var Je = {}, et = {}, rn;
3011
+ function Cs() {
3012
+ if (rn) return et;
3013
+ rn = 1, Object.defineProperty(et, "__esModule", { value: !0 });
3014
+ const o = Zt(), a = zt(), l = wn();
3015
+ class u extends l.default {
3016
+ constructor() {
3017
+ super(...arguments), this._scandir = o.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set();
3018
+ }
3019
+ read() {
3020
+ return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage;
3021
+ }
3022
+ _pushToQueue(t, n) {
3023
+ this._queue.add({ directory: t, base: n });
3024
+ }
3025
+ _handleQueue() {
3026
+ for (const t of this._queue.values())
3027
+ this._handleDirectory(t.directory, t.base);
3028
+ }
3029
+ _handleDirectory(t, n) {
3030
+ try {
3031
+ const e = this._scandir(t, this._settings.fsScandirSettings);
3032
+ for (const i of e)
3033
+ this._handleEntry(i, n);
3034
+ } catch (e) {
3035
+ this._handleError(e);
3036
+ }
3037
+ }
3038
+ _handleError(t) {
3039
+ if (a.isFatalError(this._settings, t))
3040
+ throw t;
3041
+ }
3042
+ _handleEntry(t, n) {
3043
+ const e = t.path;
3044
+ n !== void 0 && (t.path = a.joinPathSegments(n, t.name, this._settings.pathSegmentSeparator)), a.isAppliedFilter(this._settings.entryFilter, t) && this._pushToStorage(t), t.dirent.isDirectory() && a.isAppliedFilter(this._settings.deepFilter, t) && this._pushToQueue(e, n === void 0 ? void 0 : t.path);
3045
+ }
3046
+ _pushToStorage(t) {
3047
+ this._storage.push(t);
3048
+ }
3049
+ }
3050
+ return et.default = u, et;
3051
+ }
3052
+ var nn;
3053
+ function Ts() {
3054
+ if (nn) return Je;
3055
+ nn = 1, Object.defineProperty(Je, "__esModule", { value: !0 });
3056
+ const o = Cs();
3057
+ class a {
3058
+ constructor(u, r) {
3059
+ this._root = u, this._settings = r, this._reader = new o.default(this._root, this._settings);
3060
+ }
3061
+ read() {
3062
+ return this._reader.read();
3063
+ }
3064
+ }
3065
+ return Je.default = a, Je;
3066
+ }
3067
+ var tt = {}, sn;
3068
+ function Os() {
3069
+ if (sn) return tt;
3070
+ sn = 1, Object.defineProperty(tt, "__esModule", { value: !0 });
3071
+ const o = Se, a = Zt();
3072
+ class l {
3073
+ constructor(r = {}) {
3074
+ this._options = r, this.basePath = this._getValue(this._options.basePath, void 0), this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY), this.deepFilter = this._getValue(this._options.deepFilter, null), this.entryFilter = this._getValue(this._options.entryFilter, null), this.errorFilter = this._getValue(this._options.errorFilter, null), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, o.sep), this.fsScandirSettings = new a.Settings({
3075
+ followSymbolicLinks: this._options.followSymbolicLinks,
3076
+ fs: this._options.fs,
3077
+ pathSegmentSeparator: this._options.pathSegmentSeparator,
3078
+ stats: this._options.stats,
3079
+ throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
3080
+ });
3081
+ }
3082
+ _getValue(r, t) {
3083
+ return r ?? t;
3084
+ }
3085
+ }
3086
+ return tt.default = l, tt;
3087
+ }
3088
+ var an;
3089
+ function Jt() {
3090
+ if (an) return de;
3091
+ an = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.Settings = de.walkStream = de.walkSync = de.walk = void 0;
3092
+ const o = Ps(), a = xs(), l = Ts(), u = Os();
3093
+ de.Settings = u.default;
3094
+ function r(i, s, p) {
3095
+ if (typeof s == "function") {
3096
+ new o.default(i, e()).read(s);
3097
+ return;
3098
+ }
3099
+ new o.default(i, e(s)).read(p);
3100
+ }
3101
+ de.walk = r;
3102
+ function t(i, s) {
3103
+ const p = e(s);
3104
+ return new l.default(i, p).read();
3105
+ }
3106
+ de.walkSync = t;
3107
+ function n(i, s) {
3108
+ const p = e(s);
3109
+ return new a.default(i, p).read();
3110
+ }
3111
+ de.walkStream = n;
3112
+ function e(i = {}) {
3113
+ return i instanceof u.default ? i : new u.default(i);
3114
+ }
3115
+ return de;
3116
+ }
3117
+ var rt = {}, on;
3118
+ function er() {
3119
+ if (on) return rt;
3120
+ on = 1, Object.defineProperty(rt, "__esModule", { value: !0 });
3121
+ const o = Se, a = Le(), l = Te();
3122
+ class u {
3123
+ constructor(t) {
3124
+ this._settings = t, this._fsStatSettings = new a.Settings({
3125
+ followSymbolicLink: this._settings.followSymbolicLinks,
3126
+ fs: this._settings.fs,
3127
+ throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
3128
+ });
3129
+ }
3130
+ _getFullEntryPath(t) {
3131
+ return o.resolve(this._settings.cwd, t);
3132
+ }
3133
+ _makeEntry(t, n) {
3134
+ const e = {
3135
+ name: n,
3136
+ path: n,
3137
+ dirent: l.fs.createDirentFromStats(n, t)
3138
+ };
3139
+ return this._settings.stats && (e.stats = t), e;
3140
+ }
3141
+ _isFatalError(t) {
3142
+ return !l.errno.isEnoentCodeError(t) && !this._settings.suppressErrors;
3143
+ }
3144
+ }
3145
+ return rt.default = u, rt;
3146
+ }
3147
+ var nt = {}, un;
3148
+ function Ln() {
3149
+ if (un) return nt;
3150
+ un = 1, Object.defineProperty(nt, "__esModule", { value: !0 });
3151
+ const o = dt, a = Le(), l = Jt(), u = er();
3152
+ class r extends u.default {
3153
+ constructor() {
3154
+ super(...arguments), this._walkStream = l.walkStream, this._stat = a.stat;
3155
+ }
3156
+ dynamic(n, e) {
3157
+ return this._walkStream(n, e);
3158
+ }
3159
+ static(n, e) {
3160
+ const i = n.map(this._getFullEntryPath, this), s = new o.PassThrough({ objectMode: !0 });
3161
+ s._write = (p, h, d) => this._getEntry(i[p], n[p], e).then((y) => {
3162
+ y !== null && e.entryFilter(y) && s.push(y), p === i.length - 1 && s.end(), d();
3163
+ }).catch(d);
3164
+ for (let p = 0; p < i.length; p++)
3165
+ s.write(p);
3166
+ return s;
3167
+ }
3168
+ _getEntry(n, e, i) {
3169
+ return this._getStat(n).then((s) => this._makeEntry(s, e)).catch((s) => {
3170
+ if (i.errorFilter(s))
3171
+ return null;
3172
+ throw s;
3173
+ });
3174
+ }
3175
+ _getStat(n) {
3176
+ return new Promise((e, i) => {
3177
+ this._stat(n, this._fsStatSettings, (s, p) => s === null ? e(p) : i(s));
3178
+ });
3179
+ }
3180
+ }
3181
+ return nt.default = r, nt;
3182
+ }
3183
+ var cn;
3184
+ function ws() {
3185
+ if (cn) return We;
3186
+ cn = 1, Object.defineProperty(We, "__esModule", { value: !0 });
3187
+ const o = Jt(), a = er(), l = Ln();
3188
+ class u extends a.default {
3189
+ constructor() {
3190
+ super(...arguments), this._walkAsync = o.walk, this._readerStream = new l.default(this._settings);
3191
+ }
3192
+ dynamic(t, n) {
3193
+ return new Promise((e, i) => {
3194
+ this._walkAsync(t, n, (s, p) => {
3195
+ s === null ? e(p) : i(s);
3196
+ });
3197
+ });
3198
+ }
3199
+ async static(t, n) {
3200
+ const e = [], i = this._readerStream.static(t, n);
3201
+ return new Promise((s, p) => {
3202
+ i.once("error", p), i.on("data", (h) => e.push(h)), i.once("end", () => s(e));
3203
+ });
3204
+ }
3205
+ }
3206
+ return We.default = u, We;
3207
+ }
3208
+ var st = {}, it = {}, at = {}, ot = {}, ln;
3209
+ function $s() {
3210
+ if (ln) return ot;
3211
+ ln = 1, Object.defineProperty(ot, "__esModule", { value: !0 });
3212
+ const o = Te();
3213
+ class a {
3214
+ constructor(u, r, t) {
3215
+ this._patterns = u, this._settings = r, this._micromatchOptions = t, this._storage = [], this._fillStorage();
3216
+ }
3217
+ _fillStorage() {
3218
+ for (const u of this._patterns) {
3219
+ const r = this._getPatternSegments(u), t = this._splitSegmentsIntoSections(r);
3220
+ this._storage.push({
3221
+ complete: t.length <= 1,
3222
+ pattern: u,
3223
+ segments: r,
3224
+ sections: t
3225
+ });
3226
+ }
3227
+ }
3228
+ _getPatternSegments(u) {
3229
+ return o.pattern.getPatternParts(u, this._micromatchOptions).map((t) => o.pattern.isDynamicPattern(t, this._settings) ? {
3230
+ dynamic: !0,
3231
+ pattern: t,
3232
+ patternRe: o.pattern.makeRe(t, this._micromatchOptions)
3233
+ } : {
3234
+ dynamic: !1,
3235
+ pattern: t
3236
+ });
3237
+ }
3238
+ _splitSegmentsIntoSections(u) {
3239
+ return o.array.splitWhen(u, (r) => r.dynamic && o.pattern.hasGlobStar(r.pattern));
3240
+ }
3241
+ }
3242
+ return ot.default = a, ot;
3243
+ }
3244
+ var fn;
3245
+ function Ls() {
3246
+ if (fn) return at;
3247
+ fn = 1, Object.defineProperty(at, "__esModule", { value: !0 });
3248
+ const o = $s();
3249
+ class a extends o.default {
3250
+ match(u) {
3251
+ const r = u.split("/"), t = r.length, n = this._storage.filter((e) => !e.complete || e.segments.length > t);
3252
+ for (const e of n) {
3253
+ const i = e.sections[0];
3254
+ if (!e.complete && t > i.length || r.every((p, h) => {
3255
+ const d = e.segments[h];
3256
+ return !!(d.dynamic && d.patternRe.test(p) || !d.dynamic && d.pattern === p);
3257
+ }))
3258
+ return !0;
3259
+ }
3260
+ return !1;
3261
+ }
3262
+ }
3263
+ return at.default = a, at;
3264
+ }
3265
+ var hn;
3266
+ function ks() {
3267
+ if (hn) return it;
3268
+ hn = 1, Object.defineProperty(it, "__esModule", { value: !0 });
3269
+ const o = Te(), a = Ls();
3270
+ class l {
3271
+ constructor(r, t) {
3272
+ this._settings = r, this._micromatchOptions = t;
3273
+ }
3274
+ getFilter(r, t, n) {
3275
+ const e = this._getMatcher(t), i = this._getNegativePatternsRe(n);
3276
+ return (s) => this._filter(r, s, e, i);
3277
+ }
3278
+ _getMatcher(r) {
3279
+ return new a.default(r, this._settings, this._micromatchOptions);
3280
+ }
3281
+ _getNegativePatternsRe(r) {
3282
+ const t = r.filter(o.pattern.isAffectDepthOfReadingPattern);
3283
+ return o.pattern.convertPatternsToRe(t, this._micromatchOptions);
3284
+ }
3285
+ _filter(r, t, n, e) {
3286
+ if (this._isSkippedByDeep(r, t.path) || this._isSkippedSymbolicLink(t))
3287
+ return !1;
3288
+ const i = o.path.removeLeadingDotSegment(t.path);
3289
+ return this._isSkippedByPositivePatterns(i, n) ? !1 : this._isSkippedByNegativePatterns(i, e);
3290
+ }
3291
+ _isSkippedByDeep(r, t) {
3292
+ return this._settings.deep === 1 / 0 ? !1 : this._getEntryLevel(r, t) >= this._settings.deep;
3293
+ }
3294
+ _getEntryLevel(r, t) {
3295
+ const n = t.split("/").length;
3296
+ if (r === "")
3297
+ return n;
3298
+ const e = r.split("/").length;
3299
+ return n - e;
3300
+ }
3301
+ _isSkippedSymbolicLink(r) {
3302
+ return !this._settings.followSymbolicLinks && r.dirent.isSymbolicLink();
3303
+ }
3304
+ _isSkippedByPositivePatterns(r, t) {
3305
+ return !this._settings.baseNameMatch && !t.match(r);
3306
+ }
3307
+ _isSkippedByNegativePatterns(r, t) {
3308
+ return !o.pattern.matchAny(r, t);
3309
+ }
3310
+ }
3311
+ return it.default = l, it;
3312
+ }
3313
+ var ut = {}, pn;
3314
+ function Ms() {
3315
+ if (pn) return ut;
3316
+ pn = 1, Object.defineProperty(ut, "__esModule", { value: !0 });
3317
+ const o = Te();
3318
+ class a {
3319
+ constructor(u, r) {
3320
+ this._settings = u, this._micromatchOptions = r, this.index = /* @__PURE__ */ new Map();
3321
+ }
3322
+ getFilter(u, r) {
3323
+ const [t, n] = o.pattern.partitionAbsoluteAndRelative(r), e = {
3324
+ positive: {
3325
+ all: o.pattern.convertPatternsToRe(u, this._micromatchOptions)
3326
+ },
3327
+ negative: {
3328
+ absolute: o.pattern.convertPatternsToRe(t, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 })),
3329
+ relative: o.pattern.convertPatternsToRe(n, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 }))
3330
+ }
3331
+ };
3332
+ return (i) => this._filter(i, e);
3333
+ }
3334
+ _filter(u, r) {
3335
+ const t = o.path.removeLeadingDotSegment(u.path);
3336
+ if (this._settings.unique && this._isDuplicateEntry(t) || this._onlyFileFilter(u) || this._onlyDirectoryFilter(u))
3337
+ return !1;
3338
+ const n = this._isMatchToPatternsSet(t, r, u.dirent.isDirectory());
3339
+ return this._settings.unique && n && this._createIndexRecord(t), n;
3340
+ }
3341
+ _isDuplicateEntry(u) {
3342
+ return this.index.has(u);
3343
+ }
3344
+ _createIndexRecord(u) {
3345
+ this.index.set(u, void 0);
3346
+ }
3347
+ _onlyFileFilter(u) {
3348
+ return this._settings.onlyFiles && !u.dirent.isFile();
3349
+ }
3350
+ _onlyDirectoryFilter(u) {
3351
+ return this._settings.onlyDirectories && !u.dirent.isDirectory();
3352
+ }
3353
+ _isMatchToPatternsSet(u, r, t) {
3354
+ return !(!this._isMatchToPatterns(u, r.positive.all, t) || this._isMatchToPatterns(u, r.negative.relative, t) || this._isMatchToAbsoluteNegative(u, r.negative.absolute, t));
3355
+ }
3356
+ _isMatchToAbsoluteNegative(u, r, t) {
3357
+ if (r.length === 0)
3358
+ return !1;
3359
+ const n = o.path.makeAbsolute(this._settings.cwd, u);
3360
+ return this._isMatchToPatterns(n, r, t);
3361
+ }
3362
+ _isMatchToPatterns(u, r, t) {
3363
+ if (r.length === 0)
3364
+ return !1;
3365
+ const n = o.pattern.matchAny(u, r);
3366
+ return !n && t ? o.pattern.matchAny(u + "/", r) : n;
3367
+ }
3368
+ }
3369
+ return ut.default = a, ut;
3370
+ }
3371
+ var ct = {}, dn;
3372
+ function Hs() {
3373
+ if (dn) return ct;
3374
+ dn = 1, Object.defineProperty(ct, "__esModule", { value: !0 });
3375
+ const o = Te();
3376
+ class a {
3377
+ constructor(u) {
3378
+ this._settings = u;
3379
+ }
3380
+ getFilter() {
3381
+ return (u) => this._isNonFatalError(u);
3382
+ }
3383
+ _isNonFatalError(u) {
3384
+ return o.errno.isEnoentCodeError(u) || this._settings.suppressErrors;
3385
+ }
3386
+ }
3387
+ return ct.default = a, ct;
3388
+ }
3389
+ var lt = {}, _n;
3390
+ function Ds() {
3391
+ if (_n) return lt;
3392
+ _n = 1, Object.defineProperty(lt, "__esModule", { value: !0 });
3393
+ const o = Te();
3394
+ class a {
3395
+ constructor(u) {
3396
+ this._settings = u;
3397
+ }
3398
+ getTransformer() {
3399
+ return (u) => this._transform(u);
3400
+ }
3401
+ _transform(u) {
3402
+ let r = u.path;
3403
+ return this._settings.absolute && (r = o.path.makeAbsolute(this._settings.cwd, r), r = o.path.unixify(r)), this._settings.markDirectories && u.dirent.isDirectory() && (r += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, u), { path: r }) : r;
3404
+ }
3405
+ }
3406
+ return lt.default = a, lt;
3407
+ }
3408
+ var gn;
3409
+ function tr() {
3410
+ if (gn) return st;
3411
+ gn = 1, Object.defineProperty(st, "__esModule", { value: !0 });
3412
+ const o = Se, a = ks(), l = Ms(), u = Hs(), r = Ds();
3413
+ class t {
3414
+ constructor(e) {
3415
+ this._settings = e, this.errorFilter = new u.default(this._settings), this.entryFilter = new l.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new a.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new r.default(this._settings);
3416
+ }
3417
+ _getRootDirectory(e) {
3418
+ return o.resolve(this._settings.cwd, e.base);
3419
+ }
3420
+ _getReaderOptions(e) {
3421
+ const i = e.base === "." ? "" : e.base;
3422
+ return {
3423
+ basePath: i,
3424
+ pathSegmentSeparator: "/",
3425
+ concurrency: this._settings.concurrency,
3426
+ deepFilter: this.deepFilter.getFilter(i, e.positive, e.negative),
3427
+ entryFilter: this.entryFilter.getFilter(e.positive, e.negative),
3428
+ errorFilter: this.errorFilter.getFilter(),
3429
+ followSymbolicLinks: this._settings.followSymbolicLinks,
3430
+ fs: this._settings.fs,
3431
+ stats: this._settings.stats,
3432
+ throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
3433
+ transform: this.entryTransformer.getTransformer()
3434
+ };
3435
+ }
3436
+ _getMicromatchOptions() {
3437
+ return {
3438
+ dot: this._settings.dot,
3439
+ matchBase: this._settings.baseNameMatch,
3440
+ nobrace: !this._settings.braceExpansion,
3441
+ nocase: !this._settings.caseSensitiveMatch,
3442
+ noext: !this._settings.extglob,
3443
+ noglobstar: !this._settings.globstar,
3444
+ posix: !0,
3445
+ strictSlashes: !1
3446
+ };
3447
+ }
3448
+ }
3449
+ return st.default = t, st;
3450
+ }
3451
+ var yn;
3452
+ function Is() {
3453
+ if (yn) return Ue;
3454
+ yn = 1, Object.defineProperty(Ue, "__esModule", { value: !0 });
3455
+ const o = ws(), a = tr();
3456
+ class l extends a.default {
3457
+ constructor() {
3458
+ super(...arguments), this._reader = new o.default(this._settings);
3459
+ }
3460
+ async read(r) {
3461
+ const t = this._getRootDirectory(r), n = this._getReaderOptions(r);
3462
+ return (await this.api(t, r, n)).map((i) => n.transform(i));
3463
+ }
3464
+ api(r, t, n) {
3465
+ return t.dynamic ? this._reader.dynamic(r, n) : this._reader.static(t.patterns, n);
3466
+ }
3467
+ }
3468
+ return Ue.default = l, Ue;
3469
+ }
3470
+ var ft = {}, Sn;
3471
+ function Ns() {
3472
+ if (Sn) return ft;
3473
+ Sn = 1, Object.defineProperty(ft, "__esModule", { value: !0 });
3474
+ const o = dt, a = Ln(), l = tr();
3475
+ class u extends l.default {
3476
+ constructor() {
3477
+ super(...arguments), this._reader = new a.default(this._settings);
3478
+ }
3479
+ read(t) {
3480
+ const n = this._getRootDirectory(t), e = this._getReaderOptions(t), i = this.api(n, t, e), s = new o.Readable({ objectMode: !0, read: () => {
3481
+ } });
3482
+ return i.once("error", (p) => s.emit("error", p)).on("data", (p) => s.emit("data", e.transform(p))).once("end", () => s.emit("end")), s.once("close", () => i.destroy()), s;
3483
+ }
3484
+ api(t, n, e) {
3485
+ return n.dynamic ? this._reader.dynamic(t, e) : this._reader.static(n.patterns, e);
3486
+ }
3487
+ }
3488
+ return ft.default = u, ft;
3489
+ }
3490
+ var ht = {}, pt = {}, mn;
3491
+ function qs() {
3492
+ if (mn) return pt;
3493
+ mn = 1, Object.defineProperty(pt, "__esModule", { value: !0 });
3494
+ const o = Le(), a = Jt(), l = er();
3495
+ class u extends l.default {
3496
+ constructor() {
3497
+ super(...arguments), this._walkSync = a.walkSync, this._statSync = o.statSync;
3498
+ }
3499
+ dynamic(t, n) {
3500
+ return this._walkSync(t, n);
3501
+ }
3502
+ static(t, n) {
3503
+ const e = [];
3504
+ for (const i of t) {
3505
+ const s = this._getFullEntryPath(i), p = this._getEntry(s, i, n);
3506
+ p === null || !n.entryFilter(p) || e.push(p);
3507
+ }
3508
+ return e;
3509
+ }
3510
+ _getEntry(t, n, e) {
3511
+ try {
3512
+ const i = this._getStat(t);
3513
+ return this._makeEntry(i, n);
3514
+ } catch (i) {
3515
+ if (e.errorFilter(i))
3516
+ return null;
3517
+ throw i;
3518
+ }
3519
+ }
3520
+ _getStat(t) {
3521
+ return this._statSync(t, this._fsStatSettings);
3522
+ }
3523
+ }
3524
+ return pt.default = u, pt;
3525
+ }
3526
+ var vn;
3527
+ function Fs() {
3528
+ if (vn) return ht;
3529
+ vn = 1, Object.defineProperty(ht, "__esModule", { value: !0 });
3530
+ const o = qs(), a = tr();
3531
+ class l extends a.default {
3532
+ constructor() {
3533
+ super(...arguments), this._reader = new o.default(this._settings);
3534
+ }
3535
+ read(r) {
3536
+ const t = this._getRootDirectory(r), n = this._getReaderOptions(r);
3537
+ return this.api(t, r, n).map(n.transform);
3538
+ }
3539
+ api(r, t, n) {
3540
+ return t.dynamic ? this._reader.dynamic(r, n) : this._reader.static(t.patterns, n);
3541
+ }
3542
+ }
3543
+ return ht.default = l, ht;
3544
+ }
3545
+ var Wt = {}, Rn;
3546
+ function Bs() {
3547
+ return Rn || (Rn = 1, (function(o) {
3548
+ Object.defineProperty(o, "__esModule", { value: !0 }), o.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
3549
+ const a = Qt, u = Math.max(Kt.cpus().length, 1);
3550
+ o.DEFAULT_FILE_SYSTEM_ADAPTER = {
3551
+ lstat: a.lstat,
3552
+ lstatSync: a.lstatSync,
3553
+ stat: a.stat,
3554
+ statSync: a.statSync,
3555
+ readdir: a.readdir,
3556
+ readdirSync: a.readdirSync
3557
+ };
3558
+ class r {
3559
+ constructor(n = {}) {
3560
+ this._options = n, this.absolute = this._getValue(this._options.absolute, !1), this.baseNameMatch = this._getValue(this._options.baseNameMatch, !1), this.braceExpansion = this._getValue(this._options.braceExpansion, !0), this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, !0), this.concurrency = this._getValue(this._options.concurrency, u), this.cwd = this._getValue(this._options.cwd, process.cwd()), this.deep = this._getValue(this._options.deep, 1 / 0), this.dot = this._getValue(this._options.dot, !1), this.extglob = this._getValue(this._options.extglob, !0), this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !0), this.fs = this._getFileSystemMethods(this._options.fs), this.globstar = this._getValue(this._options.globstar, !0), this.ignore = this._getValue(this._options.ignore, []), this.markDirectories = this._getValue(this._options.markDirectories, !1), this.objectMode = this._getValue(this._options.objectMode, !1), this.onlyDirectories = this._getValue(this._options.onlyDirectories, !1), this.onlyFiles = this._getValue(this._options.onlyFiles, !0), this.stats = this._getValue(this._options.stats, !1), this.suppressErrors = this._getValue(this._options.suppressErrors, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !1), this.unique = this._getValue(this._options.unique, !0), this.onlyDirectories && (this.onlyFiles = !1), this.stats && (this.objectMode = !0), this.ignore = [].concat(this.ignore);
3561
+ }
3562
+ _getValue(n, e) {
3563
+ return n === void 0 ? e : n;
3564
+ }
3565
+ _getFileSystemMethods(n = {}) {
3566
+ return Object.assign(Object.assign({}, o.DEFAULT_FILE_SYSTEM_ADAPTER), n);
3567
+ }
3568
+ }
3569
+ o.default = r;
3570
+ })(Wt)), Wt;
3571
+ }
3572
+ var Vt, En;
3573
+ function js() {
3574
+ if (En) return Vt;
3575
+ En = 1;
3576
+ const o = fs(), a = Is(), l = Ns(), u = Fs(), r = Bs(), t = Te();
3577
+ async function n(s, p) {
3578
+ i(s);
3579
+ const h = e(s, a.default, p), d = await Promise.all(h);
3580
+ return t.array.flatten(d);
3581
+ }
3582
+ (function(s) {
3583
+ s.glob = s, s.globSync = p, s.globStream = h, s.async = s;
3584
+ function p(m, S) {
3585
+ i(m);
3586
+ const _ = e(m, u.default, S);
3587
+ return t.array.flatten(_);
3588
+ }
3589
+ s.sync = p;
3590
+ function h(m, S) {
3591
+ i(m);
3592
+ const _ = e(m, l.default, S);
3593
+ return t.stream.merge(_);
3594
+ }
3595
+ s.stream = h;
3596
+ function d(m, S) {
3597
+ i(m);
3598
+ const _ = [].concat(m), c = new r.default(S);
3599
+ return o.generate(_, c);
3600
+ }
3601
+ s.generateTasks = d;
3602
+ function y(m, S) {
3603
+ i(m);
3604
+ const _ = new r.default(S);
3605
+ return t.pattern.isDynamicPattern(m, _);
3606
+ }
3607
+ s.isDynamicPattern = y;
3608
+ function T(m) {
3609
+ return i(m), t.path.escape(m);
3610
+ }
3611
+ s.escapePath = T;
3612
+ function C(m) {
3613
+ return i(m), t.path.convertPathToPattern(m);
3614
+ }
3615
+ s.convertPathToPattern = C, (function(m) {
3616
+ function S(c) {
3617
+ return i(c), t.path.escapePosixPath(c);
3618
+ }
3619
+ m.escapePath = S;
3620
+ function _(c) {
3621
+ return i(c), t.path.convertPosixPathToPattern(c);
3622
+ }
3623
+ m.convertPathToPattern = _;
3624
+ })(s.posix || (s.posix = {})), (function(m) {
3625
+ function S(c) {
3626
+ return i(c), t.path.escapeWindowsPath(c);
3627
+ }
3628
+ m.escapePath = S;
3629
+ function _(c) {
3630
+ return i(c), t.path.convertWindowsPathToPattern(c);
3631
+ }
3632
+ m.convertPathToPattern = _;
3633
+ })(s.win32 || (s.win32 = {}));
3634
+ })(n || (n = {}));
3635
+ function e(s, p, h) {
3636
+ const d = [].concat(s), y = new r.default(h), T = o.generate(d, y), C = new p(y);
3637
+ return T.map(C.read, C);
3638
+ }
3639
+ function i(s) {
3640
+ if (![].concat(s).every((d) => t.string.isString(d) && !t.string.isEmpty(d)))
3641
+ throw new TypeError("Patterns must be a string (non empty) or an array of strings");
3642
+ }
3643
+ return Vt = n, Vt;
3644
+ }
3645
+ var Gs = js();
3646
+ const Us = /* @__PURE__ */ Dn(Gs), Ws = [".md", ".mdc", ".js", ".ts", ".tsx", ".go", ".sh", ".puml", "."], Vs = (o, a = {}) => {
3647
+ const { extensions: l = Ws, exclude: u = [], ignoreDefaultExcludes: r = !1 } = a, n = (Array.isArray(u) ? u : [u]).map((y) => /[*{}!]/.test(y) ? y : `**/*${y}`);
3648
+ r || n.push("**/node_modules/**");
3649
+ const i = (Array.isArray(o) ? o : [o]).map((y) => {
3650
+ try {
3651
+ if (yt.existsSync(y) && yt.statSync(y).isDirectory())
3652
+ return St.join(y, "**/*");
3653
+ } catch (T) {
3654
+ xe.debug(`[catGen] [paths → glob] Treating as glob: ${y}`, { cause: T });
3655
+ }
3656
+ return y;
3657
+ }), s = {
3658
+ ignore: n,
3659
+ onlyFiles: !0,
3660
+ absolute: !0,
3661
+ dot: r,
3662
+ suppressErrors: !0
3663
+ };
3664
+ let p = Us.sync(i, s);
3665
+ const h = new Set(Array.isArray(l) ? l : [l]);
3666
+ return h.has("*") || (p = p.filter((y) => h.has(St.extname(y).toLowerCase()))), p.map((y) => {
3667
+ try {
3668
+ const T = yt.readFileSync(y, "utf8"), C = St.relative(process.cwd(), y);
3669
+ return { absPath: y, relativePath: C, contents: T };
3670
+ } catch (T) {
3671
+ return xe.warn(`[catGen] [reading → skip] ${y}`, { cause: T }), null;
3672
+ }
3673
+ }).filter((y) => y !== null);
3674
+ };
3675
+ async function Ks(o, a = {}) {
3676
+ const l = Nn(o);
3677
+ if (!l)
3678
+ return {
3679
+ ok: !1,
3680
+ error: `Не удалось распознать URL: ${o}. Ожидается GitLab MR или GitHub PR.`
3681
+ };
3682
+ let u, r;
3683
+ if (l.provider === "gitlab") {
3684
+ if (u = process.env.GITLAB_PERSONAL_TOKEN ?? "", !u) return { ok: !1, error: "GITLAB_PERSONAL_TOKEN не установлен." };
3685
+ r = `https://${l.host}${process.env.GITLAB_API_PATH ?? "/api/v4"}`;
3686
+ } else {
3687
+ if (u = process.env.GITHUB_PERSONAL_TOKEN ?? "", !u) return { ok: !1, error: "GITHUB_PERSONAL_TOKEN не установлен." };
3688
+ r = l.host === "github.com" ? "https://api.github.com" : `https://${l.host}/api/v3`;
3689
+ }
3690
+ xe.info(
3691
+ `[cat --url] provider=${l.provider} repo=${l.repository} iid=${l.iid}`
3692
+ );
3693
+ const t = l.provider === "gitlab" ? new qn({ baseUrl: r, token: u }) : new Fn({ baseUrl: r, token: u });
3694
+ let n;
3695
+ try {
3696
+ n = await t.MergeRequests.getChanges({
3697
+ repository: l.repository,
3698
+ iid: l.iid
3699
+ });
3700
+ } catch (h) {
3701
+ return {
3702
+ ok: !1,
3703
+ error: `Ошибка получения изменений: ${h instanceof Error ? h.message : String(h)}`
3704
+ };
3705
+ }
3706
+ if (n.length === 0)
3707
+ return { ok: !1, error: "MR/PR не содержит изменённых файлов." };
3708
+ let e = n.filter((h) => h.status !== "deleted");
3709
+ if (a.exclude) {
3710
+ const h = Array.isArray(a.exclude) ? a.exclude : [a.exclude];
3711
+ e = e.filter((d) => !h.some((y) => d.path.includes(y.replace(/\*/g, ""))));
3712
+ }
3713
+ if (a.extensions && a.extensions.length > 0) {
3714
+ const h = new Set(a.extensions.map((d) => d.toLowerCase()));
3715
+ e = e.filter((d) => {
3716
+ const y = d.path.includes(".") ? "." + (d.path.split(".").pop() ?? "").toLowerCase() : ".";
3717
+ return h.has(y);
3718
+ });
3719
+ }
3720
+ if (e.length === 0)
3721
+ return { ok: !1, error: "После фильтрации не осталось файлов для вывода." };
3722
+ const i = e.length > 0 ? e[0].ref : "N/A";
3723
+ xe.info(`[cat --url] total=${n.length} filtered=${e.length} ref=${i}`);
3724
+ const s = [];
3725
+ let p = 0;
3726
+ for (const h of e) {
3727
+ let d;
3728
+ try {
3729
+ if (d = await t.RepositoryFiles?.getFileContent({
3730
+ repository: l.repository,
3731
+ path: h.path,
3732
+ ref: h.ref
3733
+ }), !d) {
3734
+ p++, xe.warn(`[cat --url] skip ${h.path}: 404 (ref=${h.ref}, repo=${l.repository})`);
3735
+ continue;
3736
+ }
3737
+ if (d.encoding === "base64") {
3738
+ p++, xe.warn(`[cat --url] skip ${h.path}: binary`);
3739
+ continue;
3740
+ }
3741
+ } catch (y) {
3742
+ p++, xe.warn(`[cat --url] skip ${h.path}: error: ${y.message}`);
3743
+ continue;
3744
+ }
3745
+ s.push({
3746
+ absPath: `vcs://${l.host}/${l.repository}/${h.path}?ref=${h.ref}`,
3747
+ relativePath: h.path,
3748
+ contents: d.content
3749
+ });
3750
+ }
3751
+ return p > 0 && xe.info(`[cat --url] skipped ${p} files`), { ok: !0, files: s };
3752
+ }
3753
+ const Ce = Bn(process.argv, {
3754
+ plain: ["plain"],
3755
+ exclude: ["exclude", "e"],
3756
+ extensions: ["ext"],
3757
+ output: ["o"],
3758
+ url: ["url"]
3759
+ }), An = (o) => {
3760
+ console.log(ne.blue("## CODEBASE:")), o.forEach(({ relativePath: a, contents: l }) => {
3761
+ console.log(ne.blue(`### SOURCE: ${a}`)), console.log(ne.gray("```" + (a.split(".").pop() ?? ""))), console.log(l), console.log(ne.gray("```")), console.log("");
3762
+ });
3763
+ }, bn = (o) => {
3764
+ console.log(ne.blue("<Codebase>")), o.forEach(({ relativePath: a, contents: l }) => {
3765
+ const u = [
3766
+ `${ne.yellow("type")}=${ne.green('"file"')}`,
3767
+ `${ne.yellow("path")}=${ne.green(`"${a}"`)}`
3768
+ ].join(" ");
3769
+ console.log(` ${ne.blue("<Source")} ${u}${ne.blue(">")}`), console.log(l), console.log(` ${ne.blue("</Source>")}`);
3770
+ }), console.log(ne.blue("</Codebase>")), console.log("");
3771
+ }, $e = Ce.url, rr = Ce._.filter((o) => !(o === "cat" || o.endsWith(".ts") || o.endsWith(".js") || o.endsWith(".mjs") || o.startsWith("/") || o.startsWith("./") || o.startsWith("../")));
3772
+ rr.length === 0 && !$e && (console.error(ne.yellow("Usage: npx gennady cat <path/to/glob> [--url=<MR/PR URL>]")), process.exit(1));
3773
+ $e && rr.length > 0 && (console.error(ne.red("Error: --url and positional arguments are mutually exclusive.")), process.exit(1));
3774
+ if ($e) {
3775
+ const o = Ce.extensions, a = o ? Array.isArray(o) ? o : o.split(",").map((u) => u.trim()) : void 0, l = await Ks($e, {
3776
+ exclude: Ce.exclude,
3777
+ extensions: a
3778
+ });
3779
+ l.ok || (console.error(ne.red(l.error)), process.exit(1)), Ce.output === "md" ? An(l.files) : bn(l.files);
3780
+ } else {
3781
+ const o = Vs(rr, Ce);
3782
+ Ce.output === "md" ? An(o) : bn(o);
3783
+ }
3784
+ if (!Ce.plain) {
3785
+ console.log(ne.green("^".repeat(40)));
3786
+ const o = $e ? `npx gennady cat --url="${$e}" --plain | pbcopy` : `npx gennady cat ${process.argv.slice(3).join(" ")} --plain | pbcopy`;
3787
+ console.log(ne.italic.gray(`Hint: ${o}`));
3788
+ }
3789
+ console.log("");