@vue/compat 3.5.43 → 3.5.44

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.44
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -191,7 +191,7 @@ const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
191
191
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
192
192
  const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
193
193
 
194
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
194
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
195
195
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
196
196
  const isBooleanAttr = /* @__PURE__ */ makeMap(
197
197
  specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
@@ -1243,19 +1243,41 @@ const arrayInstrumentations = {
1243
1243
  };
1244
1244
  function iterator(self, method, wrapValue) {
1245
1245
  const arr = shallowReadArray(self);
1246
- const iter = arr[method]();
1246
+ const methodFn = arr[method];
1247
+ const iter = methodFn.call(arr);
1247
1248
  if (arr !== self && !isShallow(self)) {
1248
- iter._next = iter.next;
1249
- iter.next = () => {
1250
- const result = iter._next();
1251
- if (!result.done) {
1252
- result.value = wrapValue(result.value);
1249
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
1250
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
1251
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
1252
+ if (methodFn !== arrayProto[method]) {
1253
+ Object.defineProperties(wrapped, {
1254
+ return: {
1255
+ get() {
1256
+ const fn = iter.return;
1257
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1258
+ }
1259
+ },
1260
+ throw: {
1261
+ get() {
1262
+ const fn = iter.throw;
1263
+ return typeof fn === "function" ? fn.bind(iter) : fn;
1264
+ }
1265
+ }
1266
+ });
1253
1267
  }
1254
- return result;
1255
- };
1268
+ return wrapped;
1269
+ }
1270
+ iter._next = iter.next;
1271
+ iter.next = () => wrapResult(iter._next(), wrapValue);
1256
1272
  }
1257
1273
  return iter;
1258
1274
  }
1275
+ function wrapResult(result, wrapValue) {
1276
+ if (!result.done) {
1277
+ result.value = wrapValue(result.value);
1278
+ }
1279
+ return result;
1280
+ }
1259
1281
  const arrayProto = Array.prototype;
1260
1282
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1261
1283
  const arr = shallowReadArray(self);
@@ -1678,6 +1700,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
1678
1700
  return !isReadonly2;
1679
1701
  } else if (key === "__v_isReadonly") {
1680
1702
  return isReadonly2;
1703
+ } else if (key === "__v_isShallow") {
1704
+ return shallow;
1681
1705
  } else if (key === "__v_raw") {
1682
1706
  return target;
1683
1707
  }
@@ -2229,9 +2253,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2229
2253
  if (once && cb) {
2230
2254
  const _cb = cb;
2231
2255
  cb = (...args) => {
2232
- const res = _cb(...args);
2233
- watchHandle();
2234
- return res;
2256
+ try {
2257
+ return _cb(...args);
2258
+ } finally {
2259
+ watchHandle();
2260
+ }
2235
2261
  };
2236
2262
  }
2237
2263
  let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
@@ -2242,12 +2268,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2242
2268
  if (cb) {
2243
2269
  const newValue = effect.run();
2244
2270
  if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2245
- if (cleanup) {
2246
- cleanup();
2247
- }
2248
2271
  const currentWatcher = activeWatcher;
2249
- activeWatcher = effect;
2272
+ pauseTracking();
2250
2273
  try {
2274
+ if (cleanup) {
2275
+ cleanup();
2276
+ }
2277
+ activeWatcher = effect;
2251
2278
  const args = [
2252
2279
  newValue,
2253
2280
  // pass undefined as the old value when it's changed for the first time
@@ -2261,6 +2288,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
2261
2288
  );
2262
2289
  } finally {
2263
2290
  activeWatcher = currentWatcher;
2291
+ resetTracking();
2264
2292
  }
2265
2293
  }
2266
2294
  } else {
@@ -2666,21 +2694,21 @@ function queuePostFlushCb(cb) {
2666
2694
  }
2667
2695
  queueFlush();
2668
2696
  }
