@macintacos/caret 0.14.0 → 1.0.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 (112) hide show
  1. package/.claude-plugin/plugin.json +9 -2
  2. package/README.md +48 -24
  3. package/bin/caret-launcher +208 -0
  4. package/commands/demo.md +11 -10
  5. package/dist/cli.js +49415 -27743
  6. package/hooks/hooks.json +16 -0
  7. package/opencode/caret.plugin.ts +173 -277
  8. package/opencode/commands/demo.md +9 -20
  9. package/opencode/index.ts +1 -2
  10. package/opencode/review-bridge.ts +241 -0
  11. package/package.json +9 -6
  12. package/templates/demo.md +89 -0
  13. package/ui/dist/assets/{angular-html-C0XElF0f.js → angular-html-BrP7X_fT.js} +1 -1
  14. package/ui/dist/assets/{angular-ts-BVnV1Yg5.js → angular-ts-CWSXPJ8_.js} +1 -1
  15. package/ui/dist/assets/{apl-BFyMAB9c.js → apl-DcDu9VfL.js} +1 -1
  16. package/ui/dist/assets/{astro-DAtaAFYq.js → astro-ZWhUFE02.js} +1 -1
  17. package/ui/dist/assets/{blade-BoZH76v_.js → blade-Bnfid1aX.js} +1 -1
  18. package/ui/dist/assets/{c-DyRawzd0.js → c-DGhlaWFa.js} +1 -1
  19. package/ui/dist/assets/{chapel-CAaCMdek.js → chapel-B80nA-Wv.js} +1 -1
  20. package/ui/dist/assets/{cobol-BjXiLsat.js → cobol-BxPmMgGq.js} +1 -1
  21. package/ui/dist/assets/{coffee-DvjcTlIE.js → coffee-qvFLvdPC.js} +1 -1
  22. package/ui/dist/assets/{cpp-sRP7rZGr.js → cpp-BGBu9Yb6.js} +1 -1
  23. package/ui/dist/assets/{crystal-CaRkbKnA.js → crystal-CV45eR73.js} +1 -1
  24. package/ui/dist/assets/{css-Igh3vvbt.js → css-CBPwQP3-.js} +1 -1
  25. package/ui/dist/assets/{dist-B5Dwvt_o.js → dist-1bUsa9So.js} +1 -1
  26. package/ui/dist/assets/dist-418qtW5O.js +2 -0
  27. package/ui/dist/assets/dist-BafAgSat.js +1 -0
  28. package/ui/dist/assets/{dist-CBxRdWpx.js → dist-BubrR0xG.js} +1 -1
  29. package/ui/dist/assets/{dist-DHAfbOzU.js → dist-CfuU_6ln.js} +1 -1
  30. package/ui/dist/assets/{dist-CF48ImGm.js → dist-Cj-JdNZd.js} +1 -1
  31. package/ui/dist/assets/{dist-CGl7bSLs.js → dist-CjIRqXSt.js} +1 -1
  32. package/ui/dist/assets/{dist-D4FUs8dC.js → dist-CpcSX-YP.js} +1 -1
  33. package/ui/dist/assets/{dist-C_lXyw3s.js → dist-D0Ats_4w.js} +1 -1
  34. package/ui/dist/assets/dist-DOswrDst.js +12 -0
  35. package/ui/dist/assets/{dist-CF4FIhxu.js → dist-DWzXdmaf.js} +1 -1
  36. package/ui/dist/assets/{dist-5Bv2mYWj.js → dist-DXn_f-MA.js} +1 -1
  37. package/ui/dist/assets/{dist-lE2sJQyW.js → dist-Dfm7Znx4.js} +1 -1
  38. package/ui/dist/assets/{dist-BkB3Dkvt.js → dist-Dj96YS5k.js} +1 -1
  39. package/ui/dist/assets/{dist-CZeI5UV9.js → dist-Dz8bokki.js} +1 -1
  40. package/ui/dist/assets/{dist-D_g9f9rz.js → dist-Lc2Es7Pl.js} +1 -1
  41. package/ui/dist/assets/{dist-Dt1D8SWK.js → dist-TxQM6vOw.js} +1 -1
  42. package/ui/dist/assets/{dist-CYIXdHF6.js → dist-cV3QBg-W.js} +1 -1
  43. package/ui/dist/assets/{edge-CvHTOXgI.js → edge-Co6ItTYI.js} +1 -1
  44. package/ui/dist/assets/{elixir-CtokNUaA.js → elixir-0YZEZ0gv.js} +1 -1
  45. package/ui/dist/assets/{elm-B34p-CC5.js → elm-BkRJOygl.js} +1 -1
  46. package/ui/dist/assets/{erb-FjaGN5LV.js → erb-BI2P49U3.js} +1 -1
  47. package/ui/dist/assets/{git-rebase-BFUCuD7O.js → git-rebase-Bq5iIXzt.js} +1 -1
  48. package/ui/dist/assets/{glimmer-js-CRs6sgzF.js → glimmer-js-BbOUbDIt.js} +1 -1
  49. package/ui/dist/assets/{glimmer-ts-Bkt0v-q2.js → glimmer-ts-CNnsk0yJ.js} +1 -1
  50. package/ui/dist/assets/{glsl-Ckh3d22M.js → glsl-BGnMm0dJ.js} +1 -1
  51. package/ui/dist/assets/{graphql-IqxoIj3x.js → graphql-7Z7p0nC9.js} +1 -1
  52. package/ui/dist/assets/{hack-DG1p8zpS.js → hack-DqHfN4B0.js} +1 -1
  53. package/ui/dist/assets/{haml-DA2jQcOV.js → haml-3nZzM1j8.js} +1 -1
  54. package/ui/dist/assets/{handlebars-CqT0epoo.js → handlebars-D76GLv5_.js} +1 -1
  55. package/ui/dist/assets/{html-CoTd-Axz.js → html-KRo6nO5U.js} +1 -1
  56. package/ui/dist/assets/{html-derivative-DDt5A1xL.js → html-derivative-45dsHZ7G.js} +1 -1
  57. package/ui/dist/assets/{http-TEp9u8BR.js → http-Cd6yAfd3.js} +1 -1
  58. package/ui/dist/assets/{hurl-OLD-GtJJ.js → hurl-DMRd-22O.js} +1 -1
  59. package/ui/dist/assets/index-CAl4rX7_.css +1 -0
  60. package/ui/dist/assets/{index-BucWCjoT.js → index-DqZ7qZxG.js} +367 -318
  61. package/ui/dist/assets/{java-DYZ_BnxQ.js → java-C5BRRLzP.js} +1 -1
  62. package/ui/dist/assets/{javascript-B4vvB79r.js → javascript-BEwOFxBm.js} +1 -1
  63. package/ui/dist/assets/{jinja-BTulBbvB.js → jinja-DC6SxQM2.js} +1 -1
  64. package/ui/dist/assets/{jison-CDVJmcGj.js → jison-BpM_G12u.js} +1 -1
  65. package/ui/dist/assets/{json-DahQZwqh.js → json-DhXVH33S.js} +1 -1
  66. package/ui/dist/assets/{jsx-Dzcw0XhS.js → jsx-QIa_kGnJ.js} +1 -1
  67. package/ui/dist/assets/{julia-BB_aSeOr.js → julia-BuS1ndKd.js} +1 -1
  68. package/ui/dist/assets/{just-C3IsNIar.js → just-Dms5nmY6.js} +1 -1
  69. package/ui/dist/assets/{latex-D7dYt9yW.js → latex-d0FSRalE.js} +1 -1
  70. package/ui/dist/assets/{liquid-CO9g2vFd.js → liquid-Bq_YWguE.js} +1 -1
  71. package/ui/dist/assets/{lua-D6OK3PTP.js → lua-CqusOKbI.js} +1 -1
  72. package/ui/dist/assets/{marko-YPWiYUQ_.js → marko-CfvdDxZz.js} +1 -1
  73. package/ui/dist/assets/{mdc-DoQ9fqeC.js → mdc-B_vZdcRe.js} +1 -1
  74. package/ui/dist/assets/{nginx-BuX_dG5x.js → nginx-YhyPrYEc.js} +1 -1
  75. package/ui/dist/assets/{nim-oEF2CEaX.js → nim-UGiA-q4U.js} +1 -1
  76. package/ui/dist/assets/{org-C1kwr3b8.js → org-BWLiCWoV.js} +1 -1
  77. package/ui/dist/assets/{perl-CzZcVIM9.js → perl-CXeAyAx6.js} +1 -1
  78. package/ui/dist/assets/{php-C_i1TWmy.js → php-C0Y5OILf.js} +1 -1
  79. package/ui/dist/assets/{pug-Oz2JZVGZ.js → pug-pavIHhZT.js} +1 -1
  80. package/ui/dist/assets/{qml-DWZFG7aa.js → qml-CbMVL_Hw.js} +1 -1
  81. package/ui/dist/assets/{r-CKwXeGZ_.js → r-VbESC49D.js} +1 -1
  82. package/ui/dist/assets/{razor-DT1mg2x6.js → razor-B4zmReq6.js} +1 -1
  83. package/ui/dist/assets/{regexp-C2K6ptTb.js → regexp-CvzL3gAC.js} +1 -1
  84. package/ui/dist/assets/{rst-C5gmF0mo.js → rst-B0YBcjx2.js} +1 -1
  85. package/ui/dist/assets/{ruby-CrEJdgPT.js → ruby-BFx1yg1l.js} +1 -1
  86. package/ui/dist/assets/{sas-D1TGFNd_.js → sas-Bdz0EWxy.js} +1 -1
  87. package/ui/dist/assets/{scss-DBO_Sp1C.js → scss-Ar5qG57q.js} +1 -1
  88. package/ui/dist/assets/{shellscript-QIWVo1P5.js → shellscript-BxZn-g_C.js} +1 -1
  89. package/ui/dist/assets/{shellsession-iBMCyJwd.js → shellsession-DdGjCUDJ.js} +1 -1
  90. package/ui/dist/assets/{soy-NHBvJjBh.js → soy-DNbG_b-4.js} +1 -1
  91. package/ui/dist/assets/{sql-Yf21hpnW.js → sql-BbO6oYzq.js} +1 -1
  92. package/ui/dist/assets/{stata-CluZWHbV.js → stata-CrT9A-Oi.js} +1 -1
  93. package/ui/dist/assets/{surrealql-Bu2dU1Qj.js → surrealql-_tFV7pCn.js} +1 -1
  94. package/ui/dist/assets/{svelte-Owb3qG7g.js → svelte-ZdvR-T2J.js} +1 -1
  95. package/ui/dist/assets/{templ-DScnsiaP.js → templ-CpOqX9Rk.js} +1 -1
  96. package/ui/dist/assets/{tex-DvCQ8DJI.js → tex-BnYgu1Tm.js} +1 -1
  97. package/ui/dist/assets/{ts-tags-Fh6nOEbM.js → ts-tags-CII1fKoY.js} +1 -1
  98. package/ui/dist/assets/{tsx-C_2AyD6m.js → tsx-CPIX6Zti.js} +1 -1
  99. package/ui/dist/assets/{twig-DjT0rOpv.js → twig-Cpr1_Fdx.js} +1 -1
  100. package/ui/dist/assets/{typescript-NDIZTg4J.js → typescript-CS1A4fih.js} +1 -1
  101. package/ui/dist/assets/{typst-DNJZJFvq.js → typst-BEc_7GFB.js} +1 -1
  102. package/ui/dist/assets/{vue-BTZXwXJ_.js → vue-DLe2p-nw.js} +1 -1
  103. package/ui/dist/assets/{vue-html-CBhLp-FO.js → vue-html-CBsH80UM.js} +1 -1
  104. package/ui/dist/assets/{vue-vine-KGJI1qvi.js → vue-vine-C6KcK89Z.js} +1 -1
  105. package/ui/dist/assets/{xml-CeV6vl7T.js → xml-CMmb8ycU.js} +1 -1
  106. package/ui/dist/assets/{xsl-CibkluSG.js → xsl-vCAAt3o3.js} +1 -1
  107. package/ui/dist/assets/{yaml-D89KUdIt.js → yaml-Be7JvL54.js} +1 -1
  108. package/ui/dist/index.html +3 -3
  109. package/ui/dist/assets/dist-BdaKUV8X.js +0 -2
  110. package/ui/dist/assets/dist-CiBs4R_k.js +0 -12
  111. package/ui/dist/assets/dist-YE9up3VR.js +0 -1
  112. package/ui/dist/assets/index-Djrj2rps.css +0 -1
