@travisennis/acai 0.0.4 → 0.0.5

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 (316) hide show
  1. package/README.md +225 -6
  2. package/dist/api/exa/index.d.ts +177 -0
  3. package/dist/api/exa/index.d.ts.map +1 -0
  4. package/dist/api/exa/index.js +439 -0
  5. package/dist/cli.d.ts +3 -2
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/commands/application-log-command.d.ts +1 -0
  8. package/dist/commands/application-log-command.d.ts.map +1 -0
  9. package/dist/commands/application-log-command.js +5 -3
  10. package/dist/commands/clear-command.d.ts +1 -0
  11. package/dist/commands/clear-command.d.ts.map +1 -0
  12. package/dist/commands/clear-command.js +2 -3
  13. package/dist/commands/compact-command.d.ts +1 -0
  14. package/dist/commands/compact-command.d.ts.map +1 -0
  15. package/dist/commands/compact-command.js +1 -1
  16. package/dist/commands/copy-command.d.ts +1 -0
  17. package/dist/commands/copy-command.d.ts.map +1 -0
  18. package/dist/commands/copy-command.js +3 -2
  19. package/dist/commands/edit-command.d.ts +1 -0
  20. package/dist/commands/edit-command.d.ts.map +1 -0
  21. package/dist/commands/edit-command.js +7 -5
  22. package/dist/commands/edit-prompt-command.d.ts +2 -1
  23. package/dist/commands/edit-prompt-command.d.ts.map +1 -0
  24. package/dist/commands/edit-prompt-command.js +15 -7
  25. package/dist/commands/exit-command.d.ts +13 -2
  26. package/dist/commands/exit-command.d.ts.map +1 -0
  27. package/dist/commands/exit-command.js +14 -2
  28. package/dist/commands/files-command.d.ts +1 -0
  29. package/dist/commands/files-command.d.ts.map +1 -0
  30. package/dist/commands/files-command.js +9 -8
  31. package/dist/commands/generate-rules-command.d.ts +1 -0
  32. package/dist/commands/generate-rules-command.d.ts.map +1 -0
  33. package/dist/commands/generate-rules-command.js +4 -3
  34. package/dist/commands/health-command.d.ts +3 -1
  35. package/dist/commands/health-command.d.ts.map +1 -0
  36. package/dist/commands/health-command.js +42 -5
  37. package/dist/commands/help-command.d.ts +1 -0
  38. package/dist/commands/help-command.d.ts.map +1 -0
  39. package/dist/commands/help-command.js +2 -3
  40. package/dist/commands/init-command.d.ts +1 -0
  41. package/dist/commands/init-command.d.ts.map +1 -0
  42. package/dist/commands/init-command.js +1 -2
  43. package/dist/commands/last-log-command.d.ts +1 -0
  44. package/dist/commands/last-log-command.d.ts.map +1 -0
  45. package/dist/commands/last-log-command.js +12 -17
  46. package/dist/commands/list-tools-command.d.ts +3 -0
  47. package/dist/commands/list-tools-command.d.ts.map +1 -0
  48. package/dist/commands/list-tools-command.js +61 -0
  49. package/dist/commands/manager.d.ts +7 -2
  50. package/dist/commands/manager.d.ts.map +1 -0
  51. package/dist/commands/manager.js +43 -6
  52. package/dist/commands/model-command.d.ts +1 -0
  53. package/dist/commands/model-command.d.ts.map +1 -0
  54. package/dist/commands/model-command.js +5 -5
  55. package/dist/commands/paste-command.d.ts +1 -0
  56. package/dist/commands/paste-command.d.ts.map +1 -0
  57. package/dist/commands/paste-command.js +6 -5
  58. package/dist/commands/prompt-command.d.ts +2 -1
  59. package/dist/commands/prompt-command.d.ts.map +1 -0
  60. package/dist/commands/prompt-command.js +62 -8
  61. package/dist/commands/reset-command.d.ts +1 -0
  62. package/dist/commands/reset-command.d.ts.map +1 -0
  63. package/dist/commands/reset-command.js +1 -1
  64. package/dist/commands/rules-command.d.ts +1 -0
  65. package/dist/commands/rules-command.d.ts.map +1 -0
  66. package/dist/commands/rules-command.js +5 -3
  67. package/dist/commands/save-command.d.ts +1 -0
  68. package/dist/commands/save-command.d.ts.map +1 -0
  69. package/dist/commands/save-command.js +1 -1
  70. package/dist/commands/shell-command.d.ts +3 -0
  71. package/dist/commands/shell-command.d.ts.map +1 -0
  72. package/dist/commands/shell-command.js +60 -0
  73. package/dist/commands/types.d.ts +9 -6
  74. package/dist/commands/types.d.ts.map +1 -0
  75. package/dist/commands/usage-command.d.ts +1 -0
  76. package/dist/commands/usage-command.d.ts.map +1 -0
  77. package/dist/commands/usage-command.js +2 -3
  78. package/dist/config.d.ts +22 -34
  79. package/dist/config.d.ts.map +1 -0
  80. package/dist/config.js +61 -15
  81. package/dist/conversation-analyzer.d.ts +2 -1
  82. package/dist/conversation-analyzer.d.ts.map +1 -0
  83. package/dist/dedent.d.ts +1 -0
  84. package/dist/dedent.d.ts.map +1 -0
  85. package/dist/execution/index.d.ts +112 -0
  86. package/dist/execution/index.d.ts.map +1 -0
  87. package/dist/execution/index.js +432 -0
  88. package/dist/formatting.d.ts +2 -13
  89. package/dist/formatting.d.ts.map +1 -0
  90. package/dist/formatting.js +5 -64
  91. package/dist/index.d.ts +1 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +14 -4
  94. package/dist/logger.d.ts +1 -0
  95. package/dist/logger.d.ts.map +1 -0
  96. package/dist/mentions.d.ts +4 -0
  97. package/dist/mentions.d.ts.map +1 -0
  98. package/dist/mentions.js +42 -10
  99. package/dist/messages.d.ts +8 -20
  100. package/dist/messages.d.ts.map +1 -0
  101. package/dist/messages.js +33 -53
  102. package/dist/middleware/audit-message.d.ts +1 -0
  103. package/dist/middleware/audit-message.d.ts.map +1 -0
  104. package/dist/middleware/index.d.ts +1 -0
  105. package/dist/middleware/index.d.ts.map +1 -0
  106. package/dist/middleware/rate-limit.d.ts +1 -0
  107. package/dist/middleware/rate-limit.d.ts.map +1 -0
  108. package/dist/models/ai-config.d.ts +1 -0
  109. package/dist/models/ai-config.d.ts.map +1 -0
  110. package/dist/models/anthropic-provider.d.ts +1 -0
  111. package/dist/models/anthropic-provider.d.ts.map +1 -0
  112. package/dist/models/deepseek-provider.d.ts +1 -0
  113. package/dist/models/deepseek-provider.d.ts.map +1 -0
  114. package/dist/models/google-provider.d.ts +1 -0
  115. package/dist/models/google-provider.d.ts.map +1 -0
  116. package/dist/models/groq-provider.d.ts +20 -0
  117. package/dist/models/groq-provider.d.ts.map +1 -0
  118. package/dist/models/groq-provider.js +31 -0
  119. package/dist/models/manager.d.ts +1 -0
  120. package/dist/models/manager.d.ts.map +1 -0
  121. package/dist/models/openai-provider.d.ts +2 -1
  122. package/dist/models/openai-provider.d.ts.map +1 -0
  123. package/dist/models/openrouter-provider.d.ts +31 -22
  124. package/dist/models/openrouter-provider.d.ts.map +1 -0
  125. package/dist/models/openrouter-provider.js +115 -1
  126. package/dist/models/providers.d.ts +4 -5
  127. package/dist/models/providers.d.ts.map +1 -0
  128. package/dist/models/providers.js +7 -3
  129. package/dist/models/xai-provider.d.ts +1 -0
  130. package/dist/models/xai-provider.d.ts.map +1 -0
  131. package/dist/parsing.d.ts +2 -1
  132. package/dist/parsing.d.ts.map +1 -0
  133. package/dist/prompts/manager.d.ts +14 -2
  134. package/dist/prompts/manager.d.ts.map +1 -0
  135. package/dist/prompts.d.ts +1 -0
  136. package/dist/prompts.d.ts.map +1 -0
  137. package/dist/prompts.js +15 -11
  138. package/dist/repl/display-tool-messages.d.ts +4 -0
  139. package/dist/repl/display-tool-messages.d.ts.map +1 -0
  140. package/dist/repl/display-tool-messages.js +55 -0
  141. package/dist/repl/display-tool-use.d.ts +14 -0
  142. package/dist/repl/display-tool-use.d.ts.map +1 -0
  143. package/dist/repl/display-tool-use.js +63 -0
  144. package/dist/repl/get-prompt-header.d.ts +8 -0
  145. package/dist/repl/get-prompt-header.d.ts.map +1 -0
  146. package/dist/repl/get-prompt-header.js +38 -0
  147. package/dist/repl/tool-call-repair.d.ts +4 -0
  148. package/dist/repl/tool-call-repair.d.ts.map +1 -0
  149. package/dist/repl/tool-call-repair.js +50 -0
  150. package/dist/repl-prompt.d.ts +1 -0
  151. package/dist/repl-prompt.d.ts.map +1 -0
  152. package/dist/repl.d.ts +8 -4
  153. package/dist/repl.d.ts.map +1 -0
  154. package/dist/repl.js +108 -252
  155. package/dist/terminal/ansi-styles.d.ts +77 -0
  156. package/dist/terminal/ansi-styles.d.ts.map +1 -0
  157. package/dist/terminal/ansi-styles.js +215 -0
  158. package/dist/terminal/checkbox-prompt.d.ts +36 -0
  159. package/dist/terminal/checkbox-prompt.d.ts.map +1 -0
  160. package/dist/terminal/checkbox-prompt.js +362 -0
  161. package/dist/terminal/default-theme.d.ts +6 -0
  162. package/dist/terminal/default-theme.d.ts.map +1 -0
  163. package/dist/terminal/default-theme.js +182 -0
  164. package/dist/terminal/east-asian-width.d.ts +8 -0
  165. package/dist/terminal/east-asian-width.d.ts.map +1 -0
  166. package/dist/terminal/east-asian-width.js +409 -0
  167. package/dist/terminal/editor-prompt.d.ts +10 -0
  168. package/dist/terminal/editor-prompt.d.ts.map +1 -0
  169. package/dist/terminal/editor-prompt.js +61 -0
  170. package/dist/terminal/errors.d.ts +19 -0
  171. package/dist/terminal/errors.d.ts.map +1 -0
  172. package/dist/terminal/errors.js +37 -0
  173. package/dist/terminal/formatting.d.ts +1 -11
  174. package/dist/terminal/formatting.d.ts.map +1 -0
  175. package/dist/terminal/formatting.js +4 -20
  176. package/dist/terminal/highlight/index.d.ts +53 -0
  177. package/dist/terminal/highlight/index.d.ts.map +1 -0
  178. package/dist/terminal/highlight/index.js +90 -0
  179. package/dist/terminal/highlight/theme.d.ts +233 -0
  180. package/dist/terminal/highlight/theme.d.ts.map +1 -0
  181. package/dist/terminal/highlight/theme.js +83 -0
  182. package/dist/terminal/index.d.ts +16 -9
  183. package/dist/terminal/index.d.ts.map +1 -0
  184. package/dist/terminal/index.js +42 -126
  185. package/dist/terminal/input-prompt.d.ts +16 -0
  186. package/dist/terminal/input-prompt.d.ts.map +1 -0
  187. package/dist/terminal/input-prompt.js +181 -0
  188. package/dist/terminal/markdown-utils.d.ts +1 -0
  189. package/dist/terminal/markdown-utils.d.ts.map +1 -0
  190. package/dist/terminal/markdown.d.ts +1 -0
  191. package/dist/terminal/markdown.d.ts.map +1 -0
  192. package/dist/terminal/markdown.js +17 -12
  193. package/dist/terminal/search-prompt.d.ts +20 -0
  194. package/dist/terminal/search-prompt.d.ts.map +1 -0
  195. package/dist/terminal/search-prompt.js +279 -0
  196. package/dist/terminal/select-prompt.d.ts +26 -0
  197. package/dist/terminal/select-prompt.d.ts.map +1 -0
  198. package/dist/terminal/select-prompt.js +298 -0
  199. package/dist/terminal/string-width.d.ts +7 -0
  200. package/dist/terminal/string-width.d.ts.map +1 -0
  201. package/dist/terminal/string-width.js +61 -0
  202. package/dist/terminal/strip-ansi.d.ts +2 -0
  203. package/dist/terminal/strip-ansi.d.ts.map +1 -0
  204. package/dist/terminal/strip-ansi.js +20 -0
  205. package/dist/terminal/style.d.ts +191 -0
  206. package/dist/terminal/style.d.ts.map +1 -0
  207. package/dist/terminal/style.js +259 -0
  208. package/dist/terminal/supports-color.d.ts +1 -0
  209. package/dist/terminal/supports-color.d.ts.map +1 -0
  210. package/dist/terminal/supports-hyperlinks.d.ts +1 -3
  211. package/dist/terminal/supports-hyperlinks.d.ts.map +1 -0
  212. package/dist/terminal/supports-hyperlinks.js +1 -1
  213. package/dist/terminal/types.d.ts +1 -37
  214. package/dist/terminal/types.d.ts.map +1 -0
  215. package/dist/terminal/wrap-ansi.d.ts +8 -0
  216. package/dist/terminal/wrap-ansi.d.ts.map +1 -0
  217. package/dist/terminal/wrap-ansi.js +190 -0
  218. package/dist/{token-utils.d.ts → tokens/counter.d.ts} +1 -0
  219. package/dist/tokens/counter.d.ts.map +1 -0
  220. package/dist/{token-utils.js → tokens/counter.js} +1 -1
  221. package/dist/tokens/manage-output.d.ts +34 -0
  222. package/dist/tokens/manage-output.d.ts.map +1 -0
  223. package/dist/tokens/manage-output.js +44 -0
  224. package/dist/{token-tracker.d.ts → tokens/tracker.d.ts} +1 -0
  225. package/dist/tokens/tracker.d.ts.map +1 -0
  226. package/dist/tool-executor.d.ts +28 -0
  227. package/dist/tool-executor.d.ts.map +1 -0
  228. package/dist/tool-executor.js +74 -0
  229. package/dist/tools/agent.d.ts +3 -2
  230. package/dist/tools/agent.d.ts.map +1 -0
  231. package/dist/tools/agent.js +7 -4
  232. package/dist/tools/bash-utils.d.ts +7 -0
  233. package/dist/tools/bash-utils.d.ts.map +1 -0
  234. package/dist/tools/bash-utils.js +212 -0
  235. package/dist/tools/bash.d.ts +9 -7
  236. package/dist/tools/bash.d.ts.map +1 -0
  237. package/dist/tools/bash.js +95 -212
  238. package/dist/tools/code-interpreter.d.ts +1 -1
  239. package/dist/tools/code-interpreter.d.ts.map +1 -0
  240. package/dist/tools/code-interpreter.js +31 -96
  241. package/dist/tools/delete-file.d.ts +5 -3
  242. package/dist/tools/delete-file.d.ts.map +1 -0
  243. package/dist/tools/delete-file.js +47 -33
  244. package/dist/tools/directory-tree.d.ts +10 -1
  245. package/dist/tools/directory-tree.d.ts.map +1 -0
  246. package/dist/tools/directory-tree.js +91 -8
  247. package/dist/tools/dynamic-tool-loader.d.ts +12 -0
  248. package/dist/tools/dynamic-tool-loader.d.ts.map +1 -0
  249. package/dist/tools/dynamic-tool-loader.js +280 -0
  250. package/dist/tools/dynamic-tool-parser.d.ts +20 -0
  251. package/dist/tools/dynamic-tool-parser.d.ts.map +1 -0
  252. package/dist/tools/dynamic-tool-parser.js +21 -0
  253. package/dist/tools/edit-file.d.ts +10 -2
  254. package/dist/tools/edit-file.d.ts.map +1 -0
  255. package/dist/tools/edit-file.js +117 -40
  256. package/dist/tools/file-editing-utils.d.ts +2 -0
  257. package/dist/tools/file-editing-utils.d.ts.map +1 -0
  258. package/dist/tools/file-editing-utils.js +135 -0
  259. package/dist/tools/filesystem-utils.d.ts +6 -21
  260. package/dist/tools/filesystem-utils.d.ts.map +1 -0
  261. package/dist/tools/filesystem-utils.js +96 -148
  262. package/dist/tools/git-utils.d.ts +1 -0
  263. package/dist/tools/git-utils.d.ts.map +1 -0
  264. package/dist/tools/grep.d.ts +5 -3
  265. package/dist/tools/grep.d.ts.map +1 -0
  266. package/dist/tools/grep.js +67 -27
  267. package/dist/tools/index.d.ts +10 -16
  268. package/dist/tools/index.d.ts.map +1 -0
  269. package/dist/tools/index.js +33 -22
  270. package/dist/tools/move-file.d.ts +1 -0
  271. package/dist/tools/move-file.d.ts.map +1 -0
  272. package/dist/tools/move-file.js +12 -5
  273. package/dist/tools/read-file.d.ts +2 -1
  274. package/dist/tools/read-file.d.ts.map +1 -0
  275. package/dist/tools/read-file.js +13 -6
  276. package/dist/tools/read-multiple-files.d.ts +2 -1
  277. package/dist/tools/read-multiple-files.d.ts.map +1 -0
  278. package/dist/tools/read-multiple-files.js +90 -9
  279. package/dist/tools/save-file.d.ts +5 -3
  280. package/dist/tools/save-file.d.ts.map +1 -0
  281. package/dist/tools/save-file.js +64 -36
  282. package/dist/tools/think.d.ts +1 -0
  283. package/dist/tools/think.d.ts.map +1 -0
  284. package/dist/tools/think.js +5 -1
  285. package/dist/tools/types.d.ts +14 -1
  286. package/dist/tools/types.d.ts.map +1 -0
  287. package/dist/tools/web-fetch.d.ts +4 -2
  288. package/dist/tools/web-fetch.d.ts.map +1 -0
  289. package/dist/tools/web-fetch.js +2 -2
  290. package/dist/tools/web-search.d.ts +2 -1
  291. package/dist/tools/web-search.d.ts.map +1 -0
  292. package/dist/tools/web-search.js +46 -11
  293. package/dist/utils/filesystem.d.ts +23 -0
  294. package/dist/utils/filesystem.d.ts.map +1 -0
  295. package/dist/utils/filesystem.js +140 -0
  296. package/dist/utils/filetype-detection.d.ts +3 -0
  297. package/dist/utils/filetype-detection.d.ts.map +1 -0
  298. package/dist/utils/filetype-detection.js +112 -0
  299. package/dist/utils/glob.d.ts +52 -0
  300. package/dist/utils/glob.d.ts.map +1 -0
  301. package/dist/utils/glob.js +376 -0
  302. package/dist/utils/ignore.d.ts +104 -0
  303. package/dist/utils/ignore.d.ts.map +1 -0
  304. package/dist/utils/ignore.js +649 -0
  305. package/dist/utils/process.d.ts +3 -2
  306. package/dist/utils/process.d.ts.map +1 -0
  307. package/dist/utils/process.js +17 -2
  308. package/dist/utils/zod-utils.d.ts +4 -0
  309. package/dist/utils/zod-utils.d.ts.map +1 -0
  310. package/dist/utils/zod-utils.js +7 -0
  311. package/dist/version.d.ts +1 -0
  312. package/dist/version.d.ts.map +1 -0
  313. package/package.json +32 -30
  314. package/dist/tools/command-validation.d.ts +0 -11
  315. package/dist/tools/command-validation.js +0 -45
  316. /package/dist/{token-tracker.js → tokens/tracker.js} +0 -0
