@synergenius/flow-weaver 0.33.2 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (922) hide show
  1. package/LICENSE +201 -226
  2. package/NOTICE +13 -0
  3. package/README.md +152 -245
  4. package/dist/agent/agent-loop.d.ts +4 -2
  5. package/dist/agent/cli-session.d.ts +3 -3
  6. package/dist/agent/cli-session.js +511 -438
  7. package/dist/agent/cli-spawn-config.d.ts +4 -4
  8. package/dist/agent/gate.d.ts +164 -0
  9. package/dist/agent/index.d.ts +4 -4
  10. package/dist/agent/index.js +174 -28
  11. package/dist/agent/mcp-bridge.d.ts +1 -1
  12. package/dist/agent/mcp-bridge.js +114 -128
  13. package/dist/agent/mcp-tool-server.d.ts +2 -2
  14. package/dist/agent/mcp-tool-server.js +147 -189
  15. package/dist/agent/profiles.d.ts +69 -0
  16. package/dist/agent/providers/anthropic.d.ts +2 -4
  17. package/dist/agent/providers/claude-cli.d.ts +4 -5
  18. package/dist/agent/providers/openai-compat.d.ts +8 -1
  19. package/dist/agent/streaming.d.ts +2 -2
  20. package/dist/agent/types.d.ts +16 -10
  21. package/dist/api/builder.d.ts +3 -3
  22. package/dist/api/compile.d.ts +9 -4
  23. package/dist/api/durable-validation.d.ts +15 -0
  24. package/dist/api/generate-in-place.d.ts +21 -19
  25. package/dist/api/generate.d.ts +21 -16
  26. package/dist/api/generated-module/local-node-functions.d.ts +24 -0
  27. package/dist/api/generated-module/module-format.d.ts +23 -0
  28. package/dist/api/generated-module/module-writer.d.ts +34 -0
  29. package/dist/api/generated-module/node-type-imports.d.ts +39 -0
  30. package/dist/api/generated-module/preamble.d.ts +16 -0
  31. package/dist/api/generated-module/workflow-functions.d.ts +29 -0
  32. package/dist/api/graph-identity.d.ts +39 -0
  33. package/dist/api/helpers.d.ts +4 -60
  34. package/dist/api/in-place/built-in-nodes.d.ts +18 -0
  35. package/dist/api/in-place/function-body.d.ts +21 -0
  36. package/dist/api/in-place/fw-imports.d.ts +30 -0
  37. package/dist/api/in-place/macro-coverage.d.ts +14 -0
  38. package/dist/api/in-place/node-type-functions.d.ts +18 -0
  39. package/dist/api/in-place/node-type-jsdoc.d.ts +20 -0
  40. package/dist/api/in-place/orphaned-node-types.d.ts +16 -0
  41. package/dist/api/in-place/runtime-section.d.ts +16 -0
  42. package/dist/api/in-place/signature.d.ts +47 -0
  43. package/dist/api/in-place/source-file.d.ts +19 -0
  44. package/dist/api/in-place/workflow-jsdoc.d.ts +19 -0
  45. package/dist/api/index.d.ts +18 -21
  46. package/dist/api/index.js +259 -53
  47. package/dist/api/inline-engine.generated.d.ts +3 -0
  48. package/dist/api/inline-runtime.d.ts +10 -2
  49. package/dist/api/manipulation/connections.d.ts +1 -1
  50. package/dist/api/manipulation/index.d.ts +8 -8
  51. package/dist/api/manipulation/node-types.d.ts +1 -1
  52. package/dist/api/manipulation/nodes.d.ts +3 -13
  53. package/dist/api/manipulation/ports.d.ts +1 -1
  54. package/dist/api/manipulation/scopes.d.ts +1 -1
  55. package/dist/api/manipulation/workflow.d.ts +1 -1
  56. package/dist/api/modify-operation.d.ts +0 -2
  57. package/dist/api/parse.d.ts +22 -1
  58. package/dist/api/port-references.d.ts +66 -0
  59. package/dist/api/query.d.ts +18 -2
  60. package/dist/api/templates.d.ts +1 -1
  61. package/dist/api/transform.d.ts +1 -1
  62. package/dist/api/validate.d.ts +1 -1
  63. package/dist/api/validation-registry.d.ts +2 -2
  64. package/dist/artifacts/brief.d.ts +43 -0
  65. package/dist/artifacts/index.d.ts +31 -0
  66. package/dist/artifacts/pdf.d.ts +19 -0
  67. package/dist/ast/builder.d.ts +3 -3
  68. package/dist/ast/index.d.ts +4 -4
  69. package/dist/ast/index.js +60 -5
  70. package/dist/ast/serialization-node.d.ts +1 -1
  71. package/dist/ast/serialization.d.ts +1 -1
  72. package/dist/ast/types.d.ts +82 -291
  73. package/dist/ast/workflow-utils.d.ts +4 -4
  74. package/dist/built-in-nodes/coercion-types.d.ts +1 -1
  75. package/dist/built-in-nodes/delay.d.ts +3 -1
  76. package/dist/built-in-nodes/generated-registry.d.ts +1 -1
  77. package/dist/built-in-nodes/index.d.ts +6 -5
  78. package/dist/built-in-nodes/index.js +79 -5
  79. package/dist/built-in-nodes/invoke-workflow.d.ts +2 -1
  80. package/dist/built-in-nodes/mock-types.d.ts +45 -14
  81. package/dist/built-in-nodes/sleep.d.ts +12 -0
  82. package/dist/built-in-nodes/wait-for-agent.d.ts +2 -1
  83. package/dist/built-in-nodes/wait-for-event.d.ts +2 -1
  84. package/dist/chevrotain-parser/coerce-parser.d.ts +1 -1
  85. package/dist/chevrotain-parser/connect-parser.d.ts +1 -1
  86. package/dist/chevrotain-parser/grammar-diagrams.d.ts +1 -1
  87. package/dist/chevrotain-parser/index.d.ts +20 -23
  88. package/dist/chevrotain-parser/node-parser.d.ts +7 -8
  89. package/dist/chevrotain-parser/parse-line.d.ts +54 -0
  90. package/dist/chevrotain-parser/tokens.d.ts +0 -17
  91. package/dist/chevrotain-parser/trigger-cancel-parser.d.ts +6 -1
  92. package/dist/chunks/chunk-4EUSHAY6.js +298 -0
  93. package/dist/chunks/chunk-4KDUEOFD.js +197 -0
  94. package/dist/chunks/chunk-5Y3AIUWY.js +911 -0
  95. package/dist/chunks/chunk-6KMVP6AU.js +20 -0
  96. package/dist/chunks/chunk-6PNJORFL.js +128 -0
  97. package/dist/chunks/chunk-7AAQNGRH.js +2001 -0
  98. package/dist/chunks/chunk-7YYKTPJ5.js +22705 -0
  99. package/dist/chunks/chunk-A5MBOFVY.js +33 -0
  100. package/dist/chunks/chunk-AXNQRVJB.js +18 -0
  101. package/dist/chunks/chunk-B6HQ6YS5.js +572 -0
  102. package/dist/chunks/chunk-CY3RNVML.js +296 -0
  103. package/dist/chunks/chunk-CYHYDLV4.js +653 -0
  104. package/dist/chunks/chunk-CZBCCK4Y.js +82 -0
  105. package/dist/chunks/chunk-DCMGQP5V.js +505 -0
  106. package/dist/chunks/chunk-DIAA66GL.js +72 -0
  107. package/dist/chunks/chunk-DUO6H5PR.js +20 -0
  108. package/dist/chunks/chunk-E5WN7IGO.js +125 -0
  109. package/dist/chunks/chunk-EFGFXXQF.js +184 -0
  110. package/dist/chunks/chunk-F3RTZV2A.js +2811 -0
  111. package/dist/chunks/chunk-FMTLP5ZX.js +1397 -0
  112. package/dist/chunks/chunk-HKZLQJDV.js +79 -0
  113. package/dist/chunks/chunk-INDEVYEC.js +146 -0
  114. package/dist/chunks/chunk-JQTF4R5L.js +390 -0
  115. package/dist/chunks/chunk-KMCAYNUM.js +331 -0
  116. package/dist/chunks/chunk-KMWCCOUJ.js +1444 -0
  117. package/dist/chunks/chunk-KU3CLJI2.js +338 -0
  118. package/dist/chunks/chunk-NDSTGMKR.js +3300 -0
  119. package/dist/chunks/chunk-NQNLUAPO.js +505 -0
  120. package/dist/chunks/chunk-O2U2LO57.js +466 -0
  121. package/dist/chunks/chunk-OOQG7UPP.js +457 -0
  122. package/dist/chunks/chunk-OZQAW5ZG.js +112 -0
  123. package/dist/chunks/chunk-P2CVDGHR.js +487 -0
  124. package/dist/chunks/chunk-P44RIZ7C.js +592 -0
  125. package/dist/chunks/chunk-PEZCT37T.js +1475 -0
  126. package/dist/chunks/chunk-PKWSAW6O.js +152 -0
  127. package/dist/chunks/chunk-Q6MDDZMT.js +4373 -0
  128. package/dist/chunks/chunk-QDE4Z7KW.js +6 -0
  129. package/dist/chunks/chunk-QJDAVSNY.js +8 -0
  130. package/dist/chunks/chunk-QYPORSLO.js +7552 -0
  131. package/dist/chunks/chunk-R4QGNK34.js +183 -0
  132. package/dist/chunks/chunk-REEYC73I.js +3002 -0
  133. package/dist/chunks/chunk-SEWDMQ6Q.js +46 -0
  134. package/dist/chunks/chunk-TAIUWKZB.js +3057 -0
  135. package/dist/chunks/chunk-TN4YZ3O7.js +196 -0
  136. package/dist/chunks/chunk-TRMFB43C.js +143 -0
  137. package/dist/chunks/chunk-VO4QXG2X.js +1016 -0
  138. package/dist/chunks/chunk-VP2P3BPA.js +1002 -0
  139. package/dist/chunks/chunk-VQ7H33J4.js +2176 -0
  140. package/dist/chunks/chunk-VWA7MCV2.js +105 -0
  141. package/dist/chunks/chunk-XAV22WD7.js +253 -0
  142. package/dist/chunks/chunk-YSPBPZDV.js +148 -0
  143. package/dist/chunks/chunk-ZKEGXO73.js +282 -0
  144. package/dist/chunks/chunk-ZMGN6F3S.js +4256 -0
  145. package/dist/chunks/grammar-diagrams-AI7VDXOM.js +14 -0
  146. package/dist/chunks/index.min-ECJD6GZC.js +37 -0
  147. package/dist/chunks/manifest-EPTR5MYH.js +21 -0
  148. package/dist/chunks/openapi-document-6TCGVDUW.js +69 -0
  149. package/dist/chunks/registry-K2U5KUTY.js +23 -0
  150. package/dist/chunks/serialization-node-UGY6CFH6.js +38 -0
  151. package/dist/chunks/validate-GEKSZPIN.js +24 -0
  152. package/dist/chunks/validation-registry-IQZX3UE3.js +7 -0
  153. package/dist/chunks/validator-VXFHLPDW.js +26 -0
  154. package/dist/chunks/workflow-executor-KBGFKHNR.js +36 -0
  155. package/dist/cli/commands/agents.d.ts +16 -0
  156. package/dist/cli/commands/artifact.d.ts +10 -0
  157. package/dist/cli/commands/compile.d.ts +0 -30
  158. package/dist/cli/commands/console.d.ts +32 -0
  159. package/dist/cli/commands/context.d.ts +0 -3
  160. package/dist/cli/commands/describe.js +386 -352
  161. package/dist/cli/commands/dev.d.ts +9 -4
  162. package/dist/cli/commands/diagram.d.ts +3 -5
  163. package/dist/cli/commands/doctor.d.ts +27 -4
  164. package/dist/cli/commands/doctor.js +3307 -633
  165. package/dist/cli/commands/export.d.ts +6 -4
  166. package/dist/cli/commands/grammar.d.ts +0 -3
  167. package/dist/cli/commands/implement.d.ts +1 -1
  168. package/dist/cli/commands/init/agent-handoff.d.ts +28 -0
  169. package/dist/cli/commands/init/config.d.ts +3 -0
  170. package/dist/cli/commands/init/files.d.ts +12 -0
  171. package/dist/cli/commands/init/naming.d.ts +13 -0
  172. package/dist/cli/commands/init/output.d.ts +12 -0
  173. package/dist/cli/commands/init/setup.d.ts +21 -0
  174. package/dist/cli/commands/init/types.d.ts +53 -0
  175. package/dist/cli/commands/init-personas.d.ts +9 -1
  176. package/dist/cli/commands/init.d.ts +24 -88
  177. package/dist/cli/commands/market.d.ts +1 -1
  178. package/dist/cli/commands/mcp-setup.d.ts +1 -4
  179. package/dist/cli/commands/modify.d.ts +0 -5
  180. package/dist/cli/commands/openapi.d.ts +9 -11
  181. package/dist/cli/commands/run.d.ts +0 -4
  182. package/dist/cli/commands/serve.d.ts +24 -26
  183. package/dist/cli/commands/status.d.ts +1 -1
  184. package/dist/cli/exports.d.ts +3 -4
  185. package/dist/cli/exports.js +124 -23
  186. package/dist/cli/flow-weaver-agents-H653446S.mjs +81 -0
  187. package/dist/cli/flow-weaver-artifact-WBFYTW76.mjs +58 -0
  188. package/dist/cli/flow-weaver-chunk-265CEK74.mjs +2 -0
  189. package/dist/cli/flow-weaver-chunk-2C7PZCV5.mjs +186 -0
  190. package/dist/cli/flow-weaver-chunk-3BSYCWPL.mjs +3109 -0
  191. package/dist/cli/flow-weaver-chunk-3MKUQP3D.mjs +547 -0
  192. package/dist/cli/flow-weaver-chunk-3ZLMPQTH.mjs +27 -0
  193. package/dist/cli/flow-weaver-chunk-4DVY73ML.mjs +280 -0
  194. package/dist/cli/flow-weaver-chunk-54M4KNEL.mjs +200 -0
  195. package/dist/cli/flow-weaver-chunk-55QMUZIA.mjs +256 -0
  196. package/dist/cli/flow-weaver-chunk-6ZUJ7LMX.mjs +2003 -0
  197. package/dist/cli/flow-weaver-chunk-7ET6N32V.mjs +419 -0
  198. package/dist/cli/flow-weaver-chunk-7G63RR4K.mjs +8880 -0
  199. package/dist/cli/flow-weaver-chunk-A6M5K3W7.mjs +4418 -0
  200. package/dist/cli/flow-weaver-chunk-AA3NATMX.mjs +154 -0
  201. package/dist/cli/flow-weaver-chunk-APX6MQ5A.mjs +5652 -0
  202. package/dist/cli/flow-weaver-chunk-BHCC5FE5.mjs +17 -0
  203. package/dist/cli/flow-weaver-chunk-DM4BBRRU.mjs +35 -0
  204. package/dist/cli/flow-weaver-chunk-DRN7KPWY.mjs +168 -0
  205. package/dist/cli/flow-weaver-chunk-EKWF27G6.mjs +23 -0
  206. package/dist/cli/flow-weaver-chunk-EM5HWQ4R.mjs +338 -0
  207. package/dist/cli/flow-weaver-chunk-FPPPU2DG.mjs +226 -0
  208. package/dist/cli/flow-weaver-chunk-GAQXZHNO.mjs +3005 -0
  209. package/dist/cli/flow-weaver-chunk-GBUNNP33.mjs +1329 -0
  210. package/dist/cli/flow-weaver-chunk-HMAKDE55.mjs +636 -0
  211. package/dist/cli/flow-weaver-chunk-HQ3ZAN44.mjs +367 -0
  212. package/dist/cli/flow-weaver-chunk-I4APCXYN.mjs +21442 -0
  213. package/dist/cli/flow-weaver-chunk-IJJ4JXTL.mjs +2297 -0
  214. package/dist/cli/flow-weaver-chunk-J7EPZW2I.mjs +33 -0
  215. package/dist/cli/flow-weaver-chunk-KOEMJHLG.mjs +83 -0
  216. package/dist/cli/flow-weaver-chunk-M6CBWQKJ.mjs +271 -0
  217. package/dist/cli/flow-weaver-chunk-MHJ4N652.mjs +1580 -0
  218. package/dist/cli/flow-weaver-chunk-MKAFQWLP.mjs +202 -0
  219. package/dist/cli/flow-weaver-chunk-MMV2XGD3.mjs +3291 -0
  220. package/dist/cli/flow-weaver-chunk-MSI2UJES.mjs +125 -0
  221. package/dist/cli/flow-weaver-chunk-N767YRAI.mjs +48 -0
  222. package/dist/cli/flow-weaver-chunk-NQKKWDGF.mjs +56 -0
  223. package/dist/cli/flow-weaver-chunk-NYZDQYFU.mjs +45 -0
  224. package/dist/cli/flow-weaver-chunk-OMVWSNHJ.mjs +14 -0
  225. package/dist/cli/flow-weaver-chunk-PUWZ47H5.mjs +2188 -0
  226. package/dist/cli/flow-weaver-chunk-QOPRVDES.mjs +46 -0
  227. package/dist/cli/flow-weaver-chunk-RIWE7YTR.mjs +216 -0
  228. package/dist/cli/flow-weaver-chunk-S63Q3JIU.mjs +789 -0
  229. package/dist/cli/flow-weaver-chunk-T7X5A23H.mjs +558 -0
  230. package/dist/cli/flow-weaver-chunk-TLV3VZUN.mjs +2 -0
  231. package/dist/cli/flow-weaver-chunk-TS5P3PIN.mjs +194 -0
  232. package/dist/cli/flow-weaver-chunk-U3EO3X4B.mjs +649 -0
  233. package/dist/cli/flow-weaver-chunk-UNFS3NQP.mjs +34 -0
  234. package/dist/cli/flow-weaver-chunk-V6DHWFQG.mjs +2811 -0
  235. package/dist/cli/flow-weaver-chunk-VXWNLYQU.mjs +9 -0
  236. package/dist/cli/flow-weaver-chunk-W3YNK26P.mjs +149 -0
  237. package/dist/cli/flow-weaver-chunk-XG2WKXYZ.mjs +324 -0
  238. package/dist/cli/flow-weaver-chunk-YLSRZWFK.mjs +2219 -0
  239. package/dist/cli/flow-weaver-chunk-YVPURWS6.mjs +40 -0
  240. package/dist/cli/flow-weaver-chunk-Z44JK332.mjs +582 -0
  241. package/dist/cli/flow-weaver-chunk-Z5ZJPNSY.mjs +517 -0
  242. package/dist/cli/flow-weaver-chunk-ZQALO25T.mjs +594 -0
  243. package/dist/cli/flow-weaver-compile-A2CABDSB.mjs +37 -0
  244. package/dist/cli/flow-weaver-console-6EBHDBTN.mjs +71 -0
  245. package/dist/cli/flow-weaver-context-ECLYANFF.mjs +17 -0
  246. package/dist/cli/flow-weaver-context-ZRUMW2KE.mjs +69 -0
  247. package/dist/cli/flow-weaver-create-WIP4EFNP.mjs +124 -0
  248. package/dist/cli/flow-weaver-deployment-WJJRK7NO.mjs +14 -0
  249. package/dist/cli/flow-weaver-describe-XDIFF5LI.mjs +41 -0
  250. package/dist/cli/flow-weaver-dev-LG2NSQAU.mjs +196 -0
  251. package/dist/cli/flow-weaver-diagram-3EVQARQE.mjs +52 -0
  252. package/dist/cli/flow-weaver-diagram-7LR7O4M2.mjs +44 -0
  253. package/dist/cli/flow-weaver-diff-USF7DJLU.mjs +85 -0
  254. package/dist/cli/flow-weaver-docs-QU2ZOXKH.mjs +96 -0
  255. package/dist/cli/flow-weaver-doctor-K447YWHR.mjs +43 -0
  256. package/dist/cli/flow-weaver-export-LAS6N56Y.mjs +140 -0
  257. package/dist/cli/flow-weaver-grammar-RIRUS3Q6.mjs +49 -0
  258. package/dist/cli/flow-weaver-grammar-diagrams-WXRTW5SK.mjs +15 -0
  259. package/dist/cli/flow-weaver-implement-5JG6BCFZ.mjs +114 -0
  260. package/dist/cli/flow-weaver-index.min-OR5SIHXD.mjs +39 -0
  261. package/dist/cli/flow-weaver-init-34YZNPQX.mjs +972 -0
  262. package/dist/cli/flow-weaver-init-personas-NOGZTQQ2.mjs +48 -0
  263. package/dist/cli/flow-weaver-manifest-4JNUSEB3.mjs +18 -0
  264. package/dist/cli/flow-weaver-market-WA4CKHKV.mjs +444 -0
  265. package/dist/cli/flow-weaver-mcp-setup-O26MGXSD.mjs +22 -0
  266. package/dist/cli/flow-weaver-migrate-VFVEUTPH.mjs +119 -0
  267. package/dist/cli/flow-weaver-modify-VM3JP5K6.mjs +97 -0
  268. package/dist/cli/flow-weaver-openapi-IRBWI3HM.mjs +71 -0
  269. package/dist/cli/flow-weaver-openapi-document-7N6YMPG3.mjs +30 -0
  270. package/dist/cli/flow-weaver-pack-commands-OS2QRXAK.mjs +146 -0
  271. package/dist/cli/flow-weaver-registry-5MLFRPPT.mjs +25 -0
  272. package/dist/cli/flow-weaver-run-DSTLSTHR.mjs +555 -0
  273. package/dist/cli/flow-weaver-serialization-node-LE6PCG4M.mjs +50 -0
  274. package/dist/cli/flow-weaver-serve-NVLCLSOW.mjs +192 -0
  275. package/dist/cli/flow-weaver-server-7IERLVXE.mjs +2925 -0
  276. package/dist/cli/flow-weaver-server-KWF4PXYC.mjs +19112 -0
  277. package/dist/cli/flow-weaver-status-75W2S3YB.mjs +138 -0
  278. package/dist/cli/flow-weaver-strip-AZPXUYVA.mjs +79 -0
  279. package/dist/cli/flow-weaver-templates-DSNMB6K7.mjs +72 -0
  280. package/dist/cli/flow-weaver-validate-A4UWDQN6.mjs +19 -0
  281. package/dist/cli/flow-weaver-validate-GRBZ5W4C.mjs +296 -0
  282. package/dist/cli/flow-weaver-validation-registry-BINGUNXX.mjs +9 -0
  283. package/dist/cli/flow-weaver-validator-TY56CI42.mjs +21 -0
  284. package/dist/cli/flow-weaver-watch-OPPERXL6.mjs +114 -0
  285. package/dist/cli/flow-weaver-workflow-executor-6AHYPXAN.mjs +26 -0
  286. package/dist/cli/flow-weaver.mjs +3557 -89384
  287. package/dist/cli/index.d.ts +5 -2
  288. package/dist/cli/pack-commands-needed.d.ts +12 -0
  289. package/dist/cli/program.d.ts +14 -0
  290. package/dist/cli/templates/ai/mock-provider.d.ts +1 -1
  291. package/dist/cli/templates/index.d.ts +1 -8
  292. package/dist/cli/templates/nodes/agent-router.d.ts +1 -1
  293. package/dist/cli/templates/nodes/aggregator.d.ts +1 -1
  294. package/dist/cli/templates/nodes/conversation-memory.d.ts +1 -1
  295. package/dist/cli/templates/nodes/http.d.ts +1 -1
  296. package/dist/cli/templates/nodes/human-approval.d.ts +1 -1
  297. package/dist/cli/templates/nodes/json-extractor.d.ts +1 -1
  298. package/dist/cli/templates/nodes/llm-call.d.ts +1 -1
  299. package/dist/cli/templates/nodes/prompt-template.d.ts +1 -1
  300. package/dist/cli/templates/nodes/rag-retriever.d.ts +1 -1
  301. package/dist/cli/templates/nodes/tool-executor.d.ts +1 -1
  302. package/dist/cli/templates/nodes/transformer.d.ts +1 -1
  303. package/dist/cli/templates/nodes/validator.d.ts +1 -1
  304. package/dist/cli/templates/shared/approval-types.d.ts +1 -1
  305. package/dist/cli/templates/shared/case.d.ts +14 -0
  306. package/dist/cli/templates/shared/llm-types.d.ts +4 -4
  307. package/dist/cli/templates/workflows/aggregator.d.ts +1 -1
  308. package/dist/cli/templates/workflows/ai-agent.d.ts +1 -1
  309. package/dist/cli/templates/workflows/ai-chat.d.ts +1 -1
  310. package/dist/cli/templates/workflows/ai-rag.d.ts +1 -1
  311. package/dist/cli/templates/workflows/ai-react.d.ts +1 -1
  312. package/dist/cli/templates/workflows/approval.d.ts +10 -0
  313. package/dist/cli/templates/workflows/conditional.d.ts +2 -2
  314. package/dist/cli/templates/workflows/error-handler.d.ts +2 -2
  315. package/dist/cli/templates/workflows/foreach.d.ts +1 -1
  316. package/dist/cli/templates/workflows/sequential.d.ts +1 -1
  317. package/dist/cli/templates/workflows/webhook.d.ts +1 -1
  318. package/dist/cli/utils/interactive.d.ts +6 -0
  319. package/dist/cli/utils/json-option.d.ts +8 -0
  320. package/dist/cli/utils/logger.d.ts +2 -0
  321. package/dist/compiler/durable-source-proof.d.ts +23 -0
  322. package/dist/compiler/executable-artifact.d.ts +29 -0
  323. package/dist/compiler/index.d.ts +4 -0
  324. package/dist/compiler/index.js +36 -0
  325. package/dist/console/app.js +106 -0
  326. package/dist/console/assets/synergenius.svg +18 -0
  327. package/dist/console/author.d.ts +32 -0
  328. package/dist/console/cli-catalog.d.ts +21 -0
  329. package/dist/console/cli-run.d.ts +35 -0
  330. package/dist/console/cli-run.js +46 -0
  331. package/dist/console/debug.d.ts +67 -0
  332. package/dist/console/diff-view.d.ts +96 -0
  333. package/dist/console/export.d.ts +36 -0
  334. package/dist/console/git.d.ts +27 -0
  335. package/dist/console/index.d.ts +4 -0
  336. package/dist/console/index.html +16 -0
  337. package/dist/console/index.js +203 -0
  338. package/dist/console/packs.d.ts +100 -0
  339. package/dist/console/request-guard.d.ts +10 -0
  340. package/dist/console/respond.d.ts +16 -0
  341. package/dist/console/router.d.ts +64 -0
  342. package/dist/console/routes-agents.d.ts +14 -0
  343. package/dist/console/routes-project.d.ts +3 -0
  344. package/dist/console/routes-runs.d.ts +3 -0
  345. package/dist/console/routes-services.d.ts +7 -0
  346. package/dist/console/routes-tools.d.ts +3 -0
  347. package/dist/console/runs.d.ts +69 -0
  348. package/dist/console/scan.d.ts +49 -0
  349. package/dist/console/schema.d.ts +74 -0
  350. package/dist/console/server.d.ts +34 -0
  351. package/dist/console/server.js +43264 -0
  352. package/dist/console/services.d.ts +119 -0
  353. package/dist/console/source.d.ts +23 -0
  354. package/dist/console/status.d.ts +68 -0
  355. package/dist/console/styles.css +1023 -0
  356. package/dist/console/terminals.d.ts +22 -0
  357. package/dist/console/workflow-view.d.ts +153 -0
  358. package/dist/constants.d.ts +5 -1
  359. package/dist/constants.js +56 -167
  360. package/dist/context/index.d.ts +10 -0
  361. package/dist/context/index.js +14 -191
  362. package/dist/coordinator/agent-gate.d.ts +107 -0
  363. package/dist/coordinator/bundle-digest.d.ts +20 -0
  364. package/dist/coordinator/clock-tick.d.ts +4 -0
  365. package/dist/coordinator/effect-receipts.d.ts +10 -0
  366. package/dist/coordinator/errors.d.ts +31 -0
  367. package/dist/coordinator/file-store.d.ts +3 -0
  368. package/dist/coordinator/gate-labeling.d.ts +33 -0
  369. package/dist/coordinator/gate-resolution.d.ts +28 -0
  370. package/dist/coordinator/index.d.ts +12 -0
  371. package/dist/coordinator/index.js +107 -0
  372. package/dist/coordinator/memory-store.d.ts +3 -0
  373. package/dist/coordinator/params.d.ts +18 -0
  374. package/dist/coordinator/run-annotations.d.ts +6 -0
  375. package/dist/coordinator/run-context.d.ts +11 -0
  376. package/dist/coordinator/run-ending.d.ts +5 -0
  377. package/dist/coordinator/run-outcome.d.ts +31 -0
  378. package/dist/coordinator/run-resume.d.ts +6 -0
  379. package/dist/coordinator/run-start.d.ts +4 -0
  380. package/dist/coordinator/run-store.d.ts +275 -0
  381. package/dist/coordinator/run-trace.d.ts +41 -0
  382. package/dist/coordinator/run-views.d.ts +12 -0
  383. package/dist/coordinator/runs-dir.d.ts +26 -0
  384. package/dist/coordinator/store.d.ts +67 -0
  385. package/dist/coordinator/time.d.ts +39 -0
  386. package/dist/coordinator/workflow-selection.d.ts +6 -0
  387. package/dist/deployment/index.d.ts +11 -16
  388. package/dist/deployment/index.js +541 -50
  389. package/dist/deployment/targets/base.d.ts +11 -13
  390. package/dist/deployment/targets/openapi-parts.d.ts +92 -0
  391. package/dist/diagram/arms.d.ts +70 -0
  392. package/dist/diagram/ascii-renderer.d.ts +1 -1
  393. package/dist/diagram/geometry.d.ts +20 -32
  394. package/dist/diagram/graph/bounds.d.ts +30 -0
  395. package/dist/diagram/graph/metrics.d.ts +21 -0
  396. package/dist/diagram/graph/nodes.d.ts +33 -0
  397. package/dist/diagram/graph/placement.d.ts +22 -0
  398. package/dist/diagram/graph/ports.d.ts +23 -0
  399. package/dist/diagram/graph/routing.d.ts +40 -0
  400. package/dist/diagram/graph/scopes.d.ts +30 -0
  401. package/dist/diagram/index.d.ts +15 -23
  402. package/dist/diagram/index.js +632 -111
  403. package/dist/diagram/labels.d.ts +12 -0
  404. package/dist/diagram/lanes.d.ts +93 -0
  405. package/dist/diagram/layout.d.ts +1 -1
  406. package/dist/diagram/material-symbols.d.ts +7 -0
  407. package/dist/diagram/orthogonal-router.d.ts +2 -3
  408. package/dist/diagram/process-view.d.ts +79 -0
  409. package/dist/diagram/spine.d.ts +25 -0
  410. package/dist/diagram/theme.d.ts +1 -5
  411. package/dist/diagram/types.d.ts +6 -20
  412. package/dist/diff/index.js +53 -9
  413. package/dist/diff/types.d.ts +1 -5
  414. package/dist/doc-metadata/extractors/annotations.d.ts +0 -4
  415. package/dist/doc-metadata/extractors/cli-commands.d.ts +2 -1
  416. package/dist/doc-metadata/extractors/core-metadata.d.ts +19 -4
  417. package/dist/doc-metadata/extractors/error-codes.d.ts +1 -1
  418. package/dist/doc-metadata/extractors/mcp-tools.d.ts +7 -3
  419. package/dist/doc-metadata/index.d.ts +1 -2
  420. package/dist/doc-metadata/index.js +2368 -9
  421. package/dist/doc-metadata/types.d.ts +7 -24
  422. package/dist/docs/guide.d.ts +33 -0
  423. package/dist/docs/index.d.ts +7 -4
  424. package/dist/docs/index.js +298 -298
  425. package/dist/docs/pack-topics.d.ts +18 -0
  426. package/dist/editor-completions/annotationValues.d.ts +1 -1
  427. package/dist/editor-completions/contextParser.d.ts +3 -2
  428. package/dist/editor-completions/dataTypes.d.ts +1 -1
  429. package/dist/editor-completions/goToDefinition.d.ts +1 -1
  430. package/dist/editor-completions/index.d.ts +8 -8
  431. package/dist/editor-completions/index.js +1244 -175
  432. package/dist/editor-completions/jsDocAnnotations.d.ts +1 -1
  433. package/dist/editor-completions/modifierCompletions.d.ts +1 -1
  434. package/dist/export/index.d.ts +7 -1
  435. package/dist/generated-branding.js +8 -21
  436. package/dist/generated-version.d.ts +1 -1
  437. package/dist/generated-version.js +7 -3
  438. package/dist/generator/annotation-generator.d.ts +84 -0
  439. package/dist/generator/async-detection.d.ts +1 -1
  440. package/dist/{body-generator.d.ts → generator/body-generator.d.ts} +7 -3
  441. package/dist/generator/code-utils.d.ts +15 -60
  442. package/dist/generator/connection-reads.d.ts +94 -0
  443. package/dist/generator/control-flow-plan.d.ts +74 -0
  444. package/dist/generator/control-flow.d.ts +1 -1
  445. package/dist/generator/exit-assembly.d.ts +11 -0
  446. package/dist/generator/index.d.ts +4 -5
  447. package/dist/generator/index.js +34 -11
  448. package/dist/generator/input-port-values.d.ts +22 -0
  449. package/dist/generator/{scope-function-generator.d.ts → node-arguments.d.ts} +76 -1
  450. package/dist/generator/node-invocation.d.ts +74 -0
  451. package/dist/{node-types-generator.d.ts → generator/node-types-generator.d.ts} +3 -2
  452. package/dist/generator/scope-closure.d.ts +23 -0
  453. package/dist/generator/scoped-child.d.ts +49 -0
  454. package/dist/{sugar-optimizer.d.ts → generator/sugar-optimizer.d.ts} +1 -1
  455. package/dist/generator/unified.d.ts +14 -2
  456. package/dist/generator/workflow-generator.d.ts +37 -0
  457. package/dist/index.d.ts +29 -26
  458. package/dist/index.js +1322 -92
  459. package/dist/jsdoc-port-sync/apply-diff.d.ts +15 -0
  460. package/dist/jsdoc-port-sync/callback-signature.d.ts +17 -0
  461. package/dist/jsdoc-port-sync/diff.d.ts +5 -7
  462. package/dist/jsdoc-port-sync/incomplete-lines.d.ts +41 -0
  463. package/dist/jsdoc-port-sync/index.d.ts +11 -11
  464. package/dist/jsdoc-port-sync/index.js +88 -45
  465. package/dist/jsdoc-port-sync/jsdoc-to-signature.d.ts +66 -0
  466. package/dist/jsdoc-port-sync/port-parser.d.ts +6 -24
  467. package/dist/jsdoc-port-sync/port-tag-placement.d.ts +55 -0
  468. package/dist/jsdoc-port-sync/scoped-ports.d.ts +21 -0
  469. package/dist/jsdoc-port-sync/signature-parser.d.ts +8 -1
  470. package/dist/jsdoc-port-sync/signature-to-jsdoc.d.ts +77 -0
  471. package/dist/jsdoc-port-sync/sync.d.ts +4 -1
  472. package/dist/marketplace/index.d.ts +5 -3
  473. package/dist/marketplace/index.js +62 -10
  474. package/dist/marketplace/install.d.ts +24 -0
  475. package/dist/marketplace/manifest.d.ts +1 -1
  476. package/dist/marketplace/npmrc.d.ts +24 -0
  477. package/dist/marketplace/registry.d.ts +46 -11
  478. package/dist/marketplace/types.d.ts +41 -24
  479. package/dist/marketplace/validator.d.ts +1 -1
  480. package/dist/mcp/debug-session.d.ts +2 -4
  481. package/dist/mcp/dist-imports.d.ts +12 -0
  482. package/dist/mcp/response-utils.d.ts +11 -9
  483. package/dist/mcp/server.d.ts +0 -1
  484. package/dist/mcp/tools-context.d.ts +11 -0
  485. package/dist/mcp/tools-diagram.d.ts +1 -2
  486. package/dist/mcp/tools-export.d.ts +2 -2
  487. package/dist/mcp/tools-marketplace.d.ts +1 -1
  488. package/dist/mcp/tools-run.d.ts +17 -0
  489. package/dist/mcp/tools-workflow.d.ts +3 -0
  490. package/dist/mcp/types.d.ts +4 -14
  491. package/dist/mcp/workflow-executor.d.ts +57 -19
  492. package/dist/npm-packages.d.ts +1 -1
  493. package/dist/npm-packages.js +10 -473
  494. package/dist/parser/annotation-parser.d.ts +88 -0
  495. package/dist/parser/annotation-suggestion.d.ts +23 -0
  496. package/dist/parser/durable-effect-contract.d.ts +10 -0
  497. package/dist/parser/expression-references.d.ts +101 -0
  498. package/dist/parser/external-node-types.d.ts +69 -0
  499. package/dist/{function-like.d.ts → parser/function-like.d.ts} +10 -3
  500. package/dist/parser/generated-sections.d.ts +25 -0
  501. package/dist/parser/import-resolution.d.ts +67 -0
  502. package/dist/parser/import-stub.d.ts +29 -0
  503. package/dist/parser/jsdoc/config-types.d.ts +209 -0
  504. package/dist/parser/jsdoc/graph-tags.d.ts +54 -0
  505. package/dist/parser/jsdoc/node-type-block.d.ts +23 -0
  506. package/dist/parser/jsdoc/parse-line-once.d.ts +11 -0
  507. package/dist/parser/jsdoc/port-tags.d.ts +42 -0
  508. package/dist/parser/jsdoc/runtime-tags.d.ts +65 -0
  509. package/dist/parser/jsdoc/signature-types.d.ts +52 -0
  510. package/dist/parser/jsdoc/workflow-block.d.ts +22 -0
  511. package/dist/parser/jsdoc-parser.d.ts +23 -0
  512. package/dist/parser/macro-expansion.d.ts +80 -0
  513. package/dist/parser/module-resolution.d.ts +38 -0
  514. package/dist/parser/node-inference.d.ts +39 -0
  515. package/dist/parser/npm-node-types.d.ts +24 -0
  516. package/dist/parser/pack-handlers.d.ts +12 -0
  517. package/dist/parser/path-data-resolution.d.ts +75 -0
  518. package/dist/parser/port-inference.d.ts +15 -0
  519. package/dist/{resolve-package-types.d.ts → parser/resolve-package-types.d.ts} +4 -0
  520. package/dist/parser/serialize-deploy-annotations.d.ts +19 -0
  521. package/dist/parser/tag-registry.d.ts +22 -0
  522. package/dist/parser/workflow-extraction.d.ts +39 -0
  523. package/dist/runtime/ExecutionContext.d.ts +87 -99
  524. package/dist/runtime/continuation-core.d.ts +147 -0
  525. package/dist/runtime/continuation.d.ts +48 -0
  526. package/dist/runtime/debug-controller.d.ts +7 -22
  527. package/dist/runtime/durable-execution.d.ts +176 -0
  528. package/dist/runtime/events.d.ts +16 -1
  529. package/dist/runtime/executable-module-contract.d.ts +16 -0
  530. package/dist/runtime/index.d.ts +13 -10
  531. package/dist/runtime/index.js +947 -9
  532. package/dist/runtime/strict-json.d.ts +15 -0
  533. package/dist/server/access.d.ts +12 -0
  534. package/dist/server/api.d.ts +126 -0
  535. package/dist/server/callback-delivery.d.ts +62 -0
  536. package/dist/server/callback-url.d.ts +44 -0
  537. package/dist/server/context.d.ts +35 -0
  538. package/dist/server/http-error.d.ts +10 -0
  539. package/dist/server/index.d.ts +7 -1
  540. package/dist/server/index.js +125 -6
  541. package/dist/server/openapi-document.d.ts +33 -0
  542. package/dist/server/openapi.d.ts +32 -0
  543. package/dist/server/respond.d.ts +35 -0
  544. package/dist/server/route-params.d.ts +17 -0
  545. package/dist/server/route-plan.d.ts +41 -0
  546. package/dist/server/routes-catalog.d.ts +5 -0
  547. package/dist/server/routes-declared.d.ts +12 -0
  548. package/dist/server/routes-runs.d.ts +8 -0
  549. package/dist/server/run-driver.d.ts +58 -0
  550. package/dist/server/run-view.d.ts +26 -0
  551. package/dist/server/transport.d.ts +35 -0
  552. package/dist/server/types.d.ts +143 -52
  553. package/dist/server/webhook-server.d.ts +12 -38
  554. package/dist/server/workflow-registry.d.ts +7 -4
  555. package/dist/service-registry.d.ts +49 -0
  556. package/dist/service-registry.js +123 -0
  557. package/dist/testing/assertions.d.ts +2 -2
  558. package/dist/testing/index.d.ts +14 -13
  559. package/dist/testing/index.js +582 -24
  560. package/dist/testing/mock-approval.d.ts +3 -5
  561. package/dist/testing/mock-llm.d.ts +2 -3
  562. package/dist/testing/recorder.d.ts +5 -6
  563. package/dist/testing/replayer.d.ts +6 -7
  564. package/dist/testing/run-store-check.d.ts +3 -0
  565. package/dist/testing/token-tracker.d.ts +2 -2
  566. package/dist/{type-mappings.d.ts → types/type-mappings.d.ts} +13 -1
  567. package/dist/utils/error-utils.d.ts +4 -2
  568. package/dist/utils/port-ordering.d.ts +2 -2
  569. package/dist/utils/port-tag-utils.d.ts +1 -1
  570. package/dist/validation/agent-detection.d.ts +17 -5
  571. package/dist/validation/agent-rules.d.ts +6 -7
  572. package/dist/validation/core-rules.d.ts +49 -0
  573. package/dist/validation/design-rules.d.ts +9 -3
  574. package/dist/validation/rule-registry.d.ts +3 -3
  575. package/dist/validation/rules/connections.d.ts +27 -0
  576. package/dist/validation/rules/context.d.ts +11 -0
  577. package/dist/validation/rules/cycles.d.ts +17 -0
  578. package/dist/validation/rules/data-flow.d.ts +19 -0
  579. package/dist/validation/rules/scope-topology.d.ts +35 -0
  580. package/dist/validation/rules/type-compatibility.d.ts +30 -0
  581. package/dist/validation/type-checker.d.ts +39 -0
  582. package/dist/validation/validator-helpers.d.ts +31 -0
  583. package/dist/validation/validator.d.ts +30 -0
  584. package/docs/reference/advanced-annotations.md +277 -60
  585. package/docs/reference/built-in-nodes.md +164 -94
  586. package/docs/reference/cancellation.md +44 -0
  587. package/docs/reference/cli-reference.md +252 -234
  588. package/docs/reference/compilation.md +36 -109
  589. package/docs/reference/concepts.md +80 -63
  590. package/docs/reference/console.md +169 -0
  591. package/docs/reference/debugging.md +26 -57
  592. package/docs/reference/deployment.md +217 -143
  593. package/docs/reference/durable-gates.md +445 -0
  594. package/docs/reference/error-codes.md +90 -43
  595. package/docs/reference/export-interface.md +91 -26
  596. package/docs/reference/iterative-development.md +50 -28
  597. package/docs/reference/jsdoc-grammar.md +66 -311
  598. package/docs/reference/library.md +250 -0
  599. package/docs/reference/marketplace.md +301 -152
  600. package/docs/reference/mcp-tools.md +102 -0
  601. package/docs/reference/node-conversion.md +84 -59
  602. package/docs/reference/orientation.md +68 -0
  603. package/docs/reference/scaffold.md +5 -4
  604. package/docs/reference/tutorial.md +106 -166
  605. package/docs/reference/visual-reference.md +1 -1
  606. package/package.json +85 -50
  607. package/dist/agent/agent-loop.js +0 -156
  608. package/dist/agent/cli-spawn-config.js +0 -65
  609. package/dist/agent/device-connection.d.ts +0 -79
  610. package/dist/agent/device-connection.js +0 -184
  611. package/dist/agent/env-allowlist.js +0 -60
  612. package/dist/agent/providers/anthropic.js +0 -198
  613. package/dist/agent/providers/claude-cli.js +0 -161
  614. package/dist/agent/providers/openai-compat.js +0 -205
  615. package/dist/agent/providers/platform.d.ts +0 -23
  616. package/dist/agent/providers/platform.js +0 -132
  617. package/dist/agent/streaming.js +0 -186
  618. package/dist/agent/types.js +0 -20
  619. package/dist/annotation-generator.d.ts +0 -50
  620. package/dist/annotation-generator.js +0 -743
  621. package/dist/api/builder.js +0 -345
  622. package/dist/api/command-runner.js +0 -787
  623. package/dist/api/compile.js +0 -148
  624. package/dist/api/extract-types.js +0 -57
  625. package/dist/api/generate-in-place.js +0 -1477
  626. package/dist/api/generate.js +0 -514
  627. package/dist/api/helpers.js +0 -285
  628. package/dist/api/inline-runtime.js +0 -526
  629. package/dist/api/manipulation/connections.js +0 -151
  630. package/dist/api/manipulation/index.js +0 -41
  631. package/dist/api/manipulation/node-types.js +0 -200
  632. package/dist/api/manipulation/nodes.js +0 -355
  633. package/dist/api/manipulation/ports.js +0 -228
  634. package/dist/api/manipulation/scopes.js +0 -156
  635. package/dist/api/manipulation/workflow.js +0 -116
  636. package/dist/api/modify-operation.js +0 -177
  637. package/dist/api/parse.js +0 -115
  638. package/dist/api/patterns.d.ts +0 -112
  639. package/dist/api/patterns.js +0 -303
  640. package/dist/api/query.js +0 -840
  641. package/dist/api/templates.js +0 -117
  642. package/dist/api/transform.js +0 -40
  643. package/dist/api/validate.js +0 -64
  644. package/dist/api/validation-registry.js +0 -10
  645. package/dist/api/workflow-file-operations.js +0 -180
  646. package/dist/ast/builder.js +0 -395
  647. package/dist/ast/serialization-node.js +0 -30
  648. package/dist/ast/serialization.js +0 -134
  649. package/dist/ast/types.js +0 -2
  650. package/dist/ast/workflow-utils.js +0 -114
  651. package/dist/body-generator.js +0 -35
  652. package/dist/built-in-nodes/coercion-types.js +0 -61
  653. package/dist/built-in-nodes/delay.js +0 -29
  654. package/dist/built-in-nodes/generated-registry.js +0 -299
  655. package/dist/built-in-nodes/invoke-workflow.js +0 -36
  656. package/dist/built-in-nodes/mock-types.js +0 -42
  657. package/dist/built-in-nodes/wait-for-agent.js +0 -31
  658. package/dist/built-in-nodes/wait-for-event.js +0 -25
  659. package/dist/chevrotain-parser/coerce-parser.js +0 -103
  660. package/dist/chevrotain-parser/connect-parser.js +0 -136
  661. package/dist/chevrotain-parser/fan-parser.js +0 -149
  662. package/dist/chevrotain-parser/grammar-diagrams.js +0 -273
  663. package/dist/chevrotain-parser/index.js +0 -31
  664. package/dist/chevrotain-parser/map-parser.js +0 -130
  665. package/dist/chevrotain-parser/node-parser.js +0 -558
  666. package/dist/chevrotain-parser/path-parser.js +0 -140
  667. package/dist/chevrotain-parser/port-parser.js +0 -519
  668. package/dist/chevrotain-parser/position-parser.d.ts +0 -20
  669. package/dist/chevrotain-parser/position-parser.js +0 -83
  670. package/dist/chevrotain-parser/scope-parser.js +0 -104
  671. package/dist/chevrotain-parser/tokens.js +0 -429
  672. package/dist/chevrotain-parser/trigger-cancel-parser.js +0 -291
  673. package/dist/cli/commands/account.d.ts +0 -4
  674. package/dist/cli/commands/account.js +0 -50
  675. package/dist/cli/commands/ai-credentials.d.ts +0 -12
  676. package/dist/cli/commands/ai-credentials.js +0 -95
  677. package/dist/cli/commands/apikey.d.ts +0 -4
  678. package/dist/cli/commands/apikey.js +0 -64
  679. package/dist/cli/commands/auth.d.ts +0 -9
  680. package/dist/cli/commands/auth.js +0 -255
  681. package/dist/cli/commands/compile.js +0 -331
  682. package/dist/cli/commands/connect.d.ts +0 -4
  683. package/dist/cli/commands/connect.js +0 -163
  684. package/dist/cli/commands/context.js +0 -51
  685. package/dist/cli/commands/create.js +0 -139
  686. package/dist/cli/commands/deploy.d.ts +0 -6
  687. package/dist/cli/commands/deploy.js +0 -74
  688. package/dist/cli/commands/dev.js +0 -227
  689. package/dist/cli/commands/diagram.js +0 -39
  690. package/dist/cli/commands/diff.js +0 -57
  691. package/dist/cli/commands/docs.js +0 -74
  692. package/dist/cli/commands/export.js +0 -153
  693. package/dist/cli/commands/grammar.js +0 -40
  694. package/dist/cli/commands/implement.js +0 -91
  695. package/dist/cli/commands/init-personas.js +0 -541
  696. package/dist/cli/commands/init.js +0 -797
  697. package/dist/cli/commands/market.js +0 -440
  698. package/dist/cli/commands/mcp-setup.js +0 -433
  699. package/dist/cli/commands/migrate.js +0 -91
  700. package/dist/cli/commands/modify.js +0 -58
  701. package/dist/cli/commands/openapi.js +0 -71
  702. package/dist/cli/commands/org.d.ts +0 -8
  703. package/dist/cli/commands/org.js +0 -136
  704. package/dist/cli/commands/pattern.d.ts +0 -34
  705. package/dist/cli/commands/pattern.js +0 -186
  706. package/dist/cli/commands/plugin.d.ts +0 -16
  707. package/dist/cli/commands/plugin.js +0 -176
  708. package/dist/cli/commands/run.js +0 -742
  709. package/dist/cli/commands/serve.js +0 -93
  710. package/dist/cli/commands/status.js +0 -123
  711. package/dist/cli/commands/strip.js +0 -61
  712. package/dist/cli/commands/templates.js +0 -58
  713. package/dist/cli/commands/validate.js +0 -267
  714. package/dist/cli/commands/watch.js +0 -71
  715. package/dist/cli/config/credentials.d.ts +0 -15
  716. package/dist/cli/config/credentials.js +0 -43
  717. package/dist/cli/config/platform-client.d.ts +0 -123
  718. package/dist/cli/config/platform-client.js +0 -248
  719. package/dist/cli/env-setup.js +0 -12
  720. package/dist/cli/index.js +0 -850
  721. package/dist/cli/pack-commands.js +0 -122
  722. package/dist/cli/postinstall.d.ts +0 -16
  723. package/dist/cli/postinstall.js +0 -119
  724. package/dist/cli/templates/ai/mock-provider.js +0 -64
  725. package/dist/cli/templates/ai/types.js +0 -5
  726. package/dist/cli/templates/approvals/index.d.ts +0 -15
  727. package/dist/cli/templates/approvals/index.js +0 -241
  728. package/dist/cli/templates/index.js +0 -123
  729. package/dist/cli/templates/nodes/agent-router.js +0 -114
  730. package/dist/cli/templates/nodes/aggregator.js +0 -63
  731. package/dist/cli/templates/nodes/conversation-memory.js +0 -85
  732. package/dist/cli/templates/nodes/http.js +0 -80
  733. package/dist/cli/templates/nodes/human-approval.js +0 -109
  734. package/dist/cli/templates/nodes/json-extractor.js +0 -119
  735. package/dist/cli/templates/nodes/llm-call.js +0 -106
  736. package/dist/cli/templates/nodes/prompt-template.js +0 -52
  737. package/dist/cli/templates/nodes/rag-retriever.js +0 -128
  738. package/dist/cli/templates/nodes/tool-executor.js +0 -108
  739. package/dist/cli/templates/nodes/transformer.js +0 -68
  740. package/dist/cli/templates/nodes/validator.js +0 -62
  741. package/dist/cli/templates/pack-loader.js +0 -58
  742. package/dist/cli/templates/providers/index.js +0 -239
  743. package/dist/cli/templates/shared/approval-types.js +0 -31
  744. package/dist/cli/templates/shared/llm-types.js +0 -109
  745. package/dist/cli/templates/workflows/aggregator.js +0 -101
  746. package/dist/cli/templates/workflows/ai-agent.js +0 -326
  747. package/dist/cli/templates/workflows/ai-chat.js +0 -167
  748. package/dist/cli/templates/workflows/ai-rag.js +0 -184
  749. package/dist/cli/templates/workflows/ai-react.js +0 -293
  750. package/dist/cli/templates/workflows/conditional.js +0 -139
  751. package/dist/cli/templates/workflows/error-handler.js +0 -145
  752. package/dist/cli/templates/workflows/foreach.js +0 -140
  753. package/dist/cli/templates/workflows/sequential.js +0 -200
  754. package/dist/cli/templates/workflows/webhook.js +0 -158
  755. package/dist/cli/utils/cli-helpers.d.ts +0 -44
  756. package/dist/cli/utils/cli-helpers.js +0 -99
  757. package/dist/cli/utils/logger.js +0 -126
  758. package/dist/cli/utils/parse-int-strict.js +0 -17
  759. package/dist/cli/utils/safe-write.js +0 -54
  760. package/dist/deployment/config/defaults.d.ts +0 -29
  761. package/dist/deployment/config/defaults.js +0 -98
  762. package/dist/deployment/config/loader.d.ts +0 -24
  763. package/dist/deployment/config/loader.js +0 -237
  764. package/dist/deployment/config/types.d.ts +0 -117
  765. package/dist/deployment/config/types.js +0 -5
  766. package/dist/deployment/core/adapters.d.ts +0 -66
  767. package/dist/deployment/core/adapters.js +0 -156
  768. package/dist/deployment/core/executor.d.ts +0 -62
  769. package/dist/deployment/core/executor.js +0 -197
  770. package/dist/deployment/core/formatters.d.ts +0 -42
  771. package/dist/deployment/core/formatters.js +0 -146
  772. package/dist/deployment/openapi/generator.d.ts +0 -146
  773. package/dist/deployment/openapi/generator.js +0 -347
  774. package/dist/deployment/openapi/schema-converter.d.ts +0 -49
  775. package/dist/deployment/openapi/schema-converter.js +0 -192
  776. package/dist/deployment/targets/base.js +0 -855
  777. package/dist/deployment/types.d.ts +0 -140
  778. package/dist/deployment/types.js +0 -8
  779. package/dist/diagram/ascii-renderer.js +0 -528
  780. package/dist/diagram/geometry.js +0 -1226
  781. package/dist/diagram/html-viewer.d.ts +0 -21
  782. package/dist/diagram/html-viewer.js +0 -1745
  783. package/dist/diagram/layout.js +0 -143
  784. package/dist/diagram/orthogonal-router.js +0 -458
  785. package/dist/diagram/renderer.d.ts +0 -3
  786. package/dist/diagram/renderer.js +0 -280
  787. package/dist/diagram/theme.js +0 -282
  788. package/dist/diagram/types.js +0 -2
  789. package/dist/diff/WorkflowDiffer.js +0 -429
  790. package/dist/diff/formatDiff.js +0 -239
  791. package/dist/diff/impact.js +0 -119
  792. package/dist/diff/types.js +0 -35
  793. package/dist/doc-metadata/extractors/annotations.js +0 -638
  794. package/dist/doc-metadata/extractors/cli-commands.js +0 -326
  795. package/dist/doc-metadata/extractors/core-metadata.js +0 -61
  796. package/dist/doc-metadata/extractors/error-codes.js +0 -372
  797. package/dist/doc-metadata/extractors/grammar-rules.js +0 -51
  798. package/dist/doc-metadata/extractors/mcp-tools.js +0 -705
  799. package/dist/doc-metadata/extractors/plugin-api.d.ts +0 -19
  800. package/dist/doc-metadata/extractors/plugin-api.js +0 -279
  801. package/dist/doc-metadata/types.js +0 -5
  802. package/dist/editor-completions/annotationValues.js +0 -146
  803. package/dist/editor-completions/contextParser.js +0 -410
  804. package/dist/editor-completions/dataTypes.js +0 -95
  805. package/dist/editor-completions/goToDefinition.js +0 -112
  806. package/dist/editor-completions/jsDocAnnotations.js +0 -359
  807. package/dist/editor-completions/modifierCompletions.js +0 -197
  808. package/dist/editor-completions/types.js +0 -8
  809. package/dist/export/index.js +0 -212
  810. package/dist/extensions/index.d.ts +0 -16
  811. package/dist/extensions/index.js +0 -17
  812. package/dist/friendly-errors.js +0 -761
  813. package/dist/function-like.js +0 -84
  814. package/dist/generator/async-detection.js +0 -56
  815. package/dist/generator/code-utils.js +0 -551
  816. package/dist/generator/compile-target-registry.d.ts +0 -20
  817. package/dist/generator/compile-target-registry.js +0 -20
  818. package/dist/generator/control-flow.js +0 -358
  819. package/dist/generator/dev-mode-registry.d.ts +0 -27
  820. package/dist/generator/dev-mode-registry.js +0 -20
  821. package/dist/generator/scope-function-generator.js +0 -397
  822. package/dist/generator/unified.js +0 -1831
  823. package/dist/generator.d.ts +0 -54
  824. package/dist/generator.js +0 -101
  825. package/dist/jsdoc-parser.d.ts +0 -377
  826. package/dist/jsdoc-parser.js +0 -1189
  827. package/dist/jsdoc-port-sync/constants.js +0 -103
  828. package/dist/jsdoc-port-sync/diff.js +0 -319
  829. package/dist/jsdoc-port-sync/port-parser.js +0 -579
  830. package/dist/jsdoc-port-sync/rename.js +0 -256
  831. package/dist/jsdoc-port-sync/signature-parser.js +0 -559
  832. package/dist/jsdoc-port-sync/sync.js +0 -653
  833. package/dist/marketplace/manifest.js +0 -194
  834. package/dist/marketplace/registry.js +0 -198
  835. package/dist/marketplace/types.js +0 -9
  836. package/dist/marketplace/validator.js +0 -150
  837. package/dist/mcp/agent-channel.d.ts +0 -35
  838. package/dist/mcp/agent-channel.js +0 -61
  839. package/dist/mcp/auto-registration.d.ts +0 -3
  840. package/dist/mcp/auto-registration.js +0 -62
  841. package/dist/mcp/debug-session.js +0 -25
  842. package/dist/mcp/index.d.ts +0 -11
  843. package/dist/mcp/index.js +0 -10
  844. package/dist/mcp/pack-tools.js +0 -59
  845. package/dist/mcp/prompts.js +0 -68
  846. package/dist/mcp/response-utils.js +0 -97
  847. package/dist/mcp/run-registry.d.ts +0 -29
  848. package/dist/mcp/run-registry.js +0 -24
  849. package/dist/mcp/server.js +0 -63
  850. package/dist/mcp/tools-context.js +0 -51
  851. package/dist/mcp/tools-debug.js +0 -451
  852. package/dist/mcp/tools-diagram.js +0 -97
  853. package/dist/mcp/tools-docs.js +0 -62
  854. package/dist/mcp/tools-export.js +0 -222
  855. package/dist/mcp/tools-marketplace.js +0 -132
  856. package/dist/mcp/tools-model.d.ts +0 -3
  857. package/dist/mcp/tools-model.js +0 -279
  858. package/dist/mcp/tools-pattern.d.ts +0 -3
  859. package/dist/mcp/tools-pattern.js +0 -604
  860. package/dist/mcp/tools-query.js +0 -377
  861. package/dist/mcp/tools-resources.js +0 -41
  862. package/dist/mcp/tools-template.js +0 -119
  863. package/dist/mcp/tools-workflow-run.d.ts +0 -40
  864. package/dist/mcp/tools-workflow-run.js +0 -150
  865. package/dist/mcp/types.js +0 -2
  866. package/dist/mcp/workflow-executor.js +0 -242
  867. package/dist/migration/registry.js +0 -29
  868. package/dist/node-types-generator.js +0 -139
  869. package/dist/parser/tag-registry.js +0 -57
  870. package/dist/parser.d.ts +0 -232
  871. package/dist/parser.js +0 -2500
  872. package/dist/plugin/PluginPanel.d.ts +0 -12
  873. package/dist/plugin/PluginPanel.js +0 -5
  874. package/dist/plugin/index.d.ts +0 -13
  875. package/dist/plugin/index.js +0 -14
  876. package/dist/plugin/types.d.ts +0 -75
  877. package/dist/plugin/types.js +0 -8
  878. package/dist/resolve-package-types.js +0 -123
  879. package/dist/runtime/CancellationError.js +0 -20
  880. package/dist/runtime/ExecutionContext.js +0 -280
  881. package/dist/runtime/builtin-functions.js +0 -549
  882. package/dist/runtime/checkpoint.d.ts +0 -84
  883. package/dist/runtime/checkpoint.js +0 -225
  884. package/dist/runtime/debug-controller.js +0 -247
  885. package/dist/runtime/events.js +0 -2
  886. package/dist/runtime/function-registry.js +0 -66
  887. package/dist/runtime/parameter-resolver.js +0 -113
  888. package/dist/server/types.js +0 -5
  889. package/dist/server/webhook-server.js +0 -269
  890. package/dist/server/workflow-registry.js +0 -202
  891. package/dist/shared-project.js +0 -28
  892. package/dist/sugar-optimizer.js +0 -498
  893. package/dist/testing/assertions.js +0 -127
  894. package/dist/testing/mock-approval.js +0 -98
  895. package/dist/testing/mock-llm.js +0 -119
  896. package/dist/testing/recorder.js +0 -70
  897. package/dist/testing/replayer.js +0 -143
  898. package/dist/testing/token-tracker.js +0 -94
  899. package/dist/type-checker.d.ts +0 -42
  900. package/dist/type-checker.js +0 -190
  901. package/dist/type-mappings.js +0 -131
  902. package/dist/types/branded-ports.d.ts +0 -151
  903. package/dist/types/branded-ports.js +0 -121
  904. package/dist/types/index.d.ts +0 -5
  905. package/dist/types/index.js +0 -5
  906. package/dist/types.d.ts +0 -139
  907. package/dist/types.js +0 -15
  908. package/dist/utils/error-utils.js +0 -27
  909. package/dist/utils/lru-cache.js +0 -40
  910. package/dist/utils/port-ordering.js +0 -81
  911. package/dist/utils/port-tag-utils.js +0 -41
  912. package/dist/utils/string-distance.js +0 -56
  913. package/dist/validation/agent-detection.js +0 -115
  914. package/dist/validation/agent-rules.js +0 -262
  915. package/dist/validation/design-rules.js +0 -377
  916. package/dist/validation/rule-registry.js +0 -37
  917. package/dist/validator.d.ts +0 -113
  918. package/dist/validator.js +0 -1631
  919. package/docs/reference/patterns.md +0 -159
  920. package/scripts/postinstall.cjs +0 -86
  921. /package/dist/{shared-project.d.ts → parser/shared-project.d.ts} +0 -0
  922. /package/dist/{friendly-errors.d.ts → validation/friendly-errors.d.ts} +0 -0
