vue 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 v3.5.12
2
+ * vue v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -215,10 +215,9 @@ var Vue = (function (exports) {
215
215
  return ret;
216
216
  }
217
217
  function stringifyStyle(styles) {
218
+ if (!styles) return "";
219
+ if (isString(styles)) return styles;
218
220
  let ret = "";
219
- if (!styles || isString(styles)) {
220
- return ret;
221
- }
222
221
  for (const key in styles) {
223
222
  const value = styles[key];
224
223
  if (isString(value) || typeof value === "number") {
@@ -400,6 +399,10 @@ var Vue = (function (exports) {
400
399
  * @internal
401
400
  */
402
401
  this._active = true;
402
+ /**
403
+ * @internal track `on` calls, allow `on` call multiple times
404
+ */
405
+ this._on = 0;
403
406
  /**
404
407
  * @internal
405
408
  */
@@ -470,28 +473,38 @@ var Vue = (function (exports) {
470
473
  * @internal
471
474
  */
472
475
  on() {
473
- activeEffectScope = this;
476
+ if (++this._on === 1) {
477
+ this.prevScope = activeEffectScope;
478
+ activeEffectScope = this;
479
+ }
474
480
  }
475
481
  /**
476
482
  * This should only be called on non-detached scopes
477
483
  * @internal
478
484
  */
479
485
  off() {
480
- activeEffectScope = this.parent;
486
+ if (this._on > 0 && --this._on === 0) {
487
+ activeEffectScope = this.prevScope;
488
+ this.prevScope = void 0;
489
+ }
481
490
  }
482
491
  stop(fromParent) {
483
492
  if (this._active) {
493
+ this._active = false;
484
494
  let i, l;
485
495
  for (i = 0, l = this.effects.length; i < l; i++) {
486
496
  this.effects[i].stop();
487
497
  }
498
+ this.effects.length = 0;
488
499
  for (i = 0, l = this.cleanups.length; i < l; i++) {
489
500
  this.cleanups[i]();
490
501
  }
502
+ this.cleanups.length = 0;
491
503
  if (this.scopes) {
492
504
  for (i = 0, l = this.scopes.length; i < l; i++) {
493
505
  this.scopes[i].stop(true);
494
506
  }
507
+ this.scopes.length = 0;
495
508
  }
496
509
  if (!this.detached && this.parent && !fromParent) {
497
510
  const last = this.parent.scopes.pop();
@@ -501,7 +514,6 @@ var Vue = (function (exports) {
501
514
  }
502
515
  }
503
516
  this.parent = void 0;
504
- this._active = false;
505
517
  }
506
518
  }
507
519
  }
@@ -556,7 +568,7 @@ var Vue = (function (exports) {
556
568
  }
557
569
  resume() {
558
570
  if (this.flags & 64) {
559
- this.flags &= ~64;
571
+ this.flags &= -65;
560
572
  if (pausedQueueEffects.has(this)) {
561
573
  pausedQueueEffects.delete(this);
562
574
  this.trigger();
@@ -596,7 +608,7 @@ var Vue = (function (exports) {
596
608
  cleanupDeps(this);
597
609
  activeSub = prevEffect;
598
610
  shouldTrack = prevShouldTrack;
599
- this.flags &= ~2;
611
+ this.flags &= -3;
600
612
  }
601
613
  }
602
614
  stop() {
@@ -607,7 +619,7 @@ var Vue = (function (exports) {
607
619
  this.deps = this.depsTail = void 0;
608
620
  cleanupEffect(this);
609
621
  this.onStop && this.onStop();
610
- this.flags &= ~1;
622
+ this.flags &= -2;
611
623
  }
612
624
  }
613
625
  trigger() {
@@ -657,7 +669,7 @@ var Vue = (function (exports) {
657
669
  while (e) {
658
670
  const next = e.next;
659
671
  e.next = void 0;
660
- e.flags &= ~8;
672
+ e.flags &= -9;
661
673
  e = next;
662
674
  }
663
675
  }
@@ -668,7 +680,7 @@ var Vue = (function (exports) {
668
680
  while (e) {
669
681
  const next = e.next;
670
682
  e.next = void 0;
671
- e.flags &= ~8;
683
+ e.flags &= -9;
672
684
  if (e.flags & 1) {
673
685
  try {
674
686
  ;
@@ -724,17 +736,16 @@ var Vue = (function (exports) {
724
736
  if (computed.flags & 4 && !(computed.flags & 16)) {
725
737
  return;
726
738
  }
727
- computed.flags &= ~16;
739
+ computed.flags &= -17;
728
740
  if (computed.globalVersion === globalVersion) {
729
741
  return;
730
742
  }
731
743
  computed.globalVersion = globalVersion;
732
- const dep = computed.dep;
733
- computed.flags |= 2;
734
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
735
- computed.flags &= ~2;
744
+ if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {
736
745
  return;
737
746
  }
747
+ computed.flags |= 2;
748
+ const dep = computed.dep;
738
749
  const prevSub = activeSub;
739
750
  const prevShouldTrack = shouldTrack;
740
751
  activeSub = computed;
@@ -743,6 +754,7 @@ var Vue = (function (exports) {
743
754
  prepareDeps(computed);
744
755
  const value = computed.fn(computed._value);
745
756
  if (dep.version === 0 || hasChanged(value, computed._value)) {
757
+ computed.flags |= 128;
746
758
  computed._value = value;
747
759
  dep.version++;
748
760
  }
@@ -753,7 +765,7 @@ var Vue = (function (exports) {
753
765
  activeSub = prevSub;
754
766
  shouldTrack = prevShouldTrack;
755
767
  cleanupDeps(computed);
756
- computed.flags &= ~2;
768
+ computed.flags &= -3;
757
769
  }
758
770
  }
759
771
  function removeSub(link, soft = false) {
@@ -772,7 +784,7 @@ var Vue = (function (exports) {
772
784
  if (dep.subs === link) {
773
785
  dep.subs = prevSub;
774
786
  if (!prevSub && dep.computed) {
775
- dep.computed.flags &= ~4;
787
+ dep.computed.flags &= -5;
776
788
  for (let l = dep.computed.deps; l; l = l.nextDep) {
777
789
  removeSub(l, true);
778
790
  }
@@ -1267,6 +1279,7 @@ var Vue = (function (exports) {
1267
1279
  this._isShallow = _isShallow;
1268
1280
  }
1269
1281
  get(target, key, receiver) {
1282
+ if (key === "__v_skip") return target["__v_skip"];
1270
1283
  const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1271
1284
  if (key === "__v_isReactive") {
1272
1285
  return !isReadonly2;
@@ -1704,14 +1717,14 @@ var Vue = (function (exports) {
1704
1717
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1705
1718
  return target;
1706
1719
  }
1707
- const existingProxy = proxyMap.get(target);
1708
- if (existingProxy) {
1709
- return existingProxy;
1710
- }
1711
1720
  const targetType = getTargetType(target);
1712
1721
  if (targetType === 0 /* INVALID */) {
1713
1722
  return target;
1714
1723
  }
1724
+ const existingProxy = proxyMap.get(target);
1725
+ if (existingProxy) {
1726
+ return existingProxy;
1727
+ }
1715
1728
  const proxy = new Proxy(
1716
1729
  target,
1717
1730
  targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers
@@ -2103,7 +2116,7 @@ var Vue = (function (exports) {
2103
2116
  const scope = getCurrentScope();
2104
2117
  const watchHandle = () => {
2105
2118
  effect.stop();
2106
- if (scope) {
2119
+ if (scope && scope.active) {
2107
2120
  remove(scope.effects, effect);
2108
2121
  }
2109
2122
  };
@@ -2555,11 +2568,11 @@ var Vue = (function (exports) {
2555
2568
  queue.splice(i, 1);
2556
2569
  i--;
2557
2570
  if (cb.flags & 4) {
2558
- cb.flags &= ~1;
2571
+ cb.flags &= -2;
2559
2572
  }
2560
2573
  cb();
2561
2574
  if (!(cb.flags & 4)) {
2562
- cb.flags &= ~1;
2575
+ cb.flags &= -2;
2563
2576
  }
2564
2577
  }
2565
2578
  }
@@ -2584,10 +2597,10 @@ var Vue = (function (exports) {
2584
2597
  continue;
2585
2598
  }
2586
2599
  if (cb.flags & 4) {
2587
- cb.flags &= ~1;
2600
+ cb.flags &= -2;
2588
2601
  }
2589
2602
  if (!(cb.flags & 8)) cb();
2590
- cb.flags &= ~1;
2603
+ cb.flags &= -2;
2591
2604
  }
2592
2605
  activePostFlushCbs = null;
2593
2606
  postFlushIndex = 0;
@@ -2623,7 +2636,7 @@ var Vue = (function (exports) {
2623
2636
  for (; flushIndex < queue.length; flushIndex++) {
2624
2637
  const job = queue[flushIndex];
2625
2638
  if (job) {
2626
- job.flags &= ~1;
2639
+ job.flags &= -2;
2627
2640
  }
2628
2641
  }
2629
2642
  flushIndex = -1;
@@ -3063,11 +3076,32 @@ var Vue = (function (exports) {
3063
3076
  updateCssVars(n2, true);
3064
3077
  }
3065
3078
  if (isTeleportDeferred(n2.props)) {
3066
- queuePostRenderEffect(mountToTarget, parentSuspense);
3079
+ queuePostRenderEffect(() => {
3080
+ mountToTarget();
3081
+ n2.el.__isMounted = true;
3082
+ }, parentSuspense);
3067
3083
  } else {
3068
3084
  mountToTarget();
3069
3085
  }
3070
3086
  } else {
3087
+ if (isTeleportDeferred(n2.props) && !n1.el.__isMounted) {
3088
+ queuePostRenderEffect(() => {
3089
+ TeleportImpl.process(
3090
+ n1,
3091
+ n2,
3092
+ container,
3093
+ anchor,
3094
+ parentComponent,
3095
+ parentSuspense,
3096
+ namespace,
3097
+ slotScopeIds,
3098
+ optimized,
3099
+ internals
3100
+ );
3101
+ delete n1.el.__isMounted;
3102
+ }, parentSuspense);
3103
+ return;
3104
+ }
3071
3105
  n2.el = n1.el;
3072
3106
  n2.targetStart = n1.targetStart;
3073
3107
  const mainAnchor = n2.anchor = n1.anchor;
@@ -3091,7 +3125,7 @@ var Vue = (function (exports) {
3091
3125
  namespace,
3092
3126
  slotScopeIds
3093
3127
  );
3094
- traverseStaticChildren(n1, n2, true);
3128
+ traverseStaticChildren(n1, n2, false);
3095
3129
  } else if (!optimized) {
3096
3130
  patchChildren(
3097
3131
  n1,
@@ -3373,10 +3407,9 @@ var Vue = (function (exports) {
3373
3407
  if (innerChild.type !== Comment) {
3374
3408
  setTransitionHooks(innerChild, enterHooks);
3375
3409
  }
3376
- const oldChild = instance.subTree;
3377
- const oldInnerChild = oldChild && getInnerChild$1(oldChild);
3410
+ let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
3378
3411
  if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {
3379
- const leavingHooks = resolveTransitionHooks(
3412
+ let leavingHooks = resolveTransitionHooks(
3380
3413
  oldInnerChild,
3381
3414
  rawProps,
3382
3415
  state,
@@ -3391,6 +3424,7 @@ var Vue = (function (exports) {
3391
3424
  instance.update();
3392
3425
  }
3393
3426
  delete leavingHooks.afterLeave;
3427
+ oldInnerChild = void 0;
3394
3428
  };
3395
3429
  return emptyPlaceholder(child);
3396
3430
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -3404,10 +3438,19 @@ var Vue = (function (exports) {
3404
3438
  earlyRemove();
3405
3439
  el[leaveCbKey] = void 0;
3406
3440
  delete enterHooks.delayedLeave;
3441
+ oldInnerChild = void 0;
3442
+ };
3443
+ enterHooks.delayedLeave = () => {
3444
+ delayedLeave();
3445
+ delete enterHooks.delayedLeave;
3446
+ oldInnerChild = void 0;
3407
3447
  };
3408
- enterHooks.delayedLeave = delayedLeave;
3409
3448
  };
3449
+ } else {
3450
+ oldInnerChild = void 0;
3410
3451
  }
3452
+ } else if (oldInnerChild) {
3453
+ oldInnerChild = void 0;
3411
3454
  }
3412
3455
  return child;
3413
3456
  };
@@ -3712,6 +3755,9 @@ var Vue = (function (exports) {
3712
3755
  return;
3713
3756
  }
3714
3757
  if (isAsyncWrapper(vnode) && !isUnmount) {
3758
+ if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {
3759
+ setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);
3760
+ }
3715
3761
  return;
3716
3762
  }
3717
3763
  const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
@@ -3976,7 +4022,7 @@ var Vue = (function (exports) {
3976
4022
  getContainerType(container),
3977
4023
  optimized
3978
4024
  );
3979
- if (isAsyncWrapper(vnode)) {
4025
+ if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {
3980
4026
  let subTree;
3981
4027
  if (isFragmentStart) {
3982
4028
  subTree = createVNode(Fragment);
@@ -4245,6 +4291,10 @@ Server rendered element contains fewer child nodes than client vdom.`
4245
4291
  getContainerType(container),
4246
4292
  slotScopeIds
4247
4293
  );
4294
+ if (parentComponent) {
4295
+ parentComponent.vnode.el = vnode.el;
4296
+ updateHOCHostEl(parentComponent, vnode.el);
4297
+ }
4248
4298
  return next;
4249
4299
  };
4250
4300
  const locateClosingAnchor = (node, open = "[", close = "]") => {
@@ -4754,6 +4804,9 @@ Server rendered element contains fewer child nodes than client vdom.`
4754
4804
  {
4755
4805
  devtoolsComponentAdded(instance2);
4756
4806
  }
4807
+ {
4808
+ instance2.__keepAliveStorageContainer = storageContainer;
4809
+ }
4757
4810
  };
4758
4811
  function unmount(vnode) {
4759
4812
  resetShapeFlag(vnode);
@@ -4841,7 +4894,7 @@ Server rendered element contains fewer child nodes than client vdom.`
4841
4894
  );
4842
4895
  const { include, exclude, max } = props;
4843
4896
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
4844
- vnode.shapeFlag &= ~256;
4897
+ vnode.shapeFlag &= -257;
4845
4898
  current = vnode;
4846
4899
  return rawVNode;
4847
4900
  }
@@ -4928,8 +4981,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4928
4981
  }, target);
4929
4982
  }
4930
4983
  function resetShapeFlag(vnode) {
4931
- vnode.shapeFlag &= ~256;
4932
- vnode.shapeFlag &= ~512;
4984
+ vnode.shapeFlag &= -257;
4985
+ vnode.shapeFlag &= -513;
4933
4986
  }
4934
4987
  function getInnerChild(vnode) {
4935
4988
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -5044,14 +5097,16 @@ If this is a native custom element, make sure to exclude it from component resol
5044
5097
  if (sourceIsArray || isString(source)) {
5045
5098
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
5046
5099
  let needsWrap = false;
5100
+ let isReadonlySource = false;
5047
5101
  if (sourceIsReactiveArray) {
5048
5102
  needsWrap = !isShallow(source);
5103
+ isReadonlySource = isReadonly(source);
5049
5104
  source = shallowReadArray(source);
5050
5105
  }
5051
5106
  ret = new Array(source.length);
5052
5107
  for (let i = 0, l = source.length; i < l; i++) {
5053
5108
  ret[i] = renderItem(
5054
- needsWrap ? toReactive(source[i]) : source[i],
5109
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
5055
5110
  i,
5056
5111
  void 0,
5057
5112
  cached && cached[i]
@@ -6070,11 +6125,9 @@ If this is a native custom element, make sure to exclude it from component resol
6070
6125
  }
6071
6126
  {
6072
6127
  context.reload = () => {
6073
- render(
6074
- cloneVNode(vnode),
6075
- rootContainer,
6076
- namespace
6077
- );
6128
+ const cloned = cloneVNode(vnode);
6129
+ cloned.el = null;
6130
+ render(cloned, rootContainer, namespace);
6078
6131
  };
6079
6132
  }
6080
6133
  if (isHydrate && hydrate) {
@@ -6597,7 +6650,7 @@ If you want to remount the same app, move your app creation logic into a factory
6597
6650
  return rawSlot;
6598
6651
  }
6599
6652
  const normalized = withCtx((...args) => {
6600
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
6653
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
6601
6654
  warn$1(
6602
6655
  `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.`
6603
6656
  );
@@ -6636,7 +6689,7 @@ If you want to remount the same app, move your app creation logic into a factory
6636
6689
  };
6637
6690
  const assignSlots = (slots, children, optimized) => {
6638
6691
  for (const key in children) {
6639
- if (optimized || key !== "_") {
6692
+ if (optimized || !isInternalKey(key)) {
6640
6693
  slots[key] = children[key];
6641
6694
  }
6642
6695
  }
@@ -7322,8 +7375,8 @@ If you want to remount the same app, move your app creation logic into a factory
7322
7375
  endMeasure(instance, `init`);
7323
7376
  }
7324
7377
  }
7378
+ if (isHmrUpdating) initialVNode.el = null;
7325
7379
  if (instance.asyncDep) {
7326
- if (isHmrUpdating) initialVNode.el = null;
7327
7380
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
7328
7381
  if (!initialVNode.el) {
7329
7382
  const placeholder = instance.subTree = createVNode(Comment);
@@ -7885,7 +7938,13 @@ If you want to remount the same app, move your app creation logic into a factory
7885
7938
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
7886
7939
  } else {
7887
7940
  const { leave, delayLeave, afterLeave } = transition;
7888
- const remove2 = () => hostInsert(el, container, anchor);
7941
+ const remove2 = () => {
7942
+ if (vnode.ctx.isUnmounted) {
7943
+ hostRemove(el);
7944
+ } else {
7945
+ hostInsert(el, container, anchor);
7946
+ }
7947
+ };
7889
7948
  const performLeave = () => {
7890
7949
  leave(el, () => {
7891
7950
  remove2();
@@ -7918,7 +7977,9 @@ If you want to remount the same app, move your app creation logic into a factory
7918
7977
  optimized = false;
7919
7978
  }
7920
7979
  if (ref != null) {
7980
+ pauseTracking();
7921
7981
  setRef(ref, null, parentSuspense, vnode, true);
7982
+ resetTracking();
7922
7983
  }
7923
7984
  if (cacheIndex != null) {
7924
7985
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -8030,12 +8091,27 @@ If you want to remount the same app, move your app creation logic into a factory
8030
8091
  if (instance.type.__hmrId) {
8031
8092
  unregisterHMR(instance);
8032
8093
  }
8033
- const { bum, scope, job, subTree, um, m, a } = instance;
8094
+ const {
8095
+ bum,
8096
+ scope,
8097
+ job,
8098
+ subTree,
8099
+ um,
8100
+ m,
8101
+ a,
8102
+ parent,
8103
+ slots: { __: slotCacheKeys }
8104
+ } = instance;
8034
8105
  invalidateMount(m);
8035
8106
  invalidateMount(a);
8036
8107
  if (bum) {
8037
8108
  invokeArrayFns(bum);
8038
8109
  }
8110
+ if (parent && isArray(slotCacheKeys)) {
8111
+ slotCacheKeys.forEach((v) => {
8112
+ parent.renderCache[v] = void 0;
8113
+ });
8114
+ }
8039
8115
  scope.stop();
8040
8116
  if (job) {
8041
8117
  job.flags |= 8;
@@ -8131,8 +8207,8 @@ If you want to remount the same app, move your app creation logic into a factory
8131
8207
  effect.flags |= 32;
8132
8208
  job.flags |= 4;
8133
8209
  } else {
8134
- effect.flags &= ~32;
8135
- job.flags &= ~4;
8210
+ effect.flags &= -33;
8211
+ job.flags &= -5;
8136
8212
  }
8137
8213
  }
8138
8214
  function needTransition(parentSuspense, transition) {
@@ -8159,6 +8235,9 @@ If you want to remount the same app, move your app creation logic into a factory
8159
8235
  if (c2.type === Comment && !c2.el) {
8160
8236
  c2.el = c1.el;
8161
8237
  }
8238
+ {
8239
+ c2.el && (c2.el.__vnode = c2);
8240
+ }
8162
8241
  }
8163
8242
  }
8164
8243
  }
@@ -8647,7 +8726,7 @@ If you want to remount the same app, move your app creation logic into a factory
8647
8726
  }
8648
8727
  if (extraAttrs.length) {
8649
8728
  warn$1(
8650
- `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
8729
+ `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.`
8651
8730
  );
8652
8731
  }
8653
8732
  if (eventAttrs.length) {
@@ -9430,9 +9509,9 @@ If you want to remount the same app, move your app creation logic into a factory
9430
9509
  currentBlock = blockStack[blockStack.length - 1] || null;
9431
9510
  }
9432
9511
  let isBlockTreeEnabled = 1;
9433
- function setBlockTracking(value) {
9512
+ function setBlockTracking(value, inVOnce = false) {
9434
9513
  isBlockTreeEnabled += value;
9435
- if (value < 0 && currentBlock) {
9514
+ if (value < 0 && currentBlock && inVOnce) {
9436
9515
  currentBlock.hasOnce = true;
9437
9516
  }
9438
9517
  }
@@ -9476,8 +9555,8 @@ If you want to remount the same app, move your app creation logic into a factory
9476
9555
  if (n2.shapeFlag & 6 && n1.component) {
9477
9556
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
9478
9557
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
9479
- n1.shapeFlag &= ~256;
9480
- n2.shapeFlag &= ~512;
9558
+ n1.shapeFlag &= -257;
9559
+ n2.shapeFlag &= -513;
9481
9560
  return false;
9482
9561
  }
9483
9562
  }
@@ -9926,7 +10005,7 @@ Component that was made reactive: `,
9926
10005
  const { props, children } = instance.vnode;
9927
10006
  const isStateful = isStatefulComponent(instance);
9928
10007
  initProps(instance, props, isStateful, isSSR);
9929
- initSlots(instance, children, optimized);
10008
+ initSlots(instance, children, optimized || isSSR);
9930
10009
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
9931
10010
  isSSR && setInSSRSetupState(false);
9932
10011
  return setupResult;
@@ -10255,13 +10334,15 @@ Component that was made reactive: `,
10255
10334
  if (obj.__isVue) {
10256
10335
  return ["div", vueStyle, `VueInstance`];
10257
10336
  } else if (isRef(obj)) {
10337
+ pauseTracking();
10338
+ const value = obj.value;
10339
+ resetTracking();
10258
10340
  return [
10259
10341
  "div",
10260
10342
  {},
10261
10343
  ["span", vueStyle, genRefFlag(obj)],
10262
10344
  "<",
10263
- // avoid debugger accessing value affecting behavior
10264
- formatValue("_value" in obj ? obj._value : obj),
10345
+ formatValue(value),
10265
10346
  `>`
10266
10347
  ];
10267
10348
  } else if (isReactive(obj)) {
@@ -10442,7 +10523,7 @@ Component that was made reactive: `,
10442
10523
  return true;
10443
10524
  }
10444
10525
 
10445
- const version = "3.5.12";
10526
+ const version = "3.5.14";
10446
10527
  const warn = warn$1 ;
10447
10528
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10448
10529
  const devtools = devtools$1 ;
@@ -10614,7 +10695,8 @@ Component that was made reactive: `,
10614
10695
  onAppear = onEnter,
10615
10696
  onAppearCancelled = onEnterCancelled
10616
10697
  } = baseProps;
10617
- const finishEnter = (el, isAppear, done) => {
10698
+ const finishEnter = (el, isAppear, done, isCancelled) => {
10699
+ el._enterCancelled = isCancelled;
10618
10700
  removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
10619
10701
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
10620
10702
  done && done();
@@ -10657,8 +10739,13 @@ Component that was made reactive: `,
10657
10739
  el._isLeaving = true;
10658
10740
  const resolve = () => finishLeave(el, done);
10659
10741
  addTransitionClass(el, leaveFromClass);
10660
- addTransitionClass(el, leaveActiveClass);
10661
- forceReflow();
10742
+ if (!el._enterCancelled) {
10743
+ forceReflow();
10744
+ addTransitionClass(el, leaveActiveClass);
10745
+ } else {
10746
+ addTransitionClass(el, leaveActiveClass);
10747
+ forceReflow();
10748
+ }
10662
10749
  nextFrame(() => {
10663
10750
  if (!el._isLeaving) {
10664
10751
  return;
@@ -10672,11 +10759,11 @@ Component that was made reactive: `,
10672
10759
  callHook(onLeave, [el, resolve]);
10673
10760
  },
10674
10761
  onEnterCancelled(el) {
10675
- finishEnter(el, false);
10762
+ finishEnter(el, false, void 0, true);
10676
10763
  callHook(onEnterCancelled, [el]);
10677
10764
  },
10678
10765
  onAppearCancelled(el) {
10679
- finishEnter(el, true);
10766
+ finishEnter(el, true, void 0, true);
10680
10767
  callHook(onAppearCancelled, [el]);
10681
10768
  },
10682
10769
  onLeaveCancelled(el) {
@@ -10889,10 +10976,11 @@ Component that was made reactive: `,
10889
10976
  }
10890
10977
  updateTeleports(vars);
10891
10978
  };
10892
- onBeforeMount(() => {
10893
- watchPostEffect(setVars);
10979
+ onBeforeUpdate(() => {
10980
+ queuePostFlushCb(setVars);
10894
10981
  });
10895
10982
  onMounted(() => {
10983
+ watch(setVars, NOOP, { flush: "post" });
10896
10984
  const ob = new MutationObserver(setVars);
10897
10985
  ob.observe(instance.subTree.el.parentNode, { childList: true });
10898
10986
  onUnmounted(() => ob.disconnect());
@@ -11234,7 +11322,7 @@ Expected function or array of functions, received type ${typeof value}.`
11234
11322
  }
11235
11323
  return false;
11236
11324
  }
11237
- if (key === "spellcheck" || key === "draggable" || key === "translate") {
11325
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
11238
11326
  return false;
11239
11327
  }
11240
11328
  if (key === "form") {
@@ -11499,6 +11587,8 @@ Expected function or array of functions, received type ${typeof value}.`
11499
11587
  this._update();
11500
11588
  }
11501
11589
  if (shouldReflect) {
11590
+ const ob = this._ob;
11591
+ ob && ob.disconnect();
11502
11592
  if (val === true) {
11503
11593
  this.setAttribute(hyphenate(key), "");
11504
11594
  } else if (typeof val === "string" || typeof val === "number") {
@@ -11506,6 +11596,7 @@ Expected function or array of functions, received type ${typeof value}.`
11506
11596
  } else if (!val) {
11507
11597
  this.removeAttribute(hyphenate(key));
11508
11598
  }
11599
+ ob && ob.observe(this, { attributes: true });
11509
11600
  }
11510
11601
  }
11511
11602
  }
@@ -11708,6 +11799,7 @@ Expected function or array of functions, received type ${typeof value}.`
11708
11799
  instance.vnode.el,
11709
11800
  moveClass
11710
11801
  )) {
11802
+ prevChildren = [];
11711
11803
  return;
11712
11804
  }
11713
11805
  prevChildren.forEach(callPendingCbs);
@@ -11731,6 +11823,7 @@ Expected function or array of functions, received type ${typeof value}.`
11731
11823
  };
11732
11824
  el.addEventListener("transitionend", cb);
11733
11825
  });
11826
+ prevChildren = [];
11734
11827
  });
11735
11828
  return () => {
11736
11829
  const rawProps = toRaw(props);
@@ -12479,12 +12572,13 @@ Make sure to use the production build (*.prod.js) when deploying for production.
12479
12572
  loc: locStub
12480
12573
  };
12481
12574
  }
12482
- function createCacheExpression(index, value, needPauseTracking = false) {
12575
+ function createCacheExpression(index, value, needPauseTracking = false, inVOnce = false) {
12483
12576
  return {
12484
12577
  type: 20,
12485
12578
  index,
12486
12579
  value,
12487
12580
  needPauseTracking,
12581
+ inVOnce,
12488
12582
  needArraySpread: false,
12489
12583
  loc: locStub
12490
12584
  };
@@ -14366,6 +14460,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14366
14460
  }
14367
14461
  }
14368
14462
  let cachedAsArray = false;
14463
+ const slotCacheKeys = [];
14369
14464
  if (toCache.length === children.length && node.type === 1) {
14370
14465
  if (node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
14371
14466
  node.codegenNode.children = getCacheExpression(
@@ -14375,6 +14470,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14375
14470
  } else if (node.tagType === 1 && node.codegenNode && node.codegenNode.type === 13 && node.codegenNode.children && !isArray(node.codegenNode.children) && node.codegenNode.children.type === 15) {
14376
14471
  const slot = getSlotNode(node.codegenNode, "default");
14377
14472
  if (slot) {
14473
+ slotCacheKeys.push(context.cached.length);
14378
14474
  slot.returns = getCacheExpression(
14379
14475
  createArrayExpression(slot.returns)
14380
14476
  );
@@ -14384,6 +14480,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14384
14480
  const slotName = findDir(node, "slot", true);
14385
14481
  const slot = slotName && slotName.arg && getSlotNode(parent.codegenNode, slotName.arg);
14386
14482
  if (slot) {
14483
+ slotCacheKeys.push(context.cached.length);
14387
14484
  slot.returns = getCacheExpression(
14388
14485
  createArrayExpression(slot.returns)
14389
14486
  );
@@ -14393,9 +14490,18 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14393
14490
  }
14394
14491
  if (!cachedAsArray) {
14395
14492
  for (const child of toCache) {
14493
+ slotCacheKeys.push(context.cached.length);
14396
14494
  child.codegenNode = context.cache(child.codegenNode);
14397
14495
  }
14398
14496
  }
14497
+ 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) {
14498
+ node.codegenNode.children.properties.push(
14499
+ createObjectProperty(
14500
+ `__`,
14501
+ createSimpleExpression(JSON.stringify(slotCacheKeys), false)
14502
+ )
14503
+ );
14504
+ }
14399
14505
  function getCacheExpression(value) {
14400
14506
  const exp = context.cache(value);
14401
14507
  if (inFor && context.hmr) {
@@ -14718,11 +14824,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14718
14824
  identifier.hoisted = exp;
14719
14825
  return identifier;
14720
14826
  },
14721
- cache(exp, isVNode = false) {
14827
+ cache(exp, isVNode = false, inVOnce = false) {
14722
14828
  const cacheExp = createCacheExpression(
14723
14829
  context.cached.length,
14724
14830
  exp,
14725
- isVNode
14831
+ isVNode,
14832
+ inVOnce
14726
14833
  );
14727
14834
  context.cached.push(cacheExp);
14728
14835
  return cacheExp;
@@ -15421,7 +15528,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15421
15528
  push(`_cache[${node.index}] || (`);
15422
15529
  if (needPauseTracking) {
15423
15530
  indent();
15424
- push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
15531
+ push(`${helper(SET_BLOCK_TRACKING)}(-1`);
15532
+ if (node.inVOnce) push(`, true`);
15533
+ push(`),`);
15425
15534
  newline();
15426
15535
  push(`(`);
15427
15536
  }
@@ -15478,12 +15587,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15478
15587
  context
15479
15588
  );
15480
15589
  } else if (node.type === 1) {
15590
+ const memo = findDir(node, "memo");
15481
15591
  for (let i = 0; i < node.props.length; i++) {
15482
15592
  const dir = node.props[i];
15483
15593
  if (dir.type === 7 && dir.name !== "for") {
15484
15594
  const exp = dir.exp;
15485
15595
  const arg = dir.arg;
15486
- if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
15596
+ if (exp && exp.type === 4 && !(dir.name === "on" && arg) && // key has been processed in transformFor(vMemo + vFor)
15597
+ !(memo && arg && arg.type === 4 && arg.content === "key")) {
15487
15598
  dir.exp = processExpression(
15488
15599
  exp,
15489
15600
  context,
@@ -15811,10 +15922,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15811
15922
  const isTemplate = isTemplateNode(node);
15812
15923
  const memo = findDir(node, "memo");
15813
15924
  const keyProp = findProp(node, `key`, false, true);
15814
- if (keyProp && keyProp.type === 7 && !keyProp.exp) {
15925
+ const isDirKey = keyProp && keyProp.type === 7;
15926
+ if (isDirKey && !keyProp.exp) {
15815
15927
  transformBindShorthand(keyProp);
15816
15928
  }
15817
- const keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
15929
+ let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
15818
15930
  const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
15819
15931
  const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
15820
15932
  const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
@@ -17011,8 +17123,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17011
17123
  if (cur.codegenNode) {
17012
17124
  cur.codegenNode = context.cache(
17013
17125
  cur.codegenNode,
17126
+ true,
17014
17127
  true
17015
- /* isVNode */
17016
17128
  );
17017
17129
  }
17018
17130
  };
@@ -17034,8 +17146,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17034
17146
  context.onError(createCompilerError(44, exp.loc));
17035
17147
  return createTransformProps();
17036
17148
  }
17037
- const maybeRef = false;
17038
- if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
17149
+ if (!expString.trim() || !isMemberExpression(exp) && true) {
17039
17150
  context.onError(
17040
17151
  createCompilerError(42, exp.loc)
17041
17152
  );