@vue/runtime-dom 3.6.0-rc.13 → 3.6.0-rc.15

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-dom v3.6.0-rc.13
2
+ * @vue/runtime-dom v3.6.0-rc.15
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -60,10 +60,18 @@ var VueRuntimeDOM = (function(exports) {
60
60
  const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
61
61
  const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
62
62
  const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
63
+ const STRING_CACHE_MAX_SIZE = 1e4;
63
64
  const cacheStringFunction = (fn) => {
64
- const cache = Object.create(null);
65
+ let cache = Object.create(null);
66
+ let size = 0;
65
67
  return ((str) => {
66
- return cache[str] || (cache[str] = fn(str));
68
+ const hit = cache[str];
69
+ if (hit !== void 0) return hit;
70
+ if (++size > STRING_CACHE_MAX_SIZE) {
71
+ cache = Object.create(null);
72
+ size = 1;
73
+ }
74
+ return cache[str] = fn(str);
67
75
  });
68
76
  };
69
77
  const camelizeRE = /-(\w)/g;
@@ -71,22 +79,22 @@ var VueRuntimeDOM = (function(exports) {
71
79
  /**
72
80
  * @private
73
81
  */
74
- const camelize = cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
82
+ const camelize = /*@__PURE__*/ cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
75
83
  const hyphenateRE = /\B([A-Z])/g;
76
84
  /**
77
85
  * @private
78
86
  */
79
- const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
87
+ const hyphenate = /*@__PURE__*/ cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
80
88
  /**
81
89
  * @private
82
90
  */
83
- const capitalize = cacheStringFunction((str) => {
91
+ const capitalize = /*@__PURE__*/ cacheStringFunction((str) => {
84
92
  return str.charAt(0).toUpperCase() + str.slice(1);
85
93
  });
86
94
  /**
87
95
  * @private
88
96
  */
89
- const toHandlerKey = cacheStringFunction((str) => {
97
+ const toHandlerKey = /*@__PURE__*/ cacheStringFunction((str) => {
90
98
  return str ? `on${capitalize(str)}` : ``;
91
99
  });
92
100
  /**
@@ -212,26 +220,11 @@ var VueRuntimeDOM = (function(exports) {
212
220
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
213
221
  */
214
222
  const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
215
- //#endregion
216
- //#region packages/shared/src/domAttrConfig.ts
217
- /**
218
- * On the client we only need to offer special cases for boolean attributes that
219
- * have different names from their corresponding dom properties:
220
- * - itemscope -> N/A
221
- * - allowfullscreen -> allowFullscreen
222
- * - formnovalidate -> formNoValidate
223
- * - ismap -> isMap
224
- * - nomodule -> noModule
225
- * - novalidate -> noValidate
226
- * - playsinline -> playsInline
227
- * - readonly -> readOnly
228
- */
229
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
230
- const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
223
+ const isSpecialBooleanAttr = /*@__PURE__*/ makeMap("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly");
231
224
  /**
232
225
  * The full list is needed during SSR to produce the correct initial markup.
233
226
  */
234
- const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
227
+ const isBooleanAttr = /*@__PURE__*/ makeMap("itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
235
228
  /**
236
229
  * Boolean attributes should be included if the value is truthy or ''.
237
230
  * e.g. `<select multiple>` compiles to `{ multiple: '' }`
@@ -428,39 +421,30 @@ var VueRuntimeDOM = (function(exports) {
428
421
  return String(value);
429
422
  }
430
423
  //#endregion
431
- //#region packages/reactivity/src/debug.ts
432
- const triggerEventInfos = [];
433
- function onTrack(sub, debugInfo) {
434
- if (sub.onTrack) sub.onTrack(extend({ effect: sub }, debugInfo));
435
- }
436
- function onTrigger(sub) {
437
- if (sub.onTrigger) {
438
- const debugInfo = triggerEventInfos[triggerEventInfos.length - 1];
439
- sub.onTrigger(extend({ effect: sub }, debugInfo));
424
+ //#region packages/shared/src/vaporFlags.ts
425
+ /**
426
+ * The data of the comment a vapor server render opens the branch of a `v-if`
427
+ * chain with, `<!--[1-->`: the digits are the branch's position in the chain,
428
+ * and `<!--]-->` closes it like a fragment.
429
+ */
430
+ function isVaporBranchStart(data) {
431
+ if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
432
+ for (let i = 1; i < data.length; i++) {
433
+ const c = data.charCodeAt(i);
434
+ if (c < 48 || c > 57) return false;
440
435
  }
436
+ return true;
441
437
  }
442
- function setupOnTrigger(target) {
443
- Object.defineProperty(target.prototype, "onTrigger", {
444
- get() {
445
- return this._onTrigger;
446
- },
447
- set(val) {
448
- if (val && !this._onTrigger) setupFlagsHandler(this);
449
- this._onTrigger = val;
450
- }
451
- });
438
+ /**
439
+ * The data of a comment opening a range only a vapor server render emits:
440
+ * `<!--{-->` around the render of a component, or a v-if branch's.
441
+ */
442
+ function isVaporRangeStart(data) {
443
+ return data === "{" || isVaporBranchStart(data);
452
444
  }
453
- function setupFlagsHandler(target) {
454
- target._flags = target.flags;
455
- Object.defineProperty(target, "flags", {
456
- get() {
457
- return target._flags;
458
- },
459
- set(value) {
460
- if (!(target._flags & 48) && !!(value & 48)) onTrigger(this);
461
- target._flags = value;
462
- }
463
- });
445
+ /** The data of the comment closing the range `open` opens. */
446
+ function rangeCloseOf(open) {
447
+ return open === "(" ? ")" : open === "{" ? "}" : "]";
464
448
  }
465
449
  //#endregion
466
450
  //#region packages/reactivity/src/warning.ts
@@ -472,13 +456,7 @@ var VueRuntimeDOM = (function(exports) {
472
456
  const notifyBuffer = [];
473
457
  let batchDepth = 0;
474
458
  let activeSub = void 0;
475
- let runDepth = 0;
476
- function incRunDepth() {
477
- ++runDepth;
478
- }
479
- function decRunDepth() {
480
- --runDepth;
481
- }
459
+ const CHECKING = 512;
482
460
  let globalVersion = 0;
483
461
  let notifyIndex = 0;
484
462
  let notifyBufferLength = 0;
@@ -527,6 +505,7 @@ var VueRuntimeDOM = (function(exports) {
527
505
  const nextDep = link.nextDep;
528
506
  const nextSub = link.nextSub;
529
507
  const prevSub = link.prevSub;
508
+ link.prevDep = link.nextDep = link.prevSub = link.nextSub = void 0;
530
509
  if (nextDep !== void 0) nextDep.prevDep = prevDep;
531
510
  else sub.depsTail = prevDep;
532
511
  if (prevDep !== void 0) prevDep.nextDep = nextDep;
@@ -534,7 +513,7 @@ var VueRuntimeDOM = (function(exports) {
534
513
  if (nextSub !== void 0) nextSub.prevSub = prevSub;
535
514
  else dep.subsTail = prevSub;
536
515
  if (prevSub !== void 0) prevSub.nextSub = nextSub;
537
- else if ((dep.subs = nextSub) === void 0) {
516
+ else if ((dep.subs = nextSub) === void 0 && dep.flags & 1) {
538
517
  let toRemove = dep.deps;
539
518
  if (toRemove !== void 0) {
540
519
  do
@@ -552,14 +531,12 @@ var VueRuntimeDOM = (function(exports) {
552
531
  const sub = link.sub;
553
532
  let flags = sub.flags;
554
533
  if (flags & 3) {
555
- if (!(flags & 60)) {
556
- sub.flags = flags | 32;
557
- if (runDepth) sub.flags |= 8;
558
- } else if (!(flags & 12)) flags = 0;
534
+ if (!(flags & 44)) sub.flags = flags | 32;
535
+ else if (!(flags & 12)) flags = 0;
559
536
  else if (!(flags & 4)) sub.flags = flags & -9 | 32;
560
537
  else if (!(flags & 48) && isValidLink(link, sub)) {
561
538
  sub.flags = flags | 40;
562
- flags &= 1;
539
+ flags = sub === activeSub || activeSub === void 0 ? 0 : flags & 1;
563
540
  } else flags = 0;
564
541
  if (flags & 2) notifyBuffer[notifyBufferLength++] = sub;
565
542
  if (flags & 1) {
@@ -595,7 +572,7 @@ var VueRuntimeDOM = (function(exports) {
595
572
  function startTracking(sub) {
596
573
  ++globalVersion;
597
574
  sub.depsTail = void 0;
598
- sub.flags = sub.flags & -57 | 4;
575
+ sub.flags = sub.flags & -569 | 4;
599
576
  return setActiveSub(sub);
600
577
  }
601
578
  function endTracking(sub, prevSub) {
@@ -603,8 +580,11 @@ var VueRuntimeDOM = (function(exports) {
603
580
  activeSub = prevSub;
604
581
  const depsTail = sub.depsTail;
605
582
  let toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
606
- while (toRemove !== void 0) toRemove = unlink(toRemove, sub);
607
- sub.flags &= -5;
583
+ while (toRemove !== void 0) {
584
+ unlink(toRemove, sub);
585
+ toRemove = depsTail !== void 0 ? depsTail.nextDep : sub.deps;
586
+ }
587
+ if ((sub.flags &= -5) & 8) markRecursed(sub);
608
588
  }
609
589
  function flush() {
610
590
  let hasError = false;
@@ -626,45 +606,67 @@ var VueRuntimeDOM = (function(exports) {
626
606
  if (hasError) throw error;
627
607
  }
628
608
  function checkDirty(link, sub) {
609
+ try {
610
+ return walkDirty(link, sub);
611
+ } catch (err) {
612
+ markStale(sub);
613
+ throw err;
614
+ }
615
+ }
616
+ function walkDirty(link, sub) {
617
+ const root = sub;
629
618
  let stack;
630
619
  let checkDepth = 0;
620
+ let staleDepth = 0;
621
+ let staleFloor = 0;
631
622
  top: do {
632
623
  const dep = link.dep;
633
624
  const depFlags = dep.flags;
634
625
  let dirty = false;
635
626
  if (sub.flags & 16) dirty = true;
636
627
  else if ((depFlags & 17) === 17) {
637
- const subs = dep.subs;
638
628
  if (dep.update()) {
639
- if (subs.nextSub !== void 0) shallowPropagate(subs);
629
+ const subs = dep.subs;
630
+ if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
640
631
  dirty = true;
641
632
  }
642
633
  } else if ((depFlags & 33) === 33) {
643
- stack = {
644
- value: link,
645
- prev: stack
646
- };
647
- link = dep.deps;
648
- sub = dep;
649
- ++checkDepth;
650
- continue;
634
+ const depth = dep === root ? 0 : depFlags & CHECKING ? checkingDepth(dep, stack, checkDepth) : -1;
635
+ if (depth < 0) {
636
+ if (link.nextSub !== void 0 || link.prevSub !== void 0) dep.flags = depFlags | CHECKING;
637
+ stack = {
638
+ value: link,
639
+ prev: stack
640
+ };
641
+ link = dep.deps;
642
+ sub = dep;
643
+ ++checkDepth;
644
+ continue;
645
+ }
646
+ if (depth < checkDepth) {
647
+ staleFloor = staleDepth && staleFloor < depth ? staleFloor : depth;
648
+ staleDepth = checkDepth;
649
+ }
651
650
  }
652
651
  if (!dirty && link.nextDep !== void 0) {
653
652
  link = link.nextDep;
654
653
  continue;
655
654
  }
656
655
  while (checkDepth) {
656
+ const stale = checkDepth === staleDepth;
657
+ if (stale && --staleDepth === staleFloor) staleDepth = 0;
657
658
  --checkDepth;
658
659
  link = stack.value;
659
660
  stack = stack.prev;
660
661
  if (dirty) {
661
- const subs = sub.subs;
662
662
  if (sub.update()) {
663
- if (subs.nextSub !== void 0) shallowPropagate(subs);
663
+ const subs = sub.subs;
664
+ if (subs !== void 0 && (subs !== link || subs.nextSub !== void 0)) shallowPropagate(subs);
664
665
  sub = link.sub;
665
666
  continue;
666
667
  }
667
- } else sub.flags &= -33;
668
+ } else if (stale) sub.flags = sub.flags & -545 | 16;
669
+ else sub.flags &= -545;
668
670
  sub = link.sub;
669
671
  if (link.nextDep !== void 0) {
670
672
  link = link.nextDep;
@@ -672,9 +674,21 @@ var VueRuntimeDOM = (function(exports) {
672
674
  }
673
675
  dirty = false;
674
676
  }
675
- return dirty && !!sub.flags;
677
+ return (dirty || !!(sub.flags & 16)) && !!sub.flags;
676
678
  } while (true);
677
679
  }
680
+ function checkingDepth(dep, stack, depth) {
681
+ for (; stack !== void 0; stack = stack.prev, --depth) if (stack.value.dep === dep) return depth;
682
+ return -1;
683
+ }
684
+ function markStale(sub) {
685
+ const nodes = [sub];
686
+ do {
687
+ sub = nodes.pop();
688
+ sub.flags = sub.flags & -33 | 16;
689
+ for (let link = sub.deps; link !== void 0; link = link.nextDep) if (link.dep.flags & 32) nodes.push(link.dep);
690
+ } while (nodes.length);
691
+ }
678
692
  function shallowPropagate(link) {
679
693
  do {
680
694
  const sub = link.sub;
@@ -692,6 +706,71 @@ var VueRuntimeDOM = (function(exports) {
692
706
  }
693
707
  return false;
694
708
  }
709
+ function markRecursed(sub) {
710
+ const nodes = [sub];
711
+ do {
712
+ sub = nodes.pop();
713
+ for (let link = sub.deps; link !== void 0; link = link.nextDep) {
714
+ const dep = link.dep;
715
+ if ((dep.flags & 40) === 32) {
716
+ dep.flags |= 8;
717
+ nodes.push(dep);
718
+ }
719
+ }
720
+ } while (nodes.length);
721
+ }
722
+ //#endregion
723
+ //#region packages/reactivity/src/debug.ts
724
+ const triggered = [];
725
+ function onTrack(sub, debugInfo) {
726
+ if (sub.onTrack) sub.onTrack(extend({ effect: sub }, debugInfo));
727
+ }
728
+ function onTrigger(sub, debugInfo) {
729
+ if (sub.onTrigger) sub.onTrigger(extend({ effect: sub }, debugInfo));
730
+ }
731
+ function startTrigger() {
732
+ triggered.push([]);
733
+ }
734
+ function endTrigger(debugInfo) {
735
+ const subs = triggered.pop();
736
+ if (subs.length) {
737
+ startBatch();
738
+ try {
739
+ for (let i = 0; i < subs.length; i++) {
740
+ const sub = subs[i];
741
+ if (sub.flags & 3) onTrigger(sub, debugInfo);
742
+ }
743
+ } finally {
744
+ endBatch();
745
+ }
746
+ }
747
+ }
748
+ function setupOnTrigger(target) {
749
+ Object.defineProperty(target.prototype, "onTrigger", {
750
+ get() {
751
+ return this._onTrigger;
752
+ },
753
+ set(val) {
754
+ if (val && !this._onTrigger) setupFlagsHandler(this);
755
+ this._onTrigger = val;
756
+ }
757
+ });
758
+ }
759
+ function setupFlagsHandler(target) {
760
+ target._flags = target.flags;
761
+ Object.defineProperty(target, "flags", {
762
+ get() {
763
+ return target._flags;
764
+ },
765
+ set(value) {
766
+ if (!(target._flags & 48) && !!(value & 48)) {
767
+ if (triggered.length) triggered[triggered.length - 1].push(this);
768
+ else onTrigger(this);
769
+ }
770
+ target._flags = value;
771
+ }
772
+ });
773
+ }
695
774
  //#endregion
696
775
  //#region packages/reactivity/src/dep.ts
697
776
  var Dep = class {
@@ -751,20 +830,12 @@ var VueRuntimeDOM = (function(exports) {
751
830
  if (!depsMap) return;
752
831
  const run = (dep) => {
753
832
  if (dep !== void 0 && dep.subs !== void 0) {
754
- triggerEventInfos.push({
755
- target,
756
- type,
757
- key,
758
- newValue,
759
- oldValue,
760
- oldTarget
761
- });
762
833
  propagate(dep.subs);
763
834
  shallowPropagate(dep.subs);
764
- triggerEventInfos.pop();
765
835
  }
766
836
  };
767
837
  startBatch();
838
+ startTrigger();
768
839
  if (type === "clear") depsMap.forEach(run);
769
840
  else {
770
841
  const targetIsArray = isArray(target);
@@ -794,6 +865,14 @@ var VueRuntimeDOM = (function(exports) {
794
865
  }
795
866
  }
796
867
  }
868
+ endTrigger({
869
+ target,
870
+ type,
871
+ key,
872
+ newValue,
873
+ oldValue,
874
+ oldTarget
875
+ });
797
876
  endBatch();
798
877
  }
799
878
  function getDepFromReactive(object, key) {
@@ -1008,7 +1087,7 @@ var VueRuntimeDOM = (function(exports) {
1008
1087
  //#endregion
1009
1088
  //#region packages/reactivity/src/baseHandlers.ts
1010
1089
  const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
1011
- const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
1090
+ const builtInSymbols = /*@__PURE__*/ new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
1012
1091
  function hasOwnProperty(key) {
1013
1092
  if (!isSymbol(key)) key = String(key);
1014
1093
  const obj = /* @__PURE__ */ toRaw(this);
@@ -1592,16 +1671,16 @@ var VueRuntimeDOM = (function(exports) {
1592
1671
  this._value = !useDirectValue && this._wrap ? this._wrap(newValue) : newValue;
1593
1672
  const subs = this.subs;
1594
1673
  if (subs !== void 0) {
1595
- triggerEventInfos.push({
1674
+ startTrigger();
1675
+ propagate(subs);
1676
+ endTrigger({
1596
1677
  target: this,
1597
1678
  type: "set",
1598
1679
  key: "value",
1599
1680
  newValue,
1600
1681
  oldValue
1601
1682
  });
1602
- propagate(subs);
1603
1683
  if (!batchDepth) flush();
1604
- triggerEventInfos.pop();
1605
1684
  }
1606
1685
  }
1607
1686
  }
@@ -1638,8 +1717,10 @@ var VueRuntimeDOM = (function(exports) {
1638
1717
  function triggerRef(ref) {
1639
1718
  const dep = ref.dep;
1640
1719
  if (dep !== void 0 && dep.subs !== void 0) {
1720
+ startTrigger();
1641
1721
  propagate(dep.subs);
1642
1722
  shallowPropagate(dep.subs);
1723
+ endTrigger();
1643
1724
  if (!batchDepth) flush();
1644
1725
  }
1645
1726
  }
@@ -1830,6 +1911,10 @@ var VueRuntimeDOM = (function(exports) {
1830
1911
  get active() {
1831
1912
  return !(this.flags & 1024);
1832
1913
  }
1914
+ /** @internal */
1915
+ get running() {
1916
+ return !!(this.flags & 4);
1917
+ }
1833
1918
  pause() {
1834
1919
  this.flags |= 256;
1835
1920
  }
@@ -1843,11 +1928,9 @@ var VueRuntimeDOM = (function(exports) {
1843
1928
  if (!this.active) return this.fn();
1844
1929
  cleanup(this);
1845
1930
  const prevSub = startTracking(this);
1846
- incRunDepth();
1847
1931
  try {
1848
1932
  return this.fn();
1849
1933
  } finally {
1850
- decRunDepth();
1851
1934
  endTracking(this, prevSub);
1852
1935
  const flags = this.flags;
1853
1936
  if ((flags & 136) === 136) {
@@ -1870,9 +1953,9 @@ var VueRuntimeDOM = (function(exports) {
1870
1953
  if (flags & 16) return true;
1871
1954
  if (flags & 32) {
1872
1955
  if (checkDirty(this.deps, this)) {
1873
- this.flags = flags | 16;
1956
+ if (this.active) this.flags |= 16;
1874
1957
  return true;
1875
- } else this.flags = flags & -33;
1958
+ } else this.flags &= -33;
1876
1959
  }
1877
1960
  return false;
1878
1961
  }
@@ -1884,20 +1967,17 @@ var VueRuntimeDOM = (function(exports) {
1884
1967
  if (options) {
1885
1968
  const { onStop, scheduler } = options;
1886
1969
  if (onStop) {
1887
- options.onStop = void 0;
1888
1970
  const stop = e.stop.bind(e);
1889
1971
  e.stop = () => {
1890
1972
  stop();
1891
1973
  onStop();
1892
1974
  };
1893
1975
  }
1894
- if (scheduler) {
1895
- options.scheduler = void 0;
1896
- e.notify = () => {
1897
- if (!(e.flags & 256)) scheduler();
1898
- };
1899
- }
1900
- extend(e, options);
1976
+ if (scheduler) e.notify = () => {
1977
+ if (!(e.flags & 1280)) scheduler();
1978
+ };
1979
+ e.onTrack = options.onTrack;
1980
+ e.onTrigger = options.onTrigger;
1901
1981
  }
1902
1982
  try {
1903
1983
  e.run();
@@ -1957,8 +2037,10 @@ var VueRuntimeDOM = (function(exports) {
1957
2037
  const flags = this.flags;
1958
2038
  if (flags & 256) {
1959
2039
  this.flags = flags & -257;
1960
- for (let link = this.deps; link !== void 0; link = link.nextDep) {
1961
- const dep = link.dep;
2040
+ const deps = [];
2041
+ for (let link = this.deps; link !== void 0; link = link.nextDep) deps.push(link.dep);
2042
+ for (let i = 0; i < deps.length; i++) {
2043
+ const dep = deps[i];
1962
2044
  if ("resume" in dep) dep.resume();
1963
2045
  }
1964
2046
  }
@@ -1987,8 +2069,10 @@ var VueRuntimeDOM = (function(exports) {
1987
2069
  while (dep !== void 0) {
1988
2070
  const node = dep.dep;
1989
2071
  if ("stop" in node) {
1990
- dep = dep.nextDep;
2072
+ const prev = dep.prevDep;
1991
2073
  node.stop();
2074
+ const next = prev !== void 0 ? prev.nextDep : this.deps;
2075
+ dep = next === dep ? dep.nextDep : next;
1992
2076
  } else dep = unlink(dep, this);
1993
2077
  }
1994
2078
  cleanup(this);
@@ -2029,11 +2113,14 @@ var VueRuntimeDOM = (function(exports) {
2029
2113
  * @see {@link https://vuejs.org/api/reactivity-advanced.html#onscopedispose}
2030
2114
  */
2031
2115
  function onScopeDispose(fn, failSilently = false) {
2032
- if (activeEffectScope !== void 0) activeEffectScope.cleanups[activeEffectScope.cleanupsLength++] = fn;
2033
- else if (!failSilently) warn$2("onScopeDispose() is called when there is no active effect scope to be associated with.");
2116
+ if (activeEffectScope !== void 0) {
2117
+ if (activeEffectScope.active) activeEffectScope.cleanups[activeEffectScope.cleanupsLength++] = fn;
2118
+ else fn();
2119
+ } else if (!failSilently) warn$2("onScopeDispose() is called when there is no active effect scope to be associated with.");
2034
2120
  }
2035
2121
  //#endregion
2036
2122
  //#region packages/reactivity/src/computed.ts
2123
+ const FAILED = 64;
2037
2124
  /**
2038
2125
  * @private exported by @vue/reactivity for Vue core use, but not exported from
2039
2126
  * the main vue package
@@ -2082,12 +2169,24 @@ var VueRuntimeDOM = (function(exports) {
2082
2169
  }
2083
2170
  get value() {
2084
2171
  const flags = this.flags;
2085
- if (flags & 16 || flags & 32 && checkDirty(this.deps, this)) {
2086
- if (this.update()) {
2087
- const subs = this.subs;
2088
- if (subs !== void 0) shallowPropagate(subs);
2089
- }
2090
- } else if (flags & 32) this.flags = flags & -33;
2172
+ try {
2173
+ if (flags & 16 || flags & 32 && checkDirty(this.deps, this)) {
2174
+ if (this.update()) {
2175
+ const subs = this.subs;
2176
+ if (subs !== void 0) shallowPropagate(subs);
2177
+ }
2178
+ } else if (flags & 32) this.flags = flags & -33;
2179
+ } catch (err) {
2180
+ if (activeSub !== void 0) {
2181
+ onTrack(activeSub, {
2182
+ target: this,
2183
+ type: "get",
2184
+ key: "value"
2185
+ });
2186
+ link(this, activeSub);
2187
+ } else if (activeEffectScope !== void 0) link(this, activeEffectScope);
2188
+ throw err;
2189
+ }
2091
2190
  if (activeSub !== void 0) {
2092
2191
  onTrack(activeSub, {
2093
2192
  target: this,
@@ -2095,7 +2194,18 @@ var VueRuntimeDOM = (function(exports) {
2095
2194
  key: "value"
2096
2195
  });
2097
2196
  link(this, activeSub);
2098
- } else if (activeEffectScope !== void 0) link(this, activeEffectScope);
2197
+ } else if (activeEffectScope !== void 0) {
2198
+ if (activeEffectScope.active) link(this, activeEffectScope);
2199
+ else if (this.subs === void 0) {
2200
+ let dep = this.deps;
2201
+ if (dep !== void 0) {
2202
+ do
2203
+ dep = unlink(dep, this);
2204
+ while (dep !== void 0);
2205
+ this.flags |= 16;
2206
+ }
2207
+ }
2208
+ }
2099
2209
  return this._value;
2100
2210
  }
2101
2211
  set value(newValue) {
@@ -2107,11 +2217,15 @@ var VueRuntimeDOM = (function(exports) {
2107
2217
  try {
2108
2218
  const oldValue = this._value;
2109
2219
  const newValue = this.fn(oldValue);
2110
- if (hasChanged(oldValue, newValue)) {
2220
+ if (hasChanged(oldValue, newValue) || this.flags & FAILED) {
2111
2221
  this._value = newValue;
2222
+ this.flags &= -65;
2112
2223
  return true;
2113
2224
  }
2114
2225
  return false;
2226
+ } catch (err) {
2227
+ this.flags |= FAILED;
2228
+ throw err;
2115
2229
  } finally {
2116
2230
  endTracking(this, prevSub);
2117
2231
  }
@@ -2132,6 +2246,7 @@ var VueRuntimeDOM = (function(exports) {
2132
2246
  cRef.onTrack = debugOptions.onTrack;
2133
2247
  cRef.onTrigger = debugOptions.onTrigger;
2134
2248
  }
2249
+ if (isSSR && activeEffectScope !== void 0) link(cRef, activeEffectScope);
2135
2250
  return cRef;
2136
2251
  }
2137
2252
  //#endregion
@@ -2502,7 +2617,7 @@ var VueRuntimeDOM = (function(exports) {
2502
2617
  if (isFunction(fn)) {
2503
2618
  const res = callWithErrorHandling(fn, instance, type, args);
2504
2619
  if (res && isPromise(res)) res.catch((err) => {
2505
- handleError(err, instance, type);
2620
+ handleError(err, instance, type, void 0, true);
2506
2621
  });
2507
2622
  return res;
2508
2623
  }
@@ -2512,7 +2627,7 @@ var VueRuntimeDOM = (function(exports) {
2512
2627
  return values;
2513
2628
  } else warn$1(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`);
2514
2629
  }
2515
- function handleError(err, instance, type, throwInDev = true) {
2630
+ function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
2516
2631
  const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
2517
2632
  if (instance) {
2518
2633
  let cur = instance.parent;
@@ -2520,7 +2635,7 @@ var VueRuntimeDOM = (function(exports) {
2520
2635
  const errorInfo = ErrorTypeStrings$1[type];
2521
2636
  while (cur) {
2522
2637
  const errorCapturedHooks = cur.ec;
2523
- if (errorCapturedHooks) {
2638
+ if (errorCapturedHooks && !cur.isUnmounted && (!isAsyncError || cur.scope.active)) {
2524
2639
  for (let i = 0; i < errorCapturedHooks.length; i++) if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) return;
2525
2640
  }
2526
2641
  cur = cur.parent;
@@ -2825,7 +2940,11 @@ var VueRuntimeDOM = (function(exports) {
2825
2940
  updateComponentDef(record.initialDef, newComp);
2826
2941
  const instances = [...record.instances];
2827
2942
  if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
2828
- for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
2943
+ for (const instance of instances) {
2944
+ if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
2945
+ const oldComp = normalizeClassComponent(instance.type);
2946
+ if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
2947
+ }
2829
2948
  const dirtyInstances = new Set(instances);
2830
2949
  const rerenderedParents = /* @__PURE__ */ new Set();
2831
2950
  runWithHmrUpdating(() => {
@@ -2866,7 +2985,25 @@ var VueRuntimeDOM = (function(exports) {
2866
2985
  if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
2867
2986
  }
2868
2987
  parents.forEach((parent) => {
2869
- queueJob(() => {
2988
+ const children = instances.filter((instance) => instance.parent === parent);
2989
+ const update = () => {
2990
+ if (!parent.scope.active) return;
2991
+ const activeChildren = children.filter((instance) => instance.scope.active);
2992
+ if (!activeChildren.length) return;
2993
+ const pending = activeChildren.find((instance) => instance.asyncDep && !instance.asyncResolved) || locateUnresolvedAsyncRoot(parent);
2994
+ if (pending) {
2995
+ pending.asyncDep.catch(NOOP).then(() => {
2996
+ if (parent.scope.active && (pending.asyncResolved || !pending.scope.active)) queueJob(update);
2997
+ });
2998
+ return;
2999
+ }
3000
+ for (const instance of activeChildren) {
3001
+ const oldComp = normalizeClassComponent(instance.type);
3002
+ let dirtyInstances = hmrDirtyComponents.get(oldComp);
3003
+ if (!dirtyInstances) hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
3004
+ dirtyInstances.add(instance);
3005
+ hmrDirtyComponentsMode.set(oldComp, !!isVapor);
3006
+ }
2870
3007
  runWithHmrUpdating(() => {
2871
3008
  if (parent.vapor) parent.hmrRerender();
2872
3009
  else {
@@ -2877,7 +3014,12 @@ var VueRuntimeDOM = (function(exports) {
2877
3014
  }
2878
3015
  }
2879
3016
  });
2880
- });
3017
+ queuePostFlushCb(() => {
3018
+ hmrDirtyComponents.clear();
3019
+ hmrDirtyComponentsMode.clear();
3020
+ });
3021
+ };
3022
+ queueJob(update);
2881
3023
  });
2882
3024
  }
2883
3025
  queuePostFlushCb(() => {
@@ -3074,18 +3216,35 @@ var VueRuntimeDOM = (function(exports) {
3074
3216
  return vnode;
3075
3217
  }
3076
3218
  function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3077
- const bindings = vnode.dirs;
3219
+ let hookVNode = vnode;
3220
+ if (name === "beforeMount") vnode._mount = vnode;
3221
+ else if (name === "beforeUpdate") {
3222
+ const mount = prevVNode && prevVNode._mount;
3223
+ if (mount) {
3224
+ mount._latest = vnode;
3225
+ vnode._mount = mount;
3226
+ }
3227
+ } else if (name === "mounted") {
3228
+ const latest = vnode._latest;
3229
+ vnode._mount = vnode._latest = void 0;
3230
+ if (latest) {
3231
+ hookVNode = latest;
3232
+ latest._mount = void 0;
3233
+ }
3234
+ }
3235
+ const bindings = hookVNode.dirs;
3078
3236
  const oldBindings = prevVNode && prevVNode.dirs;
3079
3237
  for (let i = 0; i < bindings.length; i++) {
3080
- const binding = bindings[i];
3238
+ let binding = bindings[i];
3081
3239
  if (oldBindings) binding.oldValue = oldBindings[i].value;
3240
+ else if (name === "mounted" && binding.oldValue !== void 0) binding = extend({}, binding, { oldValue: void 0 });
3082
3241
  let hook = binding.dir[name];
3083
3242
  if (hook) {
3084
3243
  const prevSub = setActiveSub();
3085
3244
  callWithAsyncErrorHandling(hook, instance, 8, [
3086
3245
  vnode.el,
3087
3246
  binding,
3088
- vnode,
3247
+ hookVNode,
3089
3248
  prevVNode
3090
3249
  ]);
3091
3250
  setActiveSub(prevSub);
@@ -3506,7 +3665,15 @@ var VueRuntimeDOM = (function(exports) {
3506
3665
  const { mode } = rawProps;
3507
3666
  checkTransitionMode(mode);
3508
3667
  return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
3509
- if (!(instance.effect.flags & 1024)) instance.update();
3668
+ if (!(instance.effect.flags & 1024)) {
3669
+ if (instance.effect.running) {
3670
+ const job = () => {
3671
+ if (!(instance.effect.flags & 1024)) instance.update();
3672
+ };
3673
+ job.i = instance;
3674
+ queueJob(job);
3675
+ } else instance.update();
3676
+ }
3510
3677
  }) : NOOP);
3511
3678
  };
3512
3679
  }
@@ -3536,7 +3703,7 @@ var VueRuntimeDOM = (function(exports) {
3536
3703
  }
3537
3704
  return leavingVNodesCache;
3538
3705
  }
3539
- function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3706
+ function resolveTransitionHooks(vnode, props, state, instance) {
3540
3707
  const key = String(vnode.key);
3541
3708
  const leavingVNodesCache = getLeavingNodesForType(state, vnode);
3542
3709
  const hooks = baseResolveTransitionHooks({
@@ -3559,9 +3726,7 @@ var VueRuntimeDOM = (function(exports) {
3559
3726
  }
3560
3727
  },
3561
3728
  cloneHooks: (vnode) => {
3562
- const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
3563
- if (postClone) postClone(hooks);
3564
- return hooks;
3729
+ return resolveTransitionHooks(vnode, props, state, instance);
3565
3730
  }
3566
3731
  }, props, state, instance);
3567
3732
  if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
@@ -3599,7 +3764,7 @@ var VueRuntimeDOM = (function(exports) {
3599
3764
  callHook(hook, [el]);
3600
3765
  },
3601
3766
  enter(el) {
3602
- if (!isHmrUpdating && isLeaving()) return;
3767
+ if (!isHmrUpdating && isLeaving(el)) return;
3603
3768
  let hook = onEnter;
3604
3769
  let afterHook = onAfterEnter;
3605
3770
  let cancelHook = onEnterCancelled;
@@ -3643,7 +3808,19 @@ var VueRuntimeDOM = (function(exports) {
3643
3808
  else done();
3644
3809
  },
3645
3810
  clone(node) {
3646
- return cloneHooks ? cloneHooks(node) : hooks;
3811
+ if (!cloneHooks) return hooks;
3812
+ const cloned = cloneHooks(node);
3813
+ cloned.afterLeave = () => {
3814
+ if (hooks.afterLeave) hooks.afterLeave();
3815
+ };
3816
+ cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
3817
+ if (hooks.delayLeave) hooks.delayLeave(el, earlyRemove, delayedLeave);
3818
+ else delayedLeave();
3819
+ };
3820
+ cloned.delayedLeave = () => {
3821
+ if (hooks.delayedLeave) hooks.delayedLeave();
3822
+ };
3823
+ return cloned;
3647
3824
  }
3648
3825
  };
3649
3826
  return hooks;
@@ -3678,10 +3855,7 @@ var VueRuntimeDOM = (function(exports) {
3678
3855
  if (state.isLeaving) return emptyPlaceholder(next);
3679
3856
  const nextInner = getInnerChild$1(next);
3680
3857
  if (!nextInner) return emptyPlaceholder(next);
3681
- let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
3682
- if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
3683
- enterHooks = hooks;
3684
- });
3858
+ const enterHooks = resolveTransitionHooks(nextInner, props, state, instance);
3685
3859
  if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
3686
3860
  if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
3687
3861
  const mode = props.mode;
@@ -3747,9 +3921,14 @@ var VueRuntimeDOM = (function(exports) {
3747
3921
  return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
3748
3922
  }
3749
3923
  } else if (vnode.shapeFlag & 128) {
3750
- const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
3751
- const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
3752
- return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
3924
+ const suspense = vnode.suspense;
3925
+ if (suspense) {
3926
+ const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
3927
+ if (branch) return setTransitionHooks(branch, hooks.clone(branch));
3928
+ } else {
3929
+ vnode.ssContent.transition = hooks.clone(vnode.ssContent);
3930
+ vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
3931
+ }
3753
3932
  } else {
3754
3933
  vnode.transition = hooks;
3755
3934
  if (vnode.type === Fragment && isArray(vnode.children)) {
@@ -3967,6 +4146,8 @@ var VueRuntimeDOM = (function(exports) {
3967
4146
  if (isMathMLContainer(container)) return "mathml";
3968
4147
  };
3969
4148
  const isComment = (node) => node.nodeType === 8;
4149
+ /** The data of a comment opening a range a hydration steps over as one. */
4150
+ const isRangeStart = (data) => data === "[" || data === "(" || isVaporRangeStart(data);
3970
4151
  function createHydrationFunctions(rendererInternals) {
3971
4152
  const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
3972
4153
  const hydrate = (vnode, container) => {
@@ -3984,7 +4165,7 @@ var VueRuntimeDOM = (function(exports) {
3984
4165
  };
3985
4166
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
3986
4167
  optimized = optimized || !!vnode.dynamicChildren;
3987
- const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
4168
+ const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporRangeStart(node.data));
3988
4169
  const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
3989
4170
  const { type, ref, shapeFlag, patchFlag } = vnode;
3990
4171
  let domType = node.nodeType;
@@ -4173,16 +4354,17 @@ var VueRuntimeDOM = (function(exports) {
4173
4354
  const container = parentNode(node);
4174
4355
  const first = nextSibling(node);
4175
4356
  const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
4176
- if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
4357
+ const close = isVaporInteropEnabled ? rangeCloseOf(node.data) : node.data === "(" ? ")" : "]";
4358
+ if (next && isComment(next) && next.data === close) return nextSibling(vnode.anchor = next);
4177
4359
  else {
4178
4360
  logMismatchError();
4179
- insert(vnode.anchor = createComment(`]`), container, next);
4361
+ insert(vnode.anchor = createComment(close), container, next);
4180
4362
  return next;
4181
4363
  }
4182
4364
  };
4183
4365
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
4184
4366
  if (!isNodeMismatchAllowed(node, vnode)) {
4185
- warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data === "[" || node.data === "(") ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
4367
+ warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && isRangeStart(node.data) ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
4186
4368
  logMismatchError();
4187
4369
  }
4188
4370
  vnode.el = null;
@@ -4198,18 +4380,18 @@ var VueRuntimeDOM = (function(exports) {
4198
4380
  const container = parentNode(node);
4199
4381
  remove(node);
4200
4382
  patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4201
- if (parentComponent && parentComponent.vnode) {
4383
+ if (parentComponent && parentComponent.vnode && parentComponent.vnode.el === node) {
4202
4384
  parentComponent.vnode.el = vnode.el;
4203
4385
  updateHOCHostEl(parentComponent, vnode.el);
4204
4386
  }
4205
4387
  return next;
4206
4388
  };
4207
- const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
4389
+ const locateClosingAnchor = (node, open = node && isComment(node) && (node.data === "(" || isVaporInteropEnabled && node.data === "{") ? node.data : "[", close = isVaporInteropEnabled ? rangeCloseOf(open) : open === "(" ? ")" : "]") => {
4208
4390
  let match = 0;
4209
4391
  while (node) {
4210
4392
  node = nextSibling(node);
4211
4393
  if (node && isComment(node)) {
4212
- if (node.data === open) match++;
4394
+ if (node.data === open || isVaporInteropEnabled && open === "[" && isVaporBranchStart(node.data)) match++;
4213
4395
  if (node.data === close) {
4214
4396
  if (match === 0) return nextSibling(node);
4215
4397
  else match--;
@@ -4465,9 +4647,9 @@ var VueRuntimeDOM = (function(exports) {
4465
4647
  return teardown;
4466
4648
  };
4467
4649
  function forEachElement(node, cb) {
4468
- if (isComment(node) && (node.data === "[" || node.data === "(")) {
4650
+ if (isComment(node) && isRangeStart(node.data)) {
4469
4651
  const open = node.data;
4470
- const close = open === "[" ? "]" : ")";
4652
+ const close = rangeCloseOf(open);
4471
4653
  let depth = 1;
4472
4654
  let next = node.nextSibling;
4473
4655
  while (next) {
@@ -4476,7 +4658,7 @@ var VueRuntimeDOM = (function(exports) {
4476
4658
  } else if (isComment(next)) {
4477
4659
  if (next.data === close) {
4478
4660
  if (--depth === 0) break;
4479
- } else if (next.data === open) depth++;
4661
+ } else if (close === "]" ? next.data === "[" || isVaporBranchStart(next.data) : next.data === open) depth++;
4480
4662
  }
4481
4663
  next = next.nextSibling;
4482
4664
  }
@@ -4504,7 +4686,7 @@ var VueRuntimeDOM = (function(exports) {
4504
4686
  if (resolvedComp) return () => createInnerComp(resolvedComp, instance);
4505
4687
  const onError = (err) => {
4506
4688
  setPendingRequest(null);
4507
- handleError(err, instance, 13, !errorComponent);
4689
+ handleError(err, instance, 13, !errorComponent, true);
4508
4690
  };
4509
4691
  if (suspensible && instance.suspense || false) return load().then((comp) => {
4510
4692
  return () => createInnerComp(comp, instance);
@@ -4585,10 +4767,12 @@ var VueRuntimeDOM = (function(exports) {
4585
4767
  const delayed = /* @__PURE__ */ ref(!!delay);
4586
4768
  let timeoutTimer;
4587
4769
  let delayTimer;
4588
- if (instance) onUnmounted(() => {
4589
- if (timeoutTimer != null) clearTimeout(timeoutTimer);
4590
- if (delayTimer != null) clearTimeout(delayTimer);
4591
- }, instance);
4770
+ if (instance) instance.scope.run(() => {
4771
+ onScopeDispose(() => {
4772
+ if (timeoutTimer != null) clearTimeout(timeoutTimer);
4773
+ if (delayTimer != null) clearTimeout(delayTimer);
4774
+ });
4775
+ });
4592
4776
  if (delay) delayTimer = setTimeout(() => {
4593
4777
  if (instance && instance.isUnmounted) return;
4594
4778
  delayed.value = false;
@@ -4623,7 +4807,12 @@ var VueRuntimeDOM = (function(exports) {
4623
4807
  }
4624
4808
  return;
4625
4809
  }
4626
- if (!el.parentNode || wasConnected && !el.isConnected) return;
4810
+ if (!el.parentNode) return;
4811
+ if (wasConnected && !el.isConnected) {
4812
+ let current = instance;
4813
+ while (current && !current.isDeactivated) current = current.parent;
4814
+ if (!current) return;
4815
+ }
4627
4816
  hydrate();
4628
4817
  };
4629
4818
  const doHydrate = hydrateStrategy ? () => {
@@ -4677,7 +4866,11 @@ var VueRuntimeDOM = (function(exports) {
4677
4866
  activate(vnode, container, anchor, renderer, keepAliveInstance, parentSuspense, namespace, optimized);
4678
4867
  };
4679
4868
  sharedContext.deactivate = (vnode) => {
4680
- deactivate(vnode, storageContainer, renderer, keepAliveInstance, parentSuspense);
4869
+ const cached = sharedContext.getCachedComponent(vnode);
4870
+ if (!cached || cached.component !== vnode.component) return false;
4871
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(keepAliveInstance, vnode).deactivate(vnode, storageContainer, parentSuspense);
4872
+ else deactivate(vnode, storageContainer, renderer, keepAliveInstance, parentSuspense);
4873
+ return true;
4681
4874
  };
4682
4875
  function unmount(vnode) {
4683
4876
  resetShapeFlag(vnode);
@@ -4709,11 +4902,15 @@ var VueRuntimeDOM = (function(exports) {
4709
4902
  let pendingCacheKey = null;
4710
4903
  const cacheSubtree = () => {
4711
4904
  if (pendingCacheKey != null) {
4712
- if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
4713
- const vnode = getInnerChild(keepAliveInstance.subTree);
4714
- if (vnode.component) cache.set(pendingCacheKey, vnode);
4715
- }, void 0, keepAliveInstance.subTree.suspense);
4716
- else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
4905
+ if (isSuspense(keepAliveInstance.subTree.type)) {
4906
+ const cacheInnerChild = () => {
4907
+ const vnode = getInnerChild(keepAliveInstance.subTree);
4908
+ if (vnode.component) cache.set(pendingCacheKey, vnode);
4909
+ };
4910
+ const suspense = keepAliveInstance.subTree.suspense;
4911
+ if (suspense.pendingBranch) queuePostRenderEffect(cacheInnerChild, void 0, suspense);
4912
+ else cacheInnerChild();
4913
+ } else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
4717
4914
  }
4718
4915
  };
4719
4916
  onMounted(cacheSubtree);
@@ -4818,9 +5015,8 @@ var VueRuntimeDOM = (function(exports) {
4818
5015
  }
4819
5016
  function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
4820
5017
  const injected = injectHook(type, hook, keepAliveRoot, true);
4821
- onUnmounted(() => {
4822
- remove(keepAliveRoot[type], injected);
4823
- }, target);
5018
+ const removal = injectHook("um", () => remove(keepAliveRoot[type], injected), target);
5019
+ removal.flags = 8;
4824
5020
  }
4825
5021
  function resetShapeFlag(vnode) {
4826
5022
  vnode.shapeFlag &= -257;
@@ -5028,6 +5224,11 @@ var VueRuntimeDOM = (function(exports) {
5028
5224
  ret.props = extend({}, ret.props, { key: branchKey });
5029
5225
  ret.key = branchKey;
5030
5226
  }
5227
+ if (isBlockTreeEnabled <= 0) {
5228
+ if (!ret.vs.props) ret.vs.props = ret.props;
5229
+ ret.props = ret.key != null ? { key: ret.key } : null;
5230
+ ret.vs.attrs = EMPTY_OBJ;
5231
+ }
5031
5232
  if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
5032
5233
  return ret;
5033
5234
  }
@@ -6828,8 +7029,10 @@ var VueRuntimeDOM = (function(exports) {
6828
7029
  def(el, "__vnode", vnode, true);
6829
7030
  def(el, "__vueParentComponent", parentComponent, true);
6830
7031
  if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
6831
- if (transition) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
6832
- else hostInsert(el, container, anchor);
7032
+ if (transition) {
7033
+ if (!needTransition(parentSuspense, transition) && !transition.persisted) el[deferredEnterKey] = true;
7034
+ performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense);
7035
+ } else hostInsert(el, container, anchor);
6833
7036
  if ((vnodeHook = props && props.onVnodeMounted) || dirs) {
6834
7037
  const isHmr = isHmrUpdating;
6835
7038
  queuePostRenderEffect(() => {
@@ -7086,16 +7289,20 @@ var VueRuntimeDOM = (function(exports) {
7086
7289
  } else {
7087
7290
  let { next, bu, u, parent, vnode } = instance;
7088
7291
  {
7089
- const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
7090
- if (nonHydratedAsyncRoot) {
7292
+ const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
7293
+ if (unresolvedAsyncRoot) {
7091
7294
  if (next) {
7092
7295
  next.el = vnode.el;
7093
7296
  updateComponentPreRender(instance, next, optimized);
7094
7297
  }
7095
- nonHydratedAsyncRoot.asyncDep.then(() => {
7096
- queuePostRenderEffect(() => {
7097
- if (!instance.isUnmounted) instance.update();
7098
- }, void 0, parentSuspense);
7298
+ unresolvedAsyncRoot.asyncDep.then(() => {
7299
+ const retry = () => {
7300
+ if (instance.effect.flags & 1024) return;
7301
+ if (parentSuspense && parentSuspense.pendingBranch) queuePostRenderEffect(retry, void 0, parentSuspense);
7302
+ else instance.update();
7303
+ };
7304
+ retry.flags = 24;
7305
+ queuePostRenderEffect(retry, void 0, parentSuspense);
7099
7306
  });
7100
7307
  return;
7101
7308
  }
@@ -7118,7 +7325,7 @@ var VueRuntimeDOM = (function(exports) {
7118
7325
  const prevTree = instance.subTree;
7119
7326
  instance.subTree = nextTree;
7120
7327
  startMeasure(instance, `patch`);
7121
- patch(prevTree, nextTree, hostParentNode(prevTree.el), getNextHostNode(prevTree), instance, parentSuspense, namespace);
7328
+ patch(prevTree, nextTree, hostParentNode(prevTree.el || resolveAsyncComponentPlaceholder(prevTree)), getNextHostNode(prevTree), instance, parentSuspense, namespace);
7122
7329
  endMeasure(instance, `patch`);
7123
7330
  next.el = nextTree.el;
7124
7331
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
@@ -7321,9 +7528,7 @@ var VueRuntimeDOM = (function(exports) {
7321
7528
  }
7322
7529
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
7323
7530
  if (shapeFlag & 256) {
7324
- if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
7325
- else parentComponent.ctx.deactivate(vnode);
7326
- return;
7531
+ if (parentComponent.ctx.deactivate(vnode)) return;
7327
7532
  }
7328
7533
  if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
7329
7534
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
@@ -7403,12 +7608,14 @@ var VueRuntimeDOM = (function(exports) {
7403
7608
  if (effect) {
7404
7609
  effect.stop();
7405
7610
  unmount(subTree, instance, parentSuspense, doRemove);
7406
- } else if (instance.vnode.el && subTree) {
7611
+ } else if (subTree) {
7407
7612
  subTree.transition = instance.vnode.transition;
7408
7613
  unmount(subTree, instance, parentSuspense, doRemove);
7409
7614
  }
7410
7615
  if (um) queuePostRenderEffect(um, void 0, parentSuspense);
7411
- queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
7616
+ const markUnmounted = () => instance.isUnmounted = true;
7617
+ markUnmounted.flags = 8;
7618
+ queuePostRenderEffect(markUnmounted, void 0, parentSuspense);
7412
7619
  devtoolsComponentRemoved(instance);
7413
7620
  };
7414
7621
  const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
@@ -7522,11 +7729,11 @@ var VueRuntimeDOM = (function(exports) {
7522
7729
  c2.el && (c2.el.__vnode = c2);
7523
7730
  }
7524
7731
  }
7525
- function locateNonHydratedAsyncRoot(instance) {
7732
+ function locateUnresolvedAsyncRoot(instance) {
7526
7733
  const subComponent = instance.subTree && instance.subTree.component;
7527
7734
  if (subComponent) {
7528
7735
  if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
7529
- else return locateNonHydratedAsyncRoot(subComponent);
7736
+ else return locateUnresolvedAsyncRoot(subComponent);
7530
7737
  }
7531
7738
  }
7532
7739
  function invalidateMount(hooks) {
@@ -7596,7 +7803,9 @@ var VueRuntimeDOM = (function(exports) {
7596
7803
  function resolveAsyncComponentPlaceholder(anchorVnode) {
7597
7804
  if (anchorVnode.placeholder) return anchorVnode.placeholder;
7598
7805
  const instance = anchorVnode.component;
7599
- if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
7806
+ if (instance && instance.subTree) return resolveAsyncComponentPlaceholder(instance.subTree);
7807
+ const suspense = anchorVnode.suspense;
7808
+ if (suspense && suspense.activeBranch) return resolveAsyncComponentPlaceholder(suspense.activeBranch);
7600
7809
  return null;
7601
7810
  }
7602
7811
  //#endregion
@@ -7608,17 +7817,22 @@ var VueRuntimeDOM = (function(exports) {
7608
7817
  return value;
7609
7818
  }
7610
7819
  let suspenseId = 0;
7820
+ const deferredEnterKey = Symbol("_deferredEnter");
7611
7821
  const Suspense = /*@__PURE__*/ withSuspenseEnabled({
7612
7822
  name: "Suspense",
7613
7823
  __isSuspense: true,
7614
7824
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
7615
7825
  if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
7616
7826
  else {
7617
- if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
7618
- n2.suspense = n1.suspense;
7619
- n2.suspense.vnode = n2;
7620
- n2.el = n1.el;
7621
- return;
7827
+ const suspense = n1.suspense;
7828
+ if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
7829
+ const owner = suspense.parentComponent;
7830
+ if (!!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId ? parentSuspense.pendingBranch && !isSameVNodeType(n2.ssContent, suspense.pendingBranch || suspense.activeBranch) : !suspense.isInFallback) {
7831
+ n2.suspense = suspense;
7832
+ suspense.vnode = n2;
7833
+ n2.el = n1.el;
7834
+ return;
7835
+ }
7622
7836
  }
7623
7837
  patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, rendererInternals);
7624
7838
  }
@@ -7630,6 +7844,36 @@ var VueRuntimeDOM = (function(exports) {
7630
7844
  const eventListener = vnode.props && vnode.props[name];
7631
7845
  if (isFunction(eventListener)) eventListener();
7632
7846
  }
7847
+ function enterDeferred(suspense, branch) {
7848
+ const enters = [];
7849
+ collectDeferredEnters(branch, enters, true);
7850
+ if (isVaporInteropEnabled) {
7851
+ const { parentComponent } = suspense;
7852
+ const vapor = parentComponent && parentComponent.appContext.vapor;
7853
+ if (vapor) vapor.enterDeferred(suspense, enters);
7854
+ }
7855
+ if (enters.length) queuePostFlushCb(enters);
7856
+ }
7857
+ function collectDeferredEnters(vnode, enters, isRoot) {
7858
+ const { el, transition, children, shapeFlag } = vnode;
7859
+ if (shapeFlag & 6) {
7860
+ const subTree = vnode.component.subTree;
7861
+ if (subTree) collectDeferredEnters(subTree, enters, isRoot);
7862
+ return;
7863
+ }
7864
+ if (shapeFlag & 192) return;
7865
+ if (shapeFlag & 1) {
7866
+ if (!isRoot && el && el[deferredEnterKey]) {
7867
+ el[deferredEnterKey] = void 0;
7868
+ if (transition && !transition.persisted) {
7869
+ transition.beforeEnter(el);
7870
+ enters.push(() => transition.enter(el));
7871
+ }
7872
+ }
7873
+ isRoot = false;
7874
+ }
7875
+ if (shapeFlag & 16) for (let i = 0; i < children.length; i++) collectDeferredEnters(children[i], enters, isRoot);
7876
+ }
7633
7877
  function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
7634
7878
  const { p: patch, o: { createElement } } = rendererInternals;
7635
7879
  const hiddenContainer = createElement("div");
@@ -7669,11 +7913,7 @@ var VueRuntimeDOM = (function(exports) {
7669
7913
  suspense.activeBranch = pendingBranch;
7670
7914
  } else unmount(pendingBranch, parentComponent, suspense);
7671
7915
  suspense.deps = 0;
7672
- for (let i = 0; i < suspense.effects.length; i++) {
7673
- const effect = suspense.effects[i];
7674
- if (effect.flags & 8) queuePostFlushCb(effect);
7675
- }
7676
- suspense.effects.length = 0;
7916
+ discardEffects(suspense);
7677
7917
  suspense.hiddenContainer = createElement("div");
7678
7918
  if (isInFallback) {
7679
7919
  patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
@@ -7696,14 +7936,14 @@ var VueRuntimeDOM = (function(exports) {
7696
7936
  } else {
7697
7937
  triggerEvent(n2, "onPending");
7698
7938
  suspense.pendingBranch = newBranch;
7699
- if (newBranch.shapeFlag & 512) suspense.pendingId = newBranch.component.suspenseId;
7700
- else suspense.pendingId = suspenseId++;
7939
+ suspense.pendingId = suspenseId++;
7701
7940
  patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
7702
7941
  if (suspense.deps <= 0) suspense.resolve();
7703
7942
  else {
7704
- const { timeout, pendingId } = suspense;
7705
- if (timeout > 0) setTimeout(() => {
7706
- if (suspense.pendingId === pendingId) suspense.fallback(newFallback);
7943
+ const { timeout } = suspense;
7944
+ if (timeout > 0) suspense.timeoutTimer = setTimeout(() => {
7945
+ suspense.timeoutTimer = void 0;
7946
+ suspense.fallback(suspense.vnode.ssFallback);
7707
7947
  }, timeout);
7708
7948
  else if (timeout === 0) suspense.fallback(newFallback);
7709
7949
  }
@@ -7739,6 +7979,7 @@ var VueRuntimeDOM = (function(exports) {
7739
7979
  deps: 0,
7740
7980
  pendingId: suspenseId++,
7741
7981
  timeout: typeof timeout === "number" ? timeout : -1,
7982
+ timeoutTimer: void 0,
7742
7983
  activeBranch: null,
7743
7984
  isFallbackMountPending: false,
7744
7985
  pendingBranch: null,
@@ -7756,26 +7997,39 @@ var VueRuntimeDOM = (function(exports) {
7756
7997
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
7757
7998
  let hasUpdatedAnchor = false;
7758
7999
  if (delayEnter) activeBranch.transition.afterLeave = () => {
7759
- if (pendingId === suspense.pendingId) {
8000
+ if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
8001
+ enterDeferred(suspense, pendingBranch);
7760
8002
  move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
7761
8003
  queuePostFlushCb(effects);
7762
8004
  if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
7763
8005
  }
7764
8006
  };
7765
8007
  if (activeBranch && !suspense.isFallbackMountPending) {
7766
- if (parentNode(activeBranch.el) === container) {
8008
+ if (parentNode(activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)) === container) {
7767
8009
  anchor = next(activeBranch);
7768
8010
  hasUpdatedAnchor = true;
7769
8011
  }
7770
8012
  unmount(activeBranch, parentComponent, suspense, true);
7771
8013
  if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
7772
8014
  }
7773
- if (!delayEnter) move(pendingBranch, container, anchor, 0, parentComponent);
8015
+ if (!delayEnter) {
8016
+ enterDeferred(suspense, pendingBranch);
8017
+ move(pendingBranch, container, anchor, 0, parentComponent);
8018
+ }
7774
8019
  }
8020
+ clearTimeout(suspense.timeoutTimer);
8021
+ suspense.timeoutTimer = void 0;
7775
8022
  suspense.isFallbackMountPending = false;
7776
8023
  setActiveBranch(suspense, pendingBranch);
7777
8024
  suspense.pendingBranch = null;
7778
8025
  suspense.isInFallback = false;
8026
+ let kept = 0;
8027
+ for (let i = 0; i < effects.length; i++) {
8028
+ const effect = effects[i];
8029
+ if (effect.flags & 16) queuePostFlushCb(effect);
8030
+ else effects[kept++] = effect;
8031
+ }
8032
+ effects.length = kept;
7779
8033
  let parent = suspense.parent;
7780
8034
  let hasUnresolvedAncestor = false;
7781
8035
  while (parent) {
@@ -7798,13 +8052,13 @@ var VueRuntimeDOM = (function(exports) {
7798
8052
  triggerEvent(vnode, "onResolve");
7799
8053
  },
7800
8054
  fallback(fallbackVNode) {
7801
- if (!suspense.pendingBranch) return;
8055
+ if (suspense.isUnmounted || !suspense.pendingBranch) return;
7802
8056
  const { vnode, activeBranch, parentComponent, container, namespace } = suspense;
7803
8057
  triggerEvent(vnode, "onFallback");
7804
8058
  const anchor = next(activeBranch);
7805
8059
  const mountFallback = () => {
7806
8060
  suspense.isFallbackMountPending = false;
7807
- if (!suspense.isInFallback) return;
8061
+ if (suspense.isUnmounted || !suspense.isInFallback) return;
7808
8062
  const latestFallback = suspense.vnode.ssFallback;
7809
8063
  patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
7810
8064
  setActiveBranch(suspense, latestFallback);
@@ -7828,24 +8082,52 @@ var VueRuntimeDOM = (function(exports) {
7828
8082
  registerDep(instance, onResolve) {
7829
8083
  const isInPendingSuspense = !!suspense.pendingBranch;
7830
8084
  if (isInPendingSuspense) suspense.deps++;
8085
+ const render = (setupResult) => {
8086
+ instance.asyncResolved = true;
8087
+ onResolve(setupResult);
8088
+ };
7831
8089
  instance.asyncDep.catch((err) => {
7832
- handleError(err, instance, 0);
8090
+ handleError(err, instance, 0, false, true);
8091
+ return () => null;
7833
8092
  }).then((asyncSetupResult) => {
7834
- if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
8093
+ if (instance.isUnmounted || suspense.isUnmounted) return;
8094
+ const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
7835
8095
  setCurrentInstance(null, void 0);
7836
8096
  if (!instance.scope.active) {
7837
- if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
8097
+ if (isPendingDep && --suspense.deps === 0) suspense.resolve();
7838
8098
  return;
7839
8099
  }
7840
- instance.asyncResolved = true;
7841
- onResolve(asyncSetupResult);
7842
- if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
8100
+ if (!isPendingDep && suspense.pendingBranch) {
8101
+ const job = () => {
8102
+ if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) return;
8103
+ if (suspense.pendingBranch) queueEffectWithSuspense(job, void 0, suspense);
8104
+ else render(asyncSetupResult);
8105
+ };
8106
+ job.flags = 24;
8107
+ queueEffectWithSuspense(job, void 0, suspense);
8108
+ return;
8109
+ }
8110
+ render(asyncSetupResult);
8111
+ if (isPendingDep && --suspense.deps === 0) suspense.resolve();
7843
8112
  });
7844
8113
  },
7845
8114
  unmount(parentSuspense, doRemove) {
7846
8115
  suspense.isUnmounted = true;
8116
+ clearTimeout(suspense.timeoutTimer);
8117
+ suspense.timeoutTimer = void 0;
8118
+ if (parentSuspenseId !== void 0) {
8119
+ const parent = suspense.parent;
8120
+ const pendingId = parentSuspenseId;
8121
+ parentSuspenseId = void 0;
8122
+ queuePostFlushCb(() => {
8123
+ if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) parent.resolve();
8124
+ });
8125
+ }
7847
8126
  if (suspense.activeBranch) unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);
7848
- if (suspense.pendingBranch) unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove);
8127
+ if (suspense.pendingBranch) {
8128
+ unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
8129
+ discardEffects(suspense);
8130
+ }
7849
8131
  }
7850
8132
  };
7851
8133
  return suspense;
@@ -7886,6 +8168,14 @@ var VueRuntimeDOM = (function(exports) {
7886
8168
  if (block && !s.dynamicChildren) s.dynamicChildren = block.filter((c) => c !== s);
7887
8169
  return s;
7888
8170
  }
8171
+ function discardEffects(suspense) {
8172
+ const { effects } = suspense;
8173
+ for (let i = 0; i < effects.length; i++) {
8174
+ const effect = effects[i];
8175
+ if (effect.flags & 8) queuePostFlushCb(effect);
8176
+ }
8177
+ effects.length = 0;
8178
+ }
7889
8179
  function queueEffectWithSuspense(fn, id, suspense) {
7890
8180
  if (suspense && suspense.pendingBranch) {
7891
8181
  if (isArray(fn)) suspense.effects.push(...fn);
@@ -8110,7 +8400,8 @@ var VueRuntimeDOM = (function(exports) {
8110
8400
  }
8111
8401
  function guardReactiveProps(props) {
8112
8402
  if (!props) return null;
8113
- return /* @__PURE__ */ isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
8403
+ if (/* @__PURE__ */ isProxy(props)) return extend({}, props);
8404
+ return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
8114
8405
  }
8115
8406
  function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
8116
8407
  const { props, ref, patchFlag, children, transition } = vnode;
@@ -8496,7 +8787,8 @@ var VueRuntimeDOM = (function(exports) {
8496
8787
  setInSSRSetupState(false);
8497
8788
  }
8498
8789
  }).catch((e) => {
8499
- handleError(e, instance, 0);
8790
+ handleError(e, instance, 0, void 0, true);
8791
+ instance.ssrRender = (_, push) => push("<!---->");
8500
8792
  });
8501
8793
  else {
8502
8794
  instance.asyncDep = setupResult;
@@ -8565,11 +8857,16 @@ var VueRuntimeDOM = (function(exports) {
8565
8857
  else warn$1(`Component is missing template or render function: `, Component);
8566
8858
  }
8567
8859
  }
8860
+ /**
8861
+ * Read through the setup context `attrs` proxy to get the raw attrs object.
8862
+ * @internal
8863
+ */
8864
+ const rawAttrsKey = Symbol();
8568
8865
  const attrsProxyHandlers = {
8569
8866
  get(target, key) {
8570
8867
  markAttrsAccessed();
8571
8868
  track(target, "get", "");
8572
- return target[key];
8869
+ return key === rawAttrsKey ? target : target[key];
8573
8870
  },
8574
8871
  set() {
8575
8872
  warn$1(`setupContext.attrs is readonly.`);
@@ -8867,7 +9164,7 @@ var VueRuntimeDOM = (function(exports) {
8867
9164
  }
8868
9165
  //#endregion
8869
9166
  //#region packages/runtime-core/src/index.ts
8870
- const version = "3.6.0-rc.13";
9167
+ const version = "3.6.0-rc.15";
8871
9168
  const warn = warn$1;
8872
9169
  /**
8873
9170
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -9688,7 +9985,7 @@ var VueRuntimeDOM = (function(exports) {
9688
9985
  }
9689
9986
  this._styleAnchors.delete(this._def);
9690
9987
  this._applyStyles(newStyles);
9691
- if (!this._instance.vapor) this._instance = null;
9988
+ this._instance = null;
9692
9989
  this._update();
9693
9990
  };
9694
9991
  const dispatch = (event, args) => {
@@ -10285,15 +10582,15 @@ var VueRuntimeDOM = (function(exports) {
10285
10582
  vModelSelectInit(el, value, number);
10286
10583
  el[assignKey] = getModelAssigner(vnode);
10287
10584
  },
10288
- mounted(el, { value }) {
10289
- vModelSetSelected(el, value);
10585
+ mounted(el, { value, modifiers: { number } }) {
10586
+ vModelSetSelected(el, value, number);
10290
10587
  },
10291
10588
  beforeUpdate(el, { value }, vnode) {
10292
10589
  el._modelValue = value;
10293
10590
  el[assignKey] = getModelAssigner(vnode);
10294
10591
  },
10295
- updated(el, { value }) {
10296
- vModelSetSelected(el, value);
10592
+ updated(el, { value, modifiers: { number } }) {
10593
+ vModelSetSelected(el, value, number);
10297
10594
  }
10298
10595
  };
10299
10596
  /**
@@ -10328,14 +10625,14 @@ var VueRuntimeDOM = (function(exports) {
10328
10625
  /**
10329
10626
  * @internal
10330
10627
  */
10331
- const vModelSetSelected = (el, value) => {
10628
+ const vModelSetSelected = (el, value, number = false) => {
10332
10629
  el._modelValue = value;
10333
10630
  const pending = el._pendingValue;
10334
10631
  el._pendingValue = void 0;
10335
10632
  if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
10336
- setSelected(el, value);
10633
+ setSelected(el, value, number);
10337
10634
  };
10338
- function setSelected(el, value) {
10635
+ function setSelected(el, value, number) {
10339
10636
  const isMultiple = el.multiple;
10340
10637
  const isArrayValue = isArray(value);
10341
10638
  if (isMultiple && !isArrayValue && !isSet(value)) {
@@ -10350,7 +10647,7 @@ var VueRuntimeDOM = (function(exports) {
10350
10647
  const optionType = typeof optionValue;
10351
10648
  if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
10352
10649
  else option.selected = looseIndexOf(value, optionValue) > -1;
10353
- } else option.selected = value.has(optionValue);
10650
+ } else option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
10354
10651
  } else if (looseEqual(getValue(option), value)) {
10355
10652
  if (el.selectedIndex !== i) el.selectedIndex = i;
10356
10653
  return;