@skaldapp/monaco-sfc 1.1.51 → 1.1.53

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 (2) hide show
  1. package/dist/vue.worker.js +982 -892
  2. package/package.json +9 -9
@@ -6,7 +6,14 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
+ var __esmMin = (fn, res, err) => () => {
10
+ if (err) throw err[0];
11
+ try {
12
+ return fn && (res = fn(fn = 0)), res;
13
+ } catch (e) {
14
+ throw err = [e], e;
15
+ }
16
+ };
10
17
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
18
  var __exportAll = (all, no_symbols) => {
12
19
  let target = {};
@@ -1571,8 +1578,8 @@ var require_jsdelivr = /* @__PURE__ */ __commonJSMin(((exports) => {
1571
1578
  if (k2 === void 0) k2 = k;
1572
1579
  o[k2] = m[k];
1573
1580
  }));
1574
- var __exportStar = exports && exports.__exportStar || function(m, exports$12) {
1575
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding(exports$12, m, p);
1581
+ var __exportStar = exports && exports.__exportStar || function(m, exports$11) {
1582
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$11, p)) __createBinding(exports$11, m, p);
1576
1583
  };
1577
1584
  Object.defineProperty(exports, "__esModule", { value: true });
1578
1585
  __exportStar(require_npm(), exports);
@@ -1761,8 +1768,8 @@ var require_source_map = /* @__PURE__ */ __commonJSMin(((exports) => {
1761
1768
  if (k2 === void 0) k2 = k;
1762
1769
  o[k2] = m[k];
1763
1770
  }));
1764
- var __exportStar = exports && exports.__exportStar || function(m, exports$11) {
1765
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$11, p)) __createBinding(exports$11, m, p);
1771
+ var __exportStar = exports && exports.__exportStar || function(m, exports$10) {
1772
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$10, p)) __createBinding(exports$10, m, p);
1766
1773
  };
1767
1774
  Object.defineProperty(exports, "__esModule", { value: true });
1768
1775
  __exportStar(require_sourceMap(), exports);
@@ -2003,8 +2010,8 @@ var require_language_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
2003
2010
  if (k2 === void 0) k2 = k;
2004
2011
  o[k2] = m[k];
2005
2012
  }));
2006
- var __exportStar = exports && exports.__exportStar || function(m, exports$10) {
2007
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$10, p)) __createBinding(exports$10, m, p);
2013
+ var __exportStar = exports && exports.__exportStar || function(m, exports$9) {
2014
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$9, p)) __createBinding(exports$9, m, p);
2008
2015
  };
2009
2016
  Object.defineProperty(exports, "__esModule", { value: true });
2010
2017
  exports.defaultMapperFactory = exports.SourceMap = void 0;
@@ -5932,8 +5939,8 @@ var require_language_service$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5932
5939
  if (k2 === void 0) k2 = k;
5933
5940
  o[k2] = m[k];
5934
5941
  }));
5935
- var __exportStar = exports && exports.__exportStar || function(m, exports$9) {
5936
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$9, p)) __createBinding(exports$9, m, p);
5942
+ var __exportStar = exports && exports.__exportStar || function(m, exports$8) {
5943
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$8, p)) __createBinding(exports$8, m, p);
5937
5944
  };
5938
5945
  Object.defineProperty(exports, "__esModule", { value: true });
5939
5946
  exports.mergeWorkspaceEdits = void 0;
@@ -6436,14 +6443,16 @@ var require_decorateProgram = /* @__PURE__ */ __commonJSMin(((exports) => {
6436
6443
  if (!sourceFile) return getSyntacticDiagnostics(void 0, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d);
6437
6444
  else {
6438
6445
  const [serviceScript, targetScript, sourceScript] = (0, utils_1.getServiceScript)(language, sourceFile.fileName);
6439
- return getSyntacticDiagnostics(targetScript ? program.getSourceFile(targetScript.id) : sourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6446
+ const actualSourceFile = targetScript ? program.getSourceFile(targetScript.id) : sourceFile;
6447
+ return getSyntacticDiagnostics(actualSourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6440
6448
  }
6441
6449
  };
6442
6450
  program.getSemanticDiagnostics = (sourceFile, cancellationToken) => {
6443
6451
  if (!sourceFile) return getSemanticDiagnostics(void 0, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d);
6444
6452
  else {
6445
6453
  const [serviceScript, targetScript, sourceScript] = (0, utils_1.getServiceScript)(language, sourceFile.fileName);
6446
- return getSemanticDiagnostics(targetScript ? program.getSourceFile(targetScript.id) : sourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6454
+ const actualSourceFile = targetScript ? program.getSourceFile(targetScript.id) : sourceFile;
6455
+ return getSemanticDiagnostics(actualSourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || !d.file || language.scripts.get(d.file.fileName) === sourceScript);
6447
6456
  }
6448
6457
  };
6449
6458
  program.getGlobalDiagnostics = (cancellationToken) => {
@@ -6453,7 +6462,8 @@ var require_decorateProgram = /* @__PURE__ */ __commonJSMin(((exports) => {
6453
6462
  if (!sourceFile) return getBindAndCheckDiagnostics(void 0, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d);
6454
6463
  else {
6455
6464
  const [serviceScript, targetScript, sourceScript] = (0, utils_1.getServiceScript)(language, sourceFile.fileName);
6456
- return getBindAndCheckDiagnostics(targetScript ? program.getSourceFile(targetScript.id) : sourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || language.scripts.get(d.file.fileName) === sourceScript);
6465
+ const actualSourceFile = targetScript ? program.getSourceFile(targetScript.id) : sourceFile;
6466
+ return getBindAndCheckDiagnostics(actualSourceFile, cancellationToken).map((d) => (0, transform_1.transformDiagnostic)(language, d, program, true)).filter((d) => !!d).filter((d) => !serviceScript || language.scripts.get(d.file.fileName) === sourceScript);
6457
6467
  }
6458
6468
  };
6459
6469
  program.getSourceFileByPath = (path) => {
@@ -6855,8 +6865,8 @@ var require_proxyLanguageService = /* @__PURE__ */ __commonJSMin(((exports) => {
6855
6865
  combine.displayParts = combine.displayParts?.slice();
6856
6866
  combine.documentation = combine.documentation?.slice();
6857
6867
  combine.tags = combine.tags?.slice();
6858
- const displayPartsStrs = new Set([displayPartsToString(infos[0].displayParts)]);
6859
- const documentationStrs = new Set([displayPartsToString(infos[0].documentation)]);
6868
+ const displayPartsStrs = /* @__PURE__ */ new Set([displayPartsToString(infos[0].displayParts)]);
6869
+ const documentationStrs = /* @__PURE__ */ new Set([displayPartsToString(infos[0].documentation)]);
6860
6870
  const tagsStrs = /* @__PURE__ */ new Set();
6861
6871
  for (const tag of infos[0].tags ?? []) tagsStrs.add(tag.name + "__volar__" + displayPartsToString(tag.text));
6862
6872
  for (let i = 1; i < infos.length; i++) {
@@ -8872,8 +8882,8 @@ var require_typescript$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
8872
8882
  if (k2 === void 0) k2 = k;
8873
8883
  o[k2] = m[k];
8874
8884
  }));
8875
- var __exportStar = exports && exports.__exportStar || function(m, exports$8) {
8876
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$8, p)) __createBinding(exports$8, m, p);
8885
+ var __exportStar = exports && exports.__exportStar || function(m, exports$7) {
8886
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$7, p)) __createBinding(exports$7, m, p);
8877
8887
  };
8878
8888
  Object.defineProperty(exports, "__esModule", { value: true });
8879
8889
  __exportStar(require_common$3(), exports);
@@ -9515,58 +9525,97 @@ var WorkerLanguageService = class {
9515
9525
  //#region node_modules/@vue/language-core/lib/codegen/codeFeatures.js
9516
9526
  var require_codeFeatures = /* @__PURE__ */ __commonJSMin(((exports) => {
9517
9527
  Object.defineProperty(exports, "__esModule", { value: true });
9518
- exports.codeFeatures = void 0;
9519
- exports.codeFeatures = {
9528
+ exports.allCodeFeatures = exports.codeFeatures = void 0;
9529
+ exports.codeFeatures = defineCodeFeatures({
9530
+ full: {
9531
+ verification: true,
9532
+ completion: true,
9533
+ semantic: true,
9534
+ navigation: true,
9535
+ structure: true,
9536
+ format: true
9537
+ },
9538
+ /** @internal */
9520
9539
  all: {
9521
9540
  verification: true,
9522
9541
  completion: true,
9523
9542
  semantic: true,
9524
9543
  navigation: true
9525
9544
  },
9545
+ /** @internal */
9526
9546
  importCompletionOnly: { __importCompletion: true },
9547
+ /** @internal */
9527
9548
  verification: { verification: true },
9549
+ /** @internal */
9528
9550
  completion: { completion: true },
9551
+ /** @internal */
9529
9552
  withoutCompletion: {
9530
9553
  verification: true,
9531
9554
  semantic: true,
9532
9555
  navigation: true
9533
9556
  },
9557
+ /** @internal */
9534
9558
  navigation: { navigation: true },
9559
+ /** @internal */
9535
9560
  navigationWithoutRename: { navigation: { shouldRename: () => false } },
9561
+ /** @internal */
9536
9562
  navigationAndCompletion: {
9537
9563
  navigation: true,
9538
9564
  completion: true
9539
9565
  },
9566
+ /** @internal */
9540
9567
  navigationAndVerification: {
9541
9568
  navigation: true,
9542
9569
  verification: true
9543
9570
  },
9571
+ /** @internal */
9544
9572
  withoutNavigation: {
9545
9573
  verification: true,
9546
9574
  completion: true,
9547
9575
  semantic: true
9548
9576
  },
9577
+ /** @internal */
9549
9578
  semanticWithoutHighlight: { semantic: { shouldHighlight: () => false } },
9579
+ /** @internal */
9550
9580
  withoutHighlight: {
9551
9581
  semantic: { shouldHighlight: () => false },
9552
9582
  verification: true,
9553
9583
  navigation: true,
9554
9584
  completion: true
9555
9585
  },
9586
+ /** @internal */
9556
9587
  withoutHighlightAndCompletion: {
9557
9588
  semantic: { shouldHighlight: () => false },
9558
9589
  verification: true,
9559
9590
  navigation: true
9560
9591
  },
9592
+ /** @internal */
9561
9593
  withoutSemantic: {
9562
9594
  verification: true,
9563
9595
  navigation: true,
9564
9596
  completion: true
9565
9597
  },
9598
+ /** @internal */
9599
+ structure: { structure: true },
9600
+ /** @internal */
9601
+ structureAndFormat: {
9602
+ structure: true,
9603
+ format: true
9604
+ },
9605
+ /** @internal */
9606
+ format: { format: true },
9607
+ /** @internal */
9566
9608
  doNotReportTs2339AndTs2551: { verification: { shouldReport: (_source, code) => String(code) !== "2339" && String(code) !== "2551" } },
9609
+ /** @internal */
9567
9610
  doNotReportTs2353AndTs2561: { verification: { shouldReport: (_source, code) => String(code) !== "2353" && String(code) !== "2561" } },
9611
+ /** @internal */
9568
9612
  doNotReportTs6133: { verification: { shouldReport: (_source, code) => String(code) !== "6133" } }
9569
- };
9613
+ });
9614
+ /** @deprecated use `codeFeatures.full` instead */
9615
+ exports.allCodeFeatures = exports.codeFeatures.full;
9616
+ function defineCodeFeatures(features) {
9617
+ return features;
9618
+ }
9570
9619
  }));
9571
9620
  //#endregion
9572
9621
  //#region node_modules/@vue/language-core/lib/codegen/names.js
@@ -9625,13 +9674,11 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
9625
9674
  ConstructorOverloads: "",
9626
9675
  Elements: "",
9627
9676
  EmitsToProps: "",
9628
- FunctionalComponent0: "",
9629
- FunctionalComponent1: "",
9630
- FunctionalComponentCtx: "",
9631
- FunctionalComponentProps: "",
9677
+ ExtractComponentContext: "",
9678
+ ExtractComponentProps: "",
9679
+ FunctionalComponent: "",
9632
9680
  IsAny: "",
9633
9681
  IsFunction: "",
9634
- NormalizeComponentEvent: "",
9635
9682
  NormalizeEmits: "",
9636
9683
  OverloadUnion: "",
9637
9684
  OverloadUnionInner: "",
@@ -9639,6 +9686,7 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
9639
9686
  PrettifyGlobal: "",
9640
9687
  ResolveDirectives: "",
9641
9688
  ResolveEmits: "",
9689
+ ResolveEvent: "",
9642
9690
  ShortEmits: "",
9643
9691
  ShortEmitsToObject: "",
9644
9692
  SpreadMerge: "",
@@ -9650,15 +9698,15 @@ var require_names = /* @__PURE__ */ __commonJSMin(((exports) => {
9650
9698
  //#region node_modules/@vue/language-core/lib/codegen/utils/index.js
9651
9699
  var require_utils$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
9652
9700
  Object.defineProperty(exports, "__esModule", { value: true });
9653
- exports.identifierRegex = exports.endOfLine = exports.newLine = void 0;
9701
+ exports.identifierRE = exports.endOfLine = exports.newLine = void 0;
9654
9702
  exports.getTypeScriptAST = getTypeScriptAST;
9655
9703
  exports.generateSfcBlockSection = generateSfcBlockSection;
9656
9704
  exports.forEachNode = forEachNode;
9657
9705
  var codeFeatures_1 = require_codeFeatures();
9658
9706
  exports.newLine = `\n`;
9659
9707
  exports.endOfLine = `;${exports.newLine}`;
9660
- exports.identifierRegex = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
9661
- var cacheMaps = /* @__PURE__ */ new Map();
9708
+ exports.identifierRE = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
9709
+ var cacheMaps = /* @__PURE__ */ new WeakMap();
9662
9710
  function getTypeScriptAST(ts, block, text) {
9663
9711
  if (!cacheMaps.has(block)) cacheMaps.set(block, [block.content, /* @__PURE__ */ new Map()]);
9664
9712
  const cacheMap = cacheMaps.get(block);
@@ -9715,29 +9763,34 @@ var require_utils$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
9715
9763
  //#region node_modules/@vue/language-core/lib/codegen/utils/boundary.js
9716
9764
  var require_boundary = /* @__PURE__ */ __commonJSMin(((exports) => {
9717
9765
  Object.defineProperty(exports, "__esModule", { value: true });
9718
- exports.startBoundary = startBoundary;
9719
- exports.endBoundary = endBoundary;
9720
- function* startBoundary(source, startOffset, features) {
9721
- const token = Symbol(source);
9722
- yield [
9723
- "",
9724
- source,
9725
- startOffset,
9726
- {
9766
+ exports.Boundary = void 0;
9767
+ exports.Boundary = class Boundary {
9768
+ constructor(source, features) {
9769
+ this.source = source;
9770
+ this.features = features;
9771
+ }
9772
+ static *start(source, offset, features) {
9773
+ features = {
9727
9774
  ...features,
9728
- __combineToken: token
9729
- }
9730
- ];
9731
- return token;
9732
- }
9733
- function endBoundary(token, endOffset) {
9734
- return [
9735
- "",
9736
- token.description,
9737
- endOffset,
9738
- { __combineToken: token }
9739
- ];
9740
- }
9775
+ __combineToken: Symbol()
9776
+ };
9777
+ yield [
9778
+ ``,
9779
+ source,
9780
+ offset,
9781
+ features
9782
+ ];
9783
+ return new Boundary(source, features);
9784
+ }
9785
+ end(offset) {
9786
+ return [
9787
+ ``,
9788
+ this.source,
9789
+ offset,
9790
+ this.features
9791
+ ];
9792
+ }
9793
+ };
9741
9794
  }));
9742
9795
  //#endregion
9743
9796
  //#region node_modules/@vue/shared/dist/shared.esm-bundler.js
@@ -9817,7 +9870,7 @@ var shared_esm_bundler_exports = /* @__PURE__ */ __exportAll({
9817
9870
  toTypeString: () => toTypeString
9818
9871
  });
9819
9872
  /**
9820
- * @vue/shared v3.5.35
9873
+ * @vue/shared v3.5.39
9821
9874
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
9822
9875
  * @license MIT
9823
9876
  **/
@@ -10232,7 +10285,7 @@ var init_shared_esm_bundler = __esmMin((() => {
10232
10285
  //#endregion
10233
10286
  //#region node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js
10234
10287
  /**
10235
- * @vue/compiler-core v3.5.35
10288
+ * @vue/compiler-core v3.5.39
10236
10289
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
10237
10290
  * @license MIT
10238
10291
  **/
@@ -11219,6 +11272,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
11219
11272
  imports: [],
11220
11273
  cached: [],
11221
11274
  constantCache: /* @__PURE__ */ new WeakMap(),
11275
+ vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
11222
11276
  temps: 0,
11223
11277
  identifiers: /* @__PURE__ */ Object.create(null),
11224
11278
  scopes: {
@@ -12381,7 +12435,7 @@ function rewriteFilter(node, context) {
12381
12435
  const child = node.children[i];
12382
12436
  if (typeof child !== "object") continue;
12383
12437
  if (child.type === 4) parseFilter(child, context);
12384
- else if (child.type === 8) rewriteFilter(node, context);
12438
+ else if (child.type === 8) rewriteFilter(child, context);
12385
12439
  else if (child.type === 5) rewriteFilter(child.content, context);
12386
12440
  }
12387
12441
  }
@@ -13916,7 +13970,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13916
13970
  }
13917
13971
  },
13918
13972
  oncdata(start, end) {
13919
- if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
13973
+ if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
13920
13974
  else emitError(1, start - 9);
13921
13975
  },
13922
13976
  onprocessinginstruction(start) {
@@ -13952,7 +14006,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13952
14006
  if (dir.type === 7 && dir.name !== "for") {
13953
14007
  const exp = dir.exp;
13954
14008
  const arg = dir.arg;
13955
- if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
14009
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
13956
14010
  if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
13957
14011
  }
13958
14012
  }
@@ -14538,7 +14592,7 @@ var compiler_dom_esm_bundler_exports = /* @__PURE__ */ __exportAll({
14538
14592
  warnDeprecation: () => warnDeprecation
14539
14593
  });
14540
14594
  /**
14541
- * @vue/compiler-dom v3.5.35
14595
+ * @vue/compiler-dom v3.5.39
14542
14596
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
14543
14597
  * @license MIT
14544
14598
  **/
@@ -15071,238 +15125,111 @@ var require_context$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15071
15125
  })();
15072
15126
  Object.defineProperty(exports, "__esModule", { value: true });
15073
15127
  exports.createTemplateCodegenContext = createTemplateCodegenContext;
15128
+ var language_core_1 = require_language_core$1();
15074
15129
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
15075
15130
  var codeFeatures_1 = require_codeFeatures();
15076
15131
  var utils_1 = require_utils$5();
15077
15132
  var boundary_1 = require_boundary();
15078
- var commentDirectiveRegex = /^<!--\s*@vue-(?<name>[-\w]+)\b(?<content>[\s\S]*)-->$/;
15079
- /**
15080
- * Creates and returns a Context object used for generating type-checkable TS code
15081
- * from the template section of a .vue file.
15082
- *
15083
- * ## Implementation Notes for supporting `@vue-ignore`, `@vue-expect-error`, and `@vue-skip` directives.
15084
- *
15085
- * Vue language tooling supports a number of directives for suppressing diagnostics within
15086
- * Vue templates (https://github.com/vuejs/language-tools/pull/3215)
15087
- *
15088
- * Here is an overview for how support for how @vue-expect-error is implemented within this file
15089
- * (@vue-expect-error is the most complicated directive to support due to its behavior of raising
15090
- * a diagnostic when it is annotating a piece of code that doesn't actually have any errors/warning/diagnostics).
15091
- *
15092
- * Given .vue code:
15093
- *
15094
- * ```vue
15095
- * <script setup lang="ts">
15096
- * defineProps<{
15097
- * knownProp1: string;
15098
- * knownProp2: string;
15099
- * knownProp3: string;
15100
- * knownProp4_will_trigger_unused_expect_error: string;
15101
- * }>();
15102
- * <\/script>
15103
- *
15104
- * <template>
15105
- * {{ knownProp1 }}
15106
- * {{ error_unknownProp }} <!-- ERROR: Property 'error_unknownProp' does not exist on type [...] -->
15107
- * {{ knownProp2 }}
15108
- * <!-- @vue-expect-error This suppresses an Unknown Property Error -->
15109
- * {{ suppressed_error_unknownProp }}
15110
- * {{ knownProp3 }}
15111
- * <!-- @vue-expect-error This will trigger Unused '@ts-expect-error' directive.ts(2578) -->
15112
- * {{ knownProp4_will_trigger_unused_expect_error }}
15113
- * </template>
15114
- * ```
15115
- *
15116
- * The above code should raise two diagnostics:
15117
- *
15118
- * 1. Property 'error_unknownProp' does not exist on type [...]
15119
- * 2. Unused '@ts-expect-error' directive.ts(2578) -- this is the bottom `@vue-expect-error` directive
15120
- * that covers code that doesn't actually raise an error -- note that all `@vue-...` directives
15121
- * will ultimately translate into `@ts-...` diagnostics.
15122
- *
15123
- * The above code will produce the following type-checkable TS code (note: omitting asterisks
15124
- * to prevent VSCode syntax double-greying out double-commented code).
15125
- *
15126
- * ```ts
15127
- * ( __VLS_ctx.knownProp1 );
15128
- * ( __VLS_ctx.error_unknownProp ); // ERROR: Property 'error_unknownProp' does not exist on type [...]
15129
- * ( __VLS_ctx.knownProp2 );
15130
- * // @vue-expect-error start
15131
- * ( __VLS_ctx.suppressed_error_unknownProp );
15132
- * // @ts-expect-error __VLS_TS_EXPECT_ERROR
15133
- * ;
15134
- * // @vue-expect-error end of INTERPOLATION
15135
- * ( __VLS_ctx.knownProp3 );
15136
- * // @vue-expect-error start
15137
- * ( __VLS_ctx.knownProp4_will_trigger_unused_expect_error );
15138
- * // @ts-expect-error __VLS_TS_EXPECT_ERROR
15139
- * ;
15140
- * // @vue-expect-error end of INTERPOLATION
15141
- * ```
15142
- *
15143
- * In the generated code, there are actually 3 diagnostic errors that'll be raised in the first
15144
- * pass on this generated code (but through cleverness described below, not all of them will be
15145
- * propagated back to the original .vue file):
15146
- *
15147
- * 1. Property 'error_unknownProp' does not exist on type [...]
15148
- * 2. Unused '@ts-expect-error' directive.ts(2578) from the 1st `@ts-expect-error __VLS_TS_EXPECT_ERROR`
15149
- * 3. Unused '@ts-expect-error' directive.ts(2578) from the 2nd `@ts-expect-error __VLS_TS_EXPECT_ERROR`
15150
- *
15151
- * Be sure to pay careful attention to the mixture of `@vue-expect-error` and `@ts-expect-error`;
15152
- * Within the TS file, the only "real" directives recognized by TS are going to be prefixed with `@ts-`;
15153
- * any `@vue-` prefixed directives in the comments are only for debugging purposes.
15154
- *
15155
- * As mentioned above, there are 3 diagnostics errors that'll be generated for the above code, but
15156
- * only 2 should be propagated back to the original .vue file.
15157
- *
15158
- * (The reason we structure things this way is somewhat complicated, but in short it allows us
15159
- * to lean on TS as much as possible to generate actual `unused @ts-expect-error directive` errors
15160
- * while covering a number of edge cases.)
15161
- *
15162
- * So, we need a way to dynamically decide whether each of the `@ts-expect-error __VLS_TS_EXPECT_ERROR`
15163
- * directives should be reported as an unused directive or not.
15164
- *
15165
- * To do this, we'll make use of the `shouldReport` callback that'll optionally be provided to the
15166
- * `verification` property of the `CodeInformation` object attached to the mapping between source .vue
15167
- * and generated .ts code. The `verification` property determines whether "verification" (which includes
15168
- * semantic diagnostics) should be performed on the generated .ts code, and `shouldReport`, if provided,
15169
- * can be used to determine whether a given diagnostic should be reported back "upwards" to the original
15170
- * .vue file or not.
15171
- *
15172
- * See the comments in the code below for how and where we use this hook to keep track of whether
15173
- * an error/diagnostic was encountered for a region of code covered by a `@vue-expect-error` directive,
15174
- * and additionally how we use that to determine whether to propagate diagnostics back upward.
15175
- */
15133
+ var directiveCommentRE = /^<!--\s*@vue-(?<name>[-\w]+)\b(?<content>[\s\S]*)-->$/;
15176
15134
  function createTemplateCodegenContext() {
15177
- let variableId = 0;
15178
- const scopes = [];
15179
- const components = [];
15180
- const hoistVars = /* @__PURE__ */ new Map();
15181
- const dollarVars = /* @__PURE__ */ new Set();
15182
- const componentAccessMap = /* @__PURE__ */ new Map();
15183
- const slots = [];
15184
- const dynamicSlots = [];
15185
- const blockConditions = [];
15186
- const inlayHints = [];
15187
- const inheritedAttrVars = /* @__PURE__ */ new Set();
15188
- const templateRefs = /* @__PURE__ */ new Map();
15189
15135
  const stack = [];
15190
15136
  const commentBuffer = [];
15191
- return {
15192
- generatedTypes: /* @__PURE__ */ new Set(),
15193
- get currentInfo() {
15194
- return stack[stack.length - 1];
15195
- },
15196
- resolveCodeFeatures,
15197
- inVFor: false,
15198
- slots,
15199
- dynamicSlots,
15200
- dollarVars,
15201
- componentAccessMap,
15202
- blockConditions,
15203
- inlayHints,
15204
- inheritedAttrVars,
15205
- templateRefs,
15206
- singleRootElTypes: /* @__PURE__ */ new Set(),
15207
- singleRootNodes: /* @__PURE__ */ new Set(),
15208
- addTemplateRef(name, typeExp, offset) {
15209
- let refs = templateRefs.get(name);
15210
- if (!refs) templateRefs.set(name, refs = []);
15211
- refs.push({
15212
- typeExp,
15213
- offset
15214
- });
15215
- },
15216
- recordComponentAccess(source, name, offset) {
15217
- let map = componentAccessMap.get(name);
15218
- if (!map) componentAccessMap.set(name, map = /* @__PURE__ */ new Map());
15219
- let arr = map.get(source);
15220
- if (!arr) map.set(source, arr = /* @__PURE__ */ new Set());
15221
- if (offset !== void 0) arr.add(offset);
15222
- },
15223
- scopes,
15224
- components,
15225
- declare(...varNames) {
15226
- const scope = scopes.at(-1);
15227
- for (const varName of varNames) scope.add(varName);
15228
- },
15229
- startScope() {
15230
- const scope = /* @__PURE__ */ new Set();
15231
- scopes.push(scope);
15232
- return () => {
15233
- scopes.pop();
15234
- return generateAutoImport();
15235
- };
15236
- },
15237
- getInternalVariable() {
15238
- return `__VLS_${variableId++}`;
15239
- },
15240
- getHoistVariable(originalVar) {
15241
- let name = hoistVars.get(originalVar);
15242
- if (name === void 0) hoistVars.set(originalVar, name = `__VLS_${variableId++}`);
15243
- return name;
15244
- },
15245
- *generateHoistVariables() {
15246
- if (hoistVars.size) {
15247
- yield `// @ts-ignore${utils_1.newLine}`;
15248
- yield `var `;
15249
- for (const [originalVar, hoistVar] of hoistVars) yield `${hoistVar} = ${originalVar}, `;
15250
- yield utils_1.endOfLine;
15251
- }
15252
- },
15253
- *generateConditionGuards() {
15254
- for (const condition of blockConditions) yield `if (!${condition}) return${utils_1.endOfLine}`;
15255
- },
15256
- enter(node) {
15257
- if (node.type === CompilerDOM.NodeTypes.COMMENT) {
15258
- commentBuffer.push(node);
15259
- return false;
15260
- }
15261
- const data = {};
15262
- const comments = [...commentBuffer];
15263
- commentBuffer.length = 0;
15264
- for (const comment of comments) {
15265
- const match = comment.loc.source.match(commentDirectiveRegex);
15266
- if (match) {
15267
- const { name, content } = match.groups;
15268
- switch (name) {
15269
- case "skip": return false;
15270
- case "ignore":
15271
- data.ignoreError = true;
15272
- break;
15273
- case "expect-error":
15274
- data.expectError = {
15275
- token: 0,
15276
- node: comment
15277
- };
15278
- break;
15279
- case "generic": {
15280
- const text = content.trim();
15281
- if (text.startsWith("{") && text.endsWith("}")) data.generic = {
15282
- content: text.slice(1, -1),
15283
- offset: comment.loc.start.offset + comment.loc.source.indexOf("{") + 1
15284
- };
15285
- break;
15286
- }
15137
+ function getCommentInfo() {
15138
+ return stack[stack.length - 1];
15139
+ }
15140
+ function enter(node) {
15141
+ if (node.type === CompilerDOM.NodeTypes.COMMENT) {
15142
+ commentBuffer.push(node);
15143
+ return false;
15144
+ }
15145
+ const info = {};
15146
+ const comments = [...commentBuffer];
15147
+ commentBuffer.length = 0;
15148
+ for (const comment of comments) {
15149
+ const match = comment.loc.source.match(directiveCommentRE);
15150
+ if (match) {
15151
+ const { name, content } = match.groups;
15152
+ switch (name) {
15153
+ case "skip": return false;
15154
+ case "ignore":
15155
+ info.ignoreError = true;
15156
+ break;
15157
+ case "expect-error":
15158
+ info.expectError = {
15159
+ token: 0,
15160
+ node: comment
15161
+ };
15162
+ break;
15163
+ case "generic": {
15164
+ const text = content.trim();
15165
+ if (text.startsWith("{") && text.endsWith("}")) info.generic = {
15166
+ content: text.slice(1, -1),
15167
+ offset: comment.loc.start.offset + comment.loc.source.indexOf("{") + 1
15168
+ };
15169
+ break;
15287
15170
  }
15288
15171
  }
15289
15172
  }
15290
- stack.push(data);
15291
- return true;
15292
- },
15293
- *exit() {
15294
- const data = stack.pop();
15295
- commentBuffer.length = 0;
15296
- if (data.expectError !== void 0) {
15297
- const token = yield* (0, boundary_1.startBoundary)("template", data.expectError.node.loc.start.offset, { verification: { shouldReport: () => data.expectError.token === 0 } });
15298
- yield `// @ts-expect-error`;
15299
- yield (0, boundary_1.endBoundary)(token, data.expectError.node.loc.end.offset);
15300
- yield `${utils_1.newLine}${utils_1.endOfLine}`;
15301
- }
15302
15173
  }
15303
- };
15174
+ stack.push(info);
15175
+ return true;
15176
+ }
15177
+ function* exit() {
15178
+ const info = stack.pop();
15179
+ commentBuffer.length = 0;
15180
+ if (info.expectError !== void 0) {
15181
+ const boundary = yield* boundary_1.Boundary.start("template", info.expectError.node.loc.start.offset, { verification: { shouldReport: () => info.expectError.token === 0 } });
15182
+ yield `// @ts-expect-error`;
15183
+ yield boundary.end(info.expectError.node.loc.end.offset);
15184
+ yield `${utils_1.newLine}${utils_1.endOfLine}`;
15185
+ }
15186
+ }
15187
+ function resolveCodeFeatures(features) {
15188
+ if (features.verification && stack.length) {
15189
+ const data = stack[stack.length - 1];
15190
+ if (data.ignoreError) return {
15191
+ ...features,
15192
+ verification: false
15193
+ };
15194
+ if (data.expectError !== void 0) return {
15195
+ ...features,
15196
+ verification: { shouldReport: (source, code) => {
15197
+ if ((0, language_core_1.shouldReportDiagnostics)(features, source, code)) data.expectError.token++;
15198
+ return false;
15199
+ } }
15200
+ };
15201
+ }
15202
+ return features;
15203
+ }
15204
+ let variableId = 0;
15205
+ function getInternalVariable() {
15206
+ return `__VLS_${variableId++}`;
15207
+ }
15208
+ class Scope extends Set {
15209
+ declare(...variables) {
15210
+ for (const name of variables) this.add(name);
15211
+ }
15212
+ end() {
15213
+ scopes.pop();
15214
+ return generateAutoImport();
15215
+ }
15216
+ }
15217
+ const scopes = [];
15218
+ function scope() {
15219
+ const scope = new Scope();
15220
+ scopes.push(scope);
15221
+ return scope;
15222
+ }
15223
+ const contextAccesses = /* @__PURE__ */ new Map();
15224
+ function accessVariable(source, name, offset) {
15225
+ let map = contextAccesses.get(name);
15226
+ if (!map) contextAccesses.set(name, map = /* @__PURE__ */ new Map());
15227
+ let arr = map.get(source);
15228
+ if (!arr) map.set(source, arr = /* @__PURE__ */ new Set());
15229
+ if (offset !== void 0) arr.add(offset);
15230
+ }
15304
15231
  function* generateAutoImport() {
15305
- const all = [...componentAccessMap.entries()];
15232
+ const all = [...contextAccesses.entries()];
15306
15233
  if (!all.some(([, offsets]) => offsets.size)) return;
15307
15234
  yield `// @ts-ignore${utils_1.newLine}`;
15308
15235
  yield `[`;
@@ -15320,23 +15247,62 @@ var require_context$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15320
15247
  }
15321
15248
  yield `]${utils_1.endOfLine}`;
15322
15249
  }
15323
- function resolveCodeFeatures(features) {
15324
- if (features.verification && stack.length) {
15325
- const data = stack[stack.length - 1];
15326
- if (data.ignoreError) return {
15327
- ...features,
15328
- verification: false
15329
- };
15330
- if (data.expectError !== void 0) return {
15331
- ...features,
15332
- verification: { shouldReport: (source, code) => {
15333
- if (typeof features.verification !== "object" || !features.verification.shouldReport || features.verification.shouldReport(source, code) === true) data.expectError.token++;
15334
- return false;
15335
- } }
15336
- };
15250
+ const conditions = [];
15251
+ function* generateConditionGuards() {
15252
+ for (const condition of conditions) yield `if (!${condition}) throw 0${utils_1.endOfLine}`;
15253
+ }
15254
+ const hoistVars = /* @__PURE__ */ new Map();
15255
+ function getHoistVariable(originalVar) {
15256
+ let name = hoistVars.get(originalVar);
15257
+ if (name === void 0) hoistVars.set(originalVar, name = `__VLS_${variableId++}`);
15258
+ return name;
15259
+ }
15260
+ function* generateHoistVariables() {
15261
+ if (hoistVars.size) {
15262
+ yield `// @ts-ignore${utils_1.newLine}`;
15263
+ yield `var `;
15264
+ for (const [originalVar, hoistVar] of hoistVars) yield `${hoistVar} = ${originalVar}, `;
15265
+ yield utils_1.endOfLine;
15337
15266
  }
15338
- return features;
15339
15267
  }
15268
+ const templateRefs = /* @__PURE__ */ new Map();
15269
+ function addTemplateRef(name, typeExp, offset) {
15270
+ let refs = templateRefs.get(name);
15271
+ if (!refs) templateRefs.set(name, refs = []);
15272
+ refs.push({
15273
+ typeExp,
15274
+ offset
15275
+ });
15276
+ }
15277
+ return {
15278
+ getCommentInfo,
15279
+ enter,
15280
+ exit,
15281
+ resolveCodeFeatures,
15282
+ getInternalVariable,
15283
+ scopes,
15284
+ scope,
15285
+ contextAccesses,
15286
+ accessVariable,
15287
+ generateAutoImport,
15288
+ conditions,
15289
+ generateConditionGuards,
15290
+ hoistVars,
15291
+ getHoistVariable,
15292
+ generateHoistVariables,
15293
+ templateRefs,
15294
+ addTemplateRef,
15295
+ components: [],
15296
+ dollarVars: /* @__PURE__ */ new Set(),
15297
+ inlayHints: [],
15298
+ generatedTypes: /* @__PURE__ */ new Set(),
15299
+ inheritedAttrVars: /* @__PURE__ */ new Set(),
15300
+ singleRootElTypes: /* @__PURE__ */ new Set(),
15301
+ singleRootNodes: /* @__PURE__ */ new Set(),
15302
+ slots: [],
15303
+ dynamicSlots: [],
15304
+ inVFor: false
15305
+ };
15340
15306
  }
15341
15307
  }));
15342
15308
  //#endregion
@@ -15347,23 +15313,23 @@ var require_camelized = /* @__PURE__ */ __commonJSMin(((exports) => {
15347
15313
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
15348
15314
  function* generateCamelized(code, source, offset, features) {
15349
15315
  const parts = code.split("-");
15350
- const combineToken = features.__combineToken ?? Symbol();
15316
+ if (!features.__combineToken) features = {
15317
+ ...features,
15318
+ __combineToken: Symbol()
15319
+ };
15351
15320
  for (let i = 0; i < parts.length; i++) {
15352
15321
  const part = parts[i];
15353
15322
  if (part !== "") if (i === 0) yield [
15354
15323
  part,
15355
15324
  source,
15356
15325
  offset,
15357
- {
15358
- ...features,
15359
- __combineToken: combineToken
15360
- }
15326
+ features
15361
15327
  ];
15362
15328
  else yield [
15363
15329
  (0, shared_1.capitalize)(part),
15364
15330
  source,
15365
15331
  offset,
15366
- { __combineToken: combineToken }
15332
+ features
15367
15333
  ];
15368
15334
  offset += part.length + 1;
15369
15335
  }
@@ -15378,22 +15344,22 @@ var require_stringLiteralKey = /* @__PURE__ */ __commonJSMin(((exports) => {
15378
15344
  function* generateStringLiteralKey(code, offset, info) {
15379
15345
  if (offset === void 0 || !info) yield `'${code}'`;
15380
15346
  else {
15381
- const token = yield* (0, boundary_1.startBoundary)("template", offset, info);
15347
+ const boundary = yield* boundary_1.Boundary.start("template", offset, info);
15382
15348
  yield `'`;
15383
15349
  yield [
15384
15350
  code,
15385
15351
  "template",
15386
15352
  offset,
15387
- { __combineToken: token }
15353
+ boundary.features
15388
15354
  ];
15389
15355
  yield `'`;
15390
- yield (0, boundary_1.endBoundary)(token, offset + code.length);
15356
+ yield boundary.end(offset + code.length);
15391
15357
  }
15392
15358
  }
15393
15359
  }));
15394
15360
  //#endregion
15395
15361
  //#region node_modules/@vue/language-core/lib/utils/shared.js
15396
- var require_shared$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
15362
+ var require_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15397
15363
  Object.defineProperty(exports, "__esModule", { value: true });
15398
15364
  exports.hyphenateTag = void 0;
15399
15365
  exports.hyphenateAttr = hyphenateAttr;
@@ -15446,7 +15412,7 @@ var require_collectBindings = /* @__PURE__ */ __commonJSMin(((exports) => {
15446
15412
  exports.collectBindingNames = collectBindingNames;
15447
15413
  exports.collectBindingRanges = collectBindingRanges;
15448
15414
  exports.collectBindingIdentifiers = collectBindingIdentifiers;
15449
- var shared_1 = require_shared$2();
15415
+ var shared_1 = require_shared$1();
15450
15416
  function collectBindingNames(ts, node, ast) {
15451
15417
  return collectBindingIdentifiers(ts, node).map(({ id }) => (0, shared_1.getNodeText)(ts, id, ast));
15452
15418
  }
@@ -15473,7 +15439,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15473
15439
  exports.shouldIdentifierSkipped = shouldIdentifierSkipped;
15474
15440
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
15475
15441
  var collectBindings_1 = require_collectBindings();
15476
- var shared_2 = require_shared$2();
15442
+ var shared_2 = require_shared$1();
15477
15443
  var codeFeatures_1 = require_codeFeatures();
15478
15444
  var names_1 = require_names();
15479
15445
  var utils_1 = require_utils$5();
@@ -15506,10 +15472,10 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15506
15472
  ];
15507
15473
  yield `.value`;
15508
15474
  } else {
15509
- const token = yield* (0, boundary_1.startBoundary)(block.name, start + offset, codeFeatures_1.codeFeatures.verification);
15475
+ const boundary = yield* boundary_1.Boundary.start(block.name, start + offset, codeFeatures_1.codeFeatures.verification);
15510
15476
  if (ctx.dollarVars.has(name)) yield names_1.names.dollars;
15511
15477
  else {
15512
- ctx.recordComponentAccess(block.name, name, start + offset);
15478
+ ctx.accessVariable(block.name, name, start + offset);
15513
15479
  yield names_1.names.ctx;
15514
15480
  }
15515
15481
  yield `.`;
@@ -15522,7 +15488,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15522
15488
  __shorthandExpression: "js"
15523
15489
  } : data
15524
15490
  ];
15525
- yield (0, boundary_1.endBoundary)(token, start + offset + name.length);
15491
+ yield boundary.end(start + offset + name.length);
15526
15492
  }
15527
15493
  prevEnd = offset + name.length;
15528
15494
  }
@@ -15535,7 +15501,7 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15535
15501
  if (suffix) yield suffix;
15536
15502
  }
15537
15503
  function* forEachIdentifiers(ts, ctx, block, code, prefix, suffix) {
15538
- if (utils_1.identifierRegex.test(code) && !shouldIdentifierSkipped(ctx, code)) {
15504
+ if (utils_1.identifierRE.test(code) && !shouldIdentifierSkipped(ctx, code)) {
15539
15505
  yield [
15540
15506
  code,
15541
15507
  0,
@@ -15543,9 +15509,9 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15543
15509
  ];
15544
15510
  return;
15545
15511
  }
15546
- const endScope = ctx.startScope();
15512
+ const scope = ctx.scope();
15547
15513
  const ast = (0, utils_1.getTypeScriptAST)(ts, block, prefix + code + suffix);
15548
- for (const [id, isShorthand] of forEachDeclarations(ts, ast, ast, ctx)) {
15514
+ for (const [id, isShorthand] of forEachDeclarations(ts, ast, ast, ctx, scope)) {
15549
15515
  const text = (0, shared_2.getNodeText)(ts, id, ast);
15550
15516
  if (shouldIdentifierSkipped(ctx, text)) continue;
15551
15517
  yield [
@@ -15554,45 +15520,45 @@ var require_interpolation = /* @__PURE__ */ __commonJSMin(((exports) => {
15554
15520
  isShorthand
15555
15521
  ];
15556
15522
  }
15557
- endScope();
15523
+ scope.end();
15558
15524
  }
15559
- function* forEachDeclarations(ts, node, ast, ctx) {
15525
+ function* forEachDeclarations(ts, node, ast, ctx, scope) {
15560
15526
  if (ts.isIdentifier(node)) yield [node, false];
15561
15527
  else if (ts.isShorthandPropertyAssignment(node)) yield [node.name, true];
15562
- else if (ts.isPropertyAccessExpression(node)) yield* forEachDeclarations(ts, node.expression, ast, ctx);
15528
+ else if (ts.isPropertyAccessExpression(node)) yield* forEachDeclarations(ts, node.expression, ast, ctx, scope);
15563
15529
  else if (ts.isVariableDeclaration(node)) {
15564
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(ts, node.name, ast));
15565
- yield* forEachDeclarationsInBinding(ts, node, ast, ctx);
15530
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(ts, node.name, ast));
15531
+ yield* forEachDeclarationsInBinding(ts, node, ast, ctx, scope);
15566
15532
  } else if (ts.isArrayBindingPattern(node) || ts.isObjectBindingPattern(node)) {
15567
- for (const element of node.elements) if (ts.isBindingElement(element)) yield* forEachDeclarationsInBinding(ts, element, ast, ctx);
15533
+ for (const element of node.elements) if (ts.isBindingElement(element)) yield* forEachDeclarationsInBinding(ts, element, ast, ctx, scope);
15568
15534
  } else if (ts.isArrowFunction(node) || ts.isFunctionExpression(node)) yield* forEachDeclarationsInFunction(ts, node, ast, ctx);
15569
15535
  else if (ts.isObjectLiteralExpression(node)) {
15570
15536
  for (const prop of node.properties) if (ts.isPropertyAssignment(prop)) {
15571
- if (ts.isComputedPropertyName(prop.name)) yield* forEachDeclarations(ts, prop.name.expression, ast, ctx);
15572
- yield* forEachDeclarations(ts, prop.initializer, ast, ctx);
15573
- } else if (ts.isShorthandPropertyAssignment(prop)) yield* forEachDeclarations(ts, prop, ast, ctx);
15574
- else if (ts.isSpreadAssignment(prop)) yield* forEachDeclarations(ts, prop.expression, ast, ctx);
15537
+ if (ts.isComputedPropertyName(prop.name)) yield* forEachDeclarations(ts, prop.name.expression, ast, ctx, scope);
15538
+ yield* forEachDeclarations(ts, prop.initializer, ast, ctx, scope);
15539
+ } else if (ts.isShorthandPropertyAssignment(prop)) yield* forEachDeclarations(ts, prop, ast, ctx, scope);
15540
+ else if (ts.isSpreadAssignment(prop)) yield* forEachDeclarations(ts, prop.expression, ast, ctx, scope);
15575
15541
  else if (ts.isFunctionLike(prop) && prop.body) yield* forEachDeclarationsInFunction(ts, prop, ast, ctx);
15576
15542
  } else if (ts.isTypeNode(node)) yield* forEachDeclarationsInTypeNode(ts, node);
15577
15543
  else if (ts.isBlock(node)) {
15578
- const endScope = ctx.startScope();
15579
- for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx);
15580
- endScope();
15581
- } else for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx);
15544
+ const scope = ctx.scope();
15545
+ for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx, scope);
15546
+ scope.end();
15547
+ } else for (const child of (0, utils_1.forEachNode)(ts, node)) yield* forEachDeclarations(ts, child, ast, ctx, scope);
15582
15548
  }
15583
- function* forEachDeclarationsInBinding(ts, node, ast, ctx) {
15549
+ function* forEachDeclarationsInBinding(ts, node, ast, ctx, scope) {
15584
15550
  if ("type" in node && node.type) yield* forEachDeclarationsInTypeNode(ts, node.type);
15585
- if (!ts.isIdentifier(node.name)) yield* forEachDeclarations(ts, node.name, ast, ctx);
15586
- if (node.initializer) yield* forEachDeclarations(ts, node.initializer, ast, ctx);
15551
+ if (!ts.isIdentifier(node.name)) yield* forEachDeclarations(ts, node.name, ast, ctx, scope);
15552
+ if (node.initializer) yield* forEachDeclarations(ts, node.initializer, ast, ctx, scope);
15587
15553
  }
15588
15554
  function* forEachDeclarationsInFunction(ts, node, ast, ctx) {
15589
- const endScope = ctx.startScope();
15555
+ const scope = ctx.scope();
15590
15556
  for (const param of node.parameters) {
15591
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(ts, param.name, ast));
15592
- yield* forEachDeclarationsInBinding(ts, param, ast, ctx);
15557
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(ts, param.name, ast));
15558
+ yield* forEachDeclarationsInBinding(ts, param, ast, ctx, scope);
15593
15559
  }
15594
- if (node.body) yield* forEachDeclarations(ts, node.body, ast, ctx);
15595
- endScope();
15560
+ if (node.body) yield* forEachDeclarations(ts, node.body, ast, ctx, scope);
15561
+ scope.end();
15596
15562
  }
15597
15563
  function* forEachDeclarationsInTypeNode(ts, node) {
15598
15564
  if (ts.isTypeQueryNode(node)) {
@@ -15620,15 +15586,15 @@ var require_objectProperty = /* @__PURE__ */ __commonJSMin(((exports) => {
15620
15586
  function* generateObjectProperty(options, ctx, code, offset, features, shouldCamelize = false, shouldBeConstant = false) {
15621
15587
  if (code.startsWith("[") && code.endsWith("]")) if (shouldBeConstant) yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code.slice(1, -1), offset + 1, `[${names_1.names.tryAsConstant}(`, `)]`);
15622
15588
  else yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code, offset);
15623
- else if (shouldCamelize) if (utils_1.identifierRegex.test((0, shared_1.camelize)(code))) yield* (0, camelized_1.generateCamelized)(code, "template", offset, features);
15589
+ else if (shouldCamelize) if (utils_1.identifierRE.test((0, shared_1.camelize)(code))) yield* (0, camelized_1.generateCamelized)(code, "template", offset, features);
15624
15590
  else {
15625
- const token = yield* (0, boundary_1.startBoundary)("template", offset, features);
15591
+ const boundary = yield* boundary_1.Boundary.start("template", offset, features);
15626
15592
  yield `'`;
15627
- yield* (0, camelized_1.generateCamelized)(code, "template", offset, { __combineToken: token });
15593
+ yield* (0, camelized_1.generateCamelized)(code, "template", offset, boundary.features);
15628
15594
  yield `'`;
15629
- yield (0, boundary_1.endBoundary)(token, offset + code.length);
15595
+ yield boundary.end(offset + code.length);
15630
15596
  }
15631
- else if (utils_1.identifierRegex.test(code)) yield [
15597
+ else if (utils_1.identifierRE.test(code)) yield [
15632
15598
  code,
15633
15599
  "template",
15634
15600
  offset,
@@ -15803,8 +15769,8 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
15803
15769
  if (k2 === void 0) k2 = k;
15804
15770
  o[k2] = m[k];
15805
15771
  }));
15806
- var __exportStar = exports && exports.__exportStar || function(m, exports$7) {
15807
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$7, p)) __createBinding(exports$7, m, p);
15772
+ var __exportStar = exports && exports.__exportStar || function(m, exports$6) {
15773
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$6, p)) __createBinding(exports$6, m, p);
15808
15774
  };
15809
15775
  Object.defineProperty(exports, "__esModule", { value: true });
15810
15776
  exports.replaceRange = exports.replaceSourceRange = exports.replaceAll = exports.replace = exports.create = exports.toString = exports.getLength = void 0;
@@ -16610,7 +16576,10 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16610
16576
  }
16611
16577
  }
16612
16578
  };
16613
- var getStarExtglobSequenceOutput = (pattern) => {
16579
+ var buildCharClassStar = (chars) => {
16580
+ return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
16581
+ };
16582
+ var getStarExtglobSequenceChars = (pattern) => {
16614
16583
  let index = 0;
16615
16584
  const chars = [];
16616
16585
  while (index < pattern.length) {
@@ -16624,7 +16593,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16624
16593
  index += match.end + 1;
16625
16594
  }
16626
16595
  if (chars.length < 1) return;
16627
- return `${chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`}*`;
16596
+ return chars;
16628
16597
  };
16629
16598
  var repeatedExtglobRecursion = (pattern) => {
16630
16599
  let depth = 0;
@@ -16644,14 +16613,28 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16644
16613
  if (branches.length > 1) {
16645
16614
  if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) return { risky: true };
16646
16615
  }
16616
+ const safeChars = [];
16617
+ let sawStarSequence = false;
16618
+ let combinable = true;
16647
16619
  for (const branch of branches) {
16648
- const safeOutput = getStarExtglobSequenceOutput(branch);
16649
- if (safeOutput) return {
16650
- risky: true,
16651
- safeOutput
16652
- };
16620
+ const chars = getStarExtglobSequenceChars(branch);
16621
+ if (chars) {
16622
+ sawStarSequence = true;
16623
+ safeChars.push(...chars);
16624
+ continue;
16625
+ }
16626
+ const literal = normalizeSimpleBranch(branch);
16627
+ if (literal && literal.length === 1) {
16628
+ safeChars.push(literal);
16629
+ continue;
16630
+ }
16631
+ combinable = false;
16653
16632
  if (repeatedExtglobRecursion(branch) > max) return { risky: true };
16654
16633
  }
16634
+ if (sawStarSequence) return combinable ? {
16635
+ risky: true,
16636
+ safeOutput: buildCharClassStar([...new Set(safeChars)])
16637
+ } : { risky: true };
16655
16638
  return { risky: false };
16656
16639
  };
16657
16640
  /**
@@ -17531,6 +17514,18 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17531
17514
  * const isMatch = picomatch('*.!(*a)');
17532
17515
  * console.log(isMatch('a.a')); //=> false
17533
17516
  * console.log(isMatch('a.b')); //=> true
17517
+ *
17518
+ * // For environments without `node.js`, `picomatch/posix` provides you a dependency-free matcher, without automatic OS detection.
17519
+ * const picomatch = require('picomatch/posix');
17520
+ * // the same API, defaulting to posix paths
17521
+ * const isMatch = picomatch('a/*');
17522
+ * console.log(isMatch('a\\b')); //=> false
17523
+ * console.log(isMatch('a/b')); //=> true
17524
+ *
17525
+ * // you can still configure the matcher function to accept windows paths
17526
+ * const isMatch = picomatch('a/*', { options: windows });
17527
+ * console.log(isMatch('a\\b')); //=> true
17528
+ * console.log(isMatch('a/b')); //=> true
17534
17529
  * ```
17535
17530
  * @name picomatch
17536
17531
  * @param {String|Array} `globs` One or more glob patterns.
@@ -17649,8 +17644,8 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
17649
17644
  * @return {Boolean}
17650
17645
  * @api public
17651
17646
  */
17652
- picomatch.matchBase = (input, glob, options) => {
17653
- return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input));
17647
+ picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
17648
+ return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(utils.basename(input, { windows: posix }));
17654
17649
  };
17655
17650
  /**
17656
17651
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -17830,16 +17825,16 @@ var require_unicode = /* @__PURE__ */ __commonJSMin(((exports) => {
17830
17825
  Object.defineProperty(exports, "__esModule", { value: true });
17831
17826
  exports.generateUnicode = generateUnicode;
17832
17827
  var boundary_1 = require_boundary();
17833
- function* generateUnicode(code, offset, info) {
17828
+ function* generateUnicode(code, offset, features) {
17834
17829
  if (needToUnicode(code)) {
17835
- const token = yield* (0, boundary_1.startBoundary)("template", offset, info);
17830
+ const boundary = yield* boundary_1.Boundary.start("template", offset, features);
17836
17831
  yield toUnicode(code);
17837
- yield (0, boundary_1.endBoundary)(token, offset + code.length);
17832
+ yield boundary.end(offset + code.length);
17838
17833
  } else yield [
17839
17834
  code,
17840
17835
  "template",
17841
17836
  offset,
17842
- info
17837
+ features
17843
17838
  ];
17844
17839
  }
17845
17840
  function needToUnicode(str) {
@@ -17854,6 +17849,71 @@ var require_unicode = /* @__PURE__ */ __commonJSMin(((exports) => {
17854
17849
  }
17855
17850
  }));
17856
17851
  //#endregion
17852
+ //#region node_modules/@vue/language-core/lib/parsers/utils.js
17853
+ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
17854
+ Object.defineProperty(exports, "__esModule", { value: true });
17855
+ exports.parseBindingRanges = parseBindingRanges;
17856
+ exports.getClosestMultiLineCommentRange = getClosestMultiLineCommentRange;
17857
+ exports.getUnwrappedExpression = getUnwrappedExpression;
17858
+ var collectBindings_1 = require_collectBindings();
17859
+ var shared_1 = require_shared$1();
17860
+ function parseBindingRanges(ts, ast, componentExtsensions) {
17861
+ const bindings = [];
17862
+ const components = [];
17863
+ ts.forEachChild(ast, (node) => {
17864
+ if (ts.isVariableStatement(node)) for (const decl of node.declarationList.declarations) {
17865
+ const ranges = (0, collectBindings_1.collectBindingRanges)(ts, decl.name, ast);
17866
+ bindings.push(...ranges);
17867
+ }
17868
+ else if (ts.isFunctionDeclaration(node)) {
17869
+ if (node.name && ts.isIdentifier(node.name)) bindings.push(_getStartEnd(node.name));
17870
+ } else if (ts.isClassDeclaration(node)) {
17871
+ if (node.name) bindings.push(_getStartEnd(node.name));
17872
+ } else if (ts.isEnumDeclaration(node)) bindings.push(_getStartEnd(node.name));
17873
+ if (ts.isImportDeclaration(node)) {
17874
+ const moduleName = _getNodeText(node.moduleSpecifier).slice(1, -1);
17875
+ if (node.importClause && !node.importClause.isTypeOnly) {
17876
+ const { name, namedBindings } = node.importClause;
17877
+ if (name) if (componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(name));
17878
+ else bindings.push(_getStartEnd(name));
17879
+ if (namedBindings) if (ts.isNamedImports(namedBindings)) for (const element of namedBindings.elements) {
17880
+ if (element.isTypeOnly) continue;
17881
+ if (element.propertyName && _getNodeText(element.propertyName) === "default" && componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(element.name));
17882
+ else bindings.push(_getStartEnd(element.name));
17883
+ }
17884
+ else bindings.push(_getStartEnd(namedBindings.name));
17885
+ }
17886
+ }
17887
+ });
17888
+ return {
17889
+ bindings,
17890
+ components
17891
+ };
17892
+ function _getStartEnd(node) {
17893
+ return (0, shared_1.getStartEnd)(ts, node, ast);
17894
+ }
17895
+ function _getNodeText(node) {
17896
+ return (0, shared_1.getNodeText)(ts, node, ast);
17897
+ }
17898
+ }
17899
+ function getClosestMultiLineCommentRange(ts, node, parents, ast) {
17900
+ for (let i = parents.length - 1; i >= 0; i--) {
17901
+ if (ts.isStatement(node)) break;
17902
+ node = parents[i];
17903
+ }
17904
+ const comment = ts.getLeadingCommentRanges(ast.text, node.pos)?.reverse().find((range) => range.kind === 3);
17905
+ if (comment) return {
17906
+ node,
17907
+ start: comment.pos,
17908
+ end: comment.end
17909
+ };
17910
+ }
17911
+ function getUnwrappedExpression(ts, node) {
17912
+ while (ts.isParenthesizedExpression(node) || ts.isAssertionExpression(node) || ts.isNonNullExpression(node) || ts.isSatisfiesExpression(node)) node = node.expression;
17913
+ return node;
17914
+ }
17915
+ }));
17916
+ //#endregion
17857
17917
  //#region node_modules/@vue/language-core/lib/codegen/template/elementEvents.js
17858
17918
  var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17859
17919
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
@@ -17905,14 +17965,15 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17905
17965
  exports.isCompoundExpression = isCompoundExpression;
17906
17966
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
17907
17967
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
17968
+ var utils_1 = require_utils$3();
17908
17969
  var codeFeatures_1 = require_codeFeatures();
17909
17970
  var names_1 = require_names();
17910
- var utils_1 = require_utils$5();
17971
+ var utils_2 = require_utils$5();
17911
17972
  var boundary_1 = require_boundary();
17912
17973
  var camelized_1 = require_camelized();
17913
17974
  var interpolation_1 = require_interpolation();
17914
17975
  function* generateElementEvents(options, ctx, node, componentOriginalVar, getCtxVar, getPropsVar) {
17915
- const definitions = [];
17976
+ const definitions = {};
17916
17977
  for (const prop of node.props) if (prop.type === CompilerDOM.NodeTypes.DIRECTIVE && (prop.name === "on" && prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic || options.vueCompilerOptions.strictVModel && prop.name === "model" && (!prop.arg || prop.arg.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.isStatic))) {
17917
17978
  let source = prop.arg?.loc.source ?? "model-value";
17918
17979
  let offset = prop.arg?.loc.start.offset;
@@ -17929,43 +17990,47 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17929
17990
  }
17930
17991
  const propName = (0, shared_1.camelize)(propPrefix + source);
17931
17992
  const emitName = emitPrefix + source;
17932
- definitions.push({
17933
- prop,
17934
- source,
17935
- offset,
17936
- emitPrefix,
17993
+ const key = [
17994
+ prop.name,
17995
+ propName,
17996
+ ...prop.modifiers.map((modifier) => modifier.content)
17997
+ ].join("+");
17998
+ definitions[key] ??= {
17937
17999
  propPrefix,
18000
+ emitPrefix,
17938
18001
  propName,
17939
- emitName
18002
+ emitName,
18003
+ items: []
18004
+ };
18005
+ definitions[key].items.push({
18006
+ prop,
18007
+ source,
18008
+ offset
17940
18009
  });
17941
18010
  }
17942
- if (!definitions.length) return;
18011
+ if (!Object.keys(definitions).length) return;
17943
18012
  const emitsVar = ctx.getInternalVariable();
17944
- yield `let ${emitsVar}!: ${names_1.names.ResolveEmits}<typeof ${componentOriginalVar}, typeof ${getCtxVar()}.emit>${utils_1.endOfLine}`;
17945
- yield `const ${ctx.getInternalVariable()}: `;
17946
- for (let i = 0; i < definitions.length; i++) {
17947
- const { propName, emitName } = definitions[i];
17948
- if (i > 0) yield ` & `;
17949
- yield `${names_1.names.NormalizeComponentEvent}<typeof ${getPropsVar()}, typeof ${emitsVar}, '${propName}', '${emitName}', '${(0, shared_1.camelize)(emitName)}'>`;
17950
- }
17951
- yield ` = {${utils_1.newLine}`;
17952
- for (const { prop, source, offset, emitPrefix, propPrefix, propName } of definitions) {
17953
- if (prop.name === "on") {
17954
- yield `...{ `;
17955
- yield* generateEventArg(options, source, offset, emitPrefix.slice(0, -1), codeFeatures_1.codeFeatures.navigation);
17956
- yield `: {} as any } as typeof ${emitsVar},${utils_1.newLine}`;
17957
- }
17958
- if (prop.name === "on") {
17959
- yield* generateEventArg(options, source, offset, propPrefix.slice(0, -1));
17960
- yield `: `;
17961
- yield* generateEventExpression(options, ctx, prop);
17962
- } else {
17963
- yield `'${propName}': `;
17964
- yield* generateModelEventExpression(options, ctx, prop);
18013
+ yield `let ${emitsVar}!: ${names_1.names.ResolveEmits}<typeof ${componentOriginalVar}, typeof ${getCtxVar()}.emit>${utils_2.endOfLine}`;
18014
+ for (const { propPrefix, emitPrefix, propName, emitName, items } of Object.values(definitions)) {
18015
+ yield `const ${ctx.getInternalVariable()}: ${names_1.names.ResolveEvent}<typeof ${getPropsVar()}, typeof ${emitsVar}, '${propName}', '${emitName}', '${(0, shared_1.camelize)(emitName)}'> = {${utils_2.newLine}`;
18016
+ for (const { prop, source, offset } of items) {
18017
+ if (prop.name === "on") {
18018
+ yield `/** @type {typeof ${emitsVar}.`;
18019
+ yield* generateEventArg(options, source, offset, emitPrefix.slice(0, -1), codeFeatures_1.codeFeatures.navigation);
18020
+ yield `} */${utils_2.newLine}`;
18021
+ }
18022
+ if (prop.name === "on") {
18023
+ yield* generateEventArg(options, source, offset, propPrefix.slice(0, -1));
18024
+ yield `: `;
18025
+ yield* generateEventExpression(options, ctx, prop);
18026
+ } else {
18027
+ yield `'${propName}': `;
18028
+ yield* generateModelEventExpression(options, ctx, prop);
18029
+ }
18030
+ yield `,${utils_2.newLine}`;
17965
18031
  }
17966
- yield `,${utils_1.newLine}`;
18032
+ yield `}${utils_2.endOfLine}`;
17967
18033
  }
17968
- yield `}${utils_1.endOfLine}`;
17969
18034
  }
17970
18035
  function* generateEventArg(options, name, start, directive = "on", features) {
17971
18036
  features ??= {
@@ -17974,32 +18039,36 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
17974
18039
  ...options.vueCompilerOptions.checkUnknownEvents ? codeFeatures_1.codeFeatures.verification : codeFeatures_1.codeFeatures.doNotReportTs2353AndTs2561
17975
18040
  };
17976
18041
  if (directive.length) name = (0, shared_1.capitalize)(name);
17977
- if (utils_1.identifierRegex.test((0, shared_1.camelize)(name))) {
17978
- const token = yield* (0, boundary_1.startBoundary)("template", start, features);
18042
+ if (utils_2.identifierRE.test((0, shared_1.camelize)(name))) {
18043
+ const boundary = yield* boundary_1.Boundary.start("template", start, features);
17979
18044
  yield directive;
17980
- yield* (0, camelized_1.generateCamelized)(name, "template", start, { __combineToken: token });
18045
+ yield* (0, camelized_1.generateCamelized)(name, "template", start, boundary.features);
17981
18046
  } else {
17982
- const token = yield* (0, boundary_1.startBoundary)("template", start, features);
18047
+ const boundary = yield* boundary_1.Boundary.start("template", start, features);
17983
18048
  yield `'`;
17984
18049
  yield directive;
17985
- yield* (0, camelized_1.generateCamelized)(name, "template", start, { __combineToken: token });
18050
+ yield* (0, camelized_1.generateCamelized)(name, "template", start, boundary.features);
17986
18051
  yield `'`;
17987
- yield (0, boundary_1.endBoundary)(token, start + name.length);
18052
+ yield boundary.end(start + name.length);
17988
18053
  }
17989
18054
  }
17990
18055
  function* generateEventExpression(options, ctx, prop) {
17991
18056
  if (prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
17992
- const ast = (0, utils_1.getTypeScriptAST)(options.typescript, options.template, prop.exp.content);
18057
+ const ast = (0, utils_2.getTypeScriptAST)(options.typescript, options.template, prop.exp.content);
17993
18058
  const isCompound = isCompoundExpression(options.typescript, ast);
17994
18059
  const interpolation = (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, prop.exp.content, prop.exp.loc.start.offset, isCompound ? `` : `(`, isCompound ? `` : `)`);
17995
18060
  if (isCompound) {
17996
- yield `(...[$event]) => {${utils_1.newLine}`;
17997
- const endScope = ctx.startScope();
17998
- ctx.declare("$event");
18061
+ yield `(...[$event]) => {${utils_2.newLine}`;
18062
+ const scope = ctx.scope();
18063
+ scope.declare("$event");
17999
18064
  yield* ctx.generateConditionGuards();
18000
- yield* interpolation;
18001
- yield utils_1.endOfLine;
18002
- yield* endScope();
18065
+ if (isSingleExpression(options.typescript, ast)) {
18066
+ yield `return (`;
18067
+ yield* interpolation;
18068
+ yield `)`;
18069
+ } else yield* interpolation;
18070
+ yield utils_2.endOfLine;
18071
+ yield* scope.end();
18003
18072
  yield `}`;
18004
18073
  ctx.inlayHints.push({
18005
18074
  blockName: "template",
@@ -18018,28 +18087,29 @@ var require_elementEvents = /* @__PURE__ */ __commonJSMin(((exports) => {
18018
18087
  }
18019
18088
  function* generateModelEventExpression(options, ctx, prop) {
18020
18089
  if (prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
18021
- yield `(...[$event]) => {${utils_1.newLine}`;
18090
+ yield `(...[$event]) => {${utils_2.newLine}`;
18022
18091
  yield* ctx.generateConditionGuards();
18023
18092
  yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.verification, prop.exp.content, prop.exp.loc.start.offset);
18024
- yield ` = $event${utils_1.endOfLine}`;
18093
+ yield ` = $event${utils_2.endOfLine}`;
18025
18094
  yield `}`;
18026
18095
  } else yield `() => {}`;
18027
18096
  }
18028
18097
  function isCompoundExpression(ts, ast) {
18029
- let result = true;
18030
- if (ast.statements.length === 0) result = false;
18031
- else if (ast.statements.length === 1) ts.forEachChild(ast, (child_1) => {
18032
- if (ts.isExpressionStatement(child_1)) ts.forEachChild(child_1, (child_2) => {
18033
- if (ts.isArrowFunction(child_2)) result = false;
18034
- else if (isPropertyAccessOrId(ts, child_2)) result = false;
18035
- });
18036
- else if (ts.isFunctionDeclaration(child_1)) result = false;
18037
- });
18038
- return result;
18098
+ if (ast.statements.length === 0) return false;
18099
+ if (ast.statements.length === 1 && ast.text[ast.endOfFileToken.pos - 1] !== ";") {
18100
+ const statement = ast.statements[0];
18101
+ if (ts.isExpressionStatement(statement)) {
18102
+ const node = (0, utils_1.getUnwrappedExpression)(ts, statement.expression);
18103
+ if (ts.isArrowFunction(node) || ts.isIdentifier(node) || ts.isElementAccessExpression(node) || ts.isPropertyAccessExpression(node)) return false;
18104
+ } else if (ts.isFunctionDeclaration(statement)) return false;
18105
+ }
18106
+ return true;
18039
18107
  }
18040
- function isPropertyAccessOrId(ts, node) {
18041
- if (ts.isIdentifier(node)) return true;
18042
- if (ts.isPropertyAccessExpression(node)) return isPropertyAccessOrId(ts, node.expression);
18108
+ function isSingleExpression(ts, ast) {
18109
+ if (ast.statements.length === 1 && ast.text[ast.endOfFileToken.pos - 1] !== ";") {
18110
+ const statement = ast.statements[0];
18111
+ if (ts.isExpressionStatement(statement)) return true;
18112
+ }
18043
18113
  return false;
18044
18114
  }
18045
18115
  }));
@@ -18093,7 +18163,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18093
18163
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18094
18164
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
18095
18165
  var picomatch_1 = require_picomatch();
18096
- var shared_2 = require_shared$2();
18166
+ var shared_2 = require_shared$1();
18097
18167
  var codeFeatures_1 = require_codeFeatures();
18098
18168
  var inlayHints_1 = require_inlayHints();
18099
18169
  var names_1 = require_names();
@@ -18151,19 +18221,19 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18151
18221
  const shouldCamelize = getShouldCamelize(options, node, prop, propName);
18152
18222
  const features = getPropsCodeFeatures(checkUnknownProps);
18153
18223
  if (shouldSpread) yield `...{ `;
18154
- const token = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18224
+ const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18155
18225
  if (prop.arg) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, propName, prop.arg.loc.start.offset, features, shouldCamelize);
18156
18226
  else {
18157
- const token2 = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18227
+ const boundary2 = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18158
18228
  yield propName;
18159
- yield (0, boundary_1.endBoundary)(token2, prop.loc.start.offset + 7);
18229
+ yield boundary2.end(prop.loc.start.offset + 7);
18160
18230
  }
18161
18231
  yield `: `;
18162
18232
  const argLoc = prop.arg?.loc ?? prop.loc;
18163
- const token3 = yield* (0, boundary_1.startBoundary)("template", argLoc.start.offset, codeFeatures_1.codeFeatures.verification);
18233
+ const boundary3 = yield* boundary_1.Boundary.start("template", argLoc.start.offset, codeFeatures_1.codeFeatures.verification);
18164
18234
  yield* generatePropExp(options, ctx, prop, prop.exp);
18165
- yield (0, boundary_1.endBoundary)(token3, argLoc.end.offset);
18166
- yield (0, boundary_1.endBoundary)(token, prop.loc.end.offset);
18235
+ yield boundary3.end(argLoc.end.offset);
18236
+ yield boundary.end(prop.loc.end.offset);
18167
18237
  if (shouldSpread) yield ` }`;
18168
18238
  yield `,${utils_1.newLine}`;
18169
18239
  if (isComponent && prop.name === "model" && prop.modifiers.length) {
@@ -18177,7 +18247,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18177
18247
  const shouldCamelize = getShouldCamelize(options, node, prop, prop.name);
18178
18248
  const features = getPropsCodeFeatures(checkUnknownProps);
18179
18249
  if (shouldSpread) yield `...{ `;
18180
- const token = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18250
+ const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18181
18251
  const prefix = options.template.content.slice(prop.loc.start.offset, prop.loc.start.offset + 1);
18182
18252
  if (prefix === "." || prefix === "#") for (const char of prop.name) yield [
18183
18253
  char,
@@ -18190,7 +18260,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18190
18260
  if (prop.name === "style") yield `{}`;
18191
18261
  else if (prop.value) yield* generateAttrValue(prop.value, codeFeatures_1.codeFeatures.withoutNavigation);
18192
18262
  else yield `true`;
18193
- yield (0, boundary_1.endBoundary)(token, prop.loc.end.offset);
18263
+ yield boundary.end(prop.loc.end.offset);
18194
18264
  if (shouldSpread) yield ` }`;
18195
18265
  yield `,${utils_1.newLine}`;
18196
18266
  } else if (prop.name === "bind" && !prop.arg && prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) if (prop.exp.loc.source === "$attrs") failedPropExps?.push({
@@ -18199,10 +18269,10 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18199
18269
  suffix: `)`
18200
18270
  });
18201
18271
  else {
18202
- const token = yield* (0, boundary_1.startBoundary)("template", prop.exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18272
+ const boundary = yield* boundary_1.Boundary.start("template", prop.exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18203
18273
  yield `...`;
18204
18274
  yield* generatePropExp(options, ctx, prop, prop.exp);
18205
- yield (0, boundary_1.endBoundary)(token, prop.exp.loc.end.offset);
18275
+ yield boundary.end(prop.exp.loc.end.offset);
18206
18276
  yield `,${utils_1.newLine}`;
18207
18277
  }
18208
18278
  }
@@ -18211,7 +18281,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18211
18281
  else if (prop.arg?.loc.start.offset !== prop.exp?.loc.start.offset) yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, exp.loc.source, exp.loc.start.offset, `(`, `)`);
18212
18282
  else {
18213
18283
  const propVariableName = (0, shared_1.camelize)(exp.loc.source);
18214
- if (utils_1.identifierRegex.test(propVariableName)) {
18284
+ if (utils_1.identifierRE.test(propVariableName)) {
18215
18285
  const codes = (0, camelized_1.generateCamelized)(exp.loc.source, "template", exp.loc.start.offset, {
18216
18286
  ...codeFeatures_1.codeFeatures.withoutHighlightAndCompletion,
18217
18287
  __shorthandExpression: "html"
@@ -18221,7 +18291,7 @@ var require_elementProps = /* @__PURE__ */ __commonJSMin(((exports) => {
18221
18291
  yield* codes;
18222
18292
  yield `.value`;
18223
18293
  } else {
18224
- ctx.recordComponentAccess("template", propVariableName, exp.loc.start.offset);
18294
+ ctx.accessVariable("template", propVariableName, exp.loc.start.offset);
18225
18295
  yield names_1.names.ctx;
18226
18296
  yield `.`;
18227
18297
  yield* codes;
@@ -18338,7 +18408,7 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18338
18408
  function* generateElementDirectives(options, ctx, node) {
18339
18409
  for (const prop of node.props) {
18340
18410
  if (prop.type !== CompilerDOM.NodeTypes.DIRECTIVE || prop.name === "slot" || prop.name === "on" || prop.name === "model" || prop.name === "bind") continue;
18341
- const token = yield* (0, boundary_1.startBoundary)("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18411
+ const boundary = yield* boundary_1.Boundary.start("template", prop.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18342
18412
  yield `${names_1.names.asFunctionalDirective}(`;
18343
18413
  yield* generateIdentifier(options, ctx, prop);
18344
18414
  yield `, {} as import('${options.vueCompilerOptions.lib}').ObjectDirective)(null!, { ...${names_1.names.directiveBindingRestFields}, `;
@@ -18346,30 +18416,30 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18346
18416
  yield* generateModifiers(options, ctx, prop);
18347
18417
  yield* generateValue(options, ctx, prop);
18348
18418
  yield ` }, null!, null!)`;
18349
- yield (0, boundary_1.endBoundary)(token, prop.loc.end.offset);
18419
+ yield boundary.end(prop.loc.end.offset);
18350
18420
  yield utils_1.endOfLine;
18351
18421
  }
18352
18422
  }
18353
18423
  function* generateIdentifier(options, ctx, prop) {
18354
18424
  const rawName = "v-" + prop.name;
18355
18425
  const startOffset = prop.loc.start.offset;
18356
- const token = yield* (0, boundary_1.startBoundary)("template", startOffset, codeFeatures_1.codeFeatures.verification);
18426
+ const boundary = yield* boundary_1.Boundary.start("template", startOffset, codeFeatures_1.codeFeatures.verification);
18357
18427
  yield names_1.names.directives;
18358
18428
  yield `.`;
18359
18429
  yield* (0, camelized_1.generateCamelized)(rawName, "template", prop.loc.start.offset, {
18360
18430
  ...codeFeatures_1.codeFeatures.withoutHighlightAndCompletion,
18361
18431
  verification: options.vueCompilerOptions.checkUnknownDirectives && !(0, shared_1.isBuiltInDirective)(prop.name)
18362
18432
  });
18363
- if (!(0, shared_1.isBuiltInDirective)(prop.name)) ctx.recordComponentAccess("template", (0, shared_1.camelize)(rawName), prop.loc.start.offset);
18364
- yield (0, boundary_1.endBoundary)(token, startOffset + rawName.length);
18433
+ if (!(0, shared_1.isBuiltInDirective)(prop.name)) ctx.accessVariable("template", (0, shared_1.camelize)(rawName), prop.loc.start.offset);
18434
+ yield boundary.end(startOffset + rawName.length);
18365
18435
  }
18366
18436
  function* generateArg(options, ctx, prop) {
18367
18437
  const { arg } = prop;
18368
18438
  if (arg?.type !== CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) return;
18369
18439
  const startOffset = arg.loc.start.offset + arg.loc.source.indexOf(arg.content);
18370
- const token = yield* (0, boundary_1.startBoundary)("template", startOffset, codeFeatures_1.codeFeatures.verification);
18440
+ const boundary = yield* boundary_1.Boundary.start("template", startOffset, codeFeatures_1.codeFeatures.verification);
18371
18441
  yield `arg`;
18372
- yield (0, boundary_1.endBoundary)(token, startOffset + arg.content.length);
18442
+ yield boundary.end(startOffset + arg.content.length);
18373
18443
  yield `: `;
18374
18444
  if (arg.isStatic) yield* (0, stringLiteralKey_1.generateStringLiteralKey)(arg.content, startOffset, codeFeatures_1.codeFeatures.all);
18375
18445
  else yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, arg.content, startOffset, `(`, `)`);
@@ -18380,9 +18450,9 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18380
18450
  if (!modifiers.length) return;
18381
18451
  const startOffset = modifiers[0].loc.start.offset - 1;
18382
18452
  const endOffset = modifiers.at(-1).loc.end.offset;
18383
- const token = yield* (0, boundary_1.startBoundary)("template", startOffset, codeFeatures_1.codeFeatures.verification);
18453
+ const boundary = yield* boundary_1.Boundary.start("template", startOffset, codeFeatures_1.codeFeatures.verification);
18384
18454
  yield propertyName;
18385
- yield (0, boundary_1.endBoundary)(token, endOffset);
18455
+ yield boundary.end(endOffset);
18386
18456
  yield `: { `;
18387
18457
  for (const mod of modifiers) {
18388
18458
  yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, mod.content, mod.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlight);
@@ -18393,9 +18463,9 @@ var require_elementDirectives = /* @__PURE__ */ __commonJSMin(((exports) => {
18393
18463
  function* generateValue(options, ctx, prop) {
18394
18464
  const { exp } = prop;
18395
18465
  if (exp?.type !== CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) return;
18396
- const token = yield* (0, boundary_1.startBoundary)("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18466
+ const boundary = yield* boundary_1.Boundary.start("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18397
18467
  yield `value`;
18398
- yield (0, boundary_1.endBoundary)(token, exp.loc.end.offset);
18468
+ yield boundary.end(exp.loc.end.offset);
18399
18469
  yield `: `;
18400
18470
  yield* (0, elementProps_1.generatePropExp)(options, ctx, prop, exp);
18401
18471
  }
@@ -18410,7 +18480,7 @@ var require_propertyAccess = /* @__PURE__ */ __commonJSMin(((exports) => {
18410
18480
  var interpolation_1 = require_interpolation();
18411
18481
  function* generatePropertyAccess(options, ctx, code, offset, features) {
18412
18482
  if (code.startsWith("[") && code.endsWith("]")) yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, features, code, offset);
18413
- else if (utils_1.identifierRegex.test(code)) {
18483
+ else if (utils_1.identifierRE.test(code)) {
18414
18484
  yield `.`;
18415
18485
  yield [
18416
18486
  code,
@@ -18432,7 +18502,10 @@ var require_escaped = /* @__PURE__ */ __commonJSMin(((exports) => {
18432
18502
  exports.generateEscaped = generateEscaped;
18433
18503
  function* generateEscaped(text, source, offset, features, escapeTarget) {
18434
18504
  const parts = text.split(escapeTarget);
18435
- const combineToken = features.__combineToken ?? Symbol();
18505
+ if (!features.__combineToken) features = {
18506
+ ...features,
18507
+ __combineToken: Symbol()
18508
+ };
18436
18509
  let isEscapeTarget = false;
18437
18510
  for (let i = 0; i < parts.length; i++) {
18438
18511
  const part = parts[i];
@@ -18441,10 +18514,7 @@ var require_escaped = /* @__PURE__ */ __commonJSMin(((exports) => {
18441
18514
  part,
18442
18515
  source,
18443
18516
  offset,
18444
- i === 0 ? {
18445
- ...features,
18446
- __combineToken: combineToken
18447
- } : { __combineToken: combineToken }
18517
+ features
18448
18518
  ];
18449
18519
  offset += part.length;
18450
18520
  isEscapeTarget = !isEscapeTarget;
@@ -18454,16 +18524,111 @@ var require_escaped = /* @__PURE__ */ __commonJSMin(((exports) => {
18454
18524
  //#endregion
18455
18525
  //#region node_modules/@vue/language-core/lib/codegen/template/styleScopedClasses.js
18456
18526
  var require_styleScopedClasses = /* @__PURE__ */ __commonJSMin(((exports) => {
18527
+ var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
18528
+ if (k2 === void 0) k2 = k;
18529
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18530
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
18531
+ enumerable: true,
18532
+ get: function() {
18533
+ return m[k];
18534
+ }
18535
+ };
18536
+ Object.defineProperty(o, k2, desc);
18537
+ }) : (function(o, m, k, k2) {
18538
+ if (k2 === void 0) k2 = k;
18539
+ o[k2] = m[k];
18540
+ }));
18541
+ var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
18542
+ Object.defineProperty(o, "default", {
18543
+ enumerable: true,
18544
+ value: v
18545
+ });
18546
+ }) : function(o, v) {
18547
+ o["default"] = v;
18548
+ });
18549
+ var __importStar = exports && exports.__importStar || (function() {
18550
+ var ownKeys = function(o) {
18551
+ ownKeys = Object.getOwnPropertyNames || function(o) {
18552
+ var ar = [];
18553
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
18554
+ return ar;
18555
+ };
18556
+ return ownKeys(o);
18557
+ };
18558
+ return function(mod) {
18559
+ if (mod && mod.__esModule) return mod;
18560
+ var result = {};
18561
+ if (mod != null) {
18562
+ for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
18563
+ }
18564
+ __setModuleDefault(result, mod);
18565
+ return result;
18566
+ };
18567
+ })();
18457
18568
  Object.defineProperty(exports, "__esModule", { value: true });
18458
18569
  exports.references = void 0;
18570
+ exports.generateStyleScopedClassReferences = generateStyleScopedClassReferences;
18459
18571
  exports.generateStyleScopedClassReference = generateStyleScopedClassReference;
18572
+ var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18573
+ var shared_1 = require_shared$1();
18460
18574
  var codeFeatures_1 = require_codeFeatures();
18461
18575
  var names_1 = require_names();
18462
18576
  var utils_1 = require_utils$5();
18463
18577
  var boundary_1 = require_boundary();
18464
18578
  var escaped_1 = require_escaped();
18465
- var classNameEscapeRegex = /([\\'])/;
18579
+ var classNameEscapeRE = /([\\'])/;
18466
18580
  exports.references = /* @__PURE__ */ new WeakMap();
18581
+ function* generateStyleScopedClassReferences({ template, typescript: ts }, node) {
18582
+ for (const prop of node.props) if (prop.type === CompilerDOM.NodeTypes.ATTRIBUTE && prop.name === "class" && prop.value) {
18583
+ const [text, start] = (0, shared_1.normalizeAttributeValue)(prop.value);
18584
+ for (const [className, offset] of forEachClassName(text)) yield* generateStyleScopedClassReference(template, className, start + offset);
18585
+ } else if (prop.type === CompilerDOM.NodeTypes.DIRECTIVE && prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.content === "class") {
18586
+ const content = "(" + prop.exp.content + ")";
18587
+ const startOffset = prop.exp.loc.start.offset - 1;
18588
+ const ast = (0, utils_1.getTypeScriptAST)(ts, template, content);
18589
+ const literals = [];
18590
+ for (const node of (0, utils_1.forEachNode)(ts, ast)) {
18591
+ if (!ts.isExpressionStatement(node) || !ts.isParenthesizedExpression(node.expression)) continue;
18592
+ const { expression } = node.expression;
18593
+ if (ts.isStringLiteralLike(expression)) literals.push(expression);
18594
+ else if (ts.isArrayLiteralExpression(expression)) yield* walkArrayLiteral(expression);
18595
+ else if (ts.isObjectLiteralExpression(expression)) yield* walkObjectLiteral(expression);
18596
+ }
18597
+ for (const literal of literals) {
18598
+ const start = literal.end - literal.text.length - 1 + startOffset;
18599
+ for (const [className, offset] of forEachClassName(literal.text)) yield* generateStyleScopedClassReference(template, className, start + offset);
18600
+ }
18601
+ function* walkArrayLiteral(node) {
18602
+ const { elements } = node;
18603
+ for (const element of elements) if (ts.isStringLiteralLike(element)) literals.push(element);
18604
+ else if (ts.isObjectLiteralExpression(element)) yield* walkObjectLiteral(element);
18605
+ }
18606
+ function* walkObjectLiteral(node) {
18607
+ const { properties } = node;
18608
+ for (const property of properties) if (ts.isPropertyAssignment(property)) {
18609
+ const { name } = property;
18610
+ if (ts.isIdentifier(name)) {
18611
+ const text = (0, shared_1.getNodeText)(ts, name, ast);
18612
+ yield* generateStyleScopedClassReference(template, text, name.end - text.length + startOffset);
18613
+ } else if (ts.isStringLiteral(name)) literals.push(name);
18614
+ else if (ts.isComputedPropertyName(name)) {
18615
+ const { expression } = name;
18616
+ if (ts.isStringLiteralLike(expression)) literals.push(expression);
18617
+ }
18618
+ } else if (ts.isShorthandPropertyAssignment(property)) {
18619
+ const text = (0, shared_1.getNodeText)(ts, property.name, ast);
18620
+ yield* generateStyleScopedClassReference(template, text, property.name.end - text.length + startOffset);
18621
+ }
18622
+ }
18623
+ }
18624
+ }
18625
+ function* forEachClassName(content) {
18626
+ let offset = 0;
18627
+ for (const className of content.split(" ")) {
18628
+ yield [className, offset];
18629
+ offset += className.length + 1;
18630
+ }
18631
+ }
18467
18632
  function* generateStyleScopedClassReference(block, className, offset, fullStart = offset) {
18468
18633
  if (!className) {
18469
18634
  yield `/** @type {${names_1.names.StyleScopedClasses}['`;
@@ -18483,11 +18648,11 @@ var require_styleScopedClasses = /* @__PURE__ */ __commonJSMin(((exports) => {
18483
18648
  arr.push([className, offset]);
18484
18649
  } else cache[1].push([className, offset]);
18485
18650
  yield `/** @type {${names_1.names.StyleScopedClasses}[`;
18486
- const token = yield* (0, boundary_1.startBoundary)(block.name, fullStart, codeFeatures_1.codeFeatures.navigation);
18651
+ const boundary = yield* boundary_1.Boundary.start(block.name, fullStart, codeFeatures_1.codeFeatures.navigationAndCompletion);
18487
18652
  yield `'`;
18488
- yield* (0, escaped_1.generateEscaped)(className, block.name, offset, codeFeatures_1.codeFeatures.navigationAndCompletion, classNameEscapeRegex);
18653
+ yield* (0, escaped_1.generateEscaped)(className, block.name, offset, boundary.features, classNameEscapeRE);
18489
18654
  yield `'`;
18490
- yield (0, boundary_1.endBoundary)(token, offset + className.length);
18655
+ yield boundary.end(offset + className.length);
18491
18656
  yield `]} */${utils_1.endOfLine}`;
18492
18657
  }
18493
18658
  }));
@@ -18554,25 +18719,25 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
18554
18719
  yield `const { `;
18555
18720
  if (slotDir.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && slotDir.arg.content) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, slotDir.arg.loc.source, slotDir.arg.loc.start.offset, slotDir.arg.isStatic ? codeFeatures_1.codeFeatures.withoutHighlight : codeFeatures_1.codeFeatures.all, false, true);
18556
18721
  else {
18557
- const token = yield* (0, boundary_1.startBoundary)("template", slotDir.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18722
+ const boundary = yield* boundary_1.Boundary.start("template", slotDir.loc.start.offset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18558
18723
  yield `default`;
18559
- yield (0, boundary_1.endBoundary)(token, slotDir.loc.start.offset + (slotDir.rawName?.length ?? 0));
18724
+ yield boundary.end(slotDir.loc.start.offset + (slotDir.rawName?.length ?? 0));
18560
18725
  }
18561
18726
  } else {
18562
18727
  yield `const { `;
18563
- const token = yield* (0, boundary_1.startBoundary)("template", node.loc.start.offset, codeFeatures_1.codeFeatures.navigation);
18728
+ const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, codeFeatures_1.codeFeatures.navigation);
18564
18729
  yield `default`;
18565
- yield (0, boundary_1.endBoundary)(token, node.loc.end.offset);
18730
+ yield boundary.end(node.loc.end.offset);
18566
18731
  }
18567
18732
  yield `: ${slotVar} } = ${ctxVar}.slots!${utils_1.endOfLine}`;
18568
- const endScope = ctx.startScope();
18733
+ const scope = ctx.scope();
18569
18734
  if (slotDir?.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
18570
18735
  const slotAst = (0, utils_1.getTypeScriptAST)(options.typescript, options.template, `(${slotDir.exp.content}) => {}`);
18571
18736
  yield* generateSlotParameters(options, ctx, slotAst, slotDir.exp, slotVar);
18572
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, slotAst, slotAst));
18737
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, slotAst, slotAst));
18573
18738
  }
18574
18739
  for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
18575
- yield* endScope();
18740
+ yield* scope.end();
18576
18741
  if (slotDir) {
18577
18742
  let isStatic = true;
18578
18743
  if (slotDir.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) isStatic = slotDir.arg.isStatic;
@@ -18613,7 +18778,7 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
18613
18778
  yield `] = ${names_1.names.vSlot}(${slotVar}!`;
18614
18779
  if (types.some((t) => t)) {
18615
18780
  yield `, `;
18616
- const token = yield* (0, boundary_1.startBoundary)("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18781
+ const boundary = yield* boundary_1.Boundary.start("template", exp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
18617
18782
  yield `(`;
18618
18783
  yield* types.flatMap((type) => type ? [
18619
18784
  `_`,
@@ -18621,7 +18786,7 @@ var require_vSlot = /* @__PURE__ */ __commonJSMin(((exports) => {
18621
18786
  `, `
18622
18787
  ] : `_, `);
18623
18788
  yield `) => [] as any`;
18624
- yield (0, boundary_1.endBoundary)(token, exp.loc.end.offset);
18789
+ yield boundary.end(exp.loc.end.offset);
18625
18790
  }
18626
18791
  yield `)${utils_1.endOfLine}`;
18627
18792
  }
@@ -18677,7 +18842,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18677
18842
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
18678
18843
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
18679
18844
  var muggle_string_1 = require_out$1();
18680
- var shared_2 = require_shared$2();
18845
+ var shared_2 = require_shared$1();
18681
18846
  var codeFeatures_1 = require_codeFeatures();
18682
18847
  var inlayHints_1 = require_inlayHints();
18683
18848
  var names_1 = require_names();
@@ -18721,7 +18886,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18721
18886
  }
18722
18887
  yield `${utils_1.endOfLine}`;
18723
18888
  } else {
18724
- const originalNames = new Set([
18889
+ const originalNames = /* @__PURE__ */ new Set([
18725
18890
  (0, shared_1.capitalize)((0, shared_1.camelize)(tag)),
18726
18891
  (0, shared_1.camelize)(tag),
18727
18892
  tag
@@ -18748,7 +18913,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18748
18913
  ...options.vueCompilerOptions.checkUnknownComponents ? codeFeatures_1.codeFeatures.verification : codeFeatures_1.codeFeatures.doNotReportTs2339AndTs2551
18749
18914
  });
18750
18915
  yield `]${utils_1.endOfLine}`;
18751
- if (utils_1.identifierRegex.test((0, shared_1.camelize)(tag))) {
18916
+ if (utils_1.identifierRE.test((0, shared_1.camelize)(tag))) {
18752
18917
  yield `/** @ts-ignore @type {`;
18753
18918
  for (const offset of [startTagOffset, endTagOffset]) {
18754
18919
  if (offset === void 0) continue;
@@ -18787,13 +18952,14 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18787
18952
  yield propsStr;
18788
18953
  yield `}))${utils_1.endOfLine}`;
18789
18954
  yield `const `;
18790
- const token = yield* (0, boundary_1.startBoundary)("template", node.loc.start.offset, codeFeatures_1.codeFeatures.doNotReportTs6133);
18955
+ const boundary = yield* boundary_1.Boundary.start("template", node.loc.start.offset, codeFeatures_1.codeFeatures.doNotReportTs6133);
18791
18956
  yield vnodeVar;
18792
- yield (0, boundary_1.endBoundary)(token, node.loc.end.offset);
18957
+ yield boundary.end(node.loc.end.offset);
18793
18958
  yield ` = ${functionalVar}`;
18794
- if (ctx.currentInfo.generic) {
18795
- const { content, offset } = ctx.currentInfo.generic;
18796
- const token = yield* (0, boundary_1.startBoundary)("template", offset, codeFeatures_1.codeFeatures.verification);
18959
+ const commentInfo = ctx.getCommentInfo();
18960
+ if (commentInfo.generic) {
18961
+ const { content, offset } = commentInfo.generic;
18962
+ const boundary = yield* boundary_1.Boundary.start("template", offset, codeFeatures_1.codeFeatures.verification);
18797
18963
  yield `<`;
18798
18964
  yield [
18799
18965
  content,
@@ -18802,11 +18968,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18802
18968
  codeFeatures_1.codeFeatures.all
18803
18969
  ];
18804
18970
  yield `>`;
18805
- yield (0, boundary_1.endBoundary)(token, offset + content.length);
18971
+ yield boundary.end(offset + content.length);
18806
18972
  }
18807
18973
  const shouldInheritAttrs = hasVBindAttrs(options, ctx, node);
18808
18974
  yield `(`;
18809
- const token2 = yield* (0, boundary_1.startBoundary)("template", startTagOffset, shouldInheritAttrs && options.vueCompilerOptions.checkRequiredFallthroughAttributes ? {} : codeFeatures_1.codeFeatures.verification);
18975
+ const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, shouldInheritAttrs && options.vueCompilerOptions.checkRequiredFallthroughAttributes ? {} : codeFeatures_1.codeFeatures.verification);
18810
18976
  yield `{`;
18811
18977
  yield [
18812
18978
  ``,
@@ -18817,7 +18983,7 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18817
18983
  yield utils_1.newLine;
18818
18984
  yield* propCodes;
18819
18985
  yield `}`;
18820
- yield (0, boundary_1.endBoundary)(token2, startTagOffset + tag.length);
18986
+ yield boundary2.end(startTagOffset + tag.length);
18821
18987
  yield `, ...${names_1.names.functionalComponentArgsRest}(${functionalVar}))${utils_1.endOfLine}`;
18822
18988
  yield* generateFailedExpressions(options, ctx, failedPropExps);
18823
18989
  yield* (0, elementEvents_1.generateElementEvents)(options, ctx, node, componentVar, getCtxVar, getPropsVar);
@@ -18840,11 +19006,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18840
19006
  yield `var ${restsVar} = ${names_1.names.omit}(${getPropsVar()}, {\n${propsStr}})${utils_1.endOfLine}`;
18841
19007
  ctx.inheritedAttrVars.add(restsVar);
18842
19008
  } else ctx.inheritedAttrVars.add(getPropsVar());
18843
- yield* generateStyleScopedClassReferences(options, node);
19009
+ yield* (0, styleScopedClasses_1.generateStyleScopedClassReferences)(options, node);
18844
19010
  const slotDir = node.props.find(CompilerDOM.isVSlot);
18845
19011
  if (slotDir || node.children.length) yield* (0, vSlot_1.generateVSlot)(options, ctx, node, slotDir, getCtxVar());
18846
- if (isCtxVarUsed) yield `var ${ctxVar}!: ${names_1.names.FunctionalComponentCtx}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
18847
- if (isPropsVarUsed) yield `var ${propsVar}!: ${names_1.names.FunctionalComponentProps}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
19012
+ if (isCtxVarUsed) yield `var ${ctxVar}!: ${names_1.names.ExtractComponentContext}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
19013
+ if (isPropsVarUsed) yield `var ${propsVar}!: ${names_1.names.ExtractComponentProps}<typeof ${componentVar}, typeof ${vnodeVar}>${utils_1.endOfLine}`;
18848
19014
  ctx.components.pop();
18849
19015
  }
18850
19016
  function* generateElement(options, ctx, node) {
@@ -18858,11 +19024,11 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18858
19024
  yield* (0, propertyAccess_1.generatePropertyAccess)(options, ctx, node.tag, endTagOffset, codeFeatures_1.codeFeatures.withoutHighlightAndCompletion);
18859
19025
  }
18860
19026
  yield `)(`;
18861
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19027
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
18862
19028
  yield `{${utils_1.newLine}`;
18863
19029
  yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props, options.vueCompilerOptions.checkUnknownProps, failedPropExps);
18864
19030
  yield `}`;
18865
- yield (0, boundary_1.endBoundary)(token, startTagOffset + node.tag.length);
19031
+ yield boundary.end(startTagOffset + node.tag.length);
18866
19032
  yield `)${utils_1.endOfLine}`;
18867
19033
  yield* generateFailedExpressions(options, ctx, failedPropExps);
18868
19034
  yield* (0, elementDirectives_1.generateElementDirectives)(options, ctx, node);
@@ -18874,73 +19040,22 @@ var require_element = /* @__PURE__ */ __commonJSMin(((exports) => {
18874
19040
  }
18875
19041
  if (ctx.singleRootNodes.has(node)) ctx.singleRootElTypes.add(`${names_1.names.Elements}['${node.tag}']`);
18876
19042
  if (hasVBindAttrs(options, ctx, node)) ctx.inheritedAttrVars.add(`${names_1.names.intrinsics}.${node.tag}`);
18877
- yield* generateStyleScopedClassReferences(options, node);
19043
+ yield* (0, styleScopedClasses_1.generateStyleScopedClassReferences)(options, node);
18878
19044
  for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
18879
19045
  }
18880
19046
  function* generateFragment(options, ctx, node) {
18881
19047
  const [startTagOffset] = (0, shared_2.getElementTagOffsets)(node, options.template);
18882
19048
  if (node.props.length) {
18883
19049
  yield `__VLS_asFunctionalElement(__VLS_intrinsics.template)(`;
18884
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19050
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
18885
19051
  yield `{${utils_1.newLine}`;
18886
19052
  yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props, options.vueCompilerOptions.checkUnknownProps);
18887
19053
  yield `}`;
18888
- yield (0, boundary_1.endBoundary)(token, startTagOffset + node.tag.length);
19054
+ yield boundary.end(startTagOffset + node.tag.length);
18889
19055
  yield `)${utils_1.endOfLine}`;
18890
19056
  }
18891
19057
  for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child);
18892
19058
  }
18893
- function* generateStyleScopedClassReferences({ template, typescript: ts }, node) {
18894
- for (const prop of node.props) if (prop.type === CompilerDOM.NodeTypes.ATTRIBUTE && prop.name === "class" && prop.value) {
18895
- const [text, start] = (0, shared_2.normalizeAttributeValue)(prop.value);
18896
- for (const [className, offset] of forEachClassName(text)) yield* (0, styleScopedClasses_1.generateStyleScopedClassReference)(template, className, start + offset);
18897
- } else if (prop.type === CompilerDOM.NodeTypes.DIRECTIVE && prop.arg?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.content === "class") {
18898
- const content = "(" + prop.exp.content + ")";
18899
- const startOffset = prop.exp.loc.start.offset - 1;
18900
- const ast = (0, utils_1.getTypeScriptAST)(ts, template, content);
18901
- const literals = [];
18902
- for (const node of (0, utils_1.forEachNode)(ts, ast)) {
18903
- if (!ts.isExpressionStatement(node) || !ts.isParenthesizedExpression(node.expression)) continue;
18904
- const { expression } = node.expression;
18905
- if (ts.isStringLiteralLike(expression)) literals.push(expression);
18906
- else if (ts.isArrayLiteralExpression(expression)) yield* walkArrayLiteral(expression);
18907
- else if (ts.isObjectLiteralExpression(expression)) yield* walkObjectLiteral(expression);
18908
- }
18909
- for (const literal of literals) {
18910
- const start = literal.end - literal.text.length - 1 + startOffset;
18911
- for (const [className, offset] of forEachClassName(literal.text)) yield* (0, styleScopedClasses_1.generateStyleScopedClassReference)(template, className, start + offset);
18912
- }
18913
- function* walkArrayLiteral(node) {
18914
- const { elements } = node;
18915
- for (const element of elements) if (ts.isStringLiteralLike(element)) literals.push(element);
18916
- else if (ts.isObjectLiteralExpression(element)) yield* walkObjectLiteral(element);
18917
- }
18918
- function* walkObjectLiteral(node) {
18919
- const { properties } = node;
18920
- for (const property of properties) if (ts.isPropertyAssignment(property)) {
18921
- const { name } = property;
18922
- if (ts.isIdentifier(name)) {
18923
- const text = (0, shared_2.getNodeText)(ts, name, ast);
18924
- yield* (0, styleScopedClasses_1.generateStyleScopedClassReference)(template, text, name.end - text.length + startOffset);
18925
- } else if (ts.isStringLiteral(name)) literals.push(name);
18926
- else if (ts.isComputedPropertyName(name)) {
18927
- const { expression } = name;
18928
- if (ts.isStringLiteralLike(expression)) literals.push(expression);
18929
- }
18930
- } else if (ts.isShorthandPropertyAssignment(property)) {
18931
- const text = (0, shared_2.getNodeText)(ts, property.name, ast);
18932
- yield* (0, styleScopedClasses_1.generateStyleScopedClassReference)(template, text, property.name.end - text.length + startOffset);
18933
- }
18934
- }
18935
- }
18936
- }
18937
- function* forEachClassName(content) {
18938
- let offset = 0;
18939
- for (const className of content.split(" ")) {
18940
- yield [className, offset];
18941
- offset += className.length + 1;
18942
- }
18943
- }
18944
19059
  function* generateFailedExpressions(options, ctx, failedPropExps) {
18945
19060
  for (const { node, prefix, suffix } of failedPropExps) {
18946
19061
  yield* (0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, node.loc.source, node.loc.start.offset, prefix, suffix);
@@ -19001,7 +19116,7 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19001
19116
  Object.defineProperty(exports, "__esModule", { value: true });
19002
19117
  exports.generateSlotOutlet = generateSlotOutlet;
19003
19118
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19004
- var shared_1 = require_shared$2();
19119
+ var shared_1 = require_shared$1();
19005
19120
  var codeFeatures_1 = require_codeFeatures();
19006
19121
  var inlayHints_1 = require_inlayHints();
19007
19122
  var names_1 = require_names();
@@ -19032,25 +19147,25 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19032
19147
  `]`
19033
19148
  ];
19034
19149
  else codes = [`['default']`];
19035
- const token = yield* (0, boundary_1.startBoundary)("template", nameProp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
19150
+ const boundary = yield* boundary_1.Boundary.start("template", nameProp.loc.start.offset, codeFeatures_1.codeFeatures.verification);
19036
19151
  yield options.slotsAssignName ?? names_1.names.slots;
19037
19152
  yield* codes;
19038
- yield (0, boundary_1.endBoundary)(token, nameProp.loc.end.offset);
19153
+ yield boundary.end(nameProp.loc.end.offset);
19039
19154
  } else {
19040
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19155
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19041
19156
  yield `${options.slotsAssignName ?? names_1.names.slots}[`;
19042
- const token2 = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19157
+ const boundary2 = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19043
19158
  yield `'default'`;
19044
- yield (0, boundary_1.endBoundary)(token2, startTagEndOffset);
19159
+ yield boundary2.end(startTagEndOffset);
19045
19160
  yield `]`;
19046
- yield (0, boundary_1.endBoundary)(token, startTagEndOffset);
19161
+ yield boundary.end(startTagEndOffset);
19047
19162
  }
19048
19163
  yield `)(`;
19049
- const token = yield* (0, boundary_1.startBoundary)("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19164
+ const boundary = yield* boundary_1.Boundary.start("template", startTagOffset, codeFeatures_1.codeFeatures.verification);
19050
19165
  yield `{${utils_1.newLine}`;
19051
19166
  yield* (0, elementProps_1.generateElementProps)(options, ctx, node, node.props.filter((prop) => prop !== nameProp), true);
19052
19167
  yield `}`;
19053
- yield (0, boundary_1.endBoundary)(token, startTagEndOffset);
19168
+ yield boundary.end(startTagEndOffset);
19054
19169
  yield `)${utils_1.endOfLine}`;
19055
19170
  } else {
19056
19171
  yield `var ${propsVar} = {${utils_1.newLine}`;
@@ -19060,7 +19175,6 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19060
19175
  name: nameProp.value.content,
19061
19176
  offset: nameProp.loc.start.offset + nameProp.loc.source.indexOf(nameProp.value.content, nameProp.name.length),
19062
19177
  tagRange: [startTagOffset, startTagOffset + node.tag.length],
19063
- nodeLoc: node.loc,
19064
19178
  propsVar: ctx.getHoistVariable(propsVar)
19065
19179
  });
19066
19180
  else if (nameProp?.type === CompilerDOM.NodeTypes.DIRECTIVE && nameProp.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
@@ -19077,7 +19191,6 @@ var require_slotOutlet = /* @__PURE__ */ __commonJSMin(((exports) => {
19077
19191
  } else ctx.slots.push({
19078
19192
  name: "default",
19079
19193
  tagRange: [startTagOffset, startTagEndOffset],
19080
- nodeLoc: node.loc,
19081
19194
  propsVar: ctx.getHoistVariable(propsVar)
19082
19195
  });
19083
19196
  }
@@ -19141,11 +19254,11 @@ var require_vFor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19141
19254
  function* generateVFor(options, ctx, node) {
19142
19255
  const { source } = node.parseResult;
19143
19256
  const { leftExpressionRange, leftExpressionText } = parseVForNode(node);
19144
- const endScope = ctx.startScope();
19257
+ const scope = ctx.scope();
19145
19258
  yield `for (const [`;
19146
19259
  if (leftExpressionRange && leftExpressionText) {
19147
19260
  const collectAst = (0, utils_1.getTypeScriptAST)(options.typescript, options.template, `const [${leftExpressionText}]`);
19148
- ctx.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, collectAst, collectAst));
19261
+ scope.declare(...(0, collectBindings_1.collectBindingNames)(options.typescript, collectAst, collectAst));
19149
19262
  yield [
19150
19263
  leftExpressionText,
19151
19264
  "template",
@@ -19164,7 +19277,7 @@ var require_vFor$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19164
19277
  ctx.inVFor = true;
19165
19278
  for (const child of node.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child, false, true);
19166
19279
  ctx.inVFor = inVFor;
19167
- yield* endScope();
19280
+ yield* scope.end();
19168
19281
  yield `}${utils_1.newLine}`;
19169
19282
  }
19170
19283
  function parseVForNode(node) {
@@ -19232,7 +19345,7 @@ var require_vIf$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19232
19345
  var interpolation_1 = require_interpolation();
19233
19346
  var templateChild_1 = require_templateChild();
19234
19347
  function* generateVIf(options, ctx, node) {
19235
- const originalBlockConditionsLength = ctx.blockConditions.length;
19348
+ const originalBlockConditionsLength = ctx.conditions.length;
19236
19349
  for (let i = 0; i < node.branches.length; i++) {
19237
19350
  const branch = node.branches[i];
19238
19351
  if (i === 0) yield `if `;
@@ -19242,16 +19355,16 @@ var require_vIf$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19242
19355
  if (branch.condition?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION) {
19243
19356
  const codes = [...(0, interpolation_1.generateInterpolation)(options, ctx, options.template, codeFeatures_1.codeFeatures.all, branch.condition.content, branch.condition.loc.start.offset, `(`, `)`)];
19244
19357
  yield* codes;
19245
- ctx.blockConditions.push((0, muggle_string_1.toString)(codes));
19358
+ ctx.conditions.push((0, muggle_string_1.toString)(codes));
19246
19359
  addedBlockCondition = true;
19247
19360
  yield ` `;
19248
19361
  }
19249
19362
  yield `{${utils_1.newLine}`;
19250
19363
  for (const child of branch.children) yield* (0, templateChild_1.generateTemplateChild)(options, ctx, child, i !== 0, true);
19251
19364
  yield `}${utils_1.newLine}`;
19252
- if (addedBlockCondition) ctx.blockConditions[ctx.blockConditions.length - 1] = `!${ctx.blockConditions[ctx.blockConditions.length - 1]}`;
19365
+ if (addedBlockCondition) ctx.conditions[ctx.conditions.length - 1] = `!${ctx.conditions[ctx.conditions.length - 1]}`;
19253
19366
  }
19254
- ctx.blockConditions.length = originalBlockConditionsLength;
19367
+ ctx.conditions.length = originalBlockConditionsLength;
19255
19368
  }
19256
19369
  }));
19257
19370
  //#endregion
@@ -19302,7 +19415,7 @@ var require_templateChild = /* @__PURE__ */ __commonJSMin(((exports) => {
19302
19415
  exports.generateTemplateChild = generateTemplateChild;
19303
19416
  exports.parseInterpolationNode = parseInterpolationNode;
19304
19417
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19305
- var shared_1 = require_shared$2();
19418
+ var shared_1 = require_shared$1();
19306
19419
  var codeFeatures_1 = require_codeFeatures();
19307
19420
  var utils_1 = require_utils$5();
19308
19421
  var element_1 = require_element();
@@ -19388,11 +19501,11 @@ var require_template$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19388
19501
  };
19389
19502
  }
19390
19503
  function* generateWorker(options, ctx) {
19391
- const endScope = ctx.startScope();
19392
- ctx.declare(...options.setupConsts);
19504
+ const scope = ctx.scope();
19505
+ scope.declare(...options.setupConsts);
19393
19506
  const { slotsAssignName, propsAssignName, vueCompilerOptions, template } = options;
19394
- if (slotsAssignName) ctx.declare(slotsAssignName);
19395
- if (propsAssignName) ctx.declare(propsAssignName);
19507
+ if (slotsAssignName) scope.declare(slotsAssignName);
19508
+ if (propsAssignName) scope.declare(propsAssignName);
19396
19509
  if (vueCompilerOptions.inferTemplateDollarSlots) ctx.dollarVars.add("$slots");
19397
19510
  if (vueCompilerOptions.inferTemplateDollarAttrs) ctx.dollarVars.add("$attrs");
19398
19511
  if (vueCompilerOptions.inferTemplateDollarRefs) ctx.dollarVars.add("$refs");
@@ -19415,7 +19528,7 @@ var require_template$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19415
19528
  if (ctx.dollarVars.has("$el")) yield `$el: ${ctx.generatedTypes.has(names_1.names.RootEl) ? names_1.names.RootEl : `any`}${utils_1.endOfLine}`;
19416
19529
  yield `} & { [K in keyof import('${vueCompilerOptions.lib}').ComponentPublicInstance]: unknown }${utils_1.endOfLine}`;
19417
19530
  }
19418
- yield* endScope();
19531
+ yield* scope.end();
19419
19532
  }
19420
19533
  function* generateSlotsType(options, ctx) {
19421
19534
  if (options.hasDefineSlots) {
@@ -19430,9 +19543,9 @@ var require_template$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
19430
19543
  yield `${utils_1.newLine}& { `;
19431
19544
  if (slot.name && slot.offset !== void 0) yield* (0, objectProperty_1.generateObjectProperty)(options, ctx, slot.name, slot.offset, codeFeatures_1.codeFeatures.navigation);
19432
19545
  else {
19433
- const token = yield* (0, boundary_1.startBoundary)("template", slot.tagRange[0], codeFeatures_1.codeFeatures.navigation);
19546
+ const boundary = yield* boundary_1.Boundary.start("template", slot.tagRange[0], codeFeatures_1.codeFeatures.navigation);
19434
19547
  yield `default`;
19435
- yield (0, boundary_1.endBoundary)(token, slot.tagRange[1]);
19548
+ yield boundary.end(slot.tagRange[1]);
19436
19549
  }
19437
19550
  yield `?: (props: typeof ${slot.propsVar}) => any }`;
19438
19551
  }
@@ -19481,7 +19594,7 @@ var require_compilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
19481
19594
  exports.getDefaultCompilerOptions = getDefaultCompilerOptions;
19482
19595
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
19483
19596
  var path_browserify_1 = require_path_browserify();
19484
- var shared_2 = require_shared$2();
19597
+ var shared_2 = require_shared$1();
19485
19598
  function createParsedCommandLineByJson(ts, host, rootDir, json, configFileName) {
19486
19599
  const extendedPaths = /* @__PURE__ */ new Set();
19487
19600
  const proxyHost = {
@@ -19683,8 +19796,8 @@ var require_compilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
19683
19796
  //#region node_modules/@vue/language-core/lib/plugins/file-html.js
19684
19797
  var require_file_html = /* @__PURE__ */ __commonJSMin(((exports) => {
19685
19798
  Object.defineProperty(exports, "__esModule", { value: true });
19686
- var sfcBlockReg = /<(script|style)\b([\s\S]*?)>([\s\S]*?)<\/\1>/g;
19687
- var langReg = /\blang\s*=\s*(['"]?)(\S*)\b\1/;
19799
+ var sfcBlockRE = /<(script|style)\b([\s\S]*?)>([\s\S]*?)<\/\1>/g;
19800
+ var langRE = /\blang\s*=\s*(['"]?)(\S*)\b\1/;
19688
19801
  var plugin = ({ vueCompilerOptions }) => {
19689
19802
  return {
19690
19803
  version: 2.2,
@@ -19713,11 +19826,11 @@ var require_file_html = /* @__PURE__ */ __commonJSMin(((exports) => {
19713
19826
  errors: []
19714
19827
  };
19715
19828
  let templateContent = content;
19716
- for (const match of content.matchAll(sfcBlockReg)) {
19829
+ for (const match of content.matchAll(sfcBlockRE)) {
19717
19830
  const matchText = match[0];
19718
19831
  const tag = match[1];
19719
19832
  const attrs = match[2];
19720
- const lang = attrs.match(langReg)?.[2];
19833
+ const lang = attrs.match(langRE)?.[2];
19721
19834
  const content = match[3];
19722
19835
  const contentStart = match.index + matchText.indexOf(content);
19723
19836
  if (tag === "style") sfc.descriptor.styles.push({
@@ -19856,7 +19969,7 @@ var require_parseSfc = /* @__PURE__ */ __commonJSMin(((exports) => {
19856
19969
  Object.defineProperty(exports, "__esModule", { value: true });
19857
19970
  exports.parse = parse;
19858
19971
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
19859
- var shared_1 = require_shared$2();
19972
+ var shared_1 = require_shared$1();
19860
19973
  function parse(source) {
19861
19974
  const errors = [];
19862
19975
  const ast = CompilerDOM.parse(source, {
@@ -19987,14 +20100,14 @@ var require_file_md = /* @__PURE__ */ __commonJSMin(((exports) => {
19987
20100
  var muggle_string_1 = require_out$1();
19988
20101
  var buildMappings_1 = require_buildMappings();
19989
20102
  var parseSfc_1 = require_parseSfc();
19990
- var frontmatterReg = /^---[\s\S]*?\n---(?:\r?\n|$)/;
19991
- var codeblockReg = /(`{3}|\${2})[\s\S]+?\1/g;
19992
- var codeSnippetImportReg = /^\s*<<<\s*.+/gm;
19993
- var sfcBlockReg = /<(script|style)\b[^>]*>([\s\S]*?)<\/\1>/g;
19994
- var htmlTagReg = /(?<=<\/?)([a-z][a-z0-9-]*)\b[^>]*(?=>)/gi;
19995
- var interpolationReg = /(?<=\{\{)[\s\S]*?(?=\}\})/g;
19996
- var inlineCodeReg = /(`{1,2})[^`]+\1/g;
19997
- var angleBracketReg = /<[^\s:]*:\S*>/g;
20103
+ var frontmatterRE = /^---[\s\S]*?\n---(?:\r?\n|$)/;
20104
+ var codeblockRE = /(`{3}|\${2})[\s\S]+?\1/g;
20105
+ var codeSnippetImportRE = /^\s*<<<\s*.+/gm;
20106
+ var sfcBlockRE = /<(script|style)\b[^>]*>([\s\S]*?)<\/\1>/g;
20107
+ var htmlTagRE = /(?<=<\/?)([a-z][a-z0-9-]*)\b[^>]*(?=>)/gi;
20108
+ var interpolationRE = /(?<=\{\{)[\s\S]*?(?=\}\})/g;
20109
+ var inlineCodeRE = /(`{1,2})[^`]+\1/g;
20110
+ var angleBracketRE = /<[^\s:]*:\S*>/g;
19998
20111
  var plugin = ({ vueCompilerOptions }) => {
19999
20112
  return {
20000
20113
  version: 2.2,
@@ -20006,13 +20119,13 @@ var require_file_md = /* @__PURE__ */ __commonJSMin(((exports) => {
20006
20119
  },
20007
20120
  parseSFC2(_fileName, languageId, content) {
20008
20121
  if (languageId !== "markdown") return;
20009
- for (const reg of [
20010
- frontmatterReg,
20011
- codeblockReg,
20012
- codeSnippetImportReg
20013
- ]) content = content.replace(reg, (match) => " ".repeat(match.length));
20122
+ for (const pattern of [
20123
+ frontmatterRE,
20124
+ codeblockRE,
20125
+ codeSnippetImportRE
20126
+ ]) content = content.replace(pattern, (match) => " ".repeat(match.length));
20014
20127
  const codes = [];
20015
- for (const { 0: text, index } of content.matchAll(sfcBlockReg)) {
20128
+ for (const { 0: text, index } of content.matchAll(sfcBlockRE)) {
20016
20129
  codes.push([
20017
20130
  text,
20018
20131
  void 0,
@@ -20022,8 +20135,8 @@ var require_file_md = /* @__PURE__ */ __commonJSMin(((exports) => {
20022
20135
  content = content.slice(0, index) + " ".repeat(text.length) + content.slice(index + text.length);
20023
20136
  }
20024
20137
  const ranges = [];
20025
- for (const reg of [htmlTagReg, interpolationReg]) for (const { 0: text, index } of content.matchAll(reg)) ranges.push([index, index + text.length]);
20026
- for (const reg of [inlineCodeReg, angleBracketReg]) for (const { 0: text, index } of content.matchAll(reg)) {
20138
+ for (const pattern of [htmlTagRE, interpolationRE]) for (const { 0: text, index } of content.matchAll(pattern)) ranges.push([index, index + text.length]);
20139
+ for (const pattern of [inlineCodeRE, angleBracketRE]) for (const { 0: text, index } of content.matchAll(pattern)) {
20027
20140
  if (ranges.some(([start, end]) => index >= start && index < end)) continue;
20028
20141
  content = content.slice(0, index) + " ".repeat(text.length) + content.slice(index + text.length);
20029
20142
  }
@@ -20106,8 +20219,8 @@ var require_file_vue = /* @__PURE__ */ __commonJSMin(((exports) => {
20106
20219
  if (!hitBlock) return;
20107
20220
  const oldContent = hitBlock.content;
20108
20221
  const newContent = hitBlock.content = hitBlock.content.slice(0, change.start - hitBlock.loc.start.offset) + change.newText + hitBlock.content.slice(change.end - hitBlock.loc.start.offset);
20109
- const endTagRegex = new RegExp(`</\\s*${hitBlock.type}\\s*>`);
20110
- if (endTagRegex.test(oldContent) !== endTagRegex.test(newContent)) return;
20222
+ const endTagRE = new RegExp(`</\\s*${hitBlock.type}\\s*>`);
20223
+ if (endTagRE.test(oldContent) !== endTagRE.test(newContent)) return;
20111
20224
  const lengthDiff = change.newText.length - (change.end - change.start);
20112
20225
  for (const block of blocks) {
20113
20226
  if (block.loc.start.offset > change.end) block.loc.start.offset += lengthDiff;
@@ -20120,25 +20233,11 @@ var require_file_vue = /* @__PURE__ */ __commonJSMin(((exports) => {
20120
20233
  exports.default = plugin;
20121
20234
  }));
20122
20235
  //#endregion
20123
- //#region node_modules/@vue/language-core/lib/plugins/shared.js
20124
- var require_shared$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
20125
- Object.defineProperty(exports, "__esModule", { value: true });
20126
- exports.allCodeFeatures = void 0;
20127
- exports.allCodeFeatures = {
20128
- verification: true,
20129
- completion: true,
20130
- semantic: true,
20131
- navigation: true,
20132
- structure: true,
20133
- format: true
20134
- };
20135
- }));
20136
- //#endregion
20137
20236
  //#region node_modules/@vue/language-core/lib/plugins/vue-root-tags.js
20138
20237
  var require_vue_root_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
20139
20238
  Object.defineProperty(exports, "__esModule", { value: true });
20140
20239
  var muggle_string_1 = require_out$1();
20141
- var shared_1 = require_shared$1();
20240
+ var codeFeatures_1 = require_codeFeatures();
20142
20241
  var plugin = () => {
20143
20242
  return {
20144
20243
  version: 2.2,
@@ -20154,7 +20253,7 @@ var require_vue_root_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
20154
20253
  ir.content,
20155
20254
  void 0,
20156
20255
  0,
20157
- shared_1.allCodeFeatures
20256
+ codeFeatures_1.codeFeatures.full
20158
20257
  ]);
20159
20258
  for (const block of [
20160
20259
  ir.template,
@@ -20169,7 +20268,7 @@ var require_vue_root_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
20169
20268
  "",
20170
20269
  void 0,
20171
20270
  block.startTagEnd + offset,
20172
- { structure: true }
20271
+ codeFeatures_1.codeFeatures.structure
20173
20272
  ], ir.content.slice(block.startTagEnd + offset, block.endTagStart));
20174
20273
  }
20175
20274
  } else embeddedFile.parentCodeId ??= "root_tags";
@@ -20196,7 +20295,7 @@ var require_vue_script_js = /* @__PURE__ */ __commonJSMin(((exports) => {
20196
20295
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-customblocks.js
20197
20296
  var require_vue_sfc_customblocks = /* @__PURE__ */ __commonJSMin(((exports) => {
20198
20297
  Object.defineProperty(exports, "__esModule", { value: true });
20199
- var shared_1 = require_shared$1();
20298
+ var codeFeatures_1 = require_codeFeatures();
20200
20299
  var plugin = () => {
20201
20300
  return {
20202
20301
  version: 2.2,
@@ -20214,7 +20313,7 @@ var require_vue_sfc_customblocks = /* @__PURE__ */ __commonJSMin(((exports) => {
20214
20313
  customBlock.content,
20215
20314
  customBlock.name,
20216
20315
  0,
20217
- shared_1.allCodeFeatures
20316
+ codeFeatures_1.codeFeatures.full
20218
20317
  ]);
20219
20318
  }
20220
20319
  }
@@ -20226,6 +20325,7 @@ var require_vue_sfc_customblocks = /* @__PURE__ */ __commonJSMin(((exports) => {
20226
20325
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-scripts.js
20227
20326
  var require_vue_sfc_scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
20228
20327
  Object.defineProperty(exports, "__esModule", { value: true });
20328
+ var codeFeatures_1 = require_codeFeatures();
20229
20329
  var plugin = () => {
20230
20330
  return {
20231
20331
  version: 2.2,
@@ -20247,10 +20347,7 @@ var require_vue_sfc_scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
20247
20347
  script.content,
20248
20348
  script.name,
20249
20349
  0,
20250
- {
20251
- structure: true,
20252
- format: true
20253
- }
20350
+ codeFeatures_1.codeFeatures.structureAndFormat
20254
20351
  ]);
20255
20352
  }
20256
20353
  };
@@ -20261,7 +20358,7 @@ var require_vue_sfc_scripts = /* @__PURE__ */ __commonJSMin(((exports) => {
20261
20358
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-styles.js
20262
20359
  var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20263
20360
  Object.defineProperty(exports, "__esModule", { value: true });
20264
- var shared_1 = require_shared$1();
20361
+ var codeFeatures_1 = require_codeFeatures();
20265
20362
  var plugin = () => {
20266
20363
  return {
20267
20364
  version: 2.2,
@@ -20292,13 +20389,13 @@ var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20292
20389
  binding.text,
20293
20390
  style.name,
20294
20391
  binding.offset,
20295
- shared_1.allCodeFeatures
20392
+ codeFeatures_1.codeFeatures.full
20296
20393
  ], ");\n");
20297
20394
  } else embeddedFile.content.push([
20298
20395
  style.content,
20299
20396
  style.name,
20300
20397
  0,
20301
- shared_1.allCodeFeatures
20398
+ codeFeatures_1.codeFeatures.full
20302
20399
  ]);
20303
20400
  }
20304
20401
  }
@@ -20310,7 +20407,7 @@ var require_vue_sfc_styles = /* @__PURE__ */ __commonJSMin(((exports) => {
20310
20407
  //#region node_modules/@vue/language-core/lib/plugins/vue-sfc-template.js
20311
20408
  var require_vue_sfc_template = /* @__PURE__ */ __commonJSMin(((exports) => {
20312
20409
  Object.defineProperty(exports, "__esModule", { value: true });
20313
- var shared_1 = require_shared$1();
20410
+ var codeFeatures_1 = require_codeFeatures();
20314
20411
  var plugin = () => {
20315
20412
  return {
20316
20413
  version: 2.2,
@@ -20326,7 +20423,7 @@ var require_vue_sfc_template = /* @__PURE__ */ __commonJSMin(((exports) => {
20326
20423
  ir.template.content,
20327
20424
  ir.template.name,
20328
20425
  0,
20329
- shared_1.allCodeFeatures
20426
+ codeFeatures_1.codeFeatures.full
20330
20427
  ]);
20331
20428
  }
20332
20429
  };
@@ -20350,52 +20447,78 @@ var require_vue_style_css = /* @__PURE__ */ __commonJSMin(((exports) => {
20350
20447
  };
20351
20448
  };
20352
20449
  exports.default = plugin;
20353
- var cssImportReg = /(?<=@import\s+url\()(["']?).*?\1(?=\))|(?<=@import\b\s*)(["']).*?\2/g;
20354
- var cssBindingReg = /\bv-bind\(\s*(?:'([^']+)'|"([^"]+)"|([a-z_]\w*))\s*\)/gi;
20355
- var cssClassNameReg = /(?=(\.[a-z_][-\w]*)[\s.,+~>:#)[{])/gi;
20356
- var commentReg = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
20357
- var fragmentReg = /(?<={)[^{]*(?=(?<!\\);)/g;
20450
+ var cssImportRE = /(?<=@import\s+url\()(["']?).*?\1(?=\))|(?<=@import\b\s*)(["']).*?\2/g;
20451
+ var cssBindingRE = /\bv-bind\s*\(/g;
20452
+ var cssClassNameRE = /\.[a-z_][-\w]*(?=[\s.,+~>:#)[{])/gi;
20453
+ var commentRE = /(?<=\/\*)[\s\S]*?(?=\*\/)|(?<=\/\/)[\s\S]*?(?=\n)/g;
20454
+ var fragmentRE = /(?<={)[^{]*(?=(?<!\\);)/g;
20358
20455
  function* parseCssImports(css) {
20359
- const matches = css.matchAll(cssImportReg);
20360
- for (const match of matches) {
20361
- let text = match[0];
20362
- let offset = match.index;
20363
- if (text.startsWith("'") || text.startsWith("\"")) {
20364
- text = text.slice(1, -1);
20365
- offset += 1;
20366
- }
20367
- if (text) yield {
20368
- text,
20369
- offset
20370
- };
20371
- }
20456
+ for (const match of css.matchAll(cssImportRE)) yield trimQuotes(match[0], match.index);
20372
20457
  }
20373
20458
  function* parseCssBindings(css) {
20374
- css = fillBlank(css, commentReg);
20375
- const matchs = css.matchAll(cssBindingReg);
20376
- for (const match of matchs) {
20377
- const matchText = match.slice(1).find((t) => t);
20378
- if (matchText) yield {
20379
- offset: match.index + css.slice(match.index).indexOf(matchText),
20380
- text: matchText
20381
- };
20459
+ css = fillBlank(css, commentRE);
20460
+ for (const match of css.matchAll(cssBindingRE)) {
20461
+ const start = match.index + match[0].length;
20462
+ const end = lexBinding(css, start);
20463
+ if (end !== null) yield trimQuotes(css.slice(start, end), start, false);
20464
+ }
20465
+ }
20466
+ var LexerState;
20467
+ (function(LexerState) {
20468
+ LexerState[LexerState["inParens"] = 0] = "inParens";
20469
+ LexerState[LexerState["inSingleQuoteString"] = 1] = "inSingleQuoteString";
20470
+ LexerState[LexerState["inDoubleQuoteString"] = 2] = "inDoubleQuoteString";
20471
+ })(LexerState || (LexerState = {}));
20472
+ function lexBinding(content, start) {
20473
+ let state = LexerState.inParens;
20474
+ let parenDepth = 0;
20475
+ for (let i = start; i < content.length; i++) {
20476
+ const char = content.charAt(i);
20477
+ switch (state) {
20478
+ case LexerState.inParens:
20479
+ if (char === `'`) state = LexerState.inSingleQuoteString;
20480
+ else if (char === `"`) state = LexerState.inDoubleQuoteString;
20481
+ else if (char === `(`) parenDepth++;
20482
+ else if (char === `)`) if (parenDepth > 0) parenDepth--;
20483
+ else return i;
20484
+ break;
20485
+ case LexerState.inSingleQuoteString:
20486
+ if (char === `'`) state = LexerState.inParens;
20487
+ break;
20488
+ case LexerState.inDoubleQuoteString:
20489
+ if (char === `"`) state = LexerState.inParens;
20490
+ break;
20491
+ }
20382
20492
  }
20493
+ return null;
20383
20494
  }
20384
20495
  function* parseCssClassNames(css) {
20385
- css = fillBlank(css, commentReg, fragmentReg);
20386
- const matches = css.matchAll(cssClassNameReg);
20387
- for (const match of matches) {
20388
- const matchText = match[1];
20389
- if (matchText) yield {
20390
- offset: match.index,
20391
- text: matchText
20392
- };
20393
- }
20496
+ css = fillBlank(css, commentRE, fragmentRE);
20497
+ for (const match of css.matchAll(cssClassNameRE)) yield {
20498
+ text: match[0],
20499
+ offset: match.index
20500
+ };
20394
20501
  }
20395
- function fillBlank(css, ...regs) {
20396
- for (const reg of regs) css = css.replace(reg, (match) => " ".repeat(match.length));
20502
+ function fillBlank(css, ...patterns) {
20503
+ for (const pattern of patterns) css = css.replace(pattern, (match) => " ".repeat(match.length));
20397
20504
  return css;
20398
20505
  }
20506
+ function trimQuotes(text, offset, trim = true) {
20507
+ let start = 0;
20508
+ let end = text.length;
20509
+ if (trim || text.includes("\"") || text.includes("'")) {
20510
+ while (start < text.length && !text[start]?.trim()) start++;
20511
+ while (end >= 0 && !text[end - 1]?.trim()) end--;
20512
+ }
20513
+ if (text[start] === "\"" && text[end - 1] === "\"" || text[start] === "'" && text[end - 1] === "'") {
20514
+ start++;
20515
+ end--;
20516
+ }
20517
+ return {
20518
+ text: text.slice(start, end),
20519
+ offset: offset + start
20520
+ };
20521
+ }
20399
20522
  }));
20400
20523
  //#endregion
20401
20524
  //#region node_modules/@vue/language-core/lib/template/transforms/transformElement.js
@@ -20494,7 +20617,7 @@ var require_transformText = /* @__PURE__ */ __commonJSMin(((exports) => {
20494
20617
  }));
20495
20618
  //#endregion
20496
20619
  //#region node_modules/@vue/language-core/lib/template/utils.js
20497
- var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
20620
+ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
20498
20621
  Object.defineProperty(exports, "__esModule", { value: true });
20499
20622
  exports.createStructuralDirectiveTransform = createStructuralDirectiveTransform;
20500
20623
  exports.cloneLoc = cloneLoc;
@@ -20533,7 +20656,7 @@ var require_vFor = /* @__PURE__ */ __commonJSMin(((exports) => {
20533
20656
  Object.defineProperty(exports, "__esModule", { value: true });
20534
20657
  exports.transformFor = void 0;
20535
20658
  var compiler_dom_1 = (init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports));
20536
- exports.transformFor = (0, require_utils$3().createStructuralDirectiveTransform)("for", (node, dir, context) => {
20659
+ exports.transformFor = (0, require_utils$2().createStructuralDirectiveTransform)("for", (node, dir, context) => {
20537
20660
  if (!dir.exp) {
20538
20661
  context.onError((0, compiler_dom_1.createCompilerError)(compiler_dom_1.ErrorCodes.X_V_FOR_NO_EXPRESSION, dir.loc));
20539
20662
  return;
@@ -20574,7 +20697,7 @@ var require_vIf = /* @__PURE__ */ __commonJSMin(((exports) => {
20574
20697
  Object.defineProperty(exports, "__esModule", { value: true });
20575
20698
  exports.transformIf = void 0;
20576
20699
  var compiler_dom_1 = (init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports));
20577
- var utils_1 = require_utils$3();
20700
+ var utils_1 = require_utils$2();
20578
20701
  exports.transformIf = (0, utils_1.createStructuralDirectiveTransform)(/^(?:if|else-if|else)$/, (node, dir, context) => {
20579
20702
  if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) context.onError((0, compiler_dom_1.createCompilerError)(compiler_dom_1.ErrorCodes.X_V_IF_NO_EXPRESSION, dir.loc));
20580
20703
  if (dir.name === "if") {
@@ -20717,14 +20840,14 @@ var require_vue_template_html = /* @__PURE__ */ __commonJSMin(((exports) => {
20717
20840
  Object.defineProperty(exports, "__esModule", { value: true });
20718
20841
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
20719
20842
  var compile_1 = require_compile();
20720
- var shouldAddSuffix = /(?<=<[^>/]+)$/;
20843
+ var shouldAddSuffixRE = /(?<=<[^>/]+)$/;
20721
20844
  var plugin = () => {
20722
20845
  return {
20723
20846
  version: 2.2,
20724
20847
  compileSFCTemplate(lang, template, options) {
20725
20848
  if (lang === "html" || lang === "md") {
20726
20849
  let addedSuffix = false;
20727
- if (shouldAddSuffix.test(template)) {
20850
+ if (shouldAddSuffixRE.test(template)) {
20728
20851
  template += ">";
20729
20852
  addedSuffix = true;
20730
20853
  }
@@ -20740,7 +20863,7 @@ var require_vue_template_html = /* @__PURE__ */ __commonJSMin(((exports) => {
20740
20863
  const newSource = oldResult.ast.source.slice(0, change.start) + change.newText + oldResult.ast.source.slice(change.end);
20741
20864
  if (oldResult.__addedSuffix) {
20742
20865
  const originalTemplate = newSource.slice(0, -1);
20743
- if (!shouldAddSuffix.test(originalTemplate)) return;
20866
+ if (!shouldAddSuffixRE.test(originalTemplate)) return;
20744
20867
  }
20745
20868
  const lengthDiff = change.newText.length - (change.end - change.start);
20746
20869
  let hitNodes = [];
@@ -20882,21 +21005,36 @@ var require_forEachTemplateNode = /* @__PURE__ */ __commonJSMin(((exports) => {
20882
21005
  exports.forEachInterpolationNode = forEachInterpolationNode;
20883
21006
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
20884
21007
  function* forEachElementNode(node) {
20885
- if (node.type === CompilerDOM.NodeTypes.ROOT) for (const child of node.children) yield* forEachElementNode(child);
20886
- else if (node.type === CompilerDOM.NodeTypes.ELEMENT) {
20887
- yield node;
20888
- for (const child of node.children) yield* forEachElementNode(child);
20889
- } else if (node.type === CompilerDOM.NodeTypes.IF) for (const branch of node.branches) for (const childNode of branch.children) yield* forEachElementNode(childNode);
20890
- else if (node.type === CompilerDOM.NodeTypes.FOR) for (const child of node.children) yield* forEachElementNode(child);
21008
+ switch (node.type) {
21009
+ case CompilerDOM.NodeTypes.ELEMENT: yield node;
21010
+ case CompilerDOM.NodeTypes.IF_BRANCH:
21011
+ case CompilerDOM.NodeTypes.FOR:
21012
+ case CompilerDOM.NodeTypes.ROOT:
21013
+ for (const child of node.children) yield* forEachElementNode(child);
21014
+ break;
21015
+ case CompilerDOM.NodeTypes.IF:
21016
+ for (const branch of node.branches) yield* forEachElementNode(branch);
21017
+ break;
21018
+ }
20891
21019
  }
20892
21020
  function* forEachInterpolationNode(node) {
20893
- if (node.type === CompilerDOM.NodeTypes.ROOT) for (const child of node.children) yield* forEachInterpolationNode(child);
20894
- else if (node.type === CompilerDOM.NodeTypes.ELEMENT) for (const child of node.children) yield* forEachInterpolationNode(child);
20895
- else if (node.type === CompilerDOM.NodeTypes.COMPOUND_EXPRESSION) {
20896
- for (const child of node.children) if (typeof child === "object") yield* forEachInterpolationNode(child);
20897
- } else if (node.type === CompilerDOM.NodeTypes.INTERPOLATION) yield node;
20898
- else if (node.type === CompilerDOM.NodeTypes.IF) for (const branch of node.branches) for (const childNode of branch.children) yield* forEachInterpolationNode(childNode);
20899
- else if (node.type === CompilerDOM.NodeTypes.FOR) for (const child of node.children) yield* forEachInterpolationNode(child);
21021
+ switch (node.type) {
21022
+ case CompilerDOM.NodeTypes.ELEMENT:
21023
+ case CompilerDOM.NodeTypes.IF_BRANCH:
21024
+ case CompilerDOM.NodeTypes.FOR:
21025
+ case CompilerDOM.NodeTypes.ROOT:
21026
+ for (const child of node.children) yield* forEachInterpolationNode(child);
21027
+ break;
21028
+ case CompilerDOM.NodeTypes.IF:
21029
+ for (const branch of node.branches) yield* forEachInterpolationNode(branch);
21030
+ break;
21031
+ case CompilerDOM.NodeTypes.COMPOUND_EXPRESSION:
21032
+ for (const child of node.children) if (typeof child === "object") yield* forEachInterpolationNode(child);
21033
+ break;
21034
+ case CompilerDOM.NodeTypes.INTERPOLATION:
21035
+ yield node;
21036
+ break;
21037
+ }
20900
21038
  }
20901
21039
  }));
20902
21040
  //#endregion
@@ -20945,13 +21083,9 @@ var require_vue_template_inline_css = /* @__PURE__ */ __commonJSMin(((exports) =
20945
21083
  })();
20946
21084
  Object.defineProperty(exports, "__esModule", { value: true });
20947
21085
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
21086
+ var codeFeatures_1 = require_codeFeatures();
20948
21087
  var forEachTemplateNode_1 = require_forEachTemplateNode();
20949
- var shared_1 = require_shared$2();
20950
- var codeFeatures = {
20951
- ...require_shared$1().allCodeFeatures,
20952
- format: false,
20953
- structure: false
20954
- };
21088
+ var shared_1 = require_shared$1();
20955
21089
  var plugin = () => {
20956
21090
  return {
20957
21091
  version: 2.2,
@@ -20978,7 +21112,7 @@ var require_vue_template_inline_css = /* @__PURE__ */ __commonJSMin(((exports) =
20978
21112
  content,
20979
21113
  "template",
20980
21114
  offset,
20981
- codeFeatures
21115
+ codeFeatures_1.codeFeatures.all
20982
21116
  ];
20983
21117
  yield ` }\n`;
20984
21118
  }
@@ -21030,11 +21164,11 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21030
21164
  })();
21031
21165
  Object.defineProperty(exports, "__esModule", { value: true });
21032
21166
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
21167
+ var codeFeatures_1 = require_codeFeatures();
21033
21168
  var elementEvents_1 = require_elementEvents();
21034
21169
  var templateChild_1 = require_templateChild();
21035
21170
  var vFor_1 = require_vFor$1();
21036
21171
  var utils_1 = require_utils$5();
21037
- var codeFeatures = { format: true };
21038
21172
  var formatBrackets = {
21039
21173
  normal: ["`${", "}`;"],
21040
21174
  if: ["if (", ") { }"],
@@ -21044,6 +21178,7 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21044
21178
  event: ["() => ", ";"],
21045
21179
  generic: ["<", ">() => {};"]
21046
21180
  };
21181
+ var genericCommentRE = /^<!--\s*@vue-generic\s*\{(?<content>[\s\S]*)\}\s*-->$/;
21047
21182
  var plugin = ({ modules: { typescript: ts } }) => {
21048
21183
  const parseds = /* @__PURE__ */ new WeakMap();
21049
21184
  return {
@@ -21081,7 +21216,7 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21081
21216
  return result;
21082
21217
  function visit(node) {
21083
21218
  if (node.type === CompilerDOM.NodeTypes.COMMENT) {
21084
- const match = node.loc.source.match(/^<!--\s*@vue-generic\s*\{(?<content>[\s\S]*)\}\s*-->$/);
21219
+ const match = node.loc.source.match(genericCommentRE);
21085
21220
  if (match) {
21086
21221
  const { content } = match.groups;
21087
21222
  addFormatCodes(content, node.loc.start.offset + node.loc.source.indexOf("{") + 1, formatBrackets.generic);
@@ -21142,7 +21277,7 @@ var require_vue_template_inline_ts = /* @__PURE__ */ __commonJSMin(((exports) =>
21142
21277
  code,
21143
21278
  "template",
21144
21279
  offset,
21145
- codeFeatures
21280
+ codeFeatures_1.codeFeatures.format
21146
21281
  ],
21147
21282
  wrapper[1]
21148
21283
  ]);
@@ -21966,7 +22101,7 @@ var require_scriptSetup$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
21966
22101
  yield ` emit: ${emitTypes.length ? emitTypes.join(` & `) : `{}`}${utils_1.endOfLine}`;
21967
22102
  yield `}${utils_1.endOfLine}`;
21968
22103
  yield `})(),${utils_1.newLine}`;
21969
- yield `) => ({} as import('${vueCompilerOptions.lib}').VNode & { __ctx?: Awaited<typeof ${names_1.names.setup}> }))${utils_1.endOfLine}`;
22104
+ yield `) => ({} as import('${vueCompilerOptions.lib}').VNode & { __ctx?: NonNullable<Awaited<typeof ${names_1.names.setup}>> }))${utils_1.endOfLine}`;
21970
22105
  }
21971
22106
  function* generateSetupFunction(options, ctx, scriptSetup, scriptSetupRanges, body, output) {
21972
22107
  const transforms = [];
@@ -22022,9 +22157,9 @@ var require_scriptSetup$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
22022
22157
  }));
22023
22158
  else transforms.push((0, transform_1.insert)(callExp.end, function* () {
22024
22159
  yield ` as ${type}[`;
22025
- const token = yield* (0, boundary_1.startBoundary)(scriptSetup.name, exp.start, codeFeatures_1.codeFeatures.verification);
22160
+ const boundary = yield* boundary_1.Boundary.start(scriptSetup.name, exp.start, codeFeatures_1.codeFeatures.verification);
22026
22161
  yield `'$style'`;
22027
- yield (0, boundary_1.endBoundary)(token, exp.end);
22162
+ yield boundary.end(exp.end);
22028
22163
  yield `])`;
22029
22164
  }));
22030
22165
  }
@@ -22107,7 +22242,7 @@ var require_scriptSetup$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
22107
22242
  yield* (0, utils_1.generateSfcBlockSection)(scriptSetup, statement.start, callExp.start, codeFeatures_1.codeFeatures.all);
22108
22243
  yield defaultName;
22109
22244
  });
22110
- else if (!utils_1.identifierRegex.test(name)) {
22245
+ else if (!utils_1.identifierRE.test(name)) {
22111
22246
  yield (0, transform_1.replace)(statement.start, callExp.start, function* () {
22112
22247
  yield `const ${defaultName} = `;
22113
22248
  });
@@ -22353,7 +22488,7 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
22353
22488
  if (src.endsWith(".ts") && !src.endsWith(".d.ts")) src = src.slice(0, -3) + ".js";
22354
22489
  else if (src.endsWith(".tsx")) src = src.slice(0, -4) + ".jsx";
22355
22490
  yield `import ${names_1.names.src} from `;
22356
- const token = yield* (0, boundary_1.startBoundary)("main", script.src.offset, {
22491
+ const boundary = yield* boundary_1.Boundary.start("main", script.src.offset, {
22357
22492
  ...codeFeatures_1.codeFeatures.all,
22358
22493
  ...src !== script.src.text ? codeFeatures_1.codeFeatures.navigationWithoutRename : {}
22359
22494
  });
@@ -22362,11 +22497,11 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
22362
22497
  src.slice(0, script.src.text.length),
22363
22498
  "main",
22364
22499
  script.src.offset,
22365
- { __combineToken: token }
22500
+ boundary.features
22366
22501
  ];
22367
22502
  yield src.slice(script.src.text.length);
22368
22503
  yield `'`;
22369
- yield (0, boundary_1.endBoundary)(token, script.src.offset + script.src.text.length);
22504
+ yield boundary.end(script.src.offset + script.src.text.length);
22370
22505
  yield utils_1.endOfLine;
22371
22506
  yield `export default ${names_1.names.src}${utils_1.endOfLine}`;
22372
22507
  yield* (0, template_1.generateTemplate)(options, ctx, names_1.names.src);
@@ -22452,9 +22587,9 @@ var require_script = /* @__PURE__ */ __commonJSMin(((exports) => {
22452
22587
  }
22453
22588
  function* generateExportDeclareEqual(block, name) {
22454
22589
  yield `const `;
22455
- const token = yield* (0, boundary_1.startBoundary)(block.name, 0, codeFeatures_1.codeFeatures.doNotReportTs6133);
22590
+ const boundary = yield* boundary_1.Boundary.start(block.name, 0, codeFeatures_1.codeFeatures.doNotReportTs6133);
22456
22591
  yield name;
22457
- yield (0, boundary_1.endBoundary)(token, block.content.length);
22592
+ yield boundary.end(block.content.length);
22458
22593
  yield ` = `;
22459
22594
  }
22460
22595
  }));
@@ -22469,36 +22604,32 @@ var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
22469
22604
  var boundary_1 = require_boundary();
22470
22605
  function* generateClassProperty(source, classNameWithDot, offset, propertyType) {
22471
22606
  yield `${utils_1.newLine} & { `;
22472
- const token = yield* (0, boundary_1.startBoundary)(source, offset, codeFeatures_1.codeFeatures.navigation);
22607
+ const boundary = yield* boundary_1.Boundary.start(source, offset, codeFeatures_1.codeFeatures.navigation);
22473
22608
  yield `'`;
22474
22609
  yield [
22475
22610
  classNameWithDot.slice(1),
22476
22611
  source,
22477
22612
  offset + 1,
22478
- { __combineToken: token }
22613
+ boundary.features
22479
22614
  ];
22480
22615
  yield `'`;
22481
- yield (0, boundary_1.endBoundary)(token, offset + classNameWithDot.length);
22616
+ yield boundary.end(offset + classNameWithDot.length);
22482
22617
  yield `: ${propertyType}`;
22483
22618
  yield ` }`;
22484
22619
  }
22485
22620
  function* generateStyleImports(style) {
22486
- const features = {
22487
- navigation: true,
22488
- verification: true
22489
- };
22490
22621
  if (typeof style.src === "object") {
22491
22622
  yield `${utils_1.newLine} & typeof import(`;
22492
- const token = yield* (0, boundary_1.startBoundary)("main", style.src.offset, features);
22623
+ const boundary = yield* boundary_1.Boundary.start("main", style.src.offset, codeFeatures_1.codeFeatures.navigationAndVerification);
22493
22624
  yield `'`;
22494
22625
  yield [
22495
22626
  style.src.text,
22496
22627
  "main",
22497
22628
  style.src.offset,
22498
- { __combineToken: token }
22629
+ boundary.features
22499
22630
  ];
22500
22631
  yield `'`;
22501
- yield (0, boundary_1.endBoundary)(token, style.src.offset + style.src.text.length);
22632
+ yield boundary.end(style.src.offset + style.src.text.length);
22502
22633
  yield `).default`;
22503
22634
  }
22504
22635
  for (const { text, offset } of style.imports) {
@@ -22507,7 +22638,7 @@ var require_common$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
22507
22638
  text,
22508
22639
  style.name,
22509
22640
  offset,
22510
- features
22641
+ codeFeatures_1.codeFeatures.navigationAndVerification
22511
22642
  ];
22512
22643
  yield `').default`;
22513
22644
  }
@@ -22522,7 +22653,7 @@ var require_modules = /* @__PURE__ */ __commonJSMin(((exports) => {
22522
22653
  var names_1 = require_names();
22523
22654
  var utils_1 = require_utils$5();
22524
22655
  var common_1 = require_common$2();
22525
- function* generateStyleModules({ styles, vueCompilerOptions }, ctx) {
22656
+ function* generateStyleModules({ vueCompilerOptions, styles }, ctx) {
22526
22657
  const styleModules = styles.filter((style) => style.module);
22527
22658
  if (!styleModules.length) return;
22528
22659
  ctx.generatedTypes.add(names_1.names.StyleModules);
@@ -22557,23 +22688,24 @@ var require_scopedClasses = /* @__PURE__ */ __commonJSMin(((exports) => {
22557
22688
  var styleScopedClasses_1 = require_styleScopedClasses();
22558
22689
  var utils_1 = require_utils$5();
22559
22690
  var common_1 = require_common$2();
22560
- function* generateStyleScopedClasses({ vueCompilerOptions, styles }) {
22691
+ function* generateStyleScopedClasses({ vueCompilerOptions, styles }, ctx) {
22561
22692
  const { resolveStyleClassNames, resolveStyleImports } = vueCompilerOptions;
22562
22693
  if (!resolveStyleClassNames) return;
22563
22694
  const scopedStyles = styles.filter((style) => resolveStyleClassNames === true || style.scoped);
22564
22695
  if (!scopedStyles.length) return;
22696
+ ctx.generatedTypes.add(names_1.names.StyleScopedClasses);
22565
22697
  const visited = /* @__PURE__ */ new Set();
22566
- const deferredGenerations = [];
22698
+ const deferredGenerates = [];
22567
22699
  yield `type ${names_1.names.StyleScopedClasses} = {}`;
22568
22700
  for (const style of scopedStyles) {
22569
22701
  if (resolveStyleImports) yield* (0, common_1.generateStyleImports)(style);
22570
22702
  for (const className of style.classNames) if (!visited.has(className.text)) {
22571
22703
  visited.add(className.text);
22572
22704
  yield* (0, common_1.generateClassProperty)(style.name, className.text, className.offset, "boolean");
22573
- } else deferredGenerations.push((0, styleScopedClasses_1.generateStyleScopedClassReference)(style, className.text.slice(1), className.offset + 1));
22705
+ } else deferredGenerates.push((0, styleScopedClasses_1.generateStyleScopedClassReference)(style, className.text.slice(1), className.offset + 1));
22574
22706
  }
22575
22707
  yield utils_1.endOfLine;
22576
- for (const generate of deferredGenerations) yield* generate;
22708
+ for (const generate of deferredGenerates) yield* generate;
22577
22709
  }
22578
22710
  }));
22579
22711
  //#endregion
@@ -22601,12 +22733,12 @@ var require_style = /* @__PURE__ */ __commonJSMin(((exports) => {
22601
22733
  };
22602
22734
  }
22603
22735
  function* generateWorker(options, ctx) {
22604
- const endScope = ctx.startScope();
22605
- ctx.declare(...options.setupConsts);
22606
- yield* (0, scopedClasses_1.generateStyleScopedClasses)(options);
22736
+ const scope = ctx.scope();
22737
+ scope.declare(...options.setupConsts);
22738
+ yield* (0, scopedClasses_1.generateStyleScopedClasses)(options, ctx);
22607
22739
  yield* (0, modules_1.generateStyleModules)(options, ctx);
22608
22740
  yield* generateCssVars(options, ctx);
22609
- yield* endScope();
22741
+ yield* scope.end();
22610
22742
  }
22611
22743
  function* generateCssVars(options, ctx) {
22612
22744
  for (const style of options.styles) for (const binding of style.bindings) {
@@ -22616,76 +22748,15 @@ var require_style = /* @__PURE__ */ __commonJSMin(((exports) => {
22616
22748
  }
22617
22749
  }));
22618
22750
  //#endregion
22619
- //#region node_modules/@vue/language-core/lib/parsers/utils.js
22620
- var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
22621
- Object.defineProperty(exports, "__esModule", { value: true });
22622
- exports.parseBindingRanges = parseBindingRanges;
22623
- exports.getClosestMultiLineCommentRange = getClosestMultiLineCommentRange;
22624
- var collectBindings_1 = require_collectBindings();
22625
- var shared_1 = require_shared$2();
22626
- function parseBindingRanges(ts, ast, componentExtsensions) {
22627
- const bindings = [];
22628
- const components = [];
22629
- ts.forEachChild(ast, (node) => {
22630
- if (ts.isVariableStatement(node)) for (const decl of node.declarationList.declarations) {
22631
- const ranges = (0, collectBindings_1.collectBindingRanges)(ts, decl.name, ast);
22632
- bindings.push(...ranges);
22633
- }
22634
- else if (ts.isFunctionDeclaration(node)) {
22635
- if (node.name && ts.isIdentifier(node.name)) bindings.push(_getStartEnd(node.name));
22636
- } else if (ts.isClassDeclaration(node)) {
22637
- if (node.name) bindings.push(_getStartEnd(node.name));
22638
- } else if (ts.isEnumDeclaration(node)) bindings.push(_getStartEnd(node.name));
22639
- if (ts.isImportDeclaration(node)) {
22640
- const moduleName = _getNodeText(node.moduleSpecifier).slice(1, -1);
22641
- if (node.importClause && !node.importClause.isTypeOnly) {
22642
- const { name, namedBindings } = node.importClause;
22643
- if (name) if (componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(name));
22644
- else bindings.push(_getStartEnd(name));
22645
- if (namedBindings) if (ts.isNamedImports(namedBindings)) for (const element of namedBindings.elements) {
22646
- if (element.isTypeOnly) continue;
22647
- if (element.propertyName && _getNodeText(element.propertyName) === "default" && componentExtsensions.some((ext) => moduleName.endsWith(ext))) components.push(_getStartEnd(element.name));
22648
- else bindings.push(_getStartEnd(element.name));
22649
- }
22650
- else bindings.push(_getStartEnd(namedBindings.name));
22651
- }
22652
- }
22653
- });
22654
- return {
22655
- bindings,
22656
- components
22657
- };
22658
- function _getStartEnd(node) {
22659
- return (0, shared_1.getStartEnd)(ts, node, ast);
22660
- }
22661
- function _getNodeText(node) {
22662
- return (0, shared_1.getNodeText)(ts, node, ast);
22663
- }
22664
- }
22665
- function getClosestMultiLineCommentRange(ts, node, parents, ast) {
22666
- for (let i = parents.length - 1; i >= 0; i--) {
22667
- if (ts.isStatement(node)) break;
22668
- node = parents[i];
22669
- }
22670
- const comment = ts.getLeadingCommentRanges(ast.text, node.pos)?.reverse().find((range) => range.kind === 3);
22671
- if (comment) return {
22672
- node,
22673
- start: comment.pos,
22674
- end: comment.end
22675
- };
22676
- }
22677
- }));
22678
- //#endregion
22679
22751
  //#region node_modules/@vue/language-core/lib/parsers/scriptRanges.js
22680
22752
  var require_scriptRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22681
22753
  Object.defineProperty(exports, "__esModule", { value: true });
22682
22754
  exports.parseScriptRanges = parseScriptRanges;
22683
22755
  exports.parseOptionsFromExtression = parseOptionsFromExtression;
22684
- var shared_1 = require_shared$2();
22685
- var utils_1 = require_utils$2();
22756
+ var shared_1 = require_shared$1();
22757
+ var utils_1 = require_utils$3();
22686
22758
  function parseScriptRanges(ts, sourceFile, vueCompilerOptions) {
22687
22759
  let exportDefault;
22688
- const { bindings, components } = (0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions);
22689
22760
  ts.forEachChild(sourceFile, (child) => {
22690
22761
  if (ts.isExportAssignment(child)) {
22691
22762
  exportDefault = {
@@ -22699,14 +22770,13 @@ var require_scriptRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22699
22770
  }
22700
22771
  });
22701
22772
  return {
22702
- exportDefault,
22703
- bindings,
22704
- components
22773
+ ...(0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions),
22774
+ exportDefault
22705
22775
  };
22706
22776
  }
22707
22777
  function parseOptionsFromExtression(ts, exp, sourceFile) {
22708
22778
  let obj;
22709
- while (isAsExpression(ts, exp) || ts.isParenthesizedExpression(exp)) exp = exp.expression;
22779
+ exp = (0, utils_1.getUnwrappedExpression)(ts, exp);
22710
22780
  if (ts.isObjectLiteralExpression(exp)) obj = exp;
22711
22781
  else if (ts.isCallExpression(exp) && exp.arguments.length) {
22712
22782
  const arg0 = exp.arguments[0];
@@ -22746,9 +22816,6 @@ var require_scriptRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22746
22816
  return (0, shared_1.getNodeText)(ts, node, sourceFile);
22747
22817
  }
22748
22818
  }
22749
- function isAsExpression(ts, node) {
22750
- return node.kind === ts.SyntaxKind.AsExpression;
22751
- }
22752
22819
  }));
22753
22820
  //#endregion
22754
22821
  //#region node_modules/@vue/language-core/lib/parsers/scriptSetupRanges.js
@@ -22756,9 +22823,9 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22756
22823
  Object.defineProperty(exports, "__esModule", { value: true });
22757
22824
  exports.parseScriptSetupRanges = parseScriptSetupRanges;
22758
22825
  var collectBindings_1 = require_collectBindings();
22759
- var shared_1 = require_shared$2();
22760
- var utils_1 = require_utils$2();
22761
- var tsCheckReg = /^\/\/\s*@ts-(?:no)?check(?:$|\s)/;
22826
+ var shared_1 = require_shared$1();
22827
+ var utils_1 = require_utils$3();
22828
+ var tsCheckRE = /^\/\/\s*@ts-(?:no)?check(?:$|\s)/;
22762
22829
  function parseScriptSetupRanges(ts, sourceFile, vueCompilerOptions) {
22763
22830
  const defineModel = [];
22764
22831
  let defineProps;
@@ -22772,8 +22839,7 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22772
22839
  const useSlots = [];
22773
22840
  const useTemplateRef = [];
22774
22841
  const text = sourceFile.text;
22775
- const leadingCommentEndOffset = (ts.getLeadingCommentRanges(text, 0)?.reverse() ?? []).find((range) => tsCheckReg.test(text.slice(range.pos, range.end)))?.end ?? 0;
22776
- let { bindings, components } = (0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions);
22842
+ const leadingCommentEndOffset = (ts.getLeadingCommentRanges(text, 0)?.reverse() ?? []).find((range) => tsCheckRE.test(text.slice(range.pos, range.end)))?.end ?? 0;
22777
22843
  let foundNonImportExportNode = false;
22778
22844
  let importSectionEndOffset = 0;
22779
22845
  ts.forEachChild(sourceFile, (node) => {
@@ -22785,16 +22851,10 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22785
22851
  foundNonImportExportNode = true;
22786
22852
  });
22787
22853
  ts.forEachChild(sourceFile, (node) => visitNode(node, [sourceFile]));
22788
- const templateRefNames = new Set(useTemplateRef.map((ref) => ref.name));
22789
- bindings = bindings.filter((range) => {
22790
- const name = text.slice(range.start, range.end);
22791
- return !templateRefNames.has(name);
22792
- });
22793
22854
  return {
22855
+ ...(0, utils_1.parseBindingRanges)(ts, sourceFile, vueCompilerOptions.extensions),
22794
22856
  leadingCommentEndOffset,
22795
22857
  importSectionEndOffset,
22796
- bindings,
22797
- components,
22798
22858
  defineModel,
22799
22859
  defineProps,
22800
22860
  withDefaults,
@@ -22956,11 +23016,11 @@ var require_scriptSetupRanges = /* @__PURE__ */ __commonJSMin(((exports) => {
22956
23016
  var require_vueCompilerOptions = /* @__PURE__ */ __commonJSMin(((exports) => {
22957
23017
  Object.defineProperty(exports, "__esModule", { value: true });
22958
23018
  exports.parseVueCompilerOptions = parseVueCompilerOptions;
22959
- var syntaxReg = /^\s*@(?<key>.+?)\s+(?<value>.+?)\s*$/m;
23019
+ var syntaxRE = /^\s*@(?<key>.+?)\s+(?<value>.+?)\s*$/m;
22960
23020
  function parseVueCompilerOptions(comments) {
22961
23021
  const entries = comments.map((text) => {
22962
23022
  try {
22963
- const match = text.match(syntaxReg);
23023
+ const match = text.match(syntaxRE);
22964
23024
  if (match) {
22965
23025
  const { key, value } = match.groups ?? {};
22966
23026
  return [key, JSON.parse(value)];
@@ -23072,7 +23132,7 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23072
23132
  };
23073
23133
  })();
23074
23134
  Object.defineProperty(exports, "__esModule", { value: true });
23075
- exports.tsCodegen = void 0;
23135
+ exports.tsCodegen = exports.serviceScriptRE = void 0;
23076
23136
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
23077
23137
  var alien_signals_1 = require_cjs();
23078
23138
  var path = __importStar(require_path_browserify());
@@ -23084,8 +23144,9 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23084
23144
  var scriptSetupRanges_1 = require_scriptSetupRanges();
23085
23145
  var vueCompilerOptions_1 = require_vueCompilerOptions();
23086
23146
  var signals_1 = require_signals();
23147
+ exports.serviceScriptRE = /^script_(?:js|jsx|ts|tsx)$/;
23087
23148
  exports.tsCodegen = /* @__PURE__ */ new WeakMap();
23088
- var validLangs = new Set([
23149
+ var validLangs = /* @__PURE__ */ new Set([
23089
23150
  "js",
23090
23151
  "jsx",
23091
23152
  "ts",
@@ -23102,7 +23163,7 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23102
23163
  }];
23103
23164
  },
23104
23165
  resolveEmbeddedCode(fileName, ir, embeddedFile) {
23105
- if (/script_(js|jsx|ts|tsx)/.test(embeddedFile.id)) {
23166
+ if (exports.serviceScriptRE.test(embeddedFile.id)) {
23106
23167
  let codegen = exports.tsCodegen.get(ir);
23107
23168
  if (!codegen) exports.tsCodegen.set(ir, codegen = useCodegen(ts, vueCompilerOptions, fileName, ir));
23108
23169
  embeddedFile.content = [...codegen.getGeneratedScript().codes];
@@ -23140,9 +23201,19 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23140
23201
  }
23141
23202
  return names;
23142
23203
  });
23204
+ const getSetupBindings = (0, signals_1.computedSet)(() => {
23205
+ const names = /* @__PURE__ */ new Set();
23206
+ const scriptSetupRanges = getScriptSetupRanges();
23207
+ if (ir.scriptSetup && scriptSetupRanges) {
23208
+ for (const range of scriptSetupRanges.bindings) names.add(ir.scriptSetup.content.slice(range.start, range.end));
23209
+ const scriptRanges = getScriptRanges();
23210
+ if (ir.script && scriptRanges) for (const range of scriptRanges.bindings) names.add(ir.script.content.slice(range.start, range.end));
23211
+ }
23212
+ return names;
23213
+ });
23143
23214
  const getSetupConsts = (0, signals_1.computedSet)(() => {
23144
23215
  const scriptSetupRanges = getScriptSetupRanges();
23145
- const names = new Set([...scriptSetupRanges?.defineProps?.destructured?.keys() ?? [], ...getImportedComponents()]);
23216
+ const names = /* @__PURE__ */ new Set([...scriptSetupRanges?.defineProps?.destructured?.keys() ?? [], ...getImportedComponents()]);
23146
23217
  const rest = scriptSetupRanges?.defineProps?.destructuredRest;
23147
23218
  if (rest) names.add(rest);
23148
23219
  return names;
@@ -23196,24 +23267,13 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23196
23267
  });
23197
23268
  });
23198
23269
  const getSetupExposed = (0, signals_1.computedSet)(() => {
23199
- const allVars = /* @__PURE__ */ new Set();
23200
- const scriptSetupRanges = getScriptSetupRanges();
23201
- if (!ir.scriptSetup || !scriptSetupRanges) return allVars;
23202
- for (const range of scriptSetupRanges.bindings) {
23203
- const name = ir.scriptSetup.content.slice(range.start, range.end);
23204
- allVars.add(name);
23205
- }
23206
- const scriptRanges = getScriptRanges();
23207
- if (ir.script && scriptRanges) for (const range of scriptRanges.bindings) {
23208
- const name = ir.script.content.slice(range.start, range.end);
23209
- allVars.add(name);
23210
- }
23211
- if (!allVars.size) return allVars;
23270
+ const bindings = getSetupBindings();
23271
+ if (!bindings.size) return bindings;
23212
23272
  return new Set([
23213
- ...getGeneratedTemplate()?.componentAccessMap.keys() ?? [],
23214
- ...getGeneratedStyle()?.componentAccessMap.keys() ?? [],
23273
+ ...getGeneratedTemplate()?.contextAccesses.keys() ?? [],
23274
+ ...getGeneratedStyle()?.contextAccesses.keys() ?? [],
23215
23275
  ...ir.template?.ast?.components.flatMap((name) => [(0, shared_1.camelize)(name), (0, shared_1.capitalize)((0, shared_1.camelize)(name))]) ?? []
23216
- ].filter((name) => allVars.has(name)));
23276
+ ].filter((name) => bindings.has(name)));
23217
23277
  });
23218
23278
  return {
23219
23279
  getScriptRanges,
@@ -23227,12 +23287,13 @@ var require_vue_tsx = /* @__PURE__ */ __commonJSMin(((exports) => {
23227
23287
  exposed: getSetupExposed(),
23228
23288
  scriptRanges: getScriptRanges(),
23229
23289
  scriptSetupRanges: getScriptSetupRanges(),
23230
- templateAndStyleTypes: new Set([...getGeneratedTemplate()?.generatedTypes ?? [], ...getGeneratedStyle()?.generatedTypes ?? []]),
23290
+ templateAndStyleTypes: /* @__PURE__ */ new Set([...getGeneratedTemplate()?.generatedTypes ?? [], ...getGeneratedStyle()?.generatedTypes ?? []]),
23231
23291
  templateAndStyleCodes: [...getGeneratedStyle()?.codes ?? [], ...getGeneratedTemplate()?.codes ?? []]
23232
23292
  });
23233
23293
  }),
23234
23294
  getGeneratedTemplate,
23235
23295
  getImportedComponents,
23296
+ getSetupBindings,
23236
23297
  getSetupExposed
23237
23298
  };
23238
23299
  }
@@ -23251,23 +23312,6 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
23251
23312
  //#endregion
23252
23313
  //#region node_modules/@vue/language-core/lib/plugins.js
23253
23314
  var require_plugins = /* @__PURE__ */ __commonJSMin(((exports) => {
23254
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
23255
- if (k2 === void 0) k2 = k;
23256
- var desc = Object.getOwnPropertyDescriptor(m, k);
23257
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
23258
- enumerable: true,
23259
- get: function() {
23260
- return m[k];
23261
- }
23262
- };
23263
- Object.defineProperty(o, k2, desc);
23264
- }) : (function(o, m, k, k2) {
23265
- if (k2 === void 0) k2 = k;
23266
- o[k2] = m[k];
23267
- }));
23268
- var __exportStar = exports && exports.__exportStar || function(m, exports$6) {
23269
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$6, p)) __createBinding(exports$6, m, p);
23270
- };
23271
23315
  var __importDefault = exports && exports.__importDefault || function(mod) {
23272
23316
  return mod && mod.__esModule ? mod : { "default": mod };
23273
23317
  };
@@ -23288,7 +23332,6 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports) => {
23288
23332
  var vue_template_inline_ts_1 = __importDefault(require_vue_template_inline_ts());
23289
23333
  var vue_tsx_1 = __importDefault(require_vue_tsx());
23290
23334
  var types_1 = require_types();
23291
- __exportStar(require_shared$1(), exports);
23292
23335
  function createPlugins(pluginContext) {
23293
23336
  return [
23294
23337
  file_vue_1.default,
@@ -23805,7 +23848,7 @@ var require_virtualCode = /* @__PURE__ */ __commonJSMin(((exports) => {
23805
23848
  Object.defineProperty(exports, "__esModule", { value: true });
23806
23849
  exports.VueVirtualCode = void 0;
23807
23850
  var alien_signals_1 = require_cjs();
23808
- var plugins_1 = require_plugins();
23851
+ var codeFeatures_1 = require_codeFeatures();
23809
23852
  var embeddedCodes_1 = require_embeddedCodes();
23810
23853
  var ir_1 = require_ir();
23811
23854
  var VueVirtualCode = class {
@@ -23843,7 +23886,7 @@ var require_virtualCode = /* @__PURE__ */ __commonJSMin(((exports) => {
23843
23886
  sourceOffsets: [0],
23844
23887
  generatedOffsets: [0],
23845
23888
  lengths: [this._snapshot().getLength()],
23846
- data: plugins_1.allCodeFeatures
23889
+ data: codeFeatures_1.codeFeatures.full
23847
23890
  }];
23848
23891
  });
23849
23892
  }
@@ -23933,6 +23976,7 @@ var require_languagePlugin = /* @__PURE__ */ __commonJSMin(((exports) => {
23933
23976
  var CompilerDOM = __importStar((init_compiler_dom_esm_bundler(), __toCommonJS(compiler_dom_esm_bundler_exports)));
23934
23977
  var LanguageCore = __importStar(require_language_core());
23935
23978
  var plugins_1 = require_plugins();
23979
+ var vue_tsx_1 = require_vue_tsx();
23936
23980
  var virtualCode_1 = require_virtualCode();
23937
23981
  var fileRegistries = {};
23938
23982
  function getVueFileRegistry(compilerOptions, vueCompilerOptions, plugins) {
@@ -23992,7 +24036,7 @@ var require_languagePlugin = /* @__PURE__ */ __commonJSMin(((exports) => {
23992
24036
  scriptKind: 7
23993
24037
  })),
23994
24038
  getServiceScript(root) {
23995
- for (const code of (0, language_core_1.forEachEmbeddedCode)(root)) if (/script_(js|jsx|ts|tsx)/.test(code.id)) {
24039
+ for (const code of (0, language_core_1.forEachEmbeddedCode)(root)) if (vue_tsx_1.serviceScriptRE.test(code.id)) {
23996
24040
  const lang = code.id.slice(7);
23997
24041
  return {
23998
24042
  code,
@@ -24034,6 +24078,7 @@ var require_language_core = /* @__PURE__ */ __commonJSMin(((exports) => {
24034
24078
  };
24035
24079
  Object.defineProperty(exports, "__esModule", { value: true });
24036
24080
  exports.tsCodegen = exports.names = void 0;
24081
+ __exportStar(require_codeFeatures(), exports);
24037
24082
  __exportStar(require_template$1(), exports);
24038
24083
  __exportStar(require_compilerOptions(), exports);
24039
24084
  __exportStar(require_languagePlugin(), exports);
@@ -24045,7 +24090,7 @@ var require_language_core = /* @__PURE__ */ __commonJSMin(((exports) => {
24045
24090
  __exportStar(require_collectBindings(), exports);
24046
24091
  __exportStar(require_forEachTemplateNode(), exports);
24047
24092
  __exportStar(require_parseSfc(), exports);
24048
- __exportStar(require_shared$2(), exports);
24093
+ __exportStar(require_shared$1(), exports);
24049
24094
  __exportStar(require_virtualCode(), exports);
24050
24095
  var names_1 = require_names();
24051
24096
  Object.defineProperty(exports, "names", {
@@ -28419,7 +28464,8 @@ var init_jsonParser = __esmMin((() => {
28419
28464
  getMatchingSchemas(schema, focusOffset = -1, exclude) {
28420
28465
  if (this.root && schema) {
28421
28466
  const matchingSchemas = new SchemaCollector(focusOffset, exclude);
28422
- const context = new EvaluationContext(getSchemaDraft(schema));
28467
+ const schemaDraft = getSchemaDraft(schema);
28468
+ const context = new EvaluationContext(schemaDraft);
28423
28469
  validate(this.root, schema, new ValidationResult(), matchingSchemas, context);
28424
28470
  return matchingSchemas.schemas;
28425
28471
  }
@@ -30708,7 +30754,10 @@ var init_jsonSchemaService = __esmMin((() => {
30708
30754
  return this.promise.resolve(new UnresolvedSchema({}, [toDiagnostic(errorMessage, ErrorCode.SchemaResolveError, url)]));
30709
30755
  }
30710
30756
  return this.requestService(url).then((content) => {
30711
- if (!content) return new UnresolvedSchema({}, [toDiagnostic(t("Unable to load schema from '{0}': No content.", toDisplayString(url)), ErrorCode.SchemaResolveError, url)]);
30757
+ if (!content) {
30758
+ const errorMessage = t("Unable to load schema from '{0}': No content.", toDisplayString(url));
30759
+ return new UnresolvedSchema({}, [toDiagnostic(errorMessage, ErrorCode.SchemaResolveError, url)]);
30760
+ }
30712
30761
  const errors = [];
30713
30762
  if (content.charCodeAt(0) === 65279) {
30714
30763
  errors.push(toDiagnostic(t("Problem reading content from '{0}': UTF-8 with BOM detected, only UTF 8 is allowed.", toDisplayString(url)), ErrorCode.SchemaResolveError, url));
@@ -30730,7 +30779,8 @@ var init_jsonSchemaService = __esmMin((() => {
30730
30779
  }
30731
30780
  let errorCode = ErrorCode.SchemaResolveError;
30732
30781
  if (typeof code === "number" && code < 65536) errorCode += code;
30733
- return new UnresolvedSchema({}, [toDiagnostic(t("Unable to load schema from '{0}': {1}.", toDisplayString(url), message), errorCode, url)]);
30782
+ const errorMessage = t("Unable to load schema from '{0}': {1}.", toDisplayString(url), message);
30783
+ return new UnresolvedSchema({}, [toDiagnostic(errorMessage, errorCode, url)]);
30734
30784
  });
30735
30785
  }
30736
30786
  resolveSchemaContent(schemaToResolve, handle) {
@@ -32823,17 +32873,19 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32823
32873
  return comp;
32824
32874
  };
32825
32875
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
32876
+ var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p);
32826
32877
  var replaceTildes = (comp, options) => {
32827
32878
  return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
32828
32879
  };
32829
32880
  var replaceTilde = (comp, options) => {
32830
32881
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
32882
+ const z = options.includePrerelease ? "-0" : "";
32831
32883
  return comp.replace(r, (_, M, m, p, pr) => {
32832
32884
  debug("tilde", comp, _, M, m, p, pr);
32833
32885
  let ret;
32834
32886
  if (isX(M)) ret = "";
32835
- else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
32836
- else if (isX(p)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
32887
+ else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
32888
+ else if (isX(p)) ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
32837
32889
  else if (pr) {
32838
32890
  debug("replaceTilde pr", pr);
32839
32891
  ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
@@ -32863,8 +32915,8 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32863
32915
  else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
32864
32916
  } else {
32865
32917
  debug("no pr");
32866
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
32867
- else ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
32918
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
32919
+ else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
32868
32920
  else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
32869
32921
  }
32870
32922
  debug("caret return", ret);
@@ -32880,6 +32932,7 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32880
32932
  const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
32881
32933
  return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
32882
32934
  debug("xRange", comp, ret, gtlt, M, m, p, pr);
32935
+ if (invalidXRangeOrder(M, m, p)) return comp;
32883
32936
  const xM = isX(M);
32884
32937
  const xm = xM || isX(m);
32885
32938
  const xp = xm || isX(p);
@@ -34883,7 +34936,8 @@ var init_cssScanner = __esmMin((() => {
34883
34936
  content = [this.stream.substring(offset, pos)];
34884
34937
  if (this.stream.advanceIfChar(_PRC)) return this.finishToken(offset, TokenType$1.Percentage);
34885
34938
  else if (this.ident(content)) {
34886
- const tokenType = staticUnitTable[this.stream.substring(pos).toLowerCase()];
34939
+ const dim = this.stream.substring(pos).toLowerCase();
34940
+ const tokenType = staticUnitTable[dim];
34887
34941
  if (typeof tokenType !== "undefined") return this.finishToken(offset, tokenType, content.join(""));
34888
34942
  else return this.finishToken(offset, TokenType$1.Dimension, content.join(""));
34889
34943
  }
@@ -36207,7 +36261,9 @@ var init_cssNodes = __esmMin((() => {
36207
36261
  return NodeType.RatioValue;
36208
36262
  }
36209
36263
  };
36210
- _dot = ".".charCodeAt(0), _0$1 = "0".charCodeAt(0), _9$1 = "9".charCodeAt(0);
36264
+ _dot = ".".charCodeAt(0);
36265
+ _0$1 = "0".charCodeAt(0);
36266
+ _9$1 = "9".charCodeAt(0);
36211
36267
  NumericValue = class extends Node$1 {
36212
36268
  constructor(offset, length) {
36213
36269
  super(offset, length);
@@ -41177,7 +41233,8 @@ function collectValues(styleSheet, declaration) {
41177
41233
  return true;
41178
41234
  }
41179
41235
  function matchesProperty(decl) {
41180
- return fullPropertyName === decl.getFullPropertyName();
41236
+ const propertyName = decl.getFullPropertyName();
41237
+ return fullPropertyName === propertyName;
41181
41238
  }
41182
41239
  function vistNode(node) {
41183
41240
  if (node instanceof Declaration && node !== declaration) {
@@ -86849,13 +86906,13 @@ var require_vue_autoinsert_dotvalue = /* @__PURE__ */ __commonJSMin(((exports) =
86849
86906
  }
86850
86907
  };
86851
86908
  }
86852
- var charReg = /\w/;
86909
+ var charRE = /\w/;
86853
86910
  function isCharacterTyping(document, change) {
86854
86911
  const lastCharacter = change.text[change.text.length - 1];
86855
86912
  const nextCharacter = document.getText().slice(change.rangeOffset + change.text.length, change.rangeOffset + change.text.length + 1);
86856
86913
  if (lastCharacter === void 0) return false;
86857
86914
  if (change.text.includes("\n")) return false;
86858
- return charReg.test(lastCharacter) && !charReg.test(nextCharacter);
86915
+ return charRE.test(lastCharacter) && !charRE.test(nextCharacter);
86859
86916
  }
86860
86917
  function shouldSkip(ts, node, pos, allowAccessDotValue) {
86861
86918
  if (ts.isVariableDeclaration(node) && pos >= node.name.getFullStart() && pos <= node.name.getEnd()) return true;
@@ -86975,7 +87032,7 @@ var require_vue_component_semantic_tokens = /* @__PURE__ */ __commonJSMin(((expo
86975
87032
  const end = document.offsetAt(range.end);
86976
87033
  const validComponentNames = await getComponentNames(info.root.fileName) ?? [];
86977
87034
  const elements = new Set(await getElementNames(info.root.fileName) ?? []);
86978
- const components = new Set([...validComponentNames, ...validComponentNames.map(language_core_1.hyphenateTag)]);
87035
+ const components = /* @__PURE__ */ new Set([...validComponentNames, ...validComponentNames.map(language_core_1.hyphenateTag)]);
86979
87036
  for (const node of (0, language_core_1.forEachElementNode)(template.ast)) {
86980
87037
  if (node.loc.end.offset <= start || node.loc.start.offset >= end) continue;
86981
87038
  if (components.has(node.tag) && !elements.has(node.tag)) {
@@ -87020,7 +87077,7 @@ var require_vue_directive_comments = /* @__PURE__ */ __commonJSMin(((exports) =>
87020
87077
  ["vue-expect-error"],
87021
87078
  ["vue-generic", "vue-generic {$1}"]
87022
87079
  ];
87023
- var directiveCommentReg = /<!--\s*@/;
87080
+ var directiveCommentRE = /<!--\s*@/;
87024
87081
  /**
87025
87082
  * A language service plugin that provides completion for Vue directive comments,
87026
87083
  * e.g. if user is writing `<!-- |` in they'll be provided completions for `@vue-expect-error`, `@vue-generic`, etc.
@@ -87039,7 +87096,7 @@ var require_vue_directive_comments = /* @__PURE__ */ __commonJSMin(((exports) =>
87039
87096
  },
87040
87097
  end: position
87041
87098
  });
87042
- const cmdStart = line.match(directiveCommentReg);
87099
+ const cmdStart = line.match(directiveCommentRE);
87043
87100
  if (!cmdStart) return;
87044
87101
  const startIndex = cmdStart.index + cmdStart[0].length;
87045
87102
  const remainText = line.slice(startIndex);
@@ -87165,7 +87222,7 @@ var require_vue_extract_file = /* @__PURE__ */ __commonJSMin(((exports) => {
87165
87222
  var language_core_1 = require_language_core();
87166
87223
  var vscode_uri_1 = require_umd();
87167
87224
  var utils_1 = require_utils$1();
87168
- var unicodeReg = /\\u/g;
87225
+ var unicodeRE = /\\u/g;
87169
87226
  function create(ts, { collectExtractProps }) {
87170
87227
  return {
87171
87228
  name: "vue-extract-file",
@@ -87349,7 +87406,7 @@ var require_vue_extract_file = /* @__PURE__ */ __commonJSMin(((exports) => {
87349
87406
  const printText = printer.printNode(ts.EmitHint.Expression, newNode, ast);
87350
87407
  return {
87351
87408
  range: componentOptions.components,
87352
- newText: unescape(printText.replace(unicodeReg, "%u"))
87409
+ newText: unescape(printText.replace(unicodeRE, "%u"))
87353
87410
  };
87354
87411
  } else {
87355
87412
  const newNode = {
@@ -87359,7 +87416,7 @@ var require_vue_extract_file = /* @__PURE__ */ __commonJSMin(((exports) => {
87359
87416
  const printText = printer.printNode(ts.EmitHint.Expression, newNode, ast);
87360
87417
  return {
87361
87418
  range: componentOptions.args,
87362
- newText: unescape(printText.replace(unicodeReg, "%u"))
87419
+ newText: unescape(printText.replace(unicodeRE, "%u"))
87363
87420
  };
87364
87421
  }
87365
87422
  }
@@ -114473,7 +114530,7 @@ var require_vue_template = /* @__PURE__ */ __commonJSMin(((exports) => {
114473
114530
  const info = (0, utils_1.resolveEmbeddedCode)(context, document.uri);
114474
114531
  const codegen = info && language_core_1.tsCodegen.get(info.root.ir);
114475
114532
  if (codegen) {
114476
- const componentNames = new Set([...codegen.getImportedComponents(), ...codegen.getSetupExposed()]);
114533
+ const componentNames = /* @__PURE__ */ new Set([...codegen.getImportedComponents(), ...codegen.getSetupExposed()]);
114477
114534
  voidElements = defaultDataProvider.provideTags().filter((tag) => tag.void).map((tag) => tag.name).filter((tag) => !componentNames.has(tag) && !componentNames.has((0, shared_1.capitalize)(tag)));
114478
114535
  }
114479
114536
  return (0, htmlFormatter_1.format)(document, range, options, voidElements);
@@ -114789,7 +114846,7 @@ var require_vue_template = /* @__PURE__ */ __commonJSMin(((exports) => {
114789
114846
  });
114790
114847
  }
114791
114848
  for (const [propName, propInfo] of [...props.map((prop) => [prop.name, prop]), ...attrs.map((attr) => [attr.name, attr])]) {
114792
- if (propName.match(EVENT_PROP_REGEX)) {
114849
+ if (EVENT_PROP_REGEX.test(propName)) {
114793
114850
  let labelName = propName.slice(2);
114794
114851
  labelName = labelName.charAt(0).toLowerCase() + labelName.slice(1);
114795
114852
  if (attrNameCasing === 0) labelName = (0, language_core_1.hyphenateAttr)(labelName);
@@ -115006,8 +115063,8 @@ var require_vue_twoslash_queries = /* @__PURE__ */ __commonJSMin(((exports) => {
115006
115063
  Object.defineProperty(exports, "__esModule", { value: true });
115007
115064
  exports.create = create;
115008
115065
  var utils_1 = require_utils$1();
115009
- var twoslashTemplateReg = /<!--\s*\^\?\s*-->/g;
115010
- var twoslashScriptReg = /(?<=^|\n)\s*\/\/\s*\^\?/g;
115066
+ var twoslashTemplateRE = /<!--\s*\^\?\s*-->/g;
115067
+ var twoslashScriptRE = /(?<=^|\n)\s*\/\/\s*\^\?/g;
115011
115068
  function create({ getQuickInfoAtPosition }) {
115012
115069
  return {
115013
115070
  name: "vue-twoslash-queries",
@@ -115018,9 +115075,9 @@ var require_vue_twoslash_queries = /* @__PURE__ */ __commonJSMin(((exports) => {
115018
115075
  if (info?.code.id !== "template" && !info?.code.id.startsWith("script_")) return;
115019
115076
  const hoverOffsets = [];
115020
115077
  const inlayHints = [];
115021
- const twoslashReg = info.code.id === "template" ? twoslashTemplateReg : twoslashScriptReg;
115078
+ const twoslashRE = info.code.id === "template" ? twoslashTemplateRE : twoslashScriptRE;
115022
115079
  const sourceDocument = context.documents.get(info.script.id, info.script.languageId, info.script.snapshot);
115023
- for (const pointer of document.getText(range).matchAll(twoslashReg)) {
115080
+ for (const pointer of document.getText(range).matchAll(twoslashRE)) {
115024
115081
  const offset = pointer.index + pointer[0].indexOf("^?") + document.offsetAt(range.start);
115025
115082
  const position = document.positionAt(offset);
115026
115083
  hoverOffsets.push([position, document.offsetAt({
@@ -115191,7 +115248,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
115191
115248
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
115192
115249
  var path = __importStar(require_path_browserify());
115193
115250
  function getComponentType(ts, checker, sourceFile, { fileName, ir }, tag) {
115194
- const testNames = new Set([
115251
+ const testNames = /* @__PURE__ */ new Set([
115195
115252
  tag,
115196
115253
  (0, shared_1.camelize)(tag),
115197
115254
  (0, shared_1.capitalize)((0, shared_1.camelize)(tag))
@@ -115254,7 +115311,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => {
115254
115311
  else node.forEachChild(walk);
115255
115312
  }
115256
115313
  }
115257
- exports.booleanExceptionProps = new Set(["class", "style"]);
115314
+ exports.booleanExceptionProps = /* @__PURE__ */ new Set(["class", "style"]);
115258
115315
  function hasBooleanType(ts, type) {
115259
115316
  if (type.flags & ts.TypeFlags.BooleanLike) return true;
115260
115317
  if (type.isUnionOrIntersection()) return type.types.some((type) => hasBooleanType(ts, type));
@@ -115293,7 +115350,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
115293
115350
  var language_core_1 = require_language_core();
115294
115351
  var shared_1 = (init_shared_esm_bundler(), __toCommonJS(shared_esm_bundler_exports));
115295
115352
  var utils_2 = require_utils();
115296
- var windowsPathReg = /\\/g;
115353
+ var windowsPathRE = /\\/g;
115297
115354
  function postprocessLanguageService(ts, language, languageService, vueOptions, asScriptId) {
115298
115355
  const proxyCache = /* @__PURE__ */ new Map();
115299
115356
  const getProxyMethod = (target, p) => {
@@ -115332,7 +115389,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
115332
115389
  }
115333
115390
  function getCompletionsAtPosition(getCompletionsAtPosition) {
115334
115391
  return (filePath, position, ...rests) => {
115335
- const fileName = filePath.replace(windowsPathReg, "/");
115392
+ const fileName = filePath.replace(windowsPathRE, "/");
115336
115393
  const result = getCompletionsAtPosition(fileName, position, ...rests);
115337
115394
  if (result) resolveCompletionResult(ts, language, asScriptId, vueOptions, fileName, position, result);
115338
115395
  return result;
@@ -115398,13 +115455,14 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports) => {
115398
115455
  const root = language.scripts.get(asScriptId(fileName))?.generated?.root;
115399
115456
  if (root instanceof language_core_1.VueVirtualCode) {
115400
115457
  if ([root.ir.template, ...root.ir.styles].filter(Boolean).map((block) => [block.startTagEnd, block.endTagStart]).some(([start, end]) => position >= start && position <= end)) {
115401
- const globalKinds = new Set([
115458
+ const globalKinds = /* @__PURE__ */ new Set([
115402
115459
  "var",
115403
115460
  "function",
115404
- "module"
115461
+ "module",
115462
+ "const"
115405
115463
  ]);
115406
115464
  const globalsOrKeywords = ts.Completions.SortText.GlobalsOrKeywords;
115407
- const sortTexts = new Set([
115465
+ const sortTexts = /* @__PURE__ */ new Set([
115408
115466
  globalsOrKeywords,
115409
115467
  "z" + globalsOrKeywords,
115410
115468
  globalsOrKeywords + "1"
@@ -115505,13 +115563,14 @@ var require_getComponentDirectives = /* @__PURE__ */ __commonJSMin(((exports) =>
115505
115563
  exports.getComponentDirectives = getComponentDirectives;
115506
115564
  var language_core_1 = require_language_core();
115507
115565
  var utils_1 = require_utils();
115566
+ var directiveRE = /^v[A-Z]/;
115508
115567
  function getComponentDirectives(ts, program, fileName) {
115509
115568
  const sourceFile = program.getSourceFile(fileName);
115510
115569
  if (!sourceFile) return [];
115511
115570
  const checker = program.getTypeChecker();
115512
115571
  const directives = (0, utils_1.getVariableType)(ts, checker, sourceFile, language_core_1.names.directives);
115513
115572
  if (!directives) return [];
115514
- return directives.type.getProperties().map(({ name }) => name).filter((name) => name.match(/^v[A-Z]/));
115573
+ return directives.type.getProperties().map(({ name }) => name).filter((name) => directiveRE.test(name));
115515
115574
  }
115516
115575
  }));
115517
115576
  //#endregion
@@ -115710,7 +115769,7 @@ var require_schemaResolvers = /* @__PURE__ */ __commonJSMin(((exports) => {
115710
115769
  Object.defineProperty(exports, "__esModule", { value: true });
115711
115770
  exports.createSchemaResolvers = createSchemaResolvers;
115712
115771
  var scriptSetup_1 = require_scriptSetup();
115713
- var publicPropsInterfaces = new Set([
115772
+ var publicPropsInterfaces = /* @__PURE__ */ new Set([
115714
115773
  "PublicProps",
115715
115774
  "VNodeProps",
115716
115775
  "AllowedComponentProps",
@@ -116032,6 +116091,7 @@ var require_componentMeta = /* @__PURE__ */ __commonJSMin(((exports) => {
116032
116091
  var helpers_1 = require_helpers();
116033
116092
  var schemaResolvers_1 = require_schemaResolvers();
116034
116093
  var scriptSetup_1 = require_scriptSetup();
116094
+ var vnodeEventRE = /^onVnode[A-Z]/;
116035
116095
  function getComponentMeta(ts, typeChecker, printer, language, getSourceScript, componentNode, componentType, options, deprecatedOptions = {
116036
116096
  noDeclarations: true,
116037
116097
  rawType: false
@@ -116092,7 +116152,7 @@ var require_componentMeta = /* @__PURE__ */ __commonJSMin(((exports) => {
116092
116152
  }).filter((prop) => !!prop && !eventProps.has(prop.name));
116093
116153
  const defaults = (0, scriptSetup_1.getDefaultsFromScriptSetup)(ts, printer, getSourceScript(componentFile.fileName));
116094
116154
  for (const prop of result) {
116095
- if (prop.name.match(/^onVnode[A-Z]/)) prop.name = "onVue:" + prop.name[7]?.toLowerCase() + prop.name.slice(8);
116155
+ if (vnodeEventRE.test(prop.name)) prop.name = "onVue:" + prop.name[7]?.toLowerCase() + prop.name.slice(8);
116096
116156
  prop.default ??= defaults?.get(prop.name);
116097
116157
  }
116098
116158
  return result;
@@ -116170,8 +116230,8 @@ var require_getComponentNames = /* @__PURE__ */ __commonJSMin(((exports) => {
116170
116230
  if (!sourceFile) return [];
116171
116231
  const checker = program.getTypeChecker();
116172
116232
  const componentNames = (0, utils_1.getVariableType)(ts, checker, sourceFile, language_core_1.names.components)?.type.getProperties().map((c) => c.name).filter((entry) => !entry.includes("$") && !entry.startsWith("_")) ?? [];
116173
- componentNames.push((0, utils_1.getSelfComponentName)(virtualCode.fileName));
116174
- componentNames.push(...language_core_1.tsCodegen.get(virtualCode.ir)?.getImportedComponents() ?? []);
116233
+ const codegen = language_core_1.tsCodegen.get(virtualCode.ir);
116234
+ componentNames.push((0, utils_1.getSelfComponentName)(virtualCode.fileName), ...codegen?.getImportedComponents() ?? [], ...codegen?.getSetupBindings() ?? []);
116175
116235
  return [...new Set(componentNames)];
116176
116236
  }
116177
116237
  }));
@@ -157811,7 +157871,8 @@ ${lanes.join("\n")}
157811
157871
  directoryToModuleNameMap.update(options2);
157812
157872
  }
157813
157873
  function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
157814
- return getOrCreateCache(directoryToModuleNameMap, redirectedReference, toPath(directoryName, currentDirectory, getCanonicalFileName), () => createModeAwareCache());
157874
+ const path = toPath(directoryName, currentDirectory, getCanonicalFileName);
157875
+ return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, () => createModeAwareCache());
157815
157876
  }
157816
157877
  function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
157817
157878
  var _a, _b;
@@ -166402,10 +166463,11 @@ ${lanes.join("\n")}
166402
166463
  if (!specifier) {
166403
166464
  const isBundle2 = !!compilerOptions.outFile;
166404
166465
  const { moduleResolverHost } = context.tracker;
166405
- specifier = first(getModuleSpecifiers(symbol, checker, isBundle2 ? {
166466
+ const specifierCompilerOptions = isBundle2 ? {
166406
166467
  ...compilerOptions,
166407
166468
  baseUrl: moduleResolverHost.getCommonSourceDirectory()
166408
- } : compilerOptions, contextFile, moduleResolverHost, {
166469
+ } : compilerOptions;
166470
+ specifier = first(getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, {
166409
166471
  importModuleSpecifierPreference: isBundle2 ? "non-relative" : "project-relative",
166410
166472
  importModuleSpecifierEnding: isBundle2 ? "minimal" : resolutionMode === 99 ? "js" : void 0
166411
166473
  }, { overrideImportMode }));
@@ -167088,7 +167150,8 @@ ${lanes.join("\n")}
167088
167150
  if (some(symbol.declarations, isPartOfParameterDeclaration)) return;
167089
167151
  Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]);
167090
167152
  getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol);
167091
- deferredPrivatesStack[!!(symbol.flags & 2097152) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)) ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol);
167153
+ const isExternalImportAlias = !!(symbol.flags & 2097152) && !some(symbol.declarations, (d) => !!findAncestor(d, isExportDeclaration) || isNamespaceExport(d) || isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference));
167154
+ deferredPrivatesStack[isExternalImportAlias ? 0 : deferredPrivatesStack.length - 1].set(getSymbolId(symbol), symbol);
167092
167155
  }
167093
167156
  function isExportingScope(enclosingDeclaration2) {
167094
167157
  return isSourceFile(enclosingDeclaration2) && (isExternalOrCommonJsModule(enclosingDeclaration2) || isJsonSourceFile(enclosingDeclaration2)) || isAmbientModule(enclosingDeclaration2) && !isGlobalScopeAugmentation(enclosingDeclaration2);
@@ -182937,7 +183000,8 @@ ${lanes.join("\n")}
182937
183000
  const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(links.assertionExpressionType));
182938
183001
  const targetType = getTypeFromTypeNode(type);
182939
183002
  if (!isErrorType(targetType)) addLazyDiagnostic(() => {
182940
- if (!isTypeComparableTo(targetType, getWidenedType(exprType))) checkTypeComparableTo(exprType, targetType, errNode, Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first);
183003
+ const widenedType = getWidenedType(exprType);
183004
+ if (!isTypeComparableTo(targetType, widenedType)) checkTypeComparableTo(exprType, targetType, errNode, Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first);
182941
183005
  });
182942
183006
  }
182943
183007
  function checkNonNullChain(node) {
@@ -194685,7 +194749,8 @@ ${lanes.join("\n")}
194685
194749
  setOriginalNode(getter, node);
194686
194750
  setCommentRange(getter, commentRange);
194687
194751
  setSourceMapRange(getter, sourceMapRange);
194688
- const setter = createAccessorPropertySetRedirector(factory2, node, factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers)), setterName, receiver);
194752
+ const setterModifiers = factory2.createModifiersFromModifierFlags(modifiersToFlags(modifiers));
194753
+ const setter = createAccessorPropertySetRedirector(factory2, node, setterModifiers, setterName, receiver);
194689
194754
  setOriginalNode(setter, node);
194690
194755
  setEmitFlags(setter, 3072);
194691
194756
  setSourceMapRange(setter, sourceMapRange);
@@ -199128,7 +199193,8 @@ ${lanes.join("\n")}
199128
199193
  const tagName = getTagName(node);
199129
199194
  const attrs = node.attributes.properties;
199130
199195
  const objectProperties = length(attrs) ? transformJsxAttributesToObjectProps(attrs) : factory2.createNull();
199131
- const element = createExpressionForJsxElement(factory2, currentFileState.importSpecifier === void 0 ? createJsxFactoryExpression(factory2, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, node) : getImplicitImportForName("createElement"), tagName, objectProperties, mapDefined(children, transformJsxChildToExpression), location);
199196
+ const callee = currentFileState.importSpecifier === void 0 ? createJsxFactoryExpression(factory2, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, node) : getImplicitImportForName("createElement");
199197
+ const element = createExpressionForJsxElement(factory2, callee, tagName, objectProperties, mapDefined(children, transformJsxChildToExpression), location);
199132
199198
  if (isChild) startOnNewLine(element);
199133
199199
  return element;
199134
199200
  }
@@ -215724,7 +215790,8 @@ ${lanes.join("\n")}
215724
215790
  }
215725
215791
  function scheduleInvalidateResolutionsOfFailedLookupLocations() {
215726
215792
  if (!host.setTimeout || !host.clearTimeout) return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
215727
- writeLog(`Scheduling invalidateFailedLookup${clearInvalidateResolutionsOfFailedLookupLocations() ? ", Cancelled earlier one" : ""}`);
215793
+ const pending = clearInvalidateResolutionsOfFailedLookupLocations();
215794
+ writeLog(`Scheduling invalidateFailedLookup${pending ? ", Cancelled earlier one" : ""}`);
215728
215795
  timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250, "timerToInvalidateFailedLookupResolutions");
215729
215796
  }
215730
215797
  function invalidateResolutionsOfFailedLookup() {
@@ -231415,7 +231482,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
231415
231482
  const { sourceFile } = context;
231416
231483
  const fixedDeclarations = /* @__PURE__ */ new Set();
231417
231484
  return codeFixAll(context, errorCodes2, (t, diagnostic) => {
231418
- const decl = getFixableErrorSpanDeclaration(sourceFile, diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code));
231485
+ const span = diagnostic.relatedInformation && find(diagnostic.relatedInformation, (r) => r.code === Diagnostics.Did_you_mean_to_mark_this_function_as_async.code);
231486
+ const decl = getFixableErrorSpanDeclaration(sourceFile, span);
231419
231487
  if (!decl) return;
231420
231488
  const trackChanges = (cb) => (cb(t), []);
231421
231489
  return getFix(context, decl, trackChanges, fixedDeclarations);
@@ -234000,7 +234068,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
234000
234068
  return createModuleSpecifierResolutionHost(isFromPackageJson ? host.getPackageJsonAutoImportProvider() : program, host);
234001
234069
  });
234002
234070
  function addSymbol(moduleSymbol, toFile, exportedSymbol, exportKind, program2, isFromPackageJson) {
234003
- if (isImportable(program2, fromFile, toFile, moduleSymbol, preferences, packageJsonFilter, getModuleSpecifierResolutionHost(isFromPackageJson), moduleSpecifierCache)) {
234071
+ const moduleSpecifierResolutionHost = getModuleSpecifierResolutionHost(isFromPackageJson);
234072
+ if (isImportable(program2, fromFile, toFile, moduleSymbol, preferences, packageJsonFilter, moduleSpecifierResolutionHost, moduleSpecifierCache)) {
234004
234073
  const checker = program2.getTypeChecker();
234005
234074
  originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), {
234006
234075
  symbol: exportedSymbol,
@@ -234977,7 +235046,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
234977
235046
  eachDiagnostic(context, errorCodes28, (diag2) => {
234978
235047
  const info = getInfo10(diag2.file, diag2.start, diag2.code, checker, context.program);
234979
235048
  if (info === void 0) return;
234980
- if (!addToSeen(seen, getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 ? info.identifier || getNodeId(info.token) : info.token.text))) return;
235049
+ const nodeId = getNodeId(info.parentDeclaration) + "#" + (info.kind === 3 ? info.identifier || getNodeId(info.token) : info.token.text);
235050
+ if (!addToSeen(seen, nodeId)) return;
234981
235051
  if (fixId56 === fixMissingFunctionDeclaration && (info.kind === 2 || info.kind === 5)) addFunctionDeclaration(changes, context, info);
234982
235052
  else if (fixId56 === fixMissingProperties && info.kind === 3) addObjectLiteralProperties(changes, context, info);
234983
235053
  else if (fixId56 === fixMissingAttributes && info.kind === 4) addJsxAttributes(changes, context, info);
@@ -236360,7 +236430,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
236360
236430
  const info = getInfo15(err.file, err.start, checker);
236361
236431
  if (!info) return;
236362
236432
  const { typeNode, type } = info;
236363
- doChange29(changes, sourceFile, typeNode, typeNode.kind === 315 && fixId56 === fixIdNullable ? checker.getNullableType(type, 4) : type, checker);
236433
+ const fixedType = typeNode.kind === 315 && fixId56 === fixIdNullable ? checker.getNullableType(type, 4) : type;
236434
+ doChange29(changes, sourceFile, typeNode, fixedType, checker);
236364
236435
  });
236365
236436
  }
236366
236437
  });
@@ -240760,15 +240831,18 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
240760
240831
  symbol: firstAccessibleSymbol,
240761
240832
  targetFlags: skipAlias(firstAccessibleSymbol, typeChecker).flags
240762
240833
  }], position, isValidTypeOnlyAliasUseSite(location)) || {};
240763
- if (moduleSpecifier) symbolToOriginInfoMap[index] = {
240764
- kind: getNullableSymbolOriginInfoKind(34),
240765
- moduleSymbol,
240766
- isDefaultExport: false,
240767
- symbolName: firstAccessibleSymbol.name,
240768
- exportName: firstAccessibleSymbol.name,
240769
- fileName,
240770
- moduleSpecifier
240771
- };
240834
+ if (moduleSpecifier) {
240835
+ const origin = {
240836
+ kind: getNullableSymbolOriginInfoKind(34),
240837
+ moduleSymbol,
240838
+ isDefaultExport: false,
240839
+ symbolName: firstAccessibleSymbol.name,
240840
+ exportName: firstAccessibleSymbol.name,
240841
+ fileName,
240842
+ moduleSpecifier
240843
+ };
240844
+ symbolToOriginInfoMap[index] = origin;
240845
+ }
240772
240846
  }
240773
240847
  } else if (preferences.includeCompletionsWithInsertText) {
240774
240848
  if (firstAccessibleSymbolId && seenPropertySymbols.has(firstAccessibleSymbolId)) return;
@@ -241289,10 +241363,13 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
241289
241363
  symbols = concatenate(symbols, filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags));
241290
241364
  forEach(symbols, (symbol, index) => {
241291
241365
  const declaration = symbol == null ? void 0 : symbol.valueDeclaration;
241292
- if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) symbolToOriginInfoMap[index] = {
241293
- kind: 512,
241294
- symbolName: typeChecker.symbolToString(symbol)
241295
- };
241366
+ if (declaration && isClassElement(declaration) && declaration.name && isComputedPropertyName(declaration.name)) {
241367
+ const origin = {
241368
+ kind: 512,
241369
+ symbolName: typeChecker.symbolToString(symbol)
241370
+ };
241371
+ symbolToOriginInfoMap[index] = origin;
241372
+ }
241296
241373
  });
241297
241374
  }
241298
241375
  return 1;
@@ -248201,7 +248278,7 @@ ${content}
248201
248278
  if (symbolWasExpanded) return true;
248202
248279
  if (canExpandSymbol(symbol2, typeWriterOut)) {
248203
248280
  const symbolMeaning = semanticToSymbolMeaning(meaning);
248204
- addRange(displayParts, mapToDisplayParts((writer) => {
248281
+ const expandedDisplayParts = mapToDisplayParts((writer) => {
248205
248282
  const nodes = typeChecker.getEmitResolver().symbolToDeclarations(symbol2, symbolMeaning, 17408, maximumLength, verbosityLevel !== void 0 ? verbosityLevel - 1 : void 0, typeWriterOut);
248206
248283
  const printer = getPrinter();
248207
248284
  const sourceFile2 = symbol2.valueDeclaration && getSourceFileOfNode(symbol2.valueDeclaration);
@@ -248209,7 +248286,8 @@ ${content}
248209
248286
  if (i > 0) writer.writeLine();
248210
248287
  printer.writeNode(4, node, sourceFile2, writer);
248211
248288
  });
248212
- }, maximumLength));
248289
+ }, maximumLength);
248290
+ addRange(displayParts, expandedDisplayParts);
248213
248291
  symbolWasExpanded = true;
248214
248292
  return true;
248215
248293
  }
@@ -248283,10 +248361,11 @@ ${content}
248283
248361
  }
248284
248362
  }
248285
248363
  function writeTypeParametersOfSymbol(symbol2, enclosingDeclaration2) {
248286
- addRange(displayParts, mapToDisplayParts((writer) => {
248364
+ const typeParameterParts = mapToDisplayParts((writer) => {
248287
248365
  const params = typeChecker.symbolToTypeParameterDeclarations(symbol2, enclosingDeclaration2, symbolDisplayNodeBuilderFlags);
248288
248366
  getPrinter().writeList(53776, params, getSourceFileOfNode(getParseTreeNode(enclosingDeclaration2)), writer);
248289
- }));
248367
+ });
248368
+ addRange(displayParts, typeParameterParts);
248290
248369
  }
248291
248370
  }
248292
248371
  function getSymbolDisplayPartsDocumentationAndSymbolKind(typeChecker, symbol, sourceFile, enclosingDeclaration, location, semanticMeaning = getMeaningFromLocation(location), alias, maximumLength, verbosityLevel) {
@@ -254318,12 +254397,13 @@ ${options.prefix}` : "\n" : options.prefix
254318
254397
  if (this.installTypingHost.fileExists(combinePaths(directory, "package.json"))) return directory;
254319
254398
  }) || projectRootPath;
254320
254399
  if (cwd) this.installWorker(-1, [packageName], cwd, (success) => {
254400
+ const message = success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`;
254321
254401
  const response = {
254322
254402
  kind: ActionPackageInstalled,
254323
254403
  projectName,
254324
254404
  id,
254325
254405
  success,
254326
- message: success ? `Package ${packageName} installed.` : `There was an error installing ${packageName}.`
254406
+ message
254327
254407
  };
254328
254408
  this.sendResponse(response);
254329
254409
  });
@@ -265298,7 +265378,7 @@ var require_codeAction = /* @__PURE__ */ __commonJSMin(((exports) => {
265298
265378
  var fixNames = require_fixNames();
265299
265379
  var lspConverters_1 = require_lspConverters();
265300
265380
  var codeActionResolve_1 = require_codeActionResolve();
265301
- var renameCommandRefactors = new Set([
265381
+ var renameCommandRefactors = /* @__PURE__ */ new Set([
265302
265382
  "refactor.rewrite.property.generateAccessors",
265303
265383
  "refactor.extract.type",
265304
265384
  "refactor.extract.interface",
@@ -270138,6 +270218,7 @@ var require_protocol_diagnostic = /* @__PURE__ */ __commonJSMin(((exports) => {
270138
270218
  /**
270139
270219
  * The document diagnostic request definition.
270140
270220
  *
270221
+ *
270141
270222
  * @since 3.17.0
270142
270223
  */
270143
270224
  var DocumentDiagnosticRequest;
@@ -271892,7 +271973,9 @@ var import_directiveComment = require_directiveComment();
271892
271973
  var import_semantic = require_semantic();
271893
271974
  var import_api = require_api();
271894
271975
  init_esm();
271895
- var ctime = Date.now(), global$1 = "skaldapp", globalDeclarations = `declare global {
271976
+ var ctime = Date.now();
271977
+ var global$1 = "skaldapp";
271978
+ var globalDeclarations = `declare global {
271896
271979
  interface Window {
271897
271980
  __vue_app__: import("vue").App;
271898
271981
  }
@@ -271905,7 +271988,14 @@ declare module 'vue' {
271905
271988
  $id: string;
271906
271989
  }
271907
271990
  }
271908
- export {};`, mtime = ctime, npmFileSystem = (0, import_jsdelivr.createNpmFileSystem)(), semanticPlugin = (0, import_semantic.create)(import_typescript.default), size = globalDeclarations.length, type = 1, vueCompilerOptions = (0, import_language_core.getDefaultCompilerOptions)(), workspaceFolders = [URI$2.file("/")];
271991
+ export {};`;
271992
+ var mtime = ctime;
271993
+ var npmFileSystem = (0, import_jsdelivr.createNpmFileSystem)();
271994
+ var semanticPlugin = (0, import_semantic.create)(import_typescript.default);
271995
+ var size = globalDeclarations.length;
271996
+ var type = 1;
271997
+ var vueCompilerOptions = (0, import_language_core.getDefaultCompilerOptions)();
271998
+ var workspaceFolders = [URI$2.file("/")];
271909
271999
  var asFileName = ({ path }) => path, asUri = (fileName) => URI$2.file(fileName), create = (context) => {
271910
272000
  const pluginInstance = semanticPlugin.create(context), languageService = pluginInstance.provide["typescript/languageService"](), proxy = (0, import_common.postprocessLanguageService)(import_typescript.default, context.language, languageService, vueCompilerOptions, asUri), getCodeFixesAtPosition = proxy.getCodeFixesAtPosition.bind(proxy), getCompletionEntryDetails = proxy.getCompletionEntryDetails.bind(proxy), getCompletionsAtPosition = proxy.getCompletionsAtPosition.bind(proxy), getDefinitionAndBoundSpan = proxy.getDefinitionAndBoundSpan.bind(proxy), getQuickInfoAtPosition = proxy.getQuickInfoAtPosition.bind(proxy);
271911
272001
  pluginInstance.provide["typescript/languageService"] = () => ({