@vue/server-renderer 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/server-renderer v3.6.0-rc.4
2
+ * @vue/server-renderer v3.6.0-rc.6
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -11,7 +11,7 @@
11
11
  * \/\*#\_\_PURE\_\_\*\/
12
12
  * So that they can be tree-shaken if necessary.
13
13
  */
14
- /* @__NO_SIDE_EFFECTS__ */
14
+ /*@__NO_SIDE_EFFECTS__*/
15
15
  function makeMap(str) {
16
16
  const map = Object.create(null);
17
17
  for (const key of str.split(",")) map[key] = 1;
@@ -54,9 +54,9 @@ const toRawType = (value) => {
54
54
  };
55
55
  const isPlainObject = (val) => toTypeString(val) === "[object Object]";
56
56
  const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
57
- const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
58
- const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
59
- const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
57
+ const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
58
+ const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
59
+ const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
60
60
  const cacheStringFunction = (fn) => {
61
61
  const cache = Object.create(null);
62
62
  return ((str) => {
@@ -183,22 +183,22 @@ const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,tr
183
183
  * Compiler only.
184
184
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
185
185
  */
186
- const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
186
+ const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
187
187
  /**
188
188
  * Compiler only.
189
189
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
190
190
  */
191
- const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
191
+ const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
192
192
  /**
193
193
  * Compiler only.
194
194
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
195
195
  */
196
- const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
196
+ const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
197
197
  /**
198
198
  * Compiler only.
199
199
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
200
200
  */
201
- const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
201
+ const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
202
202
  //#endregion
203
203
  //#region packages/shared/src/domAttrConfig.ts
204
204
  /**
@@ -213,11 +213,11 @@ const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
213
213
  * - readonly -> readOnly
214
214
  */
215
215
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
216
- const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
216
+ const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
217
217
  /**
218
218
  * The full list is needed during SSR to produce the correct initial markup.
219
219
  */
220
- const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
220
+ const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
221
221
  /**
222
222
  * Boolean attributes should be included if the value is truthy or ''.
223
223
  * e.g. `<select multiple>` compiles to `{ multiple: '' }`
@@ -225,7 +225,7 @@ const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,auto
225
225
  function includeBooleanAttr(value) {
226
226
  return !!value || value === "";
227
227
  }
228
- const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
228
+ const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u000d\u0020]/;
229
229
  const attrValidationCache = {};
230
230
  function isSSRSafeAttrName(name) {
231
231
  if (attrValidationCache.hasOwnProperty(name)) return attrValidationCache[name];
@@ -309,6 +309,21 @@ function looseCompareArrays(a, b) {
309
309
  for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
310
310
  return equal;
311
311
  }
312
+ function looseCompareCollections(a, b) {
313
+ if (a.size !== b.size) return false;
314
+ const candidates = Array.from(b);
315
+ const matched = new Uint8Array(candidates.length);
316
+ for (const item of a) {
317
+ let index = -1;
318
+ for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i])) {
319
+ index = i;
320
+ break;
321
+ }
322
+ if (index < 0) return false;
323
+ matched[index] = 1;
324
+ }
325
+ return true;
326
+ }
312
327
  function looseEqual(a, b) {
313
328
  if (a === b) return true;
314
329
  let aValidType = isDate(a);
@@ -324,6 +339,12 @@ function looseEqual(a, b) {
324
339
  bValidType = isObject(b);
325
340
  if (aValidType || bValidType) {
326
341
  if (!aValidType || !bValidType) return false;
342
+ aValidType = isMap(a);
343
+ bValidType = isMap(b);
344
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
345
+ aValidType = isSet(a);
346
+ bValidType = isSet(b);
347
+ if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
327
348
  if (Object.keys(a).length !== Object.keys(b).length) return false;
328
349
  for (const key in a) {
329
350
  const aHasKey = a.hasOwnProperty(key);
@@ -770,9 +791,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
770
791
  if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
771
792
  }
772
793
  break;
773
- case "set":
774
- if (isMap(target)) run(depsMap.get(ITERATE_KEY));
775
- break;
794
+ case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
776
795
  }
777
796
  }
778
797
  }
@@ -965,8 +984,8 @@ function noTracking(self, method, args = []) {
965
984
  }
966
985
  //#endregion
967
986
  //#region packages/reactivity/src/baseHandlers.ts
968
- const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
969
- const builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
987
+ const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
988
+ const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
970
989
  function hasOwnProperty(key) {
971
990
  if (!isSymbol(key)) key = String(key);
972
991
  const obj = /* @__PURE__ */ toRaw(this);
@@ -1021,12 +1040,14 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
1021
1040
  oldValue = /* @__PURE__ */ toRaw(oldValue);
1022
1041
  value = /* @__PURE__ */ toRaw(value);
1023
1042
  }
1024
- if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) if (isOldValueReadonly) {
1025
- warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
1026
- return true;
1027
- } else {
1028
- oldValue.value = value;
1029
- return true;
1043
+ if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
1044
+ if (isOldValueReadonly) {
1045
+ warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
1046
+ return true;
1047
+ } else {
1048
+ oldValue.value = value;
1049
+ return true;
1050
+ }
1030
1051
  }
1031
1052
  }
1032
1053
  const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
@@ -1067,10 +1088,10 @@ var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
1067
1088
  return true;
1068
1089
  }
1069
1090
  };
1070
- const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
1071
- const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
1072
- const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
1073
- const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
1091
+ const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
1092
+ const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
1093
+ const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
1094
+ const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
1074
1095
  //#endregion
1075
1096
  //#region packages/reactivity/src/collectionHandlers.ts
1076
1097
  const toShallow = (value) => value;
@@ -1221,10 +1242,10 @@ function createInstrumentationGetter(isReadonly, shallow) {
1221
1242
  return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
1222
1243
  };
1223
1244
  }