@@ -0,0 +1,3002 @@
1
+ // node_modules/glob/dist/esm/index.min.js
2
+ import { fileURLToPath as Wi } from "node:url";
3
+ import { posix as mi, win32 as re } from "node:path";
4
+ import { fileURLToPath as gi } from "node:url";
5
+ import { lstatSync as wi, readdir as yi, readdirSync as bi, readlinkSync as Si, realpathSync as Ei } from "fs";
6
+ import * as xi from "node:fs";
7
+ import { lstat as Ci, readdir as Ti, readlink as Ai, realpath as ki } from "node:fs/promises";
8
+ import { EventEmitter as ee } from "node:events";
9
+ import Pe from "node:stream";
10
+ import { StringDecoder as ni } from "node:string_decoder";
11
+ var Gt = (n7, t, e) => {
12
+ let s = n7 instanceof RegExp ? ce(n7, e) : n7, i = t instanceof RegExp ? ce(t, e) : t, r = s !== null && i != null && ss(s, i, e);
13
+ return r && { start: r[0], end: r[1], pre: e.slice(0, r[0]), body: e.slice(r[0] + s.length, r[1]), post: e.slice(r[1] + i.length) };
14
+ };
15
+ var ce = (n7, t) => {
16
+ let e = t.match(n7);
17
+ return e ? e[0] : null;
18
+ };
19
+ var ss = (n7, t, e) => {
20
+ let s, i, r, o, h, a = e.indexOf(n7), l = e.indexOf(t, a + 1), u = a;
21
+ if (a >= 0 && l > 0) {
22
+ if (n7 === t) return [a, l];
23
+ for (s = [], r = e.length; u >= 0 && !h; ) {
24
+ if (u === a) s.push(u), a = e.indexOf(n7, u + 1);
25
+ else if (s.length === 1) {
26
+ let c = s.pop();
27
+ c !== void 0 && (h = [c, l]);
28
+ } else i = s.pop(), i !== void 0 && i < r && (r = i, o = l), l = e.indexOf(t, u + 1);
29
+ u = a < l && a >= 0 ? a : l;
30
+ }
31
+ s.length && o !== void 0 && (h = [r, o]);
32
+ }
33
+ return h;
34
+ };
35
+ var fe = "\0SLASH" + Math.random() + "\0";
36
+ var ue = "\0OPEN" + Math.random() + "\0";
37
+ var qt = "\0CLOSE" + Math.random() + "\0";
38
+ var de = "\0COMMA" + Math.random() + "\0";
39
+ var pe = "\0PERIOD" + Math.random() + "\0";
40
+ var is = new RegExp(fe, "g");
41
+ var rs = new RegExp(ue, "g");
42
+ var ns = new RegExp(qt, "g");
43
+ var os = new RegExp(de, "g");
44
+ var hs = new RegExp(pe, "g");
45
+ var as = /\\\\/g;
46
+ var ls = /\\{/g;
47
+ var cs = /\\}/g;
48
+ var fs = /\\,/g;
49
+ var us = /\\./g;
50
+ var ds = 1e5;
51
+ function Ht(n7) {
52
+ return isNaN(n7) ? n7.charCodeAt(0) : parseInt(n7, 10);
53
+ }
54
+ function ps(n7) {
55
+ return n7.replace(as, fe).replace(ls, ue).replace(cs, qt).replace(fs, de).replace(us, pe);
56
+ }
57
+ function ms(n7) {
58
+ return n7.replace(is, "\\").replace(rs, "{").replace(ns, "}").replace(os, ",").replace(hs, ".");
59
+ }
60
+ function me(n7) {
61
+ if (!n7) return [""];
62
+ let t = [], e = Gt("{", "}", n7);
63
+ if (!e) return n7.split(",");
64
+ let { pre: s, body: i, post: r } = e, o = s.split(",");
65
+ o[o.length - 1] += "{" + i + "}";
66
+ let h = me(r);
67
+ return r.length && (o[o.length - 1] += h.shift(), o.push.apply(o, h)), t.push.apply(t, o), t;
68
+ }
69
+ function ge(n7, t = {}) {
70
+ if (!n7) return [];
71
+ let { max: e = ds } = t;
72
+ return n7.slice(0, 2) === "{}" && (n7 = "\\{\\}" + n7.slice(2)), ht(ps(n7), e, true).map(ms);
73
+ }
74
+ function gs(n7) {
75
+ return "{" + n7 + "}";
76
+ }
77
+ function ws(n7) {
78
+ return /^-?0\d/.test(n7);
79
+ }
80
+ function ys(n7, t) {
81
+ return n7 <= t;
82
+ }
83
+ function bs(n7, t) {
84
+ return n7 >= t;
85
+ }
86
+ function ht(n7, t, e) {
87
+ let s = [], i = Gt("{", "}", n7);
88
+ if (!i) return [n7];
89
+ let r = i.pre, o = i.post.length ? ht(i.post, t, false) : [""];
90
+ if (/\$$/.test(i.pre)) for (let h = 0; h < o.length && h < t; h++) {
91
+ let a = r + "{" + i.body + "}" + o[h];
92
+ s.push(a);
93
+ }
94
+ else {
95
+ let h = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), a = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), l = h || a, u = i.body.indexOf(",") >= 0;
96
+ if (!l && !u) return i.post.match(/,(?!,).*\}/) ? (n7 = i.pre + "{" + i.body + qt + i.post, ht(n7, t, true)) : [n7];
97
+ let c;
98
+ if (l) c = i.body.split(/\.\./);
99
+ else if (c = me(i.body), c.length === 1 && c[0] !== void 0 && (c = ht(c[0], t, false).map(gs), c.length === 1)) return o.map((f) => i.pre + c[0] + f);
100
+ let d;
101
+ if (l && c[0] !== void 0 && c[1] !== void 0) {
102
+ let f = Ht(c[0]), m = Ht(c[1]), p = Math.max(c[0].length, c[1].length), w = c.length === 3 && c[2] !== void 0 ? Math.abs(Ht(c[2])) : 1, g = ys;
103
+ m < f && (w *= -1, g = bs);
104
+ let E = c.some(ws);
105
+ d = [];
106
+ for (let y = f; g(y, m); y += w) {
107
+ let b;
108
+ if (a) b = String.fromCharCode(y), b === "\\" && (b = "");
109
+ else if (b = String(y), E) {
110
+ let z = p - b.length;
111
+ if (z > 0) {
112
+ let $ = new Array(z + 1).join("0");
113
+ y < 0 ? b = "-" + $ + b.slice(1) : b = $ + b;
114
+ }
115
+ }
116
+ d.push(b);
117
+ }
118
+ } else {
119
+ d = [];
120
+ for (let f = 0; f < c.length; f++) d.push.apply(d, ht(c[f], t, false));
121
+ }
122
+ for (let f = 0; f < d.length; f++) for (let m = 0; m < o.length && s.length < t; m++) {
123
+ let p = r + d[f] + o[m];
124
+ (!e || l || p) && s.push(p);
125
+ }
126
+ }
127
+ return s;
128
+ }
129
+ var at = (n7) => {
130
+ if (typeof n7 != "string") throw new TypeError("invalid pattern");
131
+ if (n7.length > 65536) throw new TypeError("pattern is too long");
132
+ };
133
+ var Ss = { "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true], "[:alpha:]": ["\\p{L}\\p{Nl}", true], "[:ascii:]": ["\\x00-\\x7f", false], "[:blank:]": ["\\p{Zs}\\t", true], "[:cntrl:]": ["\\p{Cc}", true], "[:digit:]": ["\\p{Nd}", true], "[:graph:]": ["\\p{Z}\\p{C}", true, true], "[:lower:]": ["\\p{Ll}", true], "[:print:]": ["\\p{C}", true], "[:punct:]": ["\\p{P}", true], "[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", true], "[:upper:]": ["\\p{Lu}", true], "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", true], "[:xdigit:]": ["A-Fa-f0-9", false] };
134
+ var lt = (n7) => n7.replace(/[[\]\\-]/g, "\\$&");
135
+ var Es = (n7) => n7.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
136
+ var we = (n7) => n7.join("");
137
+ var ye = (n7, t) => {
138
+ let e = t;
139
+ if (n7.charAt(e) !== "[") throw new Error("not in a brace expression");
140
+ let s = [], i = [], r = e + 1, o = false, h = false, a = false, l = false, u = e, c = "";
141
+ t: for (; r < n7.length; ) {
142
+ let p = n7.charAt(r);
143
+ if ((p === "!" || p === "^") && r === e + 1) {
144
+ l = true, r++;
145
+ continue;
146
+ }
147
+ if (p === "]" && o && !a) {
148
+ u = r + 1;
149
+ break;
150
+ }
151
+ if (o = true, p === "\\" && !a) {
152
+ a = true, r++;
153
+ continue;
154
+ }
155
+ if (p === "[" && !a) {
156
+ for (let [w, [g, S, E]] of Object.entries(Ss)) if (n7.startsWith(w, r)) {
157
+ if (c) return ["$.", false, n7.length - e, true];
158
+ r += w.length, E ? i.push(g) : s.push(g), h = h || S;
159
+ continue t;
160
+ }
161
+ }
162
+ if (a = false, c) {
163
+ p > c ? s.push(lt(c) + "-" + lt(p)) : p === c && s.push(lt(p)), c = "", r++;
164
+ continue;
165
+ }
166
+ if (n7.startsWith("-]", r + 1)) {
167
+ s.push(lt(p + "-")), r += 2;
168
+ continue;
169
+ }
170
+ if (n7.startsWith("-", r + 1)) {
171
+ c = p, r += 2;
172
+ continue;
173
+ }
174
+ s.push(lt(p)), r++;
175
+ }
176
+ if (u < r) return ["", false, 0, false];
177
+ if (!s.length && !i.length) return ["$.", false, n7.length - e, true];
178
+ if (i.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !l) {
179
+ let p = s[0].length === 2 ? s[0].slice(-1) : s[0];
180
+ return [Es(p), false, u - e, false];
181
+ }
182
+ let d = "[" + (l ? "^" : "") + we(s) + "]", f = "[" + (l ? "" : "^") + we(i) + "]";
183
+ return [s.length && i.length ? "(" + d + "|" + f + ")" : s.length ? d : f, h, u - e, true];
184
+ };
185
+ var W = (n7, { windowsPathsNoEscape: t = false, magicalBraces: e = true } = {}) => e ? t ? n7.replace(/\[([^\/\\])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t ? n7.replace(/\[([^\/\\{}])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
186
+ var xs = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
187
+ var be = (n7) => xs.has(n7);
188
+ var vs = "(?!(?:^|/)\\.\\.?(?:$|/))";
189
+ var Ct = "(?!\\.)";
190
+ var Cs = /* @__PURE__ */ new Set(["[", "."]);
191
+ var Ts = /* @__PURE__ */ new Set(["..", "."]);
192
+ var As = new Set("().*{}+?[]^$\\!");
193
+ var ks = (n7) => n7.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
194
+ var Kt = "[^/]";
195
+ var Se = Kt + "*?";
196
+ var Ee = Kt + "+?";
197
+ var Q = class n {
198
+ type;
199
+ #t;
200
+ #s;
201
+ #n = false;
202
+ #r = [];
203
+ #o;
204
+ #S;
205
+ #w;
206
+ #c = false;
207
+ #h;
208
+ #u;
209
+ #f = false;
210
+ constructor(t, e, s = {}) {
211
+ this.type = t, t && (this.#s = true), this.#o = e, this.#t = this.#o ? this.#o.#t : this, this.#h = this.#t === this ? s : this.#t.#h, this.#w = this.#t === this ? [] : this.#t.#w, t === "!" && !this.#t.#c && this.#w.push(this), this.#S = this.#o ? this.#o.#r.length : 0;
212
+ }
213
+ get hasMagic() {
214
+ if (this.#s !== void 0) return this.#s;
215
+ for (let t of this.#r) if (typeof t != "string" && (t.type || t.hasMagic)) return this.#s = true;
216
+ return this.#s;
217
+ }
218
+ toString() {
219
+ return this.#u !== void 0 ? this.#u : this.type ? this.#u = this.type + "(" + this.#r.map((t) => String(t)).join("|") + ")" : this.#u = this.#r.map((t) => String(t)).join("");
220
+ }
221
+ #a() {
222
+ if (this !== this.#t) throw new Error("should only call on root");
223
+ if (this.#c) return this;
224
+ this.toString(), this.#c = true;
225
+ let t;
226
+ for (; t = this.#w.pop(); ) {
227
+ if (t.type !== "!") continue;
228
+ let e = t, s = e.#o;
229
+ for (; s; ) {
230
+ for (let i = e.#S + 1; !s.type && i < s.#r.length; i++) for (let r of t.#r) {
231
+ if (typeof r == "string") throw new Error("string part in extglob AST??");
232
+ r.copyIn(s.#r[i]);
233
+ }
234
+ e = s, s = e.#o;
235
+ }
236
+ }
237
+ return this;
238
+ }
239
+ push(...t) {
240
+ for (let e of t) if (e !== "") {
241
+ if (typeof e != "string" && !(e instanceof n && e.#o === this)) throw new Error("invalid part: " + e);
242
+ this.#r.push(e);
243
+ }
244
+ }
245
+ toJSON() {
246
+ let t = this.type === null ? this.#r.slice().map((e) => typeof e == "string" ? e : e.toJSON()) : [this.type, ...this.#r.map((e) => e.toJSON())];
247
+ return this.isStart() && !this.type && t.unshift([]), this.isEnd() && (this === this.#t || this.#t.#c && this.#o?.type === "!") && t.push({}), t;
248
+ }
249
+ isStart() {
250
+ if (this.#t === this) return true;
251
+ if (!this.#o?.isStart()) return false;
252
+ if (this.#S === 0) return true;
253
+ let t = this.#o;
254
+ for (let e = 0; e < this.#S; e++) {
255
+ let s = t.#r[e];
256
+ if (!(s instanceof n && s.type === "!")) return false;
257
+ }
258
+ return true;
259
+ }
260
+ isEnd() {
261
+ if (this.#t === this || this.#o?.type === "!") return true;
262
+ if (!this.#o?.isEnd()) return false;
263
+ if (!this.type) return this.#o?.isEnd();
264
+ let t = this.#o ? this.#o.#r.length : 0;
265
+ return this.#S === t - 1;
266
+ }
267
+ copyIn(t) {
268
+ typeof t == "string" ? this.push(t) : this.push(t.clone(this));
269
+ }
270
+ clone(t) {
271
+ let e = new n(this.type, t);
272
+ for (let s of this.#r) e.copyIn(s);
273
+ return e;
274
+ }
275
+ static #i(t, e, s, i) {
276
+ let r = false, o = false, h = -1, a = false;
277
+ if (e.type === null) {
278
+ let f = s, m = "";
279
+ for (; f < t.length; ) {
280
+ let p = t.charAt(f++);
281
+ if (r || p === "\\") {
282
+ r = !r, m += p;
283
+ continue;
284
+ }
285
+ if (o) {
286
+ f === h + 1 ? (p === "^" || p === "!") && (a = true) : p === "]" && !(f === h + 2 && a) && (o = false), m += p;
287
+ continue;
288
+ } else if (p === "[") {
289
+ o = true, h = f, a = false, m += p;
290
+ continue;
291
+ }
292
+ if (!i.noext && be(p) && t.charAt(f) === "(") {
293
+ e.push(m), m = "";
294
+ let w = new n(p, e);
295
+ f = n.#i(t, w, f, i), e.push(w);
296
+ continue;
297
+ }
298
+ m += p;
299
+ }
300
+ return e.push(m), f;
301
+ }
302
+ let l = s + 1, u = new n(null, e), c = [], d = "";
303
+ for (; l < t.length; ) {
304
+ let f = t.charAt(l++);
305
+ if (r || f === "\\") {
306
+ r = !r, d += f;
307
+ continue;
308
+ }
309
+ if (o) {
310
+ l === h + 1 ? (f === "^" || f === "!") && (a = true) : f === "]" && !(l === h + 2 && a) && (o = false), d += f;
311
+ continue;
312
+ } else if (f === "[") {
313
+ o = true, h = l, a = false, d += f;
314
+ continue;
315
+ }
316
+ if (be(f) && t.charAt(l) === "(") {
317
+ u.push(d), d = "";
318
+ let m = new n(f, u);
319
+ u.push(m), l = n.#i(t, m, l, i);
320
+ continue;
321
+ }
322
+ if (f === "|") {
323
+ u.push(d), d = "", c.push(u), u = new n(null, e);
324
+ continue;
325
+ }
326
+ if (f === ")") return d === "" && e.#r.length === 0 && (e.#f = true), u.push(d), d = "", e.push(...c, u), l;
327
+ d += f;
328
+ }
329
+ return e.type = null, e.#s = void 0, e.#r = [t.substring(s - 1)], l;
330
+ }
331
+ static fromGlob(t, e = {}) {
332
+ let s = new n(null, void 0, e);
333
+ return n.#i(t, s, 0, e), s;
334
+ }
335
+ toMMPattern() {
336
+ if (this !== this.#t) return this.#t.toMMPattern();
337
+ let t = this.toString(), [e, s, i, r] = this.toRegExpSource();
338
+ if (!(i || this.#s || this.#h.nocase && !this.#h.nocaseMagicOnly && t.toUpperCase() !== t.toLowerCase())) return s;
339
+ let h = (this.#h.nocase ? "i" : "") + (r ? "u" : "");
340
+ return Object.assign(new RegExp(`^${e}$`, h), { _src: e, _glob: t });
341
+ }
342
+ get options() {
343
+ return this.#h;
344
+ }
345
+ toRegExpSource(t) {
346
+ let e = t ?? !!this.#h.dot;
347
+ if (this.#t === this && this.#a(), !this.type) {
348
+ let a = this.isStart() && this.isEnd() && !this.#r.some((f) => typeof f != "string"), l = this.#r.map((f) => {
349
+ let [m, p, w, g] = typeof f == "string" ? n.#E(f, this.#s, a) : f.toRegExpSource(t);
350
+ return this.#s = this.#s || w, this.#n = this.#n || g, m;
351
+ }).join(""), u = "";
352
+ if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && Ts.has(this.#r[0]))) {
353
+ let m = Cs, p = e && m.has(l.charAt(0)) || l.startsWith("\\.") && m.has(l.charAt(2)) || l.startsWith("\\.\\.") && m.has(l.charAt(4)), w = !e && !t && m.has(l.charAt(0));
354
+ u = p ? vs : w ? Ct : "";
355
+ }
356
+ let c = "";
357
+ return this.isEnd() && this.#t.#c && this.#o?.type === "!" && (c = "(?:$|\\/)"), [u + l + c, W(l), this.#s = !!this.#s, this.#n];
358
+ }
359
+ let s = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:", r = this.#d(e);
360
+ if (this.isStart() && this.isEnd() && !r && this.type !== "!") {
361
+ let a = this.toString();
362
+ return this.#r = [a], this.type = null, this.#s = void 0, [a, W(this.toString()), false, false];
363
+ }
364
+ let o = !s || t || e || !Ct ? "" : this.#d(true);
365
+ o === r && (o = ""), o && (r = `(?:${r})(?:${o})*?`);
366
+ let h = "";
367
+ if (this.type === "!" && this.#f) h = (this.isStart() && !e ? Ct : "") + Ee;
368
+ else {
369
+ let a = this.type === "!" ? "))" + (this.isStart() && !e && !t ? Ct : "") + Se + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && o ? ")" : this.type === "*" && o ? ")?" : `)${this.type}`;
370
+ h = i + r + a;
371
+ }
372
+ return [h, W(r), this.#s = !!this.#s, this.#n];
373
+ }
374
+ #d(t) {
375
+ return this.#r.map((e) => {
376
+ if (typeof e == "string") throw new Error("string type in extglob ast??");
377
+ let [s, i, r, o] = e.toRegExpSource(t);
378
+ return this.#n = this.#n || o, s;
379
+ }).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
380
+ }
381
+ static #E(t, e, s = false) {
382
+ let i = false, r = "", o = false, h = false;
383
+ for (let a = 0; a < t.length; a++) {
384
+ let l = t.charAt(a);
385
+ if (i) {
386
+ i = false, r += (As.has(l) ? "\\" : "") + l;
387
+ continue;
388
+ }
389
+ if (l === "*") {
390
+ if (h) continue;
391
+ h = true, r += s && /^[*]+$/.test(t) ? Ee : Se, e = true;
392
+ continue;
393
+ } else h = false;
394
+ if (l === "\\") {
395
+ a === t.length - 1 ? r += "\\\\" : i = true;
396
+ continue;
397
+ }
398
+ if (l === "[") {
399
+ let [u, c, d, f] = ye(t, a);
400
+ if (d) {
401
+ r += u, o = o || c, a += d - 1, e = e || f;
402
+ continue;
403
+ }
404
+ }
405
+ if (l === "?") {
406
+ r += Kt, e = true;
407
+ continue;
408
+ }
409
+ r += ks(l);
410
+ }
411
+ return [r, W(t), !!e, o];
412
+ }
413
+ };
414
+ var tt = (n7, { windowsPathsNoEscape: t = false, magicalBraces: e = false } = {}) => e ? t ? n7.replace(/[?*()[\]{}]/g, "[$&]") : n7.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n7.replace(/[?*()[\]]/g, "[$&]") : n7.replace(/[?*()[\]\\]/g, "\\$&");
415
+ var O = (n7, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? false : new D(t, e).match(n7));
416
+ var Rs = /^\*+([^+@!?\*\[\(]*)$/;
417
+ var Os = (n7) => (t) => !t.startsWith(".") && t.endsWith(n7);
418
+ var Fs = (n7) => (t) => t.endsWith(n7);
419
+ var Ds = (n7) => (n7 = n7.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n7));
420
+ var Ms = (n7) => (n7 = n7.toLowerCase(), (t) => t.toLowerCase().endsWith(n7));
421
+ var Ns = /^\*+\.\*+$/;
422
+ var _s = (n7) => !n7.startsWith(".") && n7.includes(".");
423
+ var Ls = (n7) => n7 !== "." && n7 !== ".." && n7.includes(".");
424
+ var Ws = /^\.\*+$/;
425
+ var Ps = (n7) => n7 !== "." && n7 !== ".." && n7.startsWith(".");
426
+ var js = /^\*+$/;
427
+ var Is = (n7) => n7.length !== 0 && !n7.startsWith(".");
428
+ var zs = (n7) => n7.length !== 0 && n7 !== "." && n7 !== "..";
429
+ var Bs = /^\?+([^+@!?\*\[\(]*)?$/;
430
+ var Us = ([n7, t = ""]) => {
431
+ let e = Ce([n7]);
432
+ return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
433
+ };
434
+ var $s = ([n7, t = ""]) => {
435
+ let e = Te([n7]);
436
+ return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
437
+ };
438
+ var Gs = ([n7, t = ""]) => {
439
+ let e = Te([n7]);
440
+ return t ? (s) => e(s) && s.endsWith(t) : e;
441
+ };
442
+ var Hs = ([n7, t = ""]) => {
443
+ let e = Ce([n7]);
444
+ return t ? (s) => e(s) && s.endsWith(t) : e;
445
+ };
446
+ var Ce = ([n7]) => {
447
+ let t = n7.length;
448
+ return (e) => e.length === t && !e.startsWith(".");
449
+ };
450
+ var Te = ([n7]) => {
451
+ let t = n7.length;
452
+ return (e) => e.length === t && e !== "." && e !== "..";
453
+ };
454
+ var Ae = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
455
+ var xe = { win32: { sep: "\\" }, posix: { sep: "/" } };
456
+ var qs = Ae === "win32" ? xe.win32.sep : xe.posix.sep;
457
+ O.sep = qs;
458
+ var A = /* @__PURE__ */ Symbol("globstar **");
459
+ O.GLOBSTAR = A;
460
+ var Ks = "[^/]";
461
+ var Vs = Ks + "*?";
462
+ var Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
463
+ var Xs = "(?:(?!(?:\\/|^)\\.).)*?";
464
+ var Js = (n7, t = {}) => (e) => O(e, n7, t);
465
+ O.filter = Js;
466
+ var N = (n7, t = {}) => Object.assign({}, n7, t);
467
+ var Zs = (n7) => {
468
+ if (!n7 || typeof n7 != "object" || !Object.keys(n7).length) return O;
469
+ let t = O;
470
+ return Object.assign((s, i, r = {}) => t(s, i, N(n7, r)), { Minimatch: class extends t.Minimatch {
471
+ constructor(i, r = {}) {
472
+ super(i, N(n7, r));
473
+ }
474
+ static defaults(i) {
475
+ return t.defaults(N(n7, i)).Minimatch;
476
+ }
477
+ }, AST: class extends t.AST {
478
+ constructor(i, r, o = {}) {
479
+ super(i, r, N(n7, o));
480
+ }
481
+ static fromGlob(i, r = {}) {
482
+ return t.AST.fromGlob(i, N(n7, r));
483
+ }
484
+ }, unescape: (s, i = {}) => t.unescape(s, N(n7, i)), escape: (s, i = {}) => t.escape(s, N(n7, i)), filter: (s, i = {}) => t.filter(s, N(n7, i)), defaults: (s) => t.defaults(N(n7, s)), makeRe: (s, i = {}) => t.makeRe(s, N(n7, i)), braceExpand: (s, i = {}) => t.braceExpand(s, N(n7, i)), match: (s, i, r = {}) => t.match(s, i, N(n7, r)), sep: t.sep, GLOBSTAR: A });
485
+ };
486
+ O.defaults = Zs;
487
+ var ke = (n7, t = {}) => (at(n7), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n7) ? [n7] : ge(n7, { max: t.braceExpandMax }));
488
+ O.braceExpand = ke;
489
+ var Qs = (n7, t = {}) => new D(n7, t).makeRe();
490
+ O.makeRe = Qs;
491
+ var ti = (n7, t, e = {}) => {
492
+ let s = new D(t, e);
493
+ return n7 = n7.filter((i) => s.match(i)), s.options.nonull && !n7.length && n7.push(t), n7;
494
+ };
495
+ O.match = ti;
496
+ var ve = /[?*]|[+@!]\(.*?\)|\[|\]/;
497
+ var ei = (n7) => n7.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
498
+ var D = class {
499
+ options;
500
+ set;
501
+ pattern;
502
+ windowsPathsNoEscape;
503
+ nonegate;
504
+ negate;
505
+ comment;
506
+ empty;
507
+ preserveMultipleSlashes;
508
+ partial;
509
+ globSet;
510
+ globParts;
511
+ nocase;
512
+ isWindows;
513
+ platform;
514
+ windowsNoMagicRoot;
515
+ regexp;
516
+ constructor(t, e = {}) {
517
+ at(t), e = e || {}, this.options = e, this.pattern = t, this.platform = e.platform || Ae, this.isWindows = this.platform === "win32";
518
+ let s = "allowWindowsEscape";
519
+ this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e[s] === false, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e.preserveMultipleSlashes, this.regexp = null, this.negate = false, this.nonegate = !!e.nonegate, this.comment = false, this.empty = false, this.partial = !!e.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e.windowsNoMagicRoot !== void 0 ? e.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
520
+ }
521
+ hasMagic() {
522
+ if (this.options.magicalBraces && this.set.length > 1) return true;
523
+ for (let t of this.set) for (let e of t) if (typeof e != "string") return true;
524
+ return false;
525
+ }
526
+ debug(...t) {
527
+ }
528
+ make() {
529
+ let t = this.pattern, e = this.options;
530
+ if (!e.nocomment && t.charAt(0) === "#") {
531
+ this.comment = true;
532
+ return;
533
+ }
534
+ if (!t) {
535
+ this.empty = true;
536
+ return;
537
+ }
538
+ this.parseNegate(), this.globSet = [...new Set(this.braceExpand())], e.debug && (this.debug = (...r) => console.error(...r)), this.debug(this.pattern, this.globSet);
539
+ let s = this.globSet.map((r) => this.slashSplit(r));
540
+ this.globParts = this.preprocess(s), this.debug(this.pattern, this.globParts);
541
+ let i = this.globParts.map((r, o, h) => {
542
+ if (this.isWindows && this.windowsNoMagicRoot) {
543
+ let a = r[0] === "" && r[1] === "" && (r[2] === "?" || !ve.test(r[2])) && !ve.test(r[3]), l = /^[a-z]:/i.test(r[0]);
544
+ if (a) return [...r.slice(0, 4), ...r.slice(4).map((u) => this.parse(u))];
545
+ if (l) return [r[0], ...r.slice(1).map((u) => this.parse(u))];
546
+ }
547
+ return r.map((a) => this.parse(a));
548
+ });
549
+ if (this.debug(this.pattern, i), this.set = i.filter((r) => r.indexOf(false) === -1), this.isWindows) for (let r = 0; r < this.set.length; r++) {
550
+ let o = this.set[r];
551
+ o[0] === "" && o[1] === "" && this.globParts[r][2] === "?" && typeof o[3] == "string" && /^[a-z]:$/i.test(o[3]) && (o[2] = "?");
552
+ }
553
+ this.debug(this.pattern, this.set);
554
+ }
555
+ preprocess(t) {
556
+ if (this.options.noglobstar) for (let s = 0; s < t.length; s++) for (let i = 0; i < t[s].length; i++) t[s][i] === "**" && (t[s][i] = "*");
557
+ let { optimizationLevel: e = 1 } = this.options;
558
+ return e >= 2 ? (t = this.firstPhasePreProcess(t), t = this.secondPhasePreProcess(t)) : e >= 1 ? t = this.levelOneOptimize(t) : t = this.adjascentGlobstarOptimize(t), t;
559
+ }
560
+ adjascentGlobstarOptimize(t) {
561
+ return t.map((e) => {
562
+ let s = -1;
563
+ for (; (s = e.indexOf("**", s + 1)) !== -1; ) {
564
+ let i = s;
565
+ for (; e[i + 1] === "**"; ) i++;
566
+ i !== s && e.splice(s, i - s);
567
+ }
568
+ return e;
569
+ });
570
+ }
571
+ levelOneOptimize(t) {
572
+ return t.map((e) => (e = e.reduce((s, i) => {
573
+ let r = s[s.length - 1];
574
+ return i === "**" && r === "**" ? s : i === ".." && r && r !== ".." && r !== "." && r !== "**" ? (s.pop(), s) : (s.push(i), s);
575
+ }, []), e.length === 0 ? [""] : e));
576
+ }
577
+ levelTwoFileOptimize(t) {
578
+ Array.isArray(t) || (t = this.slashSplit(t));
579
+ let e = false;
580
+ do {
581
+ if (e = false, !this.preserveMultipleSlashes) {
582
+ for (let i = 1; i < t.length - 1; i++) {
583
+ let r = t[i];
584
+ i === 1 && r === "" && t[0] === "" || (r === "." || r === "") && (e = true, t.splice(i, 1), i--);
585
+ }
586
+ t[0] === "." && t.length === 2 && (t[1] === "." || t[1] === "") && (e = true, t.pop());
587
+ }
588
+ let s = 0;
589
+ for (; (s = t.indexOf("..", s + 1)) !== -1; ) {
590
+ let i = t[s - 1];
591
+ i && i !== "." && i !== ".." && i !== "**" && (e = true, t.splice(s - 1, 2), s -= 2);
592
+ }
593
+ } while (e);
594
+ return t.length === 0 ? [""] : t;
595
+ }
596
+ firstPhasePreProcess(t) {
597
+ let e = false;
598
+ do {
599
+ e = false;
600
+ for (let s of t) {
601
+ let i = -1;
602
+ for (; (i = s.indexOf("**", i + 1)) !== -1; ) {
603
+ let o = i;
604
+ for (; s[o + 1] === "**"; ) o++;
605
+ o > i && s.splice(i + 1, o - i);
606
+ let h = s[i + 1], a = s[i + 2], l = s[i + 3];
607
+ if (h !== ".." || !a || a === "." || a === ".." || !l || l === "." || l === "..") continue;
608
+ e = true, s.splice(i, 1);
609
+ let u = s.slice(0);
610
+ u[i] = "**", t.push(u), i--;
611
+ }
612
+ if (!this.preserveMultipleSlashes) {
613
+ for (let o = 1; o < s.length - 1; o++) {
614
+ let h = s[o];
615
+ o === 1 && h === "" && s[0] === "" || (h === "." || h === "") && (e = true, s.splice(o, 1), o--);
616
+ }
617
+ s[0] === "." && s.length === 2 && (s[1] === "." || s[1] === "") && (e = true, s.pop());
618
+ }
619
+ let r = 0;
620
+ for (; (r = s.indexOf("..", r + 1)) !== -1; ) {
621
+ let o = s[r - 1];
622
+ if (o && o !== "." && o !== ".." && o !== "**") {
623
+ e = true;
624
+ let a = r === 1 && s[r + 1] === "**" ? ["."] : [];
625
+ s.splice(r - 1, 2, ...a), s.length === 0 && s.push(""), r -= 2;
626
+ }
627
+ }
628
+ }
629
+ } while (e);
630
+ return t;
631
+ }
632
+ secondPhasePreProcess(t) {
633
+ for (let e = 0; e < t.length - 1; e++) for (let s = e + 1; s < t.length; s++) {
634
+ let i = this.partsMatch(t[e], t[s], !this.preserveMultipleSlashes);
635
+ if (i) {
636
+ t[e] = [], t[s] = i;
637
+ break;
638
+ }
639
+ }
640
+ return t.filter((e) => e.length);
641
+ }
642
+ partsMatch(t, e, s = false) {
643
+ let i = 0, r = 0, o = [], h = "";
644
+ for (; i < t.length && r < e.length; ) if (t[i] === e[r]) o.push(h === "b" ? e[r] : t[i]), i++, r++;
645
+ else if (s && t[i] === "**" && e[r] === t[i + 1]) o.push(t[i]), i++;
646
+ else if (s && e[r] === "**" && t[i] === e[r + 1]) o.push(e[r]), r++;
647
+ else if (t[i] === "*" && e[r] && (this.options.dot || !e[r].startsWith(".")) && e[r] !== "**") {
648
+ if (h === "b") return false;
649
+ h = "a", o.push(t[i]), i++, r++;
650
+ } else if (e[r] === "*" && t[i] && (this.options.dot || !t[i].startsWith(".")) && t[i] !== "**") {
651
+ if (h === "a") return false;
652
+ h = "b", o.push(e[r]), i++, r++;
653
+ } else return false;
654
+ return t.length === e.length && o;
655
+ }
656
+ parseNegate() {
657
+ if (this.nonegate) return;
658
+ let t = this.pattern, e = false, s = 0;
659
+ for (let i = 0; i < t.length && t.charAt(i) === "!"; i++) e = !e, s++;
660
+ s && (this.pattern = t.slice(s)), this.negate = e;
661
+ }
662
+ matchOne(t, e, s = false) {
663
+ let i = this.options;
664
+ if (this.isWindows) {
665
+ let p = typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]), w = !p && t[0] === "" && t[1] === "" && t[2] === "?" && /^[a-z]:$/i.test(t[3]), g = typeof e[0] == "string" && /^[a-z]:$/i.test(e[0]), S = !g && e[0] === "" && e[1] === "" && e[2] === "?" && typeof e[3] == "string" && /^[a-z]:$/i.test(e[3]), E = w ? 3 : p ? 0 : void 0, y = S ? 3 : g ? 0 : void 0;
666
+ if (typeof E == "number" && typeof y == "number") {
667
+ let [b, z] = [t[E], e[y]];
668
+ b.toLowerCase() === z.toLowerCase() && (e[y] = b, y > E ? e = e.slice(y) : E > y && (t = t.slice(E)));
669
+ }
670
+ }
671
+ let { optimizationLevel: r = 1 } = this.options;
672
+ r >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, { file: t, pattern: e }), this.debug("matchOne", t.length, e.length);
673
+ for (var o = 0, h = 0, a = t.length, l = e.length; o < a && h < l; o++, h++) {
674
+ this.debug("matchOne loop");
675
+ var u = e[h], c = t[o];
676
+ if (this.debug(e, u, c), u === false) return false;
677
+ if (u === A) {
678
+ this.debug("GLOBSTAR", [e, u, c]);
679
+ var d = o, f = h + 1;
680
+ if (f === l) {
681
+ for (this.debug("** at the end"); o < a; o++) if (t[o] === "." || t[o] === ".." || !i.dot && t[o].charAt(0) === ".") return false;
682
+ return true;
683
+ }
684
+ for (; d < a; ) {
685
+ var m = t[d];
686
+ if (this.debug(`
687
+ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) return this.debug("globstar found match!", d, a, m), true;
688
+ if (m === "." || m === ".." || !i.dot && m.charAt(0) === ".") {
689
+ this.debug("dot detected!", t, d, e, f);
690
+ break;
691
+ }
692
+ this.debug("globstar swallow a segment, and continue"), d++;
693
+ }
694
+ return !!(s && (this.debug(`
695
+ >>> no match, partial?`, t, d, e, f), d === a));
696
+ }
697
+ let p;
698
+ if (typeof u == "string" ? (p = c === u, this.debug("string match", u, c, p)) : (p = u.test(c), this.debug("pattern match", u, c, p)), !p) return false;
699
+ }
700
+ if (o === a && h === l) return true;
701
+ if (o === a) return s;
702
+ if (h === l) return o === a - 1 && t[o] === "";
703
+ throw new Error("wtf?");
704
+ }
705
+ braceExpand() {
706
+ return ke(this.pattern, this.options);
707
+ }
708
+ parse(t) {
709
+ at(t);
710
+ let e = this.options;
711
+ if (t === "**") return A;
712
+ if (t === "") return "";
713
+ let s, i = null;
714
+ (s = t.match(js)) ? i = e.dot ? zs : Is : (s = t.match(Rs)) ? i = (e.nocase ? e.dot ? Ms : Ds : e.dot ? Fs : Os)(s[1]) : (s = t.match(Bs)) ? i = (e.nocase ? e.dot ? $s : Us : e.dot ? Gs : Hs)(s) : (s = t.match(Ns)) ? i = e.dot ? Ls : _s : (s = t.match(Ws)) && (i = Ps);
715
+ let r = Q.fromGlob(t, this.options).toMMPattern();
716
+ return i && typeof r == "object" && Reflect.defineProperty(r, "test", { value: i }), r;
717
+ }
718
+ makeRe() {
719
+ if (this.regexp || this.regexp === false) return this.regexp;
720
+ let t = this.set;
721
+ if (!t.length) return this.regexp = false, this.regexp;
722
+ let e = this.options, s = e.noglobstar ? Vs : e.dot ? Ys : Xs, i = new Set(e.nocase ? ["i"] : []), r = t.map((a) => {
723
+ let l = a.map((c) => {
724
+ if (c instanceof RegExp) for (let d of c.flags.split("")) i.add(d);
725
+ return typeof c == "string" ? ei(c) : c === A ? A : c._src;
726
+ });
727
+ l.forEach((c, d) => {
728
+ let f = l[d + 1], m = l[d - 1];
729
+ c !== A || m === A || (m === void 0 ? f !== void 0 && f !== A ? l[d + 1] = "(?:\\/|" + s + "\\/)?" + f : l[d] = s : f === void 0 ? l[d - 1] = m + "(?:\\/|\\/" + s + ")?" : f !== A && (l[d - 1] = m + "(?:\\/|\\/" + s + "\\/)" + f, l[d + 1] = A));
730
+ });
731
+ let u = l.filter((c) => c !== A);
732
+ if (this.partial && u.length >= 1) {
733
+ let c = [];
734
+ for (let d = 1; d <= u.length; d++) c.push(u.slice(0, d).join("/"));
735
+ return "(?:" + c.join("|") + ")";
736
+ }
737
+ return u.join("/");
738
+ }).join("|"), [o, h] = t.length > 1 ? ["(?:", ")"] : ["", ""];
739
+ r = "^" + o + r + h + "$", this.partial && (r = "^(?:\\/|" + o + r.slice(1, -1) + h + ")$"), this.negate && (r = "^(?!" + r + ").+$");
740
+ try {
741
+ this.regexp = new RegExp(r, [...i].join(""));
742
+ } catch {
743
+ this.regexp = false;
744
+ }
745
+ return this.regexp;
746
+ }
747
+ slashSplit(t) {
748
+ return this.preserveMultipleSlashes ? t.split("/") : this.isWindows && /^\/\/[^\/]+/.test(t) ? ["", ...t.split(/\/+/)] : t.split(/\/+/);
749
+ }
750
+ match(t, e = this.partial) {
751
+ if (this.debug("match", t, this.pattern), this.comment) return false;
752
+ if (this.empty) return t === "";
753
+ if (t === "/" && e) return true;
754
+ let s = this.options;
755
+ this.isWindows && (t = t.split("\\").join("/"));
756
+ let i = this.slashSplit(t);
757
+ this.debug(this.pattern, "split", i);
758
+ let r = this.set;
759
+ this.debug(this.pattern, "set", r);
760
+ let o = i[i.length - 1];
761
+ if (!o) for (let h = i.length - 2; !o && h >= 0; h--) o = i[h];
762
+ for (let h = 0; h < r.length; h++) {
763
+ let a = r[h], l = i;
764
+ if (s.matchBase && a.length === 1 && (l = [o]), this.matchOne(l, a, e)) return s.flipNegate ? true : !this.negate;
765
+ }
766
+ return s.flipNegate ? false : this.negate;
767
+ }
768
+ static defaults(t) {
769
+ return O.defaults(t).Minimatch;
770
+ }
771
+ };
772
+ O.AST = Q;
773
+ O.Minimatch = D;
774
+ O.escape = tt;
775
+ O.unescape = W;
776
+ var si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
777
+ var Oe = /* @__PURE__ */ new Set();
778
+ var Vt = typeof process == "object" && process ? process : {};
779
+ var Fe = (n7, t, e, s) => {
780
+ typeof Vt.emitWarning == "function" ? Vt.emitWarning(n7, t, e, s) : console.error(`[${e}] ${t}: ${n7}`);
781
+ };
782
+ var At = globalThis.AbortController;
783
+ var Re = globalThis.AbortSignal;
784
+ if (typeof At > "u") {
785
+ Re = class {
786
+ onabort;
787
+ _onabort = [];
788
+ reason;
789
+ aborted = false;
790
+ addEventListener(e, s) {
791
+ this._onabort.push(s);
792
+ }
793
+ }, At = class {
794
+ constructor() {
795
+ t();
796
+ }
797
+ signal = new Re();
798
+ abort(e) {
799
+ if (!this.signal.aborted) {
800
+ this.signal.reason = e, this.signal.aborted = true;
801
+ for (let s of this.signal._onabort) s(e);
802
+ this.signal.onabort?.(e);
803
+ }
804
+ }
805
+ };
806
+ let n7 = Vt.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1", t = () => {
807
+ n7 && (n7 = false, Fe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
808
+ };
809
+ }
810
+ var ii = (n7) => !Oe.has(n7);
811
+ var q = (n7) => n7 && n7 === Math.floor(n7) && n7 > 0 && isFinite(n7);
812
+ var De = (n7) => q(n7) ? n7 <= Math.pow(2, 8) ? Uint8Array : n7 <= Math.pow(2, 16) ? Uint16Array : n7 <= Math.pow(2, 32) ? Uint32Array : n7 <= Number.MAX_SAFE_INTEGER ? Tt : null : null;
813
+ var Tt = class extends Array {
814
+ constructor(n7) {
815
+ super(n7), this.fill(0);
816
+ }
817
+ };
818
+ var ri = class ct {
819
+ heap;
820
+ length;
821
+ static #t = false;
822
+ static create(t) {
823
+ let e = De(t);
824
+ if (!e) return [];
825
+ ct.#t = true;
826
+ let s = new ct(t, e);
827
+ return ct.#t = false, s;
828
+ }
829
+ constructor(t, e) {
830
+ if (!ct.#t) throw new TypeError("instantiate Stack using Stack.create(n)");
831
+ this.heap = new e(t), this.length = 0;
832
+ }
833
+ push(t) {
834
+ this.heap[this.length++] = t;
835
+ }
836
+ pop() {
837
+ return this.heap[--this.length];
838
+ }
839
+ };
840
+ var ft = class Me {
841
+ #t;
842
+ #s;
843
+ #n;
844
+ #r;
845
+ #o;
846
+ #S;
847
+ #w;
848
+ #c;
849
+ get perf() {
850
+ return this.#c;
851
+ }
852
+ ttl;
853
+ ttlResolution;
854
+ ttlAutopurge;
855
+ updateAgeOnGet;
856
+ updateAgeOnHas;
857
+ allowStale;
858
+ noDisposeOnSet;
859
+ noUpdateTTL;
860
+ maxEntrySize;
861
+ sizeCalculation;
862
+ noDeleteOnFetchRejection;
863
+ noDeleteOnStaleGet;
864
+ allowStaleOnFetchAbort;
865
+ allowStaleOnFetchRejection;
866
+ ignoreFetchAbort;
867
+ #h;
868
+ #u;
869
+ #f;
870
+ #a;
871
+ #i;
872
+ #d;
873
+ #E;
874
+ #b;
875
+ #p;
876
+ #R;
877
+ #m;
878
+ #C;
879
+ #T;
880
+ #g;
881
+ #y;
882
+ #x;
883
+ #A;
884
+ #e;
885
+ #_;
886
+ static unsafeExposeInternals(t) {
887
+ return { starts: t.#T, ttls: t.#g, autopurgeTimers: t.#y, sizes: t.#C, keyMap: t.#f, keyList: t.#a, valList: t.#i, next: t.#d, prev: t.#E, get head() {
888
+ return t.#b;
889
+ }, get tail() {
890
+ return t.#p;
891
+ }, free: t.#R, isBackgroundFetch: (e) => t.#l(e), backgroundFetch: (e, s, i, r) => t.#U(e, s, i, r), moveToTail: (e) => t.#W(e), indexes: (e) => t.#F(e), rindexes: (e) => t.#D(e), isStale: (e) => t.#v(e) };
892
+ }
893
+ get max() {
894
+ return this.#t;
895
+ }
896
+ get maxSize() {
897
+ return this.#s;
898
+ }
899
+ get calculatedSize() {
900
+ return this.#u;
901
+ }
902
+ get size() {
903
+ return this.#h;
904
+ }
905
+ get fetchMethod() {
906
+ return this.#S;
907
+ }
908
+ get memoMethod() {
909
+ return this.#w;
910
+ }
911
+ get dispose() {
912
+ return this.#n;
913
+ }
914
+ get onInsert() {
915
+ return this.#r;
916
+ }
917
+ get disposeAfter() {
918
+ return this.#o;
919
+ }
920
+ constructor(t) {
921
+ let { max: e = 0, ttl: s, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: a, dispose: l, onInsert: u, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: f, maxSize: m = 0, maxEntrySize: p = 0, sizeCalculation: w, fetchMethod: g, memoMethod: S, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: y, allowStaleOnFetchRejection: b, allowStaleOnFetchAbort: z, ignoreFetchAbort: $, perf: J } = t;
922
+ if (J !== void 0 && typeof J?.now != "function") throw new TypeError("perf option must have a now() method if specified");
923
+ if (this.#c = J ?? si, e !== 0 && !q(e)) throw new TypeError("max option must be a nonnegative integer");
924
+ let Z = e ? De(e) : Array;
925
+ if (!Z) throw new Error("invalid max value: " + e);
926
+ if (this.#t = e, this.#s = m, this.maxEntrySize = p || this.#s, this.sizeCalculation = w, this.sizeCalculation) {
927
+ if (!this.#s && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
928
+ if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
929
+ }
930
+ if (S !== void 0 && typeof S != "function") throw new TypeError("memoMethod must be a function if defined");
931
+ if (this.#w = S, g !== void 0 && typeof g != "function") throw new TypeError("fetchMethod must be a function if specified");
932
+ if (this.#S = g, this.#A = !!g, this.#f = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new Z(e), this.#E = new Z(e), this.#b = 0, this.#p = 0, this.#R = ri.create(e), this.#h = 0, this.#u = 0, typeof l == "function" && (this.#n = l), typeof u == "function" && (this.#r = u), typeof c == "function" ? (this.#o = c, this.#m = []) : (this.#o = void 0, this.#m = void 0), this.#x = !!this.#n, this.#_ = !!this.#r, this.#e = !!this.#o, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!f, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!b, this.allowStaleOnFetchAbort = !!z, this.ignoreFetchAbort = !!$, this.maxEntrySize !== 0) {
933
+ if (this.#s !== 0 && !q(this.#s)) throw new TypeError("maxSize must be a positive integer if specified");
934
+ if (!q(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
935
+ this.#G();
936
+ }
937
+ if (this.allowStale = !!a, this.noDeleteOnStaleGet = !!y, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!h, this.ttlResolution = q(i) || i === 0 ? i : 1, this.ttlAutopurge = !!r, this.ttl = s || 0, this.ttl) {
938
+ if (!q(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
939
+ this.#M();
940
+ }
941
+ if (this.#t === 0 && this.ttl === 0 && this.#s === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
942
+ if (!this.ttlAutopurge && !this.#t && !this.#s) {
943
+ let $t = "LRU_CACHE_UNBOUNDED";
944
+ ii($t) && (Oe.add($t), Fe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", $t, Me));
945
+ }
946
+ }
947
+ getRemainingTTL(t) {
948
+ return this.#f.has(t) ? 1 / 0 : 0;
949
+ }
950
+ #M() {
951
+ let t = new Tt(this.#t), e = new Tt(this.#t);
952
+ this.#g = t, this.#T = e;
953
+ let s = this.ttlAutopurge ? new Array(this.#t) : void 0;
954
+ this.#y = s, this.#j = (o, h, a = this.#c.now()) => {
955
+ if (e[o] = h !== 0 ? a : 0, t[o] = h, s?.[o] && (clearTimeout(s[o]), s[o] = void 0), h !== 0 && s) {
956
+ let l = setTimeout(() => {
957
+ this.#v(o) && this.#O(this.#a[o], "expire");
958
+ }, h + 1);
959
+ l.unref && l.unref(), s[o] = l;
960
+ }
961
+ }, this.#k = (o) => {
962
+ e[o] = t[o] !== 0 ? this.#c.now() : 0;
963
+ }, this.#N = (o, h) => {
964
+ if (t[h]) {
965
+ let a = t[h], l = e[h];
966
+ if (!a || !l) return;
967
+ o.ttl = a, o.start = l, o.now = i || r();
968
+ let u = o.now - l;
969
+ o.remainingTTL = a - u;
970
+ }
971
+ };
972
+ let i = 0, r = () => {
973
+ let o = this.#c.now();
974
+ if (this.ttlResolution > 0) {
975
+ i = o;
976
+ let h = setTimeout(() => i = 0, this.ttlResolution);
977
+ h.unref && h.unref();
978
+ }
979
+ return o;
980
+ };
981
+ this.getRemainingTTL = (o) => {
982
+ let h = this.#f.get(o);
983
+ if (h === void 0) return 0;
984
+ let a = t[h], l = e[h];
985
+ if (!a || !l) return 1 / 0;
986
+ let u = (i || r()) - l;
987
+ return a - u;
988
+ }, this.#v = (o) => {
989
+ let h = e[o], a = t[o];
990
+ return !!a && !!h && (i || r()) - h > a;
991
+ };
992
+ }
993
+ #k = () => {
994
+ };
995
+ #N = () => {
996
+ };
997
+ #j = () => {
998
+ };
999
+ #v = () => false;
1000
+ #G() {
1001
+ let t = new Tt(this.#t);
1002
+ this.#u = 0, this.#C = t, this.#P = (e) => {
1003
+ this.#u -= t[e], t[e] = 0;
1004
+ }, this.#I = (e, s, i, r) => {
1005
+ if (this.#l(s)) return 0;
1006
+ if (!q(i)) if (r) {
1007
+ if (typeof r != "function") throw new TypeError("sizeCalculation must be a function");
1008
+ if (i = r(s, e), !q(i)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
1009
+ } else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
1010
+ return i;
1011
+ }, this.#L = (e, s, i) => {
1012
+ if (t[e] = s, this.#s) {
1013
+ let r = this.#s - t[e];
1014
+ for (; this.#u > r; ) this.#B(true);
1015
+ }
1016
+ this.#u += t[e], i && (i.entrySize = s, i.totalCalculatedSize = this.#u);
1017
+ };
1018
+ }
1019
+ #P = (t) => {
1020
+ };
1021
+ #L = (t, e, s) => {
1022
+ };
1023
+ #I = (t, e, s, i) => {
1024
+ if (s || i) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
1025
+ return 0;
1026
+ };
1027
+ *#F({ allowStale: t = this.allowStale } = {}) {
1028
+ if (this.#h) for (let e = this.#p; !(!this.#z(e) || ((t || !this.#v(e)) && (yield e), e === this.#b)); ) e = this.#E[e];
1029
+ }
1030
+ *#D({ allowStale: t = this.allowStale } = {}) {
1031
+ if (this.#h) for (let e = this.#b; !(!this.#z(e) || ((t || !this.#v(e)) && (yield e), e === this.#p)); ) e = this.#d[e];
1032
+ }
1033
+ #z(t) {
1034
+ return t !== void 0 && this.#f.get(this.#a[t]) === t;
1035
+ }
1036
+ *entries() {
1037
+ for (let t of this.#F()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]);
1038
+ }
1039
+ *rentries() {
1040
+ for (let t of this.#D()) this.#i[t] !== void 0 && this.#a[t] !== void 0 && !this.#l(this.#i[t]) && (yield [this.#a[t], this.#i[t]]);
1041
+ }
1042
+ *keys() {
1043
+ for (let t of this.#F()) {
1044
+ let e = this.#a[t];
1045
+ e !== void 0 && !this.#l(this.#i[t]) && (yield e);
1046
+ }
1047
+ }
1048
+ *rkeys() {
1049
+ for (let t of this.#D()) {
1050
+ let e = this.#a[t];
1051
+ e !== void 0 && !this.#l(this.#i[t]) && (yield e);
1052
+ }
1053
+ }
1054
+ *values() {
1055
+ for (let t of this.#F()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
1056
+ }
1057
+ *rvalues() {
1058
+ for (let t of this.#D()) this.#i[t] !== void 0 && !this.#l(this.#i[t]) && (yield this.#i[t]);
1059
+ }
1060
+ [Symbol.iterator]() {
1061
+ return this.entries();
1062
+ }
1063
+ [Symbol.toStringTag] = "LRUCache";
1064
+ find(t, e = {}) {
1065
+ for (let s of this.#F()) {
1066
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
1067
+ if (r !== void 0 && t(r, this.#a[s], this)) return this.get(this.#a[s], e);
1068
+ }
1069
+ }
1070
+ forEach(t, e = this) {
1071
+ for (let s of this.#F()) {
1072
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
1073
+ r !== void 0 && t.call(e, r, this.#a[s], this);
1074
+ }
1075
+ }
1076
+ rforEach(t, e = this) {
1077
+ for (let s of this.#D()) {
1078
+ let i = this.#i[s], r = this.#l(i) ? i.__staleWhileFetching : i;
1079
+ r !== void 0 && t.call(e, r, this.#a[s], this);
1080
+ }
1081
+ }
1082
+ purgeStale() {
1083
+ let t = false;
1084
+ for (let e of this.#D({ allowStale: true })) this.#v(e) && (this.#O(this.#a[e], "expire"), t = true);
1085
+ return t;
1086
+ }
1087
+ info(t) {
1088
+ let e = this.#f.get(t);
1089
+ if (e === void 0) return;
1090
+ let s = this.#i[e], i = this.#l(s) ? s.__staleWhileFetching : s;
1091
+ if (i === void 0) return;
1092
+ let r = { value: i };
1093
+ if (this.#g && this.#T) {
1094
+ let o = this.#g[e], h = this.#T[e];
1095
+ if (o && h) {
1096
+ let a = o - (this.#c.now() - h);
1097
+ r.ttl = a, r.start = Date.now();
1098
+ }
1099
+ }
1100
+ return this.#C && (r.size = this.#C[e]), r;
1101
+ }
1102
+ dump() {
1103
+ let t = [];
1104
+ for (let e of this.#F({ allowStale: true })) {
1105
+ let s = this.#a[e], i = this.#i[e], r = this.#l(i) ? i.__staleWhileFetching : i;
1106
+ if (r === void 0 || s === void 0) continue;
1107
+ let o = { value: r };
1108
+ if (this.#g && this.#T) {
1109
+ o.ttl = this.#g[e];
1110
+ let h = this.#c.now() - this.#T[e];
1111
+ o.start = Math.floor(Date.now() - h);
1112
+ }
1113
+ this.#C && (o.size = this.#C[e]), t.unshift([s, o]);
1114
+ }
1115
+ return t;
1116
+ }
1117
+ load(t) {
1118
+ this.clear();
1119
+ for (let [e, s] of t) {
1120
+ if (s.start) {
1121
+ let i = Date.now() - s.start;
1122
+ s.start = this.#c.now() - i;
1123
+ }
1124
+ this.set(e, s.value, s);
1125
+ }
1126
+ }
1127
+ set(t, e, s = {}) {
1128
+ if (e === void 0) return this.delete(t), this;
1129
+ let { ttl: i = this.ttl, start: r, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a } = s, { noUpdateTTL: l = this.noUpdateTTL } = s, u = this.#I(t, e, s.size || 0, h);
1130
+ if (this.maxEntrySize && u > this.maxEntrySize) return a && (a.set = "miss", a.maxEntrySizeExceeded = true), this.#O(t, "set"), this;
1131
+ let c = this.#h === 0 ? void 0 : this.#f.get(t);
1132
+ if (c === void 0) c = this.#h === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#h === this.#t ? this.#B(false) : this.#h, this.#a[c] = t, this.#i[c] = e, this.#f.set(t, c), this.#d[this.#p] = c, this.#E[c] = this.#p, this.#p = c, this.#h++, this.#L(c, u, a), a && (a.set = "add"), l = false, this.#_ && this.#r?.(e, t, "add");
1133
+ else {
1134
+ this.#W(c);
1135
+ let d = this.#i[c];
1136
+ if (e !== d) {
1137
+ if (this.#A && this.#l(d)) {
1138
+ d.__abortController.abort(new Error("replaced"));
1139
+ let { __staleWhileFetching: f } = d;
1140
+ f !== void 0 && !o && (this.#x && this.#n?.(f, t, "set"), this.#e && this.#m?.push([f, t, "set"]));
1141
+ } else o || (this.#x && this.#n?.(d, t, "set"), this.#e && this.#m?.push([d, t, "set"]));
1142
+ if (this.#P(c), this.#L(c, u, a), this.#i[c] = e, a) {
1143
+ a.set = "replace";
1144
+ let f = d && this.#l(d) ? d.__staleWhileFetching : d;
1145
+ f !== void 0 && (a.oldValue = f);
1146
+ }
1147
+ } else a && (a.set = "update");
1148
+ this.#_ && this.onInsert?.(e, t, e === d ? "update" : "replace");
1149
+ }
1150
+ if (i !== 0 && !this.#g && this.#M(), this.#g && (l || this.#j(c, i, r), a && this.#N(a, c)), !o && this.#e && this.#m) {
1151
+ let d = this.#m, f;
1152
+ for (; f = d?.shift(); ) this.#o?.(...f);
1153
+ }
1154
+ return this;
1155
+ }
1156
+ pop() {
1157
+ try {
1158
+ for (; this.#h; ) {
1159
+ let t = this.#i[this.#b];
1160
+ if (this.#B(true), this.#l(t)) {
1161
+ if (t.__staleWhileFetching) return t.__staleWhileFetching;
1162
+ } else if (t !== void 0) return t;
1163
+ }
1164
+ } finally {
1165
+ if (this.#e && this.#m) {
1166
+ let t = this.#m, e;
1167
+ for (; e = t?.shift(); ) this.#o?.(...e);
1168
+ }
1169
+ }
1170
+ }
1171
+ #B(t) {
1172
+ let e = this.#b, s = this.#a[e], i = this.#i[e];
1173
+ return this.#A && this.#l(i) ? i.__abortController.abort(new Error("evicted")) : (this.#x || this.#e) && (this.#x && this.#n?.(i, s, "evict"), this.#e && this.#m?.push([i, s, "evict"])), this.#P(e), this.#y?.[e] && (clearTimeout(this.#y[e]), this.#y[e] = void 0), t && (this.#a[e] = void 0, this.#i[e] = void 0, this.#R.push(e)), this.#h === 1 ? (this.#b = this.#p = 0, this.#R.length = 0) : this.#b = this.#d[e], this.#f.delete(s), this.#h--, e;
1174
+ }
1175
+ has(t, e = {}) {
1176
+ let { updateAgeOnHas: s = this.updateAgeOnHas, status: i } = e, r = this.#f.get(t);
1177
+ if (r !== void 0) {
1178
+ let o = this.#i[r];
1179
+ if (this.#l(o) && o.__staleWhileFetching === void 0) return false;
1180
+ if (this.#v(r)) i && (i.has = "stale", this.#N(i, r));
1181
+ else return s && this.#k(r), i && (i.has = "hit", this.#N(i, r)), true;
1182
+ } else i && (i.has = "miss");
1183
+ return false;
1184
+ }
1185
+ peek(t, e = {}) {
1186
+ let { allowStale: s = this.allowStale } = e, i = this.#f.get(t);
1187
+ if (i === void 0 || !s && this.#v(i)) return;
1188
+ let r = this.#i[i];
1189
+ return this.#l(r) ? r.__staleWhileFetching : r;
1190
+ }
1191
+ #U(t, e, s, i) {
1192
+ let r = e === void 0 ? void 0 : this.#i[e];
1193
+ if (this.#l(r)) return r;
1194
+ let o = new At(), { signal: h } = s;
1195
+ h?.addEventListener("abort", () => o.abort(h.reason), { signal: o.signal });
1196
+ let a = { signal: o.signal, options: s, context: i }, l = (p, w = false) => {
1197
+ let { aborted: g } = o.signal, S = s.ignoreFetchAbort && p !== void 0, E = s.ignoreFetchAbort || !!(s.allowStaleOnFetchAbort && p !== void 0);
1198
+ if (s.status && (g && !w ? (s.status.fetchAborted = true, s.status.fetchError = o.signal.reason, S && (s.status.fetchAbortIgnored = true)) : s.status.fetchResolved = true), g && !S && !w) return c(o.signal.reason, E);
1199
+ let y = f, b = this.#i[e];
1200
+ return (b === f || S && w && b === void 0) && (p === void 0 ? y.__staleWhileFetching !== void 0 ? this.#i[e] = y.__staleWhileFetching : this.#O(t, "fetch") : (s.status && (s.status.fetchUpdated = true), this.set(t, p, a.options))), p;
1201
+ }, u = (p) => (s.status && (s.status.fetchRejected = true, s.status.fetchError = p), c(p, false)), c = (p, w) => {
1202
+ let { aborted: g } = o.signal, S = g && s.allowStaleOnFetchAbort, E = S || s.allowStaleOnFetchRejection, y = E || s.noDeleteOnFetchRejection, b = f;
1203
+ if (this.#i[e] === f && (!y || !w && b.__staleWhileFetching === void 0 ? this.#O(t, "fetch") : S || (this.#i[e] = b.__staleWhileFetching)), E) return s.status && b.__staleWhileFetching !== void 0 && (s.status.returnedStale = true), b.__staleWhileFetching;
1204
+ if (b.__returned === b) throw p;
1205
+ }, d = (p, w) => {
1206
+ let g = this.#S?.(t, r, a);
1207
+ g && g instanceof Promise && g.then((S) => p(S === void 0 ? void 0 : S), w), o.signal.addEventListener("abort", () => {
1208
+ (!s.ignoreFetchAbort || s.allowStaleOnFetchAbort) && (p(void 0), s.allowStaleOnFetchAbort && (p = (S) => l(S, true)));
1209
+ });
1210
+ };
1211
+ s.status && (s.status.fetchDispatched = true);
1212
+ let f = new Promise(d).then(l, u), m = Object.assign(f, { __abortController: o, __staleWhileFetching: r, __returned: void 0 });
1213
+ return e === void 0 ? (this.set(t, m, { ...a.options, status: void 0 }), e = this.#f.get(t)) : this.#i[e] = m, m;
1214
+ }
1215
+ #l(t) {
1216
+ if (!this.#A) return false;
1217
+ let e = t;
1218
+ return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof At;
1219
+ }
1220
+ async fetch(t, e = {}) {
1221
+ let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: u = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: m = this.allowStaleOnFetchAbort, context: p, forceRefresh: w = false, status: g, signal: S } = e;
1222
+ if (!this.#A) return g && (g.fetch = "get"), this.get(t, { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, status: g });
1223
+ let E = { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: h, size: a, sizeCalculation: l, noUpdateTTL: u, noDeleteOnFetchRejection: c, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: m, ignoreFetchAbort: f, status: g, signal: S }, y = this.#f.get(t);
1224
+ if (y === void 0) {
1225
+ g && (g.fetch = "miss");
1226
+ let b = this.#U(t, y, E, p);
1227
+ return b.__returned = b;
1228
+ } else {
1229
+ let b = this.#i[y];
1230
+ if (this.#l(b)) {
1231
+ let Z = s && b.__staleWhileFetching !== void 0;
1232
+ return g && (g.fetch = "inflight", Z && (g.returnedStale = true)), Z ? b.__staleWhileFetching : b.__returned = b;
1233
+ }
1234
+ let z = this.#v(y);
1235
+ if (!w && !z) return g && (g.fetch = "hit"), this.#W(y), i && this.#k(y), g && this.#N(g, y), b;
1236
+ let $ = this.#U(t, y, E, p), J = $.__staleWhileFetching !== void 0 && s;
1237
+ return g && (g.fetch = z ? "stale" : "refresh", J && z && (g.returnedStale = true)), J ? $.__staleWhileFetching : $.__returned = $;
1238
+ }
1239
+ }
1240
+ async forceFetch(t, e = {}) {
1241
+ let s = await this.fetch(t, e);
1242
+ if (s === void 0) throw new Error("fetch() returned undefined");
1243
+ return s;
1244
+ }
1245
+ memo(t, e = {}) {
1246
+ let s = this.#w;
1247
+ if (!s) throw new Error("no memoMethod provided to constructor");
1248
+ let { context: i, forceRefresh: r, ...o } = e, h = this.get(t, o);
1249
+ if (!r && h !== void 0) return h;
1250
+ let a = s(t, h, { options: o, context: i });
1251
+ return this.set(t, a, o), a;
1252
+ }
1253
+ get(t, e = {}) {
1254
+ let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, status: o } = e, h = this.#f.get(t);
1255
+ if (h !== void 0) {
1256
+ let a = this.#i[h], l = this.#l(a);
1257
+ return o && this.#N(o, h), this.#v(h) ? (o && (o.get = "stale"), l ? (o && s && a.__staleWhileFetching !== void 0 && (o.returnedStale = true), s ? a.__staleWhileFetching : void 0) : (r || this.#O(t, "expire"), o && s && (o.returnedStale = true), s ? a : void 0)) : (o && (o.get = "hit"), l ? a.__staleWhileFetching : (this.#W(h), i && this.#k(h), a));
1258
+ } else o && (o.get = "miss");
1259
+ }
1260
+ #$(t, e) {
1261
+ this.#E[e] = t, this.#d[t] = e;
1262
+ }
1263
+ #W(t) {
1264
+ t !== this.#p && (t === this.#b ? this.#b = this.#d[t] : this.#$(this.#E[t], this.#d[t]), this.#$(this.#p, t), this.#p = t);
1265
+ }
1266
+ delete(t) {
1267
+ return this.#O(t, "delete");
1268
+ }
1269
+ #O(t, e) {
1270
+ let s = false;
1271
+ if (this.#h !== 0) {
1272
+ let i = this.#f.get(t);
1273
+ if (i !== void 0) if (this.#y?.[i] && (clearTimeout(this.#y?.[i]), this.#y[i] = void 0), s = true, this.#h === 1) this.#H(e);
1274
+ else {
1275
+ this.#P(i);
1276
+ let r = this.#i[i];
1277
+ if (this.#l(r) ? r.__abortController.abort(new Error("deleted")) : (this.#x || this.#e) && (this.#x && this.#n?.(r, t, e), this.#e && this.#m?.push([r, t, e])), this.#f.delete(t), this.#a[i] = void 0, this.#i[i] = void 0, i === this.#p) this.#p = this.#E[i];
1278
+ else if (i === this.#b) this.#b = this.#d[i];
1279
+ else {
1280
+ let o = this.#E[i];
1281
+ this.#d[o] = this.#d[i];
1282
+ let h = this.#d[i];
1283
+ this.#E[h] = this.#E[i];
1284
+ }
1285
+ this.#h--, this.#R.push(i);
1286
+ }
1287
+ }
1288
+ if (this.#e && this.#m?.length) {
1289
+ let i = this.#m, r;
1290
+ for (; r = i?.shift(); ) this.#o?.(...r);
1291
+ }
1292
+ return s;
1293
+ }
1294
+ clear() {
1295
+ return this.#H("delete");
1296
+ }
1297
+ #H(t) {
1298
+ for (let e of this.#D({ allowStale: true })) {
1299
+ let s = this.#i[e];
1300
+ if (this.#l(s)) s.__abortController.abort(new Error("deleted"));
1301
+ else {
1302
+ let i = this.#a[e];
1303
+ this.#x && this.#n?.(s, i, t), this.#e && this.#m?.push([s, i, t]);
1304
+ }
1305
+ }
1306
+ if (this.#f.clear(), this.#i.fill(void 0), this.#a.fill(void 0), this.#g && this.#T) {
1307
+ this.#g.fill(0), this.#T.fill(0);
1308
+ for (let e of this.#y ?? []) e !== void 0 && clearTimeout(e);
1309
+ this.#y?.fill(void 0);
1310
+ }
1311
+ if (this.#C && this.#C.fill(0), this.#b = 0, this.#p = 0, this.#R.length = 0, this.#u = 0, this.#h = 0, this.#e && this.#m) {
1312
+ let e = this.#m, s;
1313
+ for (; s = e?.shift(); ) this.#o?.(...s);
1314
+ }
1315
+ }
1316
+ };
1317
+ var Ne = typeof process == "object" && process ? process : { stdout: null, stderr: null };
1318
+ var oi = (n7) => !!n7 && typeof n7 == "object" && (n7 instanceof V || n7 instanceof Pe || hi(n7) || ai(n7));
1319
+ var hi = (n7) => !!n7 && typeof n7 == "object" && n7 instanceof ee && typeof n7.pipe == "function" && n7.pipe !== Pe.Writable.prototype.pipe;
1320
+ var ai = (n7) => !!n7 && typeof n7 == "object" && n7 instanceof ee && typeof n7.write == "function" && typeof n7.end == "function";
1321
+ var G = /* @__PURE__ */ Symbol("EOF");
1322
+ var H = /* @__PURE__ */ Symbol("maybeEmitEnd");
1323
+ var K = /* @__PURE__ */ Symbol("emittedEnd");
1324
+ var kt = /* @__PURE__ */ Symbol("emittingEnd");
1325
+ var ut = /* @__PURE__ */ Symbol("emittedError");
1326
+ var Rt = /* @__PURE__ */ Symbol("closed");
1327
+ var _e = /* @__PURE__ */ Symbol("read");
1328
+ var Ot = /* @__PURE__ */ Symbol("flush");
1329
+ var Le = /* @__PURE__ */ Symbol("flushChunk");
1330
+ var P = /* @__PURE__ */ Symbol("encoding");
1331
+ var et = /* @__PURE__ */ Symbol("decoder");
1332
+ var v = /* @__PURE__ */ Symbol("flowing");
1333
+ var dt = /* @__PURE__ */ Symbol("paused");
1334
+ var st = /* @__PURE__ */ Symbol("resume");
1335
+ var C = /* @__PURE__ */ Symbol("buffer");
1336
+ var F = /* @__PURE__ */ Symbol("pipes");
1337
+ var T = /* @__PURE__ */ Symbol("bufferLength");
1338
+ var Yt = /* @__PURE__ */ Symbol("bufferPush");
1339
+ var Ft = /* @__PURE__ */ Symbol("bufferShift");
1340
+ var k = /* @__PURE__ */ Symbol("objectMode");
1341
+ var x = /* @__PURE__ */ Symbol("destroyed");
1342
+ var Xt = /* @__PURE__ */ Symbol("error");
1343
+ var Jt = /* @__PURE__ */ Symbol("emitData");
1344
+ var We = /* @__PURE__ */ Symbol("emitEnd");
1345
+ var Zt = /* @__PURE__ */ Symbol("emitEnd2");
1346
+ var B = /* @__PURE__ */ Symbol("async");
1347
+ var Qt = /* @__PURE__ */ Symbol("abort");
1348
+ var Dt = /* @__PURE__ */ Symbol("aborted");
1349
+ var pt = /* @__PURE__ */ Symbol("signal");
1350
+ var Y = /* @__PURE__ */ Symbol("dataListeners");
1351
+ var M = /* @__PURE__ */ Symbol("discarded");
1352
+ var mt = (n7) => Promise.resolve().then(n7);
1353
+ var li = (n7) => n7();
1354
+ var ci = (n7) => n7 === "end" || n7 === "finish" || n7 === "prefinish";
1355
+ var fi = (n7) => n7 instanceof ArrayBuffer || !!n7 && typeof n7 == "object" && n7.constructor && n7.constructor.name === "ArrayBuffer" && n7.byteLength >= 0;
1356
+ var ui = (n7) => !Buffer.isBuffer(n7) && ArrayBuffer.isView(n7);
1357
+ var Mt = class {
1358
+ src;
1359
+ dest;
1360
+ opts;
1361
+ ondrain;
1362
+ constructor(t, e, s) {
1363
+ this.src = t, this.dest = e, this.opts = s, this.ondrain = () => t[st](), this.dest.on("drain", this.ondrain);
1364
+ }
1365
+ unpipe() {
1366
+ this.dest.removeListener("drain", this.ondrain);
1367
+ }
1368
+ proxyErrors(t) {
1369
+ }
1370
+ end() {
1371
+ this.unpipe(), this.opts.end && this.dest.end();
1372
+ }
1373
+ };
1374
+ var te = class extends Mt {
1375
+ unpipe() {
1376
+ this.src.removeListener("error", this.proxyErrors), super.unpipe();
1377
+ }
1378
+ constructor(t, e, s) {
1379
+ super(t, e, s), this.proxyErrors = (i) => this.dest.emit("error", i), t.on("error", this.proxyErrors);
1380
+ }
1381
+ };
1382
+ var di = (n7) => !!n7.objectMode;
1383
+ var pi = (n7) => !n7.objectMode && !!n7.encoding && n7.encoding !== "buffer";
1384
+ var V = class extends ee {
1385
+ [v] = false;
1386
+ [dt] = false;
1387
+ [F] = [];
1388
+ [C] = [];
1389
+ [k];
1390
+ [P];
1391
+ [B];
1392
+ [et];
1393
+ [G] = false;
1394
+ [K] = false;
1395
+ [kt] = false;
1396
+ [Rt] = false;
1397
+ [ut] = null;
1398
+ [T] = 0;
1399
+ [x] = false;
1400
+ [pt];
1401
+ [Dt] = false;
1402
+ [Y] = 0;
1403
+ [M] = false;
1404
+ writable = true;
1405
+ readable = true;
1406
+ constructor(...t) {
1407
+ let e = t[0] || {};
1408
+ if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
1409
+ di(e) ? (this[k] = true, this[P] = null) : pi(e) ? (this[P] = e.encoding, this[k] = false) : (this[k] = false, this[P] = null), this[B] = !!e.async, this[et] = this[P] ? new ni(this[P]) : null, e && e.debugExposeBuffer === true && Object.defineProperty(this, "buffer", { get: () => this[C] }), e && e.debugExposePipes === true && Object.defineProperty(this, "pipes", { get: () => this[F] });
1410
+ let { signal: s } = e;
1411
+ s && (this[pt] = s, s.aborted ? this[Qt]() : s.addEventListener("abort", () => this[Qt]()));
1412
+ }
1413
+ get bufferLength() {
1414
+ return this[T];
1415
+ }
1416
+ get encoding() {
1417
+ return this[P];
1418
+ }
1419
+ set encoding(t) {
1420
+ throw new Error("Encoding must be set at instantiation time");
1421
+ }
1422
+ setEncoding(t) {
1423
+ throw new Error("Encoding must be set at instantiation time");
1424
+ }
1425
+ get objectMode() {
1426
+ return this[k];
1427
+ }
1428
+ set objectMode(t) {
1429
+ throw new Error("objectMode must be set at instantiation time");
1430
+ }
1431
+ get async() {
1432
+ return this[B];
1433
+ }
1434
+ set async(t) {
1435
+ this[B] = this[B] || !!t;
1436
+ }
1437
+ [Qt]() {
1438
+ this[Dt] = true, this.emit("abort", this[pt]?.reason), this.destroy(this[pt]?.reason);
1439
+ }
1440
+ get aborted() {
1441
+ return this[Dt];
1442
+ }
1443
+ set aborted(t) {
1444
+ }
1445
+ write(t, e, s) {
1446
+ if (this[Dt]) return false;
1447
+ if (this[G]) throw new Error("write after end");
1448
+ if (this[x]) return this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), true;
1449
+ typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
1450
+ let i = this[B] ? mt : li;
1451
+ if (!this[k] && !Buffer.isBuffer(t)) {
1452
+ if (ui(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
1453
+ else if (fi(t)) t = Buffer.from(t);
1454
+ else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
1455
+ }
1456
+ return this[k] ? (this[v] && this[T] !== 0 && this[Ot](true), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : t.length ? (typeof t == "string" && !(e === this[P] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P] && (t = this[et].write(t)), this[v] && this[T] !== 0 && this[Ot](true), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : (this[T] !== 0 && this.emit("readable"), s && i(s), this[v]);
1457
+ }
1458
+ read(t) {
1459
+ if (this[x]) return null;
1460
+ if (this[M] = false, this[T] === 0 || t === 0 || t && t > this[T]) return this[H](), null;
1461
+ this[k] && (t = null), this[C].length > 1 && !this[k] && (this[C] = [this[P] ? this[C].join("") : Buffer.concat(this[C], this[T])]);
1462
+ let e = this[_e](t || null, this[C][0]);
1463
+ return this[H](), e;
1464
+ }
1465
+ [_e](t, e) {
1466
+ if (this[k]) this[Ft]();
1467
+ else {
1468
+ let s = e;
1469
+ t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C][0] = s.slice(t), e = s.slice(0, t), this[T] -= t) : (this[C][0] = s.subarray(t), e = s.subarray(0, t), this[T] -= t);
1470
+ }
1471
+ return this.emit("data", e), !this[C].length && !this[G] && this.emit("drain"), e;
1472
+ }
1473
+ end(t, e, s) {
1474
+ return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[G] = true, this.writable = false, (this[v] || !this[dt]) && this[H](), this;
1475
+ }
1476
+ [st]() {
1477
+ this[x] || (!this[Y] && !this[F].length && (this[M] = true), this[dt] = false, this[v] = true, this.emit("resume"), this[C].length ? this[Ot]() : this[G] ? this[H]() : this.emit("drain"));
1478
+ }
1479
+ resume() {
1480
+ return this[st]();
1481
+ }
1482
+ pause() {
1483
+ this[v] = false, this[dt] = true, this[M] = false;
1484
+ }
1485
+ get destroyed() {
1486
+ return this[x];
1487
+ }
1488
+ get flowing() {
1489
+ return this[v];
1490
+ }
1491
+ get paused() {
1492
+ return this[dt];
1493
+ }
1494
+ [Yt](t) {
1495
+ this[k] ? this[T] += 1 : this[T] += t.length, this[C].push(t);
1496
+ }
1497
+ [Ft]() {
1498
+ return this[k] ? this[T] -= 1 : this[T] -= this[C][0].length, this[C].shift();
1499
+ }
1500
+ [Ot](t = false) {
1501
+ do
1502
+ ;
1503
+ while (this[Le](this[Ft]()) && this[C].length);
1504
+ !t && !this[C].length && !this[G] && this.emit("drain");
1505
+ }
1506
+ [Le](t) {
1507
+ return this.emit("data", t), this[v];
1508
+ }
1509
+ pipe(t, e) {
1510
+ if (this[x]) return t;
1511
+ this[M] = false;
1512
+ let s = this[K];
1513
+ return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = false : e.end = e.end !== false, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F].push(e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e)), this[B] ? mt(() => this[st]()) : this[st]()), t;
1514
+ }
1515
+ unpipe(t) {
1516
+ let e = this[F].find((s) => s.dest === t);
1517
+ e && (this[F].length === 1 ? (this[v] && this[Y] === 0 && (this[v] = false), this[F] = []) : this[F].splice(this[F].indexOf(e), 1), e.unpipe());
1518
+ }
1519
+ addListener(t, e) {
1520
+ return this.on(t, e);
1521
+ }
1522
+ on(t, e) {
1523
+ let s = super.on(t, e);
1524
+ if (t === "data") this[M] = false, this[Y]++, !this[F].length && !this[v] && this[st]();
1525
+ else if (t === "readable" && this[T] !== 0) super.emit("readable");
1526
+ else if (ci(t) && this[K]) super.emit(t), this.removeAllListeners(t);
1527
+ else if (t === "error" && this[ut]) {
1528
+ let i = e;
1529
+ this[B] ? mt(() => i.call(this, this[ut])) : i.call(this, this[ut]);
1530
+ }
1531
+ return s;
1532
+ }
1533
+ removeListener(t, e) {
1534
+ return this.off(t, e);
1535
+ }
1536
+ off(t, e) {
1537
+ let s = super.off(t, e);
1538
+ return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M] && !this[F].length && (this[v] = false)), s;
1539
+ }
1540
+ removeAllListeners(t) {
1541
+ let e = super.removeAllListeners(t);
1542
+ return (t === "data" || t === void 0) && (this[Y] = 0, !this[M] && !this[F].length && (this[v] = false)), e;
1543
+ }
1544
+ get emittedEnd() {
1545
+ return this[K];
1546
+ }
1547
+ [H]() {
1548
+ !this[kt] && !this[K] && !this[x] && this[C].length === 0 && this[G] && (this[kt] = true, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt] && this.emit("close"), this[kt] = false);
1549
+ }
1550
+ emit(t, ...e) {
1551
+ let s = e[0];
1552
+ if (t !== "error" && t !== "close" && t !== x && this[x]) return false;
1553
+ if (t === "data") return !this[k] && !s ? false : this[B] ? (mt(() => this[Jt](s)), true) : this[Jt](s);
1554
+ if (t === "end") return this[We]();
1555
+ if (t === "close") {
1556
+ if (this[Rt] = true, !this[K] && !this[x]) return false;
1557
+ let r = super.emit("close");
1558
+ return this.removeAllListeners("close"), r;
1559
+ } else if (t === "error") {
1560
+ this[ut] = s, super.emit(Xt, s);
1561
+ let r = !this[pt] || this.listeners("error").length ? super.emit("error", s) : false;
1562
+ return this[H](), r;
1563
+ } else if (t === "resume") {
1564
+ let r = super.emit("resume");
1565
+ return this[H](), r;
1566
+ } else if (t === "finish" || t === "prefinish") {
1567
+ let r = super.emit(t);
1568
+ return this.removeAllListeners(t), r;
1569
+ }
1570
+ let i = super.emit(t, ...e);
1571
+ return this[H](), i;
1572
+ }
1573
+ [Jt](t) {
1574
+ for (let s of this[F]) s.dest.write(t) === false && this.pause();
1575
+ let e = this[M] ? false : super.emit("data", t);
1576
+ return this[H](), e;
1577
+ }
1578
+ [We]() {
1579
+ return this[K] ? false : (this[K] = true, this.readable = false, this[B] ? (mt(() => this[Zt]()), true) : this[Zt]());
1580
+ }
1581
+ [Zt]() {
1582
+ if (this[et]) {
1583
+ let e = this[et].end();
1584
+ if (e) {
1585
+ for (let s of this[F]) s.dest.write(e);
1586
+ this[M] || super.emit("data", e);
1587
+ }
1588
+ }
1589
+ for (let e of this[F]) e.end();
1590
+ let t = super.emit("end");
1591
+ return this.removeAllListeners("end"), t;
1592
+ }
1593
+ async collect() {
1594
+ let t = Object.assign([], { dataLength: 0 });
1595
+ this[k] || (t.dataLength = 0);
1596
+ let e = this.promise();
1597
+ return this.on("data", (s) => {
1598
+ t.push(s), this[k] || (t.dataLength += s.length);
1599
+ }), await e, t;
1600
+ }
1601
+ async concat() {
1602
+ if (this[k]) throw new Error("cannot concat in objectMode");
1603
+ let t = await this.collect();
1604
+ return this[P] ? t.join("") : Buffer.concat(t, t.dataLength);
1605
+ }
1606
+ async promise() {
1607
+ return new Promise((t, e) => {
1608
+ this.on(x, () => e(new Error("stream destroyed"))), this.on("error", (s) => e(s)), this.on("end", () => t());
1609
+ });
1610
+ }
1611
+ [Symbol.asyncIterator]() {
1612
+ this[M] = false;
1613
+ let t = false, e = async () => (this.pause(), t = true, { value: void 0, done: true });
1614
+ return { next: () => {
1615
+ if (t) return e();
1616
+ let i = this.read();
1617
+ if (i !== null) return Promise.resolve({ done: false, value: i });
1618
+ if (this[G]) return e();
1619
+ let r, o, h = (c) => {
1620
+ this.off("data", a), this.off("end", l), this.off(x, u), e(), o(c);
1621
+ }, a = (c) => {
1622
+ this.off("error", h), this.off("end", l), this.off(x, u), this.pause(), r({ value: c, done: !!this[G] });
1623
+ }, l = () => {
1624
+ this.off("error", h), this.off("data", a), this.off(x, u), e(), r({ done: true, value: void 0 });
1625
+ }, u = () => h(new Error("stream destroyed"));
1626
+ return new Promise((c, d) => {
1627
+ o = d, r = c, this.once(x, u), this.once("error", h), this.once("end", l), this.once("data", a);
1628
+ });
1629
+ }, throw: e, return: e, [Symbol.asyncIterator]() {
1630
+ return this;
1631
+ }, [Symbol.asyncDispose]: async () => {
1632
+ } };
1633
+ }
1634
+ [Symbol.iterator]() {
1635
+ this[M] = false;
1636
+ let t = false, e = () => (this.pause(), this.off(Xt, e), this.off(x, e), this.off("end", e), t = true, { done: true, value: void 0 }), s = () => {
1637
+ if (t) return e();
1638
+ let i = this.read();
1639
+ return i === null ? e() : { done: false, value: i };
1640
+ };
1641
+ return this.once("end", e), this.once(Xt, e), this.once(x, e), { next: s, throw: e, return: e, [Symbol.iterator]() {
1642
+ return this;
1643
+ }, [Symbol.dispose]: () => {
1644
+ } };
1645
+ }
1646
+ destroy(t) {
1647
+ if (this[x]) return t ? this.emit("error", t) : this.emit(x), this;
1648
+ this[x] = true, this[M] = true, this[C].length = 0, this[T] = 0;
1649
+ let e = this;
1650
+ return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x), this;
1651
+ }
1652
+ static get isStream() {
1653
+ return oi;
1654
+ }
1655
+ };
1656
+ var vi = Ei.native;
1657
+ var wt = { lstatSync: wi, readdir: yi, readdirSync: bi, readlinkSync: Si, realpathSync: vi, promises: { lstat: Ci, readdir: Ti, readlink: Ai, realpath: ki } };
1658
+ var Ue = (n7) => !n7 || n7 === wt || n7 === xi ? wt : { ...wt, ...n7, promises: { ...wt.promises, ...n7.promises || {} } };
1659
+ var $e = /^\\\\\?\\([a-z]:)\\?$/i;
1660
+ var Ri = (n7) => n7.replace(/\//g, "\\").replace($e, "$1\\");
1661
+ var Oi = /[\\\/]/;
1662
+ var L = 0;
1663
+ var Ge = 1;
1664
+ var He = 2;
1665
+ var U = 4;
1666
+ var qe = 6;
1667
+ var Ke = 8;
1668
+ var X = 10;
1669
+ var Ve = 12;
1670
+ var _ = 15;
1671
+ var gt = ~_;
1672
+ var se = 16;
1673
+ var je = 32;
1674
+ var yt = 64;
1675
+ var j = 128;
1676
+ var Nt = 256;
1677
+ var Lt = 512;
1678
+ var Ie = yt | j | Lt;
1679
+ var Fi = 1023;
1680
+ var ie = (n7) => n7.isFile() ? Ke : n7.isDirectory() ? U : n7.isSymbolicLink() ? X : n7.isCharacterDevice() ? He : n7.isBlockDevice() ? qe : n7.isSocket() ? Ve : n7.isFIFO() ? Ge : L;
1681
+ var ze = new ft({ max: 2 ** 12 });
1682
+ var bt = (n7) => {
1683
+ let t = ze.get(n7);
1684
+ if (t) return t;
1685
+ let e = n7.normalize("NFKD");
1686
+ return ze.set(n7, e), e;
1687
+ };
1688
+ var Be = new ft({ max: 2 ** 12 });
1689
+ var _t = (n7) => {
1690
+ let t = Be.get(n7);
1691
+ if (t) return t;
1692
+ let e = bt(n7.toLowerCase());
1693
+ return Be.set(n7, e), e;
1694
+ };
1695
+ var Wt = class extends ft {
1696
+ constructor() {
1697
+ super({ max: 256 });
1698
+ }
1699
+ };
1700
+ var ne = class extends ft {
1701
+ constructor(t = 16 * 1024) {
1702
+ super({ maxSize: t, sizeCalculation: (e) => e.length + 1 });
1703
+ }
1704
+ };
1705
+ var Ye = /* @__PURE__ */ Symbol("PathScurry setAsCwd");
1706
+ var R = class {
1707
+ name;
1708
+ root;
1709
+ roots;
1710
+ parent;
1711
+ nocase;
1712
+ isCWD = false;
1713
+ #t;
1714
+ #s;
1715
+ get dev() {
1716
+ return this.#s;
1717
+ }
1718
+ #n;
1719
+ get mode() {
1720
+ return this.#n;
1721
+ }
1722
+ #r;
1723
+ get nlink() {
1724
+ return this.#r;
1725
+ }
1726
+ #o;
1727
+ get uid() {
1728
+ return this.#o;
1729
+ }
1730
+ #S;
1731
+ get gid() {
1732
+ return this.#S;
1733
+ }
1734
+ #w;
1735
+ get rdev() {
1736
+ return this.#w;
1737
+ }
1738
+ #c;
1739
+ get blksize() {
1740
+ return this.#c;
1741
+ }
1742
+ #h;
1743
+ get ino() {
1744
+ return this.#h;
1745
+ }
1746
+ #u;
1747
+ get size() {
1748
+ return this.#u;
1749
+ }
1750
+ #f;
1751
+ get blocks() {
1752
+ return this.#f;
1753
+ }
1754
+ #a;
1755
+ get atimeMs() {
1756
+ return this.#a;
1757
+ }
1758
+ #i;
1759
+ get mtimeMs() {
1760
+ return this.#i;
1761
+ }
1762
+ #d;
1763
+ get ctimeMs() {
1764
+ return this.#d;
1765
+ }
1766
+ #E;
1767
+ get birthtimeMs() {
1768
+ return this.#E;
1769
+ }
1770
+ #b;
1771
+ get atime() {
1772
+ return this.#b;
1773
+ }
1774
+ #p;
1775
+ get mtime() {
1776
+ return this.#p;
1777
+ }
1778
+ #R;
1779
+ get ctime() {
1780
+ return this.#R;
1781
+ }
1782
+ #m;
1783
+ get birthtime() {
1784
+ return this.#m;
1785
+ }
1786
+ #C;
1787
+ #T;
1788
+ #g;
1789
+ #y;
1790
+ #x;
1791
+ #A;
1792
+ #e;
1793
+ #_;
1794
+ #M;
1795
+ #k;
1796
+ get parentPath() {
1797
+ return (this.parent || this).fullpath();
1798
+ }
1799
+ get path() {
1800
+ return this.parentPath;
1801
+ }
1802
+ constructor(t, e = L, s, i, r, o, h) {
1803
+ this.name = t, this.#C = r ? _t(t) : bt(t), this.#e = e & Fi, this.nocase = r, this.roots = i, this.root = s || this, this.#_ = o, this.#g = h.fullpath, this.#x = h.relative, this.#A = h.relativePosix, this.parent = h.parent, this.parent ? this.#t = this.parent.#t : this.#t = Ue(h.fs);
1804
+ }
1805
+ depth() {
1806
+ return this.#T !== void 0 ? this.#T : this.parent ? this.#T = this.parent.depth() + 1 : this.#T = 0;
1807
+ }
1808
+ childrenCache() {
1809
+ return this.#_;
1810
+ }
1811
+ resolve(t) {
1812
+ if (!t) return this;
1813
+ let e = this.getRootString(t), i = t.substring(e.length).split(this.splitSep);
1814
+ return e ? this.getRoot(e).#N(i) : this.#N(i);
1815
+ }
1816
+ #N(t) {
1817
+ let e = this;
1818
+ for (let s of t) e = e.child(s);
1819
+ return e;
1820
+ }
1821
+ children() {
1822
+ let t = this.#_.get(this);
1823
+ if (t) return t;
1824
+ let e = Object.assign([], { provisional: 0 });
1825
+ return this.#_.set(this, e), this.#e &= ~se, e;
1826
+ }
1827
+ child(t, e) {
1828
+ if (t === "" || t === ".") return this;
1829
+ if (t === "..") return this.parent || this;
1830
+ let s = this.children(), i = this.nocase ? _t(t) : bt(t);
1831
+ for (let a of s) if (a.#C === i) return a;
1832
+ let r = this.parent ? this.sep : "", o = this.#g ? this.#g + r + t : void 0, h = this.newChild(t, L, { ...e, parent: this, fullpath: o });
1833
+ return this.canReaddir() || (h.#e |= j), s.push(h), h;
1834
+ }
1835
+ relative() {
1836
+ if (this.isCWD) return "";
1837
+ if (this.#x !== void 0) return this.#x;
1838
+ let t = this.name, e = this.parent;
1839
+ if (!e) return this.#x = this.name;
1840
+ let s = e.relative();
1841
+ return s + (!s || !e.parent ? "" : this.sep) + t;
1842
+ }
1843
+ relativePosix() {
1844
+ if (this.sep === "/") return this.relative();
1845
+ if (this.isCWD) return "";
1846
+ if (this.#A !== void 0) return this.#A;
1847
+ let t = this.name, e = this.parent;
1848
+ if (!e) return this.#A = this.fullpathPosix();
1849
+ let s = e.relativePosix();
1850
+ return s + (!s || !e.parent ? "" : "/") + t;
1851
+ }
1852
+ fullpath() {
1853
+ if (this.#g !== void 0) return this.#g;
1854
+ let t = this.name, e = this.parent;
1855
+ if (!e) return this.#g = this.name;
1856
+ let i = e.fullpath() + (e.parent ? this.sep : "") + t;
1857
+ return this.#g = i;
1858
+ }
1859
+ fullpathPosix() {
1860
+ if (this.#y !== void 0) return this.#y;
1861
+ if (this.sep === "/") return this.#y = this.fullpath();
1862
+ if (!this.parent) {
1863
+ let i = this.fullpath().replace(/\\/g, "/");
1864
+ return /^[a-z]:\//i.test(i) ? this.#y = `//?/${i}` : this.#y = i;
1865
+ }
1866
+ let t = this.parent, e = t.fullpathPosix(), s = e + (!e || !t.parent ? "" : "/") + this.name;
1867
+ return this.#y = s;
1868
+ }
1869
+ isUnknown() {
1870
+ return (this.#e & _) === L;
1871
+ }
1872
+ isType(t) {
1873
+ return this[`is${t}`]();
1874
+ }
1875
+ getType() {
1876
+ return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
1877
+ }
1878
+ isFile() {
1879
+ return (this.#e & _) === Ke;
1880
+ }
1881
+ isDirectory() {
1882
+ return (this.#e & _) === U;
1883
+ }
1884
+ isCharacterDevice() {
1885
+ return (this.#e & _) === He;
1886
+ }
1887
+ isBlockDevice() {
1888
+ return (this.#e & _) === qe;
1889
+ }
1890
+ isFIFO() {
1891
+ return (this.#e & _) === Ge;
1892
+ }
1893
+ isSocket() {
1894
+ return (this.#e & _) === Ve;
1895
+ }
1896
+ isSymbolicLink() {
1897
+ return (this.#e & X) === X;
1898
+ }
1899
+ lstatCached() {
1900
+ return this.#e & je ? this : void 0;
1901
+ }
1902
+ readlinkCached() {
1903
+ return this.#M;
1904
+ }
1905
+ realpathCached() {
1906
+ return this.#k;
1907
+ }
1908
+ readdirCached() {
1909
+ let t = this.children();
1910
+ return t.slice(0, t.provisional);
1911
+ }
1912
+ canReadlink() {
1913
+ if (this.#M) return true;
1914
+ if (!this.parent) return false;
1915
+ let t = this.#e & _;
1916
+ return !(t !== L && t !== X || this.#e & Nt || this.#e & j);
1917
+ }
1918
+ calledReaddir() {
1919
+ return !!(this.#e & se);
1920
+ }
1921
+ isENOENT() {
1922
+ return !!(this.#e & j);
1923
+ }
1924
+ isNamed(t) {
1925
+ return this.nocase ? this.#C === _t(t) : this.#C === bt(t);
1926
+ }
1927
+ async readlink() {
1928
+ let t = this.#M;
1929
+ if (t) return t;
1930
+ if (this.canReadlink() && this.parent) try {
1931
+ let e = await this.#t.promises.readlink(this.fullpath()), s = (await this.parent.realpath())?.resolve(e);
1932
+ if (s) return this.#M = s;
1933
+ } catch (e) {
1934
+ this.#D(e.code);
1935
+ return;
1936
+ }
1937
+ }
1938
+ readlinkSync() {
1939
+ let t = this.#M;
1940
+ if (t) return t;
1941
+ if (this.canReadlink() && this.parent) try {
1942
+ let e = this.#t.readlinkSync(this.fullpath()), s = this.parent.realpathSync()?.resolve(e);
1943
+ if (s) return this.#M = s;
1944
+ } catch (e) {
1945
+ this.#D(e.code);
1946
+ return;
1947
+ }
1948
+ }
1949
+ #j(t) {
1950
+ this.#e |= se;
1951
+ for (let e = t.provisional; e < t.length; e++) {
1952
+ let s = t[e];
1953
+ s && s.#v();
1954
+ }
1955
+ }
1956
+ #v() {
1957
+ this.#e & j || (this.#e = (this.#e | j) & gt, this.#G());
1958
+ }
1959
+ #G() {
1960
+ let t = this.children();
1961
+ t.provisional = 0;
1962
+ for (let e of t) e.#v();
1963
+ }
1964
+ #P() {
1965
+ this.#e |= Lt, this.#L();
1966
+ }
1967
+ #L() {
1968
+ if (this.#e & yt) return;
1969
+ let t = this.#e;
1970
+ (t & _) === U && (t &= gt), this.#e = t | yt, this.#G();
1971
+ }
1972
+ #I(t = "") {
1973
+ t === "ENOTDIR" || t === "EPERM" ? this.#L() : t === "ENOENT" ? this.#v() : this.children().provisional = 0;
1974
+ }
1975
+ #F(t = "") {
1976
+ t === "ENOTDIR" ? this.parent.#L() : t === "ENOENT" && this.#v();
1977
+ }
1978
+ #D(t = "") {
1979
+ let e = this.#e;
1980
+ e |= Nt, t === "ENOENT" && (e |= j), (t === "EINVAL" || t === "UNKNOWN") && (e &= gt), this.#e = e, t === "ENOTDIR" && this.parent && this.parent.#L();
1981
+ }
1982
+ #z(t, e) {
1983
+ return this.#U(t, e) || this.#B(t, e);
1984
+ }
1985
+ #B(t, e) {
1986
+ let s = ie(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & _;
1987
+ return r !== U && r !== X && r !== L && (i.#e |= yt), e.unshift(i), e.provisional++, i;
1988
+ }
1989
+ #U(t, e) {
1990
+ for (let s = e.provisional; s < e.length; s++) {
1991
+ let i = e[s];
1992
+ if ((this.nocase ? _t(t.name) : bt(t.name)) === i.#C) return this.#l(t, i, s, e);
1993
+ }
1994
+ }
1995
+ #l(t, e, s, i) {
1996
+ let r = e.name;
1997
+ return e.#e = e.#e & gt | ie(t), r !== t.name && (e.name = t.name), s !== i.provisional && (s === i.length - 1 ? i.pop() : i.splice(s, 1), i.unshift(e)), i.provisional++, e;
1998
+ }
1999
+ async lstat() {
2000
+ if ((this.#e & j) === 0) try {
2001
+ return this.#$(await this.#t.promises.lstat(this.fullpath())), this;
2002
+ } catch (t) {
2003
+ this.#F(t.code);
2004
+ }
2005
+ }
2006
+ lstatSync() {
2007
+ if ((this.#e & j) === 0) try {
2008
+ return this.#$(this.#t.lstatSync(this.fullpath())), this;
2009
+ } catch (t) {
2010
+ this.#F(t.code);
2011
+ }
2012
+ }
2013
+ #$(t) {
2014
+ let { atime: e, atimeMs: s, birthtime: i, birthtimeMs: r, blksize: o, blocks: h, ctime: a, ctimeMs: l, dev: u, gid: c, ino: d, mode: f, mtime: m, mtimeMs: p, nlink: w, rdev: g, size: S, uid: E } = t;
2015
+ this.#b = e, this.#a = s, this.#m = i, this.#E = r, this.#c = o, this.#f = h, this.#R = a, this.#d = l, this.#s = u, this.#S = c, this.#h = d, this.#n = f, this.#p = m, this.#i = p, this.#r = w, this.#w = g, this.#u = S, this.#o = E;
2016
+ let y = ie(t);
2017
+ this.#e = this.#e & gt | y | je, y !== L && y !== U && y !== X && (this.#e |= yt);
2018
+ }
2019
+ #W = [];
2020
+ #O = false;
2021
+ #H(t) {
2022
+ this.#O = false;
2023
+ let e = this.#W.slice();
2024
+ this.#W.length = 0, e.forEach((s) => s(null, t));
2025
+ }
2026
+ readdirCB(t, e = false) {
2027
+ if (!this.canReaddir()) {
2028
+ e ? t(null, []) : queueMicrotask(() => t(null, []));
2029
+ return;
2030
+ }
2031
+ let s = this.children();
2032
+ if (this.calledReaddir()) {
2033
+ let r = s.slice(0, s.provisional);
2034
+ e ? t(null, r) : queueMicrotask(() => t(null, r));
2035
+ return;
2036
+ }
2037
+ if (this.#W.push(t), this.#O) return;
2038
+ this.#O = true;
2039
+ let i = this.fullpath();
2040
+ this.#t.readdir(i, { withFileTypes: true }, (r, o) => {
2041
+ if (r) this.#I(r.code), s.provisional = 0;
2042
+ else {
2043
+ for (let h of o) this.#z(h, s);
2044
+ this.#j(s);
2045
+ }
2046
+ this.#H(s.slice(0, s.provisional));
2047
+ });
2048
+ }
2049
+ #q;
2050
+ async readdir() {
2051
+ if (!this.canReaddir()) return [];
2052
+ let t = this.children();
2053
+ if (this.calledReaddir()) return t.slice(0, t.provisional);
2054
+ let e = this.fullpath();
2055
+ if (this.#q) await this.#q;
2056
+ else {
2057
+ let s = () => {
2058
+ };
2059
+ this.#q = new Promise((i) => s = i);
2060
+ try {
2061
+ for (let i of await this.#t.promises.readdir(e, { withFileTypes: true })) this.#z(i, t);
2062
+ this.#j(t);
2063
+ } catch (i) {
2064
+ this.#I(i.code), t.provisional = 0;
2065
+ }
2066
+ this.#q = void 0, s();
2067
+ }
2068
+ return t.slice(0, t.provisional);
2069
+ }
2070
+ readdirSync() {
2071
+ if (!this.canReaddir()) return [];
2072
+ let t = this.children();
2073
+ if (this.calledReaddir()) return t.slice(0, t.provisional);
2074
+ let e = this.fullpath();
2075
+ try {
2076
+ for (let s of this.#t.readdirSync(e, { withFileTypes: true })) this.#z(s, t);
2077
+ this.#j(t);
2078
+ } catch (s) {
2079
+ this.#I(s.code), t.provisional = 0;
2080
+ }
2081
+ return t.slice(0, t.provisional);
2082
+ }
2083
+ canReaddir() {
2084
+ if (this.#e & Ie) return false;
2085
+ let t = _ & this.#e;
2086
+ return t === L || t === U || t === X;
2087
+ }
2088
+ shouldWalk(t, e) {
2089
+ return (this.#e & U) === U && !(this.#e & Ie) && !t.has(this) && (!e || e(this));
2090
+ }
2091
+ async realpath() {
2092
+ if (this.#k) return this.#k;
2093
+ if (!((Lt | Nt | j) & this.#e)) try {
2094
+ let t = await this.#t.promises.realpath(this.fullpath());
2095
+ return this.#k = this.resolve(t);
2096
+ } catch {
2097
+ this.#P();
2098
+ }
2099
+ }
2100
+ realpathSync() {
2101
+ if (this.#k) return this.#k;
2102
+ if (!((Lt | Nt | j) & this.#e)) try {
2103
+ let t = this.#t.realpathSync(this.fullpath());
2104
+ return this.#k = this.resolve(t);
2105
+ } catch {
2106
+ this.#P();
2107
+ }
2108
+ }
2109
+ [Ye](t) {
2110
+ if (t === this) return;
2111
+ t.isCWD = false, this.isCWD = true;
2112
+ let e = /* @__PURE__ */ new Set([]), s = [], i = this;
2113
+ for (; i && i.parent; ) e.add(i), i.#x = s.join(this.sep), i.#A = s.join("/"), i = i.parent, s.push("..");
2114
+ for (i = t; i && i.parent && !e.has(i); ) i.#x = void 0, i.#A = void 0, i = i.parent;
2115
+ }
2116
+ };
2117
+ var Pt = class n2 extends R {
2118
+ sep = "\\";
2119
+ splitSep = Oi;
2120
+ constructor(t, e = L, s, i, r, o, h) {
2121
+ super(t, e, s, i, r, o, h);
2122
+ }
2123
+ newChild(t, e = L, s = {}) {
2124
+ return new n2(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
2125
+ }
2126
+ getRootString(t) {
2127
+ return re.parse(t).root;
2128
+ }
2129
+ getRoot(t) {
2130
+ if (t = Ri(t.toUpperCase()), t === this.root.name) return this.root;
2131
+ for (let [e, s] of Object.entries(this.roots)) if (this.sameRoot(t, e)) return this.roots[t] = s;
2132
+ return this.roots[t] = new it(t, this).root;
2133
+ }
2134
+ sameRoot(t, e = this.root.name) {
2135
+ return t = t.toUpperCase().replace(/\//g, "\\").replace($e, "$1\\"), t === e;
2136
+ }
2137
+ };
2138
+ var jt = class n3 extends R {
2139
+ splitSep = "/";
2140
+ sep = "/";
2141
+ constructor(t, e = L, s, i, r, o, h) {
2142
+ super(t, e, s, i, r, o, h);
2143
+ }
2144
+ getRootString(t) {
2145
+ return t.startsWith("/") ? "/" : "";
2146
+ }
2147
+ getRoot(t) {
2148
+ return this.root;
2149
+ }
2150
+ newChild(t, e = L, s = {}) {
2151
+ return new n3(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
2152
+ }
2153
+ };
2154
+ var It = class {
2155
+ root;
2156
+ rootPath;
2157
+ roots;
2158
+ cwd;
2159
+ #t;
2160
+ #s;
2161
+ #n;
2162
+ nocase;
2163
+ #r;
2164
+ constructor(t = process.cwd(), e, s, { nocase: i, childrenCacheSize: r = 16 * 1024, fs: o = wt } = {}) {
2165
+ this.#r = Ue(o), (t instanceof URL || t.startsWith("file://")) && (t = gi(t));
2166
+ let h = e.resolve(t);
2167
+ this.roots = /* @__PURE__ */ Object.create(null), this.rootPath = this.parseRootPath(h), this.#t = new Wt(), this.#s = new Wt(), this.#n = new ne(r);
2168
+ let a = h.substring(this.rootPath.length).split(s);
2169
+ if (a.length === 1 && !a[0] && a.pop(), i === void 0) throw new TypeError("must provide nocase setting to PathScurryBase ctor");
2170
+ this.nocase = i, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root;
2171
+ let l = this.root, u = a.length - 1, c = e.sep, d = this.rootPath, f = false;
2172
+ for (let m of a) {
2173
+ let p = u--;
2174
+ l = l.child(m, { relative: new Array(p).fill("..").join(c), relativePosix: new Array(p).fill("..").join("/"), fullpath: d += (f ? "" : c) + m }), f = true;
2175
+ }
2176
+ this.cwd = l;
2177
+ }
2178
+ depth(t = this.cwd) {
2179
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.depth();
2180
+ }
2181
+ childrenCache() {
2182
+ return this.#n;
2183
+ }
2184
+ resolve(...t) {
2185
+ let e = "";
2186
+ for (let r = t.length - 1; r >= 0; r--) {
2187
+ let o = t[r];
2188
+ if (!(!o || o === ".") && (e = e ? `${o}/${e}` : o, this.isAbsolute(o))) break;
2189
+ }
2190
+ let s = this.#t.get(e);
2191
+ if (s !== void 0) return s;
2192
+ let i = this.cwd.resolve(e).fullpath();
2193
+ return this.#t.set(e, i), i;
2194
+ }
2195
+ resolvePosix(...t) {
2196
+ let e = "";
2197
+ for (let r = t.length - 1; r >= 0; r--) {
2198
+ let o = t[r];
2199
+ if (!(!o || o === ".") && (e = e ? `${o}/${e}` : o, this.isAbsolute(o))) break;
2200
+ }
2201
+ let s = this.#s.get(e);
2202
+ if (s !== void 0) return s;
2203
+ let i = this.cwd.resolve(e).fullpathPosix();
2204
+ return this.#s.set(e, i), i;
2205
+ }
2206
+ relative(t = this.cwd) {
2207
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.relative();
2208
+ }
2209
+ relativePosix(t = this.cwd) {
2210
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.relativePosix();
2211
+ }
2212
+ basename(t = this.cwd) {
2213
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.name;
2214
+ }
2215
+ dirname(t = this.cwd) {
2216
+ return typeof t == "string" && (t = this.cwd.resolve(t)), (t.parent || t).fullpath();
2217
+ }
2218
+ async readdir(t = this.cwd, e = { withFileTypes: true }) {
2219
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2220
+ let { withFileTypes: s } = e;
2221
+ if (t.canReaddir()) {
2222
+ let i = await t.readdir();
2223
+ return s ? i : i.map((r) => r.name);
2224
+ } else return [];
2225
+ }
2226
+ readdirSync(t = this.cwd, e = { withFileTypes: true }) {
2227
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2228
+ let { withFileTypes: s = true } = e;
2229
+ return t.canReaddir() ? s ? t.readdirSync() : t.readdirSync().map((i) => i.name) : [];
2230
+ }
2231
+ async lstat(t = this.cwd) {
2232
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstat();
2233
+ }
2234
+ lstatSync(t = this.cwd) {
2235
+ return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstatSync();
2236
+ }
2237
+ async readlink(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2238
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2239
+ let s = await t.readlink();
2240
+ return e ? s : s?.fullpath();
2241
+ }
2242
+ readlinkSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2243
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2244
+ let s = t.readlinkSync();
2245
+ return e ? s : s?.fullpath();
2246
+ }
2247
+ async realpath(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2248
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2249
+ let s = await t.realpath();
2250
+ return e ? s : s?.fullpath();
2251
+ }
2252
+ realpathSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: false }) {
2253
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
2254
+ let s = t.realpathSync();
2255
+ return e ? s : s?.fullpath();
2256
+ }
2257
+ async walk(t = this.cwd, e = {}) {
2258
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2259
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = [];
2260
+ (!r || r(t)) && h.push(s ? t : t.fullpath());
2261
+ let a = /* @__PURE__ */ new Set(), l = (c, d) => {
2262
+ a.add(c), c.readdirCB((f, m) => {
2263
+ if (f) return d(f);
2264
+ let p = m.length;
2265
+ if (!p) return d();
2266
+ let w = () => {
2267
+ --p === 0 && d();
2268
+ };
2269
+ for (let g of m) (!r || r(g)) && h.push(s ? g : g.fullpath()), i && g.isSymbolicLink() ? g.realpath().then((S) => S?.isUnknown() ? S.lstat() : S).then((S) => S?.shouldWalk(a, o) ? l(S, w) : w()) : g.shouldWalk(a, o) ? l(g, w) : w();
2270
+ }, true);
2271
+ }, u = t;
2272
+ return new Promise((c, d) => {
2273
+ l(u, (f) => {
2274
+ if (f) return d(f);
2275
+ c(h);
2276
+ });
2277
+ });
2278
+ }
2279
+ walkSync(t = this.cwd, e = {}) {
2280
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2281
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = [];
2282
+ (!r || r(t)) && h.push(s ? t : t.fullpath());
2283
+ let a = /* @__PURE__ */ new Set([t]);
2284
+ for (let l of a) {
2285
+ let u = l.readdirSync();
2286
+ for (let c of u) {
2287
+ (!r || r(c)) && h.push(s ? c : c.fullpath());
2288
+ let d = c;
2289
+ if (c.isSymbolicLink()) {
2290
+ if (!(i && (d = c.realpathSync()))) continue;
2291
+ d.isUnknown() && d.lstatSync();
2292
+ }
2293
+ d.shouldWalk(a, o) && a.add(d);
2294
+ }
2295
+ }
2296
+ return h;
2297
+ }
2298
+ [Symbol.asyncIterator]() {
2299
+ return this.iterate();
2300
+ }
2301
+ iterate(t = this.cwd, e = {}) {
2302
+ return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd), this.stream(t, e)[Symbol.asyncIterator]();
2303
+ }
2304
+ [Symbol.iterator]() {
2305
+ return this.iterateSync();
2306
+ }
2307
+ *iterateSync(t = this.cwd, e = {}) {
2308
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2309
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e;
2310
+ (!r || r(t)) && (yield s ? t : t.fullpath());
2311
+ let h = /* @__PURE__ */ new Set([t]);
2312
+ for (let a of h) {
2313
+ let l = a.readdirSync();
2314
+ for (let u of l) {
2315
+ (!r || r(u)) && (yield s ? u : u.fullpath());
2316
+ let c = u;
2317
+ if (u.isSymbolicLink()) {
2318
+ if (!(i && (c = u.realpathSync()))) continue;
2319
+ c.isUnknown() && c.lstatSync();
2320
+ }
2321
+ c.shouldWalk(h, o) && h.add(c);
2322
+ }
2323
+ }
2324
+ }
2325
+ stream(t = this.cwd, e = {}) {
2326
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2327
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true });
2328
+ (!r || r(t)) && h.write(s ? t : t.fullpath());
2329
+ let a = /* @__PURE__ */ new Set(), l = [t], u = 0, c = () => {
2330
+ let d = false;
2331
+ for (; !d; ) {
2332
+ let f = l.shift();
2333
+ if (!f) {
2334
+ u === 0 && h.end();
2335
+ return;
2336
+ }
2337
+ u++, a.add(f);
2338
+ let m = (w, g, S = false) => {
2339
+ if (w) return h.emit("error", w);
2340
+ if (i && !S) {
2341
+ let E = [];
2342
+ for (let y of g) y.isSymbolicLink() && E.push(y.realpath().then((b) => b?.isUnknown() ? b.lstat() : b));
2343
+ if (E.length) {
2344
+ Promise.all(E).then(() => m(null, g, true));
2345
+ return;
2346
+ }
2347
+ }
2348
+ for (let E of g) E && (!r || r(E)) && (h.write(s ? E : E.fullpath()) || (d = true));
2349
+ u--;
2350
+ for (let E of g) {
2351
+ let y = E.realpathCached() || E;
2352
+ y.shouldWalk(a, o) && l.push(y);
2353
+ }
2354
+ d && !h.flowing ? h.once("drain", c) : p || c();
2355
+ }, p = true;
2356
+ f.readdirCB(m, true), p = false;
2357
+ }
2358
+ };
2359
+ return c(), h;
2360
+ }
2361
+ streamSync(t = this.cwd, e = {}) {
2362
+ typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
2363
+ let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true }), a = /* @__PURE__ */ new Set();
2364
+ (!r || r(t)) && h.write(s ? t : t.fullpath());
2365
+ let l = [t], u = 0, c = () => {
2366
+ let d = false;
2367
+ for (; !d; ) {
2368
+ let f = l.shift();
2369
+ if (!f) {
2370
+ u === 0 && h.end();
2371
+ return;
2372
+ }
2373
+ u++, a.add(f);
2374
+ let m = f.readdirSync();
2375
+ for (let p of m) (!r || r(p)) && (h.write(s ? p : p.fullpath()) || (d = true));
2376
+ u--;
2377
+ for (let p of m) {
2378
+ let w = p;
2379
+ if (p.isSymbolicLink()) {
2380
+ if (!(i && (w = p.realpathSync()))) continue;
2381
+ w.isUnknown() && w.lstatSync();
2382
+ }
2383
+ w.shouldWalk(a, o) && l.push(w);
2384
+ }
2385
+ }
2386
+ d && !h.flowing && h.once("drain", c);
2387
+ };
2388
+ return c(), h;
2389
+ }
2390
+ chdir(t = this.cwd) {
2391
+ let e = this.cwd;
2392
+ this.cwd = typeof t == "string" ? this.cwd.resolve(t) : t, this.cwd[Ye](e);
2393
+ }
2394
+ };
2395
+ var it = class extends It {
2396
+ sep = "\\";
2397
+ constructor(t = process.cwd(), e = {}) {
2398
+ let { nocase: s = true } = e;
2399
+ super(t, re, "\\", { ...e, nocase: s }), this.nocase = s;
2400
+ for (let i = this.cwd; i; i = i.parent) i.nocase = this.nocase;
2401
+ }
2402
+ parseRootPath(t) {
2403
+ return re.parse(t).root.toUpperCase();
2404
+ }
2405
+ newRoot(t) {
2406
+ return new Pt(this.rootPath, U, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
2407
+ }
2408
+ isAbsolute(t) {
2409
+ return t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t);
2410
+ }
2411
+ };
2412
+ var rt = class extends It {
2413
+ sep = "/";
2414
+ constructor(t = process.cwd(), e = {}) {
2415
+ let { nocase: s = false } = e;
2416
+ super(t, mi, "/", { ...e, nocase: s }), this.nocase = s;
2417
+ }
2418
+ parseRootPath(t) {
2419
+ return "/";
2420
+ }
2421
+ newRoot(t) {
2422
+ return new jt(this.rootPath, U, void 0, this.roots, this.nocase, this.childrenCache(), { fs: t });
2423
+ }
2424
+ isAbsolute(t) {
2425
+ return t.startsWith("/");
2426
+ }
2427
+ };
2428
+ var St = class extends rt {
2429
+ constructor(t = process.cwd(), e = {}) {
2430
+ let { nocase: s = true } = e;
2431
+ super(t, { ...e, nocase: s });
2432
+ }
2433
+ };
2434
+ var Cr = process.platform === "win32" ? Pt : jt;
2435
+ var Xe = process.platform === "win32" ? it : process.platform === "darwin" ? St : rt;
2436
+ var Di = (n7) => n7.length >= 1;
2437
+ var Mi = (n7) => n7.length >= 1;
2438
+ var Ni = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
2439
+ var nt = class n4 {
2440
+ #t;
2441
+ #s;
2442
+ #n;
2443
+ length;
2444
+ #r;
2445
+ #o;
2446
+ #S;
2447
+ #w;
2448
+ #c;
2449
+ #h;
2450
+ #u = true;
2451
+ constructor(t, e, s, i) {
2452
+ if (!Di(t)) throw new TypeError("empty pattern list");
2453
+ if (!Mi(e)) throw new TypeError("empty glob list");
2454
+ if (e.length !== t.length) throw new TypeError("mismatched pattern list and glob list lengths");
2455
+ if (this.length = t.length, s < 0 || s >= this.length) throw new TypeError("index out of range");
2456
+ if (this.#t = t, this.#s = e, this.#n = s, this.#r = i, this.#n === 0) {
2457
+ if (this.isUNC()) {
2458
+ let [r, o, h, a, ...l] = this.#t, [u, c, d, f, ...m] = this.#s;
2459
+ l[0] === "" && (l.shift(), m.shift());
2460
+ let p = [r, o, h, a, ""].join("/"), w = [u, c, d, f, ""].join("/");
2461
+ this.#t = [p, ...l], this.#s = [w, ...m], this.length = this.#t.length;
2462
+ } else if (this.isDrive() || this.isAbsolute()) {
2463
+ let [r, ...o] = this.#t, [h, ...a] = this.#s;
2464
+ o[0] === "" && (o.shift(), a.shift());
2465
+ let l = r + "/", u = h + "/";
2466
+ this.#t = [l, ...o], this.#s = [u, ...a], this.length = this.#t.length;
2467
+ }
2468
+ }
2469
+ }
2470
+ [Ni]() {
2471
+ return "Pattern <" + this.#s.slice(this.#n).join("/") + ">";
2472
+ }
2473
+ pattern() {
2474
+ return this.#t[this.#n];
2475
+ }
2476
+ isString() {
2477
+ return typeof this.#t[this.#n] == "string";
2478
+ }
2479
+ isGlobstar() {
2480
+ return this.#t[this.#n] === A;
2481
+ }
2482
+ isRegExp() {
2483
+ return this.#t[this.#n] instanceof RegExp;
2484
+ }
2485
+ globString() {
2486
+ return this.#S = this.#S || (this.#n === 0 ? this.isAbsolute() ? this.#s[0] + this.#s.slice(1).join("/") : this.#s.join("/") : this.#s.slice(this.#n).join("/"));
2487
+ }
2488
+ hasMore() {
2489
+ return this.length > this.#n + 1;
2490
+ }
2491
+ rest() {
2492
+ return this.#o !== void 0 ? this.#o : this.hasMore() ? (this.#o = new n4(this.#t, this.#s, this.#n + 1, this.#r), this.#o.#h = this.#h, this.#o.#c = this.#c, this.#o.#w = this.#w, this.#o) : this.#o = null;
2493
+ }
2494
+ isUNC() {
2495
+ let t = this.#t;
2496
+ return this.#c !== void 0 ? this.#c : this.#c = this.#r === "win32" && this.#n === 0 && t[0] === "" && t[1] === "" && typeof t[2] == "string" && !!t[2] && typeof t[3] == "string" && !!t[3];
2497
+ }
2498
+ isDrive() {
2499
+ let t = this.#t;
2500
+ return this.#w !== void 0 ? this.#w : this.#w = this.#r === "win32" && this.#n === 0 && this.length > 1 && typeof t[0] == "string" && /^[a-z]:$/i.test(t[0]);
2501
+ }
2502
+ isAbsolute() {
2503
+ let t = this.#t;
2504
+ return this.#h !== void 0 ? this.#h : this.#h = t[0] === "" && t.length > 1 || this.isDrive() || this.isUNC();
2505
+ }
2506
+ root() {
2507
+ let t = this.#t[0];
2508
+ return typeof t == "string" && this.isAbsolute() && this.#n === 0 ? t : "";
2509
+ }
2510
+ checkFollowGlobstar() {
2511
+ return !(this.#n === 0 || !this.isGlobstar() || !this.#u);
2512
+ }
2513
+ markFollowGlobstar() {
2514
+ return this.#n === 0 || !this.isGlobstar() || !this.#u ? false : (this.#u = false, true);
2515
+ }
2516
+ };
2517
+ var _i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
2518
+ var ot = class {
2519
+ relative;
2520
+ relativeChildren;
2521
+ absolute;
2522
+ absoluteChildren;
2523
+ platform;
2524
+ mmopts;
2525
+ constructor(t, { nobrace: e, nocase: s, noext: i, noglobstar: r, platform: o = _i }) {
2526
+ this.relative = [], this.absolute = [], this.relativeChildren = [], this.absoluteChildren = [], this.platform = o, this.mmopts = { dot: true, nobrace: e, nocase: s, noext: i, noglobstar: r, optimizationLevel: 2, platform: o, nocomment: true, nonegate: true };
2527
+ for (let h of t) this.add(h);
2528
+ }
2529
+ add(t) {
2530
+ let e = new D(t, this.mmopts);
2531
+ for (let s = 0; s < e.set.length; s++) {
2532
+ let i = e.set[s], r = e.globParts[s];
2533
+ if (!i || !r) throw new Error("invalid pattern object");
2534
+ for (; i[0] === "." && r[0] === "."; ) i.shift(), r.shift();
2535
+ let o = new nt(i, r, 0, this.platform), h = new D(o.globString(), this.mmopts), a = r[r.length - 1] === "**", l = o.isAbsolute();
2536
+ l ? this.absolute.push(h) : this.relative.push(h), a && (l ? this.absoluteChildren.push(h) : this.relativeChildren.push(h));
2537
+ }
2538
+ }
2539
+ ignored(t) {
2540
+ let e = t.fullpath(), s = `${e}/`, i = t.relative() || ".", r = `${i}/`;
2541
+ for (let o of this.relative) if (o.match(i) || o.match(r)) return true;
2542
+ for (let o of this.absolute) if (o.match(e) || o.match(s)) return true;
2543
+ return false;
2544
+ }
2545
+ childrenIgnored(t) {
2546
+ let e = t.fullpath() + "/", s = (t.relative() || ".") + "/";
2547
+ for (let i of this.relativeChildren) if (i.match(s)) return true;
2548
+ for (let i of this.absoluteChildren) if (i.match(e)) return true;
2549
+ return false;
2550
+ }
2551
+ };
2552
+ var oe = class n5 {
2553
+ store;
2554
+ constructor(t = /* @__PURE__ */ new Map()) {
2555
+ this.store = t;
2556
+ }
2557
+ copy() {
2558
+ return new n5(new Map(this.store));
2559
+ }
2560
+ hasWalked(t, e) {
2561
+ return this.store.get(t.fullpath())?.has(e.globString());
2562
+ }
2563
+ storeWalked(t, e) {
2564
+ let s = t.fullpath(), i = this.store.get(s);
2565
+ i ? i.add(e.globString()) : this.store.set(s, /* @__PURE__ */ new Set([e.globString()]));
2566
+ }
2567
+ };
2568
+ var he = class {
2569
+ store = /* @__PURE__ */ new Map();
2570
+ add(t, e, s) {
2571
+ let i = (e ? 2 : 0) | (s ? 1 : 0), r = this.store.get(t);
2572
+ this.store.set(t, r === void 0 ? i : i & r);
2573
+ }
2574
+ entries() {
2575
+ return [...this.store.entries()].map(([t, e]) => [t, !!(e & 2), !!(e & 1)]);
2576
+ }
2577
+ };
2578
+ var ae = class {
2579
+ store = /* @__PURE__ */ new Map();
2580
+ add(t, e) {
2581
+ if (!t.canReaddir()) return;
2582
+ let s = this.store.get(t);
2583
+ s ? s.find((i) => i.globString() === e.globString()) || s.push(e) : this.store.set(t, [e]);
2584
+ }
2585
+ get(t) {
2586
+ let e = this.store.get(t);
2587
+ if (!e) throw new Error("attempting to walk unknown path");
2588
+ return e;
2589
+ }
2590
+ entries() {
2591
+ return this.keys().map((t) => [t, this.store.get(t)]);
2592
+ }
2593
+ keys() {
2594
+ return [...this.store.keys()].filter((t) => t.canReaddir());
2595
+ }
2596
+ };
2597
+ var Et = class n6 {
2598
+ hasWalkedCache;
2599
+ matches = new he();
2600
+ subwalks = new ae();
2601
+ patterns;
2602
+ follow;
2603
+ dot;
2604
+ opts;
2605
+ constructor(t, e) {
2606
+ this.opts = t, this.follow = !!t.follow, this.dot = !!t.dot, this.hasWalkedCache = e ? e.copy() : new oe();
2607
+ }
2608
+ processPatterns(t, e) {
2609
+ this.patterns = e;
2610
+ let s = e.map((i) => [t, i]);
2611
+ for (let [i, r] of s) {
2612
+ this.hasWalkedCache.storeWalked(i, r);
2613
+ let o = r.root(), h = r.isAbsolute() && this.opts.absolute !== false;
2614
+ if (o) {
2615
+ i = i.resolve(o === "/" && this.opts.root !== void 0 ? this.opts.root : o);
2616
+ let c = r.rest();
2617
+ if (c) r = c;
2618
+ else {
2619
+ this.matches.add(i, true, false);
2620
+ continue;
2621
+ }
2622
+ }
2623
+ if (i.isENOENT()) continue;
2624
+ let a, l, u = false;
2625
+ for (; typeof (a = r.pattern()) == "string" && (l = r.rest()); ) i = i.resolve(a), r = l, u = true;
2626
+ if (a = r.pattern(), l = r.rest(), u) {
2627
+ if (this.hasWalkedCache.hasWalked(i, r)) continue;
2628
+ this.hasWalkedCache.storeWalked(i, r);
2629
+ }
2630
+ if (typeof a == "string") {
2631
+ let c = a === ".." || a === "" || a === ".";
2632
+ this.matches.add(i.resolve(a), h, c);
2633
+ continue;
2634
+ } else if (a === A) {
2635
+ (!i.isSymbolicLink() || this.follow || r.checkFollowGlobstar()) && this.subwalks.add(i, r);
2636
+ let c = l?.pattern(), d = l?.rest();
2637
+ if (!l || (c === "" || c === ".") && !d) this.matches.add(i, h, c === "" || c === ".");
2638
+ else if (c === "..") {
2639
+ let f = i.parent || i;
2640
+ d ? this.hasWalkedCache.hasWalked(f, d) || this.subwalks.add(f, d) : this.matches.add(f, h, true);
2641
+ }
2642
+ } else a instanceof RegExp && this.subwalks.add(i, r);
2643
+ }
2644
+ return this;
2645
+ }
2646
+ subwalkTargets() {
2647
+ return this.subwalks.keys();
2648
+ }
2649
+ child() {
2650
+ return new n6(this.opts, this.hasWalkedCache);
2651
+ }
2652
+ filterEntries(t, e) {
2653
+ let s = this.subwalks.get(t), i = this.child();
2654
+ for (let r of e) for (let o of s) {
2655
+ let h = o.isAbsolute(), a = o.pattern(), l = o.rest();
2656
+ a === A ? i.testGlobstar(r, o, l, h) : a instanceof RegExp ? i.testRegExp(r, a, l, h) : i.testString(r, a, l, h);
2657
+ }
2658
+ return i;
2659
+ }
2660
+ testGlobstar(t, e, s, i) {
2661
+ if ((this.dot || !t.name.startsWith(".")) && (e.hasMore() || this.matches.add(t, i, false), t.canReaddir() && (this.follow || !t.isSymbolicLink() ? this.subwalks.add(t, e) : t.isSymbolicLink() && (s && e.checkFollowGlobstar() ? this.subwalks.add(t, s) : e.markFollowGlobstar() && this.subwalks.add(t, e)))), s) {
2662
+ let r = s.pattern();
2663
+ if (typeof r == "string" && r !== ".." && r !== "" && r !== ".") this.testString(t, r, s.rest(), i);
2664
+ else if (r === "..") {
2665
+ let o = t.parent || t;
2666
+ this.subwalks.add(o, s);
2667
+ } else r instanceof RegExp && this.testRegExp(t, r, s.rest(), i);
2668
+ }
2669
+ }
2670
+ testRegExp(t, e, s, i) {
2671
+ e.test(t.name) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, false));
2672
+ }
2673
+ testString(t, e, s, i) {
2674
+ t.isNamed(e) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, false));
2675
+ }
2676
+ };
2677
+ var Li = (n7, t) => typeof n7 == "string" ? new ot([n7], t) : Array.isArray(n7) ? new ot(n7, t) : n7;
2678
+ var zt = class {
2679
+ path;
2680
+ patterns;
2681
+ opts;
2682
+ seen = /* @__PURE__ */ new Set();
2683
+ paused = false;
2684
+ aborted = false;
2685
+ #t = [];
2686
+ #s;
2687
+ #n;
2688
+ signal;
2689
+ maxDepth;
2690
+ includeChildMatches;
2691
+ constructor(t, e, s) {
2692
+ if (this.patterns = t, this.path = e, this.opts = s, this.#n = !s.posix && s.platform === "win32" ? "\\" : "/", this.includeChildMatches = s.includeChildMatches !== false, (s.ignore || !this.includeChildMatches) && (this.#s = Li(s.ignore ?? [], s), !this.includeChildMatches && typeof this.#s.add != "function")) {
2693
+ let i = "cannot ignore child matches, ignore lacks add() method.";
2694
+ throw new Error(i);
2695
+ }
2696
+ this.maxDepth = s.maxDepth || 1 / 0, s.signal && (this.signal = s.signal, this.signal.addEventListener("abort", () => {
2697
+ this.#t.length = 0;
2698
+ }));
2699
+ }
2700
+ #r(t) {
2701
+ return this.seen.has(t) || !!this.#s?.ignored?.(t);
2702
+ }
2703
+ #o(t) {
2704
+ return !!this.#s?.childrenIgnored?.(t);
2705
+ }
2706
+ pause() {
2707
+ this.paused = true;
2708
+ }
2709
+ resume() {
2710
+ if (this.signal?.aborted) return;
2711
+ this.paused = false;
2712
+ let t;
2713
+ for (; !this.paused && (t = this.#t.shift()); ) t();
2714
+ }
2715
+ onResume(t) {
2716
+ this.signal?.aborted || (this.paused ? this.#t.push(t) : t());
2717
+ }
2718
+ async matchCheck(t, e) {
2719
+ if (e && this.opts.nodir) return;
2720
+ let s;
2721
+ if (this.opts.realpath) {
2722
+ if (s = t.realpathCached() || await t.realpath(), !s) return;
2723
+ t = s;
2724
+ }
2725
+ let r = t.isUnknown() || this.opts.stat ? await t.lstat() : t;
2726
+ if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
2727
+ let o = await r.realpath();
2728
+ o && (o.isUnknown() || this.opts.stat) && await o.lstat();
2729
+ }
2730
+ return this.matchCheckTest(r, e);
2731
+ }
2732
+ matchCheckTest(t, e) {
2733
+ return t && (this.maxDepth === 1 / 0 || t.depth() <= this.maxDepth) && (!e || t.canReaddir()) && (!this.opts.nodir || !t.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !t.isSymbolicLink() || !t.realpathCached()?.isDirectory()) && !this.#r(t) ? t : void 0;
2734
+ }
2735
+ matchCheckSync(t, e) {
2736
+ if (e && this.opts.nodir) return;
2737
+ let s;
2738
+ if (this.opts.realpath) {
2739
+ if (s = t.realpathCached() || t.realpathSync(), !s) return;
2740
+ t = s;
2741
+ }
2742
+ let r = t.isUnknown() || this.opts.stat ? t.lstatSync() : t;
2743
+ if (this.opts.follow && this.opts.nodir && r?.isSymbolicLink()) {
2744
+ let o = r.realpathSync();
2745
+ o && (o?.isUnknown() || this.opts.stat) && o.lstatSync();
2746
+ }
2747
+ return this.matchCheckTest(r, e);
2748
+ }
2749
+ matchFinish(t, e) {
2750
+ if (this.#r(t)) return;
2751
+ if (!this.includeChildMatches && this.#s?.add) {
2752
+ let r = `${t.relativePosix()}/**`;
2753
+ this.#s.add(r);
2754
+ }
2755
+ let s = this.opts.absolute === void 0 ? e : this.opts.absolute;
2756
+ this.seen.add(t);
2757
+ let i = this.opts.mark && t.isDirectory() ? this.#n : "";
2758
+ if (this.opts.withFileTypes) this.matchEmit(t);
2759
+ else if (s) {
2760
+ let r = this.opts.posix ? t.fullpathPosix() : t.fullpath();
2761
+ this.matchEmit(r + i);
2762
+ } else {
2763
+ let r = this.opts.posix ? t.relativePosix() : t.relative(), o = this.opts.dotRelative && !r.startsWith(".." + this.#n) ? "." + this.#n : "";
2764
+ this.matchEmit(r ? o + r + i : "." + i);
2765
+ }
2766
+ }
2767
+ async match(t, e, s) {
2768
+ let i = await this.matchCheck(t, s);
2769
+ i && this.matchFinish(i, e);
2770
+ }
2771
+ matchSync(t, e, s) {
2772
+ let i = this.matchCheckSync(t, s);
2773
+ i && this.matchFinish(i, e);
2774
+ }
2775
+ walkCB(t, e, s) {
2776
+ this.signal?.aborted && s(), this.walkCB2(t, e, new Et(this.opts), s);
2777
+ }
2778
+ walkCB2(t, e, s, i) {
2779
+ if (this.#o(t)) return i();
2780
+ if (this.signal?.aborted && i(), this.paused) {
2781
+ this.onResume(() => this.walkCB2(t, e, s, i));
2782
+ return;
2783
+ }
2784
+ s.processPatterns(t, e);
2785
+ let r = 1, o = () => {
2786
+ --r === 0 && i();
2787
+ };
2788
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || (r++, this.match(h, a, l).then(() => o()));
2789
+ for (let h of s.subwalkTargets()) {
2790
+ if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
2791
+ r++;
2792
+ let a = h.readdirCached();
2793
+ h.calledReaddir() ? this.walkCB3(h, a, s, o) : h.readdirCB((l, u) => this.walkCB3(h, u, s, o), true);
2794
+ }
2795
+ o();
2796
+ }
2797
+ walkCB3(t, e, s, i) {
2798
+ s = s.filterEntries(t, e);
2799
+ let r = 1, o = () => {
2800
+ --r === 0 && i();
2801
+ };
2802
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || (r++, this.match(h, a, l).then(() => o()));
2803
+ for (let [h, a] of s.subwalks.entries()) r++, this.walkCB2(h, a, s.child(), o);
2804
+ o();
2805
+ }
2806
+ walkCBSync(t, e, s) {
2807
+ this.signal?.aborted && s(), this.walkCB2Sync(t, e, new Et(this.opts), s);
2808
+ }
2809
+ walkCB2Sync(t, e, s, i) {
2810
+ if (this.#o(t)) return i();
2811
+ if (this.signal?.aborted && i(), this.paused) {
2812
+ this.onResume(() => this.walkCB2Sync(t, e, s, i));
2813
+ return;
2814
+ }
2815
+ s.processPatterns(t, e);
2816
+ let r = 1, o = () => {
2817
+ --r === 0 && i();
2818
+ };
2819
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || this.matchSync(h, a, l);
2820
+ for (let h of s.subwalkTargets()) {
2821
+ if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
2822
+ r++;
2823
+ let a = h.readdirSync();
2824
+ this.walkCB3Sync(h, a, s, o);
2825
+ }
2826
+ o();
2827
+ }
2828
+ walkCB3Sync(t, e, s, i) {
2829
+ s = s.filterEntries(t, e);
2830
+ let r = 1, o = () => {
2831
+ --r === 0 && i();
2832
+ };
2833
+ for (let [h, a, l] of s.matches.entries()) this.#r(h) || this.matchSync(h, a, l);
2834
+ for (let [h, a] of s.subwalks.entries()) r++, this.walkCB2Sync(h, a, s.child(), o);
2835
+ o();
2836
+ }
2837
+ };
2838
+ var xt = class extends zt {
2839
+ matches = /* @__PURE__ */ new Set();
2840
+ constructor(t, e, s) {
2841
+ super(t, e, s);
2842
+ }
2843
+ matchEmit(t) {
2844
+ this.matches.add(t);
2845
+ }
2846
+ async walk() {
2847
+ if (this.signal?.aborted) throw this.signal.reason;
2848
+ return this.path.isUnknown() && await this.path.lstat(), await new Promise((t, e) => {
2849
+ this.walkCB(this.path, this.patterns, () => {
2850
+ this.signal?.aborted ? e(this.signal.reason) : t(this.matches);
2851
+ });
2852
+ }), this.matches;
2853
+ }
2854
+ walkSync() {
2855
+ if (this.signal?.aborted) throw this.signal.reason;
2856
+ return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => {
2857
+ if (this.signal?.aborted) throw this.signal.reason;
2858
+ }), this.matches;
2859
+ }
2860
+ };
2861
+ var vt = class extends zt {
2862
+ results;
2863
+ constructor(t, e, s) {
2864
+ super(t, e, s), this.results = new V({ signal: this.signal, objectMode: true }), this.results.on("drain", () => this.resume()), this.results.on("resume", () => this.resume());
2865
+ }
2866
+ matchEmit(t) {
2867
+ this.results.write(t), this.results.flowing || this.pause();
2868
+ }
2869
+ stream() {
2870
+ let t = this.path;
2871
+ return t.isUnknown() ? t.lstat().then(() => {
2872
+ this.walkCB(t, this.patterns, () => this.results.end());
2873
+ }) : this.walkCB(t, this.patterns, () => this.results.end()), this.results;
2874
+ }
2875
+ streamSync() {
2876
+ return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
2877
+ }
2878
+ };
2879
+ var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
2880
+ var I = class {
2881
+ absolute;
2882
+ cwd;
2883
+ root;
2884
+ dot;
2885
+ dotRelative;
2886
+ follow;
2887
+ ignore;
2888
+ magicalBraces;
2889
+ mark;
2890
+ matchBase;
2891
+ maxDepth;
2892
+ nobrace;
2893
+ nocase;
2894
+ nodir;
2895
+ noext;
2896
+ noglobstar;
2897
+ pattern;
2898
+ platform;
2899
+ realpath;
2900
+ scurry;
2901
+ stat;
2902
+ signal;
2903
+ windowsPathsNoEscape;
2904
+ withFileTypes;
2905
+ includeChildMatches;
2906
+ opts;
2907
+ patterns;
2908
+ constructor(t, e) {
2909
+ if (!e) throw new TypeError("glob options required");
2910
+ if (this.withFileTypes = !!e.withFileTypes, this.signal = e.signal, this.follow = !!e.follow, this.dot = !!e.dot, this.dotRelative = !!e.dotRelative, this.nodir = !!e.nodir, this.mark = !!e.mark, e.cwd ? (e.cwd instanceof URL || e.cwd.startsWith("file://")) && (e.cwd = Wi(e.cwd)) : this.cwd = "", this.cwd = e.cwd || "", this.root = e.root, this.magicalBraces = !!e.magicalBraces, this.nobrace = !!e.nobrace, this.noext = !!e.noext, this.realpath = !!e.realpath, this.absolute = e.absolute, this.includeChildMatches = e.includeChildMatches !== false, this.noglobstar = !!e.noglobstar, this.matchBase = !!e.matchBase, this.maxDepth = typeof e.maxDepth == "number" ? e.maxDepth : 1 / 0, this.stat = !!e.stat, this.ignore = e.ignore, this.withFileTypes && this.absolute !== void 0) throw new Error("cannot set absolute and withFileTypes:true");
2911
+ if (typeof t == "string" && (t = [t]), this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e.allowWindowsEscape === false, this.windowsPathsNoEscape && (t = t.map((a) => a.replace(/\\/g, "/"))), this.matchBase) {
2912
+ if (e.noglobstar) throw new TypeError("base matching requires globstar");
2913
+ t = t.map((a) => a.includes("/") ? a : `./**/${a}`);
2914
+ }
2915
+ if (this.pattern = t, this.platform = e.platform || Pi, this.opts = { ...e, platform: this.platform }, e.scurry) {
2916
+ if (this.scurry = e.scurry, e.nocase !== void 0 && e.nocase !== e.scurry.nocase) throw new Error("nocase option contradicts provided scurry option");
2917
+ } else {
2918
+ let a = e.platform === "win32" ? it : e.platform === "darwin" ? St : e.platform ? rt : Xe;
2919
+ this.scurry = new a(this.cwd, { nocase: e.nocase, fs: e.fs });
2920
+ }
2921
+ this.nocase = this.scurry.nocase;
2922
+ let s = this.platform === "darwin" || this.platform === "win32", i = { braceExpandMax: 1e4, ...e, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r = this.pattern.map((a) => new D(a, i)), [o, h] = r.reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
2923
+ this.patterns = o.map((a, l) => {
2924
+ let u = h[l];
2925
+ if (!u) throw new Error("invalid pattern object");
2926
+ return new nt(a, u, 0, this.platform);
2927
+ });
2928
+ }
2929
+ async walk() {
2930
+ return [...await new xt(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).walk()];
2931
+ }
2932
+ walkSync() {
2933
+ return [...new xt(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).walkSync()];
2934
+ }
2935
+ stream() {
2936
+ return new vt(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).stream();
2937
+ }
2938
+ streamSync() {
2939
+ return new vt(this.patterns, this.scurry.cwd, { ...this.opts, maxDepth: this.maxDepth !== 1 / 0 ? this.maxDepth + this.scurry.cwd.depth() : 1 / 0, platform: this.platform, nocase: this.nocase, includeChildMatches: this.includeChildMatches }).streamSync();
2940
+ }
2941
+ iterateSync() {
2942
+ return this.streamSync()[Symbol.iterator]();
2943
+ }
2944
+ [Symbol.iterator]() {
2945
+ return this.iterateSync();
2946
+ }
2947
+ iterate() {
2948
+ return this.stream()[Symbol.asyncIterator]();
2949
+ }
2950
+ [Symbol.asyncIterator]() {
2951
+ return this.iterate();
2952
+ }
2953
+ };
2954
+ var le = (n7, t = {}) => {
2955
+ Array.isArray(n7) || (n7 = [n7]);
2956
+ for (let e of n7) if (new D(e, t).hasMagic()) return true;
2957
+ return false;
2958
+ };
2959
+ function Bt(n7, t = {}) {
2960
+ return new I(n7, t).streamSync();
2961
+ }
2962
+ function Qe(n7, t = {}) {
2963
+ return new I(n7, t).stream();
2964
+ }
2965
+ function ts(n7, t = {}) {
2966
+ return new I(n7, t).walkSync();
2967
+ }
2968
+ async function Je(n7, t = {}) {
2969
+ return new I(n7, t).walk();
2970
+ }
2971
+ function Ut(n7, t = {}) {
2972
+ return new I(n7, t).iterateSync();
2973
+ }
2974
+ function es(n7, t = {}) {
2975
+ return new I(n7, t).iterate();
2976
+ }
2977
+ var ji = Bt;
2978
+ var Ii = Object.assign(Qe, { sync: Bt });
2979
+ var zi = Ut;
2980
+ var Bi = Object.assign(es, { sync: Ut });
2981
+ var Ui = Object.assign(ts, { stream: Bt, iterate: Ut });
2982
+ var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync: Ui, globStream: Qe, stream: Ii, globStreamSync: Bt, streamSync: ji, globIterate: es, iterate: Bi, globIterateSync: Ut, iterateSync: zi, Glob: I, hasMagic: le, escape: tt, unescape: W });
2983
+ Ze.glob = Ze;
2984
+
2985
+ export {
2986
+ W,
2987
+ tt,
2988
+ ot,
2989
+ I,
2990
+ le,
2991
+ Bt,
2992
+ Qe,
2993
+ ts,
2994
+ Ut,
2995
+ es,
2996
+ ji,
2997
+ Ii,
2998
+ zi,
2999
+ Bi,
3000
+ Ui,
3001
+ Ze
3002
+ };