@@ -1,29 +1,18 @@
1
1
  ---
2
- description: Demo caret by submitting a short fake plan to caret's review UI
2
+ description: Demo caret by submitting a short plan about this repo to caret's review UI
3
3
  agent: plan
4
4
  ---
5
5
 
6
- This is a caret demo. Do **not** do any real work, research, or file edits — the only goal
7
- is to exercise caret's plan-review flow.
8
-
9
- Call the `caret_review_plan` tool with the following short, deliberately-fake plan as the
10
- `plan` argument (verbatim):
11
-
12
- ```markdown
13
- # Demo plan
14
-
15
- ## Context
16
- Exercise caret's review flow end to end — nothing here is real work.
17
-
18
- ## Steps
19
- 1. Pretend to add a `GET /status` endpoint returning `{ ok: true }`.
20
- 2. Pretend to register it before the rate limiter.
21
- 3. Pretend to add a unit test asserting 200 and the JSON body.
22
- ```
6
+ The demo template is at the end of this command. Follow its leading HTML comment exactly
7
+ to fill the slots, then call the `caret_review_plan` tool with everything after that
8
+ comment as the `plan` argument. Do **no** other research and edit **no** file — this is
9
+ only to exercise caret's plan-review flow.
23
10
 
24
11
  caret opens the plan in a local browser UI for inline review. When the user approves or
25
12
  requests changes, the decision returns as the tool result:
26
13
 
27
14
  - **Approved** → acknowledge that caret approved the demo plan, and stop.
28
- - **Changes requested** → revise the fake plan per the feedback and call
29
- `caret_review_plan` again (caret captures it as a new version).
15
+ - **Changes requested** → revise the plan accordingly, keeping it about the same size, and
16
+ call `caret_review_plan` again (caret captures it as a new version).
17
+
18
+ __CARET_DEMO_TEMPLATE__
package/opencode/index.ts CHANGED
@@ -3,6 +3,5 @@
3
3
  // (Object.values) and rejects the whole module on the FIRST export that isn't a
4
4
  // Plugin — and caret.plugin.ts additionally exports test helpers/constants for
5
5
  // test/opencode/. So this file re-exports ONLY the default plugin, leaving a module
6
- // namespace of exactly `{ default }`. (This is why the array path does not need the
7
- // deploy-time `stripNonDefaultExports` the retired file-deploy relied on.)
6
+ // namespace of exactly `{ default }`.
8
7
  export { default } from "./caret.plugin.ts";
@@ -0,0 +1,241 @@
1
+ // The bridge from an agent's plan-review tool to `caret review`, shared by the OpenCode
2
+ // plugin and `caret mcp`: build caret's review envelope, spawn the review, and turn the
3
+ // flat decision it prints into the tool's result text. It sits in opencode/ because that
4
+ // directory ships as unbundled source the plugin can reach only by relative import, and
5
+ // it imports node builtins only, so bundling it into the CLI pulls in no plugin SDK. It
6
+ // also holds PLAN_TITLE_INSTRUCTION, since this is the one module the plugin, `caret mcp`
7
+ // and `caret steer` can all import.
8
+
9
+ import { spawn } from "node:child_process";
10
+
11
+ export type CaretDecision =
12
+ | { behavior: "allow"; feedback?: string }
13
+ | { behavior: "deny"; feedback: string };
14
+
15
+ /** Asks the model to open its plan on a `#` heading, which deriveTitle
16
+ * (src/review/threading.ts) prefers as the review title — keep the two in sync. Sent by
17
+ * the OpenCode planning steer, the MCP review_plan description, and `caret steer`. */
18
+ export const PLAN_TITLE_INSTRUCTION =
19
+ "Start the plan with a single `# <title>` heading that names the change in a few words; caret shows it as the plan's title in the review UI.";
20
+
21
+ /** Build the caret review envelope `caret review` parses.
22
+ * Mirrors the snake_case session/cwd shape the opencode adapter's parseHookInput
23
+ * reads — both ends are caret-owned. */
24
+ export function buildEnvelope(
25
+ plan: string,
26
+ ctx: { sessionID?: string; directory?: string; planFilePath?: string },
27
+ ): string {
28
+ return JSON.stringify({
29
+ session_id: ctx.sessionID,
30
+ cwd: ctx.directory,
31
+ tool_input: { plan, planFilePath: ctx.planFilePath },
32
+ });
33
+ }
34
+
35
+ /** Parse the single decision JSON line `caret review` prints on stdout. Fail-safe:
36
+ * anything unrecognized or unparseable becomes a deny — shipping an unreviewed
37
+ * plan is the one outcome caret never allows. */
38
+ export function parseDecision(stdout: string): CaretDecision {
39
+ const line =
40
+ stdout
41
+ .trim()
42
+ .split("\n")
43
+ .map((s) => s.trim())
44
+ .filter(Boolean)
45
+ .at(-1) ?? "";
46
+ try {
47
+ const parsed = JSON.parse(line) as { behavior?: unknown; feedback?: unknown };
48
+ if (parsed.behavior === "allow") {
49
+ // Reviewer notes (EXC-791) ride the allow; surface them to the agent below.
50
+ const notes = typeof parsed.feedback === "string" ? parsed.feedback.trim() : "";
51
+ return notes ? { behavior: "allow", feedback: notes } : { behavior: "allow" };
52
+ }
53
+ if (parsed.behavior === "deny") {
54
+ return {
55
+ behavior: "deny",
56
+ feedback: typeof parsed.feedback === "string" ? parsed.feedback : "Plan changes requested.",
57
+ };
58
+ }
59
+ return failsafeDeny("caret: unrecognized review decision — denying to fail safe.");
60
+ } catch {
61
+ return failsafeDeny("caret: could not parse the review decision — denying to fail safe.");
62
+ }
63
+ }
64
+
65
+ function failsafeDeny(feedback: string): CaretDecision {
66
+ return { behavior: "deny", feedback };
67
+ }
68
+
69
+ /** Tool result returned to the agent on approval. Optional reviewer notes
70
+ * (EXC-791) ride along — the plan is already approved, so no re-planning round. Without
71
+ * `planFilePath` the agent holds the plan only in its own tool args, so this tool result
72
+ * is the notes' sole delivery channel; with one, `caret review` has already appended any
73
+ * notes to that file (best-effort). */
74
+ export function approvedMessage(notes?: string, planFilePath?: string): string {
75
+ const trimmed = notes?.trim();
76
+ if (!trimmed) {
77
+ const base = "caret: the user APPROVED this plan. Proceed with the implementation as planned.";
78
+ const saved = planFilePath
79
+ ? [`The approved plan is already saved at ${planFilePath}, so do not write it again.`]
80
+ : [];
81
+ return [base, ...saved].join("\n");
82
+ }
83
+ const saved = planFilePath
84
+ ? [
85
+ `The approved plan, with these notes appended, is already saved at ${planFilePath}, so do not write it again.`,
86
+ ]
87
+ : [];
88
+ return [
89
+ "caret: the user APPROVED this plan.",
90
+ "",
91
+ "They added notes to fold into your work — incorporate them as you implement; no need to re-plan:",
92
+ "",
93
+ "## Notes from the user",
94
+ "",
95
+ trimmed,
96
+ "",
97
+ "Proceed with the implementation.",
98
+ ...saved,
99
+ ].join("\n");
100
+ }
101
+
102
+ /** Tool result returned to the agent on a change request: the reviewer feedback
103
+ * and a resubmit instruction. The plan itself is NOT echoed — the agent already has
104
+ * it in the args of its own call to `tool`, or in the file at `planFilePath`. A feedback
105
+ * line reference indexes the plan version caret stored, and the abbreviated quote paired
106
+ * with it is what the agent matches against its own text. That stored version is
107
+ * rumdl-reflowed to 90 columns at ingest (src/plan/markdown.ts). With a plan file, caret
108
+ * mirrors that canonical text onto it, so once the agent re-reads the file the numbers
109
+ * usually line up (the write-back is best-effort); without one, they need not line up with
110
+ * the agent's own copy at all.
111
+ * (Pinned across its three surfaces by
112
+ * test/structure/line-anchor-claim.test.ts.) */
113
+ export function deniedMessage(feedback: string, tool: string, planFilePath?: string): string {
114
+ const revise = planFilePath
115
+ ? [
116
+ `Re-read the plan file at ${planFilePath} before editing it: caret may have rewritten it in its reformatted shape, so line breaks may have moved, and its line numbers should now match the feedback above.`,
117
+ `Revise it with targeted edits rather than rewriting the whole plan, then call \`${tool}\` again with the same file.`,
118
+ ]
119
+ : [`Revise the plan accordingly, then call \`${tool}\` again with the updated plan.`];
120
+ return [
121
+ "caret: the user requested CHANGES to this plan.",
122
+ "",
123
+ "Feedback:",
124
+ feedback,
125
+ "",
126
+ ...revise,
127
+ `Do not implement the plan until a call to \`${tool}\` returns an approval.`,
128
+ ].join("\n");
129
+ }
130
+
131
+ /** The tool result an agent reads for `decision`; `tool` is the name to call again on a
132
+ * change request. */
133
+ export function decisionText(decision: CaretDecision, tool: string, planFilePath?: string): string {
134
+ return decision.behavior === "allow"
135
+ ? approvedMessage(decision.feedback, planFilePath)
136
+ : deniedMessage(decision.feedback, tool, planFilePath);
137
+ }
138
+
139
+ /** Extract caret's review URL from the child's stderr text. Core writes
140
+ * `caret: review this plan at <url>\n` (src/review/orchestrate.ts); both ends are caret-owned,
141
+ * so this regex is coupled to that one line by design. The trailing `\s` match
142
+ * means a stderr chunk cut off mid-URL (before the newline) yields nothing rather
143
+ * than a truncated URL — the match only fires once the whole line has arrived. */
144
+ export function parseReviewUrl(stderr: string): string | undefined {
145
+ return stderr.match(/caret: review this plan at (\S+)\s/)?.[1];
146
+ }
147
+
148
+ /** Runs `command` (a `caret review` argv), returning its captured stdout. Injected so
149
+ * the review tool is unit-testable without spawning a real process. `onStderr` streams
150
+ * the child's stderr chunks as they arrive, so the caller can surface the review URL
151
+ * the core prints there while the review is still pending. An aborted `signal` must
152
+ * terminate the child and settle (reject) promptly: `caret mcp` refuses a new call until
153
+ * the aborted one settles. */
154
+ export type SpawnRunner = (
155
+ command: string[],
156
+ env: Record<string, string | undefined>,
157
+ stdin: string,
158
+ onStderr?: (chunk: string) => void,
159
+ signal?: AbortSignal,
160
+ ) => Promise<{ stdout: string; exitCode: number }>;
161
+
162
+ /** Spawn `command` with the review envelope on stdin and CARET_AGENT set to `agent`,
163
+ * then parse its decision line. Any spawn failure fails safe to a deny. `onUrl`, if
164
+ * given, fires once with the review URL the moment core prints it on stderr, so a caller
165
+ * can surface it while the review is pending. */
166
+ export async function runReviewViaCaret(
167
+ envelope: string,
168
+ opts: {
169
+ command: string[];
170
+ agent: string;
171
+ run: SpawnRunner;
172
+ onUrl?: (url: string) => void;
173
+ signal?: AbortSignal;
174
+ },
175
+ ): Promise<CaretDecision> {
176
+ try {
177
+ // Accumulate stderr and report the URL once — the line may arrive split
178
+ // across chunks, and only the first occurrence matters.
179
+ const { onUrl } = opts;
180
+ let stderrBuf = "";
181
+ let urlSent = false;
182
+ const onStderr = onUrl
183
+ ? (chunk: string) => {
184
+ if (urlSent) return;
185
+ stderrBuf += chunk;
186
+ const url = parseReviewUrl(stderrBuf);
187
+ if (url) {
188
+ urlSent = true;
189
+ // Best-effort: surfacing the URL must never crash or fail-safe-deny
190
+ // the review. This fires on the stderr `data` event while we're
191
+ // suspended at `await opts.run(...)`, so a throw here would escape the
192
+ // try/catch below as an uncaughtException rather than a deny.
193
+ try {
194
+ onUrl(url);
195
+ } catch {
196
+ // swallow — the review decision is what matters.
197
+ }
198
+ }
199
+ }
200
+ : undefined;
201
+ const { stdout } = await opts.run(
202
+ opts.command,
203
+ { ...process.env, CARET_AGENT: opts.agent },
204
+ envelope,
205
+ onStderr,
206
+ opts.signal,
207
+ );
208
+ return parseDecision(stdout);
209
+ } catch (e) {
210
+ const message = e instanceof Error ? e.message : String(e);
211
+ return failsafeDeny(`caret: review failed to run (${message}) — denying to fail safe.`);
212
+ }
213
+ }
214
+
215
+ /** Production runner: spawn `command[0]` with the rest of the argv. stderr is
216
+ * PIPED (not inherited) and streamed to `onStderr`: in OpenCode, inheriting it leaked
217
+ * core's "review this plan at <url>" line straight into the TUI scrollback, where the
218
+ * renderer never owns it and it lingered after the decision (EXC-691). The child logs
219
+ * diagnostics to caret.log, so dropping the rest of stderr loses nothing. An aborted
220
+ * `signal` SIGTERMs the child, which `caret review` answers by expiring its review; the
221
+ * returned promise rejects with an AbortError. */
222
+ export const nodeSpawnRunner: SpawnRunner = (command, env, stdin, onStderr, signal) =>
223
+ new Promise((resolve, reject) => {
224
+ const child = spawn(command[0] as string, command.slice(1), {
225
+ env,
226
+ signal,
227
+ stdio: ["pipe", "pipe", "pipe"],
228
+ });
229
+ let stdout = "";
230
+ child.stdout.on("data", (chunk) => {
231
+ stdout += chunk.toString();
232
+ });
233
+ child.stderr.on("data", (chunk) => onStderr?.(chunk.toString()));
234
+ child.on("error", reject);
235
+ child.on("close", (code) => resolve({ stdout, exitCode: code ?? 0 }));
236
+ // A child killed before reading stdin EPIPEs the write; unhandled, that crashes the
237
+ // host. The 'error'/'close' handlers above already settle.
238
+ child.stdin.on("error", () => {});
239
+ child.stdin.write(stdin);
240
+ child.stdin.end();
241
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@macintacos/caret",
3
- "version": "0.14.0",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A Claude Code plugin that replaces the terminal plan-approval prompt with a local web UI for inline review, annotation, and approval.",
@@ -23,13 +23,15 @@
23
23
  "dist/",
24
24
  "ui/dist/",
25
25
  "bin/caret",
26
+ "bin/caret-launcher",
26
27
  "hooks/",
27
28
  "commands/",
28
29
  "opencode/",
30
+ "templates/",
29
31
  ".claude-plugin/plugin.json"
30
32
  ],
31
33
  "scripts": {
32
- "test": "bun test --conditions browser --timeout 30000",
34
+ "test": "bun test --conditions browser --parallel --timeout 35000",
33
35
  "lint": "mise run lint",
34
36
  "format": "mise run format",
35
37
  "build": "mise run build"
@@ -48,12 +50,13 @@
48
50
  "@internationalized/date": "^3.12.2",
49
51
  "@laststance/tailwind-suggest-canonical-classes": "^0.1.1",
50
52
  "@lezer/highlight": "^1.2.3",
51
- "@pierre/diffs": "1.3.5",
53
+ "@modelcontextprotocol/sdk": "^1.30.0",
54
+ "@pierre/diffs": "1.3.6",
52
55
  "@pierre/trees": "1.0.0-beta.6",
53
56
  "@playwright/test": "^1.62.1",
54
57
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
55
58
  "@tailwindcss/vite": "^4.3.3",
56
- "@types/bun": "^1.3.14",
59
+ "@types/bun": "^1.4.0",
57
60
  "@types/semver": "^7.7.1",
58
61
  "@typescript/native": "npm:typescript@^7.0.2",
59
62
  "bits-ui": "^2.18.1",
@@ -85,11 +88,11 @@
85
88
  },
86
89
  "pinned": {
87
90
  "//": "bun.lock is committed, so it is what pins every dependency exactly; a range above is the upgrade policy, not the resolved version. A bare version therefore means `bun update` must never move this one on its own, and these entries are the whole set. Everything else takes a range deliberately — zod and the TOML parser reading the config.toml trust boundary included: the lockfile already holds them, so a range costs no reproducibility and keeps them visible to an upgrade sweep. test/structure/exact-pin.test.ts fails on an exact pin with no reason, and on a reason that outlived its pin.",
88
- "@pierre/diffs": "Version-coupled to shiki through the resolve.alias block in ui/vite.config.ts, where an alias that stops matching grows the bundle by ~600 KB silently rather than failing anything. The pair moves as one reviewed bump, never on a sweep.",
91
+ "@pierre/diffs": "Version-coupled to shiki through the resolve.alias block in ui/vite.config.ts, where an alias that stops matching grows the bundle by ~600 KB. That growth is no longer silent — the caret-bundle-budget plugin fails `vite build` against the recorded budget in ui/bundle-budget.ts — but the gate reports the size, not the cause, so the pair still moves as one reviewed bump, never on a sweep.",
89
92
  "@pierre/trees": "No stable release exists — the `latest` and `beta` dist-tags both point at the same prerelease. Exact rather than caret because a prerelease under a caret range is still a caret range: `^1.0.0-beta.6` expands to `>=1.0.0-beta.6 <2.0.0-0`, so a sweep would take a stable 1.0.0 the day it lands, and beta-to-stable is the jump that wants a human."
90
93
  },
91
94
  "held": {
92
95
  "//": "A dependency whose range deliberately stops below the current major, with the evidence for that and the condition that lifts it. Distinct from `pinned` above, which is about exact versions: an entry here names a range that is doing its job by excluding something. Unlike a pin, a held range is self-describing to `bun outdated` — it shows up as a major behind — so this block answers the question it raises rather than surfacing a decision nothing else would show.",
93
- "typescript": "NOT a hold on adoption — TypeScript 7 IS what type-checks this tree (EXC-1089). It arrives as the `@typescript/native` alias above; hk.pkl runs the backend program through node_modules/@typescript/native/bin/tsc and the UI program through `svelte-check --tsgo`, and both were proved live against injected type errors rather than trusted because they exited 0. This range stops at ^6 because svelte-check requires BOTH majors installed: 4.7.5 hard-throws from bin/ts-version-check.js once `typescript` is major >= 7, and the recipe it throws is the arrangement used here verbatim — `typescript@~6 @typescript/native@npm:typescript@7`, plus --tsgo. Its README repeats it and dist/src/index.js resolves `@typescript/native` before `@typescript/native-preview`, so this is upstream's supported setup rather than a workaround. A second reason keeps 6.x honest even so: test/structure/e2e-conventions.test.ts and test/structure/tokenize-conventions.test.ts import the compiler API as a PARSING LIBRARY, and 7.x exports lib/version.cjs as `.` with the API behind ./unstable/* subpaths that offer no standalone parse (unstable/ast's createSourceFile is a factory over Statement[]; the only SourceFile producer is Program.getSourceFile). With 6.x installed those two files need no port, and `tsc` 7 type-checks them clean — the 50 errors EXC-1083 measured were never caret's code, only two files typed against a package whose `.` export had moved. What lifts this: a svelte-check release whose peerDependencies.typescript admits ^7 — but that clears only the first reason. Collapsing to a single `typescript@7` means dropping the alias, moving this range to ^7, AND porting those two suites off the compiler API in the same pass, or they break on `ts.ScriptTarget` being undefined. test/structure/typescript-arrangement.test.ts reds on exactly that widening, and also pins the tsc path, the --tsgo flag, and this entry's own existence, because losing any of them silently reverts the adoption. Full evidence: EXC-1089, and the trial in EXC-1083."
96
+ "typescript": "NOT a hold on adoption — TypeScript 7 IS what type-checks this tree (EXC-1089). It arrives as the `@typescript/native` alias above; hk.pkl runs the backend program through node_modules/@typescript/native/bin/tsc and the UI program through `svelte-check --tsgo`, and both were proved live against injected type errors rather than trusted because they exited 0. This range stops at ^6 because svelte-check requires BOTH majors installed: 4.7.6 hard-throws from bin/ts-version-check.js once `typescript` is major >= 7, and the recipe it throws is the arrangement used here verbatim — `typescript@~6 @typescript/native@npm:typescript@7`, plus --tsgo. Its README repeats it and dist/src/index.js resolves `@typescript/native` before `@typescript/native-preview`, so this is upstream's supported setup rather than a workaround. A second reason keeps 6.x honest even so: the test/structure/ suites that import `typescript` use its compiler API as a PARSING LIBRARY, and 7.x exports lib/version.cjs as `.` with the API behind ./unstable/* subpaths that offer no standalone parse (unstable/ast's createSourceFile is a factory over Statement[]; the only SourceFile producer is Program.getSourceFile). With 6.x installed those suites need no port, and `tsc` 7 type-checks them clean — the 50 errors EXC-1083 measured were never caret's code, only two files typed against a package whose `.` export had moved. What lifts this: a svelte-check release whose peerDependencies.typescript admits ^7 — but that clears only the first reason. Collapsing to a single `typescript@7` means dropping the alias, moving this range to ^7, AND porting those suites off the compiler API in the same pass, or they break on `ts.ScriptTarget` being undefined. test/structure/typescript-arrangement.test.ts reds on exactly that widening, and also pins the tsc path, the --tsgo flag, and this entry's own existence, because losing any of them silently reverts the adoption. Full evidence: EXC-1089, and the trial in EXC-1083."
94
97
  }
95
98
  }
