@vue/compat 3.5.12 → 3.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.12
2
+ * @vue/compat v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -212,10 +212,9 @@ function parseStringStyle(cssText) {
212
212
  return ret;
213
213
  }
214
214
  function stringifyStyle(styles) {
215
+ if (!styles) return "";
216
+ if (isString(styles)) return styles;
215
217
  let ret = "";
216
- if (!styles || isString(styles)) {
217
- return ret;
218
- }
219
218
  for (const key in styles) {
220
219
  const value = styles[key];
221
220
  if (isString(value) || typeof value === "number") {
@@ -397,6 +396,10 @@ class EffectScope {
397
396
  * @internal
398
397
  */
399
398
  this._active = true;
399
+ /**
400
+ * @internal track `on` calls, allow `on` call multiple times
401
+ */
402
+ this._on = 0;
400
403
  /**
401
404
  * @internal
402
405
  */
@@ -467,28 +470,38 @@ class EffectScope {
467
470
  * @internal
468
471
  */
469
472
  on() {
470
- activeEffectScope = this;
473
+ if (++this._on === 1) {
474
+ this.prevScope = activeEffectScope;
475
+ activeEffectScope = this;
476
+ }
471
477
  }
472
478
  /**
473
479
  * This should only be called on non-detached scopes
474
480
  * @internal
475
481
  */
476
482
  off() {
477
- activeEffectScope = this.parent;
483
+ if (this._on > 0 && --this._on === 0) {
484
+ activeEffectScope = this.prevScope;
485
+ this.prevScope = void 0;
486
+ }
478
487
  }
479
488
  stop(fromParent) {
480
489
  if (this._active) {
490
+ this._active = false;
481
491
  let i, l;
482
492
  for (i = 0, l = this.effects.length; i < l; i++) {
483
493
  this.effects[i].stop();
484
494
  }
495
+ this.effects.length = 0;
485
496
  for (i = 0, l = this.cleanups.length; i < l; i++) {
486
497
  this.cleanups[i]();
487
498
  }
499
+ this.cleanups.length = 0;
488
500
  if (this.scopes) {
489
501
  for (i = 0, l = this.scopes.length; i < l; i++) {
490
502
  this.scopes[i].stop(true);
491
503
  }
504
+ this.scopes.length = 0;
492
505
  }
493
506
  if (!this.detached && this.parent && !fromParent) {
494
507
  const last = this.parent.scopes.pop();
@@ -498,7 +511,6 @@ class EffectScope {
498
511
  }
499
512
  }
500
513
  this.parent = void 0;
501
- this._active = false;
502
514
  }
503
515
  }
504
516
  }
@@ -553,7 +565,7 @@ class ReactiveEffect {
553
565
  }
554
566
  resume() {
555
567
  if (this.flags & 64) {
556
- this.flags &= ~64;
568
+ this.flags &= -65;
557
569
  if (pausedQueueEffects.has(this)) {
558
570
  pausedQueueEffects.delete(this);
559
571
  this.trigger();
@@ -593,7 +605,7 @@ class ReactiveEffect {
593
605
  cleanupDeps(this);
594
606
  activeSub = prevEffect;
595
607
  shouldTrack = prevShouldTrack;
596
- this.flags &= ~2;
608
+ this.flags &= -3;
597
609
  }
598
610
  }
599
611
  stop() {
@@ -604,7 +616,7 @@ class ReactiveEffect {
604
616
  this.deps = this.depsTail = void 0;
605
617
  cleanupEffect(this);
606
618
  this.onStop && this.onStop();
607
- this.flags &= ~1;
619
+ this.flags &= -2;
608
620
  }
609
621
  }
610
622
  trigger() {
@@ -654,7 +666,7 @@ function endBatch() {
654
666
  while (e) {
655
667
  const next = e.next;
656
668
  e.next = void 0;
657
- e.flags &= ~8;
669
+ e.flags &= -9;
658
670
  e = next;
659
671
  }
660
672
  }
@@ -665,7 +677,7 @@ function endBatch() {
665
677
  while (e) {
666
678
  const next = e.next;
667
679
  e.next = void 0;
668
- e.flags &= ~8;
680
+ e.flags &= -9;
669
681
  if (e.flags & 1) {
670
682
  try {
671
683
  ;
@@ -721,17 +733,16 @@ function refreshComputed(computed) {
721
733
  if (computed.flags & 4 && !(computed.flags & 16)) {
722
734
  return;
723
735
  }
724
- computed.flags &= ~16;
736
+ computed.flags &= -17;
725
737
  if (computed.globalVersion === globalVersion) {
726
738
  return;
727
739
  }
728
740
  computed.globalVersion = globalVersion;
729
- const dep = computed.dep;
730
- computed.flags |= 2;
731
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
732
- computed.flags &= ~2;
741
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
733
742
  return;
734
743
  }
744
+ computed.flags |= 2;
745
+ const dep = computed.dep;
735
746
  const prevSub = activeSub;
736
747
  const prevShouldTrack = shouldTrack;
737
748
  activeSub = computed;
@@ -740,6 +751,7 @@ function refreshComputed(computed) {
740
751
  prepareDeps(computed);
741
752
  const value = computed.fn(computed._value);
742
753
  if (dep.version === 0 || hasChanged(value, computed._value)) {
754
+ computed.flags |= 128;
743
755
  computed._value = value;
744
756
  dep.version++;
745
757
  }
@@ -750,7 +762,7 @@ function refreshComputed(computed) {
750
762
  activeSub = prevSub;
751
763
  shouldTrack = prevShouldTrack;
752
764
  cleanupDeps(computed);
753
- computed.flags &= ~2;
765
+ computed.flags &= -3;
754
766
  }
755
767
  }
756
768
  function removeSub(link, soft = false) {
@@ -769,7 +781,7 @@ function removeSub(link, soft = false) {
769
781
  if (dep.subs === link) {
770
782
  dep.subs = prevSub;
771
783
  if (!prevSub && dep.computed) {
772
- dep.computed.flags &= ~4;
784
+ dep.computed.flags &= -5;
773
785
  for (let l = dep.computed.deps; l; l = l.nextDep) {
774
786
  removeSub(l, true);
775
787
  }
@@ -1268,6 +1280,7 @@ class BaseReactiveHandler {
1268
1280
  this._isShallow = _isShallow;
1269
1281
  }
1270
1282
  get(target, key, receiver) {
1283
+ if (key === "__v_skip") return target["__v_skip"];
1271
1284
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1272
1285
  if (key === "__v_isReactive") {
1273
1286
  return !isReadonly2;
@@ -1705,14 +1718,14 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
1705
1718
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1706
1719
  return target;
1707
1720
  }
1708
- const existingProxy = proxyMap.get(target);
1709
- if (existingProxy) {
1710
- return existingProxy;
1711
- }
1712
1721
  const targetType = getTargetType(target);
1713
1722
  if (targetType === 0 /* INVALID */) {
1714
1723
  return target;
1715
1724
  }
1725
+ const existingProxy = proxyMap.get(target);
1726
+ if (existingProxy) {
1727
+ return existingProxy;
1728
+ }
1716
1729
  const proxy = new Proxy(
1717
1730
  target,
1718
1731
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2110,7 +2123,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2110
2123
  const scope = getCurrentScope();
2111
2124
  const watchHandle = () => {
2112
2125
  effect.stop();
2113
- if (scope) {
2126
+ if (scope && scope.active) {
2114
2127
  remove(scope.effects, effect);
2115
2128
  }
2116
2129
  };
@@ -2567,11 +2580,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2567
2580
  queue.splice(i, 1);
2568
2581
  i--;
2569
2582
  if (cb.flags & 4) {
2570
- cb.flags &= ~1;
2583
+ cb.flags &= -2;
2571
2584
  }
2572
2585
  cb();
2573
2586
  if (!(cb.flags & 4)) {
2574
- cb.flags &= ~1;
2587
+ cb.flags &= -2;
2575
2588
  }
2576
2589
  }
2577
2590
  }
@@ -2596,10 +2609,10 @@ function flushPostFlushCbs(seen) {
2596
2609
  continue;
2597
2610
  }
2598
2611
  if (cb.flags & 4) {
2599
- cb.flags &= ~1;
2612
+ cb.flags &= -2;
2600
2613
  }
2601
2614
  if (!(cb.flags & 8)) cb();
2602
- cb.flags &= ~1;
2615
+ cb.flags &= -2;
2603
2616
  }
2604
2617
  activePostFlushCbs = null;
2605
2618
  postFlushIndex = 0;
@@ -2635,7 +2648,7 @@ function flushJobs(seen) {
2635
2648
  for (; flushIndex < queue.length; flushIndex++) {
2636
2649
  const job = queue[flushIndex];
2637
2650
  if (job) {
2638
- job.flags &= ~1;
2651
+ job.flags &= -2;
2639
2652
  }
2640
2653
  }
2641
2654
  flushIndex = -1;
@@ -3606,11 +3619,32 @@ const TeleportImpl = {
3606
3619
  updateCssVars(n2, true);
3607
3620
  }
3608
3621
  if (isTeleportDeferred(n2.props)) {
3609
- queuePostRenderEffect(mountToTarget, parentSuspense);
3622
+ queuePostRenderEffect(() => {
3623
+ mountToTarget();
3624
+ n2.el.__isMounted = true;
3625
+ }, parentSuspense);
3610
3626
  } else {
3611
3627
  mountToTarget();
3612
3628
  }
3613
3629
  } else {
3630
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3631
+ queuePostRenderEffect(() => {
3632
+ TeleportImpl.process(
3633
+ n1,
3634
+ n2,
3635
+ container,
3636
+ anchor,
3637
+ parentComponent,
3638
+ parentSuspense,
3639
+ namespace,
3640
+ slotScopeIds,
3641
+ optimized,
3642
+ internals
3643
+ );
3644
+ delete n1.el.__isMounted;
3645
+ }, parentSuspense);
3646
+ return;
3647
+ }
3614
3648
  n2.el = n1.el;
3615
3649
  n2.targetStart = n1.targetStart;
3616
3650
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3634,7 +3668,7 @@ const TeleportImpl = {
3634
3668
  namespace,
3635
3669
  slotScopeIds
3636
3670
  );
3637
- traverseStaticChildren(n1, n2, true);
3671
+ traverseStaticChildren(n1, n2, !!!(process.env.NODE_ENV !== "production"));
3638
3672
  } else if (!optimized) {
3639
3673
  patchChildren(
3640
3674
  n1,
@@ -3916,10 +3950,9 @@ const BaseTransitionImpl = {
3916
3950
  if (innerChild.type !== Comment) {
3917
3951
  setTransitionHooks(innerChild, enterHooks);
3918
3952
  }
3919
- const oldChild = instance.subTree;
3920
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3953
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3921
3954
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3922
- const leavingHooks = resolveTransitionHooks(
3955
+ let leavingHooks = resolveTransitionHooks(
3923
3956
  oldInnerChild,
3924
3957
  rawProps,
3925
3958
  state,
@@ -3934,6 +3967,7 @@ const BaseTransitionImpl = {
3934
3967
  instance.update();
3935
3968
  }
3936
3969
  delete leavingHooks.afterLeave;
3970
+ oldInnerChild = void 0;
3937
3971
  };
3938
3972
  return emptyPlaceholder(child);
3939
3973
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3947,10 +3981,19 @@ const BaseTransitionImpl = {
3947
3981
  earlyRemove();
3948
3982
  el[leaveCbKey] = void 0;
3949
3983
  delete enterHooks.delayedLeave;
3984
+ oldInnerChild = void 0;
3985
+ };
3986
+ enterHooks.delayedLeave = () => {
3987
+ delayedLeave();
3988
+ delete enterHooks.delayedLeave;
3989
+ oldInnerChild = void 0;
3950
3990
  };
3951
- enterHooks.delayedLeave = delayedLeave;
3952
3991
  };
3992
+ } else {
3993
+ oldInnerChild = void 0;
3953
3994
  }
3995
+ } else if (oldInnerChild) {
3996
+ oldInnerChild = void 0;
3954
3997
  }
3955
3998
  return child;
3956
3999
  };
@@ -4145,7 +4188,7 @@ function getInnerChild$1(vnode) {
4145
4188
  }
4146
4189
  return vnode;
4147
4190
  }
4148
- if (!!(process.env.NODE_ENV !== "production") && vnode.component) {
4191
+ if (vnode.component) {
4149
4192
  return vnode.component.subTree;
4150
4193
  }
4151
4194
  const { shapeFlag, children } = vnode;
@@ -4259,6 +4302,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
4259
4302
  return;
4260
4303
  }
4261
4304
  if (isAsyncWrapper(vnode) && !isUnmount) {
4305
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
4306
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
4307
+ }
4262
4308
  return;
4263
4309
  }
4264
4310
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -4523,7 +4569,7 @@ function createHydrationFunctions(rendererInternals) {
4523
4569
  getContainerType(container),
4524
4570
  optimized
4525
4571
  );
4526
- if (isAsyncWrapper(vnode)) {
4572
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
4527
4573
  let subTree;
4528
4574
  if (isFragmentStart) {
4529
4575
  subTree = createVNode(Fragment);
@@ -4803,6 +4849,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4803
4849
  getContainerType(container),
4804
4850
  slotScopeIds
4805
4851
  );
4852
+ if (parentComponent) {
4853
+ parentComponent.vnode.el = vnode.el;
4854
+ updateHOCHostEl(parentComponent, vnode.el);
4855
+ }
4806
4856
  return next;
4807
4857
  };
4808
4858
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -5318,6 +5368,9 @@ const KeepAliveImpl = {
5318
5368
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
5319
5369
  devtoolsComponentAdded(instance2);
5320
5370
  }
5371
+ if (!!(process.env.NODE_ENV !== "production") && true) {
5372
+ instance2.__keepAliveStorageContainer = storageContainer;
5373
+ }
5321
5374
  };
5322
5375
  function unmount(vnode) {
5323
5376
  resetShapeFlag(vnode);
@@ -5405,7 +5458,7 @@ const KeepAliveImpl = {
5405
5458
  );
5406
5459
  const { include, exclude, max } = props;
5407
5460
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
5408
- vnode.shapeFlag &= ~256;
5461
+ vnode.shapeFlag &= -257;
5409
5462
  current = vnode;
5410
5463
  return rawVNode;
5411
5464
  }
@@ -5496,8 +5549,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
5496
5549
  }, target);
5497
5550
  }
5498
5551
  function resetShapeFlag(vnode) {
5499
- vnode.shapeFlag &= ~256;
5500
- vnode.shapeFlag &= ~512;
5552
+ vnode.shapeFlag &= -257;
5553
+ vnode.shapeFlag &= -513;
5501
5554
  }
5502
5555
  function getInnerChild(vnode) {
5503
5556
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5899,14 +5952,16 @@ function renderList(source, renderItem, cache, index) {
5899
5952
  if (sourceIsArray || isString(source)) {
5900
5953
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5901
5954
  let needsWrap = false;
5955
+ let isReadonlySource = false;
5902
5956
  if (sourceIsReactiveArray) {
5903
5957
  needsWrap = !isShallow(source);
5958
+ isReadonlySource = isReadonly(source);
5904
5959
  source = shallowReadArray(source);
5905
5960
  }
5906
5961
  ret = new Array(source.length);
5907
5962
  for (let i = 0, l = source.length; i < l; i++) {
5908
5963
  ret[i] = renderItem(
5909
- needsWrap ? toReactive(source[i]) : source[i],
5964
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5910
5965
  i,
5911
5966
  void 0,
5912
5967
  cached && cached[i]
@@ -7160,7 +7215,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7160
7215
  return vm;
7161
7216
  }
7162
7217
  }
7163
- Vue.version = `2.6.14-compat:${"3.5.12"}`;
7218
+ Vue.version = `2.6.14-compat:${"3.5.14"}`;
7164
7219
  Vue.config = singletonApp.config;
7165
7220
  Vue.use = (plugin, ...options) => {
7166
7221
  if (plugin && isFunction(plugin.install)) {
@@ -7656,11 +7711,9 @@ function createAppAPI(render, hydrate) {
7656
7711
  }
7657
7712
  if (!!(process.env.NODE_ENV !== "production")) {
7658
7713
  context.reload = () => {
7659
- render(
7660
- cloneVNode(vnode),
7661
- rootContainer,
7662
- namespace
7663
- );
7714
+ const cloned = cloneVNode(vnode);
7715
+ cloned.el = null;
7716
+ render(cloned, rootContainer, namespace);
7664
7717
  };
7665
7718
  }
7666
7719
  if (isHydrate && hydrate) {
@@ -8258,7 +8311,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
8258
8311
  return rawSlot;
8259
8312
  }
8260
8313
  const normalized = withCtx((...args) => {
8261
- if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {
8314
+ if (!!(process.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
8262
8315
  warn$1(
8263
8316
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
8264
8317
  );
@@ -8297,7 +8350,7 @@ const normalizeVNodeSlots = (instance, children) => {
8297
8350
  };
8298
8351
  const assignSlots = (slots, children, optimized) => {
8299
8352
  for (const key in children) {
8300
- if (optimized || key !== "_") {
8353
+ if (optimized || !isInternalKey(key)) {
8301
8354
  slots[key] = children[key];
8302
8355
  }
8303
8356
  }
@@ -9022,8 +9075,8 @@ function baseCreateRenderer(options, createHydrationFns) {
9022
9075
  endMeasure(instance, `init`);
9023
9076
  }
9024
9077
  }
9078
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
9025
9079
  if (instance.asyncDep) {
9026
- if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
9027
9080
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
9028
9081
  if (!initialVNode.el) {
9029
9082
  const placeholder = instance.subTree = createVNode(Comment);
@@ -9609,7 +9662,13 @@ function baseCreateRenderer(options, createHydrationFns) {
9609
9662
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
9610
9663
  } else {
9611
9664
  const { leave, delayLeave, afterLeave } = transition;
9612
- const remove2 = () => hostInsert(el, container, anchor);
9665
+ const remove2 = () => {
9666
+ if (vnode.ctx.isUnmounted) {
9667
+ hostRemove(el);
9668
+ } else {
9669
+ hostInsert(el, container, anchor);
9670
+ }
9671
+ };
9613
9672
  const performLeave = () => {
9614
9673
  leave(el, () => {
9615
9674
  remove2();
@@ -9642,7 +9701,9 @@ function baseCreateRenderer(options, createHydrationFns) {
9642
9701
  optimized = false;
9643
9702
  }
9644
9703
  if (ref != null) {
9704
+ pauseTracking();
9645
9705
  setRef(ref, null, parentSuspense, vnode, true);
9706
+ resetTracking();
9646
9707
  }
9647
9708
  if (cacheIndex != null) {
9648
9709
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -9754,12 +9815,27 @@ function baseCreateRenderer(options, createHydrationFns) {
9754
9815
  if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
9755
9816
  unregisterHMR(instance);
9756
9817
  }
9757
- const { bum, scope, job, subTree, um, m, a } = instance;
9818
+ const {
9819
+ bum,
9820
+ scope,
9821
+ job,
9822
+ subTree,
9823
+ um,
9824
+ m,
9825
+ a,
9826
+ parent,
9827
+ slots: { __: slotCacheKeys }
9828
+ } = instance;
9758
9829
  invalidateMount(m);
9759
9830
  invalidateMount(a);
9760
9831
  if (bum) {
9761
9832
  invokeArrayFns(bum);
9762
9833
  }
9834
+ if (parent && isArray(slotCacheKeys)) {
9835
+ slotCacheKeys.forEach((v) => {
9836
+ parent.renderCache[v] = void 0;
9837
+ });
9838
+ }
9763
9839
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) {
9764
9840
  instance.emit("hook:beforeDestroy");
9765
9841
  }
@@ -9864,8 +9940,8 @@ function toggleRecurse({ effect, job }, allowed) {
9864
9940
  effect.flags |= 32;
9865
9941
  job.flags |= 4;
9866
9942
  } else {
9867
- effect.flags &= ~32;
9868
- job.flags &= ~4;
9943
+ effect.flags &= -33;
9944
+ job.flags &= -5;
9869
9945
  }
9870
9946
  }
9871
9947
  function needTransition(parentSuspense, transition) {
@@ -9889,9 +9965,12 @@ function traverseStaticChildren(n1, n2, shallow = false) {
9889
9965
  if (c2.type === Text) {
9890
9966
  c2.el = c1.el;
9891
9967
  }
9892
- if (!!(process.env.NODE_ENV !== "production") && c2.type === Comment && !c2.el) {
9968
+ if (c2.type === Comment && !c2.el) {
9893
9969
  c2.el = c1.el;
9894
9970
  }
9971
+ if (!!(process.env.NODE_ENV !== "production")) {
9972
+ c2.el && (c2.el.__vnode = c2);
9973
+ }
9895
9974
  }
9896
9975
  }
9897
9976
  }
@@ -10415,7 +10494,7 @@ function renderComponentRoot(instance) {
10415
10494
  }
10416
10495
  if (extraAttrs.length) {
10417
10496
  warn$1(
10418
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
10497
+ `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
10419
10498
  );
10420
10499
  }
10421
10500
  if (eventAttrs.length) {
@@ -11276,9 +11355,9 @@ function closeBlock() {
11276
11355
  currentBlock = blockStack[blockStack.length - 1] || null;
11277
11356
  }
11278
11357
  let isBlockTreeEnabled = 1;
11279
- function setBlockTracking(value) {
11358
+ function setBlockTracking(value, inVOnce = false) {
11280
11359
  isBlockTreeEnabled += value;
11281
- if (value < 0 && currentBlock) {
11360
+ if (value < 0 && currentBlock && inVOnce) {
11282
11361
  currentBlock.hasOnce = true;
11283
11362
  }
11284
11363
  }
@@ -11322,8 +11401,8 @@ function isSameVNodeType(n1, n2) {
11322
11401
  if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && n1.component) {
11323
11402
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
11324
11403
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
11325
- n1.shapeFlag &= ~256;
11326
- n2.shapeFlag &= ~512;
11404
+ n1.shapeFlag &= -257;
11405
+ n2.shapeFlag &= -513;
11327
11406
  return false;
11328
11407
  }
11329
11408
  }
@@ -11796,7 +11875,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
11796
11875
  const { props, children } = instance.vnode;
11797
11876
  const isStateful = isStatefulComponent(instance);
11798
11877
  initProps(instance, props, isStateful, isSSR);
11799
- initSlots(instance, children, optimized);
11878
+ initSlots(instance, children, optimized || isSSR);
11800
11879
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
11801
11880
  isSSR && setInSSRSetupState(false);
11802
11881
  return setupResult;
@@ -11923,7 +12002,7 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
11923
12002
  }
11924
12003
  if (!instance.render) {
11925
12004
  if (!isSSR && compile$1 && !Component.render) {
11926
- const template = instance.vnode.props && instance.vnode.props["inline-template"] || Component.template || resolveMergedOptions(instance).template;
12005
+ const template = instance.vnode.props && instance.vnode.props["inline-template"] || Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template;
11927
12006
  if (template) {
11928
12007
  if (!!(process.env.NODE_ENV !== "production")) {
11929
12008
  startMeasure(instance, `compile`);
@@ -12151,13 +12230,15 @@ function initCustomFormatter() {
12151
12230
  if (obj.__isVue) {
12152
12231
  return ["div", vueStyle, `VueInstance`];
12153
12232
  } else if (isRef(obj)) {
12233
+ pauseTracking();
12234
+ const value = obj.value;
12235
+ resetTracking();
12154
12236
  return [
12155
12237
  "div",
12156
12238
  {},
12157
12239
  ["span", vueStyle, genRefFlag(obj)],
12158
12240
  "<",
12159
- // avoid debugger accessing value affecting behavior
12160
- formatValue("_value" in obj ? obj._value : obj),
12241
+ formatValue(value),
12161
12242
  `>`
12162
12243
  ];
12163
12244
  } else if (isReactive(obj)) {
@@ -12338,7 +12419,7 @@ function isMemoSame(cached, memo) {
12338
12419
  return true;
12339
12420
  }
12340
12421
 
12341
- const version = "3.5.12";
12422
+ const version = "3.5.14";
12342
12423
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12343
12424
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12344
12425
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -12548,7 +12629,8 @@ function resolveTransitionProps(rawProps) {
12548
12629
  onAppear = onEnter,
12549
12630
  onAppearCancelled = onEnterCancelled
12550
12631
  } = baseProps;
12551
- const finishEnter = (el, isAppear, done) => {
12632
+ const finishEnter = (el, isAppear, done, isCancelled) => {
12633
+ el._enterCancelled = isCancelled;
12552
12634
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
12553
12635
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
12554
12636
  done && done();
@@ -12606,8 +12688,13 @@ function resolveTransitionProps(rawProps) {
12606
12688
  if (legacyClassEnabled && legacyLeaveFromClass) {
12607
12689
  addTransitionClass(el, legacyLeaveFromClass);
12608
12690
  }
12609
- addTransitionClass(el, leaveActiveClass);
12610
- forceReflow();
12691
+ if (!el._enterCancelled) {
12692
+ forceReflow();
12693
+ addTransitionClass(el, leaveActiveClass);
12694
+ } else {
12695
+ addTransitionClass(el, leaveActiveClass);
12696
+ forceReflow();
12697
+ }
12611
12698
  nextFrame(() => {
12612
12699
  if (!el._isLeaving) {
12613
12700
  return;
@@ -12624,11 +12711,11 @@ function resolveTransitionProps(rawProps) {
12624
12711
  callHook(onLeave, [el, resolve]);
12625
12712
  },
12626
12713
  onEnterCancelled(el) {
12627
- finishEnter(el, false);
12714
+ finishEnter(el, false, void 0, true);
12628
12715
  callHook(onEnterCancelled, [el]);
12629
12716
  },
12630
12717
  onAppearCancelled(el) {
12631
- finishEnter(el, true);
12718
+ finishEnter(el, true, void 0, true);
12632
12719
  callHook(onAppearCancelled, [el]);
12633
12720
  },
12634
12721
  onLeaveCancelled(el) {
@@ -12848,10 +12935,11 @@ function useCssVars(getter) {
12848
12935
  }
12849
12936
  updateTeleports(vars);
12850
12937
  };
12851
- onBeforeMount(() => {
12852
- watchPostEffect(setVars);
12938
+ onBeforeUpdate(() => {
12939
+ queuePostFlushCb(setVars);
12853
12940
  });
12854
12941
  onMounted(() => {
12942
+ watch(setVars, NOOP, { flush: "post" });
12855
12943
  const ob = new MutationObserver(setVars);
12856
12944
  ob.observe(instance.subTree.el.parentNode, { childList: true });
12857
12945
  onUnmounted(() => ob.disconnect());
@@ -13237,7 +13325,7 @@ function shouldSetAsProp(el, key, value, isSVG) {
13237
13325
  }
13238
13326
  return false;
13239
13327
  }
13240
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
13328
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
13241
13329
  return false;
13242
13330
  }
13243
13331
  if (key === "form") {
@@ -13502,6 +13590,8 @@ class VueElement extends BaseClass {
13502
13590
  this._update();
13503
13591
  }
13504
13592
  if (shouldReflect) {
13593
+ const ob = this._ob;
13594
+ ob && ob.disconnect();
13505
13595
  if (val === true) {
13506
13596
  this.setAttribute(hyphenate(key), "");
13507
13597
  } else if (typeof val === "string" || typeof val === "number") {
@@ -13509,6 +13599,7 @@ class VueElement extends BaseClass {
13509
13599
  } else if (!val) {
13510
13600
  this.removeAttribute(hyphenate(key));
13511
13601
  }
13602
+ ob && ob.observe(this, { attributes: true });
13512
13603
  }
13513
13604
  }
13514
13605
  }
@@ -13726,6 +13817,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13726
13817
  instance.vnode.el,
13727
13818
  moveClass
13728
13819
  )) {
13820
+ prevChildren = [];
13729
13821
  return;
13730
13822
  }
13731
13823
  prevChildren.forEach(callPendingCbs);
@@ -13749,6 +13841,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
13749
13841
  };
13750
13842
  el.addEventListener("transitionend", cb);
13751
13843
  });
13844
+ prevChildren = [];
13752
13845
  });
13753
13846
  return () => {
13754
13847
  const rawProps = toRaw(props);
@@ -14778,12 +14871,13 @@ function createConditionalExpression(test, consequent, alternate, newline = true
14778
14871
  loc: locStub
14779
14872
  };
14780
14873
  }
14781
- function createCacheExpression(index, value, needPauseTracking = false) {
14874
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
14782
14875
  return {
14783
14876
  type: 20,
14784
14877
  index,
14785
14878
  value,
14786
14879
  needPauseTracking,
14880
+ inVOnce,
14787
14881
  needArraySpread: false,
14788
14882
  loc: locStub
14789
14883
  };
@@ -16239,7 +16333,7 @@ const tokenizer = new Tokenizer(stack, {
16239
16333
  "COMPILER_V_BIND_SYNC",
16240
16334
  currentOptions,
16241
16335
  currentProp.loc,
16242
- currentProp.rawName
16336
+ currentProp.arg.loc.source
16243
16337
  )) {
16244
16338
  currentProp.name = "model";
16245
16339
  currentProp.modifiers.splice(syncIndex, 1);
@@ -16815,6 +16909,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16815
16909
  }
16816
16910
  }
16817
16911
  let cachedAsArray = false;
16912
+ const slotCacheKeys = [];
16818
16913
  if (toCache.length === children.length && node.type === 1) {
16819
16914
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
16820
16915
  node.codegenNode.children = getCacheExpression(
@@ -16824,6 +16919,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16824
16919
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16825
16920
  const slot = getSlotNode(node.codegenNode, "default");
16826
16921
  if (slot) {
16922
+ slotCacheKeys.push(context.cached.length);
16827
16923
  slot.returns = getCacheExpression(
16828
16924
  createArrayExpression(slot.returns)
16829
16925
  );
@@ -16833,6 +16929,7 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16833
16929
  const slotName = findDir(node, "slot", true);
16834
16930
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
16835
16931
  if (slot) {
16932
+ slotCacheKeys.push(context.cached.length);
16836
16933
  slot.returns = getCacheExpression(
16837
16934
  createArrayExpression(slot.returns)
16838
16935
  );
@@ -16842,9 +16939,18 @@ function walk(node, parent, context, doNotHoistNode = false, inFor = false) {
16842
16939
  }
16843
16940
  if (!cachedAsArray) {
16844
16941
  for (const child of toCache) {
16942
+ slotCacheKeys.push(context.cached.length);
16845
16943
  child.codegenNode = context.cache(child.codegenNode);
16846
16944
  }
16847
16945
  }
16946
+ if (slotCacheKeys.length && node.type === 1 && node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
16947
+ node.codegenNode.children.properties.push(
16948
+ createObjectProperty(
16949
+ `__`,
16950
+ createSimpleExpression(JSON.stringify(slotCacheKeys), false)
16951
+ )
16952
+ );
16953
+ }
16848
16954
  function getCacheExpression(value) {
16849
16955
  const exp = context.cache(value);
16850
16956
  if (inFor && context.hmr) {
@@ -17168,11 +17274,12 @@ function createTransformContext(root, {
17168
17274
  identifier.hoisted = exp;
17169
17275
  return identifier;
17170
17276
  },
17171
- cache(exp, isVNode = false) {
17277
+ cache(exp, isVNode = false, inVOnce = false) {
17172
17278
  const cacheExp = createCacheExpression(
17173
17279
  context.cached.length,
17174
17280
  exp,
17175
- isVNode
17281
+ isVNode,
17282
+ inVOnce
17176
17283
  );
17177
17284
  context.cached.push(cacheExp);
17178
17285
  return cacheExp;
@@ -17887,7 +17994,9 @@ function genCacheExpression(node, context) {
17887
17994
  push(`_cache[${node.index}] || (`);
17888
17995
  if (needPauseTracking) {
17889
17996
  indent();
17890
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
17997
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
17998
+ if (node.inVOnce) push(`, true`);
17999
+ push(`),`);
17891
18000
  newline();
17892
18001
  push(`(`);
17893
18002
  }
@@ -17944,12 +18053,14 @@ const transformExpression = (node, context) => {
17944
18053
  context
17945
18054
  );
17946
18055
  } else if (node.type === 1) {
18056
+ const memo = findDir(node, "memo");
17947
18057
  for (let i = 0; i < node.props.length; i++) {
17948
18058
  const dir = node.props[i];
17949
18059
  if (dir.type === 7 && dir.name !== "for") {
17950
18060
  const exp = dir.exp;
17951
18061
  const arg = dir.arg;
17952
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
18062
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
18063
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
17953
18064
  dir.exp = processExpression(
17954
18065
  exp,
17955
18066
  context,
@@ -18277,10 +18388,11 @@ const transformFor = createStructuralDirectiveTransform(
18277
18388
  const isTemplate = isTemplateNode(node);
18278
18389
  const memo = findDir(node, "memo");
18279
18390
  const keyProp = findProp(node, `key`, false, true);
18280
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
18391
+ const isDirKey = keyProp && keyProp.type === 7;
18392
+ if (isDirKey && !keyProp.exp) {
18281
18393
  transformBindShorthand(keyProp);
18282
18394
  }
18283
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18395
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
18284
18396
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
18285
18397
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
18286
18398
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
@@ -19519,8 +19631,8 @@ const transformOnce = (node, context) => {
19519
19631
  if (cur.codegenNode) {
19520
19632
  cur.codegenNode = context.cache(
19521
19633
  cur.codegenNode,
19634
+ true,
19522
19635
  true
19523
- /* isVNode */
19524
19636
  );
19525
19637
  }
19526
19638
  };
@@ -19542,8 +19654,7 @@ const transformModel$1 = (dir, node, context) => {
19542
19654
  context.onError(createCompilerError(44, exp.loc));
19543
19655
  return createTransformProps();
19544
19656
  }
19545
- const maybeRef = false;
19546
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
19657
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
19547
19658
  context.onError(
19548
19659
  createCompilerError(42, exp.loc)
19549
19660
  );