@vue/compiler-dom 3.5.24 → 3.5.26

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-dom v3.5.24
2
+ * @vue/compiler-dom v3.5.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -139,81 +139,81 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
139
139
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
140
140
  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
141
141
 
142
- const FRAGMENT = Symbol(`Fragment` );
143
- const TELEPORT = Symbol(`Teleport` );
144
- const SUSPENSE = Symbol(`Suspense` );
145
- const KEEP_ALIVE = Symbol(`KeepAlive` );
146
- const BASE_TRANSITION = Symbol(
142
+ const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` );
143
+ const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` );
144
+ const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` );
145
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` );
146
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
147
147
  `BaseTransition`
148
148
  );
149
- const OPEN_BLOCK = Symbol(`openBlock` );
150
- const CREATE_BLOCK = Symbol(`createBlock` );
151
- const CREATE_ELEMENT_BLOCK = Symbol(
149
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` );
150
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` );
151
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
152
152
  `createElementBlock`
153
153
  );
154
- const CREATE_VNODE = Symbol(`createVNode` );
155
- const CREATE_ELEMENT_VNODE = Symbol(
154
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` );
155
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
156
156
  `createElementVNode`
157
157
  );
158
- const CREATE_COMMENT = Symbol(
158
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
159
159
  `createCommentVNode`
160
160
  );
161
- const CREATE_TEXT = Symbol(
161
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
162
162
  `createTextVNode`
163
163
  );
164
- const CREATE_STATIC = Symbol(
164
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
165
165
  `createStaticVNode`
166
166
  );
167
- const RESOLVE_COMPONENT = Symbol(
167
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
168
168
  `resolveComponent`
169
169
  );
170
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
170
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
171
171
  `resolveDynamicComponent`
172
172
  );
173
- const RESOLVE_DIRECTIVE = Symbol(
173
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
174
174
  `resolveDirective`
175
175
  );
176
- const RESOLVE_FILTER = Symbol(
176
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
177
177
  `resolveFilter`
178
178
  );
179
- const WITH_DIRECTIVES = Symbol(
179
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
180
180
  `withDirectives`
181
181
  );
182
- const RENDER_LIST = Symbol(`renderList` );
183
- const RENDER_SLOT = Symbol(`renderSlot` );
184
- const CREATE_SLOTS = Symbol(`createSlots` );
185
- const TO_DISPLAY_STRING = Symbol(
182
+ const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` );
183
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` );
184
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` );
185
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
186
186
  `toDisplayString`
187
187
  );
188
- const MERGE_PROPS = Symbol(`mergeProps` );
189
- const NORMALIZE_CLASS = Symbol(
188
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` );
189
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
190
190
  `normalizeClass`
191
191
  );
192
- const NORMALIZE_STYLE = Symbol(
192
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
193
193
  `normalizeStyle`
194
194
  );
195
- const NORMALIZE_PROPS = Symbol(
195
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
196
196
  `normalizeProps`
197
197
  );
198
- const GUARD_REACTIVE_PROPS = Symbol(
198
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
199
199
  `guardReactiveProps`
200
200
  );
201
- const TO_HANDLERS = Symbol(`toHandlers` );
202
- const CAMELIZE = Symbol(`camelize` );
203
- const CAPITALIZE = Symbol(`capitalize` );
204
- const TO_HANDLER_KEY = Symbol(
201
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` );
202
+ const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` );
203
+ const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` );
204
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
205
205
  `toHandlerKey`
206
206
  );
207
- const SET_BLOCK_TRACKING = Symbol(
207
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
208
208
  `setBlockTracking`
209
209
  );