2669
- function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2697
+ function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
2670
2698
  if (!!(process.env.NODE_ENV !== "production")) {
2671
2699
  seen = seen || /* @__PURE__ */ new Map();
2672
2700
  }
2673
2701
  for (; i < queue.length; i++) {
2674
2702
  const cb = queue[i];
2675
2703
  if (cb && cb.flags & 2) {
2676
- if (instance && cb.id !== instance.uid) {
2704
+ if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
2677
2705
  continue;
2678
2706
  }
2679
2707
  if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
2680
2708
  continue;
2681
2709
  }
2682
2710
  queue.splice(i, 1);
2683
- i--;
2711
+ i = instance ? i - 1 : flushIndex;
2684
2712
  if (cb.flags & 4) {
2685
2713
  cb.flags &= -2;
2686
2714
  }
@@ -2691,12 +2719,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
2691
2719
  }
2692
2720
  }
2693
2721
  }
2694
- function flushPostFlushCbs(seen) {
2722
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2695
2723
  if (pendingPostFlushCbs.length) {
2696
- const deduped = [...new Set(pendingPostFlushCbs)].sort(
2697
- (a, b) => getId(a) - getId(b)
2698
- );
2699
- pendingPostFlushCbs.length = 0;
2724
+ let cbs = pendingPostFlushCbs;
2725
+ let kept = 0;
2726
+ if (skip) {
2727
+ cbs = [];
2728
+ for (let i = 0; i < pendingPostFlushCbs.length; i++) {
2729
+ const cb = pendingPostFlushCbs[i];
2730
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
2731
+ pendingPostFlushCbs[kept++] = cb;
2732
+ } else {
2733
+ cbs.push(cb);
2734
+ }
2735
+ }
2736
+ }
2737
+ const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
2738
+ pendingPostFlushCbs.length = kept;
2700
2739
  if (activePostFlushCbs) {
2701
2740
  for (let i = 0; i < deduped.length; i++) {
2702
2741
  activePostFlushCbs.push(deduped[i]);
@@ -2722,6 +2761,22 @@ function flushPostFlushCbs(seen) {
2722
2761
  postFlushIndex = 0;
2723
2762
  }
2724
2763
  }
2764
+ let isFlushing = false;
2765
+ function flushOnAppMount(fn, minUid) {
2766
+ if (isFlushing) {
2767
+ fn();
2768
+ return;
2769
+ }
2770
+ const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
2771
+ fn();
2772
+ isFlushing = true;
2773
+ try {
2774
+ flushPreFlushCbs(void 0, minUid);
2775
+ flushPostFlushCbs(void 0, queued, minUid);
2776
+ } finally {
2777
+ isFlushing = false;
2778
+ }
2779
+ }
2725
2780
  const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
2726
2781
  function flushJobs(seen) {
2727
2782
  if (!!(process.env.NODE_ENV !== "production")) {
@@ -3695,6 +3750,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
3695
3750
  let isPre = false;
3696
3751
  if (flush === "post") {
3697
3752
  baseWatchOptions.scheduler = (job) => {
3753
+ job.i = instance;
3698
3754
  queuePostRenderEffect(job, instance && instance.suspense);
3699
3755
  };
3700
3756
  } else if (flush !== "sync") {
@@ -3996,7 +4052,11 @@ const TeleportImpl = {
3996
4052
  };
3997
4053
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
3998
4054
  if (moveType === 0) {
4055
+ if (vnode.targetStart) {
4056
+ insert(vnode.targetStart, container, parentAnchor);
4057
+ }
3999
4058
  insert(vnode.targetAnchor, container, parentAnchor);
4059
+ parentAnchor = vnode.targetAnchor;
4000
4060
  }
4001
4061
  const { el, anchor, shapeFlag, children, props } = vnode;
4002
4062
  const isReorder = moveType === 2;
@@ -4165,10 +4225,6 @@ const BaseTransitionPropsValidators = {
4165
4225
  onAfterAppear: TransitionHookValidator,
4166
4226
  onAppearCancelled: TransitionHookValidator
4167
4227
  };
4168
- const recursiveGetSubtree = (instance) => {
4169
- const subTree = instance.subTree;
4170
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
4171
- };
4172
4228
  const BaseTransitionImpl = {
4173
4229
  name: `BaseTransition`,
4174
4230
  props: BaseTransitionPropsValidators,
@@ -4209,7 +4265,7 @@ const BaseTransitionImpl = {
4209
4265
  setTransitionHooks(innerChild, enterHooks);
4210
4266
  }
4211
4267
  let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
4212
- if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
4268
+ if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
4213
4269
  let leavingHooks = resolveTransitionHooks(
4214
4270
  oldInnerChild,
4215
4271
  rawProps,
@@ -4346,8 +4402,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
4346
4402
  );
4347
4403
  }
4348
4404
  const leavingVNode = leavingVNodesCache[key];
4349
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {
4350
- leavingVNode.el[leaveCbKey]();
4405
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
4406
+ let leavingCb = leavingVNode.el[leaveCbKey];
4407
+ if (!leavingCb) {
4408
+ const leavingRoot = getTransitionRoot(leavingVNode);
4409
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
4410
+ }
4411
+ if (leavingCb) {
4412
+ leavingCb();
4413
+ }
4351
4414
  }
4352
4415
  callHook(hook, [el]);
4353
4416
  },
@@ -4475,6 +4538,12 @@ function setTransitionHooks(vnode, hooks) {
4475
4538
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4476
4539
  } else {
4477
4540
  vnode.transition = hooks;
4541
+ if (vnode.type === Fragment && isArray(vnode.children)) {
4542
+ const child = filterSingleRoot(vnode.children, false);
4543
+ if (child) {
4544
+ setTransitionHooks(child, hooks);
4545
+ }
4546
+ }
4478
4547
  }
4479
4548
  }
4480
4549
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -4499,6 +4568,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
4499
4568
  }
4500
4569
  return ret;
4501
4570
  }
4571
+ function getTransitionRoot(vnode) {
4572
+ if (vnode.component) {
4573
+ return getTransitionRoot(vnode.component.subTree);
4574
+ }
4575
+ if (vnode.type === Fragment) {
4576
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4577
+ return child ? getTransitionRoot(child) : void 0;
4578
+ }
4579
+ if (vnode.type !== Comment) {
4580
+ return vnode;
4581
+ }
4582
+ }
4502
4583
 
4503
4584
  // @__NO_SIDE_EFFECTS__
4504
4585
  function defineComponent(options, extraOptions) {
@@ -5416,14 +5497,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
5416
5497
  break;
5417
5498
  }
5418
5499
  }, opts);
