@vue/runtime-core 3.6.0-rc.4 → 3.6.0-rc.6

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/runtime-core v3.6.0-rc.4
2
+ * @vue/runtime-core v3.6.0-rc.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -153,7 +153,7 @@ let currentFlushPromise = null;
153
153
  let jobsLength = 0;
154
154
  let flushIndex = 0;
155
155
  let postFlushIndex = 0;
156
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
156
+ const resolvedPromise = /*@__PURE__*/ Promise.resolve();
157
157
  function nextTick(fn) {
158
158
  const p = currentFlushPromise || resolvedPromise;
159
159
  return fn ? p.then(this ? fn.bind(this) : fn) : p;
@@ -191,6 +191,7 @@ const doFlushJobs = () => {
191
191
  flushJobs();
192
192
  } catch (e) {
193
193
  currentFlushPromise = null;
194
+ if (jobsLength || postJobs.length) queueFlush();
194
195
  throw e;
195
196
  }
196
197
  };
@@ -198,9 +199,10 @@ function queueFlush() {
198
199
  if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
199
200
  }
200
201
  function queuePostFlushCb(jobs, id = Infinity) {
201
- if (!(0, _vue_shared.isArray)(jobs)) if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
202
- else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
203
- else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
202
+ if (!(0, _vue_shared.isArray)(jobs)) {
203
+ if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
204
+ else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
205
+ } else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
204
206
  queueFlush();
205
207
  }
206
208
  function flushPreFlushCbs(instance, seen) {
@@ -212,8 +214,11 @@ function flushPreFlushCbs(instance, seen) {
212
214
  i--;
213
215
  jobsLength--;
214
216
  if (cb.flags & 2) cb.flags &= -2;
215
- cb();
216
- if (!(cb.flags & 2)) cb.flags &= -2;
217
+ try {
218
+ cb();
219
+ } finally {
220
+ if (!(cb.flags & 2)) cb.flags &= -2;
221
+ }
217
222
  }
218
223
  }
