@vue/compat 3.3.0-alpha.3 → 3.3.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,96 @@ var Vue = (function () {
10
10
  return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
11
11
  }
12
12
 
13
+ const EMPTY_OBJ = Object.freeze({}) ;
14
+ const EMPTY_ARR = Object.freeze([]) ;
15
+ const NOOP = () => {
16
+ };
17
+ const NO = () => false;
18
+ const onRE = /^on[^a-z]/;
19
+ const isOn = (key) => onRE.test(key);
20
+ const isModelListener = (key) => key.startsWith("onUpdate:");
21
+ const extend = Object.assign;
22
+ const remove = (arr, el) => {
23
+ const i = arr.indexOf(el);
24
+ if (i > -1) {
25
+ arr.splice(i, 1);
26
+ }
27
+ };
28
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
29
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
30
+ const isArray = Array.isArray;
31
+ const isMap = (val) => toTypeString(val) === "[object Map]";
32
+ const isSet = (val) => toTypeString(val) === "[object Set]";
33
+ const isDate = (val) => toTypeString(val) === "[object Date]";
34
+ const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
35
+ const isFunction = (val) => typeof val === "function";
36
+ const isString = (val) => typeof val === "string";
37
+ const isSymbol = (val) => typeof val === "symbol";
38
+ const isObject = (val) => val !== null && typeof val === "object";
39
+ const isPromise = (val) => {
40
+ return isObject(val) && isFunction(val.then) && isFunction(val.catch);
41
+ };
42
+ const objectToString = Object.prototype.toString;
43
+ const toTypeString = (value) => objectToString.call(value);
44
+ const toRawType = (value) => {
45
+ return toTypeString(value).slice(8, -1);
46
+ };
47
+ const isPlainObject = (val) => toTypeString(val) === "[object Object]";
48
+ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
49
+ const isReservedProp = /* @__PURE__ */ makeMap(
50
+ // the leading comma is intentional so empty string "" is also included
51
+ ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
52
+ );
53
+ const isBuiltInDirective = /* @__PURE__ */ makeMap(
54
+ "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
55
+ );
56
+ const cacheStringFunction = (fn) => {
57
+ const cache = /* @__PURE__ */ Object.create(null);
58
+ return (str) => {
59
+ const hit = cache[str];
60
+ return hit || (cache[str] = fn(str));
61
+ };
62
+ };
63
+ const camelizeRE = /-(\w)/g;
64
+ const camelize = cacheStringFunction((str) => {
65
+ return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
66
+ });
67
+ const hyphenateRE = /\B([A-Z])/g;
68
+ const hyphenate = cacheStringFunction(
69
+ (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
70
+ );
71
+ const capitalize = cacheStringFunction(
72
+ (str) => str.charAt(0).toUpperCase() + str.slice(1)
73
+ );
74
+ const toHandlerKey = cacheStringFunction(
75
+ (str) => str ? `on${capitalize(str)}` : ``
76
+ );
77
+ const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
78
+ const invokeArrayFns = (fns, arg) => {
79
+ for (let i = 0; i < fns.length; i++) {
80
+ fns[i](arg);
81
+ }
82
+ };
83
+ const def = (obj, key, value) => {
84
+ Object.defineProperty(obj, key, {
85
+ configurable: true,
86
+ enumerable: false,
87
+ value
88
+ });
89
+ };
90
+ const looseToNumber = (val) => {
91
+ const n = parseFloat(val);
92
+ return isNaN(n) ? val : n;
93
+ };
94
+ const toNumber = (val) => {
95
+ const n = isString(val) ? Number(val) : NaN;
96
+ return isNaN(n) ? val : n;
97
+ };
98
+ let _globalThis;
99
+ const getGlobalThis = () => {
100
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
101
+ };
102
+
13
103
  const PatchFlagNames = {
14
104
  [1]: `TEXT`,
15
105
  [2]: `CLASS`,
@@ -229,96 +319,6 @@ var Vue = (function () {
229
319
  return val;
230
320
  };
231
321
 
232
- const EMPTY_OBJ = Object.freeze({}) ;
233
- const EMPTY_ARR = Object.freeze([]) ;
234
- const NOOP = () => {
235
- };
236
- const NO = () => false;
237
- const onRE = /^on[^a-z]/;
238
- const isOn = (key) => onRE.test(key);
239
- const isModelListener = (key) => key.startsWith("onUpdate:");
240
- const extend = Object.assign;
241
- const remove = (arr, el) => {
242
- const i = arr.indexOf(el);
243
- if (i > -1) {
244
- arr.splice(i, 1);
245
- }
246
- };
247
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
248
- const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
249
- const isArray = Array.isArray;
250
- const isMap = (val) => toTypeString(val) === "[object Map]";
251
- const isSet = (val) => toTypeString(val) === "[object Set]";
252
- const isDate = (val) => toTypeString(val) === "[object Date]";
253
- const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
254
- const isFunction = (val) => typeof val === "function";
255
- const isString = (val) => typeof val === "string";
256
- const isSymbol = (val) => typeof val === "symbol";
257
- const isObject = (val) => val !== null && typeof val === "object";
258
- const isPromise = (val) => {
259
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
260
- };
261
- const objectToString = Object.prototype.toString;
262
- const toTypeString = (value) => objectToString.call(value);
263
- const toRawType = (value) => {
264
- return toTypeString(value).slice(8, -1);
265
- };
266
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
267
- const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
268
- const isReservedProp = /* @__PURE__ */ makeMap(
269
- // the leading comma is intentional so empty string "" is also included
270
- ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
271
- );
272
- const isBuiltInDirective = /* @__PURE__ */ makeMap(
273
- "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
274
- );
275
- const cacheStringFunction = (fn) => {
276
- const cache = /* @__PURE__ */ Object.create(null);
277
- return (str) => {
278
- const hit = cache[str];
279
- return hit || (cache[str] = fn(str));
280
- };
281
- };
282
- const camelizeRE = /-(\w)/g;
283
- const camelize = cacheStringFunction((str) => {
284
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
285
- });
286
- const hyphenateRE = /\B([A-Z])/g;
287
- const hyphenate = cacheStringFunction(
288
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
289
- );
290
- const capitalize = cacheStringFunction(
291
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
292
- );
293
- const toHandlerKey = cacheStringFunction(
294
- (str) => str ? `on${capitalize(str)}` : ``
295
- );
296
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
297
- const invokeArrayFns = (fns, arg) => {
298
- for (let i = 0; i < fns.length; i++) {
299
- fns[i](arg);
300
- }
301
- };
302
- const def = (obj, key, value) => {
303
- Object.defineProperty(obj, key, {
304
- configurable: true,
305
- enumerable: false,
306
- value
307
- });
308
- };
309
- const looseToNumber = (val) => {
310
- const n = parseFloat(val);
311
- return isNaN(n) ? val : n;
312
- };
313
- const toNumber = (val) => {
314
- const n = isString(val) ? Number(val) : NaN;
315
- return isNaN(n) ? val : n;
316
- };
317
- let _globalThis;
318
- const getGlobalThis = () => {
319
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
320
- };
321
-
322
322
  function warn$1(msg, ...args) {
323
323
  console.warn(`[Vue warn] ${msg}`, ...args);
324
324
  }
@@ -1468,7 +1468,7 @@ var Vue = (function () {
1468
1468
  callWithErrorHandling(
1469
1469
  appWarnHandler,
1470
1470
  instance,
1471
- "11",
1471
+ 11,
1472
1472
  [
1473
1473
  msg + args.join(""),
1474
1474
  instance && instance.proxy,
@@ -1581,21 +1581,21 @@ var Vue = (function () {
1581
1581
  ["ec"]: "errorCaptured hook",
1582
1582
  ["rtc"]: "renderTracked hook",
1583
1583
  ["rtg"]: "renderTriggered hook",
1584
- ["0"]: "setup function",
1585
- ["1"]: "render function",
1586
- ["2"]: "watcher getter",
1587
- ["3"]: "watcher callback",
1588
- ["4"]: "watcher cleanup function",
1589
- ["5"]: "native event handler",
1590
- ["6"]: "component event handler",
1591
- ["7"]: "vnode hook",
1592
- ["8"]: "directive hook",
1593
- ["9"]: "transition hook",
1594
- ["10"]: "app errorHandler",
1595
- ["11"]: "app warnHandler",
1596
- ["12"]: "ref function",
1597
- ["13"]: "async component loader",
1598
- ["14"]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1584
+ [0]: "setup function",
1585
+ [1]: "render function",
1586
+ [2]: "watcher getter",
1587
+ [3]: "watcher callback",
1588
+ [4]: "watcher cleanup function",
1589
+ [5]: "native event handler",
1590
+ [6]: "component event handler",
1591
+ [7]: "vnode hook",
1592
+ [8]: "directive hook",
1593
+ [9]: "transition hook",
1594
+ [10]: "app errorHandler",
1595
+ [11]: "app warnHandler",
1596
+ [12]: "ref function",
1597
+ [13]: "async component loader",
1598
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1599
1599
  };
1600
1600
  function callWithErrorHandling(fn, instance, type, args) {
1601
1601
  let res;
@@ -1644,7 +1644,7 @@ var Vue = (function () {
1644
1644
  callWithErrorHandling(
1645
1645
  appErrorHandler,
1646
1646
  null,
1647
- "10",
1647
+ 10,
1648
1648
  [err, exposedInstance, errorInfo]
1649
1649
  );
1650
1650
  return;
@@ -1797,7 +1797,7 @@ var Vue = (function () {
1797
1797
  if (check(job)) {
1798
1798
  continue;
1799
1799
  }
1800
- callWithErrorHandling(job, null, "14");
1800
+ callWithErrorHandling(job, null, 14);
1801
1801
  }
1802
1802
  }
1803
1803
  } finally {
@@ -2415,7 +2415,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2415
2415
  callWithAsyncErrorHandling(
2416
2416
  cbs.map((cb) => cb.bind(instance.proxy)),
2417
2417
  instance,
2418
- "6",
2418
+ 6,
2419
2419
  args
2420
2420
  );
2421
2421
  }
@@ -2477,7 +2477,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2477
2477
  callWithErrorHandling(
2478
2478
  modelHandler,
2479
2479
  instance,
2480
- "6",
2480
+ 6,
2481
2481
  args
2482
2482
  );
2483
2483
  }
@@ -2549,7 +2549,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2549
2549
  callWithAsyncErrorHandling(
2550
2550
  handler,
2551
2551
  instance,
2552
- "6",
2552
+ 6,
2553
2553
  args
2554
2554
  );
2555
2555
  }
@@ -2564,7 +2564,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2564
2564
  callWithAsyncErrorHandling(
2565
2565
  onceHandler,
2566
2566
  instance,
2567
- "6",
2567
+ 6,
2568
2568
  args
2569
2569
  );
2570
2570
  }
@@ -2748,7 +2748,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
2748
2748
  }
2749
2749
  } catch (err) {
2750
2750
  blockStack.length = 0;
2751
- handleError(err, instance, "1");
2751
+ handleError(err, instance, 1);
2752
2752
  result = createVNode(Comment);
2753
2753
  }
2754
2754
  let root = result;
@@ -3275,7 +3275,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3275
3275
  if (delayEnter) {
3276
3276
  activeBranch.transition.afterLeave = () => {
3277
3277
  if (pendingId === suspense.pendingId) {
3278
- move(pendingBranch, container2, anchor2, "0");
3278
+ move(pendingBranch, container2, anchor2, 0);
3279
3279
  }
3280
3280
  };
3281
3281
  }
@@ -3285,7 +3285,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3285
3285
  unmount(activeBranch, parentComponent2, suspense, true);
3286
3286
  }
3287
3287
  if (!delayEnter) {
3288
- move(pendingBranch, container2, anchor2, "0");
3288
+ move(pendingBranch, container2, anchor2, 0);
3289
3289
  }
3290
3290
  }
3291
3291
  setActiveBranch(suspense, pendingBranch);
@@ -3363,7 +3363,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3363
3363
  }
3364
3364
  const hydratedEl = instance.vnode.el;
3365
3365
  instance.asyncDep.catch((err) => {
3366
- handleError(err, instance, "0");
3366
+ handleError(err, instance, 0);
3367
3367
  }).then((asyncSetupResult) => {
3368
3368
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
3369
3369
  return;
@@ -3607,14 +3607,14 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3607
3607
  } else if (isReactive(s)) {
3608
3608
  return traverse(s);
3609
3609
  } else if (isFunction(s)) {
3610
- return callWithErrorHandling(s, instance, "2");
3610
+ return callWithErrorHandling(s, instance, 2);
3611
3611
  } else {
3612
3612
  warnInvalidSource(s);
3613
3613
  }
3614
3614
  });
3615
3615
  } else if (isFunction(source)) {
3616
3616
  if (cb) {
3617
- getter = () => callWithErrorHandling(source, instance, "2");
3617
+ getter = () => callWithErrorHandling(source, instance, 2);
3618
3618
  } else {
3619
3619
  getter = () => {
3620
3620
  if (instance && instance.isUnmounted) {
@@ -3626,7 +3626,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3626
3626
  return callWithAsyncErrorHandling(
3627
3627
  source,
3628
3628
  instance,
3629
- "3",
3629
+ 3,
3630
3630
  [onCleanup]
3631
3631
  );
3632
3632
  };
@@ -3652,7 +3652,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3652
3652
  let cleanup;
3653
3653
  let onCleanup = (fn) => {
3654
3654
  cleanup = effect.onStop = () => {
3655
- callWithErrorHandling(fn, instance, "4");
3655
+ callWithErrorHandling(fn, instance, 4);
3656
3656
  };
3657
3657
  };
3658
3658
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -3668,7 +3668,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3668
3668
  if (cleanup) {
3669
3669
  cleanup();
3670
3670
  }
3671
- callWithAsyncErrorHandling(cb, instance, "3", [
3671
+ callWithAsyncErrorHandling(cb, instance, 3, [
3672
3672
  newValue,
3673
3673
  // pass undefined as the old value when it's changed for the first time
3674
3674
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
@@ -3946,7 +3946,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3946
3946
  hook && callWithAsyncErrorHandling(
3947
3947
  hook,
3948
3948
  instance,
3949
- "9",
3949
+ 9,
3950
3950
  args
3951
3951
  );
3952
3952
  };
@@ -4178,7 +4178,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4178
4178
  handleError(
4179
4179
  err,
4180
4180
  instance,
4181
- "13",
4181
+ 13,
4182
4182
  !errorComponent
4183
4183
  /* do not throw in dev if user provided error component */
4184
4184
  );
@@ -4277,7 +4277,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4277
4277
  const storageContainer = createElement("div");
4278
4278
  sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
4279
4279
  const instance2 = vnode.component;
4280
- move(vnode, container, anchor, "0", parentSuspense);
4280
+ move(vnode, container, anchor, 0, parentSuspense);
4281
4281
  patch(
4282
4282
  instance2.vnode,
4283
4283
  vnode,
@@ -4305,7 +4305,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4305
4305
  };
4306
4306
  sharedContext.deactivate = (vnode) => {
4307
4307
  const instance2 = vnode.component;
4308
- move(vnode, storageContainer, null, "1", parentSuspense);
4308
+ move(vnode, storageContainer, null, 1, parentSuspense);
4309
4309
  queuePostRenderEffect(() => {
4310
4310
  if (instance2.da) {
4311
4311
  invokeArrayFns(instance2.da);
@@ -4663,7 +4663,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4663
4663
  }
4664
4664
  if (hook) {
4665
4665
  pauseTracking();
4666
- callWithAsyncErrorHandling(hook, instance, "8", [
4666
+ callWithAsyncErrorHandling(hook, instance, 8, [
4667
4667
  vnode.el,
4668
4668
  binding,
4669
4669
  vnode,
@@ -4680,7 +4680,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4680
4680
  function resolveComponent(name, maybeSelfReference) {
4681
4681
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4682
4682
  }
4683
- const NULL_DYNAMIC_COMPONENT = Symbol();
4683
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4684
4684
  function resolveDynamicComponent(component) {
4685
4685
  if (isString(component)) {
4686
4686
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -6646,7 +6646,7 @@ If this is a native custom element, make sure to exclude it from component resol
6646
6646
  return vm;
6647
6647
  }
6648
6648
  }
6649
- Vue.version = `2.6.14-compat:${"3.3.0-alpha.3"}`;
6649
+ Vue.version = `2.6.14-compat:${"3.3.0-alpha.5"}`;
6650
6650
  Vue.config = singletonApp.config;
6651
6651
  Vue.use = (p, ...options) => {
6652
6652
  if (p && isFunction(p.install)) {
@@ -7227,7 +7227,7 @@ If you want to remount the same app, move your app creation logic into a factory
7227
7227
  }
7228
7228
  }
7229
7229
  if (isFunction(ref)) {
7230
- callWithErrorHandling(ref, owner, "12", [value, refs]);
7230
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
7231
7231
  } else {
7232
7232
  const _isString = isString(ref);
7233
7233
  const _isRef = isRef(ref);
@@ -8900,7 +8900,7 @@ If you want to remount the same app, move your app creation logic into a factory
8900
8900
  );
8901
8901
  } else if (moved) {
8902
8902
  if (j < 0 || i !== increasingNewIndexSequence[j]) {
8903
- move(nextChild, container, anchor, "2");
8903
+ move(nextChild, container, anchor, 2);
8904
8904
  } else {
8905
8905
  j--;
8906
8906
  }
@@ -8934,9 +8934,9 @@ If you want to remount the same app, move your app creation logic into a factory
8934
8934
  moveStaticNode(vnode, container, anchor);
8935
8935
  return;
8936
8936
  }
8937
- const needTransition = moveType !== "2" && shapeFlag & 1 && transition;
8937
+ const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
8938
8938
  if (needTransition) {
8939
- if (moveType === "0") {
8939
+ if (moveType === 0) {
8940
8940
  transition.beforeEnter(el);
8941
8941
  hostInsert(el, container, anchor);
8942
8942
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
@@ -9343,7 +9343,7 @@ If you want to remount the same app, move your app creation logic into a factory
9343
9343
  container,
9344
9344
  mainAnchor,
9345
9345
  internals,
9346
- "1"
9346
+ 1
9347
9347
  );
9348
9348
  }
9349
9349
  } else {
@@ -9358,7 +9358,7 @@ If you want to remount the same app, move your app creation logic into a factory
9358
9358
  nextTarget,
9359
9359
  null,
9360
9360
  internals,
9361
- "0"
9361
+ 0
9362
9362
  );
9363
9363
  } else {
9364
9364
  warn(
@@ -9373,7 +9373,7 @@ If you want to remount the same app, move your app creation logic into a factory
9373
9373
  target,
9374
9374
  targetAnchor,
9375
9375
  internals,
9376
- "1"
9376
+ 1
9377
9377
  );
9378
9378
  }
9379
9379
  }
@@ -9404,12 +9404,12 @@ If you want to remount the same app, move your app creation logic into a factory
9404
9404
  move: moveTeleport,
9405
9405
  hydrate: hydrateTeleport
9406
9406
  };
9407
- function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = "2") {
9408
- if (moveType === "0") {
9407
+ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
9408
+ if (moveType === 0) {
9409
9409
  insert(vnode.targetAnchor, container, parentAnchor);
9410
9410
  }
9411
9411
  const { el, anchor, shapeFlag, children, props } = vnode;
9412
- const isReorder = moveType === "2";
9412
+ const isReorder = moveType === 2;
9413
9413
  if (isReorder) {
9414
9414
  insert(el, container, parentAnchor);
9415
9415
  }
@@ -9420,7 +9420,7 @@ If you want to remount the same app, move your app creation logic into a factory
9420
9420
  children[i],
9421
9421
  container,
9422
9422
  parentAnchor,
9423
- "2"
9423
+ 2
9424
9424
  );
9425
9425
  }
9426
9426
  }
@@ -9541,10 +9541,10 @@ If you want to remount the same app, move your app creation logic into a factory
9541
9541
  return comp;
9542
9542
  }
9543
9543
 
9544
- const Fragment = Symbol("Fragment" );
9545
- const Text = Symbol("Text" );
9546
- const Comment = Symbol("Comment" );
9547
- const Static = Symbol("Static" );
9544
+ const Fragment = Symbol.for("v-fgt");
9545
+ const Text = Symbol.for("v-txt");
9546
+ const Comment = Symbol.for("v-cmt");
9547
+ const Static = Symbol.for("v-stc");
9548
9548
  const blockStack = [];
9549
9549
  let currentBlock = null;
9550
9550
  function openBlock(disableTracking = false) {
@@ -9909,7 +9909,7 @@ Component that was made reactive: `,
9909
9909
  return ret;
9910
9910
  }
9911
9911
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
9912
- callWithAsyncErrorHandling(hook, instance, "7", [
9912
+ callWithAsyncErrorHandling(hook, instance, 7, [
9913
9913
  vnode,
9914
9914
  prevVNode
9915
9915
  ]);
@@ -10006,13 +10006,19 @@ Component that was made reactive: `,
10006
10006
  }
10007
10007
  let currentInstance = null;
10008
10008
  const getCurrentInstance = () => currentInstance || currentRenderingInstance;
10009
+ let internalSetCurrentInstance;
10010
+ {
10011
+ internalSetCurrentInstance = (i) => {
10012
+ currentInstance = i;
10013
+ };
10014
+ }
10009
10015
  const setCurrentInstance = (instance) => {
10010
- currentInstance = instance;
10016
+ internalSetCurrentInstance(instance);
10011
10017
  instance.scope.on();
10012
10018
  };
10013
10019
  const unsetCurrentInstance = () => {
10014
10020
  currentInstance && currentInstance.scope.off();
10015
- currentInstance = null;
10021
+ internalSetCurrentInstance(null);
10016
10022
  };
10017
10023
  const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
10018
10024
  function validateComponentName(name, config) {
@@ -10075,7 +10081,7 @@ Component that was made reactive: `,
10075
10081
  const setupResult = callWithErrorHandling(
10076
10082
  setup,
10077
10083
  instance,
10078
- "0",
10084
+ 0,
10079
10085
  [shallowReadonly(instance.props) , setupContext]
10080
10086
  );
10081
10087
  resetTracking();
@@ -10086,7 +10092,7 @@ Component that was made reactive: `,
10086
10092
  return setupResult.then((resolvedResult) => {
10087
10093
  handleSetupResult(instance, resolvedResult, isSSR);
10088
10094
  }).catch((e) => {
10089
- handleError(e, instance, "0");
10095
+ handleError(e, instance, 0);
10090
10096
  });
10091
10097
  } else {
10092
10098
  instance.asyncDep = setupResult;
@@ -10424,7 +10430,7 @@ Component that was made reactive: `,
10424
10430
  }
10425
10431
  }
10426
10432
 
10427
- const ssrContextKey = Symbol(`ssrContext` );
10433
+ const ssrContextKey = Symbol.for("v-scx");
10428
10434
  const useSSRContext = () => {
10429
10435
  {
10430
10436
  warn(`useSSRContext() is not supported in the global build.`);
@@ -10632,7 +10638,7 @@ Component that was made reactive: `,
10632
10638
  return true;
10633
10639
  }
10634
10640
 
10635
- const version = "3.3.0-alpha.3";
10641
+ const version = "3.3.0-alpha.5";
10636
10642
  const ssrUtils = null;
10637
10643
  const resolveFilter = resolveFilter$1 ;
10638
10644
  const _compatUtils = {
@@ -10964,7 +10970,7 @@ Component that was made reactive: `,
10964
10970
  callWithAsyncErrorHandling(
10965
10971
  patchStopImmediatePropagation(e, invoker.value),
10966
10972
  instance,
10967
- "5",
10973
+ 5,
10968
10974
  [e]
10969
10975
  );
10970
10976
  };
@@ -12430,63 +12436,63 @@ Make sure to use the production build (*.prod.js) when deploying for production.
12430
12436
  }
12431
12437
  const errorMessages = {
12432
12438
  // parse errors
12433
- ["0"]: "Illegal comment.",
12434
- ["1"]: "CDATA section is allowed only in XML context.",
12435
- ["2"]: "Duplicate attribute.",
12436
- ["3"]: "End tag cannot have attributes.",
12437
- ["4"]: "Illegal '/' in tags.",
12438
- ["5"]: "Unexpected EOF in tag.",
12439
- ["6"]: "Unexpected EOF in CDATA section.",
12440
- ["7"]: "Unexpected EOF in comment.",
12441
- ["8"]: "Unexpected EOF in script.",
12442
- ["9"]: "Unexpected EOF in tag.",
12443
- ["10"]: "Incorrectly closed comment.",
12444
- ["11"]: "Incorrectly opened comment.",
12445
- ["12"]: "Illegal tag name. Use '&lt;' to print '<'.",
12446
- ["13"]: "Attribute value was expected.",
12447
- ["14"]: "End tag name was expected.",
12448
- ["15"]: "Whitespace was expected.",
12449
- ["16"]: "Unexpected '<!--' in comment.",
12450
- ["17"]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
12451
- ["18"]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
12452
- ["19"]: "Attribute name cannot start with '='.",
12453
- ["21"]: "'<?' is allowed only in XML context.",
12454
- ["20"]: `Unexpected null character.`,
12455
- ["22"]: "Illegal '/' in tags.",
12439
+ [0]: "Illegal comment.",
12440
+ [1]: "CDATA section is allowed only in XML context.",
12441
+ [2]: "Duplicate attribute.",
12442
+ [3]: "End tag cannot have attributes.",
12443
+ [4]: "Illegal '/' in tags.",
12444
+ [5]: "Unexpected EOF in tag.",
12445
+ [6]: "Unexpected EOF in CDATA section.",
12446
+ [7]: "Unexpected EOF in comment.",
12447
+ [8]: "Unexpected EOF in script.",
12448
+ [9]: "Unexpected EOF in tag.",
12449
+ [10]: "Incorrectly closed comment.",
12450
+ [11]: "Incorrectly opened comment.",
12451
+ [12]: "Illegal tag name. Use '&lt;' to print '<'.",
12452
+ [13]: "Attribute value was expected.",
12453
+ [14]: "End tag name was expected.",
12454
+ [15]: "Whitespace was expected.",
12455
+ [16]: "Unexpected '<!--' in comment.",
12456
+ [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
12457
+ [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
12458
+ [19]: "Attribute name cannot start with '='.",
12459
+ [21]: "'<?' is allowed only in XML context.",
12460
+ [20]: `Unexpected null character.`,
12461
+ [22]: "Illegal '/' in tags.",
12456
12462
  // Vue-specific parse errors
12457
- ["23"]: "Invalid end tag.",
12458
- ["24"]: "Element is missing end tag.",
12459
- ["25"]: "Interpolation end sign was not found.",
12460
- ["27"]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
12461
- ["26"]: "Legal directive name was expected.",
12463
+ [23]: "Invalid end tag.",
12464
+ [24]: "Element is missing end tag.",
12465
+ [25]: "Interpolation end sign was not found.",
12466
+ [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
12467
+ [26]: "Legal directive name was expected.",
12462
12468
  // transform errors
12463
- ["28"]: `v-if/v-else-if is missing expression.`,
12464
- ["29"]: `v-if/else branches must use unique keys.`,
12465
- ["30"]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
12466
- ["31"]: `v-for is missing expression.`,
12467
- ["32"]: `v-for has invalid expression.`,
12468
- ["33"]: `<template v-for> key should be placed on the <template> tag.`,
12469
- ["34"]: `v-bind is missing expression.`,
12470
- ["35"]: `v-on is missing expression.`,
12471
- ["36"]: `Unexpected custom directive on <slot> outlet.`,
12472
- ["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.`,
12473
- ["38"]: `Duplicate slot names found. `,
12474
- ["39"]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
12475
- ["40"]: `v-slot can only be used on components or <template> tags.`,
12476
- ["41"]: `v-model is missing expression.`,
12477
- ["42"]: `v-model value must be a valid JavaScript member expression.`,
12478
- ["43"]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
12479
- ["44"]: `v-model cannot be used on a prop, because local prop bindings are not writable.
12469
+ [28]: `v-if/v-else-if is missing expression.`,
12470
+ [29]: `v-if/else branches must use unique keys.`,
12471
+ [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
12472
+ [31]: `v-for is missing expression.`,
12473
+ [32]: `v-for has invalid expression.`,
12474
+ [33]: `<template v-for> key should be placed on the <template> tag.`,
12475
+ [34]: `v-bind is missing expression.`,
12476
+ [35]: `v-on is missing expression.`,
12477
+ [36]: `Unexpected custom directive on <slot> outlet.`,
12478
+ [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.`,
12479
+ [38]: `Duplicate slot names found. `,
12480
+ [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
12481
+ [40]: `v-slot can only be used on components or <template> tags.`,
12482
+ [41]: `v-model is missing expression.`,
12483
+ [42]: `v-model value must be a valid JavaScript member expression.`,
12484
+ [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
12485
+ [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
12480
12486
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
12481
- ["45"]: `Error parsing JavaScript expression: `,
12482
- ["46"]: `<KeepAlive> expects exactly one child component.`,
12487
+ [45]: `Error parsing JavaScript expression: `,
12488
+ [46]: `<KeepAlive> expects exactly one child component.`,
12483
12489
  // generic errors
12484
- ["47"]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
12485
- ["48"]: `ES module mode is not supported in this build of compiler.`,
12486
- ["49"]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
12487
- ["50"]: `"scopeId" option is only supported in module mode.`,
12490
+ [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
12491
+ [48]: `ES module mode is not supported in this build of compiler.`,
12492
+ [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
12493
+ [50]: `"scopeId" option is only supported in module mode.`,
12488
12494
  // just to fulfill types
12489
- ["51"]: ``
12495
+ [51]: ``
12490
12496
  };
12491
12497
 
12492
12498
  const FRAGMENT = Symbol(`Fragment` );
@@ -12584,7 +12590,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12584
12590
  };
12585
12591
  function createRoot(children, loc = locStub) {
12586
12592
  return {
12587
- type: "0",
12593
+ type: 0,
12588
12594
  children,
12589
12595
  helpers: /* @__PURE__ */ new Set(),
12590
12596
  components: [],
@@ -12610,7 +12616,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12610
12616
  }
12611
12617
  }
12612
12618
  return {
12613
- type: "13",
12619
+ type: 13,
12614
12620
  tag,
12615
12621
  props,
12616
12622
  children,
@@ -12625,21 +12631,21 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12625
12631
  }
12626
12632
  function createArrayExpression(elements, loc = locStub) {
12627
12633
  return {
12628
- type: "17",
12634
+ type: 17,
12629
12635
  loc,
12630
12636
  elements
12631
12637
  };
12632
12638
  }
12633
12639
  function createObjectExpression(properties, loc = locStub) {
12634
12640
  return {
12635
- type: "15",
12641
+ type: 15,
12636
12642
  loc,
12637
12643
  properties
12638
12644
  };
12639
12645
  }
12640
12646
  function createObjectProperty(key, value) {
12641
12647
  return {
12642
- type: "16",
12648
+ type: 16,
12643
12649
  loc: locStub,
12644
12650
  key: isString(key) ? createSimpleExpression(key, true) : key,
12645
12651
  value
@@ -12647,23 +12653,23 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12647
12653
  }
12648
12654
  function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {
12649
12655
  return {
12650
- type: "4",
12656
+ type: 4,
12651
12657
  loc,
12652
12658
  content,
12653
12659
  isStatic,
12654
- constType: isStatic ? "3" : constType
12660
+ constType: isStatic ? 3 : constType
12655
12661
  };
12656
12662
  }
12657
12663
  function createCompoundExpression(children, loc = locStub) {
12658
12664
  return {
12659
- type: "8",
12665
+ type: 8,
12660
12666
  loc,
12661
12667
  children
12662
12668
  };
12663
12669
  }
12664
12670
  function createCallExpression(callee, args = [], loc = locStub) {
12665
12671
  return {
12666
- type: "14",
12672
+ type: 14,
12667
12673
  loc,
12668
12674
  callee,
12669
12675
  arguments: args
@@ -12671,7 +12677,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12671
12677
  }
12672
12678
  function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {
12673
12679
  return {
12674
- type: "18",
12680
+ type: 18,
12675
12681
  params,
12676
12682
  returns,
12677
12683
  newline,
@@ -12681,7 +12687,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12681
12687
  }
12682
12688
  function createConditionalExpression(test, consequent, alternate, newline = true) {
12683
12689
  return {
12684
- type: "19",
12690
+ type: 19,
12685
12691
  test,
12686
12692
  consequent,
12687
12693
  alternate,
@@ -12691,7 +12697,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12691
12697
  }
12692
12698
  function createCacheExpression(index, value, isVNode = false) {
12693
12699
  return {
12694
- type: "20",
12700
+ type: 20,
12695
12701
  index,
12696
12702
  value,
12697
12703
  isVNode,
@@ -12700,13 +12706,27 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12700
12706
  }
12701
12707
  function createBlockStatement(body) {
12702
12708
  return {
12703
- type: "21",
12709
+ type: 21,
12704
12710
  body,
12705
12711
  loc: locStub
12706
12712
  };
12707
12713
  }
12714
+ function getVNodeHelper(ssr, isComponent) {
12715
+ return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
12716
+ }
12717
+ function getVNodeBlockHelper(ssr, isComponent) {
12718
+ return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
12719
+ }
12720
+ function convertToBlock(node, { helper, removeHelper, inSSR }) {
12721
+ if (!node.isBlock) {
12722
+ node.isBlock = true;
12723
+ removeHelper(getVNodeHelper(inSSR, node.isComponent));
12724
+ helper(OPEN_BLOCK);
12725
+ helper(getVNodeBlockHelper(inSSR, node.isComponent));
12726
+ }
12727
+ }
12708
12728
 
12709
- const isStaticExp = (p) => p.type === "4" && p.isStatic;
12729
+ const isStaticExp = (p) => p.type === 4 && p.isStatic;
12710
12730
  const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
12711
12731
  function isCoreComponent(tag) {
12712
12732
  if (isBuiltInType(tag, "Teleport")) {
@@ -12832,7 +12852,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12832
12852
  function findDir(node, name, allowEmpty = false) {
12833
12853
  for (let i = 0; i < node.props.length; i++) {
12834
12854
  const p = node.props[i];
12835
- if (p.type === "7" && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) {
12855
+ if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) {
12836
12856
  return p;
12837
12857
  }
12838
12858
  }
@@ -12840,7 +12860,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12840
12860
  function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
12841
12861
  for (let i = 0; i < node.props.length; i++) {
12842
12862
  const p = node.props[i];
12843
- if (p.type === "6") {
12863
+ if (p.type === 6) {
12844
12864
  if (dynamicOnly)
12845
12865
  continue;
12846
12866
  if (p.name === name && (p.value || allowEmpty)) {
@@ -12856,33 +12876,27 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12856
12876
  }
12857
12877
  function hasDynamicKeyVBind(node) {
12858
12878
  return node.props.some(
12859
- (p) => p.type === "7" && p.name === "bind" && (!p.arg || // v-bind="obj"
12860
- p.arg.type !== "4" || // v-bind:[_ctx.foo]
12879
+ (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj"
12880
+ p.arg.type !== 4 || // v-bind:[_ctx.foo]
12861
12881
  !p.arg.isStatic)
12862
12882
  // v-bind:[foo]
12863
12883
  );
12864
12884
  }
12865
12885
  function isText$1(node) {
12866
- return node.type === "5" || node.type === "2";
12886
+ return node.type === 5 || node.type === 2;
12867
12887
  }
12868
12888
  function isVSlot(p) {
12869
- return p.type === "7" && p.name === "slot";
12889
+ return p.type === 7 && p.name === "slot";
12870
12890
  }
12871
12891
  function isTemplateNode(node) {
12872
- return node.type === "1" && node.tagType === "3";
12892
+ return node.type === 1 && node.tagType === 3;
12873
12893
  }
12874
12894
  function isSlotOutlet(node) {
12875
- return node.type === "1" && node.tagType === "2";
12876
- }
12877
- function getVNodeHelper(ssr, isComponent) {
12878
- return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
12879
- }
12880
- function getVNodeBlockHelper(ssr, isComponent) {
12881
- return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
12895
+ return node.type === 1 && node.tagType === 2;
12882
12896
  }
12883
12897
  const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
12884
12898
  function getUnnormalizedProps(props, callPath = []) {
12885
- if (props && !isString(props) && props.type === "14") {
12899
+ if (props && !isString(props) && props.type === 14) {
12886
12900
  const callee = props.callee;
12887
12901
  if (!isString(callee) && propsHelperSet.has(callee)) {
12888
12902
  return getUnnormalizedProps(
@@ -12895,10 +12909,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12895
12909
  }
12896
12910
  function injectProp(node, prop, context) {
12897
12911
  let propsWithInjection;
12898
- let props = node.type === "13" ? node.props : node.arguments[2];
12912
+ let props = node.type === 13 ? node.props : node.arguments[2];
12899
12913
  let callPath = [];
12900
12914
  let parentCall;
12901
- if (props && !isString(props) && props.type === "14") {
12915
+ if (props && !isString(props) && props.type === 14) {
12902
12916
  const ret = getUnnormalizedProps(props);
12903
12917
  props = ret[0];
12904
12918
  callPath = ret[1];
@@ -12906,9 +12920,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12906
12920
  }
12907
12921
  if (props == null || isString(props)) {
12908
12922
  propsWithInjection = createObjectExpression([prop]);
12909
- } else if (props.type === "14") {
12923
+ } else if (props.type === 14) {
12910
12924
  const first = props.arguments[0];
12911
- if (!isString(first) && first.type === "15") {
12925
+ if (!isString(first) && first.type === 15) {
12912
12926
  if (!hasProp(prop, first)) {
12913
12927
  first.properties.unshift(prop);
12914
12928
  }
@@ -12923,7 +12937,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12923
12937
  }
12924
12938
  }
12925
12939
  !propsWithInjection && (propsWithInjection = props);
12926
- } else if (props.type === "15") {
12940
+ } else if (props.type === 15) {
12927
12941
  if (!hasProp(prop, props)) {
12928
12942
  props.properties.unshift(prop);
12929
12943
  }
@@ -12937,7 +12951,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12937
12951
  parentCall = callPath[callPath.length - 2];
12938
12952
  }
12939
12953
  }
12940
- if (node.type === "13") {
12954
+ if (node.type === 13) {
12941
12955
  if (parentCall) {
12942
12956
  parentCall.arguments[0] = propsWithInjection;
12943
12957
  } else {
@@ -12953,10 +12967,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12953
12967
  }
12954
12968
  function hasProp(prop, props) {
12955
12969
  let result = false;
12956
- if (prop.key.type === "4") {
12970
+ if (prop.key.type === 4) {
12957
12971
  const propKeyName = prop.key.content;
12958
12972
  result = props.properties.some(
12959
- (p) => p.key.type === "4" && p.key.content === propKeyName
12973
+ (p) => p.key.type === 4 && p.key.content === propKeyName
12960
12974
  );
12961
12975
  }
12962
12976
  return result;
@@ -12967,20 +12981,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
12967
12981
  })}`;
12968
12982
  }
12969
12983
  function getMemoedVNodeCall(node) {
12970
- if (node.type === "14" && node.callee === WITH_MEMO) {
12984
+ if (node.type === 14 && node.callee === WITH_MEMO) {
12971
12985
  return node.arguments[1].returns;
12972
12986
  } else {
12973
12987
  return node;
12974
12988
  }
12975
12989
  }
12976
- function makeBlock(node, { helper, removeHelper, inSSR }) {
12977
- if (!node.isBlock) {
12978
- node.isBlock = true;
12979
- removeHelper(getVNodeHelper(inSSR, node.isComponent));
12980
- helper(OPEN_BLOCK);
12981
- helper(getVNodeBlockHelper(inSSR, node.isComponent));
12982
- }
12983
- }
12984
12990
 
12985
12991
  const deprecationData = {
12986
12992
  ["COMPILER_IS_ON_ELEMENT"]: {
@@ -13064,8 +13070,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13064
13070
  };
13065
13071
  const defaultParserOptions = {
13066
13072
  delimiters: [`{{`, `}}`],
13067
- getNamespace: () => "0",
13068
- getTextMode: () => "0",
13073
+ getNamespace: () => 0,
13074
+ getTextMode: () => 0,
13069
13075
  isVoidTag: NO,
13070
13076
  isPreTag: NO,
13071
13077
  isCustomElement: NO,
@@ -13078,7 +13084,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13078
13084
  const context = createParserContext(content, options);
13079
13085
  const start = getCursor(context);
13080
13086
  return createRoot(
13081
- parseChildren(context, "0", []),
13087
+ parseChildren(context, 0, []),
13082
13088
  getSelection(context, start)
13083
13089
  );
13084
13090
  }
@@ -13102,48 +13108,48 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13102
13108
  }
13103
13109
  function parseChildren(context, mode, ancestors) {
13104
13110
  const parent = last(ancestors);
13105
- const ns = parent ? parent.ns : "0";
13111
+ const ns = parent ? parent.ns : 0;
13106
13112
  const nodes = [];
13107
13113
  while (!isEnd(context, mode, ancestors)) {
13108
13114
  const s = context.source;
13109
13115
  let node = void 0;
13110
- if (mode === "0" || mode === "1") {
13116
+ if (mode === 0 || mode === 1) {
13111
13117
  if (!context.inVPre && startsWith(s, context.options.delimiters[0])) {
13112
13118
  node = parseInterpolation(context, mode);
13113
- } else if (mode === "0" && s[0] === "<") {
13119
+ } else if (mode === 0 && s[0] === "<") {
13114
13120
  if (s.length === 1) {
13115
- emitError(context, "5", 1);
13121
+ emitError(context, 5, 1);
13116
13122
  } else if (s[1] === "!") {
13117
13123
  if (startsWith(s, "<!--")) {
13118
13124
  node = parseComment(context);
13119
13125
  } else if (startsWith(s, "<!DOCTYPE")) {
13120
13126
  node = parseBogusComment(context);
13121
13127
  } else if (startsWith(s, "<![CDATA[")) {
13122
- if (ns !== "0") {
13128
+ if (ns !== 0) {
13123
13129
  node = parseCDATA(context, ancestors);
13124
13130
  } else {
13125
- emitError(context, "1");
13131
+ emitError(context, 1);
13126
13132
  node = parseBogusComment(context);
13127
13133
  }
13128
13134
  } else {
13129
- emitError(context, "11");
13135
+ emitError(context, 11);
13130
13136
  node = parseBogusComment(context);
13131
13137
  }
13132
13138
  } else if (s[1] === "/") {
13133
13139
  if (s.length === 2) {
13134
- emitError(context, "5", 2);
13140
+ emitError(context, 5, 2);
13135
13141
  } else if (s[2] === ">") {
13136
- emitError(context, "14", 2);
13142
+ emitError(context, 14, 2);
13137
13143
  advanceBy(context, 3);
13138
13144
  continue;
13139
13145
  } else if (/[a-z]/i.test(s[2])) {
13140
- emitError(context, "23");
13146
+ emitError(context, 23);
13141
13147
  parseTag(context, TagType.End, parent);
13142
13148
  continue;
13143
13149
  } else {
13144
13150
  emitError(
13145
13151
  context,
13146
- "12",
13152
+ 12,
13147
13153
  2
13148
13154
  );
13149
13155
  node = parseBogusComment(context);
@@ -13154,7 +13160,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13154
13160
  "COMPILER_NATIVE_TEMPLATE",
13155
13161
  context
13156
13162
  ) && node && node.tag === "template" && !node.props.some(
13157
- (p) => p.type === "7" && isSpecialTemplateDirective(p.name)
13163
+ (p) => p.type === 7 && isSpecialTemplateDirective(p.name)
13158
13164
  )) {
13159
13165
  warnDeprecation(
13160
13166
  "COMPILER_NATIVE_TEMPLATE",
@@ -13166,12 +13172,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13166
13172
  } else if (s[1] === "?") {
13167
13173
  emitError(
13168
13174
  context,
13169
- "21",
13175
+ 21,
13170
13176
  1
13171
13177
  );
13172
13178
  node = parseBogusComment(context);
13173
13179
  } else {
13174
- emitError(context, "12", 1);
13180
+ emitError(context, 12, 1);
13175
13181
  }
13176
13182
  }
13177
13183
  }
@@ -13187,16 +13193,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13187
13193
  }
13188
13194
  }
13189
13195
  let removedWhitespace = false;
13190
- if (mode !== "2" && mode !== "1") {
13196
+ if (mode !== 2 && mode !== 1) {
13191
13197
  const shouldCondense = context.options.whitespace !== "preserve";
13192
13198
  for (let i = 0; i < nodes.length; i++) {
13193
13199
  const node = nodes[i];
13194
- if (node.type === "2") {
13200
+ if (node.type === 2) {
13195
13201
  if (!context.inPre) {
13196
13202
  if (!/[^\t\r\n\f ]/.test(node.content)) {
13197
13203
  const prev = nodes[i - 1];
13198
13204
  const next = nodes[i + 1];
13199
- if (!prev || !next || shouldCondense && (prev.type === "3" && next.type === "3" || prev.type === "3" && next.type === "1" || prev.type === "1" && next.type === "3" || prev.type === "1" && next.type === "1" && /[\r\n]/.test(node.content))) {
13205
+ if (!prev || !next || shouldCondense && (prev.type === 3 && next.type === 3 || prev.type === 3 && next.type === 1 || prev.type === 1 && next.type === 3 || prev.type === 1 && next.type === 1 && /[\r\n]/.test(node.content))) {
13200
13206
  removedWhitespace = true;
13201
13207
  nodes[i] = null;
13202
13208
  } else {
@@ -13208,14 +13214,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13208
13214
  } else {
13209
13215
  node.content = node.content.replace(/\r\n/g, "\n");
13210
13216
  }
13211
- } else if (node.type === "3" && !context.options.comments) {
13217
+ } else if (node.type === 3 && !context.options.comments) {
13212
13218
  removedWhitespace = true;
13213
13219
  nodes[i] = null;
13214
13220
  }
13215
13221
  }
13216
13222
  if (context.inPre && parent && context.options.isPreTag(parent.tag)) {
13217
13223
  const first = nodes[0];
13218
- if (first && first.type === "2") {
13224
+ if (first && first.type === 2) {
13219
13225
  first.content = first.content.replace(/^\r?\n/, "");
13220
13226
  }
13221
13227
  }
@@ -13223,9 +13229,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13223
13229
  return removedWhitespace ? nodes.filter(Boolean) : nodes;
13224
13230
  }
13225
13231
  function pushNode(nodes, node) {
13226
- if (node.type === "2") {
13232
+ if (node.type === 2) {
13227
13233
  const prev = last(nodes);
13228
- if (prev && prev.type === "2" && prev.loc.end.offset === node.loc.start.offset) {
13234
+ if (prev && prev.type === 2 && prev.loc.end.offset === node.loc.start.offset) {
13229
13235
  prev.content += node.content;
13230
13236
  prev.loc.end = node.loc.end;
13231
13237
  prev.loc.source += node.loc.source;
@@ -13236,9 +13242,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13236
13242
  }
13237
13243
  function parseCDATA(context, ancestors) {
13238
13244
  advanceBy(context, 9);
13239
- const nodes = parseChildren(context, "3", ancestors);
13245
+ const nodes = parseChildren(context, 3, ancestors);
13240
13246
  if (context.source.length === 0) {
13241
- emitError(context, "6");
13247
+ emitError(context, 6);
13242
13248
  } else {
13243
13249
  advanceBy(context, 3);
13244
13250
  }
@@ -13251,13 +13257,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13251
13257
  if (!match) {
13252
13258
  content = context.source.slice(4);
13253
13259
  advanceBy(context, context.source.length);
13254
- emitError(context, "7");
13260
+ emitError(context, 7);
13255
13261
  } else {
13256
13262
  if (match.index <= 3) {
13257
- emitError(context, "0");
13263
+ emitError(context, 0);
13258
13264
  }
13259
13265
  if (match[1]) {
13260
- emitError(context, "10");
13266
+ emitError(context, 10);
13261
13267
  }
13262
13268
  content = context.source.slice(4, match.index);
13263
13269
  const s = context.source.slice(0, match.index);
@@ -13265,14 +13271,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13265
13271
  while ((nestedIndex = s.indexOf("<!--", prevIndex)) !== -1) {
13266
13272
  advanceBy(context, nestedIndex - prevIndex + 1);
13267
13273
  if (nestedIndex + 4 < s.length) {
13268
- emitError(context, "16");
13274
+ emitError(context, 16);
13269
13275
  }
13270
13276
  prevIndex = nestedIndex + 1;
13271
13277
  }
13272
13278
  advanceBy(context, match.index + match[0].length - prevIndex + 1);
13273
13279
  }
13274
13280
  return {
13275
- type: "3",
13281
+ type: 3,
13276
13282
  content,
13277
13283
  loc: getSelection(context, start)
13278
13284
  };
@@ -13290,7 +13296,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13290
13296
  advanceBy(context, closeIndex + 1);
13291
13297
  }
13292
13298
  return {
13293
- type: "3",
13299
+ type: 3,
13294
13300
  content,
13295
13301
  loc: getSelection(context, start)
13296
13302
  };
@@ -13317,7 +13323,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13317
13323
  ancestors.pop();
13318
13324
  {
13319
13325
  const inlineTemplateProp = element.props.find(
13320
- (p) => p.type === "6" && p.name === "inline-template"
13326
+ (p) => p.type === 6 && p.name === "inline-template"
13321
13327
  );
13322
13328
  if (inlineTemplateProp && checkCompatEnabled(
13323
13329
  "COMPILER_INLINE_TEMPLATE",
@@ -13326,7 +13332,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13326
13332
  )) {
13327
13333
  const loc = getSelection(context, element.loc.end);
13328
13334
  inlineTemplateProp.value = {
13329
- type: "2",
13335
+ type: 2,
13330
13336
  content: loc.source,
13331
13337
  loc
13332
13338
  };
@@ -13336,11 +13342,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13336
13342
  if (startsWithEndTagOpen(context.source, element.tag)) {
13337
13343
  parseTag(context, TagType.End, parent);
13338
13344
  } else {
13339
- emitError(context, "24", 0, element.loc.start);
13345
+ emitError(context, 24, 0, element.loc.start);
13340
13346
  if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
13341
13347
  const first = children[0];
13342
13348
  if (first && startsWith(first.loc.source, "<!--")) {
13343
- emitError(context, "8");
13349
+ emitError(context, 8);
13344
13350
  }
13345
13351
  }
13346
13352
  }
@@ -13374,7 +13380,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13374
13380
  context.inPre = true;
13375
13381
  }
13376
13382
  let props = parseAttributes(context, type);
13377
- if (type === 0 /* Start */ && !context.inVPre && props.some((p) => p.type === "7" && p.name === "pre")) {
13383
+ if (type === 0 /* Start */ && !context.inVPre && props.some((p) => p.type === 7 && p.name === "pre")) {
13378
13384
  context.inVPre = true;
13379
13385
  extend(context, cursor);
13380
13386
  context.source = currentSource;
@@ -13382,11 +13388,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13382
13388
  }
13383
13389
  let isSelfClosing = false;
13384
13390
  if (context.source.length === 0) {
13385
- emitError(context, "9");
13391
+ emitError(context, 9);
13386
13392
  } else {
13387
13393
  isSelfClosing = startsWith(context.source, "/>");
13388
13394
  if (type === 1 /* End */ && isSelfClosing) {
13389
- emitError(context, "4");
13395
+ emitError(context, 4);
13390
13396
  }
13391
13397
  advanceBy(context, isSelfClosing ? 2 : 1);
13392
13398
  }
@@ -13401,7 +13407,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13401
13407
  let hasFor = false;
13402
13408
  for (let i = 0; i < props.length; i++) {
13403
13409
  const p = props[i];
13404
- if (p.type === "7") {
13410
+ if (p.type === 7) {
13405
13411
  if (p.name === "if") {
13406
13412
  hasIf = true;
13407
13413
  } else if (p.name === "for") {
@@ -13418,22 +13424,22 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13418
13424
  }
13419
13425
  }
13420
13426
  }
13421
- let tagType = "0";
13427
+ let tagType = 0;
13422
13428
  if (!context.inVPre) {
13423
13429
  if (tag === "slot") {
13424
- tagType = "2";
13430
+ tagType = 2;
13425
13431
  } else if (tag === "template") {
13426
13432
  if (props.some(
13427
- (p) => p.type === "7" && isSpecialTemplateDirective(p.name)
13433
+ (p) => p.type === 7 && isSpecialTemplateDirective(p.name)
13428
13434
  )) {
13429
- tagType = "3";
13435
+ tagType = 3;
13430
13436
  }
13431
13437
  } else if (isComponent(tag, props, context)) {
13432
- tagType = "1";
13438
+ tagType = 1;
13433
13439
  }
13434
13440
  }
13435
13441
  return {
13436
- type: "1",
13442
+ type: 1,
13437
13443
  ns,
13438
13444
  tag,
13439
13445
  tagType,
@@ -13455,7 +13461,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13455
13461
  }
13456
13462
  for (let i = 0; i < props.length; i++) {
13457
13463
  const p = props[i];
13458
- if (p.type === "6") {
13464
+ if (p.type === 6) {
13459
13465
  if (p.name === "is" && p.value) {
13460
13466
  if (p.value.content.startsWith("vue:")) {
13461
13467
  return true;
@@ -13488,23 +13494,23 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13488
13494
  const attributeNames = /* @__PURE__ */ new Set();
13489
13495
  while (context.source.length > 0 && !startsWith(context.source, ">") && !startsWith(context.source, "/>")) {
13490
13496
  if (startsWith(context.source, "/")) {
13491
- emitError(context, "22");
13497
+ emitError(context, 22);
13492
13498
  advanceBy(context, 1);
13493
13499
  advanceSpaces(context);
13494
13500
  continue;
13495
13501
  }
13496
13502
  if (type === 1 /* End */) {
13497
- emitError(context, "3");
13503
+ emitError(context, 3);
13498
13504
  }
13499
13505
  const attr = parseAttribute(context, attributeNames);
13500
- if (attr.type === "6" && attr.value && attr.name === "class") {
13506
+ if (attr.type === 6 && attr.value && attr.name === "class") {
13501
13507
  attr.value.content = attr.value.content.replace(/\s+/g, " ").trim();
13502
13508
  }
13503
13509
  if (type === 0 /* Start */) {
13504
13510
  props.push(attr);
13505
13511
  }
13506
13512
  if (/^[^\t\r\n\f />]/.test(context.source)) {
13507
- emitError(context, "15");
13513
+ emitError(context, 15);
13508
13514
  }
13509
13515
  advanceSpaces(context);
13510
13516
  }
@@ -13515,11 +13521,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13515
13521
  const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source);
13516
13522
  const name = match[0];
13517
13523
  if (nameSet.has(name)) {
13518
- emitError(context, "2");
13524
+ emitError(context, 2);
13519
13525
  }
13520
13526
  nameSet.add(name);
13521
13527
  if (name[0] === "=") {
13522
- emitError(context, "19");
13528
+ emitError(context, 19);
13523
13529
  }
13524
13530
  {
13525
13531
  const pattern = /["'<]/g;
@@ -13527,7 +13533,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13527
13533
  while (m = pattern.exec(name)) {
13528
13534
  emitError(
13529
13535
  context,
13530
- "17",
13536
+ 17,
13531
13537
  m.index
13532
13538
  );
13533
13539
  }
@@ -13540,7 +13546,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13540
13546
  advanceSpaces(context);
13541
13547
  value = parseAttributeValue(context);
13542
13548
  if (!value) {
13543
- emitError(context, "13");
13549
+ emitError(context, 13);
13544
13550
  }
13545
13551
  }
13546
13552
  const loc = getSelection(context, start);
@@ -13570,7 +13576,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13570
13576
  if (!content.endsWith("]")) {
13571
13577
  emitError(
13572
13578
  context,
13573
- "27"
13579
+ 27
13574
13580
  );
13575
13581
  content = content.slice(1);
13576
13582
  } else {
@@ -13580,10 +13586,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13580
13586
  content += match2[3] || "";
13581
13587
  }
13582
13588
  arg = {
13583
- type: "4",
13589
+ type: 4,
13584
13590
  content,
13585
13591
  isStatic,
13586
- constType: isStatic ? "3" : 0,
13592
+ constType: isStatic ? 3 : 0,
13587
13593
  loc: loc2
13588
13594
  };
13589
13595
  }
@@ -13616,10 +13622,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13616
13622
  }
13617
13623
  }
13618
13624
  return {
13619
- type: "7",
13625
+ type: 7,
13620
13626
  name: dirName,
13621
13627
  exp: value && {
13622
- type: "4",
13628
+ type: 4,
13623
13629
  content: value.content,
13624
13630
  isStatic: false,
13625
13631
  // Treat as non-constant by default. This can be potentially set to
@@ -13633,13 +13639,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13633
13639
  };
13634
13640
  }
13635
13641
  if (!context.inVPre && startsWith(name, "v-")) {
13636
- emitError(context, "26");
13642
+ emitError(context, 26);
13637
13643
  }
13638
13644
  return {
13639
- type: "6",
13645
+ type: 6,
13640
13646
  name,
13641
13647
  value: value && {
13642
- type: "2",
13648
+ type: 2,
13643
13649
  content: value.content,
13644
13650
  loc: value.loc
13645
13651
  },
@@ -13658,10 +13664,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13658
13664
  content = parseTextData(
13659
13665
  context,
13660
13666
  context.source.length,
13661
- "4"
13667
+ 4
13662
13668
  );
13663
13669
  } else {
13664
- content = parseTextData(context, endIndex, "4");
13670
+ content = parseTextData(context, endIndex, 4);
13665
13671
  advanceBy(context, 1);
13666
13672
  }
13667
13673
  } else {
@@ -13674,11 +13680,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13674
13680
  while (m = unexpectedChars.exec(match[0])) {
13675
13681
  emitError(
13676
13682
  context,
13677
- "18",
13683
+ 18,
13678
13684
  m.index
13679
13685
  );
13680
13686
  }
13681
- content = parseTextData(context, match[0].length, "4");
13687
+ content = parseTextData(context, match[0].length, 4);
13682
13688
  }
13683
13689
  return { content, isQuoted, loc: getSelection(context, start) };
13684
13690
  }
@@ -13686,7 +13692,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13686
13692
  const [open, close] = context.options.delimiters;
13687
13693
  const closeIndex = context.source.indexOf(close, open.length);
13688
13694
  if (closeIndex === -1) {
13689
- emitError(context, "25");
13695
+ emitError(context, 25);
13690
13696
  return void 0;
13691
13697
  }
13692
13698
  const start = getCursor(context);
@@ -13705,9 +13711,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13705
13711
  advancePositionWithMutation(innerEnd, rawContent, endOffset);
13706
13712
  advanceBy(context, close.length);
13707
13713
  return {
13708
- type: "5",
13714
+ type: 5,
13709
13715
  content: {
13710
- type: "4",
13716
+ type: 4,
13711
13717
  isStatic: false,
13712
13718
  // Set `isConstant` to false by default and will decide in transformExpression
13713
13719
  constType: 0,
@@ -13718,7 +13724,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13718
13724
  };
13719
13725
  }
13720
13726
  function parseText(context, mode) {
13721
- const endTokens = mode === "3" ? ["]]>"] : ["<", context.options.delimiters[0]];
13727
+ const endTokens = mode === 3 ? ["]]>"] : ["<", context.options.delimiters[0]];
13722
13728
  let endIndex = context.source.length;
13723
13729
  for (let i = 0; i < endTokens.length; i++) {
13724
13730
  const index = context.source.indexOf(endTokens[i], 1);
@@ -13729,7 +13735,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13729
13735
  const start = getCursor(context);
13730
13736
  const content = parseTextData(context, endIndex, mode);
13731
13737
  return {
13732
- type: "2",
13738
+ type: 2,
13733
13739
  content,
13734
13740
  loc: getSelection(context, start)
13735
13741
  };
@@ -13737,12 +13743,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13737
13743
  function parseTextData(context, length, mode) {
13738
13744
  const rawText = context.source.slice(0, length);
13739
13745
  advanceBy(context, length);
13740
- if (mode === "2" || mode === "3" || !rawText.includes("&")) {
13746
+ if (mode === 2 || mode === 3 || !rawText.includes("&")) {
13741
13747
  return rawText;
13742
13748
  } else {
13743
13749
  return context.options.decodeEntities(
13744
13750
  rawText,
13745
- mode === "4"
13751
+ mode === 4
13746
13752
  );
13747
13753
  }
13748
13754
  }
@@ -13798,7 +13804,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13798
13804
  function isEnd(context, mode, ancestors) {
13799
13805
  const s = context.source;
13800
13806
  switch (mode) {
13801
- case "0":
13807
+ case 0:
13802
13808
  if (startsWith(s, "</")) {
13803
13809
  for (let i = ancestors.length - 1; i >= 0; --i) {
13804
13810
  if (startsWithEndTagOpen(s, ancestors[i].tag)) {
@@ -13807,15 +13813,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13807
13813
  }
13808
13814
  }
13809
13815
  break;
13810
- case "1":
13811
- case "2": {
13816
+ case 1:
13817
+ case 2: {
13812
13818
  const parent = last(ancestors);
13813
13819
  if (parent && startsWithEndTagOpen(s, parent.tag)) {
13814
13820
  return true;
13815
13821
  }
13816
13822
  break;
13817
13823
  }
13818
- case "3":
13824
+ case 3:
13819
13825
  if (startsWith(s, "]]>")) {
13820
13826
  return true;
13821
13827
  }
@@ -13838,7 +13844,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13838
13844
  }
13839
13845
  function isSingleElementRoot(root, child) {
13840
13846
  const { children } = root;
13841
- return children.length === 1 && child.type === "1" && !isSlotOutlet(child);
13847
+ return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
13842
13848
  }
13843
13849
  function walk(node, context, doNotHoistNode = false) {
13844
13850
  const { children } = node;
@@ -13846,10 +13852,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13846
13852
  let hoistedCount = 0;
13847
13853
  for (let i = 0; i < children.length; i++) {
13848
13854
  const child = children[i];
13849
- if (child.type === "1" && child.tagType === "0") {
13855
+ if (child.type === 1 && child.tagType === 0) {
13850
13856
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
13851
13857
  if (constantType > 0) {
13852
- if (constantType >= "2") {
13858
+ if (constantType >= 2) {
13853
13859
  child.codegenNode.patchFlag = -1 + (` /* HOISTED */` );
13854
13860
  child.codegenNode = context.hoist(child.codegenNode);
13855
13861
  hoistedCount++;
@@ -13857,9 +13863,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13857
13863
  }
13858
13864
  } else {
13859
13865
  const codegenNode = child.codegenNode;
13860
- if (codegenNode.type === "13") {
13866
+ if (codegenNode.type === 13) {
13861
13867
  const flag = getPatchFlag(codegenNode);
13862
- if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= "2") {
13868
+ if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {
13863
13869
  const props = getNodeProps(child);
13864
13870
  if (props) {
13865
13871
  codegenNode.props = context.hoist(props);
@@ -13871,8 +13877,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13871
13877
  }
13872
13878
  }
13873
13879
  }
13874
- if (child.type === "1") {
13875
- const isComponent = child.tagType === "1";
13880
+ if (child.type === 1) {
13881
+ const isComponent = child.tagType === 1;
13876
13882
  if (isComponent) {
13877
13883
  context.scopes.vSlot++;
13878
13884
  }
@@ -13880,9 +13886,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13880
13886
  if (isComponent) {
13881
13887
  context.scopes.vSlot--;
13882
13888
  }
13883
- } else if (child.type === "11") {
13889
+ } else if (child.type === 11) {
13884
13890
  walk(child, context, child.children.length === 1);
13885
- } else if (child.type === "9") {
13891
+ } else if (child.type === 9) {
13886
13892
  for (let i2 = 0; i2 < child.branches.length; i2++) {
13887
13893
  walk(
13888
13894
  child.branches[i2],
@@ -13895,7 +13901,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13895
13901
  if (hoistedCount && context.transformHoist) {
13896
13902
  context.transformHoist(children, context, node);
13897
13903
  }
13898
- if (hoistedCount && hoistedCount === originalCount && node.type === "1" && node.tagType === "0" && node.codegenNode && node.codegenNode.type === "13" && isArray(node.codegenNode.children)) {
13904
+ if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
13899
13905
  node.codegenNode.children = context.hoist(
13900
13906
  createArrayExpression(node.codegenNode.children)
13901
13907
  );
@@ -13904,8 +13910,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13904
13910
  function getConstantType(node, context) {
13905
13911
  const { constantCache } = context;
13906
13912
  switch (node.type) {
13907
- case "1":
13908
- if (node.tagType !== "0") {
13913
+ case 1:
13914
+ if (node.tagType !== 0) {
13909
13915
  return 0;
13910
13916
  }
13911
13917
  const cached = constantCache.get(node);
@@ -13913,7 +13919,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13913
13919
  return cached;
13914
13920
  }
13915
13921
  const codegenNode = node.codegenNode;
13916
- if (codegenNode.type !== "13") {
13922
+ if (codegenNode.type !== 13) {
13917
13923
  return 0;
13918
13924
  }
13919
13925
  if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") {
@@ -13921,7 +13927,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13921
13927
  }
13922
13928
  const flag = getPatchFlag(codegenNode);
13923
13929
  if (!flag) {
13924
- let returnType2 = "3";
13930
+ let returnType2 = 3;
13925
13931
  const generatedPropsType = getGeneratedPropsConstantType(node, context);
13926
13932
  if (generatedPropsType === 0) {
13927
13933
  constantCache.set(node, 0);
@@ -13940,10 +13946,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13940
13946
  returnType2 = childType;
13941
13947
  }
13942
13948
  }
13943
- if (returnType2 > "1") {
13949
+ if (returnType2 > 1) {
13944
13950
  for (let i = 0; i < node.props.length; i++) {
13945
13951
  const p = node.props[i];
13946
- if (p.type === "7" && p.name === "bind" && p.exp) {
13952
+ if (p.type === 7 && p.name === "bind" && p.exp) {
13947
13953
  const expType = getConstantType(p.exp, context);
13948
13954
  if (expType === 0) {
13949
13955
  constantCache.set(node, 0);
@@ -13958,7 +13964,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13958
13964
  if (codegenNode.isBlock) {
13959
13965
  for (let i = 0; i < node.props.length; i++) {
13960
13966
  const p = node.props[i];
13961
- if (p.type === "7") {
13967
+ if (p.type === 7) {
13962
13968
  constantCache.set(node, 0);
13963
13969
  return 0;
13964
13970
  }
@@ -13976,20 +13982,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
13976
13982
  constantCache.set(node, 0);
13977
13983
  return 0;
13978
13984
  }
13979
- case "2":
13980
- case "3":
13981
- return "3";
13982
- case "9":
13983
- case "11":
13984
- case "10":
13985
+ case 2:
13986
+ case 3:
13987
+ return 3;
13988
+ case 9:
13989
+ case 11:
13990
+ case 10:
13985
13991
  return 0;
13986
- case "5":
13987
- case "12":
13992
+ case 5:
13993
+ case 12:
13988
13994
  return getConstantType(node.content, context);
13989
- case "4":
13995
+ case 4:
13990
13996
  return node.constType;
13991
- case "8":
13992
- let returnType = "3";
13997
+ case 8:
13998
+ let returnType = 3;
13993
13999
  for (let i = 0; i < node.children.length; i++) {
13994
14000
  const child = node.children[i];
13995
14001
  if (isString(child) || isSymbol(child)) {
@@ -14014,20 +14020,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14014
14020
  GUARD_REACTIVE_PROPS
14015
14021
  ]);
14016
14022
  function getConstantTypeOfHelperCall(value, context) {
14017
- if (value.type === "14" && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
14023
+ if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
14018
14024
  const arg = value.arguments[0];
14019
- if (arg.type === "4") {
14025
+ if (arg.type === 4) {
14020
14026
  return getConstantType(arg, context);
14021
- } else if (arg.type === "14") {
14027
+ } else if (arg.type === 14) {
14022
14028
  return getConstantTypeOfHelperCall(arg, context);
14023
14029
  }
14024
14030
  }
14025
14031
  return 0;
14026
14032
  }
14027
14033
  function getGeneratedPropsConstantType(node, context) {
14028
- let returnType = "3";
14034
+ let returnType = 3;
14029
14035
  const props = getNodeProps(node);
14030
- if (props && props.type === "15") {
14036
+ if (props && props.type === 15) {
14031
14037
  const { properties } = props;
14032
14038
  for (let i = 0; i < properties.length; i++) {
14033
14039
  const { key, value } = properties[i];
@@ -14039,9 +14045,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14039
14045
  returnType = keyType;
14040
14046
  }
14041
14047
  let valueType;
14042
- if (value.type === "4") {
14048
+ if (value.type === 4) {
14043
14049
  valueType = getConstantType(value, context);
14044
- } else if (value.type === "14") {
14050
+ } else if (value.type === 14) {
14045
14051
  valueType = getConstantTypeOfHelperCall(value, context);
14046
14052
  } else {
14047
14053
  valueType = 0;
@@ -14058,7 +14064,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14058
14064
  }
14059
14065
  function getNodeProps(node) {
14060
14066
  const codegenNode = node.codegenNode;
14061
- if (codegenNode.type === "13") {
14067
+ if (codegenNode.type === 13) {
14062
14068
  return codegenNode.props;
14063
14069
  }
14064
14070
  }
@@ -14200,7 +14206,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14200
14206
  `_hoisted_${context.hoists.length}`,
14201
14207
  false,
14202
14208
  exp.loc,
14203
- "2"
14209
+ 2
14204
14210
  );
14205
14211
  identifier.hoisted = exp;
14206
14212
  return identifier;
@@ -14241,8 +14247,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14241
14247
  const child = children[0];
14242
14248
  if (isSingleElementRoot(root, child) && child.codegenNode) {
14243
14249
  const codegenNode = child.codegenNode;
14244
- if (codegenNode.type === "13") {
14245
- makeBlock(codegenNode, context);
14250
+ if (codegenNode.type === 13) {
14251
+ convertToBlock(codegenNode, context);
14246
14252
  }
14247
14253
  root.codegenNode = codegenNode;
14248
14254
  } else {
@@ -14251,7 +14257,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14251
14257
  } else if (children.length > 1) {
14252
14258
  let patchFlag = 64;
14253
14259
  let patchFlagText = PatchFlagNames[64];
14254
- if (children.filter((c) => c.type !== "3").length === 1) {
14260
+ if (children.filter((c) => c.type !== 3).length === 1) {
14255
14261
  patchFlag |= 2048;
14256
14262
  patchFlagText += `, ${PatchFlagNames[2048]}`;
14257
14263
  }
@@ -14305,25 +14311,25 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14305
14311
  }
14306
14312
  }
14307
14313
  switch (node.type) {
14308
- case "3":
14314
+ case 3:
14309
14315
  if (!context.ssr) {
14310
14316
  context.helper(CREATE_COMMENT);
14311
14317
  }
14312
14318
  break;
14313
- case "5":
14319
+ case 5:
14314
14320
  if (!context.ssr) {
14315
14321
  context.helper(TO_DISPLAY_STRING);
14316
14322
  }
14317
14323
  break;
14318
- case "9":
14324
+ case 9:
14319
14325
  for (let i2 = 0; i2 < node.branches.length; i2++) {
14320
14326
  traverseNode(node.branches[i2], context);
14321
14327
  }
14322
14328
  break;
14323
- case "10":
14324
- case "11":
14325
- case "1":
14326
- case "0":
14329
+ case 10:
14330
+ case 11:
14331
+ case 1:
14332
+ case 0:
14327
14333
  traverseChildren(node, context);
14328
14334
  break;
14329
14335
  }
@@ -14336,15 +14342,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14336
14342
  function createStructuralDirectiveTransform(name, fn) {
14337
14343
  const matches = isString(name) ? (n) => n === name : (n) => name.test(n);
14338
14344
  return (node, context) => {
14339
- if (node.type === "1") {
14345
+ if (node.type === 1) {
14340
14346
  const { props } = node;
14341
- if (node.tagType === "3" && props.some(isVSlot)) {
14347
+ if (node.tagType === 3 && props.some(isVSlot)) {
14342
14348
  return;
14343
14349
  }
14344
14350
  const exitFns = [];
14345
14351
  for (let i = 0; i < props.length; i++) {
14346
14352
  const prop = props[i];
14347
- if (prop.type === "7" && matches(prop.name)) {
14353
+ if (prop.type === 7 && matches(prop.name)) {
14348
14354
  props.splice(i, 1);
14349
14355
  i--;
14350
14356
  const onExit = fn(node, prop, context);
@@ -14579,7 +14585,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14579
14585
  context.pure = false;
14580
14586
  }
14581
14587
  function isText(n) {
14582
- return isString(n) || n.type === "4" || n.type === "2" || n.type === "5" || n.type === "8";
14588
+ return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
14583
14589
  }
14584
14590
  function genNodeListAsArray(nodes, context) {
14585
14591
  const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n));
@@ -14620,68 +14626,68 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14620
14626
  return;
14621
14627
  }
14622
14628
  switch (node.type) {
14623
- case "1":
14624
- case "9":
14625
- case "11":
14629
+ case 1:
14630
+ case 9:
14631
+ case 11:
14626
14632
  assert(
14627
14633
  node.codegenNode != null,
14628
14634
  `Codegen node is missing for element/if/for node. Apply appropriate transforms first.`
14629
14635
  );
14630
14636
  genNode(node.codegenNode, context);
14631
14637
  break;
14632
- case "2":
14638
+ case 2:
14633
14639
  genText(node, context);
14634
14640
  break;
14635
- case "4":
14641
+ case 4:
14636
14642
  genExpression(node, context);
14637
14643
  break;
14638
- case "5":
14644
+ case 5:
14639
14645
  genInterpolation(node, context);
14640
14646
  break;
14641
- case "12":
14647
+ case 12:
14642
14648
  genNode(node.codegenNode, context);
14643
14649
  break;
14644
- case "8":
14650
+ case 8:
14645
14651
  genCompoundExpression(node, context);
14646
14652
  break;
14647
- case "3":
14653
+ case 3:
14648
14654
  genComment(node, context);
14649
14655
  break;
14650
- case "13":
14656
+ case 13:
14651
14657
  genVNodeCall(node, context);
14652
14658
  break;
14653
- case "14":
14659
+ case 14:
14654
14660
  genCallExpression(node, context);
14655
14661
  break;
14656
- case "15":
14662
+ case 15:
14657
14663
  genObjectExpression(node, context);
14658
14664
  break;
14659
- case "17":
14665
+ case 17:
14660
14666
  genArrayExpression(node, context);
14661
14667
  break;
14662
- case "18":
14668
+ case 18:
14663
14669
  genFunctionExpression(node, context);
14664
14670
  break;
14665
- case "19":
14671
+ case 19:
14666
14672
  genConditionalExpression(node, context);
14667
14673
  break;
14668
- case "20":
14674
+ case 20:
14669
14675
  genCacheExpression(node, context);
14670
14676
  break;
14671
- case "21":
14677
+ case 21:
14672
14678
  genNodeList(node.body, context, true, false);
14673
14679
  break;
14674
- case "22":
14680
+ case 22:
14675
14681
  break;
14676
- case "23":
14682
+ case 23:
14677
14683
  break;
14678
- case "24":
14684
+ case 24:
14679
14685
  break;
14680
- case "25":
14686
+ case 25:
14681
14687
  break;
14682
- case "26":
14688
+ case 26:
14683
14689
  break;
14684
- case "10":
14690
+ case 10:
14685
14691
  break;
14686
14692
  default:
14687
14693
  {
@@ -14718,7 +14724,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14718
14724
  }
14719
14725
  function genExpressionAsPropertyKey(node, context) {
14720
14726
  const { push } = context;
14721
- if (node.type === "8") {
14727
+ if (node.type === 8) {
14722
14728
  push(`[`);
14723
14729
  genCompoundExpression(node, context);
14724
14730
  push(`]`);
@@ -14799,7 +14805,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14799
14805
  push(`{}`, node);
14800
14806
  return;
14801
14807
  }
14802
- const multilines = properties.length > 1 || properties.some((p) => p.value.type !== "4");
14808
+ const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4);
14803
14809
  push(multilines ? `{` : `{ `);
14804
14810
  multilines && indent();
14805
14811
  for (let i = 0; i < properties.length; i++) {
@@ -14861,7 +14867,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14861
14867
  function genConditionalExpression(node, context) {
14862
14868
  const { test, consequent, alternate, newline: needNewline } = node;
14863
14869
  const { push, indent, deindent, newline } = context;
14864
- if (test.type === "4") {
14870
+ if (test.type === 4) {
14865
14871
  const needsParens = !isSimpleIdentifier(test.content);
14866
14872
  needsParens && push(`(`);
14867
14873
  genExpression(test, context);
@@ -14880,7 +14886,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14880
14886
  needNewline && newline();
14881
14887
  needNewline || push(` `);
14882
14888
  push(`: `);
14883
- const isNested = alternate.type === "19";
14889
+ const isNested = alternate.type === 19;
14884
14890
  if (!isNested) {
14885
14891
  context.indentLevel++;
14886
14892
  }
@@ -14935,7 +14941,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14935
14941
  }
14936
14942
  context.onError(
14937
14943
  createCompilerError(
14938
- "45",
14944
+ 45,
14939
14945
  node.loc,
14940
14946
  void 0,
14941
14947
  message
@@ -14945,18 +14951,18 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14945
14951
  }
14946
14952
 
14947
14953
  const transformExpression = (node, context) => {
14948
- if (node.type === "5") {
14954
+ if (node.type === 5) {
14949
14955
  node.content = processExpression(
14950
14956
  node.content,
14951
14957
  context
14952
14958
  );
14953
- } else if (node.type === "1") {
14959
+ } else if (node.type === 1) {
14954
14960
  for (let i = 0; i < node.props.length; i++) {
14955
14961
  const dir = node.props[i];
14956
- if (dir.type === "7" && dir.name !== "for") {
14962
+ if (dir.type === 7 && dir.name !== "for") {
14957
14963
  const exp = dir.exp;
14958
14964
  const arg = dir.arg;
14959
- if (exp && exp.type === "4" && !(dir.name === "on" && arg)) {
14965
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
14960
14966
  dir.exp = processExpression(
14961
14967
  exp,
14962
14968
  context,
@@ -14964,7 +14970,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14964
14970
  dir.name === "slot"
14965
14971
  );
14966
14972
  }
14967
- if (arg && arg.type === "4" && !arg.isStatic) {
14973
+ if (arg && arg.type === 4 && !arg.isStatic) {
14968
14974
  dir.arg = processExpression(arg, context);
14969
14975
  }
14970
14976
  }
@@ -14989,7 +14995,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14989
14995
  let key = 0;
14990
14996
  while (i-- >= 0) {
14991
14997
  const sibling = siblings[i];
14992
- if (sibling && sibling.type === "9") {
14998
+ if (sibling && sibling.type === 9) {
14993
14999
  key += sibling.branches.length;
14994
15000
  }
14995
15001
  }
@@ -15016,7 +15022,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15016
15022
  if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) {
15017
15023
  const loc = dir.exp ? dir.exp.loc : node.loc;
15018
15024
  context.onError(
15019
- createCompilerError("28", dir.loc)
15025
+ createCompilerError(28, dir.loc)
15020
15026
  );
15021
15027
  dir.exp = createSimpleExpression(`true`, false, loc);
15022
15028
  }
@@ -15026,7 +15032,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15026
15032
  if (dir.name === "if") {
15027
15033
  const branch = createIfBranch(node, dir);
15028
15034
  const ifNode = {
15029
- type: "9",
15035
+ type: 9,
15030
15036
  loc: node.loc,
15031
15037
  branches: [branch]
15032
15038
  };
@@ -15040,25 +15046,25 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15040
15046
  let i = siblings.indexOf(node);
15041
15047
  while (i-- >= -1) {
15042
15048
  const sibling = siblings[i];
15043
- if (sibling && sibling.type === "3") {
15049
+ if (sibling && sibling.type === 3) {
15044
15050
  context.removeNode(sibling);
15045
15051
  comments.unshift(sibling);
15046
15052
  continue;
15047
15053
  }
15048
- if (sibling && sibling.type === "2" && !sibling.content.trim().length) {
15054
+ if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
15049
15055
  context.removeNode(sibling);
15050
15056
  continue;
15051
15057
  }
15052
- if (sibling && sibling.type === "9") {
15058
+ if (sibling && sibling.type === 9) {
15053
15059
  if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
15054
15060
  context.onError(
15055
- createCompilerError("30", node.loc)
15061
+ createCompilerError(30, node.loc)
15056
15062
  );
15057
15063
  }
15058
15064
  context.removeNode();
15059
15065
  const branch = createIfBranch(node, dir);
15060
15066
  if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
15061
- !(context.parent && context.parent.type === "1" && isBuiltInType(context.parent.tag, "transition"))) {
15067
+ !(context.parent && context.parent.type === 1 && isBuiltInType(context.parent.tag, "transition"))) {
15062
15068
  branch.children = [...comments, ...branch.children];
15063
15069
  }
15064
15070
  {
@@ -15068,7 +15074,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15068
15074
  if (isSameKey(userKey, key)) {
15069
15075
  context.onError(
15070
15076
  createCompilerError(
15071
- "29",
15077
+ 29,
15072
15078
  branch.userKey.loc
15073
15079
  )
15074
15080
  );
@@ -15084,7 +15090,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15084
15090
  context.currentNode = null;
15085
15091
  } else {
15086
15092
  context.onError(
15087
- createCompilerError("30", node.loc)
15093
+ createCompilerError(30, node.loc)
15088
15094
  );
15089
15095
  }
15090
15096
  break;
@@ -15092,9 +15098,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15092
15098
  }
15093
15099
  }
15094
15100
  function createIfBranch(node, dir) {
15095
- const isTemplateIf = node.tagType === "3";
15101
+ const isTemplateIf = node.tagType === 3;
15096
15102
  return {
15097
- type: "10",
15103
+ type: 10,
15098
15104
  loc: node.loc,
15099
15105
  condition: dir.name === "else" ? void 0 : dir.exp,
15100
15106
  children: isTemplateIf && !findDir(node, "for") ? node.children : [node],
@@ -15126,21 +15132,21 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15126
15132
  `${keyIndex}`,
15127
15133
  false,
15128
15134
  locStub,
15129
- "2"
15135
+ 2
15130
15136
  )
15131
15137
  );
15132
15138
  const { children } = branch;
15133
15139
  const firstChild = children[0];
15134
- const needFragmentWrapper = children.length !== 1 || firstChild.type !== "1";
15140
+ const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
15135
15141
  if (needFragmentWrapper) {
15136
- if (children.length === 1 && firstChild.type === "11") {
15142
+ if (children.length === 1 && firstChild.type === 11) {
15137
15143
  const vnodeCall = firstChild.codegenNode;
15138
15144
  injectProp(vnodeCall, keyProperty, context);
15139
15145
  return vnodeCall;
15140
15146
  } else {
15141
15147
  let patchFlag = 64;
15142
15148
  let patchFlagText = PatchFlagNames[64];
15143
- if (!branch.isTemplateIf && children.filter((c) => c.type !== "3").length === 1) {
15149
+ if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
15144
15150
  patchFlag |= 2048;
15145
15151
  patchFlagText += `, ${PatchFlagNames[2048]}`;
15146
15152
  }
@@ -15161,8 +15167,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15161
15167
  } else {
15162
15168
  const ret = firstChild.codegenNode;
15163
15169
  const vnodeCall = getMemoedVNodeCall(ret);
15164
- if (vnodeCall.type === "13") {
15165
- makeBlock(vnodeCall, context);
15170
+ if (vnodeCall.type === 13) {
15171
+ convertToBlock(vnodeCall, context);
15166
15172
  }
15167
15173
  injectProp(vnodeCall, keyProperty, context);
15168
15174
  return ret;
@@ -15172,7 +15178,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15172
15178
  if (!a || a.type !== b.type) {
15173
15179
  return false;
15174
15180
  }
15175
- if (a.type === "6") {
15181
+ if (a.type === 6) {
15176
15182
  if (a.value.content !== b.value.content) {
15177
15183
  return false;
15178
15184
  }
@@ -15182,7 +15188,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15182
15188
  if (exp.type !== branchExp.type) {
15183
15189
  return false;
15184
15190
  }
15185
- if (exp.type !== "4" || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
15191
+ if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
15186
15192
  return false;
15187
15193
  }
15188
15194
  }
@@ -15190,13 +15196,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15190
15196
  }
15191
15197
  function getParentCondition(node) {
15192
15198
  while (true) {
15193
- if (node.type === "19") {
15194
- if (node.alternate.type === "19") {
15199
+ if (node.type === 19) {
15200
+ if (node.alternate.type === 19) {
15195
15201
  node = node.alternate;
15196
15202
  } else {
15197
15203
  return node;
15198
15204
  }
15199
- } else if (node.type === "20") {
15205
+ } else if (node.type === 20) {
15200
15206
  node = node.value;
15201
15207
  }
15202
15208
  }
@@ -15213,9 +15219,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15213
15219
  const isTemplate = isTemplateNode(node);
15214
15220
  const memo = findDir(node, "memo");
15215
15221
  const keyProp = findProp(node, `key`);
15216
- const keyExp = keyProp && (keyProp.type === "6" ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
15222
+ const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
15217
15223
  const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
15218
- const isStableFragment = forNode.source.type === "4" && forNode.source.constType > 0;
15224
+ const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
15219
15225
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
15220
15226
  forNode.codegenNode = createVNodeCall(
15221
15227
  context,
@@ -15235,12 +15241,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15235
15241
  const { children } = forNode;
15236
15242
  if (isTemplate) {
15237
15243
  node.children.some((c) => {
15238
- if (c.type === "1") {
15244
+ if (c.type === 1) {
15239
15245
  const key = findProp(c, "key");
15240
15246
  if (key) {
15241
15247
  context.onError(
15242
15248
  createCompilerError(
15243
- "33",
15249
+ 33,
15244
15250
  key.loc
15245
15251
  )
15246
15252
  );
@@ -15249,7 +15255,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15249
15255
  }
15250
15256
  });
15251
15257
  }
15252
- const needFragmentWrapper = children.length !== 1 || children[0].type !== "1";
15258
+ const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
15253
15259
  const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
15254
15260
  if (slotOutlet) {
15255
15261
  childBlock = slotOutlet.codegenNode;
@@ -15336,7 +15342,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15336
15342
  function processFor(node, dir, context, processCodegen) {
15337
15343
  if (!dir.exp) {
15338
15344
  context.onError(
15339
- createCompilerError("31", dir.loc)
15345
+ createCompilerError(31, dir.loc)
15340
15346
  );
15341
15347
  return;
15342
15348
  }
@@ -15348,14 +15354,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15348
15354
  );
15349
15355
  if (!parseResult) {
15350
15356
  context.onError(
15351
- createCompilerError("32", dir.loc)
15357
+ createCompilerError(32, dir.loc)
15352
15358
  );
15353
15359
  return;
15354
15360
  }
15355
15361
  const { addIdentifiers, removeIdentifiers, scopes } = context;
15356
15362
  const { source, value, key, index } = parseResult;
15357
15363
  const forNode = {
15358
- type: "11",
15364
+ type: 11,
15359
15365
  loc: dir.loc,
15360
15366
  source,
15361
15367
  valueAlias: value,
@@ -15468,7 +15474,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15468
15474
 
15469
15475
  const defaultFallback = createSimpleExpression(`undefined`, false);
15470
15476
  const trackSlotScopes = (node, context) => {
15471
- if (node.type === "1" && (node.tagType === "1" || node.tagType === "3")) {
15477
+ if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
15472
15478
  const vSlot = findDir(node, "slot");
15473
15479
  if (vSlot) {
15474
15480
  vSlot.exp;
@@ -15514,14 +15520,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15514
15520
  const slotElement = children[i];
15515
15521
  let slotDir;
15516
15522
  if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
15517
- if (slotElement.type !== "3") {
15523
+ if (slotElement.type !== 3) {
15518
15524
  implicitDefaultChildren.push(slotElement);
15519
15525
  }
15520
15526
  continue;
15521
15527
  }
15522
15528
  if (onComponentSlot) {
15523
15529
  context.onError(
15524
- createCompilerError("37", slotDir.loc)
15530
+ createCompilerError(37, slotDir.loc)
15525
15531
  );
15526
15532
  break;
15527
15533
  }
@@ -15561,7 +15567,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15561
15567
  let prev;
15562
15568
  while (j--) {
15563
15569
  prev = children[j];
15564
- if (prev.type !== "3") {
15570
+ if (prev.type !== 3) {
15565
15571
  break;
15566
15572
  }
15567
15573
  }
@@ -15569,7 +15575,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15569
15575
  children.splice(i, 1);
15570
15576
  i--;
15571
15577
  let conditional = dynamicSlots[dynamicSlots.length - 1];
15572
- while (conditional.alternate.type === "19") {
15578
+ while (conditional.alternate.type === 19) {
15573
15579
  conditional = conditional.alternate;
15574
15580
  }
15575
15581
  conditional.alternate = vElse.exp ? createConditionalExpression(
@@ -15583,7 +15589,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15583
15589
  ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);
15584
15590
  } else {
15585
15591
  context.onError(
15586
- createCompilerError("30", vElse.loc)
15592
+ createCompilerError(30, vElse.loc)
15587
15593
  );
15588
15594
  }
15589
15595
  } else if (vFor = findDir(slotElement, "for")) {
@@ -15603,7 +15609,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15603
15609
  );
15604
15610
  } else {
15605
15611
  context.onError(
15606
- createCompilerError("32", vFor.loc)
15612
+ createCompilerError(32, vFor.loc)
15607
15613
  );
15608
15614
  }
15609
15615
  } else {
@@ -15611,7 +15617,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15611
15617
  if (seenSlotNames.has(staticSlotName)) {
15612
15618
  context.onError(
15613
15619
  createCompilerError(
15614
- "38",
15620
+ 38,
15615
15621
  dirLoc
15616
15622
  )
15617
15623
  );
@@ -15642,7 +15648,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15642
15648
  if (hasNamedDefaultSlot) {
15643
15649
  context.onError(
15644
15650
  createCompilerError(
15645
- "39",
15651
+ 39,
15646
15652
  implicitDefaultChildren[0].loc
15647
15653
  )
15648
15654
  );
@@ -15695,17 +15701,17 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15695
15701
  for (let i = 0; i < children.length; i++) {
15696
15702
  const child = children[i];
15697
15703
  switch (child.type) {
15698
- case "1":
15699
- if (child.tagType === "2" || hasForwardedSlots(child.children)) {
15704
+ case 1:
15705
+ if (child.tagType === 2 || hasForwardedSlots(child.children)) {
15700
15706
  return true;
15701
15707
  }
15702
15708
  break;
15703
- case "9":
15709
+ case 9:
15704
15710
  if (hasForwardedSlots(child.branches))
15705
15711
  return true;
15706
15712
  break;
15707
- case "10":
15708
- case "11":
15713
+ case 10:
15714
+ case 11:
15709
15715
  if (hasForwardedSlots(child.children))
15710
15716
  return true;
15711
15717
  break;
@@ -15714,20 +15720,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15714
15720
  return false;
15715
15721
  }
15716
15722
  function isNonWhitespaceContent(node) {
15717
- if (node.type !== "2" && node.type !== "12")
15723
+ if (node.type !== 2 && node.type !== 12)
15718
15724
  return true;
15719
- return node.type === "2" ? !!node.content.trim() : isNonWhitespaceContent(node.content);
15725
+ return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
15720
15726
  }
15721
15727
 
15722
15728
  const directiveImportMap = /* @__PURE__ */ new WeakMap();
15723
15729
  const transformElement = (node, context) => {
15724
15730
  return function postTransformElement() {
15725
15731
  node = context.currentNode;
15726
- if (!(node.type === "1" && (node.tagType === "0" || node.tagType === "1"))) {
15732
+ if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
15727
15733
  return;
15728
15734
  }
15729
15735
  const { tag, props } = node;
15730
- const isComponent = node.tagType === "1";
15736
+ const isComponent = node.tagType === 1;
15731
15737
  let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`;
15732
15738
  const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
15733
15739
  let vnodeProps;
@@ -15770,7 +15776,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15770
15776
  patchFlag |= 1024;
15771
15777
  if (node.children.length > 1) {
15772
15778
  context.onError(
15773
- createCompilerError("46", {
15779
+ createCompilerError(46, {
15774
15780
  start: node.children[0].loc.start,
15775
15781
  end: node.children[node.children.length - 1].loc.end,
15776
15782
  source: ""
@@ -15790,11 +15796,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15790
15796
  } else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
15791
15797
  const child = node.children[0];
15792
15798
  const type = child.type;
15793
- const hasDynamicTextChild = type === "5" || type === "8";
15799
+ const hasDynamicTextChild = type === 5 || type === 8;
15794
15800
  if (hasDynamicTextChild && getConstantType(child, context) === 0) {
15795
15801
  patchFlag |= 1;
15796
15802
  }
15797
- if (hasDynamicTextChild || type === "2") {
15803
+ if (hasDynamicTextChild || type === 2) {
15798
15804
  vnodeChildren = child;
15799
15805
  } else {
15800
15806
  vnodeChildren = node.children;
@@ -15840,13 +15846,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15840
15846
  "COMPILER_IS_ON_ELEMENT",
15841
15847
  context
15842
15848
  )) {
15843
- const exp = isProp.type === "6" ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
15849
+ const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
15844
15850
  if (exp) {
15845
15851
  return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
15846
15852
  exp
15847
15853
  ]);
15848
15854
  }
15849
- } else if (isProp.type === "6" && isProp.value.content.startsWith("vue:")) {
15855
+ } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) {
15850
15856
  tag = isProp.value.content.slice(4);
15851
15857
  }
15852
15858
  }
@@ -15905,7 +15911,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15905
15911
  if (isEventHandler && isReservedProp(name)) {
15906
15912
  hasVnodeHook = true;
15907
15913
  }
15908
- if (value.type === "20" || (value.type === "4" || value.type === "8") && getConstantType(value, context) > 0) {
15914
+ if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
15909
15915
  return;
15910
15916
  }
15911
15917
  if (name === "ref") {
@@ -15926,7 +15932,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15926
15932
  };
15927
15933
  for (let i = 0; i < props.length; i++) {
15928
15934
  const prop = props[i];
15929
- if (prop.type === "6") {
15935
+ if (prop.type === 6) {
15930
15936
  const { loc, name, value } = prop;
15931
15937
  let isStatic = true;
15932
15938
  if (name === "ref") {
@@ -15967,7 +15973,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15967
15973
  if (name === "slot") {
15968
15974
  if (!isComponent) {
15969
15975
  context.onError(
15970
- createCompilerError("40", loc)
15976
+ createCompilerError(40, loc)
15971
15977
  );
15972
15978
  }
15973
15979
  continue;
@@ -16008,9 +16014,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16008
16014
  {
16009
16015
  {
16010
16016
  const hasOverridableKeys = mergeArgs.some((arg2) => {
16011
- if (arg2.type === "15") {
16017
+ if (arg2.type === 15) {
16012
16018
  return arg2.properties.some(({ key }) => {
16013
- if (key.type !== "4" || !key.isStatic) {
16019
+ if (key.type !== 4 || !key.isStatic) {
16014
16020
  return true;
16015
16021
  }
16016
16022
  return key.content !== "class" && key.content !== "style" && !isOn(key.content);
@@ -16038,7 +16044,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16038
16044
  mergeArgs.push(exp);
16039
16045
  } else {
16040
16046
  pushMergeArg({
16041
- type: "14",
16047
+ type: 14,
16042
16048
  loc,
16043
16049
  callee: context.helper(TO_HANDLERS),
16044
16050
  arguments: isComponent ? [exp] : [exp, `true`]
@@ -16047,7 +16053,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16047
16053
  } else {
16048
16054
  context.onError(
16049
16055
  createCompilerError(
16050
- isVBind ? "34" : "35",
16056
+ isVBind ? 34 : 35,
16051
16057
  loc
16052
16058
  )
16053
16059
  );
@@ -16116,7 +16122,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16116
16122
  }
16117
16123
  if (!context.inSSR && propsExpression) {
16118
16124
  switch (propsExpression.type) {
16119
- case "15":
16125
+ case 15:
16120
16126
  let classKeyIndex = -1;
16121
16127
  let styleKeyIndex = -1;
16122
16128
  let hasDynamicKey = false;
@@ -16143,9 +16149,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16143
16149
  }
16144
16150
  if (styleProp && // the static style is compiled into an object,
16145
16151
  // so use `hasStyleBinding` to ensure that it is a dynamic style binding
16146
- (hasStyleBinding || styleProp.value.type === "4" && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
16152
+ (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
16147
16153
  // v-bind:style with static literal object
16148
- styleProp.value.type === "17")) {
16154
+ styleProp.value.type === 17)) {
16149
16155
  styleProp.value = createCallExpression(
16150
16156
  context.helper(NORMALIZE_STYLE),
16151
16157
  [styleProp.value]
@@ -16158,7 +16164,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16158
16164
  );
16159
16165
  }
16160
16166
  break;
16161
- case "14":
16167
+ case 14:
16162
16168
  break;
16163
16169
  default:
16164
16170
  propsExpression = createCallExpression(
@@ -16185,7 +16191,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16185
16191
  const deduped = [];
16186
16192
  for (let i = 0; i < properties.length; i++) {
16187
16193
  const prop = properties[i];
16188
- if (prop.key.type === "8" || !prop.key.isStatic) {
16194
+ if (prop.key.type === 8 || !prop.key.isStatic) {
16189
16195
  deduped.push(prop);
16190
16196
  continue;
16191
16197
  }
@@ -16203,7 +16209,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16203
16209
  return deduped;
16204
16210
  }
16205
16211
  function mergeAsArray(existing, incoming) {
16206
- if (existing.value.type === "17") {
16212
+ if (existing.value.type === 17) {
16207
16213
  existing.value.elements.push(incoming.value);
16208
16214
  } else {
16209
16215
  existing.value = createArrayExpression(
@@ -16302,7 +16308,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16302
16308
  const nonNameProps = [];
16303
16309
  for (let i = 0; i < node.props.length; i++) {
16304
16310
  const p = node.props[i];
16305
- if (p.type === "6") {
16311
+ if (p.type === 6) {
16306
16312
  if (p.value) {
16307
16313
  if (p.name === "name") {
16308
16314
  slotName = JSON.stringify(p.value.content);
@@ -16335,7 +16341,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16335
16341
  if (directives.length) {
16336
16342
  context.onError(
16337
16343
  createCompilerError(
16338
- "36",
16344
+ 36,
16339
16345
  directives[0].loc
16340
16346
  )
16341
16347
  );
@@ -16351,16 +16357,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16351
16357
  const transformOn$1 = (dir, node, context, augmentor) => {
16352
16358
  const { loc, modifiers, arg } = dir;
16353
16359
  if (!dir.exp && !modifiers.length) {
16354
- context.onError(createCompilerError("35", loc));
16360
+ context.onError(createCompilerError(35, loc));
16355
16361
  }
16356
16362
  let eventName;
16357
- if (arg.type === "4") {
16363
+ if (arg.type === 4) {
16358
16364
  if (arg.isStatic) {
16359
16365
  let rawName = arg.content;
16360
16366
  if (rawName.startsWith("vue:")) {
16361
16367
  rawName = `vnode-${rawName.slice(4)}`;
16362
16368
  }
16363
- const eventString = node.tagType !== "0" || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
16369
+ const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
16364
16370
  // for non-element and vnode lifecycle event listeners, auto convert
16365
16371
  // it to camelCase. See issue #2249
16366
16372
  toHandlerKey(camelize(rawName))
@@ -16428,14 +16434,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16428
16434
  const transformBind = (dir, _node, context) => {
16429
16435
  const { exp, modifiers, loc } = dir;
16430
16436
  const arg = dir.arg;
16431
- if (arg.type !== "4") {
16437
+ if (arg.type !== 4) {
16432
16438
  arg.children.unshift(`(`);
16433
16439
  arg.children.push(`) || ""`);
16434
16440
  } else if (!arg.isStatic) {
16435
16441
  arg.content = `${arg.content} || ""`;
16436
16442
  }
16437
16443
  if (modifiers.includes("camel")) {
16438
- if (arg.type === "4") {
16444
+ if (arg.type === 4) {
16439
16445
  if (arg.isStatic) {
16440
16446
  arg.content = camelize(arg.content);
16441
16447
  } else {
@@ -16454,8 +16460,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16454
16460
  injectPrefix(arg, "^");
16455
16461
  }
16456
16462
  }
16457
- if (!exp || exp.type === "4" && !exp.content.trim()) {
16458
- context.onError(createCompilerError("34", loc));
16463
+ if (!exp || exp.type === 4 && !exp.content.trim()) {
16464
+ context.onError(createCompilerError(34, loc));
16459
16465
  return {
16460
16466
  props: [createObjectProperty(arg, createSimpleExpression("", true, loc))]
16461
16467
  };
@@ -16465,7 +16471,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16465
16471
  };
16466
16472
  };
16467
16473
  const injectPrefix = (arg, prefix) => {
16468
- if (arg.type === "4") {
16474
+ if (arg.type === 4) {
16469
16475
  if (arg.isStatic) {
16470
16476
  arg.content = prefix + arg.content;
16471
16477
  } else {
@@ -16478,7 +16484,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16478
16484
  };
16479
16485
 
16480
16486
  const transformText = (node, context) => {
16481
- if (node.type === "0" || node.type === "1" || node.type === "11" || node.type === "10") {
16487
+ if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
16482
16488
  return () => {
16483
16489
  const children = node.children;
16484
16490
  let currentContainer = void 0;
@@ -16510,13 +16516,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16510
16516
  // as-is since the runtime has dedicated fast path for this by directly
16511
16517
  // setting textContent of the element.
16512
16518
  // for component root it's always normalized anyway.
16513
- children.length === 1 && (node.type === "0" || node.type === "1" && node.tagType === "0" && // #3756
16519
+ children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
16514
16520
  // custom directives can potentially add DOM elements arbitrarily,
16515
16521
  // we need to avoid setting textContent of the element at runtime
16516
16522
  // to avoid accidentally overwriting the DOM elements added
16517
16523
  // by the user through custom directives.
16518
16524
  !node.props.find(
16519
- (p) => p.type === "7" && !context.directiveTransforms[p.name]
16525
+ (p) => p.type === 7 && !context.directiveTransforms[p.name]
16520
16526
  ) && // in compat mode, <template> tags with no special directives
16521
16527
  // will be rendered as a fragment so its children must be
16522
16528
  // converted into vnodes.
@@ -16525,9 +16531,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16525
16531
  }
16526
16532
  for (let i = 0; i < children.length; i++) {
16527
16533
  const child = children[i];
16528
- if (isText$1(child) || child.type === "8") {
16534
+ if (isText$1(child) || child.type === 8) {
16529
16535
  const callArgs = [];
16530
- if (child.type !== "2" || child.content !== " ") {
16536
+ if (child.type !== 2 || child.content !== " ") {
16531
16537
  callArgs.push(child);
16532
16538
  }
16533
16539
  if (!context.ssr && getConstantType(child, context) === 0) {
@@ -16536,7 +16542,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16536
16542
  );
16537
16543
  }
16538
16544
  children[i] = {
16539
- type: "12",
16545
+ type: 12,
16540
16546
  content: child,
16541
16547
  loc: child.loc,
16542
16548
  codegenNode: createCallExpression(
@@ -16552,7 +16558,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16552
16558
 
16553
16559
  const seen$1 = /* @__PURE__ */ new WeakSet();
16554
16560
  const transformOnce = (node, context) => {
16555
- if (node.type === "1" && findDir(node, "once", true)) {
16561
+ if (node.type === 1 && findDir(node, "once", true)) {
16556
16562
  if (seen$1.has(node) || context.inVOnce) {
16557
16563
  return;
16558
16564
  }
@@ -16577,21 +16583,21 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16577
16583
  const { exp, arg } = dir;
16578
16584
  if (!exp) {
16579
16585
  context.onError(
16580
- createCompilerError("41", dir.loc)
16586
+ createCompilerError(41, dir.loc)
16581
16587
  );
16582
16588
  return createTransformProps();
16583
16589
  }
16584
16590
  const rawExp = exp.loc.source;
16585
- const expString = exp.type === "4" ? exp.content : rawExp;
16591
+ const expString = exp.type === 4 ? exp.content : rawExp;
16586
16592
  const bindingType = context.bindingMetadata[rawExp];
16587
16593
  if (bindingType === "props" || bindingType === "props-aliased") {
16588
- context.onError(createCompilerError("44", exp.loc));
16594
+ context.onError(createCompilerError(44, exp.loc));
16589
16595
  return createTransformProps();
16590
16596
  }
16591
16597
  const maybeRef = false;
16592
16598
  if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) {
16593
16599
  context.onError(
16594
- createCompilerError("42", exp.loc)
16600
+ createCompilerError(42, exp.loc)
16595
16601
  );
16596
16602
  return createTransformProps();
16597
16603
  }
@@ -16612,7 +16618,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16612
16618
  // "onUpdate:modelValue": $event => (foo = $event)
16613
16619
  createObjectProperty(eventName, assignmentExp)
16614
16620
  ];
16615
- if (dir.modifiers.length && node.tagType === "1") {
16621
+ if (dir.modifiers.length && node.tagType === 1) {
16616
16622
  const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
16617
16623
  const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
16618
16624
  props.push(
@@ -16622,7 +16628,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16622
16628
  `{ ${modifiers} }`,
16623
16629
  false,
16624
16630
  dir.loc,
16625
- "2"
16631
+ 2
16626
16632
  )
16627
16633
  )
16628
16634
  );
@@ -16638,30 +16644,30 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16638
16644
  if (!isCompatEnabled("COMPILER_FILTER", context)) {
16639
16645
  return;
16640
16646
  }
16641
- if (node.type === "5") {
16647
+ if (node.type === 5) {
16642
16648
  rewriteFilter(node.content, context);
16643
16649
  }
16644
- if (node.type === "1") {
16650
+ if (node.type === 1) {
16645
16651
  node.props.forEach((prop) => {
16646
- if (prop.type === "7" && prop.name !== "for" && prop.exp) {
16652
+ if (prop.type === 7 && prop.name !== "for" && prop.exp) {
16647
16653
  rewriteFilter(prop.exp, context);
16648
16654
  }
16649
16655
  });
16650
16656
  }
16651
16657
  };
16652
16658
  function rewriteFilter(node, context) {
16653
- if (node.type === "4") {
16659
+ if (node.type === 4) {
16654
16660
  parseFilter(node, context);
16655
16661
  } else {
16656
16662
  for (let i = 0; i < node.children.length; i++) {
16657
16663
  const child = node.children[i];
16658
16664
  if (typeof child !== "object")
16659
16665
  continue;
16660
- if (child.type === "4") {
16666
+ if (child.type === 4) {
16661
16667
  parseFilter(child, context);
16662
- } else if (child.type === "8") {
16668
+ } else if (child.type === 8) {
16663
16669
  rewriteFilter(node, context);
16664
- } else if (child.type === "5") {
16670
+ } else if (child.type === 5) {
16665
16671
  rewriteFilter(child.content, context);
16666
16672
  }
16667
16673
  }
@@ -16782,7 +16788,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16782
16788
 
16783
16789
  const seen = /* @__PURE__ */ new WeakSet();
16784
16790
  const transformMemo = (node, context) => {
16785
- if (node.type === "1") {
16791
+ if (node.type === 1) {
16786
16792
  const dir = findDir(node, "memo");
16787
16793
  if (!dir || seen.has(node)) {
16788
16794
  return;
@@ -16790,9 +16796,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16790
16796
  seen.add(node);
16791
16797
  return () => {
16792
16798
  const codegenNode = node.codegenNode || context.currentNode.codegenNode;
16793
- if (codegenNode && codegenNode.type === "13") {
16794
- if (node.tagType !== "1") {
16795
- makeBlock(codegenNode, context);
16799
+ if (codegenNode && codegenNode.type === 13) {
16800
+ if (node.tagType !== 1) {
16801
+ convertToBlock(codegenNode, context);
16796
16802
  }
16797
16803
  node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
16798
16804
  dir.exp,
@@ -16831,17 +16837,17 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16831
16837
  const isModuleMode = options.mode === "module";
16832
16838
  {
16833
16839
  if (options.prefixIdentifiers === true) {
16834
- onError(createCompilerError("47"));
16840
+ onError(createCompilerError(47));
16835
16841
  } else if (isModuleMode) {
16836
- onError(createCompilerError("48"));
16842
+ onError(createCompilerError(48));
16837
16843
  }
16838
16844
  }
16839
16845
  const prefixIdentifiers = false;
16840
16846
  if (options.cacheHandlers) {
16841
- onError(createCompilerError("49"));
16847
+ onError(createCompilerError(49));
16842
16848
  }
16843
16849
  if (options.scopeId && !isModuleMode) {
16844
- onError(createCompilerError("50"));
16850
+ onError(createCompilerError(50));
16845
16851
  }
16846
16852
  const ast = isString(template) ? baseParse(template, options) : template;
16847
16853
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
@@ -16928,30 +16934,30 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16928
16934
  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
16929
16935
  getNamespace(tag, parent) {
16930
16936
  let ns = parent ? parent.ns : 0;
16931
- if (parent && ns === "2") {
16937
+ if (parent && ns === 2) {
16932
16938
  if (parent.tag === "annotation-xml") {
16933
16939
  if (tag === "svg") {
16934
- return "1";
16940
+ return 1;
16935
16941
  }
16936
16942
  if (parent.props.some(
16937
- (a) => a.type === "6" && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
16943
+ (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
16938
16944
  )) {
16939
16945
  ns = 0;
16940
16946
  }
16941
16947
  } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
16942
16948
  ns = 0;
16943
16949
  }
16944
- } else if (parent && ns === "1") {
16950
+ } else if (parent && ns === 1) {
16945
16951
  if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
16946
16952
  ns = 0;
16947
16953
  }
16948
16954
  }
16949
16955
  if (ns === 0) {
16950
16956
  if (tag === "svg") {
16951
- return "1";
16957
+ return 1;
16952
16958
  }
16953
16959
  if (tag === "math") {
16954
- return "2";
16960
+ return 2;
16955
16961
  }
16956
16962
  }
16957
16963
  return ns;
@@ -16960,22 +16966,22 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16960
16966
  getTextMode({ tag, ns }) {
16961
16967
  if (ns === 0) {
16962
16968
  if (tag === "textarea" || tag === "title") {
16963
- return "1";
16969
+ return 1;
16964
16970
  }
16965
16971
  if (isRawTextContainer(tag)) {
16966
- return "2";
16972
+ return 2;
16967
16973
  }
16968
16974
  }
16969
- return "0";
16975
+ return 0;
16970
16976
  }
16971
16977
  };
16972
16978
 
16973
16979
  const transformStyle = (node) => {
16974
- if (node.type === "1") {
16980
+ if (node.type === 1) {
16975
16981
  node.props.forEach((p, i) => {
16976
- if (p.type === "6" && p.name === "style" && p.value) {
16982
+ if (p.type === 6 && p.name === "style" && p.value) {
16977
16983
  node.props[i] = {
16978
- type: "7",
16984
+ type: 7,
16979
16985
  name: `bind`,
16980
16986
  arg: createSimpleExpression(`style`, true, p.loc),
16981
16987
  exp: parseInlineCSS(p.value.content, p.loc),
@@ -16992,7 +16998,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
16992
16998
  JSON.stringify(normalized),
16993
16999
  false,
16994
17000
  loc,
16995
- "3"
17001
+ 3
16996
17002
  );
16997
17003
  };
16998
17004
 
@@ -17005,16 +17011,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17005
17011
  }
17006
17012
  const DOMErrorMessages = {
17007
17013
  [51]: `v-html is missing expression.`,
17008
- ["52"]: `v-html will override element children.`,
17009
- ["53"]: `v-text is missing expression.`,
17010
- ["54"]: `v-text will override element children.`,
17011
- ["55"]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
17012
- ["56"]: `v-model argument is not supported on plain elements.`,
17013
- ["57"]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
17014
- ["58"]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
17015
- ["59"]: `v-show is missing expression.`,
17016
- ["60"]: `<Transition> expects exactly one child element or component.`,
17017
- ["61"]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
17014
+ [52]: `v-html will override element children.`,
17015
+ [53]: `v-text is missing expression.`,
17016
+ [54]: `v-text will override element children.`,
17017
+ [55]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
17018
+ [56]: `v-model argument is not supported on plain elements.`,
17019
+ [57]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
17020
+ [58]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
17021
+ [59]: `v-show is missing expression.`,
17022
+ [60]: `<Transition> expects exactly one child element or component.`,
17023
+ [61]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
17018
17024
  };
17019
17025
 
17020
17026
  const transformVHtml = (dir, node, context) => {
@@ -17026,7 +17032,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17026
17032
  }
17027
17033
  if (node.children.length) {
17028
17034
  context.onError(
17029
- createDOMCompilerError("52", loc)
17035
+ createDOMCompilerError(52, loc)
17030
17036
  );
17031
17037
  node.children.length = 0;
17032
17038
  }
@@ -17044,12 +17050,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17044
17050
  const { exp, loc } = dir;
17045
17051
  if (!exp) {
17046
17052
  context.onError(
17047
- createDOMCompilerError("53", loc)
17053
+ createDOMCompilerError(53, loc)
17048
17054
  );
17049
17055
  }
17050
17056
  if (node.children.length) {
17051
17057
  context.onError(
17052
- createDOMCompilerError("54", loc)
17058
+ createDOMCompilerError(54, loc)
17053
17059
  );
17054
17060
  node.children.length = 0;
17055
17061
  }
@@ -17069,13 +17075,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17069
17075
 
17070
17076
  const transformModel = (dir, node, context) => {
17071
17077
  const baseResult = transformModel$1(dir, node, context);
17072
- if (!baseResult.props.length || node.tagType === "1") {
17078
+ if (!baseResult.props.length || node.tagType === 1) {
17073
17079
  return baseResult;
17074
17080
  }
17075
17081
  if (dir.arg) {
17076
17082
  context.onError(
17077
17083
  createDOMCompilerError(
17078
- "56",
17084
+ 56,
17079
17085
  dir.arg.loc
17080
17086
  )
17081
17087
  );
@@ -17085,7 +17091,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17085
17091
  if (value) {
17086
17092
  context.onError(
17087
17093
  createDOMCompilerError(
17088
- "58",
17094
+ 58,
17089
17095
  value.loc
17090
17096
  )
17091
17097
  );
@@ -17099,7 +17105,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17099
17105
  if (tag === "input" || isCustomElement) {
17100
17106
  const type = findProp(node, `type`);
17101
17107
  if (type) {
17102
- if (type.type === "7") {
17108
+ if (type.type === 7) {
17103
17109
  directiveToUse = V_MODEL_DYNAMIC;
17104
17110
  } else if (type.value) {
17105
17111
  switch (type.value.content) {
@@ -17113,7 +17119,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17113
17119
  isInvalidType = true;
17114
17120
  context.onError(
17115
17121
  createDOMCompilerError(
17116
- "57",
17122
+ 57,
17117
17123
  dir.loc
17118
17124
  )
17119
17125
  );
@@ -17139,13 +17145,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17139
17145
  } else {
17140
17146
  context.onError(
17141
17147
  createDOMCompilerError(
17142
- "55",
17148
+ 55,
17143
17149
  dir.loc
17144
17150
  )
17145
17151
  );
17146
17152
  }
17147
17153
  baseResult.props = baseResult.props.filter(
17148
- (p) => !(p.key.type === "4" && p.key.content === "modelValue")
17154
+ (p) => !(p.key.type === 4 && p.key.content === "modelValue")
17149
17155
  );
17150
17156
  return baseResult;
17151
17157
  };
@@ -17203,7 +17209,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17203
17209
  };
17204
17210
  const transformClick = (key, event) => {
17205
17211
  const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick";
17206
- return isStaticClick ? createSimpleExpression(event, true) : key.type !== "4" ? createCompoundExpression([
17212
+ return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([
17207
17213
  `(`,
17208
17214
  key,
17209
17215
  `) === "onClick" ? "${event}" : (`,
@@ -17251,7 +17257,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17251
17257
  const { exp, loc } = dir;
17252
17258
  if (!exp) {
17253
17259
  context.onError(
17254
- createDOMCompilerError("59", loc)
17260
+ createDOMCompilerError(59, loc)
17255
17261
  );
17256
17262
  }
17257
17263
  return {
@@ -17261,7 +17267,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17261
17267
  };
17262
17268
 
17263
17269
  const transformTransition = (node, context) => {
17264
- if (node.type === "1" && node.tagType === "1") {
17270
+ if (node.type === 1 && node.tagType === 1) {
17265
17271
  const component = context.isBuiltInComponent(node.tag);
17266
17272
  if (component === TRANSITION) {
17267
17273
  return () => {
@@ -17271,7 +17277,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17271
17277
  if (hasMultipleChildren(node)) {
17272
17278
  context.onError(
17273
17279
  createDOMCompilerError(
17274
- "60",
17280
+ 60,
17275
17281
  {
17276
17282
  start: node.children[0].loc.start,
17277
17283
  end: node.children[node.children.length - 1].loc.end,
@@ -17281,11 +17287,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17281
17287
  );
17282
17288
  }
17283
17289
  const child = node.children[0];
17284
- if (child.type === "1") {
17290
+ if (child.type === 1) {
17285
17291
  for (const p of child.props) {
17286
- if (p.type === "7" && p.name === "show") {
17292
+ if (p.type === 7 && p.name === "show") {
17287
17293
  node.props.push({
17288
- type: "6",
17294
+ type: 6,
17289
17295
  name: "persisted",
17290
17296
  value: void 0,
17291
17297
  loc: node.loc
@@ -17299,16 +17305,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17299
17305
  };
17300
17306
  function hasMultipleChildren(node) {
17301
17307
  const children = node.children = node.children.filter(
17302
- (c) => c.type !== "3" && !(c.type === "2" && !c.content.trim())
17308
+ (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
17303
17309
  );
17304
17310
  const child = children[0];
17305
- return children.length !== 1 || child.type === "11" || child.type === "9" && child.branches.some(hasMultipleChildren);
17311
+ return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
17306
17312
  }
17307
17313
 
17308
17314
  const ignoreSideEffectTags = (node, context) => {
17309
- if (node.type === "1" && node.tagType === "0" && (node.tag === "script" || node.tag === "style")) {
17315
+ if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
17310
17316
  context.onError(
17311
- createDOMCompilerError("61", node.loc)
17317
+ createDOMCompilerError(61, node.loc)
17312
17318
  );
17313
17319
  context.removeNode();
17314
17320
  }