1224
- const mutableCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, false) };
1225
- const shallowCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(false, true) };
1226
- const readonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, false) };
1227
- const shallowReadonlyCollectionHandlers = { get: /* @__PURE__ */ createInstrumentationGetter(true, true) };
1245
+ const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
1246
+ const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
1247
+ const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
1248
+ const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
1228
1249
  function checkIdentityKeys(target, has, key) {
1229
1250
  const rawKey = /* @__PURE__ */ toRaw(key);
1230
1251
  if (rawKey !== key && has.call(target, rawKey)) {
@@ -1249,7 +1270,7 @@ function targetTypeMap(rawType) {
1249
1270
  default: return 0;
1250
1271
  }
1251
1272
  }
1252
- /* @__NO_SIDE_EFFECTS__ */
1273
+ /*@__NO_SIDE_EFFECTS__*/
1253
1274
  function reactive(target) {
1254
1275
  if (/* @__PURE__ */ isReadonly(target)) return target;
1255
1276
  return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
@@ -1284,7 +1305,7 @@ function reactive(target) {
1284
1305
  * @param target - The source object.
1285
1306
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
1286
1307
  */
1287
- /* @__NO_SIDE_EFFECTS__ */
1308
+ /*@__NO_SIDE_EFFECTS__*/
1288
1309
  function shallowReactive(target) {
1289
1310
  return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
1290
1311
  }
@@ -1317,7 +1338,7 @@ function shallowReactive(target) {
1317
1338
  * @param target - The source object.
1318
1339
  * @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
1319
1340
  */
1320
- /* @__NO_SIDE_EFFECTS__ */
1341
+ /*@__NO_SIDE_EFFECTS__*/
1321
1342
  function readonly(target) {
1322
1343
  return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
1323
1344
  }
@@ -1351,7 +1372,7 @@ function readonly(target) {
1351
1372
  * @param target - The source object.
1352
1373
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
1353
1374
  */
1354
- /* @__NO_SIDE_EFFECTS__ */
1375
+ /*@__NO_SIDE_EFFECTS__*/
1355
1376
  function shallowReadonly(target) {
1356
1377
  return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
1357
1378
  }
@@ -1388,7 +1409,7 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
1388
1409
  * @param value - The value to check.
1389
1410
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
1390
1411
  */
1391
- /* @__NO_SIDE_EFFECTS__ */
1412
+ /*@__NO_SIDE_EFFECTS__*/
1392
1413
  function isReactive(value) {
1393
1414
  if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
1394
1415
  return !!(value && value["__v_isReactive"]);
@@ -1404,11 +1425,11 @@ function isReactive(value) {
1404
1425
  * @param value - The value to check.
1405
1426
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
1406
1427
  */
1407
- /* @__NO_SIDE_EFFECTS__ */
1428
+ /*@__NO_SIDE_EFFECTS__*/
1408
1429
  function isReadonly(value) {
1409
1430
  return !!(value && value["__v_isReadonly"]);
1410
1431
  }
1411
- /* @__NO_SIDE_EFFECTS__ */
1432
+ /*@__NO_SIDE_EFFECTS__*/
1412
1433
  function isShallow(value) {
1413
1434
  return !!(value && value["__v_isShallow"]);
1414
1435
  }
@@ -1419,7 +1440,7 @@ function isShallow(value) {
1419
1440
  * @param value - The value to check.
1420
1441
  * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
1421
1442
  */
1422
- /* @__NO_SIDE_EFFECTS__ */
1443
+ /*@__NO_SIDE_EFFECTS__*/
1423
1444
  function isProxy(value) {
1424
1445
  return value ? !!value["__v_raw"] : false;
1425
1446
  }
@@ -1446,7 +1467,7 @@ function isProxy(value) {
1446
1467
  * @param observed - The object for which the "raw" value is requested.
1447
1468
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
1448
1469
  */
1449
- /* @__NO_SIDE_EFFECTS__ */
1470
+ /*@__NO_SIDE_EFFECTS__*/
1450
1471
  function toRaw(observed) {
1451
1472
  const raw = observed && observed["__v_raw"];
1452
1473
  return raw ? /* @__PURE__ */ toRaw(raw) : observed;
@@ -1495,7 +1516,7 @@ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value)
1495
1516
  const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
1496
1517
  //#endregion
1497
1518
  //#region packages/reactivity/src/ref.ts
1498
- /* @__NO_SIDE_EFFECTS__ */
1519
+ /*@__NO_SIDE_EFFECTS__*/
1499
1520
  function isRef(r) {
1500
1521
  return r ? r["__v_isRef"] === true : false;
1501
1522
  }
@@ -1595,10 +1616,12 @@ var ReactiveEffect = class {
1595
1616
  get dirty() {
1596
1617
  const flags = this.flags;
1597
1618
  if (flags & 16) return true;
1598
- if (flags & 32) if (checkDirty(this.deps, this)) {
1599
- this.flags = flags | 16;
1600
- return true;
1601
- } else this.flags = flags & -33;
1619
+ if (flags & 32) {
1620
+ if (checkDirty(this.deps, this)) {
1621
+ this.flags = flags | 16;
1622
+ return true;
1623
+ } else this.flags = flags & -33;
1624
+ }
1602
1625
  return false;
1603
1626
  }
1604
1627
  };
@@ -1707,10 +1730,12 @@ var ComputedRefImpl = class {
1707
1730
  get _dirty() {
1708
1731
  const flags = this.flags;
1709
1732
  if (flags & 16) return true;
1710
- if (flags & 32) if (checkDirty(this.deps, this)) {
1711
- this.flags = flags | 16;
1712
- return true;
1713
- } else this.flags = flags & -33;
1733
+ if (flags & 32) {
1734
+ if (checkDirty(this.deps, this)) {
1735
+ this.flags = flags | 16;
1736
+ return true;
1737
+ } else this.flags = flags & -33;
1738
+ }
1714
1739
  return false;
1715
1740
  }
1716
1741
  /**
@@ -1771,7 +1796,7 @@ var ComputedRefImpl = class {
1771
1796
  }
1772
1797
  };
1773
1798
  setupOnTrigger(ComputedRefImpl);
1774
- /* @__NO_SIDE_EFFECTS__ */
1799
+ /*@__NO_SIDE_EFFECTS__*/
1775
1800
  function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1776
1801
  let getter;
1777
1802
  let setter;
@@ -1830,25 +1855,26 @@ var WatcherEffect = class extends ReactiveEffect {
1830
1855
  else if (isFunction(s)) return call ? call(s, 2) : s();
1831
1856
  else warnInvalidSource(s, onWarn);
1832
1857
  });
1833
- } else if (isFunction(source)) if (cb) getter = call ? () => call(source, 2) : source;
1834
- else getter = () => {
1835
- if (this.cleanupsLength) {
1836
- const prevSub = setActiveSub();
1858
+ } else if (isFunction(source)) {
1859
+ if (cb) getter = call ? () => call(source, 2) : source;
1860
+ else getter = () => {
1861
+ if (this.cleanupsLength) {
1862
+ const prevSub = setActiveSub();
1863
+ try {
1864
+ cleanup(this);
1865
+ } finally {
1866
+ setActiveSub(prevSub);
1867
+ }
1868
+ }
1869
+ const currentEffect = activeWatcher;
1870
+ activeWatcher = this;
1837
1871
  try {
1838
- cleanup(this);
1872
+ return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
1839
1873
  } finally {
1840
- setActiveSub(prevSub);
1874
+ activeWatcher = currentEffect;
1841
1875
  }
1842
- }
1843
- const currentEffect = activeWatcher;
1844
- activeWatcher = this;
1845
- try {
1846
- return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
1847
- } finally {
1848
- activeWatcher = currentEffect;
1849
- }
1850
- };
1851
- else {
1876
+ };
1877
+ } else {
1852
1878
  getter = NOOP;
1853
1879
  warnInvalidSource(source, onWarn);
1854
1880
  }
@@ -2134,7 +2160,7 @@ let currentFlushPromise = null;
2134
2160
  let jobsLength = 0;
2135
2161
  let flushIndex = 0;
2136
2162
  let postFlushIndex = 0;
2137
- const resolvedPromise = /* @__PURE__ */ Promise.resolve();
2163
+ const resolvedPromise = /*@__PURE__*/ Promise.resolve();
2138
2164
  const RECURSION_LIMIT = 100;
2139
2165
  function nextTick(fn) {
2140
2166
  const p = currentFlushPromise || resolvedPromise;
@@ -2173,6 +2199,7 @@ const doFlushJobs = () => {
2173
2199
  flushJobs();
2174
2200
  } catch (e) {
2175
2201
  currentFlushPromise = null;
2202
+ if (jobsLength || postJobs.length) queueFlush();
2176
2203
  throw e;
2177
2204
  }
2178
2205
  };
@@ -2180,9 +2207,10 @@ function queueFlush() {
2180
2207
  if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
2181
2208
  }
2182
2209
  function queuePostFlushCb(jobs, id = Infinity) {
2183
- if (!isArray(jobs)) if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
2184
- else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
2185
- else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
2210
+ if (!isArray(jobs)) {
2211
+ if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
2212
+ else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
2213
+ } else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
2186
2214
  queueFlush();
2187
2215
  }
2188
2216
  function flushPreFlushCbs(instance, seen) {
@@ -2196,8 +2224,11 @@ function flushPreFlushCbs(instance, seen) {
2196
2224
  i--;
2197
2225
  jobsLength--;
2198
2226
  if (cb.flags & 2) cb.flags &= -2;
2199
- cb();
2200
- if (!(cb.flags & 2)) cb.flags &= -2;
2227
+ try {
2228
+ cb();
2229
+ } finally {
2230
+ if (!(cb.flags & 2)) cb.flags &= -2;
2231
+ }
2201
2232
  }
2202
2233
  }
2203
2234
  function flushPostFlushCbs(seen) {
@@ -2210,18 +2241,22 @@ function flushPostFlushCbs(seen) {
2210
2241
  activePostJobs = postJobs;
2211
2242
  postJobs = [];
2212
2243
  seen = seen || /* @__PURE__ */ new Map();
2213
- while (postFlushIndex < activePostJobs.length) {
2214
- const cb = activePostJobs[postFlushIndex++];
2215
- if (checkRecursiveUpdates(seen, cb)) continue;
2216
- if (cb.flags & 2) cb.flags &= -2;
2217
- if (!(cb.flags & 4)) try {
2218
- cb();
2219
- } finally {
2220
- cb.flags &= -2;
2244
+ try {
2245
+ while (postFlushIndex < activePostJobs.length) {
2246
+ const cb = activePostJobs[postFlushIndex++];
2247
+ if (checkRecursiveUpdates(seen, cb)) continue;
2248
+ if (cb.flags & 2) cb.flags &= -2;
2249
+ if (!(cb.flags & 4)) try {
2250
+ cb();
2251
+ } finally {
2252
+ if (!(cb.flags & 2)) cb.flags &= -2;
2253
+ }
2221
2254
  }
2255
+ } finally {
2256
+ while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
2257
+ activePostJobs = null;
2258
+ postFlushIndex = 0;
2222
2259
  }
2223
- activePostJobs = null;
2224
- postFlushIndex = 0;
2225
2260
  }
2226
2261
  }
2227
2262
  let isFlushing = false;
@@ -2231,9 +2266,12 @@ let isFlushing = false;
2231
2266
  function flushOnAppMount(instance) {
2232
2267
  if (!isFlushing) {
2233
2268
  isFlushing = true;
2234
- flushPreFlushCbs(instance);
2235
- flushPostFlushCbs();
2236
- isFlushing = false;
2269
+ try {
2270
+ flushPreFlushCbs(instance);
2271
+ flushPostFlushCbs();
2272
+ } finally {
2273
+ isFlushing = false;
2274
+ }
2237
2275
  }
2238
2276
  }
2239
2277
  function flushJobs(seen) {
@@ -2263,8 +2301,8 @@ function flushJobs(seen) {
2263
2301
  jobsLength = 0;
2264
2302
  jobs.length = 0;
2265
2303
  flushPostFlushCbs(seen);
2266
- currentFlushPromise = null;
2267
2304
  if (jobsLength || postJobs.length) flushJobs(seen);
2305
+ else currentFlushPromise = null;
2268
2306
  }
2269
2307
  }
2270
2308
  function checkRecursiveUpdates(seen, fn) {
@@ -2295,6 +2333,19 @@ getGlobalThis().__VUE_HMR_RUNTIME__ = {
2295
2333
  rerender: tryWrap(rerender),
2296
2334
  reload: tryWrap(reload)
2297
2335
  };
2336
+ function runWithHmrUpdating(fn) {
2337
+ isHmrUpdating = true;
2338
+ let done = false;
2339
+ try {
2340
+ fn();
2341
+ done = true;
2342
+ } finally {
2343
+ if (done) nextTick(() => {
2344
+ isHmrUpdating = false;
2345
+ });
2346
+ else isHmrUpdating = false;
2347
+ }
2348
+ }
2298
2349
  const map = /* @__PURE__ */ new Map();
2299
2350
  function registerHMR(instance) {
2300
2351
  const id = instance.type.__hmrId;
@@ -2336,18 +2387,16 @@ function rerender(id, newRender) {
2336
2387
  instance.render = newRender;
2337
2388
  normalizeClassComponent(instance.type).render = newRender;
2338
2389
  }
2339
- isHmrUpdating = true;
2340
- if (instance.vapor) {
2341
- if (!instance.isUnmounted) instance.hmrRerender();
2342
- } else {
2343
- const i = instance;
2344
- if (!(i.effect.flags & 1024)) {
2345
- i.renderCache = [];
2346
- i.effect.run();
2390
+ runWithHmrUpdating(() => {
2391
+ if (instance.vapor) {
2392
+ if (!instance.isUnmounted) instance.hmrRerender();
2393
+ } else {
2394
+ const i = instance;
2395
+ if (!(i.effect.flags & 1024)) {
2396
+ i.renderCache = [];
2397
+ i.effect.run();
2398
+ }
2347
2399
  }
2348
- }
2349
- nextTick(() => {
2350
- isHmrUpdating = false;
2351
2400
  });
2352
2401
  });
2353
2402
  }
@@ -2362,15 +2411,17 @@ function reload(id, newComp) {
2362
2411
  for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
2363
2412
  const dirtyInstances = new Set(instances);
2364
2413
  const rerenderedParents = /* @__PURE__ */ new Set();
2365
- for (const instance of instances) {
2366
- const parent = instance.parent;
2367
- if (parent) {
2368
- if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2369
- rerenderedParents.add(parent);
2370
- parent.hmrRerender();
2371
- }
2372
- } else instance.hmrReload(newComp);
2373
- }
2414
+ runWithHmrUpdating(() => {
2415
+ for (const instance of instances) {
2416
+ const parent = instance.parent;
2417
+ if (parent) {
2418
+ if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
2419
+ rerenderedParents.add(parent);
2420
+ parent.hmrRerender();
2421
+ }
2422
+ } else instance.hmrReload(newComp);
2423
+ }
2424
+ });
2374
2425
  } else {
2375
2426
  const parentUpdates = /* @__PURE__ */ new Map();
2376
2427
  const dirtyInstanceSet = new Set(instances);
@@ -2404,21 +2455,22 @@ function reload(id, newComp) {
2404
2455
  }
2405
2456
  parentUpdates.forEach((updates, parent) => {
2406
2457
  queueJob(() => {
2407
- isHmrUpdating = true;
2408
- if (parent.vapor) parent.hmrRerender();
2409
- else {
2410
- const i = parent;
2411
- if (!(i.effect.flags & 1024)) {
2412
- i.renderCache = [];
2413
- i.effect.run();
2414
- }
2458
+ try {
2459
+ runWithHmrUpdating(() => {
2460
+ if (parent.vapor) parent.hmrRerender();
2461
+ else {
2462
+ const i = parent;
2463
+ if (!(i.effect.flags & 1024)) {
2464
+ i.renderCache = [];
2465
+ i.effect.run();
2466
+ }
2467
+ }
2468
+ });
2469
+ } finally {
2470
+ updates.forEach(([instance, dirtyInstances]) => {
2471
+ dirtyInstances.delete(instance);
2472
+ });
2415
2473
  }
2416
- nextTick(() => {
2417
- isHmrUpdating = false;
2418
- });
2419
- updates.forEach(([instance, dirtyInstances]) => {
2420
- dirtyInstances.delete(instance);
2421
- });
2422
2474
  });
2423
2475
  });
2424
2476
  }
@@ -2487,20 +2539,20 @@ function devtoolsInitApp(app, version) {
2487
2539
  function devtoolsUnmountApp(app) {
2488
2540
  emit$1("app:unmount", app);
2489
2541
  }
2490
- const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added");
2491
- const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated");
2492
- const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook("component:removed");
2542
+ const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
2543
+ const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
2544
+ const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
2493
2545
  const devtoolsComponentRemoved = (component) => {
2494
2546
  if (devtools && typeof devtools.cleanupBuffer === "function" && !devtools.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
2495
2547
  };
2496
- /* @__NO_SIDE_EFFECTS__ */
2548
+ /*@__NO_SIDE_EFFECTS__*/
2497
2549
  function createDevtoolsComponentHook(hook) {
2498
2550
  return (component) => {
2499
2551
  emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
2500
2552
  };
2501
2553
  }
2502
- const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start");
2503
- const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end");
2554
+ const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
2555
+ const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
2504
2556
  function createDevtoolsPerformanceHook(hook) {
2505
2557
  return (component, type, time) => {
2506
2558
  emit$1(hook, component.appContext.app, component.uid, component, type, time);
@@ -2827,15 +2879,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
2827
2879
  if (rawRef.f) {
2828
2880
  const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
2829
2881
  if (isUnmount) isArray(existing) && remove(existing, refValue);
2830
- else if (!isArray(existing)) if (_isString) {
2831
- refs[ref] = [refValue];
2832
- if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
2833
- } else {
2834
- const newVal = [refValue];
2835
- if (canSetRef(ref, rawRef.k)) ref.value = newVal;
2836
- if (rawRef.k) refs[rawRef.k] = newVal;
2837
- }
2838
- else if (!existing.includes(refValue)) existing.push(refValue);
2882
+ else if (!isArray(existing)) {
2883
+ if (_isString) {
2884
+ refs[ref] = [refValue];
2885
+ if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
2886
+ } else {
2887
+ const newVal = [refValue];
2888
+ if (canSetRef(ref, rawRef.k)) ref.value = newVal;
2889
+ if (rawRef.k) refs[rawRef.k] = newVal;
2890
+ }
2891
+ } else if (!existing.includes(refValue)) existing.push(refValue);
2839
2892
  } else if (_isString) {
2840
2893
  refs[ref] = value;
2841
2894
  if (canSetSetupRef(ref)) setupState[ref] = value;
@@ -2971,11 +3024,38 @@ const getPublicInstance = (i) => {
2971
3024
  if (isStatefulComponent(i)) return getComponentPublicInstance(i);
2972
3025
  return getPublicInstance(i.parent);
2973
3026
  };
3027
+ const resolveDevRootEl = (vnode) => {
3028
+ let found = false;
3029
+ while (true) {
3030
+ if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
3031
+ const root = filterSingleRoot(vnode.children);
3032
+ if (!root) return;
3033
+ vnode = root;
3034
+ found = true;
3035
+ continue;
3036
+ }
3037
+ const component = vnode.component;
3038
+ if (component && component.subTree) {
3039
+ vnode = component.subTree;
3040
+ continue;
3041
+ }
3042
+ const suspense = vnode.suspense;
3043
+ if (suspense && suspense.activeBranch) {
3044
+ vnode = suspense.activeBranch;
3045
+ continue;
3046
+ }
3047
+ return found ? vnode.el : void 0;
3048
+ }
3049
+ };
3050
+ const getDevRootFragmentEl = (i) => {
3051
+ const el = i.subTree && resolveDevRootEl(i.subTree);
3052
+ return el === void 0 ? i.vnode.el : el;
3053
+ };
2974
3054
  let publicPropertiesMap;
2975
3055
  const getPublicPropertiesMap = () => {
2976
3056
  if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
2977
3057
  $: (i) => i,
2978
- $el: (i) => i.vnode.el,
3058
+ $el: (i) => getDevRootFragmentEl(i),
2979
3059
  $data: (i) => i.data,
2980
3060
  $props: (i) => /* @__PURE__ */ shallowReadonly(i.props),
2981
3061
  $attrs: (i) => /* @__PURE__ */ shallowReadonly(i.attrs),
@@ -3192,11 +3272,12 @@ function applyOptions(instance) {
3192
3272
  const opt = computedOptions[key];
3193
3273
  const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
3194
3274
  if (get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
3275
+ const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
3276
+ warn$1(`Write operation failed: computed property "${key}" is readonly.`);
3277
+ };
3195
3278
  const c = computed({
3196
3279
  get,
3197
- set: !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
3198
- warn$1(`Write operation failed: computed property "${key}" is readonly.`);
3199
- }
3280
+ set
3200
3281
  });
3201
3282
  Object.defineProperty(ctx, key, {
3202
3283
  enumerable: true,
@@ -3253,9 +3334,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
3253
3334
  for (const key in injectOptions) {
3254
3335
  const opt = injectOptions[key];
3255
3336
  let injected;
3256
- if (isObject(opt)) if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
3257
- else injected = inject(opt.from || key);
3258
- else injected = inject(opt);
3337
+ if (isObject(opt)) {
3338
+ if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
3339
+ else injected = inject(opt.from || key);
3340
+ } else injected = inject(opt);
3259
3341
  if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
3260
3342
  enumerable: true,
3261
3343
  configurable: true,
@@ -3276,13 +3358,14 @@ function createWatcher(raw, ctx, publicThis, key) {
3276
3358
  if (isFunction(handler)) watch(getter, handler);
3277
3359
  else warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
3278
3360
  } else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
3279
- else if (isObject(raw)) if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
3280
- else {
3281
- const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
3282
- if (isFunction(handler)) watch(getter, handler, raw);
3283
- else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
3284
- }
3285
- else warn$1(`Invalid watch option: "${key}"`, raw);
3361
+ else if (isObject(raw)) {
3362
+ if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
3363
+ else {
3364
+ const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
3365
+ if (isFunction(handler)) watch(getter, handler, raw);
3366
+ else warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
3367
+ }
3368
+ } else warn$1(`Invalid watch option: "${key}"`, raw);
3286
3369
  }
3287
3370
  /**
3288
3371
  * Resolve merged options and cache it on the component.
@@ -3368,7 +3451,7 @@ function mergeObjectOptions(to, from) {
3368
3451
  }
3369
3452
  function mergeEmitsOrPropsOptions(to, from) {
3370
3453
  if (to) {
3371
- if (isArray(to) && isArray(from)) return [...new Set([...to, ...from])];
3454
+ if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
3372
3455
  return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
3373
3456
  } else return from;
3374
3457
  }
@@ -3487,8 +3570,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
3487
3570
  } else warn$1(`Cannot unmount an app that is not mounted.`);
3488
3571
  },
3489
3572
  provide(key, value) {
3490
- if (key in context.provides) if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
3491
- else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
3573
+ if (key in context.provides) {
3574
+ if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
3575
+ else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
3576
+ }
3492
3577
  context.provides[key] = value;
3493
3578
  return app;
3494
3579
  },
@@ -3527,12 +3612,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
3527
3612
  if (instance.isUnmounted) return;
3528
3613
  {
3529
3614
  const { emitsOptions, propsOptions } = instance;
3530
- if (emitsOptions) if (!(event in emitsOptions) && true) {
3531
- if (!propsOptions || !propsOptions[0] || !(toHandlerKey(camelize(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
3532
- } else {
3533
- const validator = emitsOptions[event];
3534
- if (isFunction(validator)) {
3535
- if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
3615
+ if (emitsOptions) {
3616
+ if (!(event in emitsOptions) && true) {
3617
+ if (!propsOptions || !propsOptions[0] || !(toHandlerKey(camelize(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
3618
+ } else {
3619
+ const validator = emitsOptions[event];
3620
+ if (isFunction(validator)) {
3621
+ if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
3622
+ }
3536
3623
  }
3537
3624
  }
3538
3625
  }
@@ -3541,7 +3628,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
3541
3628
  const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
3542
3629
  if (modifiers) {
3543
3630
  if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
3544
- if (modifiers.number) args = rawArgs.map(looseToNumber);
3631
+ if (modifiers.number) args = args.map(looseToNumber);
3545
3632
  }
3546
3633
  devtoolsComponentEmit(instance, event, args);
3547
3634
  {
@@ -3721,10 +3808,12 @@ function filterSingleRoot(children, recurse = true) {
3721
3808
  for (let i = 0; i < children.length; i++) {
3722
3809
  const child = children[i];
3723
3810
  if (isVNode$2(child)) {
3724
- if (child.type !== Comment || child.children === "v-if") if (singleRoot) return;
3725
- else {
3726
- singleRoot = child;
3727
- if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
3811
+ if (child.type !== Comment || child.children === "v-if") {
3812
+ if (singleRoot) return;
3813
+ else {
3814
+ singleRoot = child;
3815
+ if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
3816
+ }
3728
3817
  }
3729
3818
  } else return;
3730
3819
  }
@@ -3845,16 +3934,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3845
3934
  let key = propsToUpdate[i];
3846
3935
  if (isEmitListener(instance.emitsOptions, key)) continue;
3847
3936
  const value = rawProps[key];
3848
- if (options) if (hasOwn(attrs, key)) {
3849
- if (value !== attrs[key]) {
3850
- attrs[key] = value;
3851
- hasAttrsChanged = true;
3937
+ if (options) {
3938
+ if (hasOwn(attrs, key)) {
3939
+ if (value !== attrs[key]) {
3940
+ attrs[key] = value;
3941
+ hasAttrsChanged = true;
3942
+ }
3943
+ } else {
3944
+ const camelizedKey = camelize(key);
3945
+ props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3852
3946
  }
3853
- } else {
3854
- const camelizedKey = camelize(key);
3855
- props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
3856
- }
3857
- else if (value !== attrs[key]) {
3947
+ } else if (value !== attrs[key]) {
3858
3948
  attrs[key] = value;
3859
3949
  hasAttrsChanged = true;
3860
3950
  }
@@ -3863,9 +3953,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3863
3953
  } else {
3864
3954
  if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
3865
3955
  let kebabKey;
3866
- for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) if (options) {
3867
- if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
3868
- } else delete props[key];
3956
+ for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
3957
+ if (options) {
3958
+ if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
3959
+ } else delete props[key];
3960
+ }
3869
3961
  if (attrs !== rawCurrentProps) {
3870
3962
  for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
3871
3963
  delete attrs[key];
@@ -3884,9 +3976,10 @@ function setFullProps(instance, rawProps, props, attrs) {
3884
3976
  if (isReservedProp(key)) continue;
3885
3977
  const value = rawProps[key];
3886
3978
  let camelKey;
3887
- if (options && hasOwn(options, camelKey = camelize(key))) if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3888
- else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3889
- else if (!isEmitListener(instance.emitsOptions, key)) {
3979
+ if (options && hasOwn(options, camelKey = camelize(key))) {
3980
+ if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
3981
+ else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
3982
+ } else if (!isEmitListener(instance.emitsOptions, key)) {
3890
3983
  if (!(key in attrs) || value !== attrs[key]) {
3891
3984
  attrs[key] = value;
3892
3985
  hasAttrsChanged = true;
@@ -4049,7 +4142,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
4049
4142
  }
4050
4143
  if (validator && !validator(value, /* @__PURE__ */ shallowReadonly(resolvedProps))) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
4051
4144
  }
4052
- const isSimpleType = /* @__PURE__ */ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
4145
+ const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
4053
4146
  /**
4054
4147
  * dev only
4055
4148
  */
@@ -4162,12 +4255,13 @@ const updateSlots = (instance, children, optimized) => {
4162
4255
  let deletionComparisonTarget = EMPTY_OBJ;
4163
4256
  if (vnode.shapeFlag & 32) {
4164
4257
  const type = children._;
4165
- if (type) if (isHmrUpdating) {
4166
- assignSlots(slots, children, optimized);
4167
- trigger(instance, "set", "$slots");
4168
- } else if (optimized && type === 1) needDeletionCheck = false;
4169
- else assignSlots(slots, children, optimized);
4170
- else {
4258
+ if (type) {
4259
+ if (isHmrUpdating) {
4260
+ assignSlots(slots, children, optimized);
4261
+ trigger(instance, "set", "$slots");
4262
+ } else if (optimized && type === 1) needDeletionCheck = false;
4263
+ else assignSlots(slots, children, optimized);
4264
+ } else {
4171
4265
  needDeletionCheck = !children.$stable;
4172
4266
  normalizeObjectSlots(children, slots, instance);
4173
4267
  }
@@ -4185,7 +4279,7 @@ const updateSlots = (instance, children, optimized) => {
4185
4279
  let supported;
4186
4280
  let perf;
4187
4281
  let cachedNow$1 = 0;
4188
- const p$1 = /* @__PURE__ */ Promise.resolve();
4282
+ const p$1 = /*@__PURE__*/ Promise.resolve();
4189
4283
  const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
4190
4284
  /**
4191
4285
  * @internal
@@ -4271,7 +4365,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4271
4365
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4272
4366
  break;
4273
4367
  case VaporSlot:
4274
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
4368
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
4275
4369
  break;
4276
4370
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4277
4371
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -4390,7 +4484,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4390
4484
  for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
4391
4485
  };
4392
4486
  const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
4393
- for (let i = start; i < children.length; i++) patch(null, children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode$1(children[i]), container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4487
+ for (let i = start; i < children.length; i++) {
4488
+ const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode$1(children[i]);
4489
+ patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4490
+ }
4394
4491
  };
4395
4492
  const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
4396
4493
  const el = n2.el = n1.el;
@@ -4402,6 +4499,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4402
4499
  let vnodeHook;
4403
4500
  parentComponent && toggleRecurse(parentComponent, false);
4404
4501
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4502
+ if (n2.ibu) n2.ibu();
4405
4503
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4406
4504
  parentComponent && toggleRecurse(parentComponent, true);
4407
4505
  if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -4435,8 +4533,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4435
4533
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
4436
4534
  }
4437
4535
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
4438
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
4536
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
4439
4537
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4538
+ n2.iu && n2.iu();
4440
4539
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4441
4540
  }, void 0, parentSuspense);
4442
4541
  };
@@ -4444,7 +4543,8 @@ function baseCreateRenderer(options, createHydrationFns) {
4444
4543
  for (let i = 0; i < newChildren.length; i++) {
4445
4544
  const oldVNode = oldChildren[i];
4446
4545
  const newVNode = newChildren[i];
4447
- patch(oldVNode, newVNode, oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
4546
+ const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
4547
+ patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
4448
4548
  }
4449
4549
  };
4450
4550
  const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
@@ -4482,41 +4582,46 @@ function baseCreateRenderer(options, createHydrationFns) {
4482
4582
  };
4483
4583
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
4484
4584
  n2.slotScopeIds = slotScopeIds;
4485
- if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
4486
- else {
4487
- const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
4488
- getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
4489
- if (n2.dirs) {
4490
- invokeDirectiveHook(n2, null, parentComponent, "created");
4491
- invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
4585
+ if (n2.type.__vapor) {
4586
+ if (n1 == null) {
4587
+ if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
4588
+ else {
4589
+ const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
4590
+ getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
4591
+ if (n2.dirs) {
4592
+ invokeDirectiveHook(n2, null, parentComponent, "created");
4593
+ invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
4594
+ }
4595
+ }, () => {
4596
+ if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
4597
+ });
4598
+ if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
4599
+ const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
4600
+ if (vnodeMountedHook) {
4601
+ const scopedVNode = n2;
4602
+ queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
4603
+ }
4492
4604
  }
4493
- }, () => {
4494
- if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
4495
- });
4496
- if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
4497
- const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
4498
- if (vnodeMountedHook) {
4499
- const scopedVNode = n2;
4500
- queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
4605
+ } else {
4606
+ const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
4607
+ getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
4608
+ if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4609
+ }, () => {
4610
+ const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
4611
+ if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
4612
+ if (n2.ibu) n2.ibu();
4613
+ });
4614
+ const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
4615
+ if (shouldUpdate && (vnodeUpdatedHook || n2.dirs || n2.iu)) queuePostRenderEffect(() => {
4616
+ n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4617
+ vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
4618
+ n2.iu && n2.iu();
4619
+ }, void 0, parentSuspense);
4501
4620
  }
4502
- }
4503
- else {
4504
- const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
4505
- getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
4506
- if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4507
- }, () => {
4508
- const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
4509
- if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
4510
- });
4511
- const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
4512
- if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
4513
- n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4514
- vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
4515
- }, void 0, parentSuspense);
4516
- }
4517
- else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
4518
- else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
4519
- else updateComponent(n1, n2, optimized);
4621
+ } else if (n1 == null) {
4622
+ if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
4623
+ else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
4624
+ } else updateComponent(n1, n2, optimized);
4520
4625
  };
4521
4626
  const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
4522
4627
  const instance = initialVNode.component = createComponentInstance$1(initialVNode, parentComponent, parentSuspense);
@@ -4557,16 +4662,17 @@ function baseCreateRenderer(options, createHydrationFns) {
4557
4662
  };
4558
4663
  const updateComponent = (n1, n2, optimized) => {
4559
4664
  const instance = n2.component = n1.component;
4560
- if (shouldUpdateComponent(n1, n2, optimized)) if (instance.asyncDep && !instance.asyncResolved) {
4561
- pushWarningContext$1(n2);
4562
- updateComponentPreRender(instance, n2, optimized);
4563
- popWarningContext$1();
4564
- return;
4665
+ if (shouldUpdateComponent(n1, n2, optimized)) {
4666
+ if (instance.asyncDep && !instance.asyncResolved) {
4667
+ pushWarningContext$1(n2);
4668
+ updateComponentPreRender(instance, n2, optimized);
4669
+ popWarningContext$1();
4670
+ return;
4671
+ } else {
4672
+ instance.next = n2;
4673
+ instance.effect.run();
4674
+ }
4565
4675
  } else {
4566
- instance.next = n2;
4567
- instance.effect.run();
4568
- }
4569
- else {
4570
4676
  n2.el = n1.el;
4571
4677
  instance.vnode = n2;
4572
4678
  }
@@ -4664,6 +4770,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4664
4770
  } else next = vnode;
4665
4771
  if (bu) invokeArrayFns(bu);
4666
4772
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
4773
+ if (next.ibu) next.ibu();
4667
4774
  toggleRecurse(instance, true);
4668
4775
  startMeasure(instance, `render`);
4669
4776
  const nextTree = renderComponentRoot$1(instance);
@@ -4676,7 +4783,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4676
4783
  next.el = nextTree.el;
4677
4784
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
4678
4785
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
4679
- if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), void 0, parentSuspense);
4786
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
4787
+ vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
4788
+ next.iu && next.iu();
4789
+ }, void 0, parentSuspense);
4680
4790
  devtoolsComponentUpdated(instance);
4681
4791
  popWarningContext$1();
4682
4792
  }
@@ -4716,9 +4826,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4716
4826
  if (shapeFlag & 8) {
4717
4827
  if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
4718
4828
  if (c2 !== c1) hostSetElementText(container, c2);
4719
- } else if (prevShapeFlag & 16) if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4720
- else unmountChildren(c1, parentComponent, parentSuspense, true);
4721
- else {
4829
+ } else if (prevShapeFlag & 16) {
4830
+ if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4831
+ else unmountChildren(c1, parentComponent, parentSuspense, true);
4832
+ } else {
4722
4833
  if (prevShapeFlag & 8) hostSetElementText(container, "");
4723
4834
  if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4724
4835
  }
@@ -4817,8 +4928,10 @@ function baseCreateRenderer(options, createHydrationFns) {
4817
4928
  const anchorVNode = c2[nextIndex + 1];
4818
4929
  const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
4819
4930
  if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4820
- else if (moved) if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
4821
- else j--;
4931
+ else if (moved) {
4932
+ if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
4933
+ else j--;
4934
+ }
4822
4935
  }
4823
4936
  }
4824
4937
  };
@@ -4850,26 +4963,27 @@ function baseCreateRenderer(options, createHydrationFns) {
4850
4963
  moveStaticNode(vnode, container, anchor);
4851
4964
  return;
4852
4965
  }
4853
- if (moveType !== 2 && shapeFlag & 1 && transition) if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
4854
- else {
4855
- const { leave, delayLeave, afterLeave } = transition;
4856
- const remove = () => {
4857
- if (vnode.ctx.isUnmounted) hostRemove(el);
4858
- else hostInsert(el, container, anchor);
4859
- };
4860
- const performLeave = () => {
4861
- const wasLeaving = el._isLeaving || !!el[leaveCbKey];
4862
- if (el._isLeaving) el[leaveCbKey](true);
4863
- if (transition.persisted && !wasLeaving) remove();
4864
- else leave(el, () => {
4865
- remove();
4866
- afterLeave && afterLeave();
4867
- });
4868
- };
4869
- if (delayLeave) delayLeave(el, remove, performLeave);
4870
- else performLeave();
4871
- }
4872
- else hostInsert(el, container, anchor);
4966
+ if (moveType !== 2 && shapeFlag & 1 && transition) {
4967
+ if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
4968
+ else {
4969
+ const { leave, delayLeave, afterLeave } = transition;
4970
+ const remove = () => {
4971
+ if (vnode.ctx.isUnmounted) hostRemove(el);
4972
+ else hostInsert(el, container, anchor);
4973
+ };
4974
+ const performLeave = () => {
4975
+ const wasLeaving = el._isLeaving || !!el[leaveCbKey];
4976
+ if (el._isLeaving) el[leaveCbKey](true);
4977
+ if (transition.persisted && !wasLeaving) remove();
4978
+ else leave(el, () => {
4979
+ remove();
4980
+ afterLeave && afterLeave();
4981
+ });
4982
+ };
4983
+ if (delayLeave) delayLeave(el, remove, performLeave);
4984
+ else performLeave();
4985
+ }
4986
+ } else hostInsert(el, container, anchor);
4873
4987
  };
4874
4988
  const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
4875
4989
  const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
@@ -4889,16 +5003,17 @@ function baseCreateRenderer(options, createHydrationFns) {
4889
5003
  const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
4890
5004
  let vnodeHook;
4891
5005
  if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
4892
- if (shapeFlag & 6) if (isVaporComponent(type)) {
4893
- if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
4894
- getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
4895
- if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
4896
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
4897
- vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
4898
- }, void 0, parentSuspense);
4899
- return;
4900
- } else unmountComponent(vnode.component, parentSuspense, doRemove);
4901
- else {
5006
+ if (shapeFlag & 6) {
5007
+ if (isVaporComponent(type)) {
5008
+ if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
5009
+ getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5010
+ if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
5011
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
5012
+ vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
5013
+ }, void 0, parentSuspense);
5014
+ return;
5015
+ } else unmountComponent(vnode.component, parentSuspense, doRemove);
5016
+ } else {
4902
5017
  if (shapeFlag & 128) {
4903
5018
  vnode.suspense.unmount(parentSuspense, doRemove);
4904
5019
  return;
@@ -5030,12 +5145,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
5030
5145
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
5031
5146
  }
5032
5147
  function toggleRecurse({ effect, job, vapor }, allowed) {
5033
- if (!vapor) if (allowed) {
5034
- effect.flags |= 128;
5035
- job.flags |= 2;
5036
- } else {
5037
- effect.flags &= -129;
5038
- job.flags &= -3;
5148
+ if (!vapor) {
5149
+ if (allowed) {
5150
+ effect.flags |= 128;
5151
+ job.flags |= 2;
5152
+ } else {
5153
+ effect.flags &= -129;
5154
+ job.flags &= -3;
5155
+ }
5039
5156
  }
5040
5157
  }
5041
5158
  function needTransition(parentSuspense, transition) {
@@ -5075,8 +5192,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
5075
5192
  }
5076
5193
  function locateNonHydratedAsyncRoot(instance) {
5077
5194
  const subComponent = instance.subTree && instance.subTree.component;
5078
- if (subComponent) if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
5079
- else return locateNonHydratedAsyncRoot(subComponent);
5195
+ if (subComponent) {
5196
+ if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
5197
+ else return locateNonHydratedAsyncRoot(subComponent);
5198
+ }
5080
5199
  }
5081
5200
  function invalidateMount(hooks) {
5082
5201
  if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
@@ -5120,7 +5239,7 @@ function isVaporComponent(type) {
5120
5239
  /**
5121
5240
  * shared between vdom and vapor
5122
5241
  */
5123
- function getInheritedScopeIds(vnode, parentComponent) {
5242
+ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
5124
5243
  const inheritedScopeIds = [];
5125
5244
  let currentParent = parentComponent;
5126
5245
  let currentVNode = vnode;
@@ -5136,6 +5255,8 @@ function getInheritedScopeIds(vnode, parentComponent) {
5136
5255
  currentParent = currentParent.parent;
5137
5256
  } else break;
5138
5257
  }
5258
+ const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
5259
+ if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
5139
5260
  return inheritedScopeIds;
5140
5261
  }
5141
5262
  function resolveAsyncComponentPlaceholder(anchorVnode) {
@@ -5148,9 +5269,10 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
5148
5269
  //#region packages/runtime-core/src/components/Suspense.ts
5149
5270
  const isSuspense = (type) => type.__isSuspense;
5150
5271
  function queueEffectWithSuspense(fn, id, suspense) {
5151
- if (suspense && suspense.pendingBranch) if (isArray(fn)) suspense.effects.push(...fn);
5152
- else suspense.effects.push(fn);
5153
- else queuePostFlushCb(fn, id);
5272
+ if (suspense && suspense.pendingBranch) {
5273
+ if (isArray(fn)) suspense.effects.push(...fn);
5274
+ else suspense.effects.push(fn);
5275
+ } else queuePostFlushCb(fn, id);
5154
5276
  }
5155
5277
  //#endregion
5156
5278
  //#region packages/runtime-core/src/vnode.ts
@@ -5275,8 +5397,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
5275
5397
  if (isVNode$2(type)) {
5276
5398
  const cloned = cloneVNode(type, props, true);
5277
5399
  if (children) normalizeChildren(cloned, children);
5278
- if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
5279
- else currentBlock.push(cloned);
5400
+ if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
5401
+ if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
5402
+ else currentBlock.push(cloned);
5403
+ }
5280
5404
  cloned.patchFlag = -2;
5281
5405
  return cloned;
5282
5406
  }
@@ -5336,7 +5460,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
5336
5460
  ce: vnode.ce,
5337
5461
  vi: vnode.vi,
5338
5462
  vs: cloneVaporSlotMeta(vnode),
5339
- vb: vnode.vb
5463
+ vb: vnode.vb,
5464
+ ibu: vnode.ibu,
5465
+ iu: vnode.iu
5340
5466
  };
5341
5467
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
5342
5468
  return cloned;
@@ -5385,25 +5511,28 @@ function normalizeChildren(vnode, children) {
5385
5511
  const { shapeFlag } = vnode;
5386
5512
  if (children == null) children = null;
5387
5513
  else if (isArray(children)) type = 16;
5388
- else if (typeof children === "object") if (shapeFlag & 65) {
5389
- const slot = children.default;
5390
- if (slot) {
5391
- slot._c && (slot._d = false);
5392
- normalizeChildren(vnode, slot());
5393
- slot._c && (slot._d = true);
5394
- }
5395
- return;
5396
- } else {
5397
- type = 32;
5398
- const slotFlag = children._;
5399
- if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
5400
- else if (slotFlag === 3 && currentRenderingInstance) if (currentRenderingInstance.slots._ === 1) children._ = 1;
5401
- else {
5402
- children._ = 2;
5403
- vnode.patchFlag |= 1024;
5514
+ else if (typeof children === "object") {
5515
+ if (shapeFlag & 65) {
5516
+ const slot = children.default;
5517
+ if (slot) {
5518
+ slot._c && (slot._d = false);
5519
+ normalizeChildren(vnode, slot());
5520
+ slot._c && (slot._d = true);
5521
+ }
5522
+ return;
5523
+ } else {
5524
+ type = 32;
5525
+ const slotFlag = children._;
5526
+ if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
5527
+ else if (slotFlag === 3 && currentRenderingInstance) {
5528
+ if (currentRenderingInstance.slots._ === 1) children._ = 1;
5529
+ else {
5530
+ children._ = 2;
5531
+ vnode.patchFlag |= 1024;
5532
+ }
5533
+ }
5404
5534
  }
5405
- }
5406
- else if (isFunction(children)) {
5535
+ } else if (isFunction(children)) {
5407
5536
  if (shapeFlag & 65) {
5408
5537
  normalizeChildren(vnode, { default: children });
5409
5538
  return;
@@ -5491,7 +5620,7 @@ const restoreCurrentInstance = (prev) => {
5491
5620
  };
5492
5621
  //#endregion
5493
5622
  //#region packages/runtime-core/src/component.ts
5494
- const emptyAppContext = /* @__PURE__ */ createAppContext();
5623
+ const emptyAppContext = /*@__PURE__*/ createAppContext();
5495
5624
  let uid = 0;
5496
5625
  function createComponentInstance$1(vnode, parent, suspense) {
5497
5626
  const type = vnode.type;
@@ -5636,9 +5765,10 @@ function setupStatefulComponent(instance, isSSR) {
5636
5765
  } else finishComponentSetup(instance, isSSR);
5637
5766
  }
5638
5767
  function handleSetupResult(instance, setupResult, isSSR) {
5639
- if (isFunction(setupResult)) if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
5640
- else instance.render = setupResult;
5641
- else if (isObject(setupResult)) {
5768
+ if (isFunction(setupResult)) {
5769
+ if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
5770
+ else instance.render = setupResult;
5771
+ } else if (isObject(setupResult)) {
5642
5772
  if (isVNode$2(setupResult)) warn$1("setup() should not return VNodes directly - return a render function instead.");
5643
5773
  instance.devtoolsRawSetupState = setupResult;
5644
5774
  instance.setupState = proxyRefs(setupResult);
@@ -5660,10 +5790,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
5660
5790
  restoreCurrentInstance(prevInstance);
5661
5791
  }
5662
5792
  }
5663
- if (!Component.render && instance.render === NOOP && !isSSR) if (Component.template)
5793
+ if (!Component.render && instance.render === NOOP && !isSSR) {
5794
+ if (Component.template)
5664
5795
  /* v8 ignore start */
5665
- warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.esm-browser.js\" instead.");
5666
- else warn$1(`Component is missing template or render function: `, Component);
5796
+ warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Use \"vue.esm-browser.js\" instead.");
5797
+ else warn$1(`Component is missing template or render function: `, Component);
5798
+ }
5667
5799
  }
5668
5800
  const attrsProxyHandlers = {
5669
5801
  get(target, key) {
@@ -5767,7 +5899,7 @@ const computed = (getterOrOptions, debugOptions) => {
5767
5899
  };
5768
5900
  //#endregion
5769
5901
  //#region packages/runtime-core/src/index.ts
5770
- const version = "3.6.0-rc.4";
5902
+ const version = "3.6.0-rc.6";
5771
5903
  const warn = warn$1;
5772
5904
  /**
5773
5905
  * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
@@ -5790,7 +5922,7 @@ const ssrUtils = {
5790
5922
  let policy = void 0;
5791
5923
  const tt = typeof window !== "undefined" && window.trustedTypes;
5792
5924
  if (tt) try {
5793
- policy = /* @__PURE__ */ tt.createPolicy("vue", { createHTML: (val) => val });
5925
+ policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
5794
5926
  } catch (e) {
5795
5927
  warn(`Error creating trusted types policy: ${e}`);
5796
5928
  }
@@ -5798,7 +5930,7 @@ const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) =>
5798
5930
  const svgNS = "http://www.w3.org/2000/svg";
5799
5931
  const mathmlNS = "http://www.w3.org/1998/Math/MathML";
5800
5932
  const doc = typeof document !== "undefined" ? document : null;
5801
- const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
5933
+ const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
5802
5934
  const nodeOps = {
5803
5935
  insert: (child, parent, anchor) => {
5804
5936
  parent.insertBefore(child, anchor || null);
@@ -5873,14 +6005,15 @@ const vShow = {
5873
6005
  },
5874
6006
  updated(el, { value, oldValue }, { transition }) {
5875
6007
  if (!value === !oldValue) return;
5876
- if (transition) if (value) {
5877
- transition.beforeEnter(el);
5878
- setDisplay(el, true);
5879
- transition.enter(el);
5880
- } else transition.leave(el, () => {
5881
- setDisplay(el, false);
5882
- });
5883
- else setDisplay(el, value);
6008
+ if (transition) {
6009
+ if (value) {
6010
+ transition.beforeEnter(el);
6011
+ setDisplay(el, true);
6012
+ transition.enter(el);
6013
+ } else transition.leave(el, () => {
6014
+ setDisplay(el, false);
6015
+ });
6016
+ } else setDisplay(el, value);
5884
6017
  },
5885
6018
  beforeUnmount(el, { value }) {
5886
6019
  setDisplay(el, value);
@@ -5906,11 +6039,13 @@ function patchStyle(el, prev, next) {
5906
6039
  const isCssString = isString(next);
5907
6040
  let hasControlledDisplay = false;
5908
6041
  if (next && !isCssString) {
5909
- if (prev) if (!isString(prev)) {
5910
- for (const key in prev) if (next[key] == null) setStyle(style, key, "");
5911
- } else for (const prevStyle of prev.split(";")) {
5912
- const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
5913
- if (next[key] == null) setStyle(style, key, "");
6042
+ if (prev) {
6043
+ if (!isString(prev)) {
6044
+ for (const key in prev) if (next[key] == null) setStyle(style, key, "");
6045
+ } else for (const prevStyle of prev.split(";")) {
6046
+ const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
6047
+ if (next[key] == null) setStyle(style, key, "");
6048
+ }
5914
6049
  }
5915
6050
  for (const key in next) {
5916
6051
  if (key === "display") hasControlledDisplay = true;
@@ -5939,8 +6074,10 @@ function setStyle(style, name, rawVal) {
5939
6074
  else {
5940
6075
  const val = rawVal == null ? "" : String(rawVal);
5941
6076
  if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
5942
- if (name.startsWith("--")) style.setProperty(name, val);
5943
- else {
6077
+ if (name.startsWith("--")) {
6078
+ if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
6079
+ else style.setProperty(name, val);
6080
+ } else {
5944
6081
  const prefixed = autoPrefix(style, name);
5945
6082
  if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
5946
6083
  else style[prefixed] = val;
@@ -5977,9 +6114,10 @@ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
5977
6114
  //#region packages/runtime-dom/src/modules/attrs.ts
5978
6115
  const xlinkNS = "http://www.w3.org/1999/xlink";
5979
6116
  function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
5980
- if (isSVG && key.startsWith("xlink:")) if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
5981
- else el.setAttributeNS(xlinkNS, key, value);
5982
- else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
6117
+ if (isSVG && key.startsWith("xlink:")) {
6118
+ if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
6119
+ else el.setAttributeNS(xlinkNS, key, value);
6120
+ } else if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
5983
6121
  else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
5984
6122
  }
5985
6123
  //#endregion
@@ -6052,7 +6190,7 @@ function parseEventName(name) {
6052
6190
  return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
6053
6191
  }
6054
6192
  let cachedNow = 0;
6055
- const p = /* @__PURE__ */ Promise.resolve();
6193
+ const p = /*@__PURE__*/ Promise.resolve();
6056
6194
  const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
6057
6195
  function createInvoker(initialValue, instance) {
6058
6196
  const invoker = (e) => {
@@ -6284,19 +6422,39 @@ const vModelSelectInit = (el, value, number, set) => {
6284
6422
  el._modelValue = value;
6285
6423
  addEventListener(el, "change", () => {
6286
6424
  const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
6287
- (set || el[assignKey])(el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
6288
- el._assigning = true;
6289
- nextTick(() => {
6290
- el._assigning = false;
6291
- });
6425
+ const multiple = el.multiple;
6426
+ const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
6427
+ const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
6428
+ try {
6429
+ (set || el[assignKey])(assignedValue);
6430
+ } finally {
6431
+ nextTick(() => {
6432
+ if (el._pendingValue === pending) el._pendingValue = void 0;
6433
+ });
6434
+ }
6292
6435
  });
6293
6436
  };
6437
+ function isSameSelectValue(value, assignedValue, multiple) {
6438
+ if (!multiple) return looseEqual(value, assignedValue);
6439
+ if (isArray(value)) return looseEqual(value, assignedValue);
6440
+ if (isSet(value)) {
6441
+ if (value.size !== assignedValue.length) return false;
6442
+ for (const item of assignedValue) if (!value.has(item)) return false;
6443
+ return true;
6444
+ }
6445
+ return false;
6446
+ }
6294
6447
  /**
6295
6448
  * @internal
6296
6449
  */
6297
6450
  const vModelSetSelected = (el, value) => {
6298
6451
  el._modelValue = value;
6299
- if (el._assigning) return;
6452
+ const pending = el._pendingValue;
6453
+ el._pendingValue = void 0;
6454
+ if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
6455
+ setSelected(el, value);
6456
+ };
6457
+ function setSelected(el, value) {
6300
6458
  const isMultiple = el.multiple;
6301
6459
  const isArrayValue = isArray(value);
6302
6460
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -6306,18 +6464,19 @@ const vModelSetSelected = (el, value) => {
6306
6464
  for (let i = 0, l = el.options.length; i < l; i++) {
6307
6465
  const option = el.options[i];
6308
6466
  const optionValue = getValue(option);
6309
- if (isMultiple) if (isArrayValue) {
6310
- const optionType = typeof optionValue;
6311
- if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
6312
- else option.selected = looseIndexOf(value, optionValue) > -1;
6313
- } else option.selected = value.has(optionValue);
6314
- else if (looseEqual(getValue(option), value)) {
6467
+ if (isMultiple) {
6468
+ if (isArrayValue) {
6469
+ const optionType = typeof optionValue;
6470
+ if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
6471
+ else option.selected = looseIndexOf(value, optionValue) > -1;
6472
+ } else option.selected = value.has(optionValue);
6473
+ } else if (looseEqual(getValue(option), value)) {
6315
6474
  if (el.selectedIndex !== i) el.selectedIndex = i;
6316
6475
  return;
6317
6476
  }
6318
6477
  }
6319
6478
  if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
6320
- };
6479
+ }
6321
6480
  /**
6322
6481
  * @internal retrieve raw value set via :value bindings
6323
6482
  */
@@ -6380,7 +6539,7 @@ function initVModelForSSR() {
6380
6539
  }
6381
6540
  //#endregion
6382
6541
  //#region packages/runtime-dom/src/index.ts
6383
- const rendererOptions = /* @__PURE__ */ extend({ patchProp }, nodeOps);
6542
+ const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
6384
6543
  let renderer;
6385
6544
  function ensureRenderer() {
6386
6545
  return renderer || (renderer = createRenderer(rendererOptions));
@@ -6464,7 +6623,7 @@ const initDirectivesForSSR = () => {
6464
6623
  };
6465
6624
  //#endregion
6466
6625
  //#region packages/server-renderer/src/helpers/ssrRenderAttrs.ts
6467
- const shouldIgnoreProp = /* @__PURE__ */ makeMap(`,key,ref,innerHTML,textContent,ref_key,ref_for`);
6626
+ const shouldIgnoreProp = /*@__PURE__*/ makeMap(`,key,ref,innerHTML,textContent,ref_key,ref_for`);
6468
6627
  function ssrRenderAttrs(props, tag) {
6469
6628
  let ret = "";
6470
6629
  for (let key in props) {
@@ -6609,14 +6768,16 @@ function ssrRenderList(source, renderItem) {
6609
6768
  return;
6610
6769
  }
6611
6770
  for (let i = 0; i < source; i++) renderItem(i + 1, i);
6612
- } else if (isObject(source)) if (source[Symbol.iterator]) {
6613
- let i = 0;
6614
- for (const item of source) renderItem(item, i++);
6615
- } else {
6616
- const keys = Object.keys(source);
6617
- for (let i = 0, l = keys.length; i < l; i++) {
6618
- const key = keys[i];
6619
- renderItem(source[key], key, i);
6771
+ } else if (isObject(source)) {
6772
+ if (source[Symbol.iterator]) {
6773
+ let i = 0;
6774
+ for (const item of source) renderItem(item, i++);
6775
+ } else {
6776
+ const keys = Object.keys(source);
6777
+ for (let i = 0, l = keys.length; i < l; i++) {
6778
+ const key = keys[i];
6779
+ renderItem(source[key], key, i);
6780
+ }
6620
6781
  }
6621
6782
  }
6622
6783
  }
@@ -6771,7 +6932,8 @@ function renderComponentSubTree(instance, slotScopeId) {
6771
6932
  }
6772
6933
  } else if (instance.render && instance.render !== NOOP) renderVNode(push, instance.subTree = renderComponentRoot(instance), instance, slotScopeId);
6773
6934
  else {
6774
- warn(`Component ${comp.name || comp.__file || `<Anonymous>`} is missing template or render function.`);
6935
+ const componentName = comp.name || comp.__file || `<Anonymous>`;
6936
+ warn(`Component ${componentName} is missing template or render function.`);
6775
6937
  push(`<!---->`);
6776
6938
  }
6777
6939
  }