@vue/compat 3.5.43 → 3.5.45

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.43
2
+ * @vue/compat v3.5.45
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -64,24 +64,20 @@ var Vue = (function () {
64
64
  });
65
65
  };
66
66
  const camelizeRE = /-\w/g;
67
- const camelize = cacheStringFunction(
68
- (str) => {
69
- return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
70
- }
71
- );
67
+ const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
68
+ return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
69
+ });
72
70
  const hyphenateRE = /\B([A-Z])/g;
73
- const hyphenate = cacheStringFunction(
71
+ const hyphenate = /* @__PURE__ */ cacheStringFunction(
74
72
  (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
75
73
  );
76
- const capitalize = cacheStringFunction((str) => {
74
+ const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
77
75
  return str.charAt(0).toUpperCase() + str.slice(1);
78
76
  });
79
- const toHandlerKey = cacheStringFunction(
80
- (str) => {
81
- const s = str ? `on${capitalize(str)}` : ``;
82
- return s;
83
- }
84
- );
77
+ const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
78
+ const s = str ? `on${capitalize(str)}` : ``;
79
+ return s;
80
+ });
85
81
  const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
86
82
  const invokeArrayFns = (fns, ...arg) => {
87
83
  for (let i = 0; i < fns.length; i++) {
@@ -194,7 +190,7 @@ var Vue = (function () {
194
190
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
195
191
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
196
192
 
197
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
193
+ const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
198
194
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
199
195
  const isBooleanAttr = /* @__PURE__ */ makeMap(
200
196
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -538,7 +534,11 @@ var Vue = (function () {
538
534
  }
539
535
  function onScopeDispose(fn, failSilently = false) {
540
536
  if (activeEffectScope) {
541
- activeEffectScope.cleanups.push(fn);
537
+ if (activeEffectScope.active) {
538
+ activeEffectScope.cleanups.push(fn);
539
+ } else {
540
+ fn();
541
+ }
542
542
  } else if (!failSilently) {
543
543
  warn$2(
544
544
  `onScopeDispose() is called when there is no active effect scope to be associated with.`
@@ -1242,19 +1242,41 @@ var Vue = (function () {
1242
1242
  };
1243
1243
  function iterator(self, method, wrapValue) {
1244
1244
  const arr = shallowReadArray(self);
1245
- const iter = arr[method]();
1245
+ const methodFn = arr[method];
1246
+ const iter = methodFn.call(arr);
1246
1247
  if (arr !== self && !isShallow(self)) {
1247
- iter._next = iter.next;
1248
- iter.next = () => {
1249
- const result = iter._next();
1250
- if (!result.done) {
1251
- result.value = wrapValue(result.value);
1248
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1249
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1250
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1251
+ if (methodFn !== arrayProto[method]) {
1252
+ Object.defineProperties(wrapped, {
1253
+ return: {
1254
+ get() {
1255
+ const fn = iter.return;
1256
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1257
+ }
1258
+ },
1259
+ throw: {
1260
+ get() {
1261
+ const fn = iter.throw;
1262
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1263
+ }
1264
+ }
1265
+ });
1252
1266
  }
1253
- return result;
1254
- };
1267
+ return wrapped;
1268
+ }
1269
+ iter._next = iter.next;
1270
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1255
1271
  }
1256
1272
  return iter;
1257
1273
  }
1274
+ function wrapResult(result, wrapValue) {
1275
+ if (!result.done) {
1276
+ result.value = wrapValue(result.value);
1277
+ }
1278
+ return result;
1279
+ }
1258
1280
  const arrayProto = Array.prototype;
1259
1281
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1260
1282
  const arr = shallowReadArray(self);
@@ -1323,7 +1345,7 @@ var Vue = (function () {
1323
1345
  }
1324
1346
 
1325
1347
  const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
1326
- const builtInSymbols = new Set(
1348
+ const builtInSymbols = /* @__PURE__ */ new Set(
1327
1349
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
1328
1350
  );
1329
1351
  function hasOwnProperty(key) {
@@ -1677,6 +1699,8 @@ var Vue = (function () {
1677
1699
  return !isReadonly2;
1678
1700
  } else if (key === "__v_isReadonly") {
1679
1701
  return isReadonly2;
1702
+ } else if (key === "__v_isShallow") {
1703
+ return shallow;
1680
1704
  } else if (key === "__v_raw") {
1681
1705
  return target;
1682
1706
  }
@@ -2222,9 +2246,11 @@ var Vue = (function () {
2222
2246
  if (once && cb) {
2223
2247
  const _cb = cb;
2224
2248
  cb = (...args) => {
2225
- const res = _cb(...args);
2226
- watchHandle();
2227
- return res;
2249
+ try {
2250
+ return _cb(...args);
2251
+ } finally {
2252
+ watchHandle();
2253
+ }
2228
2254
  };
2229
2255
  }
2230
2256
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2235,12 +2261,13 @@ var Vue = (function () {
2235
2261
  if (cb) {
2236
2262
  const newValue = effect.run();
2237
2263
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2238
- if (cleanup) {
2239
- cleanup();
2240
- }
2241
2264
  const currentWatcher = activeWatcher;
2242
- activeWatcher = effect;
2265
+ pauseTracking();
2243
2266
  try {
2267
+ if (cleanup) {
2268
+ cleanup();
2269
+ }
2270
+ activeWatcher = effect;
2244
2271
  const args = [
2245
2272
  newValue,
2246
2273
  // pass undefined as the old value when it's changed for the first time
@@ -2254,6 +2281,7 @@ var Vue = (function () {
2254
2281
  );
2255
2282
  } finally {
2256
2283
  activeWatcher = currentWatcher;
2284
+ resetTracking();
2257
2285
  }
2258
2286
  }
2259
2287
  } else {
@@ -2527,7 +2555,7 @@ var Vue = (function () {
2527
2555
  const res = callWithErrorHandling(fn, instance, type, args);
2528
2556
  if (res && isPromise(res)) {
2529
2557
  res.catch((err) => {
2530
- handleError(err, instance, type);
2558
+ handleError(err, instance, type, void 0, true);
2531
2559
  });
2532
2560
  }
2533
2561
  return res;
@@ -2544,7 +2572,7 @@ var Vue = (function () {
2544
2572
  );
2545
2573
  }
2546
2574
  }
2547
- function handleError(err, instance, type, throwInDev = true) {
2575
+ function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
2548
2576
  const contextVNode = instance ? instance.vnode : null;
2549
2577
  const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
2550
2578
  if (instance) {
@@ -2553,7 +2581,9 @@ var Vue = (function () {
2553
2581
  const errorInfo = ErrorTypeStrings$1[type] ;
2554
2582
  while (cur) {
2555
2583
  const errorCapturedHooks = cur.ec;
2556
- if (errorCapturedHooks) {
2584
+ if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
2585
+ // are deferred or discarded by Suspense.
2586
+ (!isAsyncError || cur.scope.active)) {
2557
2587
  for (let i = 0; i < errorCapturedHooks.length; i++) {
2558
2588
  if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
2559
2589
  return;
@@ -2654,21 +2684,21 @@ var Vue = (function () {
2654
2684
  }
2655
2685
  queueFlush();
2656
2686
  }
2657
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2687
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2658
2688
  {
2659
2689
  seen = seen || /* @__PURE__ */ new Map();
2660
2690
  }
2661
2691
  for (; i < queue.length; i++) {
2662
2692
  const cb = queue[i];
2663
2693
  if (cb && cb.flags & 2) {
2664
- if (instance && cb.id !== instance.uid) {
2694
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2665
2695
  continue;
2666
2696
  }
2667
2697
  if (checkRecursiveUpdates(seen, cb)) {
2668
2698
  continue;
2669
2699
  }
2670
2700
  queue.splice(i, 1);
2671
- i--;
2701
+ i = instance ? i - 1 : flushIndex;
2672
2702
  if (cb.flags & 4) {
2673
2703
  cb.flags &= -2;
2674
2704
  }
@@ -2679,12 +2709,23 @@ var Vue = (function () {
2679
2709
  }
2680
2710
  }
2681
2711
  }
2682
- function flushPostFlushCbs(seen) {
2712
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2683
2713
  if (pendingPostFlushCbs.length) {
2684
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2685
- (a, b) => getId(a) - getId(b)
2686
- );
2687
- pendingPostFlushCbs.length = 0;
2714
+ let cbs = pendingPostFlushCbs;
2715
+ let kept = 0;
2716
+ if (skip) {
2717
+ cbs = [];
2718
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2719
+ const cb = pendingPostFlushCbs[i];
2720
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2721
+ pendingPostFlushCbs[kept++] = cb;
2722
+ } else {
2723
+ cbs.push(cb);
2724
+ }
2725
+ }
2726
+ }
2727
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2728
+ pendingPostFlushCbs.length = kept;
2688
2729
  if (activePostFlushCbs) {
2689
2730
  for (let i = 0; i < deduped.length; i++) {
2690
2731
  activePostFlushCbs.push(deduped[i]);
@@ -2710,6 +2751,22 @@ var Vue = (function () {
2710
2751
  postFlushIndex = 0;
2711
2752
  }
2712
2753
  }
2754
+ let isFlushing = false;
2755
+ function flushOnAppMount(fn, minUid) {
2756
+ if (isFlushing) {
2757
+ fn();
2758
+ return;
2759
+ }
2760
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2761
+ fn();
2762
+ isFlushing = true;
2763
+ try {
2764
+ flushPreFlushCbs(void 0, minUid);
2765
+ flushPostFlushCbs(void 0, queued, minUid);
2766
+ } finally {
2767
+ isFlushing = false;
2768
+ }
2769
+ }
2713
2770
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2714
2771
  function flushJobs(seen) {
2715
2772
  {
@@ -2854,14 +2911,32 @@ var Vue = (function () {
2854
2911
  instance.ceReload(newComp.styles);
2855
2912
  dirtyInstances.delete(instance);
2856
2913
  } else if (instance.parent) {
2857
- queueJob(() => {
2858
- if (!(instance.job.flags & 8)) {
2859
- isHmrUpdating = true;
2914
+ const update = () => {
2915
+ if (!instance.scope.active) return;
2916
+ const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
2917
+ if (pending) {
2918
+ pending.asyncDep.catch(NOOP).then(() => {
2919
+ if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
2920
+ queueJob(update);
2921
+ }
2922
+ });
2923
+ return;
2924
+ }
2925
+ dirtyInstances = hmrDirtyComponents.get(oldComp);
2926
+ if (!dirtyInstances) {
2927
+ hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
2928
+ }
2929
+ dirtyInstances.add(instance);
2930
+ isHmrUpdating = true;
2931
+ try {
2860
2932
  instance.parent.update();
2933
+ } finally {
2861
2934
  isHmrUpdating = false;
2862
2935
  dirtyInstances.delete(instance);
2936
+ queuePostFlushCb(() => hmrDirtyComponents.clear());
2863
2937
  }
2864
- });
2938
+ };
2939
+ queueJob(update);
2865
2940
  } else if (instance.appContext.reload) {
2866
2941
  instance.appContext.reload();
2867
2942
  } else if (typeof window !== "undefined") {
@@ -3543,12 +3618,31 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3543
3618
  return vnode;
3544
3619
  }
3545
3620
  function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3546
- const bindings = vnode.dirs;
3621
+ let hookVNode = vnode;
3622
+ if (name === "beforeMount") {
3623
+ vnode._mount = vnode;
3624
+ } else if (name === "beforeUpdate") {
3625
+ const mount = prevVNode && prevVNode._mount;
3626
+ if (mount) {
3627
+ mount._latest = vnode;
3628
+ vnode._mount = mount;
3629
+ }
3630
+ } else if (name === "mounted") {
3631
+ const latest = vnode._latest;
3632
+ vnode._mount = vnode._latest = void 0;
3633
+ if (latest) {
3634
+ hookVNode = latest;
3635
+ latest._mount = void 0;
3636
+ }
3637
+ }
3638
+ const bindings = hookVNode.dirs;
3547
3639
  const oldBindings = prevVNode && prevVNode.dirs;
3548
3640
  for (let i = 0; i < bindings.length; i++) {
3549
- const binding = bindings[i];
3641
+ let binding = bindings[i];
3550
3642
  if (oldBindings) {
3551
3643
  binding.oldValue = oldBindings[i].value;
3644
+ } else if (name === "mounted" && binding.oldValue !== void 0) {
3645
+ binding = extend({}, binding, { oldValue: void 0 });
3552
3646
  }
3553
3647
  let hook = binding.dir[name];
3554
3648
  if (!hook) {
@@ -3559,7 +3653,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3559
3653
  callWithAsyncErrorHandling(hook, instance, 8, [
3560
3654
  vnode.el,
3561
3655
  binding,
3562
- vnode,
3656
+ hookVNode,
3563
3657
  prevVNode
3564
3658
  ]);
3565
3659
  resetTracking();
@@ -3659,6 +3753,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3659
3753
  let isPre = false;
3660
3754
  if (flush === "post") {
3661
3755
  baseWatchOptions.scheduler = (job) => {
3756
+ job.i = instance;
3662
3757
  queuePostRenderEffect(job, instance && instance.suspense);
3663
3758
  };
3664
3759
  } else if (flush !== "sync") {
@@ -3953,7 +4048,11 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3953
4048
  };
3954
4049
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
3955
4050
  if (moveType === 0) {
4051
+ if (vnode.targetStart) {
4052
+ insert(vnode.targetStart, container, parentAnchor);
4053
+ }
3956
4054
  insert(vnode.targetAnchor, container, parentAnchor);
4055
+ parentAnchor = vnode.targetAnchor;
3957
4056
  }
3958
4057
  const { el, anchor, shapeFlag, children, props } = vnode;
3959
4058
  const isReorder = moveType === 2;
@@ -4122,10 +4221,6 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4122
4221
  onAfterAppear: TransitionHookValidator,
4123
4222
  onAppearCancelled: TransitionHookValidator
4124
4223
  };
4125
- const recursiveGetSubtree = (instance) => {
4126
- const subTree = instance.subTree;
4127
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4128
- };
4129
4224
  const BaseTransitionImpl = {
4130
4225
  name: `BaseTransition`,
4131
4226
  props: BaseTransitionPropsValidators,
@@ -4154,19 +4249,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4154
4249
  if (!innerChild) {
4155
4250
  return emptyPlaceholder(child);
4156
4251
  }
4157
- let enterHooks = resolveTransitionHooks(
4252
+ const enterHooks = resolveTransitionHooks(
4158
4253
  innerChild,
4159
4254
  rawProps,
4160
4255
  state,
4161
- instance,
4162
- // #11061, ensure enterHooks is fresh after clone
4163
- (hooks) => enterHooks = hooks
4256
+ instance
4164
4257
  );
4165
4258
  if (innerChild.type !== Comment) {
4166
4259
  setTransitionHooks(innerChild, enterHooks);
4167
4260
  }
4168
4261
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4169
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4262
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4170
4263
  let leavingHooks = resolveTransitionHooks(
4171
4264
  oldInnerChild,
4172
4265
  rawProps,
@@ -4179,7 +4272,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4179
4272
  leavingHooks.afterLeave = () => {
4180
4273
  state.isLeaving = false;
4181
4274
  if (!(instance.job.flags & 8)) {
4182
- instance.update();
4275
+ if (instance.effect.flags & 2) {
4276
+ const job = () => {
4277
+ if (!(instance.job.flags & 8)) {
4278
+ instance.update();
4279
+ }
4280
+ };
4281
+ job.i = instance;
4282
+ queueJob(job);
4283
+ } else {
4284
+ instance.update();
4285
+ }
4183
4286
  }
4184
4287
  delete leavingHooks.afterLeave;
4185
4288
  oldInnerChild = void 0;
@@ -4246,7 +4349,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4246
4349
  }
4247
4350
  return leavingVNodesCache;
4248
4351
  }
4249
- function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4352
+ function resolveTransitionHooks(vnode, props, state, instance) {
4250
4353
  const {
4251
4354
  appear,
4252
4355
  mode,
@@ -4302,8 +4405,15 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4302
4405
  );
4303
4406
  }
4304
4407
  const leavingVNode = leavingVNodesCache[key];
4305
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4306
- leavingVNode.el[leaveCbKey]();
4408
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4409
+ let leavingCb = leavingVNode.el[leaveCbKey];
4410
+ if (!leavingCb) {
4411
+ const leavingRoot = getTransitionRoot(leavingVNode);
4412
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4413
+ }
4414
+ if (leavingCb) {
4415
+ leavingCb();
4416
+ }
4307
4417
  }
4308
4418
  callHook(hook, [el]);
4309
4419
  },
@@ -4378,15 +4488,21 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4378
4488
  }
4379
4489
  },
4380
4490
  clone(vnode2) {
4381
- const hooks2 = resolveTransitionHooks(
4382
- vnode2,
4383
- props,
4384
- state,
4385
- instance,
4386
- postClone
4387
- );
4388
- if (postClone) postClone(hooks2);
4389
- return hooks2;
4491
+ const cloned = resolveTransitionHooks(vnode2, props, state, instance);
4492
+ cloned.afterLeave = () => {
4493
+ if (hooks.afterLeave) hooks.afterLeave();
4494
+ };
4495
+ cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
4496
+ if (hooks.delayLeave) {
4497
+ hooks.delayLeave(el, earlyRemove, delayedLeave);
4498
+ } else {
4499
+ delayedLeave();
4500
+ }
4501
+ };
4502
+ cloned.delayedLeave = () => {
4503
+ if (hooks.delayedLeave) hooks.delayedLeave();
4504
+ };
4505
+ return cloned;
4390
4506
  }
4391
4507
  };
4392
4508
  return hooks;
@@ -4427,10 +4543,24 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4427
4543
  hooks
4428
4544
  );
4429
4545
  } else if (vnode.shapeFlag & 128) {
4430
- vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4431
- vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4546
+ const suspense = vnode.suspense;
4547
+ if (suspense) {
4548
+ const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
4549
+ if (branch) {
4550
+ setTransitionHooks(branch, hooks.clone(branch));
4551
+ }
4552
+ } else {
4553
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4554
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4555
+ }
4432
4556
  } else {
4433
4557
  vnode.transition = hooks;
4558
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4559
+ const child = filterSingleRoot(vnode.children, false);
4560
+ if (child) {
4561
+ setTransitionHooks(child, hooks);
4562
+ }
4563
+ }
4434
4564
  }
4435
4565
  }
4436
4566
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4455,6 +4585,18 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
4455
4585
  }
4456
4586
  return ret;
4457
4587
  }
4588
+ function getTransitionRoot(vnode) {
4589
+ if (vnode.component) {
4590
+ return getTransitionRoot(vnode.component.subTree);
4591
+ }
4592
+ if (vnode.type === Fragment) {
4593
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4594
+ return child ? getTransitionRoot(child) : void 0;
4595
+ }
4596
+ if (vnode.type !== Comment) {
4597
+ return vnode;
4598
+ }
4599
+ }
4458
4600
 
4459
4601
  // @__NO_SIDE_EFFECTS__
4460
4602
  function defineComponent(options, extraOptions) {
@@ -5111,7 +5253,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5111
5253
  getContainerType(container),
5112
5254
  slotScopeIds
5113
5255
  );
5114
- if (parentComponent) {
5256
+ if (parentComponent && parentComponent.vnode.el === node) {
5115
5257
  parentComponent.vnode.el = vnode.el;
5116
5258
  updateHOCHostEl(parentComponent, vnode.el);
5117
5259
  }
@@ -5360,14 +5502,22 @@ Server rendered element contains fewer child nodes than client vdom.`
5360
5502
  break;
5361
5503
  }
5362
5504
  }, opts);
5363
- forEach((el) => {
5364
- if (!(el instanceof Element)) return;
5505
+ const observe = (el) => {
5365
5506
  if (elementIsVisibleInViewport(el)) {
5366
5507
  hydrate();
5367
5508
  ob.disconnect();
5368
5509
  return false;
5369
5510
  }
5511
+ if (getComputedStyle(el).display === "contents") {
5512
+ for (let i = 0; i < el.children.length; i++) {
5513
+ if (observe(el.children[i]) === false) return false;
5514
+ }
5515
+ }
5370
5516
  ob.observe(el);
5517
+ };
5518
+ forEach((el) => {
5519
+ if (!(el instanceof Element)) return;
5520
+ return observe(el);
5371
5521
  });
5372
5522
  return () => ob.disconnect();
5373
5523
  };
@@ -5537,7 +5687,8 @@ Server rendered element contains fewer child nodes than client vdom.`
5537
5687
  err,
5538
5688
  instance,
5539
5689
  13,
5540
- !errorComponent
5690
+ !errorComponent,
5691
+ true
5541
5692
  );
5542
5693
  };
5543
5694
  if (suspensible && instance.suspense || false) {
@@ -5555,7 +5706,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5555
5706
  const delayed = ref(!!delay);
5556
5707
  let timeoutTimer;
5557
5708
  let delayTimer;
5558
- onUnmounted(() => {
5709
+ onScopeDispose(() => {
5559
5710
  if (timeoutTimer != null) clearTimeout(timeoutTimer);
5560
5711
  if (delayTimer != null) clearTimeout(delayTimer);
5561
5712
  });
@@ -5677,6 +5828,12 @@ Server rendered element contains fewer child nodes than client vdom.`
5677
5828
  }
5678
5829
  };
5679
5830
  sharedContext.deactivate = (vnode) => {
5831
+ const cached = cache.get(
5832
+ vnode.key == null ? vnode.type : vnode.key
5833
+ );
5834
+ if (!cached || cached.component !== vnode.component) {
5835
+ return false;
5836
+ }
5680
5837
  const instance2 = vnode.component;
5681
5838
  invalidateMount(instance2.m);
5682
5839
  invalidateMount(instance2.a);
@@ -5697,6 +5854,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5697
5854
  {
5698
5855
  instance2.__keepAliveStorageContainer = storageContainer;
5699
5856
  }
5857
+ return true;
5700
5858
  };
5701
5859
  function unmount(vnode) {
5702
5860
  resetShapeFlag(vnode);
@@ -5718,6 +5876,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5718
5876
  unmount(cached);
5719
5877
  } else if (current) {
5720
5878
  resetShapeFlag(current);
5879
+ if (cached) resetShapeFlag(cached);
5721
5880
  }
5722
5881
  cache.delete(key);
5723
5882
  keys.delete(key);
@@ -5735,12 +5894,17 @@ Server rendered element contains fewer child nodes than client vdom.`
5735
5894
  const cacheSubtree = () => {
5736
5895
  if (pendingCacheKey != null) {
5737
5896
  if (isSuspense(instance.subTree.type)) {
5738
- queuePostRenderEffect(() => {
5897
+ const cacheInnerChild = () => {
5739
5898
  const vnode = getInnerChild(instance.subTree);
5740
5899
  if (vnode.component) {
5741
5900
  cache.set(pendingCacheKey, vnode);
5742
5901
  }
5743
- }, instance.subTree.suspense);
5902
+ };
5903
+ if (instance.subTree.suspense.pendingBranch) {
5904
+ queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
5905
+ } else {
5906
+ cacheInnerChild();
5907
+ }
5744
5908
  } else {
5745
5909
  cache.set(pendingCacheKey, getInnerChild(instance.subTree));
5746
5910
  }
@@ -5875,9 +6039,12 @@ Server rendered element contains fewer child nodes than client vdom.`
5875
6039
  true
5876
6040
  /* prepend */
5877
6041
  );
5878
- onUnmounted(() => {
5879
- remove(keepAliveRoot[type], injected);
5880
- }, target);
6042
+ const removal = injectHook(
6043
+ "um",
6044
+ () => remove(keepAliveRoot[type], injected),
6045
+ target
6046
+ );
6047
+ removal.flags = 16;
5881
6048
  }
5882
6049
  function resetShapeFlag(vnode) {
5883
6050
  vnode.shapeFlag &= -257;
@@ -6300,9 +6467,11 @@ If this is a native custom element, make sure to exclude it from component resol
6300
6467
  }
6301
6468
  } else if (typeof source === "number") {
6302
6469
  if (!Number.isInteger(source) || source < 0) {
6303
- warn$1(
6304
- `The v-for range expects a positive integer value but got ${source}.`
6305
- );
6470
+ {
6471
+ warn$1(
6472
+ `The v-for range expects a positive integer value but got ${source}.`
6473
+ );
6474
+ }
6306
6475
  ret = [];
6307
6476
  } else {
6308
6477
  ret = new Array(source);
@@ -6621,6 +6790,7 @@ If this is a native custom element, make sure to exclude it from component resol
6621
6790
  $vnode: (i) => i.vnode,
6622
6791
  // some private properties that are likely accessed...
6623
6792
  _self: (i) => i.proxy,
6793
+ _setupProxy: (i) => i.setupState,
6624
6794
  _uid: (i) => i.uid,
6625
6795
  _data: (i) => i.data,
6626
6796
  _isMounted: (i) => i.isMounted,
@@ -7605,7 +7775,7 @@ If this is a native custom element, make sure to exclude it from component resol
7605
7775
  return vm;
7606
7776
  }
7607
7777
  }
7608
- Vue.version = `2.6.14-compat:${"3.5.43"}`;
7778
+ Vue.version = `2.6.14-compat:${"3.5.45"}`;
7609
7779
  Vue.config = singletonApp.config;
7610
7780
  Vue.use = (plugin, ...options) => {
7611
7781
  if (plugin && isFunction(plugin.install)) {
@@ -8762,7 +8932,7 @@ If you want to remount the same app, move your app creation logic into a factory
8762
8932
  }
8763
8933
  for (let i = 0; i < nextKeys.length; i++) {
8764
8934
  const key = nextKeys[i];
8765
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8935
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8766
8936
  return true;
8767
8937
  }
8768
8938
  }
@@ -9714,6 +9884,8 @@ If you want to remount the same app, move your app creation logic into a factory
9714
9884
  const needCallTransitionHooks = needTransition(parentSuspense, transition);
9715
9885
  if (needCallTransitionHooks) {
9716
9886
  transition.beforeEnter(el);
9887
+ } else if (transition && !transition.persisted) {
9888
+ el[deferredEnterKey] = true;
9717
9889
  }
9718
9890
  hostInsert(el, container, anchor);
9719
9891
  if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
@@ -9873,15 +10045,16 @@ If you want to remount the same app, move your app creation logic into a factory
9873
10045
  for (let i = 0; i < newChildren.length; i++) {
9874
10046
  const oldVNode = oldChildren[i];
9875
10047
  const newVNode = newChildren[i];
10048
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
9876
10049
  const container = (
9877
10050
  // oldVNode may be an errored async setup() component inside Suspense
9878
10051
  // which will not have a mounted element
9879
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
10052
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
9880
10053
  // of the Fragment itself so it can move its children.
9881
10054
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
9882
10055
  // which also requires the correct parent container
9883
10056
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
9884
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
10057
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
9885
10058
  // In other cases, the parent container is not actually used so we
9886
10059
  // just pass the block element here to avoid a DOM parentNode call.
9887
10060
  fallbackContainer
@@ -10046,7 +10219,12 @@ If you want to remount the same app, move your app creation logic into a factory
10046
10219
  }
10047
10220
  if (isHmrUpdating) initialVNode.el = null;
10048
10221
  if (instance.asyncDep) {
10049
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10222
+ parentSuspense && parentSuspense.registerDep(
10223
+ instance,
10224
+ setupRenderEffect,
10225
+ optimized,
10226
+ namespace
10227
+ );
10050
10228
  if (!initialVNode.el) {
10051
10229
  const placeholder = instance.subTree = createVNode(Comment);
10052
10230
  processCommentNode(null, placeholder, container, anchor);
@@ -10076,6 +10254,7 @@ If you want to remount the same app, move your app creation logic into a factory
10076
10254
  pushWarningContext(n2);
10077
10255
  }
10078
10256
  n2.el = n1.el;
10257
+ n2.placeholder = n1.placeholder;
10079
10258
  updateComponentPreRender(instance, n2, optimized);
10080
10259
  {
10081
10260
  popWarningContext();
@@ -10087,6 +10266,7 @@ If you want to remount the same app, move your app creation logic into a factory
10087
10266
  }
10088
10267
  } else {
10089
10268
  n2.el = n1.el;
10269
+ n2.placeholder = n1.placeholder;
10090
10270
  instance.vnode = n2;
10091
10271
  }
10092
10272
  };
@@ -10204,16 +10384,23 @@ If you want to remount the same app, move your app creation logic into a factory
10204
10384
  } else {
10205
10385
  let { next, bu, u, parent, vnode } = instance;
10206
10386
  {
10207
- const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
10208
- if (nonHydratedAsyncRoot) {
10387
+ const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
10388
+ if (unresolvedAsyncRoot) {
10209
10389
  if (next) {
10210
10390
  next.el = vnode.el;
10211
10391
  updateComponentPreRender(instance, next, optimized);
10212
10392
  }
10213
- nonHydratedAsyncRoot.asyncDep.then(() => {
10214
- queuePostRenderEffect(() => {
10215
- if (!instance.isUnmounted) update();
10216
- }, parentSuspense);
10393
+ unresolvedAsyncRoot.asyncDep.then(() => {
10394
+ const retry = () => {
10395
+ if (instance.job.flags & 8) return;
10396
+ if (parentSuspense && parentSuspense.pendingBranch) {
10397
+ queuePostRenderEffect(retry, parentSuspense);
10398
+ } else {
10399
+ update();
10400
+ }
10401
+ };
10402
+ retry.flags = 16 | 32;
10403
+ queuePostRenderEffect(retry, parentSuspense);
10217
10404
  });
10218
10405
  return;
10219
10406
  }
@@ -10255,8 +10442,11 @@ If you want to remount the same app, move your app creation logic into a factory
10255
10442
  patch(
10256
10443
  prevTree,
10257
10444
  nextTree,
10258
- // parent may have changed if it's in a teleport
10259
- hostParentNode(prevTree.el),
10445
+ // parent may have changed if it's in a teleport. a root that is a
10446
+ // pending async component only has its placeholder comment
10447
+ hostParentNode(
10448
+ prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
10449
+ ),
10260
10450
  // anchor may have changed if it's in a fragment
10261
10451
  getNextHostNode(prevTree),
10262
10452
  instance,
@@ -10702,8 +10892,7 @@ If you want to remount the same app, move your app creation logic into a factory
10702
10892
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
10703
10893
  parentComponent.renderCache[cacheIndex] = void 0;
10704
10894
  }
10705
- if (shapeFlag & 256) {
10706
- parentComponent.ctx.deactivate(vnode);
10895
+ if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
10707
10896
  return;
10708
10897
  }
10709
10898
  const shouldInvokeDirs = shapeFlag & 1 && dirs;
@@ -10764,18 +10953,9 @@ If you want to remount the same app, move your app creation logic into a factory
10764
10953
  };
10765
10954
  const remove = (vnode) => {
10766
10955
  const { type, el, anchor, transition } = vnode;
10767
- if (type === Fragment) {
10768
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10769
- vnode.children.forEach((child) => {
10770
- if (child.type === Comment) {
10771
- hostRemove(child.el);
10772
- } else {
10773
- remove(child);
10774
- }
10775
- });
10776
- } else {
10777
- removeFragment(el, anchor);
10778
- }
10956
+ const isFragment = type === Fragment;
10957
+ if (isFragment && !transition) {
10958
+ removeFragment(el, anchor);
10779
10959
  return;
10780
10960
  }
10781
10961
  if (type === Static) {
@@ -10785,17 +10965,25 @@ If you want to remount the same app, move your app creation logic into a factory
10785
10965
  }
10786
10966
  return;
10787
10967
  }
10968
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10788
10969
  const performRemove = () => {
10789
- hostRemove(el);
10970
+ if (isFragment) {
10971
+ if (hostParentNode(el)) {
10972
+ removeFragment(el, anchor);
10973
+ }
10974
+ } else {
10975
+ hostRemove(el);
10976
+ }
10790
10977
  if (transition && !transition.persisted && transition.afterLeave) {
10791
10978
  transition.afterLeave();
10792
10979
  }
10793
10980
  };
10794
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
10981
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10795
10982
  const { leave, delayLeave } = transition;
10796
- const performLeave = () => leave(el, performRemove);
10983
+ const leavingEl = leavingNode.el;
10984
+ const performLeave = () => leave(leavingEl, performRemove);
10797
10985
  if (delayLeave) {
10798
- delayLeave(vnode.el, performRemove, performLeave);
10986
+ delayLeave(leavingEl, performRemove, performLeave);
10799
10987
  } else {
10800
10988
  performLeave();
10801
10989
  }
@@ -10829,7 +11017,7 @@ If you want to remount the same app, move your app creation logic into a factory
10829
11017
  if (job) {
10830
11018
  job.flags |= 8;
10831
11019
  unmount(subTree, instance, parentSuspense, doRemove);
10832
- } else if (instance.vnode.el && subTree) {
11020
+ } else if (subTree) {
10833
11021
  subTree.transition = instance.vnode.transition;
10834
11022
  unmount(subTree, instance, parentSuspense, doRemove);
10835
11023
  }
@@ -10842,9 +11030,11 @@ If you want to remount the same app, move your app creation logic into a factory
10842
11030
  parentSuspense
10843
11031
  );
10844
11032
  }
10845
- queuePostRenderEffect(() => {
11033
+ const markUnmounted = () => {
10846
11034
  instance.isUnmounted = true;
10847
- }, parentSuspense);
11035
+ };
11036
+ markUnmounted.flags = 16;
11037
+ queuePostRenderEffect(markUnmounted, parentSuspense);
10848
11038
  {
10849
11039
  devtoolsComponentRemoved(instance);
10850
11040
  }
@@ -10865,32 +11055,26 @@ If you want to remount the same app, move your app creation logic into a factory
10865
11055
  const teleportEnd = el && el[TeleportEndKey];
10866
11056
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
10867
11057
  };
10868
- let isFlushing = false;
10869
11058
  const render = (vnode, container, namespace) => {
10870
- let instance;
10871
- if (vnode == null) {
10872
- if (container._vnode) {
10873
- unmount(container._vnode, null, null, true);
10874
- instance = container._vnode.component;
11059
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
11060
+ flushOnAppMount(() => {
11061
+ if (vnode == null) {
11062
+ if (container._vnode) {
11063
+ unmount(container._vnode, null, null, true);
11064
+ }
11065
+ } else {
11066
+ patch(
11067
+ container._vnode || null,
11068
+ vnode,
11069
+ container,
11070
+ null,
11071
+ null,
11072
+ null,
11073
+ namespace
11074
+ );
10875
11075
  }
10876
- } else {
10877
- patch(
10878
- container._vnode || null,
10879
- vnode,
10880
- container,
10881
- null,
10882
- null,
10883
- null,
10884
- namespace
10885
- );
10886
- }
10887
- container._vnode = vnode;
10888
- if (!isFlushing) {
10889
- isFlushing = true;
10890
- flushPreFlushCbs(instance);
10891
- flushPostFlushCbs();
10892
- isFlushing = false;
10893
- }
11076
+ container._vnode = vnode;
11077
+ }, minUid);
10894
11078
  };
10895
11079
  const internals = {
10896
11080
  p: patch,
@@ -11002,13 +11186,13 @@ If you want to remount the same app, move your app creation logic into a factory
11002
11186
  }
11003
11187
  return result;
11004
11188
  }
11005
- function locateNonHydratedAsyncRoot(instance) {
11189
+ function locateUnresolvedAsyncRoot(instance) {
11006
11190
  const subComponent = instance.subTree.component;
11007
11191
  if (subComponent) {
11008
11192
  if (subComponent.asyncDep && !subComponent.asyncResolved) {
11009
11193
  return subComponent;
11010
11194
  } else {
11011
- return locateNonHydratedAsyncRoot(subComponent);
11195
+ return locateUnresolvedAsyncRoot(subComponent);
11012
11196
  }
11013
11197
  }
11014
11198
  }
@@ -11026,11 +11210,16 @@ If you want to remount the same app, move your app creation logic into a factory
11026
11210
  if (instance) {
11027
11211
  return resolveAsyncComponentPlaceholder(instance.subTree);
11028
11212
  }
11213
+ const suspense = anchorVnode.suspense;
11214
+ if (suspense && suspense.activeBranch) {
11215
+ return resolveAsyncComponentPlaceholder(suspense.activeBranch);
11216
+ }
11029
11217
  return null;
11030
11218
  }
11031
11219
 
11032
11220
  const isSuspense = (type) => type.__isSuspense;
11033
11221
  let suspenseId = 0;
11222
+ const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
11034
11223
  const SuspenseImpl = {
11035
11224
  name: "Suspense",
11036
11225
  // In order to make Suspense tree-shakable, we need to avoid importing it
@@ -11052,11 +11241,22 @@ If you want to remount the same app, move your app creation logic into a factory
11052
11241
  rendererInternals
11053
11242
  );
11054
11243
  } else {
11055
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
11056
- n2.suspense = n1.suspense;
11057
- n2.suspense.vnode = n2;
11058
- n2.el = n1.el;
11059
- return;
11244
+ const suspense = n1.suspense;
11245
+ if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
11246
+ const owner = suspense.parentComponent;
11247
+ const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
11248
+ if (retained ? (
11249
+ // deps can outlive the pending branch: skip only while it exists
11250
+ parentSuspense.pendingBranch && !isSameVNodeType(
11251
+ n2.ssContent,
11252
+ suspense.pendingBranch || suspense.activeBranch
11253
+ )
11254
+ ) : !suspense.isInFallback) {
11255
+ n2.suspense = suspense;
11256
+ suspense.vnode = n2;
11257
+ n2.el = n1.el;
11258
+ return;
11259
+ }
11060
11260
  }
11061
11261
  patchSuspense(
11062
11262
  n1,
@@ -11081,6 +11281,38 @@ If you want to remount the same app, move your app creation logic into a factory
11081
11281
  eventListener();
11082
11282
  }
11083
11283
  }
11284
+ function enterDeferred(branch) {
11285
+ const enters = [];
11286
+ collectDeferredEnters(branch, enters, true);
11287
+ if (enters.length) {
11288
+ queuePostFlushCb(enters);
11289
+ }
11290
+ }
11291
+ function collectDeferredEnters(vnode, enters, isRoot) {
11292
+ const { el, transition, children, shapeFlag } = vnode;
11293
+ if (shapeFlag & 6) {
11294
+ collectDeferredEnters(vnode.component.subTree, enters, isRoot);
11295
+ return;
11296
+ }
11297
+ if (shapeFlag & (128 | 64)) {
11298
+ return;
11299
+ }
11300
+ if (shapeFlag & 1) {
11301
+ if (!isRoot && el && el[deferredEnterKey]) {
11302
+ el[deferredEnterKey] = void 0;
11303
+ if (transition && !transition.persisted) {
11304
+ transition.beforeEnter(el);
11305
+ enters.push(() => transition.enter(el));
11306
+ }
11307
+ }
11308
+ isRoot = false;
11309
+ }
11310
+ if (shapeFlag & 16) {
11311
+ for (let i = 0; i < children.length; i++) {
11312
+ collectDeferredEnters(children[i], enters, isRoot);
11313
+ }
11314
+ }
11315
+ }
11084
11316
  function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
11085
11317
  const {
11086
11318
  p: patch,
@@ -11180,7 +11412,7 @@ If you want to remount the same app, move your app creation logic into a factory
11180
11412
  unmount(pendingBranch, parentComponent, suspense);
11181
11413
  }
11182
11414
  suspense.deps = 0;
11183
- suspense.effects.length = 0;
11415
+ discardEffects(suspense);
11184
11416
  suspense.hiddenContainer = createElement("div");
11185
11417
  if (isInFallback) {
11186
11418
  patch(
@@ -11258,11 +11490,7 @@ If you want to remount the same app, move your app creation logic into a factory
11258
11490
  } else {
11259
11491
  triggerEvent(n2, "onPending");
11260
11492
  suspense.pendingBranch = newBranch;
11261
- if (newBranch.shapeFlag & 512) {
11262
- suspense.pendingId = newBranch.component.suspenseId;
11263
- } else {
11264
- suspense.pendingId = suspenseId++;
11265
- }
11493
+ suspense.pendingId = suspenseId++;
11266
11494
  patch(
11267
11495
  null,
11268
11496
  newBranch,
@@ -11277,12 +11505,11 @@ If you want to remount the same app, move your app creation logic into a factory
11277
11505
  if (suspense.deps <= 0) {
11278
11506
  suspense.resolve();
11279
11507
  } else {
11280
- const { timeout, pendingId } = suspense;
11508
+ const { timeout } = suspense;
11281
11509
  if (timeout > 0) {
11282
- setTimeout(() => {
11283
- if (suspense.pendingId === pendingId) {
11284
- suspense.fallback(newFallback);
11285
- }
11510
+ suspense.timeoutTimer = setTimeout(() => {
11511
+ suspense.timeoutTimer = void 0;
11512
+ suspense.fallback(suspense.vnode.ssFallback);
11286
11513
  }, timeout);
11287
11514
  } else if (timeout === 0) {
11288
11515
  suspense.fallback(newFallback);
@@ -11329,6 +11556,7 @@ If you want to remount the same app, move your app creation logic into a factory
11329
11556
  deps: 0,
11330
11557
  pendingId: suspenseId++,
11331
11558
  timeout: typeof timeout === "number" ? timeout : -1,
11559
+ timeoutTimer: void 0,
11332
11560
  activeBranch: null,
11333
11561
  isFallbackMountPending: false,
11334
11562
  pendingBranch: null,
@@ -11367,7 +11595,8 @@ If you want to remount the same app, move your app creation logic into a factory
11367
11595
  let hasUpdatedAnchor = false;
11368
11596
  if (delayEnter) {
11369
11597
  activeBranch.transition.afterLeave = () => {
11370
- if (pendingId === suspense.pendingId) {
11598
+ if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
11599
+ enterDeferred(pendingBranch);
11371
11600
  move(
11372
11601
  pendingBranch,
11373
11602
  container2,
@@ -11382,7 +11611,9 @@ If you want to remount the same app, move your app creation logic into a factory
11382
11611
  };
11383
11612
  }
11384
11613
  if (activeBranch && !suspense.isFallbackMountPending) {
11385
- if (parentNode(activeBranch.el) === container2) {
11614
+ if (parentNode(
11615
+ activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
11616
+ ) === container2) {
11386
11617
  anchor = next(activeBranch);
11387
11618
  hasUpdatedAnchor = true;
11388
11619
  }
@@ -11392,13 +11623,26 @@ If you want to remount the same app, move your app creation logic into a factory
11392
11623
  }
11393
11624
  }
11394
11625
  if (!delayEnter) {
11626
+ enterDeferred(pendingBranch);
11395
11627
  move(pendingBranch, container2, anchor, 0);
11396
11628
  }
11397
11629
  }
11630
+ clearTimeout(suspense.timeoutTimer);
11631
+ suspense.timeoutTimer = void 0;
11398
11632
  suspense.isFallbackMountPending = false;
11399
11633
  setActiveBranch(suspense, pendingBranch);
11400
11634
  suspense.pendingBranch = null;
11401
11635
  suspense.isInFallback = false;
11636
+ let kept = 0;
11637
+ for (let i = 0; i < effects.length; i++) {
11638
+ const effect = effects[i];
11639
+ if (effect.flags & 32) {
11640
+ queuePostFlushCb(effect);
11641
+ } else {
11642
+ effects[kept++] = effect;
11643
+ }
11644
+ }
11645
+ effects.length = kept;
11402
11646
  let parent = suspense.parent;
11403
11647
  let hasUnresolvedAncestor = false;
11404
11648
  while (parent) {
@@ -11427,7 +11671,7 @@ If you want to remount the same app, move your app creation logic into a factory
11427
11671
  triggerEvent(vnode2, "onResolve");
11428
11672
  },
11429
11673
  fallback(fallbackVNode) {
11430
- if (!suspense.pendingBranch) {
11674
+ if (suspense.isUnmounted || !suspense.pendingBranch) {
11431
11675
  return;
11432
11676
  }
11433
11677
  const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
@@ -11435,7 +11679,7 @@ If you want to remount the same app, move your app creation logic into a factory
11435
11679
  const anchor2 = next(activeBranch);
11436
11680
  const mountFallback = () => {
11437
11681
  suspense.isFallbackMountPending = false;
11438
- if (!suspense.isInFallback) {
11682
+ if (suspense.isUnmounted || !suspense.isInFallback) {
11439
11683
  return;
11440
11684
  }
11441
11685
  const latestFallback = suspense.vnode.ssFallback;
@@ -11478,25 +11722,16 @@ If you want to remount the same app, move your app creation logic into a factory
11478
11722
  next() {
11479
11723
  return suspense.activeBranch && next(suspense.activeBranch);
11480
11724
  },
11481
- registerDep(instance, setupRenderEffect, optimized2) {
11725
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11726
+ // mounted with the namespace of the position it was rendered at, which can
11727
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11728
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11482
11729
  const isInPendingSuspense = !!suspense.pendingBranch;
11483
11730
  if (isInPendingSuspense) {
11484
11731
  suspense.deps++;
11485
11732
  }
11486
11733
  const hydratedEl = instance.vnode.el;
11487
- instance.asyncDep.catch((err) => {
11488
- handleError(err, instance, 0);
11489
- }).then((asyncSetupResult) => {
11490
- if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
11491
- return;
11492
- }
11493
- unsetCurrentInstance();
11494
- if (hydratedEl && !instance.scope.active) {
11495
- if (isInPendingSuspense && --suspense.deps === 0) {
11496
- suspense.resolve();
11497
- }
11498
- return;
11499
- }
11734
+ const render = (asyncSetupResult) => {
11500
11735
  instance.asyncResolved = true;
11501
11736
  const { vnode: vnode2 } = instance;
11502
11737
  {
@@ -11518,7 +11753,7 @@ If you want to remount the same app, move your app creation logic into a factory
11518
11753
  // consider the comment placeholder case.
11519
11754
  hydratedEl ? null : next(instance.subTree),
11520
11755
  suspense,
11521
- namespace,
11756
+ namespace2,
11522
11757
  optimized2
11523
11758
  );
11524
11759
  if (placeholder) {
@@ -11529,13 +11764,57 @@ If you want to remount the same app, move your app creation logic into a factory
11529
11764
  {
11530
11765
  popWarningContext();
11531
11766
  }
11532
- if (isInPendingSuspense && --suspense.deps === 0) {
11767
+ };
11768
+ instance.asyncDep.catch((err) => {
11769
+ handleError(err, instance, 0, false, true);
11770
+ return () => null;
11771
+ }).then((asyncSetupResult) => {
11772
+ if (instance.isUnmounted || suspense.isUnmounted) {
11773
+ return;
11774
+ }
11775
+ const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
11776
+ unsetCurrentInstance();
11777
+ if (!instance.scope.active) {
11778
+ if (isPendingDep && --suspense.deps === 0) {
11779
+ suspense.resolve();
11780
+ }
11781
+ return;
11782
+ }
11783
+ if (!isPendingDep && suspense.pendingBranch) {
11784
+ const job = () => {
11785
+ if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
11786
+ return;
11787
+ }
11788
+ if (suspense.pendingBranch) {
11789
+ queueEffectWithSuspense(job, suspense);
11790
+ } else {
11791
+ render(asyncSetupResult);
11792
+ }
11793
+ };
11794
+ job.flags = 16 | 32;
11795
+ queueEffectWithSuspense(job, suspense);
11796
+ return;
11797
+ }
11798
+ render(asyncSetupResult);
11799
+ if (isPendingDep && --suspense.deps === 0) {
11533
11800
  suspense.resolve();
11534
11801
  }
11535
11802
  });
11536
11803
  },
11537
11804
  unmount(parentSuspense2, doRemove) {
11538
11805
  suspense.isUnmounted = true;
11806
+ clearTimeout(suspense.timeoutTimer);
11807
+ suspense.timeoutTimer = void 0;
11808
+ if (parentSuspenseId !== void 0) {
11809
+ const parent = suspense.parent;
11810
+ const pendingId = parentSuspenseId;
11811
+ parentSuspenseId = void 0;
11812
+ queuePostFlushCb(() => {
11813
+ if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
11814
+ parent.resolve();
11815
+ }
11816
+ });
11817
+ }
11539
11818
  if (suspense.activeBranch) {
11540
11819
  unmount(
11541
11820
  suspense.activeBranch,
@@ -11545,12 +11824,8 @@ If you want to remount the same app, move your app creation logic into a factory
11545
11824
  );
11546
11825
  }
11547
11826
  if (suspense.pendingBranch) {
11548
- unmount(
11549
- suspense.pendingBranch,
11550
- parentComponent,
11551
- parentSuspense2,
11552
- doRemove
11553
- );
11827
+ unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
11828
+ discardEffects(suspense);
11554
11829
  }
11555
11830
  }
11556
11831
  };
@@ -11620,6 +11895,16 @@ If you want to remount the same app, move your app creation logic into a factory
11620
11895
  }
11621
11896
  return s;
11622
11897
  }
11898
+ function discardEffects(suspense) {
11899
+ const { effects } = suspense;
11900
+ for (let i = 0; i < effects.length; i++) {
11901
+ const effect = effects[i];
11902
+ if (effect.flags & 16) {
11903
+ queuePostFlushCb(effect);
11904
+ }
11905
+ }
11906
+ effects.length = 0;
11907
+ }
11623
11908
  function queueEffectWithSuspense(fn, suspense) {
11624
11909
  if (suspense && suspense.pendingBranch) {
11625
11910
  if (isArray(fn)) {
@@ -11935,7 +12220,8 @@ Component that was made reactive: `,
11935
12220
  }
11936
12221
  function guardReactiveProps(props) {
11937
12222
  if (!props) return null;
11938
- return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
12223
+ if (isProxy(props)) return extend({}, props);
12224
+ return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
11939
12225
  }
11940
12226
  function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
11941
12227
  const { props, ref, patchFlag, children, transition } = vnode;
@@ -12117,8 +12403,11 @@ Component that was made reactive: `,
12117
12403
  ]);
12118
12404
  }
12119
12405
 
12120
- const emptyAppContext = createAppContext();
12406
+ const emptyAppContext = /* @__PURE__ */ createAppContext();
12121
12407
  let uid = 0;
12408
+ function getNextUid() {
12409
+ return uid;
12410
+ }
12122
12411
  function createComponentInstance(vnode, parent, suspense) {
12123
12412
  const type = vnode.type;
12124
12413
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12315,7 +12604,8 @@ Component that was made reactive: `,
12315
12604
  setInSSRSetupState(false);
12316
12605
  }
12317
12606
  }).catch((e) => {
12318
- handleError(e, instance, 0);
12607
+ handleError(e, instance, 0, void 0, true);
12608
+ instance.ssrRender = (_, push) => push("<!---->");
12319
12609
  });
12320
12610
  } else {
12321
12611
  instance.asyncDep = setupResult;
@@ -12433,11 +12723,12 @@ Component that was made reactive: `,
12433
12723
  }
12434
12724
  }
12435
12725
  }
12726
+ const rawAttrsKey = /* @__PURE__ */ Symbol();
12436
12727
  const attrsProxyHandlers = {
12437
12728
  get(target, key) {
12438
12729
  markAttrsAccessed();
12439
12730
  track(target, "get", "");
12440
- return target[key];
12731
+ return key === rawAttrsKey ? target : target[key];
12441
12732
  },
12442
12733
  set() {
12443
12734
  warn$1(`setupContext.attrs is readonly.`);
@@ -12789,7 +13080,7 @@ Component that was made reactive: `,
12789
13080
  return true;
12790
13081
  }
12791
13082
 
12792
- const version = "3.5.43";
13083
+ const version = "3.5.45";
12793
13084
  const warn = warn$1 ;
12794
13085
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12795
13086
  const devtools = devtools$1 ;
@@ -13390,7 +13681,9 @@ Component that was made reactive: `,
13390
13681
  }
13391
13682
  }
13392
13683
  if (vShowOriginalDisplay in el) {
13393
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13684
+ if (!isCssString || prev !== next) {
13685
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13686
+ }
13394
13687
  if (el[vShowHidden]) {
13395
13688
  style.display = "none";
13396
13689
  }
@@ -13916,7 +14209,9 @@ Expected function or array of functions, received type ${typeof value}.`
13916
14209
  "Custom element style injection is not supported when using shadowRoot: false"
13917
14210
  );
13918
14211
  }
13919
- this._mount(def);
14212
+ if (this._connected) {
14213
+ this._mount(def);
14214
+ }
13920
14215
  };
13921
14216
  const asyncDef = this._def.__asyncLoader;
13922
14217
  if (asyncDef) {
@@ -14274,6 +14569,7 @@ Expected function or array of functions, received type ${typeof value}.`
14274
14569
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14275
14570
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14276
14571
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14572
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14277
14573
  const decorate = (t) => {
14278
14574
  delete t.props.mode;
14279
14575
  {
@@ -14292,21 +14588,30 @@ Expected function or array of functions, received type ${typeof value}.`
14292
14588
  const state = useTransitionState();
14293
14589
  let prevChildren;
14294
14590
  let children;
14295
- onUpdated(() => {
14296
- if (!prevChildren.length) {
14297
- return;
14591
+ let origins;
14592
+ let moves;
14593
+ const willMove = () => {
14594
+ if (moves === void 0) {
14595
+ moves = prevChildren.length > 0 && hasCSSTransform(
14596
+ prevChildren[0].el,
14597
+ instance.vnode.el,
14598
+ resolveMoveClass(props)
14599
+ );
14298
14600
  }
14299
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14300
- if (!hasCSSTransform(
14301
- prevChildren[0].el,
14302
- instance.vnode.el,
14303
- moveClass
14304
- )) {
14601
+ return moves;
14602
+ };
14603
+ onUpdated(() => {
14604
+ pendingGroups.delete(instance);
14605
+ if (!willMove()) {
14305
14606
  prevChildren = [];
14607
+ origins = void 0;
14306
14608
  return;
14307
14609
  }
14610
+ const moveClass = resolveMoveClass(props);
14308
14611
  prevChildren.forEach(callPendingCbs);
14309
- prevChildren.forEach(recordPosition);
14612
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14613
+ origins = void 0;
14614
+ prevChildren.forEach((c) => recordPosition(c, shift));
14310
14615
  const movedChildren = prevChildren.filter(applyTranslation);
14311
14616
  forceReflow(instance.vnode.el);
14312
14617
  movedChildren.forEach((c) => {
@@ -14339,6 +14644,7 @@ Expected function or array of functions, received type ${typeof value}.`
14339
14644
  tag = "span";
14340
14645
  }
14341
14646
  prevChildren = [];
14647
+ moves = void 0;
14342
14648
  if (children) {
14343
14649
  for (let i = 0; i < children.length; i++) {
14344
14650
  const child = children[i];
@@ -14370,6 +14676,10 @@ Expected function or array of functions, received type ${typeof value}.`
14370
14676
  warn(`<TransitionGroup> children must be keyed.`);
14371
14677
  }
14372
14678
  }
14679
+ if (prevChildren.length) {
14680
+ origins = getOrigins(instance);
14681
+ pendingGroups.set(instance, willMove);
14682
+ }
14373
14683
  return createVNode(tag, null, children);
14374
14684
  };
14375
14685
  }
@@ -14384,8 +14694,11 @@ Expected function or array of functions, received type ${typeof value}.`
14384
14694
  el[enterCbKey]();
14385
14695
  }
14386
14696
  }
14387
- function recordPosition(c) {
14388
- newPositionMap.set(c, getPosition(c.el));
14697
+ function resolveMoveClass(props) {
14698
+ return props.moveClass || `${props.name || "v"}-move`;
14699
+ }
14700
+ function recordPosition(c, shift) {
14701
+ newPositionMap.set(c, getPosition(c.el, shift));
14389
14702
  }
14390
14703
  function applyTranslation(c) {
14391
14704
  const oldPos = positionMap.get(c);
@@ -14409,13 +14722,41 @@ Expected function or array of functions, received type ${typeof value}.`
14409
14722
  return c;
14410
14723
  }
14411
14724
  }
14412
- function getPosition(el) {
14725
+ function getPosition(el, shift) {
14413
14726
  const rect = el.getBoundingClientRect();
14414
14727
  return {
14415
- left: rect.left,
14416
- top: rect.top
14728
+ left: rect.left - (shift ? shift.left : 0),
14729
+ top: rect.top - (shift ? shift.top : 0)
14417
14730
  };
14418
14731
  }
14732
+ function getOrigins(instance) {
14733
+ let origins;
14734
+ for (let group = instance.parent; group; group = group.parent) {
14735
+ const willMove = pendingGroups.get(group);
14736
+ if (willMove) {
14737
+ const item = findItem(group.vnode.el, instance.vnode.el);
14738
+ if (item) {
14739
+ (origins || (origins = [])).push(
14740
+ extend(getPosition(item), { item, willMove })
14741
+ );
14742
+ }
14743
+ }
14744
+ }
14745
+ return origins;
14746
+ }
14747
+ function findItem(root, node) {
14748
+ const container = root.nodeType === 1 ? root : root.parentNode;
14749
+ while (node && node.parentNode !== container) {
14750
+ node = node.parentNode;
14751
+ }
14752
+ if (node && node.nodeType === 1) {
14753
+ return node;
14754
+ }
14755
+ }
14756
+ function getOriginShift(origins, root) {
14757
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14758
+ return origin && getPosition(origin.item, origin);
14759
+ }
14419
14760
  function hasCSSTransform(el, root, moveClass) {
14420
14761
  const clone = el.cloneNode();
14421
14762
  const _vtc = el[vtcKey];
@@ -14610,18 +14951,18 @@ Expected function or array of functions, received type ${typeof value}.`
14610
14951
  },
14611
14952
  // set value in mounted & updated because <select> relies on its children
14612
14953
  // <option>s.
14613
- mounted(el, { value }) {
14614
- setSelected(el, value);
14954
+ mounted(el, { value, modifiers: { number } }) {
14955
+ setSelected(el, value, number);
14615
14956
  },
14616
14957
  beforeUpdate(el, { value }, vnode) {
14617
14958
  el._modelValue = value;
14618
14959
  el[assignKey] = getModelAssigner(vnode);
14619
14960
  },
14620
- updated(el, { value }) {
14961
+ updated(el, { value, modifiers: { number } }) {
14621
14962
  const pending = el._pendingValue;
14622
14963
  el._pendingValue = void 0;
14623
14964
  if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
14624
- setSelected(el, value);
14965
+ setSelected(el, value, number);
14625
14966
  }
14626
14967
  }
14627
14968
  };
@@ -14637,7 +14978,7 @@ Expected function or array of functions, received type ${typeof value}.`
14637
14978
  }
14638
14979
  return false;
14639
14980
  }
14640
- function setSelected(el, value) {
14981
+ function setSelected(el, value, number = false) {
14641
14982
  const isMultiple = el.multiple;
14642
14983
  const isArrayValue = isArray(value);
14643
14984
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -14658,7 +14999,7 @@ Expected function or array of functions, received type ${typeof value}.`
14658
14999
  option.selected = looseIndexOf(value, optionValue) > -1;
14659
15000
  }
14660
15001
  } else {
14661
- option.selected = value.has(optionValue);
15002
+ option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
14662
15003
  }
14663
15004
  } else if (looseEqual(getValue(option), value)) {
14664
15005
  if (el.selectedIndex !== i) el.selectedIndex = i;