5419
- forEach((el) => {
5420
- if (!(el instanceof Element)) return;
5500
+ const observe = (el) => {
5421
5501
  if (elementIsVisibleInViewport(el)) {
5422
5502
  hydrate();
5423
5503
  ob.disconnect();
5424
5504
  return false;
5425
5505
  }
5506
+ if (getComputedStyle(el).display === "contents") {
5507
+ for (let i = 0; i < el.children.length; i++) {
5508
+ if (observe(el.children[i]) === false) return false;
5509
+ }
5510
+ }
5426
5511
  ob.observe(el);
5512
+ };
5513
+ forEach((el) => {
5514
+ if (!(el instanceof Element)) return;
5515
+ return observe(el);
5427
5516
  });
5428
5517
  return () => ob.disconnect();
5429
5518
  };
@@ -5780,6 +5869,7 @@ const KeepAliveImpl = {
5780
5869
  unmount(cached);
5781
5870
  } else if (current) {
5782
5871
  resetShapeFlag(current);
5872
+ if (cached) resetShapeFlag(cached);
5783
5873
  }
5784
5874
  cache.delete(key);
5785
5875
  keys.delete(key);
@@ -6361,10 +6451,12 @@ function renderList(source, renderItem, cache, index) {
6361
6451
  );
6362
6452
  }