@@ -0,0 +1,649 @@
1
+ /**
2
+ * Modern TypeScript implementation of node-ignore
3
+ * Based on https://github.com/kaelzhang/node-ignore
4
+ */
5
+ // A simple implementation of make-array
6
+ function makeArray(subject) {
7
+ return Array.isArray(subject) ? subject : [subject];
8
+ }
9
+ const SPACE = " ";
10
+ const ESCAPE = "\\";
11
+ const REGEX_TEST_BLANK_LINE = /^\s+$/;
12
+ const REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
13
+ const REGEX_REPLACE_LEADING_ESCAPED_EXCLAMATION = /^\\!/;
14
+ const REGEX_REPLACE_LEADING_ESCAPED_HASH = /^\\#/;
15
+ const REGEX_SPLITALL_CRLF = /\r?\n/g;
16
+ // Invalid:
17
+ // - /foo,
18
+ // - ./foo,
19
+ // - ../foo,
20
+ // - .
21
+ // - ..
22
+ // Valid:
23
+ // - .foo
24
+ const REGEX_TEST_INVALID_PATH = /^(?:\/|\.{1,2}(?:\/|$))/;
25
+ const REGEX_TEST_TRAILING_SLASH = /\/$/;
26
+ const SLASH = "/";
27
+ // Do not use ternary expression here
28
+ let TmpKeyIgnore = "node-ignore";
29
+ if (typeof Symbol !== "undefined") {
30
+ TmpKeyIgnore = Symbol.for("node-ignore");
31
+ }
32
+ const KEY_IGNORE = TmpKeyIgnore;
33
+ const REGEX_REGEXP_RANGE = /([A-Za-z0-9])-([A-Za-z0-9])/g;
34
+ const RETURN_FALSE = () => false;
35
+ // Sanitize the range of a regular expression
36
+ // The cases are complicated, see test cases for details
37
+ const sanitizeRange = (range) => range.replace(REGEX_REGEXP_RANGE, (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)
38
+ ? match
39
+ : // Invalid range (out of order) which is ok for gitignore rules but
40
+ // fatal for JavaScript regular expression, so eliminate it.
41
+ "");
42
+ // See fixtures #59
43
+ const cleanRangeBackSlash = (slashes) => {
44
+ const { length } = slashes;
45
+ return slashes.slice(0, length - (length % 2));
46
+ };
47
+ // > If the pattern ends with a slash,
48
+ // > it is removed for the purpose of the following description,
49
+ // > but it would only find a match with a directory.
50
+ // > In other words, foo/ will match a directory foo and paths underneath it,
51
+ // > but will not match a regular file or a symbolic link foo
52
+ // > (this is consistent with the way how pathspec works in general in Git).
53
+ // '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'
54
+ // -> ignore-rules will not deal with it, because it costs extra `fs.stat` call
55
+ // you could use option `mark: true` with `glob`
56
+ // '`foo/`' should not continue with the '`..`'
57
+ const REPLACERS = [
58
+ [
59
+ // Remove BOM
60
+ // TODO:
61
+ // Other similar zero-width characters?
62
+ /^\uFEFF/,
63
+ () => "",
64
+ ],
65
+ // > Trailing spaces are ignored unless they are quoted with backslash ("\\")
66
+ [
67
+ // (a\ ) -> (a )
68
+ // (a ) -> (a)
69
+ // (a ) -> (a)
70
+ // (a \ ) -> (a )
71
+ /((?:\\\\)*?)(\\?\s+)$/,
72
+ (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : ""),
73
+ ],
74
+ // Replace (\ ) with ' '
75
+ // (\ ) -> ' '
76
+ // (\\ ) -> '\\ '
77
+ // (\\\ ) -> '\\ '
78
+ [
79
+ /(\\+?)\s/g,
80
+ (_, m1) => {
81
+ const { length } = m1;
82
+ return m1.slice(0, length - (length % 2)) + SPACE;
83
+ },
84
+ ],
85
+ // Escape metacharacters
86
+ // which is written down by users but means special for regular expressions.
87
+ // > There are 12 characters with special meanings:
88
+ // > - the backslash \,
89
+ // > - the caret ^,
90
+ // > - the dollar sign $,
91
+ // > - the period or dot .,
92
+ // > - the vertical bar or pipe symbol |,
93
+ // > - the question mark ?,
94
+ // > - the asterisk or star *,
95
+ // > - the plus sign +,
96
+ // > - the opening parenthesis (,
97
+ // > - the closing parenthesis ),
98
+ // > - and the opening square bracket [,
99
+ // > - the opening curly brace {,
100
+ // > These special characters are often called "metacharacters".
101
+ [/[\\$.|*+(){^]/g, (match) => `\\${match}`],
102
+ [
103
+ // > a question mark (?) matches a single character
104
+ /(?!\\)\?/g,
105
+ () => "[^/]",
106
+ ],
107
+ // leading slash
108
+ [
109
+ // > A leading slash matches the beginning of the pathname.
110
+ // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
111
+ // A leading slash matches the beginning of the pathname
112
+ /^\//,
113
+ () => "^",
114
+ ],
115
+ // replace special metacharacter slash after the leading slash
116
+ [/\//g, () => "\\/"],
117
+ [
118
+ // > A leading "**" followed by a slash means match in all directories.
119
+ // > For example, "**/foo" matches file or directory "foo" anywhere,
120
+ // > the same as pattern "foo".
121
+ // > "**/foo/bar" matches file or directory "bar" anywhere that is directly
122
+ // > under directory "foo".
123
+ // Notice that the '*'s have been replaced as '\\*'
124
+ /^\^*\\\*\\\*\\\//,
125
+ // '**/foo' <-> 'foo'
126
+ () => "^(?:.*\\/)?",
127
+ ],
128
+ // starting
129
+ [
130
+ // there will be no leading '/'
131
+ // (which has been replaced by section "leading slash")
132
+ // If starts with '**', adding a '^' to the regular expression also works
133
+ /^(?=[^^])/,
134
+ (pattern) => {
135
+ // If has a slash `/` at the beginning or middle
136
+ return !/\/(?!$)/.test(pattern)
137
+ ? // > Prior to 2.22.1
138
+ // > If the pattern does not contain a slash /,
139
+ // > Git treats it as a shell glob pattern
140
+ // Actually, if there is only a trailing slash,
141
+ // git also treats it as a shell glob pattern
142
+ // After 2.22.1 (compatible but clearer)
143
+ // > If there is a separator at the beginning or middle (or both)
144
+ // > of the pattern, then the pattern is relative to the directory
145
+ // > level of the particular .gitignore file itself.
146
+ // > Otherwise the pattern may also match at any level below
147
+ // > the .gitignore level.
148
+ "(?:^|/)"
149
+ : // > Otherwise, Git treats the pattern as a shell glob suitable for
150
+ // > consumption by fnmatch(3)
151
+ "^";
152
+ },
153
+ ],
154
+ // two globstars
155
+ [
156
+ // Use lookahead assertions so that we could match more than one `'/**'`
157
+ /\\\/\\\*\\\*(?=\\\/|$)/g,
158
+ // Zero, one or several directories
159
+ // should not use '*', or it will be replaced by the next replacer
160
+ // Check if it is not the last `'/**'`
161
+ (_, index, str) => Number(index) + 6 < str.length
162
+ ? // case: /**/
163
+ // > A slash followed by two consecutive asterisks then a slash matches
164
+ // > zero or more directories.
165
+ // > For example, "a/**/b" matches "a/b", "a/x/b", "a/x/y/b" and so on.
166
+ // '/**/'
167
+ "(?:\\/[^\\/]+)*"
168
+ : // case: /**
169
+ // > A trailing `"/**"` matches everything inside.
170
+ // #21: everything inside but it should not include the current folder
171
+ "\\/.+",
172
+ ],
173
+ // normal intermediate wildcards
174
+ [
175
+ // Never replace escaped '*'
176
+ // ignore rule '\*' will match the path '*'
177
+ // 'abc.*/' -> go
178
+ // 'abc.*' -> skip this rule,
179
+ // coz trailing single wildcard will be handed by [trailing wildcard]
180
+ /(^|[^\\]+)(\\\*)+(?=.+)/g,
181
+ // '*.js' matches '.js'
182
+ // '*.js' doesn't match 'abc'
183
+ (_, p1, p2) => {
184
+ // 1.
185
+ // > An asterisk "*" matches anything except a slash.
186
+ // 2.
187
+ // > Other consecutive asterisks are considered regular asterisks
188
+ // > and will match according to the previous rules.
189
+ const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
190
+ return p1 + unescaped;
191
+ },
192
+ ],
193
+ [
194
+ // unescape, revert step 3 except for back slash
195
+ // For example, if a user escape a '\\*',
196
+ // after step 3, the result will be '\\\\\\*'
197
+ /\\\\\\\\(?=[$.|*+(){^])/g,
198
+ () => ESCAPE,
199
+ ],
200
+ [
201
+ // '\\\\' -> '\\'
202
+ /\\\\/g,
203
+ () => ESCAPE,
204
+ ],
205
+ [
206
+ // > The range notation, e.g. [a-zA-Z],
207
+ // > can be used to match one of the characters in a range.
208
+ // `\` is escaped by step 3
209
+ /(\\)?\[([^\]/]*?)(\\*)($|\])/g,
210
+ (_, leadEscape, range, endEscape, close) => leadEscape === ESCAPE
211
+ ? // '\\[bar]' -> '\\\\[bar\\]'
212
+ `\\[${range}${cleanRangeBackSlash(endEscape)}${close}`
213
+ : close === "]"
214
+ ? endEscape.length % 2 === 0
215
+ ? // A normal case, and it is a range notation
216
+ // '[bar]'
217
+ // '[bar\\\\]'
218
+ `[${sanitizeRange(range)}${endEscape}]`
219
+ : // Invalid range notaton
220
+ // '[bar\\]' -> '[bar\\\\]'
221
+ "[]"
222
+ : "[]",
223
+ ],
224
+ // ending
225
+ [
226
+ // 'js' will not match 'js.'
227
+ // 'ab' will not match 'abc'
228
+ /(?:[^*])$/,
229
+ // WTF!
230
+ // https://git-scm.com/docs/gitignore
231
+ // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
232
+ // which re-fixes #24, #38
233
+ // > If there is a separator at the end of the pattern then the pattern
234
+ // > will only match directories, otherwise the pattern can match both
235
+ // > files and directories.
236
+ // 'js*' will not match 'a.js'
237
+ // 'js/' will not match 'a.js'
238
+ // 'js' will match 'a.js' and 'a.js/'
239
+ (match) => /\/$/.test(match)
240
+ ? // foo/ will not match 'foo'
241
+ `${match}$`
242
+ : // foo matches 'foo' and 'foo/'
243
+ `${match}(?=$|\\/$)`,
244
+ ],
245
+ ];
246
+ // Freeze REPLACERS to prevent accidental mutation and help VMs optimize constants
247
+ Object.freeze(REPLACERS);
248
+ const REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/;
249
+ const MODE_IGNORE = "regex";
250
+ const MODE_CHECK_IGNORE = "checkRegex";
251
+ const TRAILING_WILD_CARD_REPLACERS = {
252
+ [MODE_IGNORE](_, p1) {
253
+ const prefix = p1
254
+ ? // '\\^':
255
+ // '/*' does not match EMPTY
256
+ // '/*' does not match everything
257
+ // '\\\/':
258
+ // 'abc/*' does not match 'abc/'
259
+ `${p1}[^/]+`
260
+ : // 'a*' matches 'a'
261
+ // 'a*' matches 'aa'
262
+ "[^/]*";
263
+ return `${prefix}(?=$|\\/$)`;
264
+ },
265
+ [MODE_CHECK_IGNORE](_, p1) {
266
+ // When doing `git check-ignore`
267
+ const prefix = p1
268
+ ? // '\\\/':
269
+ // 'abc/*' DOES match 'abc/' !
270
+ `${p1}[^/]*`
271
+ : // 'a*' matches 'a'
272
+ // 'a*' matches 'aa'
273
+ "[^/]*";
274
+ return `${prefix}(?=$|\\/$)`;
275
+ },
276
+ };
277
+ // @param {pattern}
278
+ const makeRegexPrefix = (pattern) => REPLACERS.reduce((prev, [matcher, replacer]) => prev.replace(matcher, (match, ...args) => replacer(match, ...args, pattern)), pattern);
279
+ const isString = (subject) => typeof subject === "string";
280
+ // > A blank line matches no files, so it can serve as a separator for readability.
281
+ const checkPattern = (pattern) => !!pattern &&
282
+ isString(pattern) &&
283
+ !REGEX_TEST_BLANK_LINE.test(pattern) &&
284
+ !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) &&
285
+ // > A line starting with # serves as a comment.
286
+ pattern.indexOf("#") !== 0;
287
+ const splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean);
288
+ class IgnoreRule {
289
+ pattern;
290
+ mark;
291
+ negative;
292
+ ignoreCase;
293
+ regexPrefix;
294
+ // Simple private cache properties
295
+ _regex;
296
+ _checkRegex;
297
+ constructor(pattern, mark, _body, ignoreCase, negative, regexPrefix) {
298
+ this.pattern = pattern;
299
+ this.mark = mark;
300
+ this.ignoreCase = ignoreCase;
301
+ this.negative = negative;
302
+ this.regexPrefix = regexPrefix;
303
+ }
304
+ get regex() {
305
+ if (!this._regex) {
306
+ this._regex = this.compileRegex("regex");
307
+ }
308
+ return this._regex;
309
+ }
310
+ get checkRegex() {
311
+ if (!this._checkRegex) {
312
+ this._checkRegex = this.compileRegex("checkRegex");
313
+ }
314
+ return this._checkRegex;
315
+ }
316
+ compileRegex(mode) {
317
+ const str = this.regexPrefix.replace(REGEX_REPLACE_TRAILING_WILDCARD,
318
+ // It does not need to bind pattern
319
+ TRAILING_WILD_CARD_REPLACERS[mode]);
320
+ return this.ignoreCase ? new RegExp(str, "i") : new RegExp(str);
321
+ }
322
+ }
323
+ const createRule = ({ pattern, mark }, ignoreCase) => {
324
+ let negative = false;
325
+ let body = pattern;
326
+ // > An optional prefix "!" which negates the pattern;
327
+ if (body.indexOf("!") === 0) {
328
+ negative = true;
329
+ body = body.substring(1);
330
+ }
331
+ body = body
332
+ // > Put a backslash ("\\") in front of the first "!" for patterns that
333
+ // > begin with a literal "!", for example, `"\\!important!.txt"`.
334
+ .replace(REGEX_REPLACE_LEADING_ESCAPED_EXCLAMATION, "!")
335
+ // > Put a backslash ("\\") in front of the first hash for patterns that
336
+ // > begin with a hash.
337
+ .replace(REGEX_REPLACE_LEADING_ESCAPED_HASH, "#");
338
+ const regexPrefix = makeRegexPrefix(body);
339
+ return new IgnoreRule(pattern, mark, body, ignoreCase, negative, regexPrefix);
340
+ };
341
+ class RuleManager {
342
+ _ignoreCase;
343
+ _rules = [];
344
+ _added = false;
345
+ constructor(ignoreCase) {
346
+ this._ignoreCase = ignoreCase;
347
+ }
348
+ get ignoreCase() {
349
+ return this._ignoreCase;
350
+ }
351
+ _add(pattern) {
352
+ // #32
353
+ if (pattern &&
354
+ pattern[KEY_IGNORE]) {
355
+ const otherRules = pattern._rules._rules;
356
+ this._rules.push(...otherRules);
357
+ this._added = true;
358
+ return;
359
+ }
360
+ let patternObj;
361
+ if (isString(pattern)) {
362
+ patternObj = {
363
+ pattern,
364
+ };
365
+ }
366
+ else {
367
+ patternObj = pattern;
368
+ }
369
+ if (checkPattern(patternObj.pattern)) {
370
+ const rule = createRule(patternObj, this._ignoreCase);
371
+ this._added = true;
372
+ this._rules.push(rule);
373
+ }
374
+ }
375
+ // @param {Array<string> | string | Ignore} pattern
376
+ add(pattern) {
377
+ this._added = false;
378
+ let patterns;
379
+ if (isString(pattern)) {
380
+ patterns = splitPattern(pattern);
381
+ }
382
+ else if (Array.isArray(pattern)) {
383
+ patterns = pattern;
384
+ }
385
+ else {
386
+ patterns = [pattern];
387
+ }
388
+ for (const p of patterns) {
389
+ this._add(p);
390
+ }
391
+ return this._added;
392
+ }
393
+ // Test one single path without recursively checking parent directories
394
+ //
395
+ // - checkUnignored `boolean` whether should check if the path is unignored,
396
+ // setting `checkUnignored` to `false` could reduce additional
397
+ // path matching.
398
+ // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
399
+ // @returns {TestResult} true if a file is ignored
400
+ test(path, checkUnignored, mode) {
401
+ let ignored = false;
402
+ let unignored = false;
403
+ let matchedRule;
404
+ for (const rule of this._rules) {
405
+ const { negative } = rule;
406
+ // | ignored : unignored
407
+ // -------- | ---------------------------------------
408
+ // negative | 0:0 | 0:1 | 1:0 | 1:1
409
+ // -------- | ------- | ------- | ------- | --------
410
+ // 0 | TEST | TEST | SKIP | X
411
+ // 1 | TESTIF | SKIP | TEST | X
412
+ // - SKIP: always skip
413
+ // - TEST: always test
414
+ // - TESTIF: only test if checkUnignored
415
+ // - X: that never happen
416
+ if ((unignored === negative && ignored !== unignored) ||
417
+ (negative && !ignored && !unignored && !checkUnignored)) {
418
+ continue;
419
+ }
420
+ const regex = mode === "regex" ? rule.regex : rule.checkRegex;
421
+ const matched = regex.test(path);
422
+ if (!matched) {
423
+ continue;
424
+ }
425
+ ignored = !negative;
426
+ unignored = negative;
427
+ matchedRule = negative ? undefined : rule;
428
+ }
429
+ const ret = {
430
+ ignored,
431
+ unignored,
432
+ };
433
+ if (matchedRule) {
434
+ ret.rule = matchedRule;
435
+ }
436
+ return ret;
437
+ }
438
+ }
439
+ const throwError = (message, Ctor) => {
440
+ throw new Ctor(message);
441
+ };
442
+ const checkPath = (path, originalPath, doThrow) => {
443
+ if (!isString(path)) {
444
+ return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
445
+ }
446
+ // We don't know if we should ignore EMPTY, so throw
447
+ if (!path) {
448
+ return doThrow("path must not be empty", TypeError);
449
+ }
450
+ // Check if it is a relative path
451
+ if (checkPath.isNotRelative?.(path)) {
452
+ const r = "`path.relative()`d";
453
+ return doThrow(`path should be a ${r} string, but got "${originalPath}". Use allowRelativePaths: true to permit absolute paths or './', '../'`, RangeError);
454
+ }
455
+ return true;
456
+ };
457
+ const isNotRelative = (path) => REGEX_TEST_INVALID_PATH.test(path);
458
+ checkPath.isNotRelative = isNotRelative;
459
+ // On windows, the following function will be replaced
460
+ checkPath.convert = (p) => p;
461
+ export class Ignore {
462
+ _rules;
463
+ _strictPathCheck;
464
+ _ignoreCache = {};
465
+ _testCache = {};
466
+ /**
467
+ * Create a new Ignore instance
468
+ * @param options - Configuration options
469
+ * @param options.ignorecase - Whether to use case-insensitive matching (default: true)
470
+ * @param options.ignoreCase - Alias for ignorecase
471
+ * @param options.allowRelativePaths - Allow relative paths like './' and '../' (default: false)
472
+ */
473
+ constructor({ ignorecase = true, ignoreCase = ignorecase, allowRelativePaths = false, } = {}) {
474
+ // Simple instance identification instead of define()
475
+ this[KEY_IGNORE] = true;
476
+ this._rules = new RuleManager(ignoreCase);
477
+ this._strictPathCheck = !allowRelativePaths;
478
+ this._initCache();
479
+ }
480
+ _initCache() {
481
+ // A cache for the result of `.ignores()`
482
+ this._ignoreCache = Object.create(null);
483
+ // A cache for the result of `.test()`
484
+ this._testCache = Object.create(null);
485
+ }
486
+ /**
487
+ * Clear all internal caches
488
+ */
489
+ clearCache() {
490
+ this._initCache();
491
+ return this;
492
+ }
493
+ /**
494
+ * Add ignore patterns
495
+ * @param pattern - Pattern(s) to add
496
+ * @returns This instance for chaining
497
+ */
498
+ add(pattern) {
499
+ if (this._rules.add(pattern)) {
500
+ // Some rules have just added to the ignore,
501
+ // making the behavior changed,
502
+ // so we need to re-initialize the result cache
503
+ this._initCache();
504
+ }
505
+ return this;
506
+ }
507
+ /**
508
+ * Legacy alias for add()
509
+ * @deprecated Use add() instead
510
+ */
511
+ addPattern(pattern) {
512
+ return this.add(pattern);
513
+ }
514
+ // @returns {TestResult}
515
+ _test(originalPath, cache, checkUnignored, slices) {
516
+ const path = originalPath
517
+ ? // Supports nullable path
518
+ (checkPath.convert?.(originalPath) ?? originalPath)
519
+ : null;
520
+ checkPath(path, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
521
+ if (!path) {
522
+ throw new Error("Path cannot be null or undefined");
523
+ }
524
+ return this._t(path, cache, checkUnignored, slices);
525
+ }
526
+ /**
527
+ * Check if a path is ignored (Git check-ignore compatible)
528
+ * @param path - The path to check
529
+ * @returns TestResult with ignored status and matched rule
530
+ */
531
+ checkIgnore(path) {
532
+ // If the path doest not end with a slash, `.ignores()` is much equivalent
533
+ // to `git check-ignore`
534
+ if (!REGEX_TEST_TRAILING_SLASH.test(path)) {
535
+ return this.test(path);
536
+ }
537
+ const slices = path.split(SLASH).filter(Boolean);
538
+ slices.pop();
539
+ if (slices.length) {
540
+ const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
541
+ if (parent.ignored) {
542
+ return parent;
543
+ }
544
+ }
545
+ return this._rules.test(path, false, MODE_CHECK_IGNORE);
546
+ }
547
+ _t(
548
+ // The path to be tested
549
+ path,
550
+ // The cache for the result of a certain checking
551
+ cache,
552
+ // Whether should check if the path is unignored
553
+ checkUnignored,
554
+ // The path slices
555
+ slices) {
556
+ if (path in cache) {
557
+ return cache[path];
558
+ }
559
+ let pathSlices = slices;
560
+ if (!pathSlices) {
561
+ // path/to/a.js
562
+ // ['path', 'to', 'a.js']
563
+ pathSlices = path.split(SLASH).filter(Boolean);
564
+ }
565
+ pathSlices.pop();
566
+ // If the path has no parent directory, just test it
567
+ if (!pathSlices.length) {
568
+ cache[path] = this._rules.test(path, checkUnignored, MODE_IGNORE);
569
+ return cache[path];
570
+ }
571
+ const parent = this._t(pathSlices.join(SLASH) + SLASH, cache, checkUnignored, pathSlices);
572
+ // If the path contains a parent directory, check the parent first
573
+ cache[path] = parent.ignored
574
+ ? // > It is not possible to re-include a file if a parent directory of
575
+ // > that file is excluded.
576
+ parent
577
+ : this._rules.test(path, checkUnignored, MODE_IGNORE);
578
+ return cache[path];
579
+ }
580
+ /**
581
+ * Check if a path is ignored
582
+ * @param path - The path to check
583
+ * @returns True if the path is ignored
584
+ */
585
+ ignores(path) {
586
+ return this._test(path, this._ignoreCache, false).ignored;
587
+ }
588
+ /**
589
+ * Create a filter function that returns true for non-ignored paths
590
+ * @returns Filter function
591
+ */
592
+ createFilter() {
593
+ return (path) => !this.ignores(path);
594
+ }
595
+ /**
596
+ * Filter an array of paths, returning only non-ignored paths
597
+ * @param paths - Paths to filter
598
+ * @returns Array of non-ignored paths
599
+ */
600
+ filter(paths) {
601
+ return makeArray(paths).filter(this.createFilter());
602
+ }
603
+ /**
604
+ * Test if a path is ignored
605
+ * @param path - The path to test
606
+ * @returns TestResult with ignored status and matched rule
607
+ */
608
+ test(path) {
609
+ return this._test(path, this._testCache, true);
610
+ }
611
+ /**
612
+ * Compile a pattern to a regular expression
613
+ * @param pattern - The pattern to compile
614
+ * @returns Compiled regular expression
615
+ */
616
+ compile(pattern) {
617
+ // Create a temporary rule to get the compiled regex
618
+ const tempRule = createRule({ pattern }, this._rules.ignoreCase);
619
+ return tempRule.regex;
620
+ }
621
+ }
622
+ const factory = (options) => new Ignore(options);
623
+ const setupWindows = () => {
624
+ /* eslint no-control-regex: "off" */
625
+ const makePosix = (str) => /^\\\?\\/.test(str) || /["<>|]+/u.test(str)
626
+ ? str
627
+ : str.replace(/\\+/g, "/"); // Collapse multiple backslashes
628
+ checkPath.convert = makePosix;
629
+ // 'C:\\foo' <- 'C:\\foo' has been converted to 'C:/'
630
+ // 'd:\\foo'
631
+ const RegexTestWindowsPathAbsolute = /^[a-z]:\//i;
632
+ checkPath.isNotRelative = (path) => RegexTestWindowsPathAbsolute.test(path) || isNotRelative(path);
633
+ };
634
+ // Windows
635
+ // --------------------------------------------------------------
636
+ if (
637
+ // Detect `process` so that it can run in browsers.
638
+ typeof process !== "undefined" &&
639
+ process.platform === "win32") {
640
+ setupWindows();
641
+ }
642
+ // Export the factory function as default
643
+ export default factory;
644
+ // Although it is an anti-pattern,
645
+ // it is still widely misused by a lot of libraries in github
646
+ // Ref: https://github.com/search?q=ignore.default%28%29&type=code
647
+ factory.default = factory;
648
+ // For testing purposes
649
+ factory[Symbol.for("setupWindows")] = setupWindows;
@@ -14,7 +14,7 @@ interface ExecuteOptions {
14
14
  /** Maximum buffer size in bytes (defaults to 1MB) */
15
15
  maxBuffer?: number;
16
16
  }
17
- export interface ExecuteResult {
17
+ interface ExecuteResult {
18
18
  /** Standard output from the command */
19
19
  stdout: string;
20
20
  /** Standard error from the command */
@@ -24,7 +24,7 @@ export interface ExecuteResult {
24
24
  /** The signal that terminated the process, if any */
25
25
  signal?: NodeJS.Signals;
26
26
  }
27
- export type ParseResult = {
27
+ type ParseResult = {
28
28
  ok: true;
29
29
  argv: [string, ...string[]];
30
30
  } | {
@@ -42,3 +42,4 @@ export declare function parseArgv(input: string): ParseResult;
42
42
  */
43
43
  export declare function executeCommand(command: string | [string, ...string[]], options?: ExecuteOptions): Promise<ExecuteResult>;
44
44
  export {};
45
+ //# sourceMappingURL=process.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process.d.ts","sourceRoot":"","sources":["../../source/utils/process.ts"],"names":[],"mappings":"AAOA,UAAU,cAAc;IACtB,2DAA2D;IAC3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,sDAAsD;IACtD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mGAAmG;IACnG,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,aAAa;IACrB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC;CACzB;AAED,KAAK,WAAW,GACZ;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAA;CAAE,GACzC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAGjC,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CA2EpD;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,aAAa,CAAC,CAqGxB"}