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

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.
@@ -1475,7 +1475,7 @@ function warn(msg, ...args) {
1475
1475
  callWithErrorHandling(
1476
1476
  appWarnHandler,
1477
1477
  instance,
1478
- "11",
1478
+ 11,
1479
1479
  [
1480
1480
  msg + args.join(""),
1481
1481
  instance && instance.proxy,
@@ -1590,21 +1590,21 @@ const ErrorTypeStrings = {
1590
1590
  ["ec"]: "errorCaptured hook",
1591
1591
  ["rtc"]: "renderTracked hook",
1592
1592
  ["rtg"]: "renderTriggered hook",
1593
- ["0"]: "setup function",
1594
- ["1"]: "render function",
1595
- ["2"]: "watcher getter",
1596
- ["3"]: "watcher callback",
1597
- ["4"]: "watcher cleanup function",
1598
- ["5"]: "native event handler",
1599
- ["6"]: "component event handler",
1600
- ["7"]: "vnode hook",
1601
- ["8"]: "directive hook",
1602
- ["9"]: "transition hook",
1603
- ["10"]: "app errorHandler",
1604
- ["11"]: "app warnHandler",
1605
- ["12"]: "ref function",
1606
- ["13"]: "async component loader",
1607
- ["14"]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1593
+ [0]: "setup function",
1594
+ [1]: "render function",
1595
+ [2]: "watcher getter",
1596
+ [3]: "watcher callback",
1597
+ [4]: "watcher cleanup function",
1598
+ [5]: "native event handler",
1599
+ [6]: "component event handler",
1600
+ [7]: "vnode hook",
1601
+ [8]: "directive hook",
1602
+ [9]: "transition hook",
1603
+ [10]: "app errorHandler",
1604
+ [11]: "app warnHandler",
1605
+ [12]: "ref function",
1606
+ [13]: "async component loader",
1607
+ [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
1608
1608
  };
1609
1609
  function callWithErrorHandling(fn, instance, type, args) {
1610
1610
  let res;
@@ -1653,7 +1653,7 @@ function handleError(err, instance, type, throwInDev = true) {
1653
1653
  callWithErrorHandling(
1654
1654
  appErrorHandler,
1655
1655
  null,
1656
- "10",
1656
+ 10,
1657
1657
  [err, exposedInstance, errorInfo]
1658
1658
  );
1659
1659
  return;
@@ -1808,7 +1808,7 @@ function flushJobs(seen) {
1808
1808
  if (process.env.NODE_ENV !== "production" && check(job)) {
1809
1809
  continue;
1810
1810
  }
1811
- callWithErrorHandling(job, null, "14");
1811
+ callWithErrorHandling(job, null, 14);
1812
1812
  }
1813
1813
  }
1814
1814
  } finally {
@@ -2429,7 +2429,7 @@ function emit$1(instance, event, args) {
2429
2429
  callWithAsyncErrorHandling(
2430
2430
  cbs.map((cb) => cb.bind(instance.proxy)),
2431
2431
  instance,
2432
- "6",
2432
+ 6,
2433
2433
  args
2434
2434
  );
2435
2435
  }
@@ -2491,7 +2491,7 @@ function compatModelEmit(instance, event, args) {
2491
2491
  callWithErrorHandling(
2492
2492
  modelHandler,
2493
2493
  instance,
2494
- "6",
2494
+ 6,
2495
2495
  args
2496
2496
  );
2497
2497
  }
@@ -2563,7 +2563,7 @@ function emit(instance, event, ...rawArgs) {
2563
2563
  callWithAsyncErrorHandling(
2564
2564
  handler,
2565
2565
  instance,
2566
- "6",
2566
+ 6,
2567
2567
  args
2568
2568
  );
2569
2569
  }
@@ -2578,7 +2578,7 @@ function emit(instance, event, ...rawArgs) {
2578
2578
  callWithAsyncErrorHandling(
2579
2579
  onceHandler,
2580
2580
  instance,
2581
- "6",
2581
+ 6,
2582
2582
  args
2583
2583
  );
2584
2584
  }
@@ -2762,7 +2762,7 @@ function renderComponentRoot(instance) {
2762
2762
  }
2763
2763
  } catch (err) {
2764
2764
  blockStack.length = 0;
2765
- handleError(err, instance, "1");
2765
+ handleError(err, instance, 1);
2766
2766
  result = createVNode(Comment);
2767
2767
  }
2768
2768
  let root = result;
@@ -3289,7 +3289,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
3289
3289
  if (delayEnter) {
3290
3290
  activeBranch.transition.afterLeave = () => {
3291
3291
  if (pendingId === suspense.pendingId) {
3292
- move(pendingBranch, container2, anchor2, "0");
3292
+ move(pendingBranch, container2, anchor2, 0);
3293
3293
  }
3294
3294
  };
3295
3295
  }
@@ -3299,7 +3299,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
3299
3299
  unmount(activeBranch, parentComponent2, suspense, true);
3300
3300
  }
3301
3301
  if (!delayEnter) {
3302
- move(pendingBranch, container2, anchor2, "0");
3302
+ move(pendingBranch, container2, anchor2, 0);
3303
3303
  }
3304
3304
  }
3305
3305
  setActiveBranch(suspense, pendingBranch);
@@ -3377,7 +3377,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
3377
3377
  }
3378
3378
  const hydratedEl = instance.vnode.el;
3379
3379
  instance.asyncDep.catch((err) => {
3380
- handleError(err, instance, "0");
3380
+ handleError(err, instance, 0);
3381
3381
  }).then((asyncSetupResult) => {
3382
3382
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
3383
3383
  return;
@@ -3621,14 +3621,14 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3621
3621
  } else if (isReactive(s)) {
3622
3622
  return traverse(s);
3623
3623
  } else if (isFunction(s)) {
3624
- return callWithErrorHandling(s, instance, "2");
3624
+ return callWithErrorHandling(s, instance, 2);
3625
3625
  } else {
3626
3626
  process.env.NODE_ENV !== "production" && warnInvalidSource(s);
3627
3627
  }
3628
3628
  });