6363
6453
  } else if (typeof source === "number") {
6364
- if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
6365
- warn$1(
6366
- `The v-for range expects a positive integer value but got ${source}.`
6367
- );
6454
+ if (!Number.isInteger(source) || source < 0) {
6455
+ if (!!(process.env.NODE_ENV !== "production")) {
6456
+ warn$1(
6457
+ `The v-for range expects a positive integer value but got ${source}.`
6458
+ );
6459
+ }
6368
6460
  ret = [];
6369
6461
  } else {
6370
6462
  ret = new Array(source);
@@ -6683,6 +6775,7 @@ function installCompatInstanceProperties(map) {
6683
6775
  $vnode: (i) => i.vnode,
6684
6776
  // some private properties that are likely accessed...
6685
6777
  _self: (i) => i.proxy,
6778
+ _setupProxy: (i) => i.setupState,
6686
6779
  _uid: (i) => i.uid,
6687
6780
  _data: (i) => i.data,
6688
6781
  _isMounted: (i) => i.isMounted,
@@ -7672,7 +7765,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7672
7765
  return vm;
7673
7766
  }
7674
7767
  }
7675
- Vue.version = `2.6.14-compat:${"3.5.43"}`;
7768
+ Vue.version = `2.6.14-compat:${"3.5.44"}`;
7676
7769
  Vue.config = singletonApp.config;
7677
7770
  Vue.use = (plugin, ...options) => {
7678
7771
  if (plugin && isFunction(plugin.install)) {
@@ -8831,7 +8924,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
8831
8924
  }
8832
8925
  for (let i = 0; i < nextKeys.length; i++) {
8833
8926
  const key = nextKeys[i];
8834
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8927
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
8835
8928
  return true;
8836
8929
  }
8837
8930
  }
@@ -9969,15 +10062,16 @@ function baseCreateRenderer(options, createHydrationFns) {
9969
10062
  for (let i = 0; i < newChildren.length; i++) {
9970
10063
  const oldVNode = oldChildren[i];
9971
10064
  const newVNode = newChildren[i];
10065
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
9972
10066
  const container = (
9973
10067
  // oldVNode may be an errored async setup() component inside Suspense
9974
10068
  // which will not have a mounted element
9975
- oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent
10069
+ oldEl && // - In the case of a Fragment, we need to provide the actual parent
9976
10070
  // of the Fragment itself so it can move its children.
9977
10071
  (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
9978
10072
  // which also requires the correct parent container
9979
10073
  !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
9980
- oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (
10074
+ oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
9981
10075
  // In other cases, the parent container is not actually used so we
9982
10076
  // just pass the block element here to avoid a DOM parentNode call.
9983
10077
  fallbackContainer
@@ -10153,7 +10247,12 @@ function baseCreateRenderer(options, createHydrationFns) {
10153
10247
  }
10154
10248
  if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
10155
10249
  if (instance.asyncDep) {
10156
- parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
10250
+ parentSuspense && parentSuspense.registerDep(
10251
+ instance,
10252
+ setupRenderEffect,
10253
+ optimized,
10254
+ namespace
10255
+ );
10157
10256
  if (!initialVNode.el) {
10158
10257
  const placeholder = instance.subTree = createVNode(Comment);
10159
10258
  processCommentNode(null, placeholder, container, anchor);
@@ -10183,6 +10282,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10183
10282
  pushWarningContext(n2);
10184
10283
  }
10185
10284
  n2.el = n1.el;
10285
+ n2.placeholder = n1.placeholder;
10186
10286
  updateComponentPreRender(instance, n2, optimized);
10187
10287
  if (!!(process.env.NODE_ENV !== "production")) {
10188
10288
  popWarningContext();
@@ -10194,6 +10294,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10194
10294
  }
10195
10295
  } else {
10196
10296
  n2.el = n1.el;
10297
+ n2.placeholder = n1.placeholder;
10197
10298
  instance.vnode = n2;
10198
10299
  }
10199
10300
  };
@@ -10871,18 +10972,9 @@ function baseCreateRenderer(options, createHydrationFns) {
10871
10972
  };
10872
10973
  const remove = (vnode) => {
10873
10974
  const { type, el, anchor, transition } = vnode;
10874
- if (type === Fragment) {
10875
- if (!!(process.env.NODE_ENV !== "production") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {
10876
- vnode.children.forEach((child) => {
10877
- if (child.type === Comment) {
10878
- hostRemove(child.el);
10879
- } else {
10880
- remove(child);
10881
- }
10882
- });
10883
- } else {
10884
- removeFragment(el, anchor);
10885
- }
10975
+ const isFragment = type === Fragment;
10976
+ if (isFragment && !transition) {
10977
+ removeFragment(el, anchor);
10886
10978
  return;
10887
10979
  }
10888
10980
  if (type === Static) {
@@ -10892,17 +10984,25 @@ function baseCreateRenderer(options, createHydrationFns) {
10892
10984
  }
10893
10985
  return;
10894
10986
  }
10987
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
10895
10988
  const performRemove = () => {
10896
- hostRemove(el);
10989
+ if (isFragment) {
10990
+ if (hostParentNode(el)) {
10991
+ removeFragment(el, anchor);
10992
+ }
10993
+ } else {
10994
+ hostRemove(el);
10995
+ }
10897
10996
  if (transition && !transition.persisted && transition.afterLeave) {
10898
10997
  transition.afterLeave();
10899
10998
  }
10900
10999
  };
10901
- if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
11000
+ if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
10902
11001
  const { leave, delayLeave } = transition;
10903
- const performLeave = () => leave(el, performRemove);
11002
+ const leavingEl = leavingNode.el;
11003
+ const performLeave = () => leave(leavingEl, performRemove);
10904
11004
  if (delayLeave) {
10905
- delayLeave(vnode.el, performRemove, performLeave);
11005
+ delayLeave(leavingEl, performRemove, performLeave);
10906
11006
  } else {
10907
11007
  performLeave();
10908
11008
  }
@@ -10972,32 +11072,26 @@ function baseCreateRenderer(options, createHydrationFns) {
10972
11072
  const teleportEnd = el && el[TeleportEndKey];
10973
11073
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
10974
11074
  };
10975
- let isFlushing = false;
10976
11075
  const render = (vnode, container, namespace) => {
10977
- let instance;
10978
- if (vnode == null) {
10979
- if (container._vnode) {
10980
- unmount(container._vnode, null, null, true);
10981
- instance = container._vnode.component;
11076
+ const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
11077
+ flushOnAppMount(() => {
11078
+ if (vnode == null) {
11079
+ if (container._vnode) {
11080
+ unmount(container._vnode, null, null, true);
11081
+ }
11082
+ } else {
11083
+ patch(
11084
+ container._vnode || null,
11085
+ vnode,
11086
+ container,
11087
+ null,
11088
+ null,
11089
+ null,
11090
+ namespace
11091
+ );
10982
11092
  }
10983
- } else {
10984
- patch(
10985
- container._vnode || null,
10986
- vnode,
10987
- container,
10988
- null,
10989
- null,
10990
- null,
10991
- namespace
10992
- );
10993
- }
10994
- container._vnode = vnode;
10995
- if (!isFlushing) {
10996
- isFlushing = true;
10997
- flushPreFlushCbs(instance);
10998
- flushPostFlushCbs();
10999
- isFlushing = false;
11000
- }
11093
+ container._vnode = vnode;
11094
+ }, minUid);
11001
11095
  };
11002
11096
  const internals = {
11003
11097
  p: patch,
@@ -11585,7 +11679,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11585
11679
  next() {
11586
11680
  return suspense.activeBranch && next(suspense.activeBranch);
11587
11681
  },
11588
- registerDep(instance, setupRenderEffect, optimized2) {
11682
+ // `namespace` intentionally shadows the boundary's own: the dep must be
11683
+ // mounted with the namespace of the position it was rendered at, which can
11684
+ // differ from the boundary's (e.g. a component nested inside an <svg>).
11685
+ registerDep(instance, setupRenderEffect, optimized2, namespace2) {
11589
11686
  const isInPendingSuspense = !!suspense.pendingBranch;
11590
11687
  if (isInPendingSuspense) {
11591
11688
  suspense.deps++;
@@ -11598,7 +11695,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11598
11695
  return;
11599
11696
  }
11600
11697
  unsetCurrentInstance();
11601
- if (hydratedEl && !instance.scope.active) {
11698
+ if (!instance.scope.active) {
11602
11699
  if (isInPendingSuspense && --suspense.deps === 0) {
11603
11700
  suspense.resolve();
11604
11701
  }
@@ -11625,7 +11722,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
11625
11722
  // consider the comment placeholder case.
11626
11723
  hydratedEl ? null : next(instance.subTree),
11627
11724
  suspense,
11628
- namespace,
11725
+ namespace2,
11629
11726
  optimized2
11630
11727
  );
11631
11728
  if (placeholder) {
@@ -12226,6 +12323,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
12226
12323
 
12227
12324
  const emptyAppContext = createAppContext();
12228
12325
  let uid = 0;
12326
+ function getNextUid() {
12327
+ return uid;
12328
+ }
12229
12329
  function createComponentInstance(vnode, parent, suspense) {
12230
12330
  const type = vnode.type;
12231
12331
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -12924,7 +13024,7 @@ function isMemoSame(cached, memo) {
12924
13024
  return true;
12925
13025
  }
12926
13026
 
12927
- const version = "3.5.43";
13027
+ const version = "3.5.44";
12928
13028
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
12929
13029
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12930
13030
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -13544,7 +13644,9 @@ function patchStyle(el, prev, next) {
13544
13644
  }
13545
13645
  }
13546
13646
  if (vShowOriginalDisplay in el) {
13547
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13647
+ if (!isCssString || prev !== next) {
13648
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
13649
+ }
13548
13650
  if (el[vShowHidden]) {
13549
13651
  style.display = "none";
13550
13652
  }
@@ -14070,7 +14172,9 @@ class VueElement extends BaseClass {
14070
14172
  "Custom element style injection is not supported when using shadowRoot: false"
14071
14173
  );
14072
14174
  }
14073
- this._mount(def);
14175
+ if (this._connected) {
14176
+ this._mount(def);
14177
+ }
14074
14178
  };
14075
14179
  const asyncDef = this._def.__asyncLoader;
14076
14180
  if (asyncDef) {
@@ -14440,6 +14544,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
14440
14544
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14441
14545
  const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14442
14546
  const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14547
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
14443
14548
  const decorate = (t) => {
14444
14549
  delete t.props.mode;
14445
14550
  {
@@ -14458,21 +14563,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14458
14563
  const state = useTransitionState();
14459
14564
  let prevChildren;
14460
14565
  let children;
14461
- onUpdated(() => {
14462
- if (!prevChildren.length) {
14463
- return;
14566
+ let origins;
14567
+ let moves;
14568
+ const willMove = () => {
14569
+ if (moves === void 0) {
14570
+ moves = prevChildren.length > 0 && hasCSSTransform(
14571
+ prevChildren[0].el,
14572
+ instance.vnode.el,
14573
+ resolveMoveClass(props)
14574
+ );
14464
14575
  }
14465
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
14466
- if (!hasCSSTransform(
14467
- prevChildren[0].el,
14468
- instance.vnode.el,
14469
- moveClass
14470
- )) {
14576
+ return moves;
14577
+ };
14578
+ onUpdated(() => {
14579
+ pendingGroups.delete(instance);
14580
+ if (!willMove()) {
14471
14581
  prevChildren = [];
14582
+ origins = void 0;
14472
14583
  return;
14473
14584
  }
14585
+ const moveClass = resolveMoveClass(props);
14474
14586
  prevChildren.forEach(callPendingCbs);
14475
- prevChildren.forEach(recordPosition);
14587
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
14588
+ origins = void 0;
14589
+ prevChildren.forEach((c) => recordPosition(c, shift));
14476
14590
  const movedChildren = prevChildren.filter(applyTranslation);
14477
14591
  forceReflow(instance.vnode.el);
14478
14592
  movedChildren.forEach((c) => {
@@ -14505,6 +14619,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14505
14619
  tag = "span";
14506
14620
  }
14507
14621
  prevChildren = [];
14622
+ moves = void 0;
14508
14623
  if (children) {
14509
14624
  for (let i = 0; i < children.length; i++) {
14510
14625
  const child = children[i];
@@ -14536,6 +14651,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
14536
14651
  warn(`<TransitionGroup> children must be keyed.`);
14537
14652
  }
14538
14653
  }
14654
+ if (prevChildren.length) {
14655
+ origins = getOrigins(instance);
14656
+ pendingGroups.set(instance, willMove);
14657
+ }
14539
14658
  return createVNode(tag, null, children);
14540
14659
  };
14541
14660
  }
@@ -14550,8 +14669,11 @@ function callPendingCbs(c) {
14550
14669
  el[enterCbKey]();
14551
14670
  }
14552
14671
  }
14553
- function recordPosition(c) {
14554
- newPositionMap.set(c, getPosition(c.el));
14672
+ function resolveMoveClass(props) {
14673
+ return props.moveClass || `${props.name || "v"}-move`;
14674
+ }
14675
+ function recordPosition(c, shift) {
14676
+ newPositionMap.set(c, getPosition(c.el, shift));
14555
14677
  }
14556
14678
  function applyTranslation(c) {
14557
14679
  const oldPos = positionMap.get(c);
@@ -14575,13 +14697,41 @@ function applyTranslation(c) {
14575
14697
  return c;
14576
14698
  }
14577
14699
  }
14578
- function getPosition(el) {
14700
+ function getPosition(el, shift) {
14579
14701
  const rect = el.getBoundingClientRect();
14580
14702
  return {
14581
- left: rect.left,
14582
- top: rect.top
14703
+ left: rect.left - (shift ? shift.left : 0),
14704
+ top: rect.top - (shift ? shift.top : 0)
14583
14705
  };
14584
14706
  }
14707
+ function getOrigins(instance) {
14708
+ let origins;
14709
+ for (let group = instance.parent; group; group = group.parent) {
14710
+ const willMove = pendingGroups.get(group);
14711
+ if (willMove) {
14712
+ const item = findItem(group.vnode.el, instance.vnode.el);
14713
+ if (item) {
14714
+ (origins || (origins = [])).push(
14715
+ extend(getPosition(item), { item, willMove })
14716
+ );
14717
+ }
14718
+ }
14719
+ }
14720
+ return origins;
14721
+ }
14722
+ function findItem(root, node) {
14723
+ const container = root.nodeType === 1 ? root : root.parentNode;
14724
+ while (node && node.parentNode !== container) {
14725
+ node = node.parentNode;
14726
+ }
14727
+ if (node && node.nodeType === 1) {
14728
+ return node;
14729
+ }
14730
+ }
14731
+ function getOriginShift(origins, root) {
14732
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
14733
+ return origin && getPosition(origin.item, origin);
14734
+ }
14585
14735
  function hasCSSTransform(el, root, moveClass) {
14586
14736
  const clone = el.cloneNode();
14587
14737
  const _vtc = el[vtcKey];