210
- const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
211
- const POP_SCOPE_ID = Symbol(`popScopeId` );
212
- const WITH_CTX = Symbol(`withCtx` );
213
- const UNREF = Symbol(`unref` );
214
- const IS_REF = Symbol(`isRef` );
215
- const WITH_MEMO = Symbol(`withMemo` );
216
- const IS_MEMO_SAME = Symbol(`isMemoSame` );
210
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` );
211
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` );
212
+ const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` );
213
+ const UNREF = /* @__PURE__ */ Symbol(`unref` );
214
+ const IS_REF = /* @__PURE__ */ Symbol(`isRef` );
215
+ const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` );
216
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` );
217
217
  const helperNameMap = {
218
218
  [FRAGMENT]: `Fragment`,
219
219
  [TELEPORT]: `Teleport`,
@@ -637,14 +637,28 @@ class Tokenizer {
637
637
  getPos(index) {
638
638
  let line = 1;
639
639
  let column = index + 1;
640
- for (let i = this.newlines.length - 1; i >= 0; i--) {
641
- const newlineIndex = this.newlines[i];
642
- if (index > newlineIndex) {
643
- line = i + 2;
644
- column = index - newlineIndex;
645
- break;
640
+ const length = this.newlines.length;
641
+ let j = -1;
642
+ if (length > 100) {
643
+ let l = -1;
644
+ let r = length;
645
+ while (l + 1 < r) {
646
+ const m = l + r >>> 1;
647
+ this.newlines[m] < index ? l = m : r = m;
648
+ }
649
+ j = l;
650
+ } else {
651
+ for (let i = length - 1; i >= 0; i--) {
652
+ if (index > this.newlines[i]) {
653
+ j = i;
654
+ break;
655
+ }
646
656
  }
647
657
  }
658
+ if (j >= 0) {
659
+ line = j + 2;
660
+ column = index - this.newlines[j];
661
+ }
648
662
  return {
649
663
  column,
650
664
  line,
@@ -1521,24 +1535,26 @@ const ErrorCodes = {
1521
1535
  "43": "X_V_MODEL_ON_SCOPE_VARIABLE",
1522
1536
  "X_V_MODEL_ON_PROPS": 44,
1523
1537
  "44": "X_V_MODEL_ON_PROPS",
1524
- "X_INVALID_EXPRESSION": 45,
1525
- "45": "X_INVALID_EXPRESSION",
1526
- "X_KEEP_ALIVE_INVALID_CHILDREN": 46,
1527
- "46": "X_KEEP_ALIVE_INVALID_CHILDREN",
1528
- "X_PREFIX_ID_NOT_SUPPORTED": 47,
1529
- "47": "X_PREFIX_ID_NOT_SUPPORTED",
1530
- "X_MODULE_MODE_NOT_SUPPORTED": 48,
1531
- "48": "X_MODULE_MODE_NOT_SUPPORTED",
1532
- "X_CACHE_HANDLER_NOT_SUPPORTED": 49,
1533
- "49": "X_CACHE_HANDLER_NOT_SUPPORTED",
1534
- "X_SCOPE_ID_NOT_SUPPORTED": 50,
1535
- "50": "X_SCOPE_ID_NOT_SUPPORTED",
1536
- "X_VNODE_HOOKS": 51,
1537
- "51": "X_VNODE_HOOKS",
1538
- "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 52,
1539
- "52": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1540
- "__EXTEND_POINT__": 53,
1541
- "53": "__EXTEND_POINT__"
1538
+ "X_V_MODEL_ON_CONST": 45,
1539
+ "45": "X_V_MODEL_ON_CONST",
1540
+ "X_INVALID_EXPRESSION": 46,
1541
+ "46": "X_INVALID_EXPRESSION",
1542
+ "X_KEEP_ALIVE_INVALID_CHILDREN": 47,
1543
+ "47": "X_KEEP_ALIVE_INVALID_CHILDREN",
1544
+ "X_PREFIX_ID_NOT_SUPPORTED": 48,
1545
+ "48": "X_PREFIX_ID_NOT_SUPPORTED",
1546
+ "X_MODULE_MODE_NOT_SUPPORTED": 49,
1547
+ "49": "X_MODULE_MODE_NOT_SUPPORTED",
1548
+ "X_CACHE_HANDLER_NOT_SUPPORTED": 50,
1549
+ "50": "X_CACHE_HANDLER_NOT_SUPPORTED",
1550
+ "X_SCOPE_ID_NOT_SUPPORTED": 51,
1551
+ "51": "X_SCOPE_ID_NOT_SUPPORTED",
1552
+ "X_VNODE_HOOKS": 52,
1553
+ "52": "X_VNODE_HOOKS",
1554
+ "X_V_BIND_INVALID_SAME_NAME_ARGUMENT": 53,
1555
+ "53": "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
1556
+ "__EXTEND_POINT__": 54,
1557
+ "54": "__EXTEND_POINT__"
1542
1558
  };
1543
1559
  const errorMessages = {
1544
1560
  // parse errors
@@ -1579,7 +1595,7 @@ const errorMessages = {
1579
1595
  [32]: `v-for has invalid expression.`,
1580
1596
  [33]: `<template v-for> key should be placed on the <template> tag.`,
1581
1597
  [34]: `v-bind is missing expression.`,
1582
- [52]: `v-bind with same-name shorthand only allows static argument.`,
1598
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
1583
1599
  [35]: `v-on is missing expression.`,
1584
1600
  [36]: `Unexpected custom directive on <slot> outlet.`,
1585
1601
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -1591,16 +1607,17 @@ const errorMessages = {
1591
1607
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
1592
1608
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
1593
1609
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
1594
- [45]: `Error parsing JavaScript expression: `,
1595
- [46]: `<KeepAlive> expects exactly one child component.`,
1596
- [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1610
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
1611
+ [46]: `Error parsing JavaScript expression: `,
1612
+ [47]: `<KeepAlive> expects exactly one child component.`,
1613
+ [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
1597
1614
  // generic errors
1598
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1599
- [48]: `ES module mode is not supported in this build of compiler.`,
1600
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1601
- [50]: `"scopeId" option is only supported in module mode.`,
1615
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
1616
+ [49]: `ES module mode is not supported in this build of compiler.`,
1617
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
1618
+ [51]: `"scopeId" option is only supported in module mode.`,
1602
1619
  // just to fulfill types
1603
- [53]: ``
1620
+ [54]: ``
1604
1621
  };
1605
1622
 
1606
1623
  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
@@ -2055,6 +2072,20 @@ function getMemoedVNodeCall(node) {
2055
2072
  }
2056
2073
  }
2057
2074
  const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;
2075
+ function isAllWhitespace(str) {
2076
+ for (let i = 0; i < str.length; i++) {
2077
+ if (!isWhitespace(str.charCodeAt(i))) {
2078
+ return false;
2079
+ }
2080
+ }
2081
+ return true;
2082
+ }
2083
+ function isWhitespaceText(node) {
2084
+ return node.type === 2 && isAllWhitespace(node.content) || node.type === 12 && isWhitespaceText(node.content);
2085
+ }
2086
+ function isCommentOrWhitespace(node) {
2087
+ return node.type === 3 || isWhitespaceText(node);
2088
+ }
2058
2089
 
2059
2090
  const defaultParserOptions = {
2060
2091
  parseMode: "base",
@@ -2677,14 +2708,6 @@ function condenseWhitespace(nodes) {
2677
2708
  }
2678
2709
  return removedWhitespace ? nodes.filter(Boolean) : nodes;
2679
2710
  }
2680
- function isAllWhitespace(str) {
2681
- for (let i = 0; i < str.length; i++) {
2682
- if (!isWhitespace(str.charCodeAt(i))) {
2683
- return false;
2684
- }
2685
- }
2686
- return true;
2687
- }
2688
2711
  function hasNewlineChar(str) {
2689
2712
  for (let i = 0; i < str.length; i++) {
2690
2713
  const c = str.charCodeAt(i);
@@ -3997,7 +4020,7 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
3997
4020
  }
3998
4021
  context.onError(
3999
4022
  createCompilerError(
4000
- 45,
4023
+ 46,
4001
4024
  node.loc,
4002
4025
  void 0,
4003
4026
  message
@@ -4113,13 +4136,11 @@ function processIf(node, dir, context, processCodegen) {
4113
4136
  let i = siblings.indexOf(node);
4114
4137
  while (i-- >= -1) {
4115
4138
  const sibling = siblings[i];
4116
- if (sibling && sibling.type === 3) {
4117
- context.removeNode(sibling);
4118
- comments.unshift(sibling);
4119
- continue;
4120
- }
4121
- if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
4139
+ if (sibling && isCommentOrWhitespace(sibling)) {
4122
4140
  context.removeNode(sibling);
4141
+ if (sibling.type === 3) {
4142
+ comments.unshift(sibling);
4143
+ }
4123
4144
  continue;
4124
4145
  }
4125
4146
  if (sibling && sibling.type === 9) {
@@ -4591,7 +4612,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
4591
4612
  let prev;
4592
4613
  while (j--) {
4593
4614
  prev = children[j];
4594
- if (prev.type !== 3 && isNonWhitespaceContent(prev)) {
4615
+ if (!isCommentOrWhitespace(prev)) {
4595
4616
  break;
4596
4617
  }
4597
4618
  }
@@ -4669,7 +4690,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
4669
4690
  } else if (implicitDefaultChildren.length && // #3766
4670
4691
  // with whitespace: 'preserve', whitespaces between slots will end up in
4671
4692
  // implicitDefaultChildren. Ignore if all implicit children are whitespaces.
4672
- implicitDefaultChildren.some((node2) => isNonWhitespaceContent(node2))) {
4693
+ !implicitDefaultChildren.every(isWhitespaceText)) {
4673
4694
  if (hasNamedDefaultSlot) {
4674
4695
  context.onError(
4675
4696
  createCompilerError(
@@ -4742,11 +4763,6 @@ function hasForwardedSlots(children) {
4742
4763
  }
4743
4764
  return false;
4744
4765
  }
4745
- function isNonWhitespaceContent(node) {
4746
- if (node.type !== 2 && node.type !== 12)
4747
- return true;
4748
- return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
4749
- }
4750
4766
 
4751
4767
  const directiveImportMap = /* @__PURE__ */ new WeakMap();
4752
4768
  const transformElement = (node, context) => {
@@ -4798,7 +4814,7 @@ const transformElement = (node, context) => {
4798
4814
  patchFlag |= 1024;
4799
4815
  if (node.children.length > 1) {
4800
4816
  context.onError(
4801
- createCompilerError(46, {
4817
+ createCompilerError(47, {
4802
4818
  start: node.children[0].loc.start,
4803
4819
  end: node.children[node.children.length - 1].loc.end,
4804
4820
  source: ""
@@ -5385,7 +5401,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
5385
5401
  if (arg.isStatic) {
5386
5402
  let rawName = arg.content;
5387
5403
  if (rawName.startsWith("vnode")) {
5388
- context.onError(createCompilerError(51, arg.loc));
5404
+ context.onError(createCompilerError(52, arg.loc));
5389
5405
  }
5390
5406
  if (rawName.startsWith("vue:")) {
5391
5407
  rawName = `vnode-${rawName.slice(4)}`;
@@ -5618,6 +5634,10 @@ const transformModel$1 = (dir, node, context) => {
5618
5634
  context.onError(createCompilerError(44, exp.loc));
5619
5635
  return createTransformProps();
5620
5636
  }
5637
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
5638
+ context.onError(createCompilerError(45, exp.loc));
5639
+ return createTransformProps();
5640
+ }
5621
5641
  if (!expString.trim() || !isMemberExpression(exp) && true) {
5622
5642
  context.onError(
5623
5643
  createCompilerError(42, exp.loc)
@@ -5846,7 +5866,7 @@ const transformVBindShorthand = (node, context) => {
5846
5866
  if (arg.type !== 4 || !arg.isStatic) {
5847
5867
  context.onError(
5848
5868
  createCompilerError(
5849
- 52,
5869
+ 53,
5850
5870
  arg.loc
5851
5871
  )
5852
5872
  );
@@ -5890,17 +5910,17 @@ function baseCompile(source, options = {}) {
5890
5910
  const isModuleMode = options.mode === "module";
5891
5911
  {
5892
5912
  if (options.prefixIdentifiers === true) {
5893
- onError(createCompilerError(47));
5894
- } else if (isModuleMode) {
5895
5913
  onError(createCompilerError(48));
5914
+ } else if (isModuleMode) {
5915
+ onError(createCompilerError(49));
5896
5916
  }
5897
5917
  }
5898
5918
  const prefixIdentifiers = false;
5899
5919
  if (options.cacheHandlers) {
5900
- onError(createCompilerError(49));
5920
+ onError(createCompilerError(50));
5901
5921
  }
5902
5922
  if (options.scopeId && !isModuleMode) {
5903
- onError(createCompilerError(50));
5923
+ onError(createCompilerError(51));
5904
5924
  }
5905
5925
  const resolvedOptions = extend({}, options, {
5906
5926
  prefixIdentifiers
@@ -5941,26 +5961,26 @@ const BindingTypes = {
5941
5961
 
5942
5962
  const noopDirectiveTransform = () => ({ props: [] });
5943
5963
 
5944
- const V_MODEL_RADIO = Symbol(`vModelRadio` );
5945
- const V_MODEL_CHECKBOX = Symbol(
5964
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` );
5965
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
5946
5966
  `vModelCheckbox`