@@ -0,0 +1,89 @@
1
+ <!--
2
+ caret demo template. Fill the slots listed below, then present everything after this
3
+ comment as the plan. Never include this comment.
4
+
5
+ Look at the working directory in exactly two ways: one non-recursive listing of its top
6
+ level, and one read of the first 40 lines of the file you pick for the first file slot. No
7
+ recursion, no content search, no other reads, no edits.
8
+
9
+ Skip hidden entries (a leading `.`), dependency and build output (`node_modules`, `vendor`,
10
+ `dist`, `build`, `out`, `target`, `coverage`, `__pycache__`), lockfiles, and binaries.
11
+ Prefer entries a reader recognizes: a README, a manifest, a source entry point.
12
+
13
+ Replace every occurrence of each placeholder:
14
+
15
+ - `path/to/folder/` → a top-level directory, keeping the trailing `/`
16
+ - `path/to/first-file` → a README or other prose doc if one exists, else any top-level
17
+ file
18
+ - `path/to/second-file` → a manifest or entry point, else any other top-level file
19
+ - `path/to/cited-file:1` → `<first file>:<n>`, where `n` is a non-blank line among the
20
+ lines you read
21
+
22
+ Each slot falls back on its own: a slot with no usable candidate keeps its placeholder and
23
+ the others still fill. With nothing usable at all, present the plan unchanged.
24
+ -->
25
+
26
+ # Add a getting-started guide
27
+
28
+ > **Try it:** comment on any line, or request changes. The agent revises the plan and
29
+ > caret keeps the revision as a new version.
30
+
31
+ ## Context
32
+
33
+ Someone new to this repository meets its top level first: `path/to/first-file`,
34
+ `path/to/second-file`, and the `path/to/folder/` folder. Nothing tells them which to open
35
+ first or how the pieces relate, so the first hour goes to guessing.
36
+
37
+ A short guide fixes that without touching any code. It walks the top level in the order a
38
+ newcomer needs it, and quotes real lines so every pointer lands on something that exists,
39
+ starting from `path/to/cited-file:1`.
40
+
41
+ ## Approach
42
+
43
+ Write one page, `GETTING_STARTED.md`, and link it from the top of
44
+ [the first file](path/to/first-file). Shape it the way
45
+ [Diátaxis](https://diataxis.fr/tutorials/) describes a tutorial: a single path from a
46
+ fresh clone to one small, visible result.
47
+
48
+ ### What the guide covers
49
+
50
+ Three stops, in the order a newcomer needs them:
51
+
52
+ | Stop | Path | What the reader learns |
53
+ | ---- | --------------------- | ----------------------------- |
54
+ | 1 | `path/to/first-file` | What the project is for |
55
+ | 2 | `path/to/second-file` | How it is configured or built |
56
+ | 3 | `path/to/folder/` | Where the real work lives |
57
+
58
+ ### How it is written
59
+
60
+ #### Tone
61
+
62
+ Second person, present tense, one idea per paragraph. Every path the guide names is one a
63
+ reader can open.
64
+
65
+ #### Commands
66
+
67
+ Each stop ends in a command the reader can run and check:
68
+
69
+ ```sh
70
+ git clone <this-repo> && cd <this-repo>
71
+ ls path/to/folder/
72
+ ```
73
+
74
+ ## Steps
75
+
76
+ 1. Draft `GETTING_STARTED.md` around the three stops in the table.
77
+ 2. Link it from near the top of `path/to/first-file`.
78
+ 3. Ask one newcomer to follow it cold, and note where they stall.
79
+ 4. Revisit the guide whenever the top level gains or loses an entry.
80
+
81
+ ## Verification
82
+
83
+ - Every path in the guide opens to the file or folder it names.
84
+ - A newcomer reaches the visible result in under fifteen minutes.
85
+
86
+ ## Risks
87
+
88
+ A guide drifts as the code moves. Keeping it to the top level, and citing lines instead of
89
+ copying them, keeps the drift small and easy to spot.
@@ -1 +1 @@
1
- import{s as e}from"./index-BucWCjoT.js";import{t}from"./html-CoTd-Axz.js";var n=[Object.freeze(JSON.parse('{"injectionSelector":"L:text.html -comment","name":"angular-expression","patterns":[{"include":"#ngExpression"}],"repository":{"arrayLiteral":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"booleanLiteral":{"patterns":[{"match":"(?<![$.])\\\\btrue\\\\b(?!\\\\$)","name":"constant.language.boolean.true.ts"},{"match":"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)","name":"constant.language.boolean.false.ts"}]},"expressionOperator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"entity.name.function.pipe.ng"}},"match":"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)"},{"match":"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)","name":"storage.type.ts"},{"match":"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)","name":"keyword.control.flow.ts"},{"match":"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)","name":"keyword.operator.expression.delete.ts"},{"match":"(?<![$.])\\\\bin\\\\b(?!\\\\$)","name":"keyword.operator.expression.in.ts"},{"match":"(?<![$.])\\\\bof\\\\b(?!\\\\$)","name":"keyword.operator.expression.of.ts"},{"match":"(?<![$.])\\\\bif\\\\b(?!\\\\$)","name":"keyword.control.if.ts"},{"match":"(?<![$.])\\\\belse\\\\b(?!\\\\$)","name":"keyword.control.else.ts"},{"match":"(?<![$.])\\\\bthen\\\\b(?!\\\\$)","name":"keyword.control.then.ts"},{"match":"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)","name":"keyword.operator.expression.instanceof.ts"},{"match":"(?<![$.])\\\\bnew\\\\b(?!\\\\$)","name":"keyword.operator.new.ts"},{"match":"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)","name":"keyword.operator.expression.void.ts"},{"begin":"(?<![$.])\\\\bas\\\\b(?!\\\\$)","beginCaptures":{"0":{"name":"storage.type.as.ts"}},"end":"(?=$|[]\\"\'),:;}])","patterns":[{"include":"#type"}]},{"match":"(?:\\\\*|(?<!\\\\()/|[-%+])=","name":"keyword.operator.assignment.compound.ts"},{"match":"(?:[\\\\&^]|<<|>>>??|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>?","name":"keyword.operator.bitwise.shift.ts"},{"match":"[!=]==?","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|[<>]","name":"keyword.operator.relational.ts"},{"match":"!|&&|\\\\?\\\\?|\\\\|\\\\|","name":"keyword.operator.logical.ts"},{"match":"[\\\\&^|~]","name":"keyword.operator.bitwise.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"[-%*+/]","name":"keyword.operator.arithmetic.ts"},{"captures":{"1":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])"},{"include":"#typeofOperator"}]},"functionCall":{"begin":"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","end":"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","patterns":[{"match":"\\\\?","name":"punctuation.accessor.ts"},{"match":"\\\\.","name":"punctuation.accessor.ts"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.ts"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},{"include":"#parenExpression"}]},"functionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.ts"}},"name":"meta.parameters.ts","patterns":[{"include":"#decorator"},{"include":"#parameterName"},{"include":"#variableInitializer"},{"match":",","name":"punctuation.separator.parameter.ts"}]},"identifiers":{"patterns":[{"match":"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))","name":"support.class.ts"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.object.property.ts"},"3":{"name":"variable.other.object.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"entity.name.function.ts"}},"match":"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"variable.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*([$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"constant.other.object.ts"},"2":{"name":"variable.other.object.ts"}},"match":"(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"match":"(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])","name":"constant.character.other"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"literal":{"name":"literal.ts","patterns":[{"include":"#numericLiteral"},{"include":"#booleanLiteral"},{"include":"#nullLiteral"},{"include":"#undefinedLiteral"},{"include":"#numericConstantLiteral"},{"include":"#arrayLiteral"},{"include":"#thisLiteral"}]},"ngExpression":{"name":"meta.expression.ng","patterns":[{"include":"#string"},{"include":"#literal"},{"include":"#ternaryExpression"},{"include":"#expressionOperator"},{"include":"#functionCall"},{"include":"#identifiers"},{"include":"#parenExpression"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"},{"include":"#punctuationAccessor"}]},"nullLiteral":{"match":"(?<![$.])\\\\bnull\\\\b(?!\\\\$)","name":"constant.language.null.ts"},"numericConstantLiteral":{"patterns":[{"match":"(?<![$.])\\\\bNaN\\\\b(?!\\\\$)","name":"constant.language.nan.ts"},{"match":"(?<![$.])\\\\bInfinity\\\\b(?!\\\\$)","name":"constant.language.infinity.ts"}]},"numericLiteral":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])\\\\h+\\\\b(?!\\\\$)","name":"constant.numeric.hex.ts"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]+\\\\b(?!\\\\$)","name":"constant.numeric.binary.ts"},{"match":"\\\\\\\\b(?<!\\\\$)0([Oo])?[0-7]+\\\\b(?!\\\\$)","name":"constant.numeric.octal.ts"},{"captures":{"0":{"name":"constant.numeric.decimal.ts"},"1":{"name":"meta.delimiter.decimal.period.ts"},"2":{"name":"meta.delimiter.decimal.period.ts"},"3":{"name":"meta.delimiter.decimal.period.ts"},"4":{"name":"meta.delimiter.decimal.period.ts"},"5":{"name":"meta.delimiter.decimal.period.ts"},"6":{"name":"meta.delimiter.decimal.period.ts"}},"match":"(?<!\\\\$)(?:\\\\b[0-9]+(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)[Ee][-+]?[0-9]+\\\\b|\\\\B(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)\\\\B|\\\\B(\\\\.)[0-9]+\\\\b|\\\\b[0-9]+\\\\b(?!\\\\.))(?!\\\\$)"}]},"parameterName":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)(?=\\\\s*(=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))|(:\\\\s*((<)|(\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)"}]},"parenExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"punctuationAccessor":{"match":"(?:\\\\?|!?)\\\\.","name":"punctuation.accessor.ts"},"punctuationComma":{"match":",","name":"punctuation.separator.comma.ts"},"punctuationSemicolon":{"match":";","name":"punctuation.terminator.statement.ts"},"qstringDouble":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\\")|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.double.ts","patterns":[{"include":"#stringCharacterEscape"}]},"qstringSingle":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\')|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.single.ts","patterns":[{"include":"#stringCharacterEscape"}]},"string":{"patterns":[{"include":"#qstringSingle"},{"include":"#qstringDouble"},{"include":"#templateLiteral"}]},"stringCharacterEscape":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)","name":"constant.character.escape.ts"},"templateLiteral":{"patterns":[{"include":"#templateLiteralCall"},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#templateLiteralSubstitutionElement"},{"include":"#stringCharacterEscape"}]}]},"templateLiteralCall":{"patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#typeArguments"}]},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#typeArguments"}]}]},"templateLiteralSubstitutionElement":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#ngExpression"}]},"ternaryExpression":{"begin":"(?!\\\\?\\\\.\\\\s*\\\\D)(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#ngExpression"}]},"thisLiteral":{"match":"(?<![$.])\\\\bthis\\\\b(?!\\\\$)","name":"variable.language.this.ts"},"type":{"name":"meta.type.ts","patterns":[{"include":"#string"},{"include":"#numericLiteral"},{"include":"#typeBuiltinLiterals"},{"include":"#typeTuple"},{"include":"#typeObject"},{"include":"#typeOperators"},{"include":"#typeFnTypeParameters"},{"include":"#typeParenOrFunctionParameters"},{"include":"#typeName"}]},"typeAnnotation":{"begin":":","beginCaptures":{"0":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=$|[]),;}]|//|\\")|(?==[^>])|(?<=[]$)>_}[:alpha:]])\\\\s*(?=\\\\{)","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},"typeArguments":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#typeArgumentsBody"}]},"typeArgumentsBody":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(_)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))"},{"include":"#type"},{"include":"#punctuationComma"}]},"typeBuiltinLiterals":{"match":"(?<![$.])\\\\b(this|true|false|undefined|null)\\\\b(?!\\\\$)","name":"support.type.builtin.ts"},"typeFnTypeParameters":{"patterns":[{"captures":{"1":{"name":"keyword.control.new.ts"}},"match":"(?<![$.])\\\\b(new)\\\\b(?=\\\\s*<)","name":"meta.type.constructor.ts"},{"begin":"(?<![$.])\\\\b(new)\\\\b\\\\s*(?=\\\\()","beginCaptures":{"1":{"name":"keyword.control.new.ts"}},"end":"(?<=\\\\))","name":"meta.type.constructor.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"(?<=>)\\\\s*(?=\\\\()","end":"(?<=\\\\))","include":"#typeofOperator","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"((?=\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]}]},"typeName":{"patterns":[{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"}},"match":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s*([!?]?\\\\.)"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"entity.name.type.ts"}]},"typeObject":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#typeObjectMembers"}]},"typeObjectMembers":{"patterns":[{"include":"#typeAnnotation"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"}]},"typeOperators":{"patterns":[{"include":"#typeofOperator"},{"match":"[\\\\&|]","name":"keyword.operator.type.ts"},{"match":"(?<![$.])\\\\bkeyof\\\\b(?!\\\\$)","name":"keyword.operator.expression.keyof.ts"}]},"typeParenOrFunctionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"include":"#type"},{"include":"#functionParameters"}]},"typeTuple":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.type.tuple.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},"typeofOperator":{"match":"(?<![$.])\\\\btypeof\\\\b(?!\\\\$)","name":"keyword.operator.expression.typeof.ts"},"undefinedLiteral":{"match":"(?<![$.])\\\\bundefined\\\\b(?!\\\\$)","name":"constant.language.undefined.ts"},"variableInitializer":{"begin":"(?<![!=])(=)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|[]),;}])","patterns":[{"include":"#ngExpression"}]}},"scopeName":"expression.ng"}'))],r=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-let-declaration","patterns":[{"include":"#letDeclaration"}],"repository":{"letDeclaration":{"begin":"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?","beginCaptures":{"1":{"name":"storage.type.ng"},"2":{"name":"variable.other.constant.ng"},"3":{"name":"keyword.operator.assignment.ng"}},"end":"(?<=;)","name":"meta.definition.variable.ng","patterns":[{"include":"#letInitializer"}]},"letInitializer":{"begin":"\\\\s*","beginCaptures":{"0":{"name":"keyword.operator.assignment.ng"}},"contentName":"meta.definition.variable.initializer.ng","end":";","endCaptures":{"0":{"name":"punctuation.terminator.statement.ng"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.let.ng","embeddedLangs":["angular-expression"]}`)),i=[...n,r],a=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment","name":"angular-template","patterns":[{"include":"#interpolation"}],"repository":{"interpolation":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"expression.ng","end":"}}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.ng","embeddedLangs":["angular-expression"]}`)),o=[...n,a],s=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-template-blocks","patterns":[{"include":"#block"}],"repository":{"block":{"begin":"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"#transition"}]},"2":{"name":"keyword.control.block.kind.ng"}},"end":"(?<=})","name":"control.block.ng","patterns":[{"include":"#blockExpression"},{"include":"#blockBody"}]},"blockBody":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"control.block.body.ng","end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"text.html.derivative.ng"},{"include":"template.ng"}]},"blockExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"contentName":"control.block.expression.ng","end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#blockExpressionOfClause"},{"include":"#blockExpressionLetBinding"},{"include":"#blockExpressionTrackClause"},{"include":"expression.ng"}]},"blockExpressionLetBinding":{"begin":"\\\\blet\\\\b","beginCaptures":{"0":{"name":"storage.type.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionOfClause":{"begin":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b","beginCaptures":{"1":{"name":"variable.other.constant.ng"},"2":{"name":"keyword.operator.expression.of.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionTrackClause":{"begin":"\\\\btrack\\\\b","beginCaptures":{"0":{"name":"keyword.control.track.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"transition":{"match":"@","name":"keyword.control.block.transition.ng"}},"scopeName":"template.blocks.ng","embeddedLangs":["angular-expression","angular-template"]}`)),c=[...n,...o,s],l=e({default:()=>d}),u=Object.freeze(JSON.parse(`{"displayName":"Angular HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"angular-html","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative.ng","embeddedLangs":["html","angular-expression","angular-let-declaration","angular-template","angular-template-blocks"]}`)),d=[...t,...n,...i,...o,...c,u];export{i as a,o as i,l as n,n as o,c as r,d as t};
1
+ import{s as e}from"./index-DqZ7qZxG.js";import{t}from"./html-KRo6nO5U.js";var n=[Object.freeze(JSON.parse('{"injectionSelector":"L:text.html -comment","name":"angular-expression","patterns":[{"include":"#ngExpression"}],"repository":{"arrayLiteral":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.array.literal.ts","patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"booleanLiteral":{"patterns":[{"match":"(?<![$.])\\\\btrue\\\\b(?!\\\\$)","name":"constant.language.boolean.true.ts"},{"match":"(?<![$.])\\\\bfalse\\\\b(?!\\\\$)","name":"constant.language.boolean.false.ts"}]},"expressionOperator":{"patterns":[{"captures":{"1":{"name":"keyword.operator.logical.ts"},"2":{"name":"entity.name.function.pipe.ng"}},"match":"((?<!\\\\|)\\\\|(?!\\\\|))\\\\s?([-$0-9A-Z_a-z]*)"},{"match":"(?<![$.])\\\\b(let)\\\\b(?!\\\\$)","name":"storage.type.ts"},{"match":"(?<![$.])\\\\b(await)\\\\b(?!\\\\$)","name":"keyword.control.flow.ts"},{"match":"(?<![$.])\\\\bdelete\\\\b(?!\\\\$)","name":"keyword.operator.expression.delete.ts"},{"match":"(?<![$.])\\\\bin\\\\b(?!\\\\$)","name":"keyword.operator.expression.in.ts"},{"match":"(?<![$.])\\\\bof\\\\b(?!\\\\$)","name":"keyword.operator.expression.of.ts"},{"match":"(?<![$.])\\\\bif\\\\b(?!\\\\$)","name":"keyword.control.if.ts"},{"match":"(?<![$.])\\\\belse\\\\b(?!\\\\$)","name":"keyword.control.else.ts"},{"match":"(?<![$.])\\\\bthen\\\\b(?!\\\\$)","name":"keyword.control.then.ts"},{"match":"(?<![$.])\\\\binstanceof\\\\b(?!\\\\$)","name":"keyword.operator.expression.instanceof.ts"},{"match":"(?<![$.])\\\\bnew\\\\b(?!\\\\$)","name":"keyword.operator.new.ts"},{"match":"(?<![$.])\\\\bvoid\\\\b(?!\\\\$)","name":"keyword.operator.expression.void.ts"},{"begin":"(?<![$.])\\\\bas\\\\b(?!\\\\$)","beginCaptures":{"0":{"name":"storage.type.as.ts"}},"end":"(?=$|[]\\"\'),:;}])","patterns":[{"include":"#type"}]},{"match":"(?:\\\\*|(?<!\\\\()/|[-%+])=","name":"keyword.operator.assignment.compound.ts"},{"match":"(?:[\\\\&^]|<<|>>>??|\\\\|)=","name":"keyword.operator.assignment.compound.bitwise.ts"},{"match":"<<|>>>?","name":"keyword.operator.bitwise.shift.ts"},{"match":"[!=]==?","name":"keyword.operator.comparison.ts"},{"match":"<=|>=|<>|[<>]","name":"keyword.operator.relational.ts"},{"match":"!|&&|\\\\?\\\\?|\\\\|\\\\|","name":"keyword.operator.logical.ts"},{"match":"[\\\\&^|~]","name":"keyword.operator.bitwise.ts"},{"match":"=","name":"keyword.operator.assignment.ts"},{"match":"--","name":"keyword.operator.decrement.ts"},{"match":"\\\\+\\\\+","name":"keyword.operator.increment.ts"},{"match":"[-%*+/]","name":"keyword.operator.arithmetic.ts"},{"captures":{"1":{"name":"keyword.operator.arithmetic.ts"}},"match":"(?<=[$_[:alnum:]])\\\\s*(/)(?![*/])"},{"include":"#typeofOperator"}]},"functionCall":{"begin":"(?=(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","end":"(?<=\\\\))(?!(\\\\??\\\\.\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\()","patterns":[{"match":"\\\\?","name":"punctuation.accessor.ts"},{"match":"\\\\.","name":"punctuation.accessor.ts"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.ts"},{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},{"include":"#parenExpression"}]},"functionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"punctuation.definition.parameters.begin.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.ts"}},"name":"meta.parameters.ts","patterns":[{"include":"#decorator"},{"include":"#parameterName"},{"include":"#variableInitializer"},{"match":",","name":"punctuation.separator.parameter.ts"}]},"identifiers":{"patterns":[{"match":"([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*\\\\.\\\\s*prototype\\\\b(?!\\\\$))","name":"support.class.ts"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.object.property.ts"},"3":{"name":"variable.other.object.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"entity.name.function.ts"}},"match":"(?:([!?]?\\\\.)\\\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\\\s*=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"constant.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])"},{"captures":{"1":{"name":"punctuation.accessor.ts"},"2":{"name":"variable.other.property.ts"}},"match":"([!?]?\\\\.)\\\\s*([$_[:alpha:]][$_[:alnum:]]*)"},{"captures":{"1":{"name":"constant.other.object.ts"},"2":{"name":"variable.other.object.ts"}},"match":"(?:(\\\\p{upper}[$_\\\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\\\s*\\\\.\\\\s*[$_[:alpha:]][$_[:alnum:]]*)"},{"match":"(\\\\p{upper}[$_\\\\d[:upper:]]*)(?![$_[:alnum:]])","name":"constant.character.other"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"variable.other.readwrite.ts"}]},"literal":{"name":"literal.ts","patterns":[{"include":"#numericLiteral"},{"include":"#booleanLiteral"},{"include":"#nullLiteral"},{"include":"#undefinedLiteral"},{"include":"#numericConstantLiteral"},{"include":"#arrayLiteral"},{"include":"#thisLiteral"}]},"ngExpression":{"name":"meta.expression.ng","patterns":[{"include":"#string"},{"include":"#literal"},{"include":"#ternaryExpression"},{"include":"#expressionOperator"},{"include":"#functionCall"},{"include":"#identifiers"},{"include":"#parenExpression"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"},{"include":"#punctuationAccessor"}]},"nullLiteral":{"match":"(?<![$.])\\\\bnull\\\\b(?!\\\\$)","name":"constant.language.null.ts"},"numericConstantLiteral":{"patterns":[{"match":"(?<![$.])\\\\bNaN\\\\b(?!\\\\$)","name":"constant.language.nan.ts"},{"match":"(?<![$.])\\\\bInfinity\\\\b(?!\\\\$)","name":"constant.language.infinity.ts"}]},"numericLiteral":{"patterns":[{"match":"\\\\b(?<!\\\\$)0([Xx])\\\\h+\\\\b(?!\\\\$)","name":"constant.numeric.hex.ts"},{"match":"\\\\b(?<!\\\\$)0([Bb])[01]+\\\\b(?!\\\\$)","name":"constant.numeric.binary.ts"},{"match":"\\\\\\\\b(?<!\\\\$)0([Oo])?[0-7]+\\\\b(?!\\\\$)","name":"constant.numeric.octal.ts"},{"captures":{"0":{"name":"constant.numeric.decimal.ts"},"1":{"name":"meta.delimiter.decimal.period.ts"},"2":{"name":"meta.delimiter.decimal.period.ts"},"3":{"name":"meta.delimiter.decimal.period.ts"},"4":{"name":"meta.delimiter.decimal.period.ts"},"5":{"name":"meta.delimiter.decimal.period.ts"},"6":{"name":"meta.delimiter.decimal.period.ts"}},"match":"(?<!\\\\$)(?:\\\\b[0-9]+(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)[Ee][-+]?[0-9]+\\\\b|\\\\B(\\\\.)[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+[Ee][-+]?[0-9]+\\\\b|\\\\b[0-9]+(\\\\.)\\\\B|\\\\B(\\\\.)[0-9]+\\\\b|\\\\b[0-9]+\\\\b(?!\\\\.))(?!\\\\$)"}]},"parameterName":{"patterns":[{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"entity.name.function.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)(?=\\\\s*(=\\\\s*((async\\\\s+)|(function\\\\s*[(<])|(function\\\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\\\s*=>)|((<([^<>]|<[^<>]+>)+>\\\\s*)?\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)(\\\\s*:\\\\s*(.)*)?\\\\s*=>)))|(:\\\\s*((<)|(\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))))"},{"captures":{"1":{"name":"storage.modifier.ts"},"2":{"name":"storage.modifier.ts"},"3":{"name":"keyword.operator.rest.ts"},"4":{"name":"variable.parameter.ts"},"5":{"name":"keyword.operator.optional.ts"}},"match":"(?:\\\\s*\\\\b(readonly)\\\\s+)?(?:\\\\s*\\\\b(p(?:ublic|rivate|rotected))\\\\s+)?(\\\\.\\\\.\\\\.)?\\\\s*(?<![:=])([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(\\\\??)"}]},"parenExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#ngExpression"},{"include":"#punctuationComma"}]},"punctuationAccessor":{"match":"(?:\\\\?|!?)\\\\.","name":"punctuation.accessor.ts"},"punctuationComma":{"match":",","name":"punctuation.separator.comma.ts"},"punctuationSemicolon":{"match":";","name":"punctuation.terminator.statement.ts"},"qstringDouble":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\\")|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.double.ts","patterns":[{"include":"#stringCharacterEscape"}]},"qstringSingle":{"begin":"\'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ts"}},"end":"(\')|([^\\\\n\\\\\\\\])$","endCaptures":{"1":{"name":"punctuation.definition.string.end.ts"},"2":{"name":"invalid.illegal.newline.ts"}},"name":"string.quoted.single.ts","patterns":[{"include":"#stringCharacterEscape"}]},"string":{"patterns":[{"include":"#qstringSingle"},{"include":"#qstringDouble"},{"include":"#templateLiteral"}]},"stringCharacterEscape":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)","name":"constant.character.escape.ts"},"templateLiteral":{"patterns":[{"include":"#templateLiteralCall"},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?(`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"},"2":{"name":"string.template.ts punctuation.definition.string.template.begin.ts"}},"contentName":"string.template.ts","end":"`","endCaptures":{"0":{"name":"string.template.ts punctuation.definition.string.template.end.ts"}},"patterns":[{"include":"#templateLiteralSubstitutionElement"},{"include":"#stringCharacterEscape"}]}]},"templateLiteralCall":{"patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*)(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?=`)","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))","end":"(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"#support-function-call-identifiers"},{"match":"([$_[:alpha:]][$_[:alnum:]]*)","name":"entity.name.function.tagged-template.ts"}]},{"include":"#typeArguments"}]},{"begin":"([$_[:alpha:]][$_[:alnum:]]*)?\\\\s*(?=(<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?=`)","patterns":[{"include":"#typeArguments"}]}]},"templateLiteralSubstitutionElement":{"begin":"\\\\$\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.template-expression.begin.ts"}},"contentName":"meta.embedded.line.ts","end":"}","endCaptures":{"0":{"name":"punctuation.definition.template-expression.end.ts"}},"name":"meta.template.expression.ts","patterns":[{"include":"#ngExpression"}]},"ternaryExpression":{"begin":"(?!\\\\?\\\\.\\\\s*\\\\D)(\\\\?)(?!\\\\?)","beginCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"end":"\\\\s*(:)","endCaptures":{"1":{"name":"keyword.operator.ternary.ts"}},"patterns":[{"include":"#ngExpression"}]},"thisLiteral":{"match":"(?<![$.])\\\\bthis\\\\b(?!\\\\$)","name":"variable.language.this.ts"},"type":{"name":"meta.type.ts","patterns":[{"include":"#string"},{"include":"#numericLiteral"},{"include":"#typeBuiltinLiterals"},{"include":"#typeTuple"},{"include":"#typeObject"},{"include":"#typeOperators"},{"include":"#typeFnTypeParameters"},{"include":"#typeParenOrFunctionParameters"},{"include":"#typeName"}]},"typeAnnotation":{"begin":":","beginCaptures":{"0":{"name":"keyword.operator.type.annotation.ts"}},"end":"(?=$|[]),;}]|//|\\")|(?==[^>])|(?<=[]$)>_}[:alpha:]])\\\\s*(?=\\\\{)","name":"meta.type.annotation.ts","patterns":[{"include":"#type"}]},"typeArguments":{"begin":"<","beginCaptures":{"0":{"name":"punctuation.definition.typeparameters.begin.ts"}},"end":">","endCaptures":{"0":{"name":"punctuation.definition.typeparameters.end.ts"}},"name":"meta.type.parameters.ts","patterns":[{"include":"#typeArgumentsBody"}]},"typeArgumentsBody":{"patterns":[{"captures":{"0":{"name":"keyword.operator.type.ts"}},"match":"(?<![$_[:alnum:]])(?:(?<=\\\\.\\\\.\\\\.)|(?<!\\\\.))(_)(?![$_[:alnum:]])(?:(?=\\\\.\\\\.\\\\.)|(?!\\\\.))"},{"include":"#type"},{"include":"#punctuationComma"}]},"typeBuiltinLiterals":{"match":"(?<![$.])\\\\b(this|true|false|undefined|null)\\\\b(?!\\\\$)","name":"support.type.builtin.ts"},"typeFnTypeParameters":{"patterns":[{"captures":{"1":{"name":"keyword.control.new.ts"}},"match":"(?<![$.])\\\\b(new)\\\\b(?=\\\\s*<)","name":"meta.type.constructor.ts"},{"begin":"(?<![$.])\\\\b(new)\\\\b\\\\s*(?=\\\\()","beginCaptures":{"1":{"name":"keyword.control.new.ts"}},"end":"(?<=\\\\))","name":"meta.type.constructor.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"(?<=>)\\\\s*(?=\\\\()","end":"(?<=\\\\))","include":"#typeofOperator","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]},{"begin":"((?=\\\\(\\\\s*((\\\\))|(\\\\.\\\\.\\\\.)|([$_[:alnum:]]+\\\\s*(([,:=?])|(\\\\)\\\\s*=>))))))","end":"(?<=\\\\))","name":"meta.type.function.ts","patterns":[{"include":"#functionParameters"}]}]},"typeName":{"patterns":[{"captures":{"1":{"name":"entity.name.type.module.ts"},"2":{"name":"punctuation.accessor.ts"}},"match":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s*([!?]?\\\\.)"},{"match":"[$_[:alpha:]][$_[:alnum:]]*","name":"entity.name.type.ts"}]},"typeObject":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"name":"meta.object.type.ts","patterns":[{"include":"#typeObjectMembers"}]},"typeObjectMembers":{"patterns":[{"include":"#typeAnnotation"},{"include":"#punctuationComma"},{"include":"#punctuationSemicolon"}]},"typeOperators":{"patterns":[{"include":"#typeofOperator"},{"match":"[\\\\&|]","name":"keyword.operator.type.ts"},{"match":"(?<![$.])\\\\bkeyof\\\\b(?!\\\\$)","name":"keyword.operator.expression.keyof.ts"}]},"typeParenOrFunctionParameters":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"name":"meta.type.paren.cover.ts","patterns":[{"include":"#type"},{"include":"#functionParameters"}]},"typeTuple":{"begin":"\\\\[","beginCaptures":{"0":{"name":"meta.brace.square.ts"}},"end":"]","endCaptures":{"0":{"name":"meta.brace.square.ts"}},"name":"meta.type.tuple.ts","patterns":[{"include":"#type"},{"include":"#punctuationComma"}]},"typeofOperator":{"match":"(?<![$.])\\\\btypeof\\\\b(?!\\\\$)","name":"keyword.operator.expression.typeof.ts"},"undefinedLiteral":{"match":"(?<![$.])\\\\bundefined\\\\b(?!\\\\$)","name":"constant.language.undefined.ts"},"variableInitializer":{"begin":"(?<![!=])(=)(?!=)","beginCaptures":{"1":{"name":"keyword.operator.assignment.ts"}},"end":"(?=$|[]),;}])","patterns":[{"include":"#ngExpression"}]}},"scopeName":"expression.ng"}'))],r=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-let-declaration","patterns":[{"include":"#letDeclaration"}],"repository":{"letDeclaration":{"begin":"(@let)\\\\s+([$_[:alpha:]][$_[:alnum:]]*)\\\\s*(=)?","beginCaptures":{"1":{"name":"storage.type.ng"},"2":{"name":"variable.other.constant.ng"},"3":{"name":"keyword.operator.assignment.ng"}},"end":"(?<=;)","name":"meta.definition.variable.ng","patterns":[{"include":"#letInitializer"}]},"letInitializer":{"begin":"\\\\s*","beginCaptures":{"0":{"name":"keyword.operator.assignment.ng"}},"contentName":"meta.definition.variable.initializer.ng","end":";","endCaptures":{"0":{"name":"punctuation.terminator.statement.ng"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.let.ng","embeddedLangs":["angular-expression"]}`)),i=[...n,r],a=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment","name":"angular-template","patterns":[{"include":"#interpolation"}],"repository":{"interpolation":{"begin":"\\\\{\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"expression.ng","end":"}}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"expression.ng"}]}},"scopeName":"template.ng","embeddedLangs":["angular-expression"]}`)),o=[...n,a],s=Object.freeze(JSON.parse(`{"injectTo":["text.html.derivative","text.html.derivative.ng","source.ts.ng"],"injectionSelector":"L:text.html -comment -expression.ng -meta.tag -source.css -source.js","name":"angular-template-blocks","patterns":[{"include":"#block"}],"repository":{"block":{"begin":"(@)(if|else if|else|defer|placeholder|loading|error|switch|case|default|for|empty)\\\\s*","beginCaptures":{"1":{"patterns":[{"include":"#transition"}]},"2":{"name":"keyword.control.block.kind.ng"}},"end":"(?<=})","name":"control.block.ng","patterns":[{"include":"#blockExpression"},{"include":"#blockBody"}]},"blockBody":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"contentName":"control.block.body.ng","end":"}","endCaptures":{"0":{"name":"punctuation.definition.block.ts"}},"patterns":[{"include":"text.html.derivative.ng"},{"include":"template.ng"}]},"blockExpression":{"begin":"\\\\(","beginCaptures":{"0":{"name":"meta.brace.round.ts"}},"contentName":"control.block.expression.ng","end":"\\\\)","endCaptures":{"0":{"name":"meta.brace.round.ts"}},"patterns":[{"include":"#blockExpressionOfClause"},{"include":"#blockExpressionLetBinding"},{"include":"#blockExpressionTrackClause"},{"include":"expression.ng"}]},"blockExpressionLetBinding":{"begin":"\\\\blet\\\\b","beginCaptures":{"0":{"name":"storage.type.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionOfClause":{"begin":"([$_[:alpha:]][$_[:alnum:]]*)\\\\s+(of)\\\\b","beginCaptures":{"1":{"name":"variable.other.constant.ng"},"2":{"name":"keyword.operator.expression.of.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"blockExpressionTrackClause":{"begin":"\\\\btrack\\\\b","beginCaptures":{"0":{"name":"keyword.control.track.ng"}},"end":"(?=[$)])|(?<=;)","patterns":[{"include":"expression.ng"}]},"transition":{"match":"@","name":"keyword.control.block.transition.ng"}},"scopeName":"template.blocks.ng","embeddedLangs":["angular-expression","angular-template"]}`)),c=[...n,...o,s],l=e({default:()=>d}),u=Object.freeze(JSON.parse(`{"displayName":"Angular HTML","injections":{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"angular-html","patterns":[{"include":"text.html.basic#core-minus-invalid"},{"begin":"(</?)(\\\\w[^>\\\\s]*)(?<!/)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.unrecognized.html.derivative","patterns":[{"include":"text.html.basic#attribute"}]}],"scopeName":"text.html.derivative.ng","embeddedLangs":["html","angular-expression","angular-let-declaration","angular-template","angular-template-blocks"]}`)),d=[...t,...n,...i,...o,...c,u];export{i as a,o as i,l as n,n as o,c as r,d as t};