219
224
  function flushPostFlushCbs(seen) {
@@ -225,17 +230,21 @@ function flushPostFlushCbs(seen) {
225
230
  }
226
231
  activePostJobs = postJobs;
227
232
  postJobs = [];
228
- while (postFlushIndex < activePostJobs.length) {
229
- const cb = activePostJobs[postFlushIndex++];
230
- if (cb.flags & 2) cb.flags &= -2;
231
- if (!(cb.flags & 4)) try {
232
- cb();
233
- } finally {
234
- cb.flags &= -2;
233
+ try {
234
+ while (postFlushIndex < activePostJobs.length) {
235
+ const cb = activePostJobs[postFlushIndex++];
236
+ if (cb.flags & 2) cb.flags &= -2;
237
+ if (!(cb.flags & 4)) try {
238
+ cb();
239
+ } finally {
240
+ if (!(cb.flags & 2)) cb.flags &= -2;
241
+ }
235
242
  }
243
+ } finally {
244
+ while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
245
+ activePostJobs = null;
246
+ postFlushIndex = 0;
236
247
  }
237
- activePostJobs = null;
238
- postFlushIndex = 0;
239
248
  }
240
249
  }
241
250
  let isFlushing = false;
@@ -245,9 +254,12 @@ let isFlushing = false;
245
254
  function flushOnAppMount(instance) {
246
255
  if (!isFlushing) {
247
256
  isFlushing = true;
248
- flushPreFlushCbs(instance);
249
- flushPostFlushCbs();
250
- isFlushing = false;
257
+ try {
258
+ flushPreFlushCbs(instance);
259
+ flushPostFlushCbs();
260
+ } finally {
261
+ isFlushing = false;
262
+ }
251
263
  }
252
264
  }
253
265
  function flushJobs(seen) {
@@ -275,8 +287,8 @@ function flushJobs(seen) {
275
287
  jobsLength = 0;
276
288
  jobs.length = 0;
277
289
  flushPostFlushCbs(seen);
278
- currentFlushPromise = null;
279
290
  if (jobsLength || postJobs.length) flushJobs(seen);
291
+ else currentFlushPromise = null;
280
292
  }
281
293
  }
282
294
  //#endregion
@@ -537,9 +549,10 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
537
549
  const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
538
550
  const resolveTarget = (props, select) => {
539
551
  const targetSelector = props && props.to;
540
- if ((0, _vue_shared.isString)(targetSelector)) if (!select) return null;
541
- else return select(targetSelector);
542
- else return targetSelector;
552
+ if ((0, _vue_shared.isString)(targetSelector)) {
553
+ if (!select) return null;
554
+ else return select(targetSelector);
555
+ } else return targetSelector;
543
556
  };
544
557
  const TeleportImpl = {
545
558
  name: "Teleport",
@@ -570,7 +583,8 @@ const TeleportImpl = {
570
583
  if (pendingMounts.get(vnode) !== mountJob) return;
571
584
  pendingMounts.delete(vnode);
572
585
  if (isTeleportDisabled(vnode.props)) {
573
- mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
586
+ const mountContainer = parentNode(vnode.el) || container;
587
+ mount(vnode, mountContainer, vnode.anchor);
574
588
  updateCssVars(vnode, true);
575
589
  }
576
590
  mountToTarget(vnode);
@@ -679,15 +693,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
679
693
  const disabled = isTeleportDisabled(vnode.props);
680
694
  if (target) {
681
695
  const targetNode = target._lpa || target.firstChild;
682
- if (vnode.shapeFlag & 16) if (disabled) {
683
- hydrateDisabledTeleport(node, vnode);
684
- hydrateAnchor(target, targetNode);
685
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
686
- } else {
687
- vnode.anchor = nextSibling(node);
688
- hydrateAnchor(target, targetNode);
689
- if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
690
- hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
696
+ if (vnode.shapeFlag & 16) {
697
+ if (disabled) {
698
+ hydrateDisabledTeleport(node, vnode);
699
+ hydrateAnchor(target, targetNode);
700
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
701
+ } else {
702
+ vnode.anchor = nextSibling(node);
703
+ hydrateAnchor(target, targetNode);
704
+ if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
705
+ hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
706
+ }
691
707
  }
692
708
  updateCssVars(vnode, disabled);
693
709
  } else if (disabled) {
@@ -847,8 +863,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
847
863
  persisted,
848
864
  beforeEnter(el) {
849
865
  let hook = onBeforeEnter;
850
- if (!state.isMounted) if (appear) hook = onBeforeAppear || onBeforeEnter;
851
- else return;
866
+ if (!state.isMounted) {
867
+ if (appear) hook = onBeforeAppear || onBeforeEnter;
868
+ else return;
869
+ }
852
870
  if (el[leaveCbKey]) el[leaveCbKey](true);
853
871
  earlyRemove();
854
872
  callHook(hook, [el]);
@@ -858,11 +876,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
858
876
  let hook = onEnter;
859
877
  let afterHook = onAfterEnter;
860
878
  let cancelHook = onEnterCancelled;
861
- if (!state.isMounted) if (appear) {
862
- hook = onAppear || onEnter;
863
- afterHook = onAfterAppear || onAfterEnter;
864
- cancelHook = onAppearCancelled || onEnterCancelled;
865
- } else return;
879
+ if (!state.isMounted) {
880
+ if (appear) {
881
+ hook = onAppear || onEnter;
882
+ afterHook = onAfterAppear || onAfterEnter;
883
+ cancelHook = onAppearCancelled || onEnterCancelled;
884
+ } else return;
885
+ }
866
886
  let called = false;
867
887
  el[enterCbKey] = (cancelled) => {
868
888
  if (called) return;
@@ -1022,9 +1042,9 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1022
1042
  }
1023
1043
  //#endregion
1024
1044
  //#region packages/runtime-core/src/apiDefineComponent.ts
1025
- /* @__NO_SIDE_EFFECTS__ */
1045
+ /*@__NO_SIDE_EFFECTS__*/
1026
1046
  function defineComponent(options, extraOptions) {
1027
- return (0, _vue_shared.isFunction)(options) ? (0, _vue_shared.extend)({ name: options.name }, extraOptions, { setup: options }) : options;
1047
+ return (0, _vue_shared.isFunction)(options) ? /*@__PURE__*/ (() => (0, _vue_shared.extend)({ name: options.name }, extraOptions, { setup: options }))() : options;
1028
1048
  }
1029
1049
  //#endregion
1030
1050
  //#region packages/runtime-core/src/helpers/useId.ts
@@ -1111,15 +1131,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1111
1131
  if (rawRef.f) {
1112
1132
  const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
1113
1133
  if (isUnmount) (0, _vue_shared.isArray)(existing) && (0, _vue_shared.remove)(existing, refValue);
1114
- else if (!(0, _vue_shared.isArray)(existing)) if (_isString) {
1115
- refs[ref] = [refValue];
1116
- if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
1117
- } else {
1118
- const newVal = [refValue];
1119
- if (canSetRef(ref, rawRef.k)) ref.value = newVal;
1120
- if (rawRef.k) refs[rawRef.k] = newVal;
1121
- }
1122
- else if (!existing.includes(refValue)) existing.push(refValue);
1134
+ else if (!(0, _vue_shared.isArray)(existing)) {
1135
+ if (_isString) {
1136
+ refs[ref] = [refValue];
1137
+ if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
1138
+ } else {
1139
+ const newVal = [refValue];
1140
+ if (canSetRef(ref, rawRef.k)) ref.value = newVal;
1141
+ if (rawRef.k) refs[rawRef.k] = newVal;
1142
+ }
1143
+ } else if (!existing.includes(refValue)) existing.push(refValue);
1123
1144
  } else if (_isString) {
1124
1145
  refs[ref] = value;
1125
1146
  if (canSetSetupRef(ref)) setupState[ref] = value;
@@ -1169,7 +1190,18 @@ const logMismatchError = () => {
1169
1190
  hasLoggedMismatchError = true;
1170
1191
  };
1171
1192
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
1172
- const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
1193
+ const isMathMLContainer = (container) => {
1194
+ if (!container.namespaceURI.includes("MathML")) return false;
1195
+ if (container.tagName !== "annotation-xml") return true;
1196
+ const encoding = container.getAttribute("encoding");
1197
+ return !encoding || !encoding.includes("html");
1198
+ };
1199
+ /**
1200
+ * Resolve the element namespace a container's children should be created in.
1201
+ * The live DOM is the source of truth, so this also covers containers that are
1202
+ * only known at runtime (interop boundaries, teleport targets).
1203
+ * @internal
1204
+ */
1173
1205
  const getContainerType = (container) => {
1174
1206
  if (container.nodeType !== 1) return void 0;
1175
1207
  if (isSVGContainer(container)) return "svg";
@@ -1204,11 +1236,12 @@ function createHydrationFunctions(rendererInternals) {
1204
1236
  let nextNode = null;
1205
1237
  switch (type) {
1206
1238
  case Text:
1207
- if (domType !== 3) if (vnode.children === "") {
1208
- insert(vnode.el = createText(""), parentNode(node), node);
1209
- nextNode = node;
1210
- } else nextNode = onMismatch();
1211
- else {
1239
+ if (domType !== 3) {
1240
+ if (vnode.children === "") {
1241
+ insert(vnode.el = createText(""), parentNode(node), node);
1242
+ nextNode = node;
1243
+ } else nextNode = onMismatch();
1244
+ } else {
1212
1245
  if (node.data !== vnode.children) {
1213
1246
  logMismatchError();
1214
1247
  node.data = vnode.children;
@@ -1244,11 +1277,12 @@ function createHydrationFunctions(rendererInternals) {
1244
1277
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1245
1278
  break;
1246
1279
  case VaporSlot:
1247
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
1280
+ nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1248
1281
  break;
1249
- default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
1250
- else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1251
- else if (shapeFlag & 6) {
1282
+ default: if (shapeFlag & 1) {
1283
+ if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
1284
+ else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1285
+ } else if (shapeFlag & 6) {
1252
1286
  vnode.slotScopeIds = slotScopeIds;
1253
1287
  const container = parentNode(node);
1254
1288
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
@@ -1270,19 +1304,20 @@ function createHydrationFunctions(rendererInternals) {
1270
1304
  } else {
1271
1305
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
1272
1306
  const component = vnode.component;
1273
- if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
1307
+ if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep && !component.asyncResolved)) {
1274
1308
  let subTree;
1275
1309
  if (isFragmentStart) {
1276
- subTree = createVNode(Fragment);
1310
+ subTree = createVNode(Static);
1277
1311
  subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
1278
1312
  } else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
1279
1313
  subTree.el = node;
1280
1314
  component.subTree = subTree;
1281
1315
  }
1282
1316
  }
1283
- } else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
1284
- else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
1285
- else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
1317
+ } else if (shapeFlag & 64) {
1318
+ if (domType !== 8) nextNode = onMismatch();
1319
+ else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
1320
+ } else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
1286
1321
  }
1287
1322
  if (ref != null) setRef(ref, null, parentSuspense, vnode);
1288
1323
  return nextNode;
@@ -1399,7 +1434,7 @@ function createHydrationFunctions(rendererInternals) {
1399
1434
  const container = parentNode(node);
1400
1435
  remove(node);
1401
1436
  patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
1402
- if (parentComponent) {
1437
+ if (parentComponent && parentComponent.vnode) {
1403
1438
  parentComponent.vnode.el = vnode.el;
1404
1439
  updateHOCHostEl(parentComponent, vnode.el);
1405
1440
  }
@@ -1411,8 +1446,10 @@ function createHydrationFunctions(rendererInternals) {
1411
1446
  node = nextSibling(node);
1412
1447
  if (node && isComment(node)) {
1413
1448
  if (node.data === open) match++;
1414
- if (node.data === close) if (match === 0) return nextSibling(node);
1415
- else match--;
1449
+ if (node.data === close) {
1450
+ if (match === 0) return nextSibling(node);
1451
+ else match--;
1452
+ }
1416
1453
  }
1417
1454
  }
1418
1455
  return node;
@@ -1422,7 +1459,7 @@ function createHydrationFunctions(rendererInternals) {
1422
1459
  if (parentNode) parentNode.replaceChild(newNode, oldNode);
1423
1460
  let parent = parentComponent;
1424
1461
  while (parent) {
1425
- if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
1462
+ if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
1426
1463
  parent = parent.parent;
1427
1464
  }
1428
1465
  };
@@ -1434,7 +1471,7 @@ const isTemplateNode = (node) => {
1434
1471
  /**
1435
1472
  * Dev only
1436
1473
  */
1437
- const resourceProps = /* @__PURE__ */ new Set([
1474
+ const resourceProps = /*@__PURE__*/ new Set([
1438
1475
  "src",
1439
1476
  "srcset",
1440
1477
  "href",
@@ -1566,7 +1603,7 @@ function forEachElement(node, cb) {
1566
1603
  //#endregion
1567
1604
  //#region packages/runtime-core/src/apiAsyncComponent.ts
1568
1605
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
1569
- /* @__NO_SIDE_EFFECTS__ */
1606
+ /*@__NO_SIDE_EFFECTS__*/
1570
1607
  function defineAsyncComponent(source) {
1571
1608
  const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
1572
1609
  return /* @__PURE__ */ defineComponent({
@@ -1776,10 +1813,13 @@ const KeepAlive = {
1776
1813
  });
1777
1814
  let pendingCacheKey = null;
1778
1815
  const cacheSubtree = () => {
1779
- if (pendingCacheKey != null) if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
1780
- cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
1781
- }, void 0, keepAliveInstance.subTree.suspense);
1782
- else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
1816
+ if (pendingCacheKey != null) {
1817
+ if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
1818
+ const vnode = getInnerChild(keepAliveInstance.subTree);
1819
+ if (vnode.component) cache.set(pendingCacheKey, vnode);
1820
+ }, void 0, keepAliveInstance.subTree.suspense);
1821
+ else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
1822
+ }
1783
1823
  };
1784
1824
  onMounted(cacheSubtree);
1785
1825
  onUpdated(cacheSubtree);
@@ -2017,16 +2057,17 @@ function renderList(source, renderItem, cache, index) {
2017
2057
  } else if (typeof source === "number") {
2018
2058
  ret = new Array(source);
2019
2059
  for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
2020
- } else if ((0, _vue_shared.isObject)(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2021
- else {
2022
- const keys = Object.keys(source);
2023
- ret = new Array(keys.length);
2024
- for (let i = 0, l = keys.length; i < l; i++) {
2025
- const key = keys[i];
2026
- ret[i] = renderItem(source[key], key, i, cached && cached[i]);
2060
+ } else if ((0, _vue_shared.isObject)(source)) {
2061
+ if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
2062
+ else {
2063
+ const keys = Object.keys(source);
2064
+ ret = new Array(keys.length);
2065
+ for (let i = 0, l = keys.length; i < l; i++) {
2066
+ const key = keys[i];
2067
+ ret[i] = renderItem(source[key], key, i, cached && cached[i]);
2068
+ }
2027
2069
  }
2028
- }
2029
- else ret = [];
2070
+ } else ret = [];
2030
2071
  if (cache) cache[index] = ret;
2031
2072
  return ret;
2032
2073
  }
@@ -2051,14 +2092,27 @@ function createSlots(slots, dynamicSlots) {
2051
2092
  //#endregion
2052
2093
  //#region packages/runtime-core/src/helpers/renderSlot.ts
2053
2094
  /**
2095
+ * Links a slot function to its raw vapor slot: a raw vapor slot carries
2096
+ * itself, and the wrapper the interop slots proxy hands out carries the raw
2097
+ * slot it wraps — one lookup answers both "is this a vapor slot" and
2098
+ * "which one". Internal to vapor interop.
2099
+ */
2100
+ const rawVaporSlotKey = Symbol(`rawVaporSlot`);
2101
+ /**
2102
+ * Marks a compiler-generated slot fallback as VDOM-rendered so the vapor
2103
+ * interop fallback chain renders it through the VDOM renderer. Internal to
2104
+ * vapor interop.
2105
+ */
2106
+ const vdomSlotFallbackKey = Symbol(`vdomSlotFallback`);
2107
+ /**
2054
2108
  * Compiler runtime helper for rendering `<slot/>`
2055
2109
  * @private
2056
2110
  */
2057
2111
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2058
2112
  if (props == null) props = {};
2059
2113
  let slot = slots[name];
2060
- if (fallback) fallback.__vdom = true;
2061
- const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
2114
+ if (fallback) fallback[vdomSlotFallbackKey] = true;
2115
+ const vaporSlot = slot && slot[rawVaporSlotKey];
2062
2116
  if (vaporSlot) {
2063
2117
  const ret = (openBlock(), createBlock(VaporSlot, props));
2064
2118
  ret.vs = {
@@ -2211,7 +2265,7 @@ const PublicInstanceProxyHandlers = {
2211
2265
  return Reflect.defineProperty(target, key, descriptor);
2212
2266
  }
2213
2267
  };
2214
- const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ (0, _vue_shared.extend)({}, PublicInstanceProxyHandlers, {
2268
+ const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ (0, _vue_shared.extend)({}, PublicInstanceProxyHandlers, {
2215
2269
  get(target, key) {
2216
2270
  if (key === Symbol.unscopables) return;
2217
2271
  return PublicInstanceProxyHandlers.get(target, key, target);
@@ -2324,12 +2378,13 @@ function mergeDefaults(raw, defaults) {
2324
2378
  for (const key in defaults) {
2325
2379
  if (key.startsWith("__skip")) continue;
2326
2380
  let opt = props[key];
2327
- if (opt) if ((0, _vue_shared.isArray)(opt) || (0, _vue_shared.isFunction)(opt)) opt = props[key] = {
2328
- type: opt,
2329
- default: defaults[key]
2330
- };
2331
- else opt.default = defaults[key];
2332
- else if (opt === null) opt = props[key] = { default: defaults[key] };
2381
+ if (opt) {
2382
+ if ((0, _vue_shared.isArray)(opt) || (0, _vue_shared.isFunction)(opt)) opt = props[key] = {
2383
+ type: opt,
2384
+ default: defaults[key]
2385
+ };
2386
+ else opt.default = defaults[key];
2387
+ } else if (opt === null) opt = props[key] = { default: defaults[key] };
2333
2388
  if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
2334
2389
  }
2335
2390
  return props;
@@ -2435,9 +2490,11 @@ function applyOptions(instance) {
2435
2490
  shouldCacheAccess = true;
2436
2491
  if (computedOptions) for (const key in computedOptions) {
2437
2492
  const opt = computedOptions[key];
2493
+ const get = (0, _vue_shared.isFunction)(opt) ? opt.bind(publicThis, publicThis) : (0, _vue_shared.isFunction)(opt.get) ? opt.get.bind(publicThis, publicThis) : _vue_shared.NOOP;
2494
+ const set = !(0, _vue_shared.isFunction)(opt) && (0, _vue_shared.isFunction)(opt.set) ? opt.set.bind(publicThis) : _vue_shared.NOOP;
2438
2495
  const c = computed({
2439
- get: (0, _vue_shared.isFunction)(opt) ? opt.bind(publicThis, publicThis) : (0, _vue_shared.isFunction)(opt.get) ? opt.get.bind(publicThis, publicThis) : _vue_shared.NOOP,
2440
- set: !(0, _vue_shared.isFunction)(opt) && (0, _vue_shared.isFunction)(opt.set) ? opt.set.bind(publicThis) : _vue_shared.NOOP
2496
+ get,
2497
+ set
2441
2498
  });
2442
2499
  Object.defineProperty(ctx, key, {
2443
2500
  enumerable: true,
@@ -2493,9 +2550,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = _vue_s
2493
2550
  for (const key in injectOptions) {
2494
2551
  const opt = injectOptions[key];
2495
2552
  let injected;
2496
- if ((0, _vue_shared.isObject)(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
2497
- else injected = inject(opt.from || key);
2498
- else injected = inject(opt);
2553
+ if ((0, _vue_shared.isObject)(opt)) {
2554
+ if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
2555
+ else injected = inject(opt.from || key);
2556
+ } else injected = inject(opt);
2499
2557
  if ((0, _vue_reactivity.isRef)(injected)) Object.defineProperty(ctx, key, {
2500
2558
  enumerable: true,
2501
2559
  configurable: true,
@@ -2514,10 +2572,12 @@ function createWatcher(raw, ctx, publicThis, key) {
2514
2572
  const handler = ctx[raw];
2515
2573
  if ((0, _vue_shared.isFunction)(handler)) watch(getter, handler);
2516
2574
  } else if ((0, _vue_shared.isFunction)(raw)) watch(getter, raw.bind(publicThis));
2517
- else if ((0, _vue_shared.isObject)(raw)) if ((0, _vue_shared.isArray)(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
2518
- else {
2519
- const handler = (0, _vue_shared.isFunction)(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
2520
- if ((0, _vue_shared.isFunction)(handler)) watch(getter, handler, raw);
2575
+ else if ((0, _vue_shared.isObject)(raw)) {
2576
+ if ((0, _vue_shared.isArray)(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
2577
+ else {
2578
+ const handler = (0, _vue_shared.isFunction)(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
2579
+ if ((0, _vue_shared.isFunction)(handler)) watch(getter, handler, raw);
2580
+ }
2521
2581
  }
2522
2582
  }
2523
2583
  /**
@@ -2603,7 +2663,7 @@ function mergeObjectOptions(to, from) {
2603
2663
  }
2604
2664
  function mergeEmitsOrPropsOptions(to, from) {
2605
2665
  if (to) {
2606
- if ((0, _vue_shared.isArray)(to) && (0, _vue_shared.isArray)(from)) return [...new Set([...to, ...from])];
2666
+ if ((0, _vue_shared.isArray)(to) && (0, _vue_shared.isArray)(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
2607
2667
  return (0, _vue_shared.extend)(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
2608
2668
  } else return from;
2609
2669
  }
@@ -2806,7 +2866,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
2806
2866
  const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
2807
2867
  if (modifiers) {
2808
2868
  if (modifiers.trim) args = rawArgs.map((a) => (0, _vue_shared.isString)(a) ? a.trim() : a);
2809
- if (modifiers.number) args = rawArgs.map(_vue_shared.looseToNumber);
2869
+ if (modifiers.number) args = args.map(_vue_shared.looseToNumber);
2810
2870
  }
2811
2871
  let handlerName;
2812
2872
  let handler = getter(props, handlerName = (0, _vue_shared.toHandlerKey)(event)) || getter(props, handlerName = (0, _vue_shared.toHandlerKey)((0, _vue_shared.camelize)(event)));
@@ -2917,8 +2977,10 @@ function filterSingleRoot(children, recurse = true) {
2917
2977
  for (let i = 0; i < children.length; i++) {
2918
2978
  const child = children[i];
2919
2979
  if (isVNode(child)) {
2920
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
2921
- else singleRoot = child;
2980
+ if (child.type !== Comment || child.children === "v-if") {
2981
+ if (singleRoot) return;
2982
+ else singleRoot = child;
2983
+ }
2922
2984
  } else return;
2923
2985
  }
2924
2986
  return singleRoot;
@@ -3027,16 +3089,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3027
3089
  let key = propsToUpdate[i];
3028
3090
  if (isEmitListener(instance.emitsOptions, key)) continue;
3029
3091
  const value = rawProps[key];
3030
- if (options) if ((0, _vue_shared.hasOwn)(attrs, key)) {
3031
- if (value !== attrs[key]) {
3032
- attrs[key] = value;
3033
- hasAttrsChanged = true;
3092
+ if (options) {
3093
+ if ((0, _vue_shared.hasOwn)(attrs, key)) {
3094
+ if (value !== attrs[key]) {
3095
+ attrs[key] = value;
3096
+ hasAttrsChanged = true;
3097
+ }
3098
+ } else {
3099
+ const camelizedKey = (0, _vue_shared.camelize)(key);
3100
+ props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3034
3101
  }
3035
- } else {
3036
- const camelizedKey = (0, _vue_shared.camelize)(key);
3037
- props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3038
- }
3039
- else if (value !== attrs[key]) {
3102
+ } else if (value !== attrs[key]) {
3040
3103
  attrs[key] = value;
3041
3104
  hasAttrsChanged = true;
3042
3105
  }
@@ -3045,9 +3108,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3045
3108
  } else {
3046
3109
  if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
3047
3110
  let kebabKey;
3048
- for (const key in rawCurrentProps) if (!rawProps || !(0, _vue_shared.hasOwn)(rawProps, key) && ((kebabKey = (0, _vue_shared.hyphenate)(key)) === key || !(0, _vue_shared.hasOwn)(rawProps, kebabKey))) if (options) {
3049
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
3050
- } else delete props[key];
3111
+ for (const key in rawCurrentProps) if (!rawProps || !(0, _vue_shared.hasOwn)(rawProps, key) && ((kebabKey = (0, _vue_shared.hyphenate)(key)) === key || !(0, _vue_shared.hasOwn)(rawProps, kebabKey))) {
3112
+ if (options) {
3113
+ if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
3114
+ } else delete props[key];
3115
+ }
3051
3116
  if (attrs !== rawCurrentProps) {
3052
3117
  for (const key in attrs) if (!rawProps || !(0, _vue_shared.hasOwn)(rawProps, key) && true) {
3053
3118
  delete attrs[key];
@@ -3065,9 +3130,10 @@ function setFullProps(instance, rawProps, props, attrs) {
3065
3130
  if ((0, _vue_shared.isReservedProp)(key)) continue;
3066
3131
  const value = rawProps[key];
3067
3132
  let camelKey;
3068
- if (options && (0, _vue_shared.hasOwn)(options, camelKey = (0, _vue_shared.camelize)(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3069
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3070
- else if (!isEmitListener(instance.emitsOptions, key)) {
3133
+ if (options && (0, _vue_shared.hasOwn)(options, camelKey = (0, _vue_shared.camelize)(key))) {
3134
+ if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3135
+ else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3136
+ } else if (!isEmitListener(instance.emitsOptions, key)) {
3071
3137
  if (!(key in attrs) || value !== attrs[key]) {
3072
3138
  attrs[key] = value;
3073
3139
  hasAttrsChanged = true;
@@ -3228,9 +3294,10 @@ const updateSlots = (instance, children, optimized) => {
3228
3294
  let deletionComparisonTarget = _vue_shared.EMPTY_OBJ;
3229
3295
  if (vnode.shapeFlag & 32) {
3230
3296
  const type = children._;
3231
- if (type) if (optimized && type === 1) needDeletionCheck = false;
3232
- else assignSlots(slots, children, optimized);
3233
- else {
3297
+ if (type) {
3298
+ if (optimized && type === 1) needDeletionCheck = false;
3299
+ else assignSlots(slots, children, optimized);
3300
+ } else {
3234
3301
  needDeletionCheck = !children.$stable;
3235
3302
  normalizeObjectSlots(children, slots, instance);
3236
3303
  }
@@ -3305,7 +3372,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3305
3372
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3306
3373
  break;
3307
3374
  case VaporSlot:
3308
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
3375
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
3309
3376
  break;
3310
3377
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3311
3378
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -3401,7 +3468,10 @@ function baseCreateRenderer(options, createHydrationFns) {
3401
3468
  for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
3402
3469
  };
3403
3470
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
3404
- for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3471
+ for (let i = start; i < children.length; i++) {
3472
+ const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
3473
+ patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3474
+ }
3405
3475
  };
3406
3476
  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
3407
3477
  const el = n2.el = n1.el;
@@ -3412,6 +3482,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3412
3482
  let vnodeHook;
3413
3483
  parentComponent && toggleRecurse(parentComponent, false);
3414
3484
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
3485
+ if (n2.ibu) n2.ibu();
3415
3486
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
3416
3487
  parentComponent && toggleRecurse(parentComponent, true);
3417
3488
  if (dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -3443,8 +3514,9 @@ function baseCreateRenderer(options, createHydrationFns) {
3443
3514
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
3444
3515
  }
3445
3516
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
3446
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
3517
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
3447
3518
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
3519
+ n2.iu && n2.iu();
3448
3520
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
3449
3521
  }, void 0, parentSuspense);
3450
3522
  };
@@ -3452,7 +3524,8 @@ function baseCreateRenderer(options, createHydrationFns) {
3452
3524
  for (let i = 0; i < newChildren.length; i++) {
3453
3525
  const oldVNode = oldChildren[i];
3454
3526
  const newVNode = newChildren[i];
3455
- patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
3527
+ const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
3528
+ patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
3456
3529
  }
3457
3530
  };
3458
3531
  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
@@ -3485,41 +3558,46 @@ function baseCreateRenderer(options, createHydrationFns) {
3485
3558
  };
3486
3559
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
3487
3560
  n2.slotScopeIds = slotScopeIds;
3488
- if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
3489
- else {
3490
- const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
3491
- getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
3492
- if (n2.dirs) {
3493
- invokeDirectiveHook(n2, null, parentComponent, "created");
3494
- invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
3561
+ if (n2.type.__vapor) {
3562
+ if (n1 == null) {
3563
+ if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
3564
+ else {
3565
+ const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
3566
+ getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
3567
+ if (n2.dirs) {
3568
+ invokeDirectiveHook(n2, null, parentComponent, "created");
3569
+ invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
3570
+ }
3571
+ }, () => {
3572
+ if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
3573
+ });
3574
+ if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
3575
+ const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
3576
+ if (vnodeMountedHook) {
3577
+ const scopedVNode = n2;
3578
+ queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
3579
+ }
3495
3580
  }
3496
- }, () => {
3497
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
3498
- });
3499
- if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
3500
- const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
3501
- if (vnodeMountedHook) {
3502
- const scopedVNode = n2;
3503
- queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
3581
+ } else {
3582
+ const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
3583
+ getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
3584
+ if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
3585
+ }, () => {
3586
+ const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
3587
+ if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
3588
+ if (n2.ibu) n2.ibu();
3589
+ });
3590
+ const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
3591
+ if (shouldUpdate && (vnodeUpdatedHook || n2.dirs || n2.iu)) queuePostRenderEffect(() => {
3592
+ n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
3593
+ vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
3594
+ n2.iu && n2.iu();
3595
+ }, void 0, parentSuspense);
3504
3596
  }
3505
- }
3506
- else {
3507
- const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
3508
- getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
3509
- if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
3510
- }, () => {
3511
- const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
3512
- if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
3513
- });
3514
- const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
3515
- if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
3516
- n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
3517
- vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
3518
- }, void 0, parentSuspense);
3519
- }
3520
- else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
3521
- else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
3522
- else updateComponent(n1, n2, optimized);
3597
+ } else if (n1 == null) {
3598
+ if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
3599
+ else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
3600
+ } else updateComponent(n1, n2, optimized);
3523
3601
  };
3524
3602
  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
3525
3603
  const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
@@ -3550,14 +3628,15 @@ function baseCreateRenderer(options, createHydrationFns) {
3550
3628
  };
3551
3629
  const updateComponent = (n1, n2, optimized) => {
3552
3630
  const instance = n2.component = n1.component;
3553
- if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
3554
- updateComponentPreRender(instance, n2, optimized);
3555
- return;
3631
+ if (shouldUpdateComponent(n1, n2, optimized)) {
3632
+ if (instance.asyncDep && !instance.asyncResolved) {
3633
+ updateComponentPreRender(instance, n2, optimized);
3634
+ return;
3635
+ } else {
3636
+ instance.next = n2;
3637
+ instance.effect.run();
3638
+ }
3556
3639
  } else {
3557
- instance.next = n2;
3558
- instance.effect.run();
3559
- }
3560
- else {
3561
3640
  n2.el = n1.el;
3562
3641
  instance.vnode = n2;
3563
3642
  }
@@ -3643,6 +3722,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3643
3722
  } else next = vnode;
3644
3723
  if (bu) (0, _vue_shared.invokeArrayFns)(bu);
3645
3724
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
3725
+ if (next.ibu) next.ibu();
3646
3726
  toggleRecurse(instance, true);
3647
3727
  const nextTree = renderComponentRoot(instance);
3648
3728
  const prevTree = instance.subTree;
@@ -3651,7 +3731,10 @@ function baseCreateRenderer(options, createHydrationFns) {
3651
3731
  next.el = nextTree.el;
3652
3732
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
3653
3733
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
3654
- if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), void 0, parentSuspense);
3734
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
3735
+ vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
3736
+ next.iu && next.iu();
3737
+ }, void 0, parentSuspense);
3655
3738
  }
3656
3739
  }
3657
3740
  }
@@ -3689,9 +3772,10 @@ function baseCreateRenderer(options, createHydrationFns) {
3689
3772
  if (shapeFlag & 8) {
3690
3773
  if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
3691
3774
  if (c2 !== c1) hostSetElementText(container, c2);
3692
- } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3693
- else unmountChildren(c1, parentComponent, parentSuspense, true);
3694
- else {
3775
+ } else if (prevShapeFlag & 16) {
3776
+ if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3777
+ else unmountChildren(c1, parentComponent, parentSuspense, true);
3778
+ } else {
3695
3779
  if (prevShapeFlag & 8) hostSetElementText(container, "");
3696
3780
  if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3697
3781
  }
@@ -3787,8 +3871,10 @@ function baseCreateRenderer(options, createHydrationFns) {
3787
3871
  const anchorVNode = c2[nextIndex + 1];
3788
3872
  const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
3789
3873
  if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3790
- else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
3791
- else j--;
3874
+ else if (moved) {
3875
+ if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
3876
+ else j--;
3877
+ }
3792
3878
  }
3793
3879
  }
3794
3880
  };
@@ -3820,26 +3906,27 @@ function baseCreateRenderer(options, createHydrationFns) {
3820
3906
  moveStaticNode(vnode, container, anchor);
3821
3907
  return;
3822
3908
  }
3823
- if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
3824
- else {
3825
- const { leave, delayLeave, afterLeave } = transition;
3826
- const remove = () => {
3827
- if (vnode.ctx.isUnmounted) hostRemove(el);
3828
- else hostInsert(el, container, anchor);
3829
- };
3830
- const performLeave = () => {
3831
- const wasLeaving = el._isLeaving || !!el[leaveCbKey];
3832
- if (el._isLeaving) el[leaveCbKey](true);
3833
- if (transition.persisted && !wasLeaving) remove();
3834
- else leave(el, () => {
3835
- remove();
3836
- afterLeave && afterLeave();
3837
- });
3838
- };
3839
- if (delayLeave) delayLeave(el, remove, performLeave);
3840
- else performLeave();
3841
- }
3842
- else hostInsert(el, container, anchor);
3909
+ if (moveType !== 2 && shapeFlag & 1 && transition) {
3910
+ if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
3911
+ else {
3912
+ const { leave, delayLeave, afterLeave } = transition;
3913
+ const remove = () => {
3914
+ if (vnode.ctx.isUnmounted) hostRemove(el);
3915
+ else hostInsert(el, container, anchor);
3916
+ };
3917
+ const performLeave = () => {
3918
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
3919
+ if (el._isLeaving) el[leaveCbKey](true);
3920
+ if (transition.persisted && !wasLeaving) remove();
3921
+ else leave(el, () => {
3922
+ remove();
3923
+ afterLeave && afterLeave();
3924
+ });
3925
+ };
3926
+ if (delayLeave) delayLeave(el, remove, performLeave);
3927
+ else performLeave();
3928
+ }
3929
+ } else hostInsert(el, container, anchor);
3843
3930
  };
3844
3931
  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
3845
3932
  const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
@@ -3859,16 +3946,17 @@ function baseCreateRenderer(options, createHydrationFns) {
3859
3946
  const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
3860
3947
  let vnodeHook;
3861
3948
  if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
3862
- if (shapeFlag & 6) if (isVaporComponent(type)) {
3863
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
3864
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
3865
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
3866
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
3867
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
3868
- }, void 0, parentSuspense);
3869
- return;
3870
- } else unmountComponent(vnode.component, parentSuspense, doRemove);
3871
- else {
3949
+ if (shapeFlag & 6) {
3950
+ if (isVaporComponent(type)) {
3951
+ if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
3952
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
3953
+ if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
3954
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
3955
+ vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
3956
+ }, void 0, parentSuspense);
3957
+ return;
3958
+ } else unmountComponent(vnode.component, parentSuspense, doRemove);
3959
+ } else {
3872
3960
  if (shapeFlag & 128) {
3873
3961
  vnode.suspense.unmount(parentSuspense, doRemove);
3874
3962
  return;
@@ -3989,12 +4077,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
3989
4077
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
3990
4078
  }
3991
4079
  function toggleRecurse({ effect, job, vapor }, allowed) {
3992
- if (!vapor) if (allowed) {
3993
- effect.flags |= 128;
3994
- job.flags |= 2;
3995
- } else {
3996
- effect.flags &= -129;
3997
- job.flags &= -3;
4080
+ if (!vapor) {
4081
+ if (allowed) {
4082
+ effect.flags |= 128;
4083
+ job.flags |= 2;
4084
+ } else {
4085
+ effect.flags &= -129;
4086
+ job.flags &= -3;
4087
+ }
3998
4088
  }
3999
4089
  }
4000
4090
  function needTransition(parentSuspense, transition) {
@@ -4033,8 +4123,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
4033
4123
  }
4034
4124
  function locateNonHydratedAsyncRoot(instance) {
4035
4125
  const subComponent = instance.subTree && instance.subTree.component;
4036
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
4037
- else return locateNonHydratedAsyncRoot(subComponent);
4126
+ if (subComponent) {
4127
+ if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
4128
+ else return locateNonHydratedAsyncRoot(subComponent);
4129
+ }
4038
4130
  }
4039
4131
  function invalidateMount(hooks) {
4040
4132
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
@@ -4075,7 +4167,7 @@ function isVaporComponent(type) {
4075
4167
  /**
4076
4168
  * shared between vdom and vapor
4077
4169
  */
4078
- function getInheritedScopeIds(vnode, parentComponent) {
4170
+ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
4079
4171
  const inheritedScopeIds = [];
4080
4172
  let currentParent = parentComponent;
4081
4173
  let currentVNode = vnode;
@@ -4090,6 +4182,8 @@ function getInheritedScopeIds(vnode, parentComponent) {
4090
4182
  currentParent = currentParent.parent;
4091
4183
  } else break;
4092
4184
  }
4185
+ const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
4186
+ if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
4093
4187
  return inheritedScopeIds;
4094
4188
  }
4095
4189
  function resolveAsyncComponentPlaceholder(anchorVnode) {
@@ -4149,7 +4243,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
4149
4243
  patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
4150
4244
  if (suspense.deps <= 0) suspense.resolve();
4151
4245
  else if (isInFallback) {
4152
- if (!isHydrating) {
4246
+ if (!isHydrating && !suspense.isFallbackMountPending) {
4153
4247
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
4154
4248
  setActiveBranch(suspense, newFallback);
4155
4249
  }
@@ -4170,7 +4264,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
4170
4264
  if (isInFallback) {
4171
4265
  patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
4172
4266
  if (suspense.deps <= 0) suspense.resolve();
4173
- else {
4267
+ else if (!suspense.isFallbackMountPending) {
4174
4268
  patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
4175
4269
  setActiveBranch(suspense, newFallback);
4176
4270
  }
@@ -4287,8 +4381,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
4287
4381
  const mountFallback = () => {
4288
4382
  suspense.isFallbackMountPending = false;
4289
4383
  if (!suspense.isInFallback) return;
4290
- patch(null, fallbackVNode, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
4291
- setActiveBranch(suspense, fallbackVNode);
4384
+ const latestFallback = suspense.vnode.ssFallback;
4385
+ patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
4386
+ setActiveBranch(suspense, latestFallback);
4292
4387
  };
4293
4388
  const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
4294
4389
  if (delayEnter) {
@@ -4360,9 +4455,10 @@ function normalizeSuspenseSlot(s) {
4360
4455
  return s;
4361
4456
  }
4362
4457
  function queueEffectWithSuspense(fn, id, suspense) {
4363
- if (suspense && suspense.pendingBranch) if ((0, _vue_shared.isArray)(fn)) suspense.effects.push(...fn);
4364
- else suspense.effects.push(fn);
4365
- else queuePostFlushCb(fn, id);
4458
+ if (suspense && suspense.pendingBranch) {
4459
+ if ((0, _vue_shared.isArray)(fn)) suspense.effects.push(...fn);
4460
+ else suspense.effects.push(fn);
4461
+ } else queuePostFlushCb(fn, id);
4366
4462
  }
4367
4463
  function setActiveBranch(suspense, branch) {
4368
4464
  suspense.activeBranch = branch;
@@ -4523,8 +4619,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
4523
4619
  if (isVNode(type)) {
4524
4620
  const cloned = cloneVNode(type, props, true);
4525
4621
  if (children) normalizeChildren(cloned, children);
4526
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
4527
- else currentBlock.push(cloned);
4622
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
4623
+ if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
4624
+ else currentBlock.push(cloned);
4625
+ }
4528
4626
  cloned.patchFlag = -2;
4529
4627
  return cloned;
4530
4628
  }
@@ -4580,7 +4678,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
4580
4678
  ce: vnode.ce,
4581
4679
  vi: vnode.vi,
4582
4680
  vs: cloneVaporSlotMeta(vnode),
4583
- vb: vnode.vb
4681
+ vb: vnode.vb,
4682
+ ibu: vnode.ibu,
4683
+ iu: vnode.iu
4584
4684
  };
4585
4685
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
4586
4686
  return cloned;
@@ -4634,25 +4734,28 @@ function normalizeChildren(vnode, children) {
4634
4734
  const { shapeFlag } = vnode;
4635
4735
  if (children == null) children = null;
4636
4736
  else if ((0, _vue_shared.isArray)(children)) type = 16;
4637
- else if (typeof children === "object") if (shapeFlag & 65) {
4638
- const slot = children.default;
4639
- if (slot) {
4640
- slot._c && (slot._d = false);
4641
- normalizeChildren(vnode, slot());
4642
- slot._c && (slot._d = true);
4643
- }
4644
- return;
4645
- } else {
4646
- type = 32;
4647
- const slotFlag = children._;
4648
- if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
4649
- else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
4650
- else {
4651
- children._ = 2;
4652
- vnode.patchFlag |= 1024;
4737
+ else if (typeof children === "object") {
4738
+ if (shapeFlag & 65) {
4739
+ const slot = children.default;
4740
+ if (slot) {
4741
+ slot._c && (slot._d = false);
4742
+ normalizeChildren(vnode, slot());
4743
+ slot._c && (slot._d = true);
4744
+ }
4745
+ return;
4746
+ } else {
4747
+ type = 32;
4748
+ const slotFlag = children._;
4749
+ if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
4750
+ else if (slotFlag === 3 && currentRenderingInstance) {
4751
+ if (currentRenderingInstance.slots._ === 1) children._ = 1;
4752
+ else {
4753
+ children._ = 2;
4754
+ vnode.patchFlag |= 1024;
4755
+ }
4756
+ }
4653
4757
  }
4654
- }
4655
- else if ((0, _vue_shared.isFunction)(children)) {
4758
+ } else if ((0, _vue_shared.isFunction)(children)) {
4656
4759
  if (shapeFlag & 65) {
4657
4760
  normalizeChildren(vnode, { default: children });
4658
4761
  return;
@@ -4764,7 +4867,7 @@ const useInstanceOption = (key, silent = false) => {
4764
4867
  };
4765
4868
  //#endregion
4766
4869
  //#region packages/runtime-core/src/component.ts
4767
- const emptyAppContext = /* @__PURE__ */ createAppContext();
4870
+ const emptyAppContext = /*@__PURE__*/ createAppContext();
4768
4871
  let uid = 0;
4769
4872
  function createComponentInstance(vnode, parent, suspense) {
4770
4873
  const type = vnode.type;
@@ -4889,9 +4992,10 @@ function setupStatefulComponent(instance, isSSR) {
4889
4992
  } else finishComponentSetup(instance, isSSR);
4890
4993
  }
4891
4994
  function handleSetupResult(instance, setupResult, isSSR) {
4892
- if ((0, _vue_shared.isFunction)(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
4893
- else instance.render = setupResult;
4894
- else if ((0, _vue_shared.isObject)(setupResult)) instance.setupState = (0, _vue_reactivity.proxyRefs)(setupResult);
4995
+ if ((0, _vue_shared.isFunction)(setupResult)) {
4996
+ if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
4997
+ else instance.render = setupResult;
4998
+ } else if ((0, _vue_shared.isObject)(setupResult)) instance.setupState = (0, _vue_reactivity.proxyRefs)(setupResult);
4895
4999
  finishComponentSetup(instance, isSSR);
4896
5000
  }
4897
5001
  let compile;
@@ -4987,11 +5091,12 @@ function h(type, propsOrChildren, children) {
4987
5091
  try {
4988
5092
  setBlockTracking(-1);
4989
5093
  const l = arguments.length;
4990
- if (l === 2) if ((0, _vue_shared.isObject)(propsOrChildren) && !(0, _vue_shared.isArray)(propsOrChildren)) {
4991
- if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
4992
- return createVNode(type, propsOrChildren);
4993
- } else return createVNode(type, null, propsOrChildren);
4994
- else {
5094
+ if (l === 2) {
5095
+ if ((0, _vue_shared.isObject)(propsOrChildren) && !(0, _vue_shared.isArray)(propsOrChildren)) {
5096
+ if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
5097
+ return createVNode(type, propsOrChildren);
5098
+ } else return createVNode(type, null, propsOrChildren);
5099
+ } else {
4995
5100
  if (l > 3) children = Array.prototype.slice.call(arguments, 2);
4996
5101
  else if (l === 3 && isVNode(children)) children = [children];
4997
5102
  return createVNode(type, propsOrChildren, children);
@@ -5002,15 +5107,7 @@ function h(type, propsOrChildren, children) {
5002
5107
  }
5003
5108
  //#endregion
5004
5109
  //#region packages/runtime-core/src/customFormatter.ts
5005
- function initCustomFormatter() {
5006
- return;
5007
- function isKeyOfType(Comp, key, type) {
5008
- const opts = Comp[type];
5009
- if ((0, _vue_shared.isArray)(opts) && opts.includes(key) || (0, _vue_shared.isObject)(opts) && key in opts) return true;
5010
- if (Comp.extends && isKeyOfType(Comp.extends, key, type)) return true;
5011
- if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) return true;
5012
- }
5013
- }
5110
+ function initCustomFormatter() {}
5014
5111
  //#endregion
5015
5112
  //#region packages/runtime-core/src/helpers/withMemo.ts
5016
5113
  function withMemo(memo, render, cache, index) {
@@ -5030,7 +5127,7 @@ function isMemoSame(cached, memo) {
5030
5127
  }
5031
5128
  //#endregion
5032
5129
  //#region packages/runtime-core/src/index.ts
5033
- const version = "3.6.0-rc.4";
5130
+ const version = "3.6.0-rc.6";
5034
5131
  const warn = _vue_shared.NOOP;
5035
5132
  /**
5036
5133
  * Runtime error messages. Only exposed in dev or esm builds.