3629
3629
  } else if (isFunction(source)) {
3630
3630
  if (cb) {
3631
- getter = () => callWithErrorHandling(source, instance, "2");
3631
+ getter = () => callWithErrorHandling(source, instance, 2);
3632
3632
  } else {
3633
3633
  getter = () => {
3634
3634
  if (instance && instance.isUnmounted) {
@@ -3640,7 +3640,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3640
3640
  return callWithAsyncErrorHandling(
3641
3641
  source,
3642
3642
  instance,
3643
- "3",
3643
+ 3,
3644
3644
  [onCleanup]
3645
3645
  );
3646
3646
  };
@@ -3666,7 +3666,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3666
3666
  let cleanup;
3667
3667
  let onCleanup = (fn) => {
3668
3668
  cleanup = effect.onStop = () => {
3669
- callWithErrorHandling(fn, instance, "4");
3669
+ callWithErrorHandling(fn, instance, 4);
3670
3670
  };
3671
3671
  };
3672
3672
  let ssrCleanup;
@@ -3675,7 +3675,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3675
3675
  if (!cb) {
3676
3676
  getter();
3677
3677
  } else if (immediate) {
3678
- callWithAsyncErrorHandling(cb, instance, "3", [
3678
+ callWithAsyncErrorHandling(cb, instance, 3, [
3679
3679
  getter(),
3680
3680
  isMultiSource ? [] : void 0,
3681
3681
  onCleanup
@@ -3701,7 +3701,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
3701
3701
  if (cleanup) {
3702
3702
  cleanup();
3703
3703
  }
3704
- callWithAsyncErrorHandling(cb, instance, "3", [
3704
+ callWithAsyncErrorHandling(cb, instance, 3, [
3705
3705
  newValue,
3706
3706
  // pass undefined as the old value when it's changed for the first time
3707
3707
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
@@ -3983,7 +3983,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
3983
3983
  hook && callWithAsyncErrorHandling(
3984
3984
  hook,
3985
3985
  instance,
3986
- "9",
3986
+ 9,
3987
3987
  args
3988
3988
  );
3989
3989
  };
@@ -4215,7 +4215,7 @@ function defineAsyncComponent(source) {
4215
4215
  handleError(
4216
4216
  err,
4217
4217
  instance,
4218
- "13",
4218
+ 13,
4219
4219
  !errorComponent
4220
4220
  /* do not throw in dev if user provided error component */
4221
4221
  );
@@ -4320,7 +4320,7 @@ const KeepAliveImpl = {
4320
4320
  const storageContainer = createElement("div");
4321
4321
  sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
4322
4322
  const instance2 = vnode.component;
4323
- move(vnode, container, anchor, "0", parentSuspense);
4323
+ move(vnode, container, anchor, 0, parentSuspense);
4324
4324
  patch(
4325
4325
  instance2.vnode,
4326
4326
  vnode,
@@ -4348,7 +4348,7 @@ const KeepAliveImpl = {
4348
4348
  };
4349
4349
  sharedContext.deactivate = (vnode) => {
4350
4350
  const instance2 = vnode.component;
4351
- move(vnode, storageContainer, null, "1", parentSuspense);
4351
+ move(vnode, storageContainer, null, 1, parentSuspense);
4352
4352
  queuePostRenderEffect(() => {
4353
4353
  if (instance2.da) {
4354
4354
  invokeArrayFns(instance2.da);
@@ -4706,7 +4706,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
4706
4706
  }
4707
4707
  if (hook) {
4708
4708
  pauseTracking();
4709
- callWithAsyncErrorHandling(hook, instance, "8", [
4709
+ callWithAsyncErrorHandling(hook, instance, 8, [
4710
4710
  vnode.el,
4711
4711
  binding,
4712
4712
  vnode,
@@ -6691,7 +6691,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6691
6691
  return vm;
6692
6692
  }
6693
6693
  }
6694
- Vue.version = `2.6.14-compat:${"3.3.0-alpha.3"}`;
6694
+ Vue.version = `2.6.14-compat:${"3.3.0-alpha.4"}`;
6695
6695
  Vue.config = singletonApp.config;
6696
6696
  Vue.use = (p, ...options) => {
6697
6697
  if (p && isFunction(p.install)) {
@@ -7275,7 +7275,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
7275
7275
  }
7276
7276
  }
7277
7277
  if (isFunction(ref)) {
7278
- callWithErrorHandling(ref, owner, "12", [value, refs]);
7278
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
7279
7279
  } else {
7280
7280
  const _isString = isString(ref);
7281
7281
  const _isRef = isRef(ref);
@@ -8969,7 +8969,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8969
8969
  );
8970
8970
  } else if (moved) {
8971
8971
  if (j < 0 || i !== increasingNewIndexSequence[j]) {
8972
- move(nextChild, container, anchor, "2");
8972
+ move(nextChild, container, anchor, 2);
8973
8973
  } else {
8974
8974
  j--;
8975
8975
  }
@@ -9003,9 +9003,9 @@ function baseCreateRenderer(options, createHydrationFns) {
9003
9003
  moveStaticNode(vnode, container, anchor);
9004
9004
  return;
9005
9005
  }
9006
- const needTransition = moveType !== "2" && shapeFlag & 1 && transition;
9006
+ const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
9007
9007
  if (needTransition) {
9008
- if (moveType === "0") {
9008
+ if (moveType === 0) {
9009
9009
  transition.beforeEnter(el);
9010
9010
  hostInsert(el, container, anchor);
9011
9011
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
@@ -9412,7 +9412,7 @@ const TeleportImpl = {
9412
9412
  container,
9413
9413
  mainAnchor,
9414
9414
  internals,
9415
- "1"
9415
+ 1
9416
9416
  );
9417
9417
  }
9418
9418
  } else {
@@ -9427,7 +9427,7 @@ const TeleportImpl = {
9427
9427
  nextTarget,
9428
9428
  null,
9429
9429
  internals,
9430
- "0"
9430
+ 0
9431
9431
  );
9432
9432
  } else if (process.env.NODE_ENV !== "production") {
9433
9433
  warn(
@@ -9442,7 +9442,7 @@ const TeleportImpl = {
9442
9442
  target,
9443
9443
  targetAnchor,
9444
9444
  internals,
9445
- "1"
9445
+ 1
9446
9446
  );
9447
9447
  }
9448
9448
  }
@@ -9473,12 +9473,12 @@ const TeleportImpl = {
9473
9473
  move: moveTeleport,
9474
9474
  hydrate: hydrateTeleport
9475
9475
  };
9476
- function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = "2") {
9477
- if (moveType === "0") {
9476
+ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
9477
+ if (moveType === 0) {
9478
9478
  insert(vnode.targetAnchor, container, parentAnchor);
9479
9479
  }
9480
9480
  const { el, anchor, shapeFlag, children, props } = vnode;
9481
- const isReorder = moveType === "2";
9481
+ const isReorder = moveType === 2;
9482
9482
  if (isReorder) {
9483
9483
  insert(el, container, parentAnchor);
9484
9484
  }
@@ -9489,7 +9489,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
9489
9489
  children[i],
9490
9490
  container,
9491
9491
  parentAnchor,
9492
- "2"
9492
+ 2
9493
9493
  );
9494
9494
  }
9495
9495
  }
@@ -9978,7 +9978,7 @@ function mergeProps(...args) {
9978
9978
  return ret;
9979
9979
  }
9980
9980
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
9981
- callWithAsyncErrorHandling(hook, instance, "7", [
9981
+ callWithAsyncErrorHandling(hook, instance, 7, [
9982
9982
  vnode,
9983
9983
  prevVNode
9984
9984
  ]);
@@ -10146,7 +10146,7 @@ function setupStatefulComponent(instance, isSSR) {
10146
10146
  const setupResult = callWithErrorHandling(
10147
10147
  setup,
10148
10148
  instance,
10149
- "0",
10149
+ 0,
10150
10150
  [process.env.NODE_ENV !== "production" ? shallowReadonly(instance.props) : instance.props, setupContext]
10151
10151
  );
10152
10152
  resetTracking();
@@ -10157,7 +10157,7 @@ function setupStatefulComponent(instance, isSSR) {
10157
10157
  return setupResult.then((resolvedResult) => {
10158
10158
  handleSetupResult(instance, resolvedResult, isSSR);
10159
10159
  }).catch((e) => {
10160
- handleError(e, instance, "0");
10160
+ handleError(e, instance, 0);
10161
10161
  });
10162
10162
  } else {
10163
10163
  instance.asyncDep = setupResult;
@@ -10725,7 +10725,7 @@ function isMemoSame(cached, memo) {
10725
10725
  return true;
10726
10726
  }
10727
10727
 
10728
- const version = "3.3.0-alpha.3";
10728
+ const version = "3.3.0-alpha.4";
10729
10729
  const _ssrUtils = {
10730
10730
  createComponentInstance,
10731
10731
  setupComponent,
@@ -11065,7 +11065,7 @@ function createInvoker(initialValue, instance) {
11065
11065
  callWithAsyncErrorHandling(
11066
11066
  patchStopImmediatePropagation(e, invoker.value),
11067
11067
  instance,
11068
- "5",
11068
+ 5,
11069
11069
  [e]
11070
11070
  );
11071
11071
  };
@@ -12585,63 +12585,63 @@ function createCompilerError(code, loc, messages, additionalMessage) {
12585
12585
  }
12586
12586
  const errorMessages = {
12587
12587
  // parse errors
12588
- ["0"]: "Illegal comment.",
12589
- ["1"]: "CDATA section is allowed only in XML context.",
12590
- ["2"]: "Duplicate attribute.",
12591
- ["3"]: "End tag cannot have attributes.",
12592
- ["4"]: "Illegal '/' in tags.",
12593
- ["5"]: "Unexpected EOF in tag.",
12594
- ["6"]: "Unexpected EOF in CDATA section.",
12595
- ["7"]: "Unexpected EOF in comment.",
12596
- ["8"]: "Unexpected EOF in script.",
12597
- ["9"]: "Unexpected EOF in tag.",
12598
- ["10"]: "Incorrectly closed comment.",
12599
- ["11"]: "Incorrectly opened comment.",
12600
- ["12"]: "Illegal tag name. Use '&lt;' to print '<'.",
12601
- ["13"]: "Attribute value was expected.",
12602
- ["14"]: "End tag name was expected.",
12603
- ["15"]: "Whitespace was expected.",
12604
- ["16"]: "Unexpected '<!--' in comment.",
12605
- ["17"]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
12606
- ["18"]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
12607
- ["19"]: "Attribute name cannot start with '='.",
12608
- ["21"]: "'<?' is allowed only in XML context.",
12609
- ["20"]: `Unexpected null character.`,
12610
- ["22"]: "Illegal '/' in tags.",
12588
+ [0]: "Illegal comment.",
12589
+ [1]: "CDATA section is allowed only in XML context.",
12590
+ [2]: "Duplicate attribute.",
12591
+ [3]: "End tag cannot have attributes.",
12592
+ [4]: "Illegal '/' in tags.",
12593
+ [5]: "Unexpected EOF in tag.",
12594
+ [6]: "Unexpected EOF in CDATA section.",
12595
+ [7]: "Unexpected EOF in comment.",
12596
+ [8]: "Unexpected EOF in script.",
12597
+ [9]: "Unexpected EOF in tag.",
12598
+ [10]: "Incorrectly closed comment.",
12599
+ [11]: "Incorrectly opened comment.",
12600
+ [12]: "Illegal tag name. Use '&lt;' to print '<'.",
12601
+ [13]: "Attribute value was expected.",
12602
+ [14]: "End tag name was expected.",
12603
+ [15]: "Whitespace was expected.",
12604
+ [16]: "Unexpected '<!--' in comment.",
12605
+ [17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
12606
+ [18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
12607
+ [19]: "Attribute name cannot start with '='.",
12608
+ [21]: "'<?' is allowed only in XML context.",
12609
+ [20]: `Unexpected null character.`,
12610
+ [22]: "Illegal '/' in tags.",
12611
12611
  // Vue-specific parse errors
12612
- ["23"]: "Invalid end tag.",
12613
- ["24"]: "Element is missing end tag.",
12614
- ["25"]: "Interpolation end sign was not found.",
12615
- ["27"]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
12616
- ["26"]: "Legal directive name was expected.",
12612
+ [23]: "Invalid end tag.",
12613
+ [24]: "Element is missing end tag.",
12614
+ [25]: "Interpolation end sign was not found.",
12615
+ [27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
12616
+ [26]: "Legal directive name was expected.",
12617
12617
  // transform errors
12618
- ["28"]: `v-if/v-else-if is missing expression.`,
12619
- ["29"]: `v-if/else branches must use unique keys.`,
12620
- ["30"]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
12621
- ["31"]: `v-for is missing expression.`,
12622
- ["32"]: `v-for has invalid expression.`,
12623
- ["33"]: `<template v-for> key should be placed on the <template> tag.`,
12624
- ["34"]: `v-bind is missing expression.`,
12625
- ["35"]: `v-on is missing expression.`,
12626
- ["36"]: `Unexpected custom directive on <slot> outlet.`,
12627
- ["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.`,
12628
- ["38"]: `Duplicate slot names found. `,
12629
- ["39"]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
12630
- ["40"]: `v-slot can only be used on components or <template> tags.`,
12631
- ["41"]: `v-model is missing expression.`,
12632
- ["42"]: `v-model value must be a valid JavaScript member expression.`,
12633
- ["43"]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
12634
- ["44"]: `v-model cannot be used on a prop, because local prop bindings are not writable.
12618
+ [28]: `v-if/v-else-if is missing expression.`,
12619
+ [29]: `v-if/else branches must use unique keys.`,
12620
+ [30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
12621
+ [31]: `v-for is missing expression.`,
12622
+ [32]: `v-for has invalid expression.`,
12623
+ [33]: `<template v-for> key should be placed on the <template> tag.`,
12624
+ [34]: `v-bind is missing expression.`,
12625
+ [35]: `v-on is missing expression.`,
12626
+ [36]: `Unexpected custom directive on <slot> outlet.`,
12627
+ [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.`,
12628
+ [38]: `Duplicate slot names found. `,
12629
+ [39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
12630
+ [40]: `v-slot can only be used on components or <template> tags.`,
12631
+ [41]: `v-model is missing expression.`,
12632
+ [42]: `v-model value must be a valid JavaScript member expression.`,
12633
+ [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
12634
+ [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
12635
12635
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
12636
- ["45"]: `Error parsing JavaScript expression: `,
12637
- ["46"]: `<KeepAlive> expects exactly one child component.`,
12636
+ [45]: `Error parsing JavaScript expression: `,
12637
+ [46]: `<KeepAlive> expects exactly one child component.`,
12638
12638
  // generic errors
12639
- ["47"]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
12640
- ["48"]: `ES module mode is not supported in this build of compiler.`,
12641
- ["49"]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
12642
- ["50"]: `"scopeId" option is only supported in module mode.`,
12639
+ [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
12640
+ [48]: `ES module mode is not supported in this build of compiler.`,
12641
+ [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
12642
+ [50]: `"scopeId" option is only supported in module mode.`,
12643
12643
  // just to fulfill types
12644
- ["51"]: ``
12644
+ [51]: ``
12645
12645
  };
12646
12646
 
12647
12647
  const FRAGMENT = Symbol(process.env.NODE_ENV !== "production" ? `Fragment` : ``);
@@ -12739,7 +12739,7 @@ const locStub = {
12739
12739
  };
12740
12740
  function createRoot(children, loc = locStub) {
12741
12741
  return {
12742
- type: "0",
12742
+ type: 0,
12743
12743
  children,
12744
12744
  helpers: /* @__PURE__ */ new Set(),
12745
12745
  components: [],
@@ -12765,7 +12765,7 @@ function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps,
12765
12765
  }
12766
12766
  }
12767
12767
  return {
12768
- type: "13",
12768
+ type: 13,
12769
12769
  tag,
12770
12770
  props,
12771
12771
  children,
@@ -12780,21 +12780,21 @@ function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps,
12780
12780
  }
12781
12781
  function createArrayExpression(elements, loc = locStub) {
12782
12782
  return {
12783
- type: "17",
12783
+ type: 17,
12784
12784
  loc,
12785
12785
  elements
12786
12786
  };
12787
12787
  }
12788
12788
  function createObjectExpression(properties, loc = locStub) {
12789
12789
  return {
12790
- type: "15",
12790
+ type: 15,
12791
12791
  loc,
12792
12792
  properties
12793
12793
  };
12794
12794
  }
12795
12795
  function createObjectProperty(key, value) {
12796
12796
  return {
12797
- type: "16",
12797
+ type: 16,
12798
12798
  loc: locStub,
12799
12799
  key: isString(key) ? createSimpleExpression(key, true) : key,
12800
12800
  value
@@ -12802,23 +12802,23 @@ function createObjectProperty(key, value) {
12802
12802
  }
12803
12803
  function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {
12804
12804
  return {
12805
- type: "4",
12805
+ type: 4,
12806
12806
  loc,
12807
12807
  content,
12808
12808
  isStatic,
12809
- constType: isStatic ? "3" : constType
12809
+ constType: isStatic ? 3 : constType
12810
12810
  };
12811
12811
  }
12812
12812
  function createCompoundExpression(children, loc = locStub) {
12813
12813
  return {
12814
- type: "8",
12814
+ type: 8,
12815
12815
  loc,
12816
12816
  children
12817
12817
  };
12818
12818
  }
12819
12819
  function createCallExpression(callee, args = [], loc = locStub) {
12820
12820
  return {
12821
- type: "14",
12821
+ type: 14,
12822
12822
  loc,
12823
12823
  callee,
12824
12824
  arguments: args
@@ -12826,7 +12826,7 @@ function createCallExpression(callee, args = [], loc = locStub) {
12826
12826
  }
12827
12827
  function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {
12828
12828
  return {
12829
- type: "18",
12829
+ type: 18,
12830
12830
  params,
12831
12831
  returns,
12832
12832
  newline,
@@ -12836,7 +12836,7 @@ function createFunctionExpression(params, returns = void 0, newline = false, isS
12836
12836
  }
12837
12837
  function createConditionalExpression(test, consequent, alternate, newline = true) {
12838
12838
  return {
12839
- type: "19",
12839
+ type: 19,
12840
12840
  test,
12841
12841
  consequent,
12842
12842
  alternate,
@@ -12846,7 +12846,7 @@ function createConditionalExpression(test, consequent, alternate, newline = true
12846
12846
  }
12847
12847
  function createCacheExpression(index, value, isVNode = false) {
12848
12848
  return {
12849
- type: "20",
12849
+ type: 20,
12850
12850
  index,
12851
12851
  value,
12852
12852
  isVNode,
@@ -12855,13 +12855,13 @@ function createCacheExpression(index, value, isVNode = false) {
12855
12855
  }
12856
12856
  function createBlockStatement(body) {
12857
12857
  return {
12858
- type: "21",
12858
+ type: 21,
12859
12859
  body,
12860
12860
  loc: locStub
12861
12861
  };
12862
12862
  }
12863
12863
 
12864
- const isStaticExp = (p) => p.type === "4" && p.isStatic;
12864
+ const isStaticExp = (p) => p.type === 4 && p.isStatic;
12865
12865
  const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
12866
12866
  function isCoreComponent(tag) {
12867
12867
  if (isBuiltInType(tag, "Teleport")) {
@@ -12987,7 +12987,7 @@ function assert(condition, msg) {
12987
12987
  function findDir(node, name, allowEmpty = false) {
12988
12988
  for (let i = 0; i < node.props.length; i++) {
12989
12989
  const p = node.props[i];
12990
- if (p.type === "7" && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) {
12990
+ if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) {
12991
12991
  return p;
12992
12992
  }
12993
12993
  }
@@ -12995,7 +12995,7 @@ function findDir(node, name, allowEmpty = false) {
12995
12995
  function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
12996
12996
  for (let i = 0; i < node.props.length; i++) {
12997
12997
  const p = node.props[i];
12998
- if (p.type === "6") {
12998
+ if (p.type === 6) {
12999
12999
  if (dynamicOnly)
13000
13000
  continue;
13001
13001
  if (p.name === name && (p.value || allowEmpty)) {
@@ -13011,23 +13011,23 @@ function isStaticArgOf(arg, name) {
13011
13011
  }
13012
13012
  function hasDynamicKeyVBind(node) {
13013
13013
  return node.props.some(
13014
- (p) => p.type === "7" && p.name === "bind" && (!p.arg || // v-bind="obj"
13015
- p.arg.type !== "4" || // v-bind:[_ctx.foo]
13014
+ (p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj"
13015
+ p.arg.type !== 4 || // v-bind:[_ctx.foo]
13016
13016
  !p.arg.isStatic)
13017
13017
  // v-bind:[foo]
13018
13018
  );
13019
13019
  }
13020
13020
  function isText$1(node) {
13021
- return node.type === "5" || node.type === "2";
13021
+ return node.type === 5 || node.type === 2;
13022
13022
  }
13023
13023
  function isVSlot(p) {
13024
- return p.type === "7" && p.name === "slot";
13024
+ return p.type === 7 && p.name === "slot";
13025
13025
  }
13026
13026
  function isTemplateNode(node) {
13027
- return node.type === "1" && node.tagType === "3";
13027
+ return node.type === 1 && node.tagType === 3;
13028
13028
  }
13029
13029
  function isSlotOutlet(node) {
13030
- return node.type === "1" && node.tagType === "2";
13030
+ return node.type === 1 && node.tagType === 2;
13031
13031
  }
13032
13032
  function getVNodeHelper(ssr, isComponent) {
13033
13033
  return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
@@ -13037,7 +13037,7 @@ function getVNodeBlockHelper(ssr, isComponent) {
13037
13037
  }
13038
13038
  const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
13039
13039
  function getUnnormalizedProps(props, callPath = []) {
13040
- if (props && !isString(props) && props.type === "14") {
13040
+ if (props && !isString(props) && props.type === 14) {
13041
13041
  const callee = props.callee;
13042
13042
  if (!isString(callee) && propsHelperSet.has(callee)) {
13043
13043
  return getUnnormalizedProps(
@@ -13050,10 +13050,10 @@ function getUnnormalizedProps(props, callPath = []) {
13050
13050
  }
13051
13051
  function injectProp(node, prop, context) {
13052
13052
  let propsWithInjection;
13053
- let props = node.type === "13" ? node.props : node.arguments[2];
13053
+ let props = node.type === 13 ? node.props : node.arguments[2];
13054
13054
  let callPath = [];
13055
13055
  let parentCall;
13056
- if (props && !isString(props) && props.type === "14") {
13056
+ if (props && !isString(props) && props.type === 14) {
13057
13057
  const ret = getUnnormalizedProps(props);
13058
13058
  props = ret[0];
13059
13059
  callPath = ret[1];
@@ -13061,9 +13061,9 @@ function injectProp(node, prop, context) {
13061
13061
  }
13062
13062
  if (props == null || isString(props)) {
13063
13063
  propsWithInjection = createObjectExpression([prop]);
13064
- } else if (props.type === "14") {
13064
+ } else if (props.type === 14) {
13065
13065
  const first = props.arguments[0];
13066
- if (!isString(first) && first.type === "15") {
13066
+ if (!isString(first) && first.type === 15) {
13067
13067
  if (!hasProp(prop, first)) {
13068
13068
  first.properties.unshift(prop);
13069
13069
  }
@@ -13078,7 +13078,7 @@ function injectProp(node, prop, context) {
13078
13078
  }
13079
13079
  }
13080
13080
  !propsWithInjection && (propsWithInjection = props);
13081
- } else if (props.type === "15") {
13081
+ } else if (props.type === 15) {
13082
13082
  if (!hasProp(prop, props)) {
13083
13083
  props.properties.unshift(prop);
13084
13084
  }
@@ -13092,7 +13092,7 @@ function injectProp(node, prop, context) {
13092
13092
  parentCall = callPath[callPath.length - 2];
13093
13093
  }
13094
13094
  }
13095
- if (node.type === "13") {
13095
+ if (node.type === 13) {
13096
13096
  if (parentCall) {
13097
13097
  parentCall.arguments[0] = propsWithInjection;
13098
13098
  } else {
@@ -13108,10 +13108,10 @@ function injectProp(node, prop, context) {
13108
13108
  }
13109
13109
  function hasProp(prop, props) {
13110
13110
  let result = false;
13111
- if (prop.key.type === "4") {
13111
+ if (prop.key.type === 4) {
13112
13112
  const propKeyName = prop.key.content;
13113
13113
  result = props.properties.some(
13114
- (p) => p.key.type === "4" && p.key.content === propKeyName
13114
+ (p) => p.key.type === 4 && p.key.content === propKeyName
13115
13115
  );
13116
13116
  }
13117
13117
  return result;
@@ -13122,7 +13122,7 @@ function toValidAssetId(name, type) {
13122
13122
  })}`;
13123
13123
  }
13124
13124
  function getMemoedVNodeCall(node) {
13125
- if (node.type === "14" && node.callee === WITH_MEMO) {
13125
+ if (node.type === 14 && node.callee === WITH_MEMO) {
13126
13126
  return node.arguments[1].returns;
13127
13127
  } else {
13128
13128
  return node;
@@ -13219,8 +13219,8 @@ const decodeMap = {
13219
13219
  };
13220
13220
  const defaultParserOptions = {
13221
13221
  delimiters: [`{{`, `}}`],
13222
- getNamespace: () => "0",
13223
- getTextMode: () => "0",
13222
+ getNamespace: () => 0,
13223
+ getTextMode: () => 0,
13224
13224
  isVoidTag: NO,
13225
13225
  isPreTag: NO,
13226
13226
  isCustomElement: NO,
@@ -13233,7 +13233,7 @@ function baseParse(content, options = {}) {
13233
13233
  const context = createParserContext(content, options);
13234
13234
  const start = getCursor(context);
13235
13235
  return createRoot(
13236
- parseChildren(context, "0", []),
13236
+ parseChildren(context, 0, []),
13237
13237
  getSelection(context, start)
13238
13238
  );
13239
13239
  }
@@ -13257,48 +13257,48 @@ function createParserContext(content, rawOptions) {
13257
13257
  }
13258
13258
  function parseChildren(context, mode, ancestors) {
13259
13259
  const parent = last(ancestors);
13260
- const ns = parent ? parent.ns : "0";
13260
+ const ns = parent ? parent.ns : 0;
13261
13261
  const nodes = [];
13262
13262
  while (!isEnd(context, mode, ancestors)) {
13263
13263
  const s = context.source;
13264
13264
  let node = void 0;
13265
- if (mode === "0" || mode === "1") {
13265
+ if (mode === 0 || mode === 1) {
13266
13266
  if (!context.inVPre && startsWith(s, context.options.delimiters[0])) {
13267
13267
  node = parseInterpolation(context, mode);
13268
- } else if (mode === "0" && s[0] === "<") {
13268
+ } else if (mode === 0 && s[0] === "<") {
13269
13269
  if (s.length === 1) {
13270
- emitError(context, "5", 1);
13270
+ emitError(context, 5, 1);
13271
13271
  } else if (s[1] === "!") {
13272
13272
  if (startsWith(s, "<!--")) {
13273
13273
  node = parseComment(context);
13274
13274
  } else if (startsWith(s, "<!DOCTYPE")) {
13275
13275
  node = parseBogusComment(context);
13276
13276
  } else if (startsWith(s, "<![CDATA[")) {
13277
- if (ns !== "0") {
13277
+ if (ns !== 0) {
13278
13278
  node = parseCDATA(context, ancestors);
13279
13279
  } else {
13280
- emitError(context, "1");
13280
+ emitError(context, 1);
13281
13281
  node = parseBogusComment(context);
13282
13282
  }
13283
13283
  } else {
13284
- emitError(context, "11");
13284
+ emitError(context, 11);
13285
13285
  node = parseBogusComment(context);
13286
13286
  }
13287
13287
  } else if (s[1] === "/") {
13288
13288
  if (s.length === 2) {
13289
- emitError(context, "5", 2);
13289
+ emitError(context, 5, 2);
13290
13290
  } else if (s[2] === ">") {
13291
- emitError(context, "14", 2);
13291
+ emitError(context, 14, 2);
13292
13292
  advanceBy(context, 3);
13293
13293
  continue;
13294
13294
  } else if (/[a-z]/i.test(s[2])) {
13295
- emitError(context, "23");
13295
+ emitError(context, 23);
13296
13296
  parseTag(context, TagType.End, parent);
13297
13297
  continue;
13298
13298
  } else {
13299
13299
  emitError(
13300
13300
  context,
13301
- "12",
13301
+ 12,
13302
13302
  2
13303
13303
  );
13304
13304
  node = parseBogusComment(context);
@@ -13309,7 +13309,7 @@ function parseChildren(context, mode, ancestors) {
13309
13309
  "COMPILER_NATIVE_TEMPLATE",
13310
13310
  context
13311
13311
  ) && node && node.tag === "template" && !node.props.some(
13312
- (p) => p.type === "7" && isSpecialTemplateDirective(p.name)
13312
+ (p) => p.type === 7 && isSpecialTemplateDirective(p.name)
13313
13313
  )) {
13314
13314
  process.env.NODE_ENV !== "production" && warnDeprecation(
13315
13315
  "COMPILER_NATIVE_TEMPLATE",
@@ -13321,12 +13321,12 @@ function parseChildren(context, mode, ancestors) {
13321
13321
  } else if (s[1] === "?") {
13322
13322
  emitError(
13323
13323
  context,
13324
- "21",
13324
+ 21,
13325
13325
  1
13326
13326
  );
13327
13327
  node = parseBogusComment(context);
13328
13328
  } else {
13329
- emitError(context, "12", 1);
13329
+ emitError(context, 12, 1);
13330
13330
  }
13331
13331
  }
13332
13332
  }
@@ -13342,16 +13342,16 @@ function parseChildren(context, mode, ancestors) {
13342
13342
  }
13343
13343
  }
13344
13344
  let removedWhitespace = false;
13345
- if (mode !== "2" && mode !== "1") {
13345
+ if (mode !== 2 && mode !== 1) {
13346
13346
  const shouldCondense = context.options.whitespace !== "preserve";
13347
13347
  for (let i = 0; i < nodes.length; i++) {
13348
13348
  const node = nodes[i];
13349
- if (node.type === "2") {
13349
+ if (node.type === 2) {
13350
13350
  if (!context.inPre) {
13351
13351
  if (!/[^\t\r\n\f ]/.test(node.content)) {
13352
13352
  const prev = nodes[i - 1];
13353
13353
  const next = nodes[i + 1];
13354
- 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))) {
13354
+ 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))) {
13355
13355
  removedWhitespace = true;
13356
13356
  nodes[i] = null;
13357
13357
  } else {
@@ -13363,14 +13363,14 @@ function parseChildren(context, mode, ancestors) {
13363
13363
  } else {
13364
13364
  node.content = node.content.replace(/\r\n/g, "\n");
13365
13365
  }
13366
- } else if (node.type === "3" && !context.options.comments) {
13366
+ } else if (node.type === 3 && !context.options.comments) {
13367
13367
  removedWhitespace = true;
13368
13368
  nodes[i] = null;
13369
13369
  }
13370
13370
  }
13371
13371
  if (context.inPre && parent && context.options.isPreTag(parent.tag)) {
13372
13372
  const first = nodes[0];
13373
- if (first && first.type === "2") {
13373
+ if (first && first.type === 2) {
13374
13374
  first.content = first.content.replace(/^\r?\n/, "");
13375
13375
  }
13376
13376
  }
@@ -13378,9 +13378,9 @@ function parseChildren(context, mode, ancestors) {
13378
13378
  return removedWhitespace ? nodes.filter(Boolean) : nodes;
13379
13379
  }
13380
13380
  function pushNode(nodes, node) {
13381
- if (node.type === "2") {
13381
+ if (node.type === 2) {
13382
13382
  const prev = last(nodes);
13383
- if (prev && prev.type === "2" && prev.loc.end.offset === node.loc.start.offset) {
13383
+ if (prev && prev.type === 2 && prev.loc.end.offset === node.loc.start.offset) {
13384
13384
  prev.content += node.content;
13385
13385
  prev.loc.end = node.loc.end;
13386
13386
  prev.loc.source += node.loc.source;
@@ -13391,9 +13391,9 @@ function pushNode(nodes, node) {
13391
13391
  }
13392
13392
  function parseCDATA(context, ancestors) {
13393
13393
  advanceBy(context, 9);
13394
- const nodes = parseChildren(context, "3", ancestors);
13394
+ const nodes = parseChildren(context, 3, ancestors);
13395
13395
  if (context.source.length === 0) {
13396
- emitError(context, "6");
13396
+ emitError(context, 6);
13397
13397
  } else {
13398
13398
  advanceBy(context, 3);
13399
13399
  }
@@ -13406,13 +13406,13 @@ function parseComment(context) {
13406
13406
  if (!match) {
13407
13407
  content = context.source.slice(4);
13408
13408
  advanceBy(context, context.source.length);
13409
- emitError(context, "7");
13409
+ emitError(context, 7);
13410
13410
  } else {
13411
13411
  if (match.index <= 3) {
13412
- emitError(context, "0");
13412
+ emitError(context, 0);
13413
13413
  }
13414
13414
  if (match[1]) {
13415
- emitError(context, "10");
13415
+ emitError(context, 10);
13416
13416
  }
13417
13417
  content = context.source.slice(4, match.index);
13418
13418
  const s = context.source.slice(0, match.index);
@@ -13420,14 +13420,14 @@ function parseComment(context) {
13420
13420
  while ((nestedIndex = s.indexOf("<!--", prevIndex)) !== -1) {
13421
13421
  advanceBy(context, nestedIndex - prevIndex + 1);
13422
13422
  if (nestedIndex + 4 < s.length) {
13423
- emitError(context, "16");
13423
+ emitError(context, 16);
13424
13424
  }
13425
13425
  prevIndex = nestedIndex + 1;
13426
13426
  }
13427
13427
  advanceBy(context, match.index + match[0].length - prevIndex + 1);
13428
13428
  }
13429
13429
  return {
13430
- type: "3",
13430
+ type: 3,
13431
13431
  content,
13432
13432
  loc: getSelection(context, start)
13433
13433
  };
@@ -13445,7 +13445,7 @@ function parseBogusComment(context) {
13445
13445
  advanceBy(context, closeIndex + 1);
13446
13446
  }
13447
13447
  return {
13448
- type: "3",
13448
+ type: 3,
13449
13449
  content,
13450
13450
  loc: getSelection(context, start)
13451
13451
  };
@@ -13472,7 +13472,7 @@ function parseElement(context, ancestors) {
13472
13472
  ancestors.pop();
13473
13473
  {
13474
13474
  const inlineTemplateProp = element.props.find(
13475
- (p) => p.type === "6" && p.name === "inline-template"
13475
+ (p) => p.type === 6 && p.name === "inline-template"
13476
13476
  );
13477
13477
  if (inlineTemplateProp && checkCompatEnabled(
13478
13478
  "COMPILER_INLINE_TEMPLATE",
@@ -13481,7 +13481,7 @@ function parseElement(context, ancestors) {
13481
13481
  )) {
13482
13482
  const loc = getSelection(context, element.loc.end);
13483
13483
  inlineTemplateProp.value = {
13484
- type: "2",
13484
+ type: 2,
13485
13485
  content: loc.source,
13486
13486
  loc
13487
13487
  };
@@ -13491,11 +13491,11 @@ function parseElement(context, ancestors) {
13491
13491
  if (startsWithEndTagOpen(context.source, element.tag)) {
13492
13492
  parseTag(context, TagType.End, parent);
13493
13493
  } else {
13494
- emitError(context, "24", 0, element.loc.start);
13494
+ emitError(context, 24, 0, element.loc.start);
13495
13495
  if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
13496
13496
  const first = children[0];
13497
13497
  if (first && startsWith(first.loc.source, "<!--")) {
13498
- emitError(context, "8");
13498
+ emitError(context, 8);
13499
13499
  }
13500
13500
  }
13501
13501
  }
@@ -13529,7 +13529,7 @@ function parseTag(context, type, parent) {
13529
13529
  context.inPre = true;
13530
13530
  }
13531
13531
  let props = parseAttributes(context, type);
13532
- if (type === 0 /* Start */ && !context.inVPre && props.some((p) => p.type === "7" && p.name === "pre")) {
13532
+ if (type === 0 /* Start */ && !context.inVPre && props.some((p) => p.type === 7 && p.name === "pre")) {
13533
13533
  context.inVPre = true;
13534
13534
  extend(context, cursor);
13535
13535
  context.source = currentSource;
@@ -13537,11 +13537,11 @@ function parseTag(context, type, parent) {
13537
13537
  }
13538
13538
  let isSelfClosing = false;
13539
13539
  if (context.source.length === 0) {
13540
- emitError(context, "9");
13540
+ emitError(context, 9);
13541
13541
  } else {
13542
13542
  isSelfClosing = startsWith(context.source, "/>");
13543
13543
  if (type === 1 /* End */ && isSelfClosing) {
13544
- emitError(context, "4");
13544
+ emitError(context, 4);
13545
13545
  }
13546
13546
  advanceBy(context, isSelfClosing ? 2 : 1);
13547
13547
  }
@@ -13556,7 +13556,7 @@ function parseTag(context, type, parent) {
13556
13556
  let hasFor = false;
13557
13557
  for (let i = 0; i < props.length; i++) {
13558
13558
  const p = props[i];
13559
- if (p.type === "7") {
13559
+ if (p.type === 7) {
13560
13560
  if (p.name === "if") {
13561
13561
  hasIf = true;
13562
13562
  } else if (p.name === "for") {
@@ -13573,22 +13573,22 @@ function parseTag(context, type, parent) {
13573
13573
  }
13574
13574
  }
13575
13575
  }
13576
- let tagType = "0";
13576
+ let tagType = 0;
13577
13577
  if (!context.inVPre) {
13578
13578
  if (tag === "slot") {
13579
- tagType = "2";
13579
+ tagType = 2;
13580
13580
  } else if (tag === "template") {
13581
13581
  if (props.some(
13582
- (p) => p.type === "7" && isSpecialTemplateDirective(p.name)
13582
+ (p) => p.type === 7 && isSpecialTemplateDirective(p.name)
13583
13583
  )) {
13584
- tagType = "3";
13584
+ tagType = 3;
13585
13585
  }
13586
13586
  } else if (isComponent(tag, props, context)) {
13587
- tagType = "1";
13587
+ tagType = 1;
13588
13588
  }
13589
13589
  }
13590
13590
  return {
13591
- type: "1",
13591
+ type: 1,
13592
13592
  ns,
13593
13593
  tag,
13594
13594
  tagType,
@@ -13610,7 +13610,7 @@ function isComponent(tag, props, context) {
13610
13610
  }
13611
13611
  for (let i = 0; i < props.length; i++) {
13612
13612
  const p = props[i];
13613
- if (p.type === "6") {
13613
+ if (p.type === 6) {
13614
13614
  if (p.name === "is" && p.value) {
13615
13615
  if (p.value.content.startsWith("vue:")) {
13616
13616
  return true;
@@ -13643,23 +13643,23 @@ function parseAttributes(context, type) {
13643
13643
  const attributeNames = /* @__PURE__ */ new Set();
13644
13644
  while (context.source.length > 0 && !startsWith(context.source, ">") && !startsWith(context.source, "/>")) {
13645
13645
  if (startsWith(context.source, "/")) {
13646
- emitError(context, "22");
13646
+ emitError(context, 22);
13647
13647
  advanceBy(context, 1);
13648
13648
  advanceSpaces(context);
13649
13649
  continue;
13650
13650
  }
13651
13651
  if (type === 1 /* End */) {
13652
- emitError(context, "3");
13652
+ emitError(context, 3);
13653
13653
  }
13654
13654
  const attr = parseAttribute(context, attributeNames);
13655
- if (attr.type === "6" && attr.value && attr.name === "class") {
13655
+ if (attr.type === 6 && attr.value && attr.name === "class") {
13656
13656
  attr.value.content = attr.value.content.replace(/\s+/g, " ").trim();
13657
13657
  }
13658
13658
  if (type === 0 /* Start */) {
13659
13659
  props.push(attr);
13660
13660
  }
13661
13661
  if (/^[^\t\r\n\f />]/.test(context.source)) {
13662
- emitError(context, "15");
13662
+ emitError(context, 15);
13663
13663
  }
13664
13664
  advanceSpaces(context);
13665
13665
  }
@@ -13670,11 +13670,11 @@ function parseAttribute(context, nameSet) {
13670
13670
  const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source);
13671
13671
  const name = match[0];
13672
13672
  if (nameSet.has(name)) {
13673
- emitError(context, "2");
13673
+ emitError(context, 2);
13674
13674
  }
13675
13675
  nameSet.add(name);
13676
13676
  if (name[0] === "=") {
13677
- emitError(context, "19");
13677
+ emitError(context, 19);
13678
13678
  }
13679
13679
  {
13680
13680
  const pattern = /["'<]/g;
@@ -13682,7 +13682,7 @@ function parseAttribute(context, nameSet) {
13682
13682
  while (m = pattern.exec(name)) {
13683
13683
  emitError(
13684
13684
  context,
13685
- "17",
13685
+ 17,
13686
13686
  m.index
13687
13687
  );
13688
13688
  }
@@ -13695,7 +13695,7 @@ function parseAttribute(context, nameSet) {
13695
13695
  advanceSpaces(context);
13696
13696
  value = parseAttributeValue(context);
13697
13697
  if (!value) {
13698
- emitError(context, "13");
13698
+ emitError(context, 13);
13699
13699
  }
13700
13700
  }
13701
13701
  const loc = getSelection(context, start);
@@ -13725,7 +13725,7 @@ function parseAttribute(context, nameSet) {
13725
13725
  if (!content.endsWith("]")) {
13726
13726
  emitError(
13727
13727
  context,
13728
- "27"
13728
+ 27
13729
13729
  );
13730
13730
  content = content.slice(1);
13731
13731
  } else {
@@ -13735,10 +13735,10 @@ function parseAttribute(context, nameSet) {
13735
13735
  content += match2[3] || "";
13736
13736
  }
13737
13737
  arg = {
13738
- type: "4",
13738
+ type: 4,
13739
13739
  content,
13740
13740
  isStatic,
13741
- constType: isStatic ? "3" : 0,
13741
+ constType: isStatic ? 3 : 0,
13742
13742
  loc: loc2
13743
13743
  };
13744
13744
  }
@@ -13771,10 +13771,10 @@ function parseAttribute(context, nameSet) {
13771
13771
  }
13772
13772
  }
13773
13773
  return {
13774
- type: "7",
13774
+ type: 7,
13775
13775
  name: dirName,
13776
13776
  exp: value && {
13777
- type: "4",
13777
+ type: 4,
13778
13778
  content: value.content,
13779
13779
  isStatic: false,
13780
13780
  // Treat as non-constant by default. This can be potentially set to
@@ -13788,13 +13788,13 @@ function parseAttribute(context, nameSet) {
13788
13788
  };
13789
13789
  }
13790
13790
  if (!context.inVPre && startsWith(name, "v-")) {
13791
- emitError(context, "26");
13791
+ emitError(context, 26);
13792
13792
  }
13793
13793
  return {
13794
- type: "6",
13794
+ type: 6,
13795
13795
  name,
13796
13796
  value: value && {
13797
- type: "2",
13797
+ type: 2,
13798
13798
  content: value.content,
13799
13799
  loc: value.loc
13800
13800
  },
@@ -13813,10 +13813,10 @@ function parseAttributeValue(context) {
13813
13813
  content = parseTextData(
13814
13814
  context,
13815
13815
  context.source.length,
13816
- "4"
13816
+ 4
13817
13817
  );
13818
13818
  } else {
13819
- content = parseTextData(context, endIndex, "4");
13819
+ content = parseTextData(context, endIndex, 4);
13820
13820
  advanceBy(context, 1);
13821
13821
  }
13822
13822
  } else {
@@ -13829,11 +13829,11 @@ function parseAttributeValue(context) {
13829
13829
  while (m = unexpectedChars.exec(match[0])) {
13830
13830
  emitError(
13831
13831
  context,
13832
- "18",
13832
+ 18,
13833
13833
  m.index
13834
13834
  );
13835
13835
  }
13836
- content = parseTextData(context, match[0].length, "4");
13836
+ content = parseTextData(context, match[0].length, 4);
13837
13837
  }
13838
13838
  return { content, isQuoted, loc: getSelection(context, start) };
13839
13839
  }
@@ -13841,7 +13841,7 @@ function parseInterpolation(context, mode) {
13841
13841
  const [open, close] = context.options.delimiters;
13842
13842
  const closeIndex = context.source.indexOf(close, open.length);
13843
13843
  if (closeIndex === -1) {
13844
- emitError(context, "25");
13844
+ emitError(context, 25);
13845
13845
  return void 0;
13846
13846
  }
13847
13847
  const start = getCursor(context);
@@ -13860,9 +13860,9 @@ function parseInterpolation(context, mode) {
13860
13860
  advancePositionWithMutation(innerEnd, rawContent, endOffset);
13861
13861
  advanceBy(context, close.length);
13862
13862
  return {
13863
- type: "5",
13863
+ type: 5,
13864
13864
  content: {
13865
- type: "4",
13865
+ type: 4,
13866
13866
  isStatic: false,
13867
13867
  // Set `isConstant` to false by default and will decide in transformExpression
13868
13868
  constType: 0,
@@ -13873,7 +13873,7 @@ function parseInterpolation(context, mode) {
13873
13873
  };
13874
13874
  }
13875
13875
  function parseText(context, mode) {
13876
- const endTokens = mode === "3" ? ["]]>"] : ["<", context.options.delimiters[0]];
13876
+ const endTokens = mode === 3 ? ["]]>"] : ["<", context.options.delimiters[0]];
13877
13877
  let endIndex = context.source.length;
13878
13878
  for (let i = 0; i < endTokens.length; i++) {
13879
13879
  const index = context.source.indexOf(endTokens[i], 1);
@@ -13884,7 +13884,7 @@ function parseText(context, mode) {
13884
13884
  const start = getCursor(context);
13885
13885
  const content = parseTextData(context, endIndex, mode);
13886
13886
  return {
13887
- type: "2",
13887
+ type: 2,
13888
13888
  content,
13889
13889
  loc: getSelection(context, start)
13890
13890
  };
@@ -13892,12 +13892,12 @@ function parseText(context, mode) {
13892
13892
  function parseTextData(context, length, mode) {
13893
13893
  const rawText = context.source.slice(0, length);
13894
13894
  advanceBy(context, length);
13895
- if (mode === "2" || mode === "3" || !rawText.includes("&")) {
13895
+ if (mode === 2 || mode === 3 || !rawText.includes("&")) {
13896
13896
  return rawText;
13897
13897
  } else {
13898
13898
  return context.options.decodeEntities(
13899
13899
  rawText,
13900
- mode === "4"
13900
+ mode === 4
13901
13901
  );
13902
13902
  }
13903
13903
  }
@@ -13953,7 +13953,7 @@ function emitError(context, code, offset, loc = getCursor(context)) {
13953
13953
  function isEnd(context, mode, ancestors) {
13954
13954
  const s = context.source;
13955
13955
  switch (mode) {
13956
- case "0":
13956
+ case 0:
13957
13957
  if (startsWith(s, "</")) {
13958
13958
  for (let i = ancestors.length - 1; i >= 0; --i) {
13959
13959
  if (startsWithEndTagOpen(s, ancestors[i].tag)) {
@@ -13962,15 +13962,15 @@ function isEnd(context, mode, ancestors) {
13962
13962
  }
13963
13963
  }
13964
13964
  break;
13965
- case "1":
13966
- case "2": {
13965
+ case 1:
13966
+ case 2: {
13967
13967
  const parent = last(ancestors);
13968
13968
  if (parent && startsWithEndTagOpen(s, parent.tag)) {
13969
13969
  return true;
13970
13970
  }
13971
13971
  break;
13972
13972
  }
13973
- case "3":
13973
+ case 3:
13974
13974
  if (startsWith(s, "]]>")) {
13975
13975
  return true;
13976
13976
  }
@@ -13993,7 +13993,7 @@ function hoistStatic(root, context) {
13993
13993
  }
13994
13994
  function isSingleElementRoot(root, child) {
13995
13995
  const { children } = root;
13996
- return children.length === 1 && child.type === "1" && !isSlotOutlet(child);
13996
+ return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
13997
13997
  }
13998
13998
  function walk(node, context, doNotHoistNode = false) {
13999
13999
  const { children } = node;
@@ -14001,10 +14001,10 @@ function walk(node, context, doNotHoistNode = false) {
14001
14001
  let hoistedCount = 0;
14002
14002
  for (let i = 0; i < children.length; i++) {
14003
14003
  const child = children[i];
14004
- if (child.type === "1" && child.tagType === "0") {
14004
+ if (child.type === 1 && child.tagType === 0) {
14005
14005
  const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
14006
14006
  if (constantType > 0) {
14007
- if (constantType >= "2") {
14007
+ if (constantType >= 2) {
14008
14008
  child.codegenNode.patchFlag = -1 + (process.env.NODE_ENV !== "production" ? ` /* HOISTED */` : ``);
14009
14009
  child.codegenNode = context.hoist(child.codegenNode);
14010
14010
  hoistedCount++;
@@ -14012,9 +14012,9 @@ function walk(node, context, doNotHoistNode = false) {
14012
14012
  }
14013
14013
  } else {
14014
14014
  const codegenNode = child.codegenNode;
14015
- if (codegenNode.type === "13") {
14015
+ if (codegenNode.type === 13) {
14016
14016
  const flag = getPatchFlag(codegenNode);
14017
- if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= "2") {
14017
+ if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {
14018
14018
  const props = getNodeProps(child);
14019
14019
  if (props) {
14020
14020
  codegenNode.props = context.hoist(props);
@@ -14026,8 +14026,8 @@ function walk(node, context, doNotHoistNode = false) {
14026
14026
  }
14027
14027
  }
14028
14028
  }
14029
- if (child.type === "1") {
14030
- const isComponent = child.tagType === "1";
14029
+ if (child.type === 1) {
14030
+ const isComponent = child.tagType === 1;
14031
14031
  if (isComponent) {
14032
14032
  context.scopes.vSlot++;
14033
14033
  }
@@ -14035,9 +14035,9 @@ function walk(node, context, doNotHoistNode = false) {
14035
14035
  if (isComponent) {
14036
14036
  context.scopes.vSlot--;
14037
14037
  }
14038
- } else if (child.type === "11") {
14038
+ } else if (child.type === 11) {
14039
14039
  walk(child, context, child.children.length === 1);
14040
- } else if (child.type === "9") {
14040
+ } else if (child.type === 9) {
14041
14041
  for (let i2 = 0; i2 < child.branches.length; i2++) {
14042
14042
  walk(
14043
14043
  child.branches[i2],
@@ -14050,7 +14050,7 @@ function walk(node, context, doNotHoistNode = false) {
14050
14050
  if (hoistedCount && context.transformHoist) {
14051
14051
  context.transformHoist(children, context, node);
14052
14052
  }
14053
- if (hoistedCount && hoistedCount === originalCount && node.type === "1" && node.tagType === "0" && node.codegenNode && node.codegenNode.type === "13" && isArray(node.codegenNode.children)) {
14053
+ if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
14054
14054
  node.codegenNode.children = context.hoist(
14055
14055
  createArrayExpression(node.codegenNode.children)
14056
14056
  );
@@ -14059,8 +14059,8 @@ function walk(node, context, doNotHoistNode = false) {
14059
14059
  function getConstantType(node, context) {
14060
14060
  const { constantCache } = context;
14061
14061
  switch (node.type) {
14062
- case "1":
14063
- if (node.tagType !== "0") {
14062
+ case 1:
14063
+ if (node.tagType !== 0) {
14064
14064
  return 0;
14065
14065
  }
14066
14066
  const cached = constantCache.get(node);
@@ -14068,7 +14068,7 @@ function getConstantType(node, context) {
14068
14068
  return cached;
14069
14069
  }
14070
14070
  const codegenNode = node.codegenNode;
14071
- if (codegenNode.type !== "13") {
14071
+ if (codegenNode.type !== 13) {
14072
14072
  return 0;
14073
14073
  }
14074
14074
  if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") {
@@ -14076,7 +14076,7 @@ function getConstantType(node, context) {
14076
14076
  }
14077
14077
  const flag = getPatchFlag(codegenNode);
14078
14078
  if (!flag) {
14079
- let returnType2 = "3";
14079
+ let returnType2 = 3;
14080
14080
  const generatedPropsType = getGeneratedPropsConstantType(node, context);
14081
14081
  if (generatedPropsType === 0) {
14082
14082
  constantCache.set(node, 0);
@@ -14095,10 +14095,10 @@ function getConstantType(node, context) {
14095
14095
  returnType2 = childType;
14096
14096
  }
14097
14097
  }
14098
- if (returnType2 > "1") {
14098
+ if (returnType2 > 1) {
14099
14099
  for (let i = 0; i < node.props.length; i++) {
14100
14100
  const p = node.props[i];
14101
- if (p.type === "7" && p.name === "bind" && p.exp) {
14101
+ if (p.type === 7 && p.name === "bind" && p.exp) {
14102
14102
  const expType = getConstantType(p.exp, context);
14103
14103
  if (expType === 0) {
14104
14104
  constantCache.set(node, 0);
@@ -14113,7 +14113,7 @@ function getConstantType(node, context) {
14113
14113
  if (codegenNode.isBlock) {
14114
14114
  for (let i = 0; i < node.props.length; i++) {
14115
14115
  const p = node.props[i];
14116
- if (p.type === "7") {
14116
+ if (p.type === 7) {
14117
14117
  constantCache.set(node, 0);
14118
14118
  return 0;
14119
14119
  }
@@ -14131,20 +14131,20 @@ function getConstantType(node, context) {
14131
14131
  constantCache.set(node, 0);
14132
14132
  return 0;
14133
14133
  }
14134
- case "2":
14135
- case "3":
14136
- return "3";
14137
- case "9":
14138
- case "11":
14139
- case "10":
14134
+ case 2:
14135
+ case 3:
14136
+ return 3;
14137
+ case 9:
14138
+ case 11:
14139
+ case 10:
14140
14140
  return 0;
14141
- case "5":
14142
- case "12":
14141
+ case 5:
14142
+ case 12:
14143
14143
  return getConstantType(node.content, context);
14144
- case "4":
14144
+ case 4:
14145
14145
  return node.constType;
14146
- case "8":
14147
- let returnType = "3";
14146
+ case 8:
14147
+ let returnType = 3;
14148
14148
  for (let i = 0; i < node.children.length; i++) {
14149
14149
  const child = node.children[i];
14150
14150
  if (isString(child) || isSymbol(child)) {
@@ -14170,20 +14170,20 @@ const allowHoistedHelperSet = /* @__PURE__ */ new Set([
14170
14170
  GUARD_REACTIVE_PROPS
14171
14171
  ]);
14172
14172
  function getConstantTypeOfHelperCall(value, context) {
14173
- if (value.type === "14" && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
14173
+ if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
14174
14174
  const arg = value.arguments[0];
14175
- if (arg.type === "4") {
14175
+ if (arg.type === 4) {
14176
14176
  return getConstantType(arg, context);
14177
- } else if (arg.type === "14") {
14177
+ } else if (arg.type === 14) {
14178
14178
  return getConstantTypeOfHelperCall(arg, context);
14179
14179
  }
14180
14180
  }
14181
14181
  return 0;
14182
14182
  }
14183
14183
  function getGeneratedPropsConstantType(node, context) {
14184
- let returnType = "3";
14184
+ let returnType = 3;
14185
14185
  const props = getNodeProps(node);
14186
- if (props && props.type === "15") {
14186
+ if (props && props.type === 15) {
14187
14187
  const { properties } = props;
14188
14188
  for (let i = 0; i < properties.length; i++) {
14189
14189
  const { key, value } = properties[i];
@@ -14195,9 +14195,9 @@ function getGeneratedPropsConstantType(node, context) {
14195
14195
  returnType = keyType;
14196
14196
  }
14197
14197
  let valueType;
14198
- if (value.type === "4") {
14198
+ if (value.type === 4) {
14199
14199
  valueType = getConstantType(value, context);
14200
- } else if (value.type === "14") {
14200
+ } else if (value.type === 14) {
14201
14201
  valueType = getConstantTypeOfHelperCall(value, context);
14202
14202
  } else {
14203
14203
  valueType = 0;
@@ -14214,7 +14214,7 @@ function getGeneratedPropsConstantType(node, context) {
14214
14214
  }
14215
14215
  function getNodeProps(node) {
14216
14216
  const codegenNode = node.codegenNode;
14217
- if (codegenNode.type === "13") {
14217
+ if (codegenNode.type === 13) {
14218
14218
  return codegenNode.props;
14219
14219
  }
14220
14220
  }
@@ -14356,7 +14356,7 @@ function createTransformContext(root, {
14356
14356
  `_hoisted_${context.hoists.length}`,
14357
14357
  false,
14358
14358
  exp.loc,
14359
- "2"
14359
+ 2
14360
14360
  );
14361
14361
  identifier.hoisted = exp;
14362
14362
  return identifier;
@@ -14397,7 +14397,7 @@ function createRootCodegen(root, context) {
14397
14397
  const child = children[0];
14398
14398
  if (isSingleElementRoot(root, child) && child.codegenNode) {
14399
14399
  const codegenNode = child.codegenNode;
14400
- if (codegenNode.type === "13") {
14400
+ if (codegenNode.type === 13) {
14401
14401
  makeBlock(codegenNode, context);
14402
14402
  }
14403
14403
  root.codegenNode = codegenNode;
@@ -14407,7 +14407,7 @@ function createRootCodegen(root, context) {
14407
14407
  } else if (children.length > 1) {
14408
14408
  let patchFlag = 64;
14409
14409
  let patchFlagText = PatchFlagNames[64];
14410
- if (process.env.NODE_ENV !== "production" && children.filter((c) => c.type !== "3").length === 1) {
14410
+ if (process.env.NODE_ENV !== "production" && children.filter((c) => c.type !== 3).length === 1) {
14411
14411
  patchFlag |= 2048;
14412
14412
  patchFlagText += `, ${PatchFlagNames[2048]}`;
14413
14413
  }
@@ -14461,25 +14461,25 @@ function traverseNode(node, context) {
14461
14461
  }
14462
14462
  }
14463
14463
  switch (node.type) {
14464
- case "3":
14464
+ case 3:
14465
14465
  if (!context.ssr) {
14466
14466
  context.helper(CREATE_COMMENT);
14467
14467
  }
14468
14468
  break;
14469
- case "5":
14469
+ case 5:
14470
14470
  if (!context.ssr) {
14471
14471
  context.helper(TO_DISPLAY_STRING);
14472
14472
  }
14473
14473
  break;
14474
- case "9":
14474
+ case 9:
14475
14475
  for (let i2 = 0; i2 < node.branches.length; i2++) {
14476
14476
  traverseNode(node.branches[i2], context);
14477
14477
  }
14478
14478
  break;
14479
- case "10":
14480
- case "11":
14481
- case "1":
14482
- case "0":
14479
+ case 10:
14480
+ case 11:
14481
+ case 1:
14482
+ case 0:
14483
14483
  traverseChildren(node, context);
14484
14484
  break;
14485
14485
  }
@@ -14492,15 +14492,15 @@ function traverseNode(node, context) {
14492
14492
  function createStructuralDirectiveTransform(name, fn) {
14493
14493
  const matches = isString(name) ? (n) => n === name : (n) => name.test(n);
14494
14494
  return (node, context) => {
14495
- if (node.type === "1") {
14495
+ if (node.type === 1) {
14496
14496
  const { props } = node;
14497
- if (node.tagType === "3" && props.some(isVSlot)) {
14497
+ if (node.tagType === 3 && props.some(isVSlot)) {
14498
14498
  return;
14499
14499
  }
14500
14500
  const exitFns = [];
14501
14501
  for (let i = 0; i < props.length; i++) {
14502
14502
  const prop = props[i];
14503
- if (prop.type === "7" && matches(prop.name)) {
14503
+ if (prop.type === 7 && matches(prop.name)) {
14504
14504
  props.splice(i, 1);
14505
14505
  i--;
14506
14506
  const onExit = fn(node, prop, context);
@@ -14735,7 +14735,7 @@ function genHoists(hoists, context) {
14735
14735
  context.pure = false;
14736
14736
  }
14737
14737
  function isText(n) {
14738
- return isString(n) || n.type === "4" || n.type === "2" || n.type === "5" || n.type === "8";
14738
+ return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
14739
14739
  }
14740
14740
  function genNodeListAsArray(nodes, context) {
14741
14741
  const multilines = nodes.length > 3 || process.env.NODE_ENV !== "production" && nodes.some((n) => isArray(n) || !isText(n));
@@ -14776,68 +14776,68 @@ function genNode(node, context) {
14776
14776
  return;
14777
14777
  }
14778
14778
  switch (node.type) {
14779
- case "1":
14780
- case "9":
14781
- case "11":
14779
+ case 1:
14780
+ case 9:
14781
+ case 11:
14782
14782
  process.env.NODE_ENV !== "production" && assert(
14783
14783
  node.codegenNode != null,
14784
14784
  `Codegen node is missing for element/if/for node. Apply appropriate transforms first.`
14785
14785
  );
14786
14786
  genNode(node.codegenNode, context);
14787
14787
  break;
14788
- case "2":
14788
+ case 2:
14789
14789
  genText(node, context);
14790
14790
  break;
14791
- case "4":
14791
+ case 4:
14792
14792
  genExpression(node, context);
14793
14793
  break;
14794
- case "5":
14794
+ case 5:
14795
14795
  genInterpolation(node, context);
14796
14796
  break;
14797
- case "12":
14797
+ case 12:
14798
14798
  genNode(node.codegenNode, context);
14799
14799
  break;
14800
- case "8":
14800
+ case 8:
14801
14801
  genCompoundExpression(node, context);
14802
14802
  break;
14803
- case "3":
14803
+ case 3:
14804
14804
  genComment(node, context);
14805
14805
  break;
14806
- case "13":
14806
+ case 13:
14807
14807
  genVNodeCall(node, context);
14808
14808
  break;
14809
- case "14":
14809
+ case 14:
14810
14810
  genCallExpression(node, context);
14811
14811
  break;
14812
- case "15":
14812
+ case 15:
14813
14813
  genObjectExpression(node, context);
14814
14814
  break;
14815
- case "17":
14815
+ case 17:
14816
14816
  genArrayExpression(node, context);
14817
14817
  break;
14818
- case "18":
14818
+ case 18:
14819
14819
  genFunctionExpression(node, context);
14820
14820
  break;
14821
- case "19":
14821
+ case 19:
14822
14822
  genConditionalExpression(node, context);
14823
14823
  break;
14824
- case "20":
14824
+ case 20:
14825
14825
  genCacheExpression(node, context);
14826
14826
  break;
14827
- case "21":
14827
+ case 21:
14828
14828
  genNodeList(node.body, context, true, false);
14829
14829
  break;
14830
- case "22":
14830
+ case 22:
14831
14831
  break;
14832
- case "23":
14832
+ case 23:
14833
14833
  break;
14834
- case "24":
14834
+ case 24:
14835
14835
  break;
14836
- case "25":
14836
+ case 25:
14837
14837
  break;
14838
- case "26":
14838
+ case 26:
14839
14839
  break;
14840
- case "10":
14840
+ case 10:
14841
14841
  break;
14842
14842
  default:
14843
14843
  if (process.env.NODE_ENV !== "production") {
@@ -14874,7 +14874,7 @@ function genCompoundExpression(node, context) {
14874
14874
  }
14875
14875
  function genExpressionAsPropertyKey(node, context) {
14876
14876
  const { push } = context;
14877
- if (node.type === "8") {
14877
+ if (node.type === 8) {
14878
14878
  push(`[`);
14879
14879
  genCompoundExpression(node, context);
14880
14880
  push(`]`);
@@ -14955,7 +14955,7 @@ function genObjectExpression(node, context) {
14955
14955
  push(`{}`, node);
14956
14956
  return;
14957
14957
  }
14958
- const multilines = properties.length > 1 || process.env.NODE_ENV !== "production" && properties.some((p) => p.value.type !== "4");
14958
+ const multilines = properties.length > 1 || process.env.NODE_ENV !== "production" && properties.some((p) => p.value.type !== 4);
14959
14959
  push(multilines ? `{` : `{ `);
14960
14960
  multilines && indent();
14961
14961
  for (let i = 0; i < properties.length; i++) {
@@ -15017,7 +15017,7 @@ function genFunctionExpression(node, context) {
15017
15017
  function genConditionalExpression(node, context) {
15018
15018
  const { test, consequent, alternate, newline: needNewline } = node;
15019
15019
  const { push, indent, deindent, newline } = context;
15020
- if (test.type === "4") {
15020
+ if (test.type === 4) {
15021
15021
  const needsParens = !isSimpleIdentifier(test.content);
15022
15022
  needsParens && push(`(`);
15023
15023
  genExpression(test, context);
@@ -15036,7 +15036,7 @@ function genConditionalExpression(node, context) {
15036
15036
  needNewline && newline();
15037
15037
  needNewline || push(` `);
15038
15038
  push(`: `);
15039
- const isNested = alternate.type === "19";
15039
+ const isNested = alternate.type === 19;
15040
15040
  if (!isNested) {
15041
15041
  context.indentLevel++;
15042
15042
  }
@@ -15091,7 +15091,7 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
15091
15091
  }
15092
15092
  context.onError(
15093
15093
  createCompilerError(
15094
- "45",
15094
+ 45,
15095
15095
  node.loc,
15096
15096
  void 0,
15097
15097
  message
@@ -15101,18 +15101,18 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
15101
15101
  }
15102
15102
 
15103
15103
  const transformExpression = (node, context) => {
15104
- if (node.type === "5") {
15104
+ if (node.type === 5) {
15105
15105
  node.content = processExpression(
15106
15106
  node.content,
15107
15107
  context
15108
15108
  );
15109
- } else if (node.type === "1") {
15109
+ } else if (node.type === 1) {
15110
15110
  for (let i = 0; i < node.props.length; i++) {
15111
15111
  const dir = node.props[i];
15112
- if (dir.type === "7" && dir.name !== "for") {
15112
+ if (dir.type === 7 && dir.name !== "for") {
15113
15113
  const exp = dir.exp;
15114
15114
  const arg = dir.arg;
15115
- if (exp && exp.type === "4" && !(dir.name === "on" && arg)) {
15115
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
15116
15116
  dir.exp = processExpression(
15117
15117
  exp,
15118
15118
  context,
@@ -15120,7 +15120,7 @@ const transformExpression = (node, context) => {
15120
15120
  dir.name === "slot"
15121
15121
  );
15122
15122
  }
15123
- if (arg && arg.type === "4" && !arg.isStatic) {
15123
+ if (arg && arg.type === 4 && !arg.isStatic) {
15124
15124
  dir.arg = processExpression(arg, context);
15125
15125
  }
15126
15126
  }
@@ -15145,7 +15145,7 @@ const transformIf = createStructuralDirectiveTransform(
15145
15145
  let key = 0;
15146
15146
  while (i-- >= 0) {
15147
15147
  const sibling = siblings[i];
15148
- if (sibling && sibling.type === "9") {
15148
+ if (sibling && sibling.type === 9) {
15149
15149
  key += sibling.branches.length;
15150
15150
  }
15151
15151
  }
@@ -15172,7 +15172,7 @@ function processIf(node, dir, context, processCodegen) {
15172
15172
  if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) {
15173
15173
  const loc = dir.exp ? dir.exp.loc : node.loc;
15174
15174
  context.onError(
15175
- createCompilerError("28", dir.loc)
15175
+ createCompilerError(28, dir.loc)
15176
15176
  );
15177
15177
  dir.exp = createSimpleExpression(`true`, false, loc);
15178
15178
  }
@@ -15182,7 +15182,7 @@ function processIf(node, dir, context, processCodegen) {
15182
15182
  if (dir.name === "if") {
15183
15183
  const branch = createIfBranch(node, dir);
15184
15184
  const ifNode = {
15185
- type: "9",
15185
+ type: 9,
15186
15186
  loc: node.loc,
15187
15187
  branches: [branch]
15188
15188
  };
@@ -15196,25 +15196,25 @@ function processIf(node, dir, context, processCodegen) {
15196
15196
  let i = siblings.indexOf(node);
15197
15197
  while (i-- >= -1) {
15198
15198
  const sibling = siblings[i];
15199
- if (sibling && sibling.type === "3") {
15199
+ if (sibling && sibling.type === 3) {
15200
15200
  context.removeNode(sibling);
15201
15201
  process.env.NODE_ENV !== "production" && comments.unshift(sibling);
15202
15202
  continue;
15203
15203
  }
15204
- if (sibling && sibling.type === "2" && !sibling.content.trim().length) {
15204
+ if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
15205
15205
  context.removeNode(sibling);
15206
15206
  continue;
15207
15207
  }
15208
- if (sibling && sibling.type === "9") {
15208
+ if (sibling && sibling.type === 9) {
15209
15209
  if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
15210
15210
  context.onError(
15211
- createCompilerError("30", node.loc)
15211
+ createCompilerError(30, node.loc)
15212
15212
  );
15213
15213
  }
15214
15214
  context.removeNode();
15215
15215
  const branch = createIfBranch(node, dir);
15216
15216
  if (process.env.NODE_ENV !== "production" && comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
15217
- !(context.parent && context.parent.type === "1" && isBuiltInType(context.parent.tag, "transition"))) {
15217
+ !(context.parent && context.parent.type === 1 && isBuiltInType(context.parent.tag, "transition"))) {
15218
15218
  branch.children = [...comments, ...branch.children];
15219
15219
  }
15220
15220
  if (process.env.NODE_ENV !== "production" || false) {
@@ -15224,7 +15224,7 @@ function processIf(node, dir, context, processCodegen) {
15224
15224
  if (isSameKey(userKey, key)) {
15225
15225
  context.onError(
15226
15226
  createCompilerError(
15227
- "29",
15227
+ 29,
15228
15228
  branch.userKey.loc
15229
15229
  )
15230
15230
  );
@@ -15240,7 +15240,7 @@ function processIf(node, dir, context, processCodegen) {
15240
15240
  context.currentNode = null;
15241
15241
  } else {
15242
15242
  context.onError(
15243
- createCompilerError("30", node.loc)
15243
+ createCompilerError(30, node.loc)
15244
15244
  );
15245
15245
  }
15246
15246
  break;
@@ -15248,9 +15248,9 @@ function processIf(node, dir, context, processCodegen) {
15248
15248
  }
15249
15249
  }
15250
15250
  function createIfBranch(node, dir) {
15251
- const isTemplateIf = node.tagType === "3";
15251
+ const isTemplateIf = node.tagType === 3;
15252
15252
  return {
15253
- type: "10",
15253
+ type: 10,
15254
15254
  loc: node.loc,
15255
15255
  condition: dir.name === "else" ? void 0 : dir.exp,
15256
15256
  children: isTemplateIf && !findDir(node, "for") ? node.children : [node],
@@ -15282,21 +15282,21 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
15282
15282
  `${keyIndex}`,
15283
15283
  false,
15284
15284
  locStub,
15285
- "2"
15285
+ 2
15286
15286
  )
15287
15287
  );
15288
15288
  const { children } = branch;
15289
15289
  const firstChild = children[0];
15290
- const needFragmentWrapper = children.length !== 1 || firstChild.type !== "1";
15290
+ const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
15291
15291
  if (needFragmentWrapper) {
15292
- if (children.length === 1 && firstChild.type === "11") {
15292
+ if (children.length === 1 && firstChild.type === 11) {
15293
15293
  const vnodeCall = firstChild.codegenNode;
15294
15294
  injectProp(vnodeCall, keyProperty, context);
15295
15295
  return vnodeCall;
15296
15296
  } else {
15297
15297
  let patchFlag = 64;
15298
15298
  let patchFlagText = PatchFlagNames[64];
15299
- if (process.env.NODE_ENV !== "production" && !branch.isTemplateIf && children.filter((c) => c.type !== "3").length === 1) {
15299
+ if (process.env.NODE_ENV !== "production" && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
15300
15300
  patchFlag |= 2048;
15301
15301
  patchFlagText += `, ${PatchFlagNames[2048]}`;
15302
15302
  }
@@ -15317,7 +15317,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
15317
15317
  } else {
15318
15318
  const ret = firstChild.codegenNode;
15319
15319
  const vnodeCall = getMemoedVNodeCall(ret);
15320
- if (vnodeCall.type === "13") {
15320
+ if (vnodeCall.type === 13) {
15321
15321
  makeBlock(vnodeCall, context);
15322
15322
  }
15323
15323
  injectProp(vnodeCall, keyProperty, context);
@@ -15328,7 +15328,7 @@ function isSameKey(a, b) {
15328
15328
  if (!a || a.type !== b.type) {
15329
15329
  return false;
15330
15330
  }
15331
- if (a.type === "6") {
15331
+ if (a.type === 6) {
15332
15332
  if (a.value.content !== b.value.content) {
15333
15333
  return false;
15334
15334
  }
@@ -15338,7 +15338,7 @@ function isSameKey(a, b) {
15338
15338
  if (exp.type !== branchExp.type) {
15339
15339
  return false;
15340
15340
  }
15341
- if (exp.type !== "4" || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
15341
+ if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
15342
15342
  return false;
15343
15343
  }
15344
15344
  }
@@ -15346,13 +15346,13 @@ function isSameKey(a, b) {
15346
15346
  }
15347
15347
  function getParentCondition(node) {
15348
15348
  while (true) {
15349
- if (node.type === "19") {
15350
- if (node.alternate.type === "19") {
15349
+ if (node.type === 19) {
15350
+ if (node.alternate.type === 19) {
15351
15351
  node = node.alternate;
15352
15352
  } else {
15353
15353
  return node;
15354
15354
  }
15355
- } else if (node.type === "20") {
15355
+ } else if (node.type === 20) {
15356
15356
  node = node.value;
15357
15357
  }
15358
15358
  }
@@ -15369,9 +15369,9 @@ const transformFor = createStructuralDirectiveTransform(
15369
15369
  const isTemplate = isTemplateNode(node);
15370
15370
  const memo = findDir(node, "memo");
15371
15371
  const keyProp = findProp(node, `key`);
15372
- const keyExp = keyProp && (keyProp.type === "6" ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
15372
+ const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
15373
15373
  const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
15374
- const isStableFragment = forNode.source.type === "4" && forNode.source.constType > 0;
15374
+ const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
15375
15375
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
15376
15376
  forNode.codegenNode = createVNodeCall(
15377
15377
  context,
@@ -15391,12 +15391,12 @@ const transformFor = createStructuralDirectiveTransform(
15391
15391
  const { children } = forNode;
15392
15392
  if ((process.env.NODE_ENV !== "production" || false) && isTemplate) {
15393
15393
  node.children.some((c) => {
15394
- if (c.type === "1") {
15394
+ if (c.type === 1) {
15395
15395
  const key = findProp(c, "key");
15396
15396
  if (key) {
15397
15397
  context.onError(
15398
15398
  createCompilerError(
15399
- "33",
15399
+ 33,
15400
15400
  key.loc
15401
15401
  )
15402
15402
  );
@@ -15405,7 +15405,7 @@ const transformFor = createStructuralDirectiveTransform(
15405
15405
  }
15406
15406
  });
15407
15407
  }
15408
- const needFragmentWrapper = children.length !== 1 || children[0].type !== "1";
15408
+ const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
15409
15409
  const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
15410
15410
  if (slotOutlet) {
15411
15411
  childBlock = slotOutlet.codegenNode;
@@ -15492,7 +15492,7 @@ const transformFor = createStructuralDirectiveTransform(
15492
15492
  function processFor(node, dir, context, processCodegen) {
15493
15493
  if (!dir.exp) {
15494
15494
  context.onError(
15495
- createCompilerError("31", dir.loc)
15495
+ createCompilerError(31, dir.loc)
15496
15496
  );
15497
15497
  return;
15498
15498
  }
@@ -15504,14 +15504,14 @@ function processFor(node, dir, context, processCodegen) {
15504
15504
  );
15505
15505
  if (!parseResult) {
15506
15506
  context.onError(
15507
- createCompilerError("32", dir.loc)
15507
+ createCompilerError(32, dir.loc)
15508
15508
  );
15509
15509
  return;
15510
15510
  }
15511
15511
  const { addIdentifiers, removeIdentifiers, scopes } = context;
15512
15512
  const { source, value, key, index } = parseResult;
15513
15513
  const forNode = {
15514
- type: "11",
15514
+ type: 11,
15515
15515
  loc: dir.loc,
15516
15516
  source,
15517
15517
  valueAlias: value,
@@ -15624,7 +15624,7 @@ function createParamsList(args) {
15624
15624
 
15625
15625
  const defaultFallback = createSimpleExpression(`undefined`, false);
15626
15626
  const trackSlotScopes = (node, context) => {
15627
- if (node.type === "1" && (node.tagType === "1" || node.tagType === "3")) {
15627
+ if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
15628
15628
  const vSlot = findDir(node, "slot");
15629
15629
  if (vSlot) {
15630
15630
  vSlot.exp;
@@ -15670,14 +15670,14 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
15670
15670
  const slotElement = children[i];
15671
15671
  let slotDir;
15672
15672
  if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
15673
- if (slotElement.type !== "3") {
15673
+ if (slotElement.type !== 3) {
15674
15674
  implicitDefaultChildren.push(slotElement);
15675
15675
  }
15676
15676
  continue;
15677
15677
  }
15678
15678
  if (onComponentSlot) {
15679
15679
  context.onError(
15680
- createCompilerError("37", slotDir.loc)
15680
+ createCompilerError(37, slotDir.loc)
15681
15681
  );
15682
15682
  break;
15683
15683
  }
@@ -15717,7 +15717,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
15717
15717
  let prev;
15718
15718
  while (j--) {
15719
15719
  prev = children[j];
15720
- if (prev.type !== "3") {
15720
+ if (prev.type !== 3) {
15721
15721
  break;
15722
15722
  }
15723
15723
  }
@@ -15725,7 +15725,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
15725
15725
  children.splice(i, 1);
15726
15726
  i--;
15727
15727
  let conditional = dynamicSlots[dynamicSlots.length - 1];
15728
- while (conditional.alternate.type === "19") {
15728
+ while (conditional.alternate.type === 19) {
15729
15729
  conditional = conditional.alternate;
15730
15730
  }
15731
15731
  conditional.alternate = vElse.exp ? createConditionalExpression(
@@ -15739,7 +15739,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
15739
15739
  ) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);
15740
15740
  } else {
15741
15741
  context.onError(
15742
- createCompilerError("30", vElse.loc)
15742
+ createCompilerError(30, vElse.loc)
15743
15743
  );
15744
15744
  }
15745
15745
  } else if (vFor = findDir(slotElement, "for")) {
@@ -15759,7 +15759,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
15759
15759
  );
15760
15760
  } else {
15761
15761
  context.onError(
15762
- createCompilerError("32", vFor.loc)
15762
+ createCompilerError(32, vFor.loc)
15763
15763
  );
15764
15764
  }
15765
15765
  } else {
@@ -15767,7 +15767,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
15767
15767
  if (seenSlotNames.has(staticSlotName)) {
15768
15768
  context.onError(
15769
15769
  createCompilerError(
15770
- "38",
15770
+ 38,
15771
15771
  dirLoc
15772
15772
  )
15773
15773
  );
@@ -15798,7 +15798,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
15798
15798
  if (hasNamedDefaultSlot) {
15799
15799
  context.onError(
15800
15800
  createCompilerError(
15801
- "39",
15801
+ 39,
15802
15802
  implicitDefaultChildren[0].loc
15803
15803
  )
15804
15804
  );
@@ -15851,17 +15851,17 @@ function hasForwardedSlots(children) {
15851
15851
  for (let i = 0; i < children.length; i++) {
15852
15852
  const child = children[i];
15853
15853
  switch (child.type) {
15854
- case "1":
15855
- if (child.tagType === "2" || hasForwardedSlots(child.children)) {
15854
+ case 1:
15855
+ if (child.tagType === 2 || hasForwardedSlots(child.children)) {
15856
15856
  return true;
15857
15857
  }
15858
15858
  break;
15859
- case "9":
15859
+ case 9:
15860
15860
  if (hasForwardedSlots(child.branches))
15861
15861
  return true;
15862
15862
  break;
15863
- case "10":
15864
- case "11":
15863
+ case 10:
15864
+ case 11:
15865
15865
  if (hasForwardedSlots(child.children))
15866
15866
  return true;
15867
15867
  break;
@@ -15870,20 +15870,20 @@ function hasForwardedSlots(children) {
15870
15870
  return false;
15871
15871
  }
15872
15872
  function isNonWhitespaceContent(node) {
15873
- if (node.type !== "2" && node.type !== "12")
15873
+ if (node.type !== 2 && node.type !== 12)
15874
15874
  return true;
15875
- return node.type === "2" ? !!node.content.trim() : isNonWhitespaceContent(node.content);
15875
+ return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
15876
15876
  }
15877
15877
 
15878
15878
  const directiveImportMap = /* @__PURE__ */ new WeakMap();
15879
15879
  const transformElement = (node, context) => {
15880
15880
  return function postTransformElement() {
15881
15881
  node = context.currentNode;
15882
- if (!(node.type === "1" && (node.tagType === "0" || node.tagType === "1"))) {
15882
+ if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
15883
15883
  return;
15884
15884
  }
15885
15885
  const { tag, props } = node;
15886
- const isComponent = node.tagType === "1";
15886
+ const isComponent = node.tagType === 1;
15887
15887
  let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`;
15888
15888
  const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
15889
15889
  let vnodeProps;
@@ -15926,7 +15926,7 @@ const transformElement = (node, context) => {
15926
15926
  patchFlag |= 1024;
15927
15927
  if (process.env.NODE_ENV !== "production" && node.children.length > 1) {
15928
15928
  context.onError(
15929
- createCompilerError("46", {
15929
+ createCompilerError(46, {
15930
15930
  start: node.children[0].loc.start,
15931
15931
  end: node.children[node.children.length - 1].loc.end,
15932
15932
  source: ""
@@ -15946,11 +15946,11 @@ const transformElement = (node, context) => {
15946
15946
  } else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
15947
15947
  const child = node.children[0];
15948
15948
  const type = child.type;
15949
- const hasDynamicTextChild = type === "5" || type === "8";
15949
+ const hasDynamicTextChild = type === 5 || type === 8;
15950
15950
  if (hasDynamicTextChild && getConstantType(child, context) === 0) {
15951
15951
  patchFlag |= 1;
15952
15952
  }
15953
- if (hasDynamicTextChild || type === "2") {
15953
+ if (hasDynamicTextChild || type === 2) {
15954
15954
  vnodeChildren = child;
15955
15955
  } else {
15956
15956
  vnodeChildren = node.children;
@@ -15998,13 +15998,13 @@ function resolveComponentType(node, context, ssr = false) {
15998
15998
  "COMPILER_IS_ON_ELEMENT",
15999
15999
  context
16000
16000
  )) {
16001
- const exp = isProp.type === "6" ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
16001
+ const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
16002
16002
  if (exp) {
16003
16003
  return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
16004
16004
  exp
16005
16005
  ]);
16006
16006
  }
16007
- } else if (isProp.type === "6" && isProp.value.content.startsWith("vue:")) {
16007
+ } else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) {
16008
16008
  tag = isProp.value.content.slice(4);
16009
16009
  }
16010
16010
  }
@@ -16063,7 +16063,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16063
16063
  if (isEventHandler && isReservedProp(name)) {
16064
16064
  hasVnodeHook = true;
16065
16065
  }
16066
- if (value.type === "20" || (value.type === "4" || value.type === "8") && getConstantType(value, context) > 0) {
16066
+ if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
16067
16067
  return;
16068
16068
  }
16069
16069
  if (name === "ref") {
@@ -16084,7 +16084,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16084
16084
  };
16085
16085
  for (let i = 0; i < props.length; i++) {
16086
16086
  const prop = props[i];
16087
- if (prop.type === "6") {
16087
+ if (prop.type === 6) {
16088
16088
  const { loc, name, value } = prop;
16089
16089
  let isStatic = true;
16090
16090
  if (name === "ref") {
@@ -16125,7 +16125,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16125
16125
  if (name === "slot") {
16126
16126
  if (!isComponent) {
16127
16127
  context.onError(
16128
- createCompilerError("40", loc)
16128
+ createCompilerError(40, loc)
16129
16129
  );
16130
16130
  }
16131
16131
  continue;
@@ -16166,9 +16166,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16166
16166
  {
16167
16167
  if (process.env.NODE_ENV !== "production") {
16168
16168
  const hasOverridableKeys = mergeArgs.some((arg2) => {
16169
- if (arg2.type === "15") {
16169
+ if (arg2.type === 15) {
16170
16170
  return arg2.properties.some(({ key }) => {
16171
- if (key.type !== "4" || !key.isStatic) {
16171
+ if (key.type !== 4 || !key.isStatic) {
16172
16172
  return true;
16173
16173
  }
16174
16174
  return key.content !== "class" && key.content !== "style" && !isOn(key.content);
@@ -16196,7 +16196,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16196
16196
  mergeArgs.push(exp);
16197
16197
  } else {
16198
16198
  pushMergeArg({
16199
- type: "14",
16199
+ type: 14,
16200
16200
  loc,
16201
16201
  callee: context.helper(TO_HANDLERS),
16202
16202
  arguments: isComponent ? [exp] : [exp, `true`]
@@ -16205,7 +16205,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16205
16205
  } else {
16206
16206
  context.onError(
16207
16207
  createCompilerError(
16208
- isVBind ? "34" : "35",
16208
+ isVBind ? 34 : 35,
16209
16209
  loc
16210
16210
  )
16211
16211
  );
@@ -16274,7 +16274,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16274
16274
  }
16275
16275
  if (!context.inSSR && propsExpression) {
16276
16276
  switch (propsExpression.type) {
16277
- case "15":
16277
+ case 15:
16278
16278
  let classKeyIndex = -1;
16279
16279
  let styleKeyIndex = -1;
16280
16280
  let hasDynamicKey = false;
@@ -16301,9 +16301,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16301
16301
  }
16302
16302
  if (styleProp && // the static style is compiled into an object,
16303
16303
  // so use `hasStyleBinding` to ensure that it is a dynamic style binding
16304
- (hasStyleBinding || styleProp.value.type === "4" && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
16304
+ (hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
16305
16305
  // v-bind:style with static literal object
16306
- styleProp.value.type === "17")) {
16306
+ styleProp.value.type === 17)) {
16307
16307
  styleProp.value = createCallExpression(
16308
16308
  context.helper(NORMALIZE_STYLE),
16309
16309
  [styleProp.value]
@@ -16316,7 +16316,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
16316
16316
  );
16317
16317
  }
16318
16318
  break;
16319
- case "14":
16319
+ case 14:
16320
16320
  break;
16321
16321
  default:
16322
16322
  propsExpression = createCallExpression(
@@ -16343,7 +16343,7 @@ function dedupeProperties(properties) {
16343
16343
  const deduped = [];
16344
16344
  for (let i = 0; i < properties.length; i++) {
16345
16345
  const prop = properties[i];
16346
- if (prop.key.type === "8" || !prop.key.isStatic) {
16346
+ if (prop.key.type === 8 || !prop.key.isStatic) {
16347
16347
  deduped.push(prop);
16348
16348
  continue;
16349
16349
  }
@@ -16361,7 +16361,7 @@ function dedupeProperties(properties) {
16361
16361
  return deduped;
16362
16362
  }
16363
16363
  function mergeAsArray(existing, incoming) {
16364
- if (existing.value.type === "17") {
16364
+ if (existing.value.type === 17) {
16365
16365
  existing.value.elements.push(incoming.value);
16366
16366
  } else {
16367
16367
  existing.value = createArrayExpression(
@@ -16460,7 +16460,7 @@ function processSlotOutlet(node, context) {
16460
16460
  const nonNameProps = [];
16461
16461
  for (let i = 0; i < node.props.length; i++) {
16462
16462
  const p = node.props[i];
16463
- if (p.type === "6") {
16463
+ if (p.type === 6) {
16464
16464
  if (p.value) {
16465
16465
  if (p.name === "name") {
16466
16466
  slotName = JSON.stringify(p.value.content);
@@ -16493,7 +16493,7 @@ function processSlotOutlet(node, context) {
16493
16493
  if (directives.length) {
16494
16494
  context.onError(
16495
16495
  createCompilerError(
16496
- "36",
16496
+ 36,
16497
16497
  directives[0].loc
16498
16498
  )
16499
16499
  );
@@ -16509,16 +16509,16 @@ const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+
16509
16509
  const transformOn$1 = (dir, node, context, augmentor) => {
16510
16510
  const { loc, modifiers, arg } = dir;
16511
16511
  if (!dir.exp && !modifiers.length) {
16512
- context.onError(createCompilerError("35", loc));
16512
+ context.onError(createCompilerError(35, loc));
16513
16513
  }
16514
16514
  let eventName;
16515
- if (arg.type === "4") {
16515
+ if (arg.type === 4) {
16516
16516
  if (arg.isStatic) {
16517
16517
  let rawName = arg.content;
16518
16518
  if (rawName.startsWith("vue:")) {
16519
16519
  rawName = `vnode-${rawName.slice(4)}`;
16520
16520
  }
16521
- const eventString = node.tagType !== "0" || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
16521
+ const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
16522
16522
  // for non-element and vnode lifecycle event listeners, auto convert
16523
16523
  // it to camelCase. See issue #2249
16524
16524
  toHandlerKey(camelize(rawName))
@@ -16586,14 +16586,14 @@ const transformOn$1 = (dir, node, context, augmentor) => {
16586
16586
  const transformBind = (dir, _node, context) => {
16587
16587
  const { exp, modifiers, loc } = dir;
16588
16588
  const arg = dir.arg;
16589
- if (arg.type !== "4") {
16589
+ if (arg.type !== 4) {
16590
16590
  arg.children.unshift(`(`);
16591
16591
  arg.children.push(`) || ""`);
16592
16592
  } else if (!arg.isStatic) {
16593
16593
  arg.content = `${arg.content} || ""`;
16594
16594
  }
16595
16595
  if (modifiers.includes("camel")) {
16596
- if (arg.type === "4") {
16596
+ if (arg.type === 4) {
16597
16597
  if (arg.isStatic) {
16598
16598
  arg.content = camelize(arg.content);
16599
16599
  } else {
@@ -16612,8 +16612,8 @@ const transformBind = (dir, _node, context) => {
16612
16612
  injectPrefix(arg, "^");
16613
16613
  }
16614
16614
  }
16615
- if (!exp || exp.type === "4" && !exp.content.trim()) {
16616
- context.onError(createCompilerError("34", loc));
16615
+ if (!exp || exp.type === 4 && !exp.content.trim()) {
16616
+ context.onError(createCompilerError(34, loc));
16617
16617
  return {
16618
16618
  props: [createObjectProperty(arg, createSimpleExpression("", true, loc))]
16619
16619
  };
@@ -16623,7 +16623,7 @@ const transformBind = (dir, _node, context) => {
16623
16623
  };
16624
16624
  };
16625
16625
  const injectPrefix = (arg, prefix) => {
16626
- if (arg.type === "4") {
16626
+ if (arg.type === 4) {
16627
16627
  if (arg.isStatic) {
16628
16628
  arg.content = prefix + arg.content;
16629
16629
  } else {
@@ -16636,7 +16636,7 @@ const injectPrefix = (arg, prefix) => {
16636
16636
  };
16637
16637
 
16638
16638
  const transformText = (node, context) => {
16639
- if (node.type === "0" || node.type === "1" || node.type === "11" || node.type === "10") {
16639
+ if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
16640
16640
  return () => {
16641
16641
  const children = node.children;
16642
16642
  let currentContainer = void 0;
@@ -16668,13 +16668,13 @@ const transformText = (node, context) => {
16668
16668
  // as-is since the runtime has dedicated fast path for this by directly
16669
16669
  // setting textContent of the element.
16670
16670
  // for component root it's always normalized anyway.
16671
- children.length === 1 && (node.type === "0" || node.type === "1" && node.tagType === "0" && // #3756
16671
+ children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
16672
16672
  // custom directives can potentially add DOM elements arbitrarily,
16673
16673
  // we need to avoid setting textContent of the element at runtime
16674
16674
  // to avoid accidentally overwriting the DOM elements added
16675
16675
  // by the user through custom directives.
16676
16676
  !node.props.find(
16677
- (p) => p.type === "7" && !context.directiveTransforms[p.name]
16677
+ (p) => p.type === 7 && !context.directiveTransforms[p.name]
16678
16678
  ) && // in compat mode, <template> tags with no special directives
16679
16679
  // will be rendered as a fragment so its children must be
16680
16680
  // converted into vnodes.
@@ -16683,9 +16683,9 @@ const transformText = (node, context) => {
16683
16683
  }
16684
16684
  for (let i = 0; i < children.length; i++) {
16685
16685
  const child = children[i];
16686
- if (isText$1(child) || child.type === "8") {
16686
+ if (isText$1(child) || child.type === 8) {
16687
16687
  const callArgs = [];
16688
- if (child.type !== "2" || child.content !== " ") {
16688
+ if (child.type !== 2 || child.content !== " ") {
16689
16689
  callArgs.push(child);
16690
16690
  }
16691
16691
  if (!context.ssr && getConstantType(child, context) === 0) {
@@ -16694,7 +16694,7 @@ const transformText = (node, context) => {
16694
16694
  );
16695
16695
  }
16696
16696
  children[i] = {
16697
- type: "12",
16697
+ type: 12,
16698
16698
  content: child,
16699
16699
  loc: child.loc,
16700
16700
  codegenNode: createCallExpression(
@@ -16710,7 +16710,7 @@ const transformText = (node, context) => {
16710
16710
 
16711
16711
  const seen$1 = /* @__PURE__ */ new WeakSet();
16712
16712
  const transformOnce = (node, context) => {
16713
- if (node.type === "1" && findDir(node, "once", true)) {
16713
+ if (node.type === 1 && findDir(node, "once", true)) {
16714
16714
  if (seen$1.has(node) || context.inVOnce) {
16715
16715
  return;
16716
16716
  }
@@ -16735,21 +16735,21 @@ const transformModel$1 = (dir, node, context) => {
16735
16735
  const { exp, arg } = dir;
16736
16736
  if (!exp) {
16737
16737
  context.onError(
16738
- createCompilerError("41", dir.loc)
16738
+ createCompilerError(41, dir.loc)
16739
16739
  );
16740
16740
  return createTransformProps();
16741
16741
  }
16742
16742
  const rawExp = exp.loc.source;
16743
- const expString = exp.type === "4" ? exp.content : rawExp;
16743
+ const expString = exp.type === 4 ? exp.content : rawExp;
16744
16744
  const bindingType = context.bindingMetadata[rawExp];
16745
16745
  if (bindingType === "props" || bindingType === "props-aliased") {
16746
- context.onError(createCompilerError("44", exp.loc));
16746
+ context.onError(createCompilerError(44, exp.loc));
16747
16747
  return createTransformProps();
16748
16748
  }
16749
16749
  const maybeRef = false;
16750
16750
  if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) {
16751
16751
  context.onError(
16752
- createCompilerError("42", exp.loc)
16752
+ createCompilerError(42, exp.loc)
16753
16753
  );
16754
16754
  return createTransformProps();
16755
16755
  }
@@ -16770,7 +16770,7 @@ const transformModel$1 = (dir, node, context) => {
16770
16770
  // "onUpdate:modelValue": $event => (foo = $event)
16771
16771
  createObjectProperty(eventName, assignmentExp)
16772
16772
  ];
16773
- if (dir.modifiers.length && node.tagType === "1") {
16773
+ if (dir.modifiers.length && node.tagType === 1) {
16774
16774
  const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
16775
16775
  const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
16776
16776
  props.push(
@@ -16780,7 +16780,7 @@ const transformModel$1 = (dir, node, context) => {
16780
16780
  `{ ${modifiers} }`,
16781
16781
  false,
16782
16782
  dir.loc,
16783
- "2"
16783
+ 2
16784
16784
  )
16785
16785
  )
16786
16786
  );
@@ -16796,30 +16796,30 @@ const transformFilter = (node, context) => {
16796
16796
  if (!isCompatEnabled("COMPILER_FILTER", context)) {
16797
16797
  return;
16798
16798
  }
16799
- if (node.type === "5") {
16799
+ if (node.type === 5) {
16800
16800
  rewriteFilter(node.content, context);
16801
16801
  }
16802
- if (node.type === "1") {
16802
+ if (node.type === 1) {
16803
16803
  node.props.forEach((prop) => {
16804
- if (prop.type === "7" && prop.name !== "for" && prop.exp) {
16804
+ if (prop.type === 7 && prop.name !== "for" && prop.exp) {
16805
16805
  rewriteFilter(prop.exp, context);
16806
16806
  }
16807
16807
  });
16808
16808
  }
16809
16809
  };
16810
16810
  function rewriteFilter(node, context) {
16811
- if (node.type === "4") {
16811
+ if (node.type === 4) {
16812
16812
  parseFilter(node, context);
16813
16813
  } else {
16814
16814
  for (let i = 0; i < node.children.length; i++) {
16815
16815
  const child = node.children[i];
16816
16816
  if (typeof child !== "object")
16817
16817
  continue;
16818
- if (child.type === "4") {
16818
+ if (child.type === 4) {
16819
16819
  parseFilter(child, context);
16820
- } else if (child.type === "8") {
16820
+ } else if (child.type === 8) {
16821
16821
  rewriteFilter(node, context);
16822
- } else if (child.type === "5") {
16822
+ } else if (child.type === 5) {
16823
16823
  rewriteFilter(child.content, context);
16824
16824
  }
16825
16825
  }
@@ -16940,7 +16940,7 @@ function wrapFilter(exp, filter, context) {
16940
16940
 
16941
16941
  const seen = /* @__PURE__ */ new WeakSet();
16942
16942
  const transformMemo = (node, context) => {
16943
- if (node.type === "1") {
16943
+ if (node.type === 1) {
16944
16944
  const dir = findDir(node, "memo");
16945
16945
  if (!dir || seen.has(node)) {
16946
16946
  return;
@@ -16948,8 +16948,8 @@ const transformMemo = (node, context) => {
16948
16948
  seen.add(node);
16949
16949
  return () => {
16950
16950
  const codegenNode = node.codegenNode || context.currentNode.codegenNode;
16951
- if (codegenNode && codegenNode.type === "13") {
16952
- if (node.tagType !== "1") {
16951
+ if (codegenNode && codegenNode.type === 13) {
16952
+ if (node.tagType !== 1) {
16953
16953
  makeBlock(codegenNode, context);
16954
16954
  }
16955
16955
  node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
@@ -16989,17 +16989,17 @@ function baseCompile(template, options = {}) {
16989
16989
  const isModuleMode = options.mode === "module";
16990
16990
  {
16991
16991
  if (options.prefixIdentifiers === true) {
16992
- onError(createCompilerError("47"));
16992
+ onError(createCompilerError(47));
16993
16993
  } else if (isModuleMode) {
16994
- onError(createCompilerError("48"));
16994
+ onError(createCompilerError(48));
16995
16995
  }
16996
16996
  }
16997
16997
  const prefixIdentifiers = false;
16998
16998
  if (options.cacheHandlers) {
16999
- onError(createCompilerError("49"));
16999
+ onError(createCompilerError(49));
17000
17000
  }
17001
17001
  if (options.scopeId && !isModuleMode) {
17002
- onError(createCompilerError("50"));
17002
+ onError(createCompilerError(50));
17003
17003
  }
17004
17004
  const ast = isString(template) ? baseParse(template, options) : template;
17005
17005
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
@@ -17086,30 +17086,30 @@ const parserOptions = {
17086
17086
  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
17087
17087
  getNamespace(tag, parent) {
17088
17088
  let ns = parent ? parent.ns : 0;
17089
- if (parent && ns === "2") {
17089
+ if (parent && ns === 2) {
17090
17090
  if (parent.tag === "annotation-xml") {
17091
17091
  if (tag === "svg") {
17092
- return "1";
17092
+ return 1;
17093
17093
  }
17094
17094
  if (parent.props.some(
17095
- (a) => a.type === "6" && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
17095
+ (a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
17096
17096
  )) {
17097
17097
  ns = 0;
17098
17098
  }
17099
17099
  } else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
17100
17100
  ns = 0;
17101
17101
  }
17102
- } else if (parent && ns === "1") {
17102
+ } else if (parent && ns === 1) {
17103
17103
  if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
17104
17104
  ns = 0;
17105
17105
  }
17106
17106
  }
17107
17107
  if (ns === 0) {
17108
17108
  if (tag === "svg") {
17109
- return "1";
17109
+ return 1;
17110
17110
  }
17111
17111
  if (tag === "math") {
17112
- return "2";
17112
+ return 2;
17113
17113
  }
17114
17114
  }
17115
17115
  return ns;
@@ -17118,22 +17118,22 @@ const parserOptions = {
17118
17118
  getTextMode({ tag, ns }) {
17119
17119
  if (ns === 0) {
17120
17120
  if (tag === "textarea" || tag === "title") {
17121
- return "1";
17121
+ return 1;
17122
17122
  }
17123
17123
  if (isRawTextContainer(tag)) {
17124
- return "2";
17124
+ return 2;
17125
17125
  }
17126
17126
  }
17127
- return "0";
17127
+ return 0;
17128
17128
  }
17129
17129
  };
17130
17130
 
17131
17131
  const transformStyle = (node) => {
17132
- if (node.type === "1") {
17132
+ if (node.type === 1) {
17133
17133
  node.props.forEach((p, i) => {
17134
- if (p.type === "6" && p.name === "style" && p.value) {
17134
+ if (p.type === 6 && p.name === "style" && p.value) {
17135
17135
  node.props[i] = {
17136
- type: "7",
17136
+ type: 7,
17137
17137
  name: `bind`,
17138
17138
  arg: createSimpleExpression(`style`, true, p.loc),
17139
17139
  exp: parseInlineCSS(p.value.content, p.loc),
@@ -17150,7 +17150,7 @@ const parseInlineCSS = (cssText, loc) => {
17150
17150
  JSON.stringify(normalized),
17151
17151
  false,
17152
17152
  loc,
17153
- "3"
17153
+ 3
17154
17154
  );
17155
17155
  };
17156
17156
 
@@ -17163,16 +17163,16 @@ function createDOMCompilerError(code, loc) {
17163
17163
  }
17164
17164
  const DOMErrorMessages = {
17165
17165
  [51]: `v-html is missing expression.`,
17166
- ["52"]: `v-html will override element children.`,
17167
- ["53"]: `v-text is missing expression.`,
17168
- ["54"]: `v-text will override element children.`,
17169
- ["55"]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
17170
- ["56"]: `v-model argument is not supported on plain elements.`,
17171
- ["57"]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
17172
- ["58"]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
17173
- ["59"]: `v-show is missing expression.`,
17174
- ["60"]: `<Transition> expects exactly one child element or component.`,
17175
- ["61"]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
17166
+ [52]: `v-html will override element children.`,
17167
+ [53]: `v-text is missing expression.`,
17168
+ [54]: `v-text will override element children.`,
17169
+ [55]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
17170
+ [56]: `v-model argument is not supported on plain elements.`,
17171
+ [57]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
17172
+ [58]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
17173
+ [59]: `v-show is missing expression.`,
17174
+ [60]: `<Transition> expects exactly one child element or component.`,
17175
+ [61]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
17176
17176
  };
17177
17177
 
17178
17178
  const transformVHtml = (dir, node, context) => {
@@ -17184,7 +17184,7 @@ const transformVHtml = (dir, node, context) => {
17184
17184
  }
17185
17185
  if (node.children.length) {
17186
17186
  context.onError(
17187
- createDOMCompilerError("52", loc)
17187
+ createDOMCompilerError(52, loc)
17188
17188
  );
17189
17189
  node.children.length = 0;
17190
17190
  }
@@ -17202,12 +17202,12 @@ const transformVText = (dir, node, context) => {
17202
17202
  const { exp, loc } = dir;
17203
17203
  if (!exp) {
17204
17204
  context.onError(
17205
- createDOMCompilerError("53", loc)
17205
+ createDOMCompilerError(53, loc)
17206
17206
  );
17207
17207
  }
17208
17208
  if (node.children.length) {
17209
17209
  context.onError(
17210
- createDOMCompilerError("54", loc)
17210
+ createDOMCompilerError(54, loc)
17211
17211
  );
17212
17212
  node.children.length = 0;
17213
17213
  }
@@ -17227,13 +17227,13 @@ const transformVText = (dir, node, context) => {
17227
17227
 
17228
17228
  const transformModel = (dir, node, context) => {
17229
17229
  const baseResult = transformModel$1(dir, node, context);
17230
- if (!baseResult.props.length || node.tagType === "1") {
17230
+ if (!baseResult.props.length || node.tagType === 1) {
17231
17231
  return baseResult;
17232
17232
  }
17233
17233
  if (dir.arg) {
17234
17234
  context.onError(
17235
17235
  createDOMCompilerError(
17236
- "56",
17236
+ 56,
17237
17237
  dir.arg.loc
17238
17238
  )
17239
17239
  );
@@ -17243,7 +17243,7 @@ const transformModel = (dir, node, context) => {
17243
17243
  if (value) {
17244
17244
  context.onError(
17245
17245
  createDOMCompilerError(
17246
- "58",
17246
+ 58,
17247
17247
  value.loc
17248
17248
  )
17249
17249
  );
@@ -17257,7 +17257,7 @@ const transformModel = (dir, node, context) => {
17257
17257
  if (tag === "input" || isCustomElement) {
17258
17258
  const type = findProp(node, `type`);
17259
17259
  if (type) {
17260
- if (type.type === "7") {
17260
+ if (type.type === 7) {
17261
17261
  directiveToUse = V_MODEL_DYNAMIC;
17262
17262
  } else if (type.value) {
17263
17263
  switch (type.value.content) {
@@ -17271,7 +17271,7 @@ const transformModel = (dir, node, context) => {
17271
17271
  isInvalidType = true;
17272
17272
  context.onError(
17273
17273
  createDOMCompilerError(
17274
- "57",
17274
+ 57,
17275
17275
  dir.loc
17276
17276
  )
17277
17277
  );
@@ -17297,13 +17297,13 @@ const transformModel = (dir, node, context) => {
17297
17297
  } else {
17298
17298
  context.onError(
17299
17299
  createDOMCompilerError(
17300
- "55",
17300
+ 55,
17301
17301
  dir.loc
17302
17302
  )
17303
17303
  );
17304
17304
  }
17305
17305
  baseResult.props = baseResult.props.filter(
17306
- (p) => !(p.key.type === "4" && p.key.content === "modelValue")
17306
+ (p) => !(p.key.type === 4 && p.key.content === "modelValue")
17307
17307
  );
17308
17308
  return baseResult;
17309
17309
  };
@@ -17361,7 +17361,7 @@ const resolveModifiers = (key, modifiers, context, loc) => {
17361
17361
  };
17362
17362
  const transformClick = (key, event) => {
17363
17363
  const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick";
17364
- return isStaticClick ? createSimpleExpression(event, true) : key.type !== "4" ? createCompoundExpression([
17364
+ return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([
17365
17365
  `(`,
17366
17366
  key,
17367
17367
  `) === "onClick" ? "${event}" : (`,
@@ -17409,7 +17409,7 @@ const transformShow = (dir, node, context) => {
17409
17409
  const { exp, loc } = dir;
17410
17410
  if (!exp) {
17411
17411
  context.onError(
17412
- createDOMCompilerError("59", loc)
17412
+ createDOMCompilerError(59, loc)
17413
17413
  );
17414
17414
  }
17415
17415
  return {
@@ -17419,7 +17419,7 @@ const transformShow = (dir, node, context) => {
17419
17419
  };
17420
17420
 
17421
17421
  const transformTransition = (node, context) => {
17422
- if (node.type === "1" && node.tagType === "1") {
17422
+ if (node.type === 1 && node.tagType === 1) {
17423
17423
  const component = context.isBuiltInComponent(node.tag);
17424
17424
  if (component === TRANSITION) {
17425
17425
  return () => {
@@ -17429,7 +17429,7 @@ const transformTransition = (node, context) => {
17429
17429
  if (hasMultipleChildren(node)) {
17430
17430
  context.onError(
17431
17431
  createDOMCompilerError(
17432
- "60",
17432
+ 60,
17433
17433
  {
17434
17434
  start: node.children[0].loc.start,
17435
17435
  end: node.children[node.children.length - 1].loc.end,
@@ -17439,11 +17439,11 @@ const transformTransition = (node, context) => {
17439
17439
  );
17440
17440
  }
17441
17441
  const child = node.children[0];
17442
- if (child.type === "1") {
17442
+ if (child.type === 1) {
17443
17443
  for (const p of child.props) {
17444
- if (p.type === "7" && p.name === "show") {
17444
+ if (p.type === 7 && p.name === "show") {
17445
17445
  node.props.push({
17446
- type: "6",
17446
+ type: 6,
17447
17447
  name: "persisted",
17448
17448
  value: void 0,
17449
17449
  loc: node.loc
@@ -17457,16 +17457,16 @@ const transformTransition = (node, context) => {
17457
17457
  };
17458
17458
  function hasMultipleChildren(node) {
17459
17459
  const children = node.children = node.children.filter(
17460
- (c) => c.type !== "3" && !(c.type === "2" && !c.content.trim())
17460
+ (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
17461
17461
  );
17462
17462
  const child = children[0];
17463
- return children.length !== 1 || child.type === "11" || child.type === "9" && child.branches.some(hasMultipleChildren);
17463
+ return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
17464
17464
  }
17465
17465
 
17466
17466
  const ignoreSideEffectTags = (node, context) => {
17467
- if (node.type === "1" && node.tagType === "0" && (node.tag === "script" || node.tag === "style")) {
17467
+ if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
17468
17468
  context.onError(
17469
- createDOMCompilerError("61", node.loc)
17469
+ createDOMCompilerError(61, node.loc)
17470
17470
  );
17471
17471
  context.removeNode();
17472
17472
  }