5947
5967
  );
5948
- const V_MODEL_TEXT = Symbol(`vModelText` );
5949
- const V_MODEL_SELECT = Symbol(
5968
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` );
5969
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
5950
5970
  `vModelSelect`
5951
5971
  );
5952
- const V_MODEL_DYNAMIC = Symbol(
5972
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
5953
5973
  `vModelDynamic`
5954
5974
  );
5955
- const V_ON_WITH_MODIFIERS = Symbol(
5975
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
5956
5976
  `vOnModifiersGuard`
5957
5977
  );
5958
- const V_ON_WITH_KEYS = Symbol(
5978
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
5959
5979
  `vOnKeysGuard`
5960
5980
  );
5961
- const V_SHOW = Symbol(`vShow` );
5962
- const TRANSITION = Symbol(`Transition` );
5963
- const TRANSITION_GROUP = Symbol(
5981
+ const V_SHOW = /* @__PURE__ */ Symbol(`vShow` );
5982
+ const TRANSITION = /* @__PURE__ */ Symbol(`Transition` );
5983
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
5964
5984
  `TransitionGroup`
5965
5985
  );
5966
5986
  registerRuntimeHelpers({
@@ -6071,55 +6091,55 @@ function createDOMCompilerError(code, loc) {
6071
6091
  );
6072
6092
  }
6073
6093
  const DOMErrorCodes = {
6074
- "X_V_HTML_NO_EXPRESSION": 53,
6075
- "53": "X_V_HTML_NO_EXPRESSION",
6076
- "X_V_HTML_WITH_CHILDREN": 54,
6077
- "54": "X_V_HTML_WITH_CHILDREN",
6078
- "X_V_TEXT_NO_EXPRESSION": 55,
6079
- "55": "X_V_TEXT_NO_EXPRESSION",
6080
- "X_V_TEXT_WITH_CHILDREN": 56,
6081
- "56": "X_V_TEXT_WITH_CHILDREN",
6082
- "X_V_MODEL_ON_INVALID_ELEMENT": 57,
6083
- "57": "X_V_MODEL_ON_INVALID_ELEMENT",
6084
- "X_V_MODEL_ARG_ON_ELEMENT": 58,
6085
- "58": "X_V_MODEL_ARG_ON_ELEMENT",
6086
- "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
6087
- "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
6088
- "X_V_MODEL_UNNECESSARY_VALUE": 60,
6089
- "60": "X_V_MODEL_UNNECESSARY_VALUE",
6090
- "X_V_SHOW_NO_EXPRESSION": 61,
6091
- "61": "X_V_SHOW_NO_EXPRESSION",
6092
- "X_TRANSITION_INVALID_CHILDREN": 62,
6093
- "62": "X_TRANSITION_INVALID_CHILDREN",
6094
- "X_IGNORED_SIDE_EFFECT_TAG": 63,
6095
- "63": "X_IGNORED_SIDE_EFFECT_TAG",
6096
- "__EXTEND_POINT__": 64,
6097
- "64": "__EXTEND_POINT__"
6094
+ "X_V_HTML_NO_EXPRESSION": 54,
6095
+ "54": "X_V_HTML_NO_EXPRESSION",
6096
+ "X_V_HTML_WITH_CHILDREN": 55,
6097
+ "55": "X_V_HTML_WITH_CHILDREN",
6098
+ "X_V_TEXT_NO_EXPRESSION": 56,
6099
+ "56": "X_V_TEXT_NO_EXPRESSION",
6100
+ "X_V_TEXT_WITH_CHILDREN": 57,
6101
+ "57": "X_V_TEXT_WITH_CHILDREN",
6102
+ "X_V_MODEL_ON_INVALID_ELEMENT": 58,
6103
+ "58": "X_V_MODEL_ON_INVALID_ELEMENT",
6104
+ "X_V_MODEL_ARG_ON_ELEMENT": 59,
6105
+ "59": "X_V_MODEL_ARG_ON_ELEMENT",
6106
+ "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60,
6107
+ "60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
6108
+ "X_V_MODEL_UNNECESSARY_VALUE": 61,
6109
+ "61": "X_V_MODEL_UNNECESSARY_VALUE",
6110
+ "X_V_SHOW_NO_EXPRESSION": 62,
6111
+ "62": "X_V_SHOW_NO_EXPRESSION",
6112
+ "X_TRANSITION_INVALID_CHILDREN": 63,
6113
+ "63": "X_TRANSITION_INVALID_CHILDREN",
6114
+ "X_IGNORED_SIDE_EFFECT_TAG": 64,
6115
+ "64": "X_IGNORED_SIDE_EFFECT_TAG",
6116
+ "__EXTEND_POINT__": 65,
6117
+ "65": "__EXTEND_POINT__"
6098
6118
  };
6099
6119
  const DOMErrorMessages = {
6100
- [53]: `v-html is missing expression.`,
6101
- [54]: `v-html will override element children.`,
6102
- [55]: `v-text is missing expression.`,
6103
- [56]: `v-text will override element children.`,
6104
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
6105
- [58]: `v-model argument is not supported on plain elements.`,
6106
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
6107
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
6108
- [61]: `v-show is missing expression.`,
6109
- [62]: `<Transition> expects exactly one child element or component.`,
6110
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
6120
+ [54]: `v-html is missing expression.`,
6121
+ [55]: `v-html will override element children.`,
6122
+ [56]: `v-text is missing expression.`,
6123
+ [57]: `v-text will override element children.`,
6124
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
6125
+ [59]: `v-model argument is not supported on plain elements.`,
6126
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
6127
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
6128
+ [62]: `v-show is missing expression.`,
6129
+ [63]: `<Transition> expects exactly one child element or component.`,
6130
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
6111
6131
  };
6112
6132
 
6113
6133
  const transformVHtml = (dir, node, context) => {
6114
6134
  const { exp, loc } = dir;
6115
6135
  if (!exp) {
6116
6136
  context.onError(
6117
- createDOMCompilerError(53, loc)
6137
+ createDOMCompilerError(54, loc)
6118
6138
  );
6119
6139
  }
6120
6140
  if (node.children.length) {
6121
6141
  context.onError(
6122
- createDOMCompilerError(54, loc)
6142
+ createDOMCompilerError(55, loc)
6123
6143
  );
6124
6144
  node.children.length = 0;
6125
6145
  }
@@ -6137,12 +6157,12 @@ const transformVText = (dir, node, context) => {
6137
6157
  const { exp, loc } = dir;
6138
6158
  if (!exp) {
6139
6159
  context.onError(
6140
- createDOMCompilerError(55, loc)
6160
+ createDOMCompilerError(56, loc)
6141
6161
  );
6142
6162
  }
6143
6163
  if (node.children.length) {
6144
6164
  context.onError(
6145
- createDOMCompilerError(56, loc)
6165
+ createDOMCompilerError(57, loc)
6146
6166
  );
6147
6167
  node.children.length = 0;
6148
6168
  }
@@ -6168,7 +6188,7 @@ const transformModel = (dir, node, context) => {
6168
6188
  if (dir.arg) {
6169
6189
  context.onError(
6170
6190
  createDOMCompilerError(
6171
- 58,
6191
+ 59,
6172
6192
  dir.arg.loc
6173
6193
  )
6174
6194
  );
@@ -6178,7 +6198,7 @@ const transformModel = (dir, node, context) => {
6178
6198
  if (value && isStaticArgOf(value.arg, "value")) {
6179
6199
  context.onError(
6180
6200
  createDOMCompilerError(
6181
- 60,
6201
+ 61,
6182
6202
  value.loc
6183
6203
  )
6184
6204
  );
@@ -6206,7 +6226,7 @@ const transformModel = (dir, node, context) => {
6206
6226
  isInvalidType = true;
6207
6227
  context.onError(
6208
6228
  createDOMCompilerError(
6209
- 59,
6229
+ 60,
6210
6230
  dir.loc
6211
6231
  )
6212
6232
  );
@@ -6232,7 +6252,7 @@ const transformModel = (dir, node, context) => {
6232
6252
  } else {
6233
6253
  context.onError(
6234
6254
  createDOMCompilerError(
6235
- 57,
6255
+ 58,
6236
6256
  dir.loc
6237
6257
  )
6238
6258
  );
@@ -6340,7 +6360,7 @@ const transformShow = (dir, node, context) => {
6340
6360
  const { exp, loc } = dir;
6341
6361
  if (!exp) {
6342
6362
  context.onError(
6343
- createDOMCompilerError(61, loc)
6363
+ createDOMCompilerError(62, loc)
6344
6364
  );
6345
6365
  }
6346
6366
  return {
@@ -6360,7 +6380,7 @@ const transformTransition = (node, context) => {
6360
6380
  if (hasMultipleChildren(node)) {
6361
6381
  context.onError(
6362
6382
  createDOMCompilerError(
6363
- 62,
6383
+ 63,
6364
6384
  {
6365
6385
  start: node.children[0].loc.start,
6366
6386
  end: node.children[node.children.length - 1].loc.end,
@@ -6389,7 +6409,7 @@ const transformTransition = (node, context) => {
6389
6409
  };
6390
6410
  function hasMultipleChildren(node) {
6391
6411
  const children = node.children = node.children.filter(
6392
- (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
6412
+ (c) => !isCommentOrWhitespace(c)
6393
6413
  );
6394
6414
  const child = children[0];
6395
6415
  return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
@@ -6399,7 +6419,7 @@ const ignoreSideEffectTags = (node, context) => {
6399
6419
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
6400
6420
  context.onError(
6401
6421
  createDOMCompilerError(
6402
- 63,
6422
+ 64,
6403
6423
  node.loc
6404
6424
  )
6405
6425
  );
@@ -6621,4 +6641,4 @@ function parse(template, options = {}) {
6621
6641
  return baseParse(template, extend({}, parserOptions, options));
6622
6642
  }
6623
6643
 
6624
- export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, TS_NODE_TYPES, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVPre, isVSlot, locStub, noopDirectiveTransform, parse, parserOptions, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel$1 as transformModel, transformOn$1 as transformOn, transformStyle, transformVBindShorthand, traverseNode, unwrapTSNode, validFirstIdentCharRE, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
6644
+ export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, TS_NODE_TYPES, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, errorMessages, extractIdentifiers, findDir, findProp, forAliasRE, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isAllWhitespace, isCommentOrWhitespace, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVPre, isVSlot, isWhitespaceText, locStub, noopDirectiveTransform, parse, parserOptions, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel$1 as transformModel, transformOn$1 as transformOn, transformStyle, transformVBindShorthand, traverseNode, unwrapTSNode, validFirstIdentCharRE, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };