@macintacos/caret 0.8.2 → 0.9.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.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +5 -0
- package/dist/cli.js +42 -16
- package/opencode/caret.plugin.ts +91 -30
- package/package.json +1 -1
- package/ui/dist/assets/{angular-html-BpJgIORc.js → angular-html-BOjikgNB.js} +1 -1
- package/ui/dist/assets/{angular-ts-Dw7jt6H3.js → angular-ts-BjxNvVmD.js} +1 -1
- package/ui/dist/assets/{apl-DscWKpqG.js → apl-BkiW4daM.js} +1 -1
- package/ui/dist/assets/{astro-M2TfAY-4.js → astro-3adpTlIH.js} +1 -1
- package/ui/dist/assets/{blade-BKZbiCTN.js → blade-DPTGWOFi.js} +1 -1
- package/ui/dist/assets/{c-vSGY_oaW.js → c-Gr6AqmnN.js} +1 -1
- package/ui/dist/assets/{cobol-D_b85OID.js → cobol-C8hrPk4X.js} +1 -1
- package/ui/dist/assets/{coffee-yR0vOcDv.js → coffee-COAUS6hR.js} +1 -1
- package/ui/dist/assets/{cpp-B9n-PBog.js → cpp-DRNHed7s.js} +1 -1
- package/ui/dist/assets/{crystal-DlMW4K68.js → crystal-xGCPBQ2Z.js} +1 -1
- package/ui/dist/assets/{css-eR_OGyvz.js → css-g3rqYwXR.js} +1 -1
- package/ui/dist/assets/{dist-Bq4ybaGS.js → dist--Ppdbw_u.js} +1 -1
- package/ui/dist/assets/{dist-Cu14OUmD.js → dist-ALQWrgOU.js} +1 -1
- package/ui/dist/assets/{dist-9nsJ_jfT.js → dist-B0fJR4WS.js} +1 -1
- package/ui/dist/assets/{dist-BVU_DRtk.js → dist-B3rxpa4n.js} +1 -1
- package/ui/dist/assets/{dist-CA0N05NE.js → dist-B57N0_ad.js} +1 -1
- package/ui/dist/assets/{dist-BOlD4h0w.js → dist-B8chzuGI.js} +1 -1
- package/ui/dist/assets/{dist-fegIt7sh.js → dist-Baejo1Q0.js} +1 -1
- package/ui/dist/assets/{dist-YE2Uj3eD.js → dist-BeBmdH90.js} +1 -1
- package/ui/dist/assets/{dist-CLxm4mmq.js → dist-BtEZoKjT.js} +1 -1
- package/ui/dist/assets/{dist-ZIUMZKKQ.js → dist-CbLm1gmp.js} +1 -1
- package/ui/dist/assets/{dist--nCimyFJ.js → dist-CqeZRBk3.js} +1 -1
- package/ui/dist/assets/{dist-z5ayJUeC.js → dist-D55VuegY.js} +1 -1
- package/ui/dist/assets/{dist-C-9GQ1Zp.js → dist-D8G49gMQ.js} +1 -1
- package/ui/dist/assets/{dist-Dw6gzrLi.js → dist-DAyUKqoN.js} +1 -1
- package/ui/dist/assets/{dist-DpjGqY_j.js → dist-DGuk1LV9.js} +1 -1
- package/ui/dist/assets/{dist-BDTKIP5U.js → dist-DPkspc9Q.js} +1 -1
- package/ui/dist/assets/{dist-EFvLx_Vg.js → dist-ekL3xCM_.js} +1 -1
- package/ui/dist/assets/{edge-CIm6BqT_.js → edge-1tf_B5nG.js} +1 -1
- package/ui/dist/assets/{elixir-CGFSlFw_.js → elixir-Ca3rBU7D.js} +1 -1
- package/ui/dist/assets/{elm-BSew7n5O.js → elm-CbkPZkSz.js} +1 -1
- package/ui/dist/assets/{erb-BkgqIZze.js → erb-DV7pKwEX.js} +1 -1
- package/ui/dist/assets/{git-rebase-BUYBBmxS.js → git-rebase-DItBLEqi.js} +1 -1
- package/ui/dist/assets/{glimmer-js-BGag6-lb.js → glimmer-js-CAykgXKb.js} +1 -1
- package/ui/dist/assets/{glimmer-ts-DDMkKLl0.js → glimmer-ts-BPT-EGHX.js} +1 -1
- package/ui/dist/assets/{glsl-DORy1f5o.js → glsl-CMfWGTLW.js} +1 -1
- package/ui/dist/assets/{graphql-CQdH4wHz.js → graphql-CR_NOWo2.js} +1 -1
- package/ui/dist/assets/{hack-DEMoudQX.js → hack-BWP6dwsC.js} +1 -1
- package/ui/dist/assets/{haml-5F6bZL9O.js → haml-CDa-RN50.js} +1 -1
- package/ui/dist/assets/{handlebars-CJrxVb1S.js → handlebars-sJHLZ5A7.js} +1 -1
- package/ui/dist/assets/{html-DnBxHgUN.js → html-63fn47vQ.js} +1 -1
- package/ui/dist/assets/{html-derivative-oO1_x7AL.js → html-derivative-BXnhYyFs.js} +1 -1
- package/ui/dist/assets/{http-x7FjaFyJ.js → http-IOW0RfUa.js} +1 -1
- package/ui/dist/assets/{hurl-C3DS1OMk.js → hurl-CTSYkbKC.js} +1 -1
- package/ui/dist/assets/index-B-GFE-1x.css +1 -0
- package/ui/dist/assets/{index-CDxgCCFg.js → index-CtmSI3Ho.js} +168 -129
- package/ui/dist/assets/{java-C2C6Komk.js → java-DOX-o9K8.js} +1 -1
- package/ui/dist/assets/{javascript-DEpYVqmG.js → javascript-NWcTx9fC.js} +1 -1
- package/ui/dist/assets/{jinja-BNfhmgIR.js → jinja-TT5Clkg-.js} +1 -1
- package/ui/dist/assets/{jison-ooxyiW2g.js → jison-DoZAP4a3.js} +1 -1
- package/ui/dist/assets/{json-Dx2gR8Lp.js → json-Dd1DbJZw.js} +1 -1
- package/ui/dist/assets/{jsx-BZCBHgZQ.js → jsx-D95PvYev.js} +1 -1
- package/ui/dist/assets/{julia-kkZGM_a9.js → julia-DzNcHVqx.js} +1 -1
- package/ui/dist/assets/{just-Cjde5dAJ.js → just-DapN_z3p.js} +1 -1
- package/ui/dist/assets/{latex-D3gXuVSc.js → latex-Bf3O2fQb.js} +1 -1
- package/ui/dist/assets/{liquid-DmlvH9NM.js → liquid-NXRAWoEl.js} +1 -1
- package/ui/dist/assets/{lua-pCB9FV-x.js → lua-DgnpxH9p.js} +1 -1
- package/ui/dist/assets/{marko-DwItdpjh.js → marko-wkWPjoQ9.js} +1 -1
- package/ui/dist/assets/{mdc-SSlXAY7R.js → mdc-DtOun-X2.js} +1 -1
- package/ui/dist/assets/{nginx-DwgR7vzY.js → nginx-XCdDX9Gp.js} +1 -1
- package/ui/dist/assets/{nim-BB87Orsk.js → nim-CnDu2vnO.js} +1 -1
- package/ui/dist/assets/{perl-BEwuOnSP.js → perl-mCSP7zn3.js} +1 -1
- package/ui/dist/assets/{php-B7dC7_E_.js → php-CnDYV7m9.js} +1 -1
- package/ui/dist/assets/{pug-cCzod0Ou.js → pug-DUv1_GFU.js} +1 -1
- package/ui/dist/assets/{qml-DlvhYl5u.js → qml-Cw49qsJy.js} +1 -1
- package/ui/dist/assets/{r-gkifu9rO.js → r-DUSb08Z8.js} +1 -1
- package/ui/dist/assets/{razor-CQ3nK7LT.js → razor-CKco3Dbd.js} +1 -1
- package/ui/dist/assets/{regexp-BfKjRa3b.js → regexp-DbjqCAsi.js} +1 -1
- package/ui/dist/assets/{rst-CaTCPdHP.js → rst-iLrpHokU.js} +1 -1
- package/ui/dist/assets/{ruby-Qi28elVh.js → ruby-BBYneGfk.js} +1 -1
- package/ui/dist/assets/{sas-C0-zyShz.js → sas-DoS0TCZm.js} +1 -1
- package/ui/dist/assets/{scss-B3v_ewrQ.js → scss-DwjazCIb.js} +1 -1
- package/ui/dist/assets/{shellscript-CAX3EBQC.js → shellscript-bR-cjL3L.js} +1 -1
- package/ui/dist/assets/{shellsession-BbCaojs-.js → shellsession-D54KuySr.js} +1 -1
- package/ui/dist/assets/{soy-C_L1i27o.js → soy-QeEusSoH.js} +1 -1
- package/ui/dist/assets/{sql-DfQzhZMD.js → sql-BjJgWH0F.js} +1 -1
- package/ui/dist/assets/{stata-wKRkbYfj.js → stata---E5T02y.js} +1 -1
- package/ui/dist/assets/{surrealql-r1cCvWUu.js → surrealql-B3nSLmva.js} +1 -1
- package/ui/dist/assets/{svelte-QE15YUDB.js → svelte-BrJnUGsO.js} +1 -1
- package/ui/dist/assets/{templ-DPDxNWwC.js → templ-Cp6BywaR.js} +1 -1
- package/ui/dist/assets/{tex-BFuhjY1V.js → tex-yFYe_F-5.js} +1 -1
- package/ui/dist/assets/{ts-tags-BUMMUMV3.js → ts-tags-Dn1XZNS9.js} +1 -1
- package/ui/dist/assets/{tsx-BL1rdCtn.js → tsx-BnhO4Hkv.js} +1 -1
- package/ui/dist/assets/{twig-CFLDJ71e.js → twig-B-zB3u-Z.js} +1 -1
- package/ui/dist/assets/{typescript-Duv2diAv.js → typescript-D49Rl_Ln.js} +1 -1
- package/ui/dist/assets/{vue-DkO776Yn.js → vue-DmTXiGeI.js} +1 -1
- package/ui/dist/assets/{vue-html-9RYUFMtL.js → vue-html-CeXpHptR.js} +1 -1
- package/ui/dist/assets/{vue-vine-C3meWGQa.js → vue-vine-C2uWvGRx.js} +1 -1
- package/ui/dist/assets/{xml-ClHTQj3q.js → xml-SZiG-U1T.js} +1 -1
- package/ui/dist/assets/{xsl-D1Lt0UF-.js → xsl-DksAOCj6.js} +1 -1
- package/ui/dist/assets/{yaml-BhUwnbwF.js → yaml-DX7HDqJF.js} +1 -1
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-FuUBXrz0.css +0 -1
package/README.md
CHANGED
|
@@ -75,6 +75,11 @@ prompt. There you:
|
|
|
75
75
|
A single local daemon serves every session, so concurrent plans queue up in one tab behind
|
|
76
76
|
a switcher.
|
|
77
77
|
|
|
78
|
+
**In OpenCode**, you don't have to wait to be intercepted: caret registers a
|
|
79
|
+
`caret_review_plan` tool your agent can call directly, so a skill of your own can route
|
|
80
|
+
its approval step through the same review UI. Claude Code has no equivalent — see
|
|
81
|
+
[`doc/ADVANCED.md`](doc/ADVANCED.md#calling-the-review-tool-from-your-own-skill).
|
|
82
|
+
|
|
78
83
|
## Configuration
|
|
79
84
|
|
|
80
85
|
caret runs with sensible defaults and needs no configuration. To tune it, it reads an
|
package/dist/cli.js
CHANGED
|
@@ -1990,7 +1990,7 @@ var require_indexes = __commonJS((exports, module) => {
|
|
|
1990
1990
|
|
|
1991
1991
|
// node_modules/.bun/thread-stream@4.2.0/node_modules/thread-stream/index.js
|
|
1992
1992
|
var require_thread_stream = __commonJS((exports, module) => {
|
|
1993
|
-
var __dirname = "/Users/juliantorres/GitLocal/Play/caret/node_modules/.bun/thread-stream@4.2.0/node_modules/thread-stream";
|
|
1993
|
+
var __dirname = "/Users/juliantorres/GitLocal/Play/caret/trunk/node_modules/.bun/thread-stream@4.2.0/node_modules/thread-stream";
|
|
1994
1994
|
var { version: version2 } = require_package();
|
|
1995
1995
|
var { EventEmitter } = __require("events");
|
|
1996
1996
|
var { Worker } = __require("worker_threads");
|
|
@@ -2506,7 +2506,7 @@ var require_thread_stream = __commonJS((exports, module) => {
|
|
|
2506
2506
|
|
|
2507
2507
|
// node_modules/.bun/pino@10.3.1/node_modules/pino/lib/transport.js
|
|
2508
2508
|
var require_transport = __commonJS((exports, module) => {
|
|
2509
|
-
var __dirname = "/Users/juliantorres/GitLocal/Play/caret/node_modules/.bun/pino@10.3.1/node_modules/pino/lib";
|
|
2509
|
+
var __dirname = "/Users/juliantorres/GitLocal/Play/caret/trunk/node_modules/.bun/pino@10.3.1/node_modules/pino/lib";
|
|
2510
2510
|
var { createRequire } = __require("module");
|
|
2511
2511
|
var { existsSync: existsSync4 } = __require("fs");
|
|
2512
2512
|
var getCallers = require_caller();
|
|
@@ -24294,7 +24294,7 @@ async function loadUiAssets() {
|
|
|
24294
24294
|
// package.json
|
|
24295
24295
|
var package_default = {
|
|
24296
24296
|
name: "@macintacos/caret",
|
|
24297
|
-
version: "0.
|
|
24297
|
+
version: "0.9.0",
|
|
24298
24298
|
license: "MIT",
|
|
24299
24299
|
type: "module",
|
|
24300
24300
|
description: "A Claude Code plugin that replaces the terminal plan-approval prompt with a local web UI for inline review, annotation, and approval.",
|
|
@@ -25229,8 +25229,8 @@ async function parseBody(req, schema) {
|
|
|
25229
25229
|
// src/plan/excerpt.ts
|
|
25230
25230
|
import { readdirSync as readdirSync3, readFileSync as readFileSync7, realpathSync, statSync as statSync2 } from "fs";
|
|
25231
25231
|
import { extname, isAbsolute, join as join7, relative as relative2, resolve, sep } from "path";
|
|
25232
|
-
var EXCERPT_RADIUS =
|
|
25233
|
-
var EXCERPT_HEAD_LINES =
|
|
25232
|
+
var EXCERPT_RADIUS = 30;
|
|
25233
|
+
var EXCERPT_HEAD_LINES = 60;
|
|
25234
25234
|
var MAX_EXCERPT_BYTES = 2 * 1024 * 1024;
|
|
25235
25235
|
var MAX_SCAN_ENTRIES = 5000;
|
|
25236
25236
|
var SKIP_DIRS = new Set(["node_modules", "dist", "build", "coverage", "out"]);
|
|
@@ -25346,7 +25346,17 @@ function resolveFileInCwd(cwd, candidate) {
|
|
|
25346
25346
|
const name = cleaned.split("/").pop() ?? "";
|
|
25347
25347
|
return basenameSearch(cwdReal, name);
|
|
25348
25348
|
}
|
|
25349
|
-
function
|
|
25349
|
+
function isFileTooLargeToPreview(cwd, candidate) {
|
|
25350
|
+
const abs = resolveFileInCwd(cwd, candidate);
|
|
25351
|
+
if (abs === null)
|
|
25352
|
+
return false;
|
|
25353
|
+
try {
|
|
25354
|
+
return statSync2(abs).size > MAX_EXCERPT_BYTES;
|
|
25355
|
+
} catch {
|
|
25356
|
+
return false;
|
|
25357
|
+
}
|
|
25358
|
+
}
|
|
25359
|
+
function readFileExcerpt(cwd, candidate, line, range) {
|
|
25350
25360
|
const abs = resolveFileInCwd(cwd, candidate);
|
|
25351
25361
|
if (abs === null)
|
|
25352
25362
|
return null;
|
|
@@ -25373,7 +25383,10 @@ function readFileExcerpt(cwd, candidate, line) {
|
|
|
25373
25383
|
const totalLines = allLines.length;
|
|
25374
25384
|
let startLine;
|
|
25375
25385
|
let endLine;
|
|
25376
|
-
if (
|
|
25386
|
+
if (range !== undefined) {
|
|
25387
|
+
startLine = Math.min(Math.max(1, range.start), totalLines);
|
|
25388
|
+
endLine = Math.min(totalLines, Math.max(range.end, startLine));
|
|
25389
|
+
} else if (line !== undefined && line >= 1) {
|
|
25377
25390
|
const target = Math.min(line, totalLines);
|
|
25378
25391
|
startLine = Math.max(1, target - EXCERPT_RADIUS);
|
|
25379
25392
|
endLine = Math.min(totalLines, target + EXCERPT_RADIUS);
|
|
@@ -25469,23 +25482,23 @@ import { chmodSync as chmodSync2, existsSync as existsSync5, mkdirSync as mkdirS
|
|
|
25469
25482
|
import { mkdtemp, rm } from "fs/promises";
|
|
25470
25483
|
import { tmpdir } from "os";
|
|
25471
25484
|
import { dirname as dirname5, join as join8 } from "path";
|
|
25472
|
-
var RUMDL_VERSION = "0.2.
|
|
25485
|
+
var RUMDL_VERSION = "0.2.47";
|
|
25473
25486
|
var ASSETS = {
|
|
25474
25487
|
"darwin-arm64": {
|
|
25475
25488
|
url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-aarch64-apple-darwin.tar.gz`,
|
|
25476
|
-
sha256: "
|
|
25489
|
+
sha256: "10dc23e994327ecc6e98d285802fcad1174608f203062cb18bac55b51976e0cb"
|
|
25477
25490
|
},
|
|
25478
25491
|
"darwin-x64": {
|
|
25479
25492
|
url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-x86_64-apple-darwin.tar.gz`,
|
|
25480
|
-
sha256: "
|
|
25493
|
+
sha256: "9a2bf0c692310e0469fdc66fa83f74579cf0331cc1f9b306b25849cffd146c0f"
|
|
25481
25494
|
},
|
|
25482
25495
|
"linux-arm64": {
|
|
25483
25496
|
url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-aarch64-unknown-linux-musl.tar.gz`,
|
|
25484
|
-
sha256: "
|
|
25497
|
+
sha256: "b5ab4207b92c0bf0ea6d8946f15545c787e8cf6ecf2176d9e7f26c43aead86a8"
|
|
25485
25498
|
},
|
|
25486
25499
|
"linux-x64": {
|
|
25487
25500
|
url: `https://github.com/rvben/rumdl/releases/download/v${RUMDL_VERSION}/rumdl-v${RUMDL_VERSION}-x86_64-unknown-linux-musl.tar.gz`,
|
|
25488
|
-
sha256: "
|
|
25501
|
+
sha256: "bd4049763e93d6c25420ec086dee6690af31efc85af463c3ecf5d686a5fcf762"
|
|
25489
25502
|
}
|
|
25490
25503
|
};
|
|
25491
25504
|
function rumdlAsset(platform = process.platform, arch = process.arch) {
|
|
@@ -25501,6 +25514,8 @@ code-blocks = false
|
|
|
25501
25514
|
tables = false
|
|
25502
25515
|
reflow = true
|
|
25503
25516
|
reflow-mode = "normalize"
|
|
25517
|
+
reflow-length-exemptions = true
|
|
25518
|
+
ignore-link-urls = true
|
|
25504
25519
|
`;
|
|
25505
25520
|
async function downloadRumdl(binPath, asset, fetchImpl = fetch) {
|
|
25506
25521
|
const res = await fetchImpl(asset.url);
|
|
@@ -25807,6 +25822,9 @@ function createServer(opts) {
|
|
|
25807
25822
|
function notFound() {
|
|
25808
25823
|
return new Response("not found", { status: 404 });
|
|
25809
25824
|
}
|
|
25825
|
+
function tooLarge() {
|
|
25826
|
+
return new Response("too large", { status: 413 });
|
|
25827
|
+
}
|
|
25810
25828
|
function handleHealth() {
|
|
25811
25829
|
const body = {
|
|
25812
25830
|
...IDENTITY,
|
|
@@ -25928,10 +25946,18 @@ function createServer(opts) {
|
|
|
25928
25946
|
return notFound();
|
|
25929
25947
|
const params = new URL(req.url).searchParams;
|
|
25930
25948
|
const path = params.get("path") ?? "";
|
|
25931
|
-
const
|
|
25932
|
-
|
|
25933
|
-
|
|
25934
|
-
|
|
25949
|
+
const num = (key) => {
|
|
25950
|
+
const raw = params.get(key);
|
|
25951
|
+
return raw !== null && /^\d+$/.test(raw) ? Number(raw) : undefined;
|
|
25952
|
+
};
|
|
25953
|
+
const line = num("line");
|
|
25954
|
+
const start = num("start");
|
|
25955
|
+
const end = num("end");
|
|
25956
|
+
const range = start !== undefined && end !== undefined ? { start, end } : undefined;
|
|
25957
|
+
const excerpt = readFileExcerpt(r.cwd, path, line, range);
|
|
25958
|
+
if (excerpt)
|
|
25959
|
+
return Response.json(excerpt);
|
|
25960
|
+
return isFileTooLargeToPreview(r.cwd, path) ? tooLarge() : notFound();
|
|
25935
25961
|
}
|
|
25936
25962
|
async function handleDecision(id) {
|
|
25937
25963
|
const inMem = store.get(id);
|
package/opencode/caret.plugin.ts
CHANGED
|
@@ -12,8 +12,10 @@
|
|
|
12
12
|
//
|
|
13
13
|
// Subagent-bypass mitigation: OpenCode's tool.execute.before does not fire for
|
|
14
14
|
// subagent tool calls, so caret does NOT rely on a hook to gate subagents. The
|
|
15
|
-
// config hook
|
|
16
|
-
//
|
|
15
|
+
// config hook marks the tool primary-only (experimental.primary_tools), which
|
|
16
|
+
// OpenCode turns into a deny rule on every subagent session it creates, and the
|
|
17
|
+
// tool body re-checks the calling session's shape — defense in depth. Any PRIMARY
|
|
18
|
+
// agent may ask for a review; only the plan agent is steered toward it.
|
|
17
19
|
//
|
|
18
20
|
// This file runs in-process inside OpenCode. It ships in the @macintacos/caret npm
|
|
19
21
|
// package; OpenCode loads it when the package is in the user's `plugin` array, and
|
|
@@ -78,7 +80,7 @@ export function resolveCaretVersion(opts: {
|
|
|
78
80
|
export const REVIEW_TOOL = "caret_review_plan";
|
|
79
81
|
|
|
80
82
|
/** OpenCode's built-in primary planning agent — the one agent caret steers toward
|
|
81
|
-
* the review tool and
|
|
83
|
+
* the review tool and warms the daemon for. */
|
|
82
84
|
export const PLANNING_AGENTS = ["plan"] as const;
|
|
83
85
|
|
|
84
86
|
export interface CaretDecision {
|
|
@@ -148,8 +150,9 @@ function failsafeDeny(feedback: string): CaretDecision {
|
|
|
148
150
|
return { behavior: "deny", feedback };
|
|
149
151
|
}
|
|
150
152
|
|
|
151
|
-
/**
|
|
152
|
-
*
|
|
153
|
+
/** True for the planning agent(s) caret treats specially — the planning steer and
|
|
154
|
+
* the daemon warm-up both fire only for them. Not a permission check: the review
|
|
155
|
+
* tool itself is open to every primary agent. */
|
|
153
156
|
export function isPlanningAgent(agent: string | undefined): boolean {
|
|
154
157
|
return agent !== undefined && (PLANNING_AGENTS as readonly string[]).includes(agent);
|
|
155
158
|
}
|
|
@@ -178,9 +181,12 @@ export function approvedMessage(notes?: string): string {
|
|
|
178
181
|
|
|
179
182
|
/** Tool result returned to the agent on a change request: the reviewer feedback
|
|
180
183
|
* and a resubmit instruction. The plan itself is NOT echoed — the agent already
|
|
181
|
-
* has it in its own `caret_review_plan` tool-call args,
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
+
* has it in its own `caret_review_plan` tool-call args, so re-pasting the full
|
|
185
|
+
* plan every round is redundant. The feedback's line references index caret's
|
|
186
|
+
* STORED plan version, rumdl-reflowed to 90 columns at ingest (src/plan/markdown.ts),
|
|
187
|
+
* so they need not line up with the agent's copy; the abbreviated quote paired
|
|
188
|
+
* with each one (see `abbreviate` in ui/src/lib/feedback.ts) is what the agent
|
|
189
|
+
* matches against its own text. */
|
|
184
190
|
export function deniedMessage(feedback: string): string {
|
|
185
191
|
return [
|
|
186
192
|
"caret: the user requested CHANGES to this plan.",
|
|
@@ -210,7 +216,7 @@ export function parseReviewUrl(stderr: string): string | undefined {
|
|
|
210
216
|
* shows the tool's `metadata` title. */
|
|
211
217
|
const REVIEW_TOAST_TITLE = "caret: review this plan";
|
|
212
218
|
|
|
213
|
-
/** OpenCode's plugin client, structurally narrowed to the
|
|
219
|
+
/** OpenCode's plugin client, structurally narrowed to the calls caret makes.
|
|
214
220
|
* A structural type (rather than importing the SDK client) keeps this robust
|
|
215
221
|
* against version skew between the pinned plugin SDK and the running OpenCode. */
|
|
216
222
|
type ToastBody = {
|
|
@@ -221,6 +227,16 @@ type ToastBody = {
|
|
|
221
227
|
};
|
|
222
228
|
type ToastClient = { tui?: { showToast?: (opts: { body: ToastBody }) => unknown } } | undefined;
|
|
223
229
|
|
|
230
|
+
/** The same client, narrowed to the session read the review tool's subagent check
|
|
231
|
+
* makes — narrowed separately, and for the same skew-safety reason, so each helper
|
|
232
|
+
* declares exactly the one call it performs. */
|
|
233
|
+
type SessionClient =
|
|
234
|
+
| { session?: { get?: (opts: { path: { id: string } }) => unknown } }
|
|
235
|
+
| undefined;
|
|
236
|
+
|
|
237
|
+
/** What OpenCode actually hands the plugin: both narrowings at once. */
|
|
238
|
+
type CaretClient = NonNullable<ToastClient> & NonNullable<SessionClient>;
|
|
239
|
+
|
|
224
240
|
/** How long the pending review-link toast stays up. Long enough to outlast a
|
|
225
241
|
* review; on a decision we supersede it with the short toast below, so this
|
|
226
242
|
* ceiling only bites if the review process dies without ever deciding. */
|
|
@@ -243,6 +259,26 @@ function showToast(client: ToastClient, body: ToastBody): void {
|
|
|
243
259
|
}
|
|
244
260
|
}
|
|
245
261
|
|
|
262
|
+
/** True when this tool call arrived from a subagent — a `parentID` on the calling
|
|
263
|
+
* session, which OpenCode's `task` tool always sets and an agent-name test cannot
|
|
264
|
+
* see. Failure falls back to ALLOW, deliberately inverting this file's failsafeDeny
|
|
265
|
+
* convention; both choices are argued in `doc/agents/opencode-integration.md` § The
|
|
266
|
+
* subagent bypass. Not raced against a timeout: the call is loopback to OpenCode's
|
|
267
|
+
* own server, so a hang is out of scope. Called as `session.get(...)` so the SDK
|
|
268
|
+
* client keeps its `this` binding. */
|
|
269
|
+
async function isSubagentSession(client: SessionClient, sessionID: string): Promise<boolean> {
|
|
270
|
+
const session = client?.session;
|
|
271
|
+
if (!session || typeof session.get !== "function") return false;
|
|
272
|
+
try {
|
|
273
|
+
const res = (await session.get({ path: { id: sessionID } })) as {
|
|
274
|
+
data?: { parentID?: unknown } | null;
|
|
275
|
+
};
|
|
276
|
+
return typeof res?.data?.parentID === "string";
|
|
277
|
+
} catch {
|
|
278
|
+
return false;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
246
282
|
// --- version-check toast (EXC-794) -----------------------------------------
|
|
247
283
|
|
|
248
284
|
/** caret's latest-release endpoint. Unauthenticated GitHub API — throttled to at
|
|
@@ -420,10 +456,14 @@ type LooseConfig = {
|
|
|
420
456
|
agent?: Record<string, LooseAgent>;
|
|
421
457
|
} & Record<string, unknown>;
|
|
422
458
|
|
|
423
|
-
/** Mutate the OpenCode config in place to
|
|
424
|
-
* subagents cannot call it
|
|
425
|
-
*
|
|
426
|
-
*
|
|
459
|
+
/** Mutate the OpenCode config in place to mark the review tool primary-only, so
|
|
460
|
+
* subagents cannot call it. Every primary agent may call it — OpenCode's base
|
|
461
|
+
* ruleset permits an unknown tool id, so the absence of a per-agent entry is what
|
|
462
|
+
* makes it available. The mechanism and the reasoning are in
|
|
463
|
+
* `doc/agents/opencode-integration.md` § The subagent bypass.
|
|
464
|
+
*
|
|
465
|
+
* Idempotent and preservation-safe: existing primary_tools, agent modes, and other
|
|
466
|
+
* permissions survive, as does a user's own entry for the review tool. */
|
|
427
467
|
export function applyCaretConfig(config: LooseConfig): void {
|
|
428
468
|
config.experimental ??= {};
|
|
429
469
|
const pt = Array.isArray(config.experimental.primary_tools)
|
|
@@ -431,9 +471,14 @@ export function applyCaretConfig(config: LooseConfig): void {
|
|
|
431
471
|
: [];
|
|
432
472
|
if (!pt.includes(REVIEW_TOOL)) config.experimental.primary_tools = [...pt, REVIEW_TOOL];
|
|
433
473
|
|
|
434
|
-
for (const name of PLANNING_AGENTS)
|
|
435
|
-
|
|
436
|
-
|
|
474
|
+
for (const name of PLANNING_AGENTS) {
|
|
475
|
+
// The plan agent is the one that depends on the tool, so rescue it from a
|
|
476
|
+
// restrictive global `permission: { "*": "deny" }` — agent-level permission
|
|
477
|
+
// merges after the global ruleset. Written only when the agent has no entry for
|
|
478
|
+
// this tool id: a `"*"` catch-all is deliberately overridden, an explicit entry
|
|
479
|
+
// for the tool is not.
|
|
480
|
+
ensurePermission(ensureAgent(config, name))[REVIEW_TOOL] ??= "allow";
|
|
481
|
+
}
|
|
437
482
|
}
|
|
438
483
|
|
|
439
484
|
function ensureAgent(config: LooseConfig, name: string): LooseAgent {
|
|
@@ -452,10 +497,6 @@ function ensurePermission(agent: LooseAgent): Record<string, unknown> {
|
|
|
452
497
|
return agent.permission as Record<string, unknown>;
|
|
453
498
|
}
|
|
454
499
|
|
|
455
|
-
function setToolPermission(config: LooseConfig, agentName: string, action: "allow" | "deny"): void {
|
|
456
|
-
ensurePermission(ensureAgent(config, agentName))[REVIEW_TOOL] = action;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
500
|
// --- the spawn bridge ----------------------------------------------------------
|
|
460
501
|
|
|
461
502
|
/** Runs `caret review`, returning its captured stdout. Injected so execute() is
|
|
@@ -581,24 +622,37 @@ export function createCaretPlugin(
|
|
|
581
622
|
|
|
582
623
|
return async (input) => {
|
|
583
624
|
// OpenCode gives every plugin its SDK client; caret uses it to surface the
|
|
584
|
-
// review link as a toast (EXC-691)
|
|
585
|
-
|
|
625
|
+
// review link as a toast (EXC-691) and to read the calling session's shape.
|
|
626
|
+
// Narrowed structurally for skew-safety.
|
|
627
|
+
const client = (input as { client?: CaretClient }).client;
|
|
586
628
|
// Best-effort startup update nudge (EXC-794); fire-and-forget so it never
|
|
587
629
|
// delays plugin load. Only the production default export wires this.
|
|
588
630
|
if (opts.checkUpdate) opts.checkUpdate(client);
|
|
631
|
+
// The agent driving each session, recorded by chat.message and read by
|
|
632
|
+
// system.transform, which carries no agent of its own. Why a map is the only
|
|
633
|
+
// route: `doc/agents/opencode-integration.md` § Why gating the steer needs a
|
|
634
|
+
// session→agent map. One instance per plugin, closed over rather than
|
|
635
|
+
// module-global, so a test constructs a fresh one.
|
|
636
|
+
const sessionAgents = new Map<string, string>();
|
|
589
637
|
const hooks: Hooks = {
|
|
590
|
-
// Restrict the review tool to primary agents
|
|
638
|
+
// Restrict the review tool to primary agents (see applyCaretConfig).
|
|
591
639
|
config: async (config) => {
|
|
592
640
|
applyCaretConfig(config as unknown as LooseConfig);
|
|
593
641
|
},
|
|
594
|
-
//
|
|
642
|
+
// Two jobs. (1) Record the session's agent, ALWAYS — it is what the steer
|
|
643
|
+
// below gates on. (2) Warm the daemon, for the PLAN AGENT ONLY, so the first
|
|
595
644
|
// caret_review_plan call doesn't pay the cold-spawn cost. This is
|
|
596
645
|
// OpenCode's counterpart to Claude Code's PostToolUse/EnterPlanMode
|
|
597
646
|
// prewarm hook — the closest-to-submission signal the plugin API offers.
|
|
598
647
|
// Deliberately per-message and unthrottled: the daemon idle-exits after
|
|
599
648
|
// [daemon].idle_ms (60s default), so a once-per-session warm would be
|
|
600
|
-
// dead long before the plan lands.
|
|
649
|
+
// dead long before the plan lands. The warm stays plan-only even though any
|
|
650
|
+
// primary agent may call the tool: the plan agent is the one whose turn
|
|
651
|
+
// reliably ends in a review, and warming on every build message would spawn
|
|
652
|
+
// a process on the session's busiest traffic to save ~0.4s in the rare case.
|
|
601
653
|
"chat.message": async (input) => {
|
|
654
|
+
// A message whose agent is unknown must not clobber the recorded one.
|
|
655
|
+
if (input.sessionID && input.agent) sessionAgents.set(input.sessionID, input.agent);
|
|
602
656
|
if (!isPlanningAgent(input.agent)) return;
|
|
603
657
|
try {
|
|
604
658
|
warm(bin);
|
|
@@ -607,8 +661,16 @@ export function createCaretPlugin(
|
|
|
607
661
|
}
|
|
608
662
|
},
|
|
609
663
|
// Steer the Plan agent to submit its plan to caret instead of plan_exit.
|
|
610
|
-
|
|
611
|
-
|
|
664
|
+
// Only the plan agent: every other primary agent may call the review tool
|
|
665
|
+
// but is not prompted toward it. A session with no recorded agent gets no
|
|
666
|
+
// steer rather than a wrong one — which also keeps it out of the second
|
|
667
|
+
// call site (Agent.generate, generating an agent config, passes no session).
|
|
668
|
+
// A turn that reaches the model without a preceding chat.message therefore
|
|
669
|
+
// misses the steer; the tool.definition hook below is the safety net, since
|
|
670
|
+
// it points plan_exit — permitted only on the plan agent — at caret.
|
|
671
|
+
"experimental.chat.system.transform": async (input, output) => {
|
|
672
|
+
const agent = input.sessionID ? sessionAgents.get(input.sessionID) : undefined;
|
|
673
|
+
if (isPlanningAgent(agent)) output.system.push(planningSteer());
|
|
612
674
|
},
|
|
613
675
|
// Redirect the native plan_exit tool's description toward caret's tool.
|
|
614
676
|
"tool.definition": async (input, output) => {
|
|
@@ -626,9 +688,8 @@ export function createCaretPlugin(
|
|
|
626
688
|
.describe("The complete plan, as markdown, to present for human review."),
|
|
627
689
|
},
|
|
628
690
|
async execute(args, context) {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
return `${REVIEW_TOOL} is restricted to the plan agent (${PLANNING_AGENTS.join(", ")}); it was called by "${agent ?? "unknown"}". Continue without caret review, or switch to the plan agent and resubmit.`;
|
|
691
|
+
if (await isSubagentSession(client, context.sessionID)) {
|
|
692
|
+
return `${REVIEW_TOOL} is available to primary agents only; this call came from a subagent session. Continue without caret review, or hand the plan back to the primary agent to submit.`;
|
|
632
693
|
}
|
|
633
694
|
const envelope = buildEnvelope(args.plan, {
|
|
634
695
|
sessionID: context.sessionID,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@macintacos/caret",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as e}from"./index-CDxgCCFg.js";import{t}from"./html-DnBxHgUN.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{O as e}from"./index-CtmSI3Ho.js";import{t}from"./html-63fn47vQ.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};
|